:root{
  /* Tactical palette */
  --bg:#0b0d0e;
  --grid:#1F2624;
  --ink:#e9ecef;
  --muted:#9aa0a6;

  --od:#3a4a3e;          /* OD green */
  --od-hi:#516450;       /* lighter OD */
  --coyote:#916f3b;      /* coyote brown accent */
  --danger:#b94b4b;

  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);

  --plate:#0e1213;       /* “data plate” cards */
  --plate-edge:#1a2021;

  --headerH:66px;
  --radius:14px;
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; color:var(--ink); background:
    radial-gradient(1400px 700px at 110% -20%, rgba(81,100,80,.16), transparent 50%),
    radial-gradient(1200px 600px at -10% 110%, rgba(20,24,25,.6), transparent 55%),
    var(--bg);
  font-family:'Share Tech Mono', monospace;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* Subtle grid */
body::before{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
  mask: linear-gradient(180deg, #000 30%, transparent 100%);
  opacity:.55;
}

/* Header */
header{
  position:fixed; inset:0 0 auto 0; height:var(--headerH); z-index:10;
  display:flex; align-items:center; gap:12px; padding:10px 18px;
  background:linear-gradient(180deg, rgba(10,12,13,.96), rgba(10,12,13,.86));
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(4px);
}
.logo{height:100%; display:flex; align-items:center}
.logo img{height:100%; width:auto; max-width:120px; object-fit:contain; filter:contrast(1.05)}
.brand{font-weight:800; letter-spacing:.08em}

/* ==== DESKTOP NAV ==== */
.nav-desktop{
  margin-left:auto; display:flex; gap:14px;
}
.nav-desktop a{
  color:#ced4da; text-decoration:none; padding:8px 10px; border-radius:10px; font-size:.95rem;
  border:1px solid transparent;
  transition:transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.nav-desktop a:hover{ background:#101415; color:#fff; border-color:var(--line-strong); transform:translateY(-1px); }

/* ==== MOBILE HAMBURGER ==== */
.nav-toggle{
  display:none;
  margin-left:auto;
  background:none; border:none; color:#fff;
  font-size:1.5rem; cursor:pointer;
  padding:8px;
  position:relative;
  z-index:11;
}
.nav-toggle span{
  display:block; width:24px; height:2px; background:#fff;
  margin:5px 0; transition:transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2){
  opacity:0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

/* ==== MOBILE MENU (FIXED POSITIONING) ==== */
.nav-mobile{
  position:fixed;
  top:var(--headerH);
  right:0;
  bottom:0;
  width:80vw; /* Adjustable width; use 100vw for full screen */
  max-width:320px; /* Optional cap for wider screens */
  background:rgba(0,0,0,.96); backdrop-filter:blur(8px);
  display:flex; flex-direction:column; align-items:center;
  padding:2rem 0;
  transform:translateX(100%);
  transition:transform .3s ease;
  z-index:9;
}
.nav-mobile.open{ transform:translateX(0); }

.nav-mobile a{
  color:#ced4da; text-decoration:none; font-size:1.1rem;
  padding:1rem 2rem; width:100%; text-align:center;
  transition:background .2s ease, color .2s ease;
}
.nav-mobile a:hover,
.nav-mobile a:focus{ background:#111; color:#fff; }

main{ padding-top: calc(var(--headerH) + 10px); position:relative; z-index:1 }

/* SECTION (modified for full width) */
.section{
  width:min(1200px,96vw); margin: 0 auto 80px;
}

/* Data-plate cards */
.plate{
  background:var(--plate);
  border:1px solid var(--plate-edge);
  border-radius:12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 60px rgba(0,0,0,.5);
  padding: 18px 18px 16px;
  position:relative; overflow:hidden;
}
.plate::after{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.12;
  background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 8px);
  mix-blend-mode: overlay;
}
.plate h1{
  margin:0 0 8px; font-size: clamp(22px, 4.2vw, 42px); line-height:1.02;
  letter-spacing:.02em;
}
.plate p{ color:var(--muted); line-height:1.65; margin:.35rem 0 0 }

.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px }
.btn{
  display:inline-block; text-decoration:none; user-select:none;
  padding:12px 14px; border-radius:10px;
  font-weight:900; letter-spacing:.08em;
  border:1px solid var(--od-hi); color:#e9f0e9; background:
    linear-gradient(180deg, color-mix(in oklab, var(--od) 70%, #000 30%), color-mix(in oklab, var(--od) 45%, #000 55%));
  box-shadow: 0 8px 22px rgba(58,74,62,.25);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.btn:hover{ transform:translateY(-1px); box-shadow:0 12px 28px rgba(58,74,62,.35); filter:brightness(1.03) }
.btn.alt{
  background:transparent; color:#d7d7d7; border-color:var(--line-strong);
  box-shadow:none;
}

/* Footer */
footer{
  width:min(1200px,96vw); margin: 8px auto 24px; color:var(--muted);
  border-top:1px dashed var(--line); padding-top:14px; font-size:.92rem;
}

/* Motion (load-in effects) */
.fx-fade-up, .fx-fade, .fx-scale {
  opacity: 0; transform: translateY(8px); will-change: opacity, transform;
}
.fx-fade{ transform:none }
.fx-scale{ transform:scale(1.03) }
body.is-loaded .fx-fade-up,
body.is-loaded .fx-fade,
body.is-loaded .fx-scale {
  opacity:1; transform:none;
  transition: opacity .55s ease, transform .55s ease; transition-delay: var(--d,0ms);
}
@media (prefers-reduced-motion: reduce){
  .fx-fade-up, .fx-fade, .fx-scale { transition:none !important; opacity:1 !important; transform:none !important; }
  .nav-mobile{ transition:none; }
  .nav-toggle span{ transition:none; }
}
@supports (padding: max(0px)){
  header{ padding-left:max(18px, env(safe-area-inset-left)); padding-right:max(18px, env(safe-area-inset-right)); }
  main{ padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

/* ---------- FORM + CALENDAR (theme-matched) ---------- */
.form-grid{
  display:grid; gap:12px; grid-template-columns: repeat(2, 1fr);
}
.field{ display:flex; flex-direction:column; gap:6px; }
.field span{ color:var(--muted); font-size:.9rem; letter-spacing:.06em }

input, select{
  appearance:none; width:100%;
  background:#0f1415; color:var(--ink);
  border:1px solid var(--plate-edge);
  border-radius:10px; padding:12px 12px;
  font-family:'Share Tech Mono', monospace; font-size:1rem;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder{ color:#7f868a }
input:focus, select:focus{
  border-color:var(--od-hi);
  box-shadow:0 0 0 2px color-mix(in oklab, var(--od) 45%, #000 55%);
}

/* Calendar container (full width) */
.calendar{
  margin-top:14px;
  border:1px solid var(--plate-edge);
  border-radius:12px; overflow:hidden;
  background:linear-gradient(180deg, #0f1314, #0b0f10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.cal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border-bottom:1px solid var(--line);
  background:linear-gradient(180deg, rgba(20,24,25,.6), rgba(11,15,16,.3));
}
.cal-title{ font-weight:800; letter-spacing:.08em }
.nav{
  appearance:none; border:1px solid var(--line-strong); background:#0f1415; color:#e0e6e2;
  padding:6px 10px; border-radius:10px; font-weight:900; cursor:pointer;
}
.nav:hover{ filter:brightness(1.05) }

.cal-grid{
  display:grid; grid-template-columns: repeat(7, 1fr);
  gap:6px; padding:10px; align-items:stretch;
}
.dow{
  text-align:center; color:#9aa0a6; font-size:.8rem; letter-spacing:.12em; padding:6px 0;
}
.cell{
  position:relative; height:44px; border:1px solid var(--line);
  border-radius:10px; background:#0e1213; color:var(--ink); cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-weight:700;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  overflow: visible; /* allow popout outside cell */
}
.cell:hover{ transform:translateY(-1px); box-shadow:0 8px 20px rgba(0,0,0,.4) }

/* Today's subtle ring (non-dominant) */
.cell.is-today:not(.is-selected){ box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); }

/* >>> SELECTED — most prominent */
.cell.is-selected{
  background: radial-gradient(180px 120px at 50% 35%,
              color-mix(in oklab, var(--od-hi) 85%, #000 15%),
              color-mix(in oklab, var(--od) 55%, #000 45%));
  border-color: var(--od-hi);
  box-shadow:
    0 0 26px rgba(81,100,80,.85),
    0 8px 30px rgba(0,0,0,.55),
    inset 0 0 0 2px rgba(255,255,255,.08);
  color:#fff;
  transform: translateY(-1px);
}

/* Full availability (stand out) */
.cell.is-available-full{
  border-color: var(--od-hi);
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--od) 65%, #000 35%),
    color-mix(in oklab, var(--od) 40%, #000 60%));
  color:#eaf2e8; font-weight:900;
}

/* Partial availability (hatched) */
.cell.is-available-partial{
  position: relative;
  border-color: color-mix(in oklab, var(--od) 55%, #000 45%);
  background: #101516;
}
.cell.is-available-partial::after{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.18;
  background: repeating-linear-gradient(45deg, var(--od) 0 4px, transparent 4px 10px);
  border-radius: inherit;
}

/* Booked / Disabled / Irrelevant — use filter instead of opacity so popout stays crisp */
.cell.is-booked{
  filter:saturate(.7) brightness(.88);
  border-style:dashed;
}
.cell.is-disabled{
  filter:saturate(.6) brightness(.85);
  cursor:not-allowed;
  border-style:dashed;
}
.cell.is-irrelevant{
  filter:saturate(.65) brightness(.9);
}
.cell.is-muted{
  filter:saturate(.75) brightness(.9);
  color:#7a8286;
}

/* Legend dots */
.cal-legend{
  display:flex; gap:16px; align-items:center; padding:10px 12px; border-top:1px dashed var(--line);
  color:var(--muted); font-size:.9rem;
}
.cal-legend .dot{
  display:inline-block; width:12px; height:12px; border-radius:4px; margin-right:6px;
  border:1px solid var(--line-strong); background:#0e1213;
}
.cal-legend .selected{ background: color-mix(in oklab, var(--od) 60%, #000 40%); border-color:var(--od-hi) }
.cal-legend .avail{ background: #142019; border-color: color-mix(in oklab, var(--od) 55%, #000 45%) }
.cal-legend .partial{ background: #101516; border-color: color-mix(in oklab, var(--od) 45%, #000 55%); background-image: repeating-linear-gradient(45deg, var(--od) 0 4px, transparent 4px 10px); opacity:.8 }
.cal-legend .booked{ background:#101516; opacity:.55; border-style:dashed }
.cal-legend .today{ background:#1b2326 }
.cal-legend .disabled{ background:#141718; opacity:.55 }

/* Icon legend */
.cal-icon-legend{
  display:flex; gap:16px; align-items:center; padding:10px 12px; border-top:1px dashed var(--line);
  color:var(--muted); font-size:.9rem;
}

/* Time slot picker */
.times{ margin-top:14px; border:1px solid var(--plate-edge); border-radius:12px; overflow:hidden; }
.times-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border-bottom:1px solid var(--line);
  background:linear-gradient(180deg, rgba(20,24,25,.6), rgba(11,15,16,.3));
  font-weight:800; letter-spacing:.06em;
}
.times-grid{
  display:flex; flex-wrap:wrap; gap:10px; padding:12px;
}
.time{
  appearance:none; border:1px solid var(--line-strong); background:#0f1415; color:#e0e6e2;
  padding:10px 12px; border-radius:10px; font-weight:900; cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease, border-color .12s ease;
}
.time:hover{ transform:translateY(-1px); box-shadow:0 8px 18px rgba(0,0,0,.4) }
.time.is-picked{
  border-color: var(--od-hi);
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--od) 60%, #000 40%),
    color-mix(in oklab, var(--od) 40%, #000 60%));
  box-shadow: 0 0 20px rgba(81,100,80,.55), inset 0 0 0 1px rgba(255,255,255,.06);
  color:#fff;
}
.time.is-disabled{ opacity:.45; border-style:dashed; cursor:not-allowed; }

/* Messages */
.form-msg{ margin:.6rem 0 0 }
.form-msg.error{ color:var(--danger) }
.form-msg.ok{ color:#b6e3b0 }

/* Day icons */
.cell .day-icon, .legend-icon {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(32%) sepia(15%) saturate(1026%) hue-rotate(90deg) brightness(95%) contrast(90%);
}
.cell .day-icon.rifle, .legend-icon.rifle { transform: rotate(45deg); }
.cell .day-icon.rifle { width: 22px; height: 22px; }
.legend-icon {
  position: relative;
  bottom: auto; right: auto;
  vertical-align: middle; margin-right: 6px;
  width: 12px; height: 12px;
}
.legend-icon.rifle { width: 14px; height: 14px; }

/* ----- Popout for hover (moved up & left-aligned to cell) ----- */
.calendar { overflow: visible; } /* ensure popout can escape calendar clip */

.popout {
  display: none;
  position: absolute;
  top: -160px;          /* moved higher above the cell */
  left: 0;              /* align to left edge of the cell */
  right: auto;
  width: 220px;
  padding: 12px;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 8px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  color: var(--ink);
  font-size: 0.9rem;
  pointer-events: auto; /* allow hover events */
}
.cell:hover .popout { display: block; }

/* Hide the popout if you hover INTO it */
.cell:has(.popout:hover) .popout { display: none; }

.popout h4 { margin: 0 0 6px; font-size: 1.1rem; }
.popout p { margin: 4px 0; color: var(--muted); }
.popout img {
  width: 100%; height: auto;
  border-radius: 6px; margin-bottom: 8px;
}

/* Modal for mobile */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.modal-card {
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 12px;
  padding: 16px;
  max-width: 90vw;
  text-align: center;
}
.modal-card h4 { margin: 0 0 10px; font-size: 1.2rem; }
.modal-card p { margin: 6px 0; color: var(--muted); }
.modal-card img {
  width: 100%; height: auto;
  border-radius: 8px; margin-bottom: 12px;
}
.modal-actions {
  display: flex; gap: 10px; justify-content: center; margin-top: 16px;
}

/* Responsive tweaks */
@media (max-width: 980px){
  .form-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 768px){
  .nav-desktop{ display:none; }
  .nav-toggle{ display:block; }
}

/* Inputs (consolidated) */
input:not([type="checkbox"]), select, textarea{
  appearance:none; width:100%; background:#0f1415; color:var(--ink);
  border:1px solid var(--plate-edge); border-radius:10px; padding:10px 12px; font:inherit; outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea{ min-height:84px; resize:vertical }
input::placeholder, textarea::placeholder{ color:#7f868a }
input:focus, select:focus, textarea:focus{
  border-color:var(--od-hi); box-shadow:0 0 0 2px color-mix(in oklab, var(--od) 45%, #000 55%);
}

input[type="checkbox"]{
  appearance:none; width:18px; height:18px; background:#0f1415;
  border:1px solid var(--plate-edge); border-radius:4px; position:relative;
  cursor:pointer; transition:background .15s ease, border-color .15s ease;
}
input[type="checkbox"]:checked{
  background:var(--od-hi); border-color:var(--od-hi);
}
input[type="checkbox"]:checked::after{
  content:'✔'; position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%); color:var(--ink); font-size:12px;
}
input[type="checkbox"]:focus{
  box-shadow:0 0 0 2px color-mix(in oklab, var(--od) 45%, #000 55%);
}
/* === Wizard card typography + contrast === */
.wizard-box h2{
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.15;
  color: #fff;
  letter-spacing: .04em;
}

.wizard-card{
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* ensure button cards inherit the site font/size */
  font: inherit;
}

.wizard-card h3{
  margin: 0 0 6px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.15;
  font-size: clamp(18px, 2.6vw, 24px);
  color: #fff; /* strong heading on dark plate */
}

.wizard-card p{
  margin: 0;
  line-height: 1.6;
  font-size: clamp(14px, 1.8vw, 17px);
  /* slightly softer than pure --ink but still readable */
  color: color-mix(in oklab, var(--ink) 86%, #000 14%);
}

/* Optional: make prices pop if you add class="price" to the price <p> */
.wizard-card .price{
  color: var(--coyote);
  font-weight: 900;
  letter-spacing: .06em;
  font-size: clamp(15px, 2vw, 18px);
}

/* Better focus/hover affordance on dark theme */
.wizard-card:is(:hover, :focus-visible){
  outline: none;
  border-color: var(--od-hi);
  box-shadow:
    0 10px 26px rgba(0,0,0,.45),
    0 0 0 2px color-mix(in oklab, var(--od) 45%, #000 55%) inset;
  filter: brightness(1.02);
}

/* --- Wizard: keep dark theme + re-center --- */
.wizard-container{
  position: fixed;
  top: var(--headerH);
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  /* same dark background feel as the site */
  background:
    radial-gradient(1200px 600px at -10% 110%, rgba(20,24,25,.6), transparent 55%),
    var(--bg);
  display: grid;
  place-items: center;                     /* centers on any screen */
  overflow: auto;
  padding: clamp(16px, 2.5vw, 28px);
  color: var(--ink);
}

.wizard-box{
  width: min(920px, 96vw);
  margin: 0 auto;
  text-align: center;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 60px rgba(0,0,0,.5);
  padding: clamp(16px, 2.2vw, 24px);
}

/* type scale + colors (NO white) */
.wizard-box h2{
  margin: 0 0 12px;
  letter-spacing: .04em;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.15;
  color: var(--ink);
}

.wizard-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.wizard-card{
  appearance: none;
  font: inherit;                           /* prevent tiny UA button font */
  color: var(--ink);
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 12px;
  text-align: left;
  padding: 16px;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, filter .14s ease;
}
.wizard-card:hover,
.wizard-card:focus-visible{
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  border-color: var(--od-hi);
  filter: brightness(1.02);
}

.wizard-card h3{
  margin: 0 0 6px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.15;
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--ink);                        /* NOT white */
}
.wizard-card p{
  margin: 0;
  line-height: 1.6;
  font-size: clamp(15px, 1.9vw, 17px);
  color: var(--muted);                      /* softer body text */
}

.wizard-img{
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 10px;
}

.wizard-actions{
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* keep page from scrolling behind the wizard; fallback if :has() isn’t supported */
@supports not (selector(:has(*))){
  .wizard-container{ overscroll-behavior: contain; }
}

/* --- Wizard: fixed overlay that CAN SCROLL and stays centered --- */
/* --- Wizard: fixed overlay that CAN SCROLL on all browsers --- */
.wizard-container{
  position: fixed;
  inset: var(--headerH) 0 0 0;   /* below the fixed header */
  z-index: 1000;

  background:
    radial-gradient(1200px 600px at -10% 110%, rgba(20,24,25,.6), transparent 55%),
    var(--bg);

  /* make THIS layer scroll, not the page */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* iOS momentum */
  overscroll-behavior: contain;
  touch-action: pan-y;

  /* explicit viewport-based height to avoid Safari quirks */
  height: calc(100svh - var(--headerH));    /* modern small viewport unit */
  height: calc(100dvh - var(--headerH));    /* dynamic viewport fallback */
  height: calc(100vh  - var(--headerH));    /* legacy fallback */

  /* layout */
  display: flex;
  align-items: flex-start;
  justify-content: center;

  /* padding + safe areas */
  padding:
    clamp(16px, 2.5vw, 28px)
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.wizard-box{
  width: min(920px, 96vw);
  /* give breathing room while allowing the container to handle scrolling */
  margin: clamp(16px, 3vh, 48px) auto;
  text-align: center;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 60px rgba(0,0,0,.5);
  padding: clamp(16px, 2.2vw, 24px);
}
/* Remove the old hover extender entirely */
 /* (no .cell:has(.popout):hover::before rule) */