    :root{
      --bg:#f7f9fc; --card:#ffffffb3; --border:#e5e7eb; --text:#0f172a; --muted:#64748b;
       --bigH: 80dvh;
      --smallH: 40dvh;
      --shadow:0 6px 18px rgba(15,23,42,.06); --rad:18px;
    }
    *{box-sizing:border-box}
    html,body{height:auto;}
 
    html, body{
      margin:0;
      width: 100%;
      background:#0b0b0b;                 /* black page background */
      font-family:ui-sans-serif,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
      color:#e5e7eb;                       /* light text */
    }
    /* Leave space for the fixed control bar so page can scroll */
    body{ overflow-y:auto;  } /* adjust 180px if your bar gets shorter/taller */
    header{position: fixed; top:0;z-index:30;background:rgba(255,255,255,.75);backdrop-filter:blur(8px);border-bottom:1px solid var(--border)}
    .container{max-width:100%;margin:0 auto;padding:12px 16px; padding-bottom: 160px;}
    .badge{display:flex;align-items:center;gap:8px;font-weight:700}
    .badge img{width:24px;height:24px}
    .kbd{padding:2px 6px;border:1px solid var(--border);border-radius:6px;background:#f8fafc;font-size:12px}

    main.grid{display:grid;grid-template-columns:300px 1fr;gap:16px;padding:16px}
   /* Stack ONLY below 800px */
    @media (max-width:800px){
      .tripleGrid{
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto 1fr auto 1fr auto;
        gap: 10px;
      }
      :root{ --bigH: 80dvh; --smallH: 40dvh; }   /* comfortable when stacked */
    }




      /* Ensure the page can scroll and content isn’t hidden behind fixed bars */
      body{ min-height: 80dvh; }
      .container{ padding-bottom: 140px; }   /* room for the fixed action bar */

      /* Smooth inertial scrolling inside the modal on iOS */
      .modal__body{ -webkit-overflow-scrolling: touch; }


    .card{background:var(--card);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow)}
    .pane{padding:16px}
    .heading{font-size:14px;font-weight:800;color:#334155}
    .muted{font-size:12px;color:var(--muted)}
    .row{display:flex;align-items:center;gap:8px}
    .row.space{justify-content:space-between}
    .grid{display:grid;gap:12px}
    .grid.two{grid-template-columns:1fr 1fr}
    .grid.three{grid-template-columns:1fr 1fr 1fr}
    select,input[type="range"],button{font:inherit}
    button.btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border:1px solid var(--border);border-radius:12px;background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.02);cursor:pointer;transition:transform .05s}
    button.btn:active{transform:scale(.98)}

    /* 3-panel viewer layout (Eclipse-like) */
    .tripleGrid{
      display:grid;
      grid-template-columns:2fr 1fr;
      grid-template-rows:auto 1fr 1fr auto;
      gap:12px;
    }
    @media(max-width:1100px){.tripleGrid{grid-template-columns:1fr;grid-template-rows:auto 1fr auto 1fr auto 1fr auto}}
    .viewer{position:relative;min-height:200px;overflow:hidden;border-radius:20px}
    /* fallback first, then dvh for modern browsers */
    .viewer.big{  height: var(--bigH); }
    .viewer.small{height: var(--smallH); }


    /* Tablet portrait: keep 2 columns, make all panes fit */
    /* ✅ Tablet portrait & small laptops (fits 1024×1366) */
    @media (min-width:800px) and (max-width:1200px){
      /* keep two columns, just tighten */
      .tripleGrid{
        grid-template-columns: 1.55fr 1fr;        /* big-left + right column */
        grid-template-rows: auto 1fr 1fr auto;    /* same as desktop */
        gap: 10px;
      }

      :root{
        /* make sure BOTH right panes fit next to a smaller big-left */
        --bigH: 80dvh;     /* was 72 */
        --smallH: 40dvh;   /* was 36 */
      }

      .axialBar{ padding: 6px 8px; }
      .sliceWrap{ padding: 6px 0 10px; gap: 8px; }
      .sliceSlider{ width: clamp(300px, 56vw, 760px); }
      .pill{ font-size: 11px; padding: 5px 9px; }
      .viewerAction{ width: 32px; height: 32px; top: 8px; right: 8px; }

      /* HUDs a touch smaller so they don’t cover content */
      .cornerHud .hud, .cornerTable .hud{ transform: scale(.9); transform-origin: bottom right; }
      .cornerTable{ left: 14px; bottom: 14px; }
      .cornerHud{ right: 14px; bottom: 14px; }
    }


    /* 3) Wide-but-short displays (e.g., 1521×720): everything fits without scroll */
@media (max-height: 760px){
  :root{
    --bigH: 80dvh;
    --smallH: 40dvh;
  }

  /* tighter grid and chrome */
  .tripleGrid{ gap: 8px; }
  .axialBar{ padding: 3px 6px; }
  .sliceWrap{ padding: 2px 0 6px; gap: 4px; }
  .sliceSlider{ width: clamp(260px, 52vw, 640px); }

  /* make pills and the top-right rotate button smaller */
  .pill{ font-size: 10px; padding: 4px 7px; }
  .viewerAction{ width: 28px; height: 28px; top: 6px; right: 6px; }

  /* HUD + action bar compact so they don’t consume height */
  .cornerHud .hud, .cornerTable .hud{ transform: scale(.82); transform-origin: bottom right; }
  .cornerHud{ right: 10px; bottom: 10px; }
  .cornerTable{ left: 10px; bottom: 10px; }


  /* allow viewers to shrink further if needed */
  .viewer{ min-height: 160px; }
}

/* 4) Ultra-short (≤ 640px) — still keep all 3 panes visible */
@media (max-height: 640px){
  :root{ --bigH: 80dvh; --smallH: 40dvh; }
  .pill{ font-size: 9.5px; }
  .viewerAction{ width: 26px; height: 26px; }
}

    /* Wide-but-short tablets/laptops (e.g., 1521×720) */
    @media (max-height:820px){
      /* keep two columns if width allows; just shrink the panels more */
      :root{
        --bigH: 80dvh;   /* down from 54–56 */
        --smallH: 40dvh; /* down from 24–26 */
      }

      .tripleGrid{ gap: 8px; }

      /* tighten UI chrome so more content fits vertically */
      .axialBar{ padding: 4px 8px; }
      .sliceWrap{ padding: 4px 0 8px; gap: 6px; }
      .sliceSlider{ width: clamp(280px, 54vw, 720px); }

      .pill{ font-size: 10.5px; padding: 4px 8px; }
      .viewerAction{ width: 30px; height: 30px; top: 6px; right: 6px; }

      /* fixed elements smaller + a bit higher to free height */

      .cornerHud{ right: 12px; bottom: 12px; }
      .cornerTable{ left: 12px; bottom: 12px; }
      .cornerHud .hud, .cornerTable .hud{ transform: scale(.88); transform-origin: bottom right; }

      /* ensure there is always scrollable overflow even if content barely fits */
      html{ overflow-y: hidden; }         /* force a vertical scrollbar track */
      .container{ padding-bottom: 200px; }/* extra space so last controls aren’t hidden */
    }

    /* ultra-short heights (≤ 680px): one more notch, still usable */
    @media (max-height:680px){
      :root{ --bigH: 80dvh; --smallH: 40dvh; }

    }





    .stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
    .wrap{transform-origin:center center; }
    .img{user-select:none;pointer-events:none;display:block;max-width:none}
    .overlay{position:absolute;top:0;left:0}
    .pill{position:absolute;top:12px;left:12px;background:rgba(255, 255, 255, 0.712);border:1px solid var(--border);padding:6px 10px;border-radius:999px;box-shadow:var(--shadow);font-size:12px; color:#0b0b0b; font-weight:700;}
    .crosshair,.gridlines{position:absolute;inset:0;pointer-events:none}
    /* ===== TPS-style crosshair look ===== */



    /* ===== TPS-style crosshair look (Eclipse-like) ===== */


/* Long dotted wires across the whole viewer */
.crosshair .xh-v,
.crosshair .xh-h{
  stroke-width:1.4;
  stroke-dasharray:6 4;                /* dotted line */
}

/* Box around the CT FOV */
.crosshair .xh-box{
  outline: none;
}

/* Triangular handles at each end of the wires */
.crosshair .handle{
  stroke-width:1.6;
  pointer-events:auto;                 /* these ARE clickable/drag-able */
  cursor:grab;
}
.crosshair .handle.dragging{
  cursor:grabbing;
}

.crosshair .xh-box {
  fill: none;
  pointer-events: none;
}
   


    /* Full-bleed viewers (no card chrome) */
    .viewerCard{
      background: transparent;
      border: none;
      border-radius: 12px; /* keep a subtle rounding on the viewer */
      box-shadow: none;
      padding: 0;
    }

    .viewerTitle{padding:8px 12px;font-weight:700;font-size:13px;color:#e5e7eb;}

    /* Controls card */
    .controlCard{background:var(--card);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow);padding:16px}


    /* ───── Bottom-right CONROLL BUTTONS “windowy” HUD ───── */
.cornerHud{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  user-select: none;
}

.cornerHud .hud{
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  /* glass / window look */
  background: linear-gradient(180deg, rgba(30,41,59,.92), rgba(15,23,42,.92));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 12px 32px rgba(2,8,23,.45),
    inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

/* Reuse your existing nudge grid, just tweak sizes a touch */
.nudgeGrid{
  display:grid;
  grid-template-columns:40px 40px 40px;
  grid-template-rows:40px 40px 40px;
  gap:8px;
}
.btnIcon{
  width:40px; height:40px; padding:0;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.95);
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
  cursor:pointer;
}
.nudgeGrid .up    {grid-column:2; grid-row:1;}
.nudgeGrid .left  {grid-column:1; grid-row:2;}
.nudgeGrid .center{grid-column:2; grid-row:2; width:auto; padding:0 12px;}
.nudgeGrid .right {grid-column:3; grid-row:2;}
.nudgeGrid .down  {grid-column:2; grid-row:3;}

@media (max-width: 900px){
  .cornerHud{ right:12px; bottom:12px; }
  .nudgeGrid{
    grid-template-columns:36px 36px 36px;
    grid-template-rows:36px 36px 36px;
    gap:6px;
  }
  .btnIcon{ width:36px; height:36px; }
}


/* ── Bottom-left glass table FOR COORDINATES ─────────────────────────── */
.cornerTable{
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 70;
  user-select: none;
}
.cornerTable .hud{
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30,41,59,.92), rgba(15,23,42,.92));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 32px rgba(2,8,23,.45), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

/* compact 2-column key/value table */
.kvTable{
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  color: #e5e7eb;
}
.kvTable th, .kvTable td{ padding: 6px 12px; }
.kvTable th{ text-align: left; font-weight: 700; color:#cbd5e1; }
.kvTable td{ text-align: right; min-width: 56px; }

/* subtle zebra to match the screenshot vibe */
.kvTable tr:nth-child(even) th,
.kvTable tr:nth-child(even) td{ background: rgba(255,255,255,.04); }

/* rounded corners on the card’s inner table */
.kvTable tr:first-child th{ border-top-left-radius: 10px; }
.kvTable tr:first-child td{ border-top-right-radius: 10px; }
.kvTable tr:last-child  th{ border-bottom-left-radius: 10px; }
.kvTable tr:last-child  td{ border-bottom-right-radius: 10px; }

@media (max-width:900px){
  .tripleGrid{ gap: 10px; }
  .viewer.big{   height:68vh; height:68dvh; }
  .viewer.small{ height:32vh; height:32dvh; }

  /* shrink labels/pills a touch so nothing overlaps */
  .pill{ font-size:11px; padding:5px 9px; }
  .viewerAction{ width:32px; height:32px; top:8px; right:8px; }
}







/* Compact nudge pad (right-aligned) */
.nudgeRow{display:flex; align-items:center; justify-content:flex-end; margin-top:8px;}
.nudgeCompact{display:flex; flex-direction:column; align-items:flex-end; gap:6px;}
.nudgeGrid{
  display:grid;
  grid-template-columns:36px 36px 36px;
  grid-template-rows:36px 36px 36px;
  gap:6px;
}
.btnIcon{width:36px; height:36px; padding:0; border-radius:10px;}
.nudgeGrid .up    {grid-column:2; grid-row:1;}
.nudgeGrid .left  {grid-column:1; grid-row:2;}
.nudgeGrid .center{grid-column:2; grid-row:2; width:auto; padding:0 10px;}
.nudgeGrid .right {grid-column:3; grid-row:2;}
.nudgeGrid .down  {grid-column:2; grid-row:3;}
.nudgeFine{display:flex; gap:6px; justify-content:flex-end;}
.btnTiny{padding:4px 8px; font-size:12px; border-radius:8px}



/* Mini opacity bar under Axial viewer */
/* --- Swish (opacity) bar under Axial --- */
.axialBar{
  display:flex; align-items:center; justify-content:center;
  gap:10px; padding:8px 12px;
  background:#0b0b0b;                 /* same as page bg */
  border-top:1px solid rgba(255,255,255,.08);
}
.axialBar .label{ font-size:12px; font-weight:700; color:#cbd5e1; }
.axialBar .val{ font-size:12px; color:#cbd5e1; }

/* Bracket-style range input */
.axialBar .miniRange{
  -webkit-appearance:none; appearance:none;
  width:100px; height:24px; background:transparent; cursor:pointer;
  outline:none;
}

/* WebKit (Chrome/Edge/Safari) */
.axialBar .miniRange::-webkit-slider-runnable-track{
  height:24px; background:transparent; border:none;
  /* draw |_| with backgrounds: left + right verticals, bottom line */
  background:
    linear-gradient(#fff,#fff) left   bottom/2px 18px no-repeat,
    linear-gradient(#fff,#fff) right  bottom/2px 18px no-repeat,
    linear-gradient(#fff,#fff) center bottom/100% 2px no-repeat;
}
/* Triangular Swish thumb — WebKit */
.axialBar .miniRange::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:22px; height:16px;                 /* visual size of the triangle */
  background:#f5d9c6;                      /* peach fill */
  clip-path: polygon(50% 0, 0 100%, 100% 100%);  /* ▲ */
  margin-top:4px;                          /* centers on 24px track */
  border:none;
  /* crisp white outline + subtle inner shadow */
  filter:
    drop-shadow(0 0 0 rgba(255,255,255,.95))  /* required so next one renders */
    drop-shadow(0 0 0 2px rgba(255,255,255,.95))
    drop-shadow(0 1px 0 rgba(0,0,0,.35));
}

/* Triangular Swish thumb — Firefox */
.axialBar .miniRange::-moz-range-thumb{
  width:22px; height:16px;
  background:#f5d9c6;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  border:none;
  filter:
    drop-shadow(0 0 0 2px rgba(255,255,255,.95))
    drop-shadow(0 1px 0 rgba(0,0,0,.35));
}

.axialBar .miniRange::-moz-range-progress{ background:transparent; }
.axialBar .miniRange::-moz-range-thumb{
  width:18px; height:18px;
  background:#f5d9c6; border:2px solid rgba(255,255,255,.9);
  border-radius:4px; box-shadow:0 0 0 1px rgba(0,0,0,.35) inset;
}

/* Make the white pills readable on black (already present, keep it) */
.pill{
  color:#0b0b0b; font-weight:700;
}



/* ===== Slice slider directly under the label ===== */
.sliceWrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:10px 0 18px;
}

.sliceHeader{
  display:flex;
  align-items:center;
  gap:10px;
  color:#cbd5e1;
  font-weight:800;
}
.sliceHeader .sliceLabel{ font-size:14px; }
.sliceHeader .sliceVal{ font-size:14px; }

/* 3D-Anatomy glow style, but scoped just to this slider */
.sliceSlider{
  -webkit-appearance:none;
  width:clamp(360px,60vw,1000px);
  height:8px;
  margin:0;                     /* keep it tight under the label */
  background:#222;
  border-radius:10px;
  outline:none;
  box-shadow:0 0 8px rgba(0,255,255,.4);
  transition:box-shadow .3s ease;
}
.sliceSlider:hover{ box-shadow:0 0 12px rgba(0,255,255,.6); }

/* WebKit thumb */
.sliceSlider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:20px; height:20px;
  background:#00f0f0;
  border:2px solid #fff;
  border-radius:50%;
  cursor:pointer;
  transition:transform .2s ease;
}
.sliceSlider::-webkit-slider-thumb:hover{ transform:scale(1.2); }

/* Firefox */
.sliceSlider::-moz-range-thumb{
  width:20px; height:20px;
  background:#00f0f0;
  border:2px solid #fff;
  border-radius:50%;
  cursor:pointer;
}
.sliceSlider::-moz-range-track{
  background:#222;
  border-radius:10px;
  height:8px;
}


/* ── Bottom-center TREAT OR NO TREAT ───────────────────────── */


.pillBtn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 9999px;        /* full pill */
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  box-shadow:
    0 8px 24px rgba(2,8,23,.35),
    inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
}
.pillBtn:active { transform: translateY(1px) scale(.98); }
.pillBtn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.35),
    0 8px 24px rgba(2,8,23,.35);
}

/* Green = Treat */
.pillBtn.success{
  background: linear-gradient(180deg,#22c55e,#16a34a);
}
/* Red = Don't treat */
.pillBtn.danger{
  background: linear-gradient(180deg,#ef4444,#dc2626);
}

/* Hover brighten */
.pillBtn:hover { filter: brightness(1.05); }

/* Stack on small screens */
@media (max-width: 520px){

  .pillBtn{ padding:10px 22px; font-size:15px; }
}


.help i {
  text-decoration: none;
}

/* 5) burger‐menu icon styling */
.nav i.fi-sr-comment-info {
  color: white;
  font-size: 30px;
  margin-left: 1rem;
}
.nav i.fi-sr-comment-info:hover{
  cursor: pointer;
}


/* this is the CIRCLE IN THE TOP RIGHT CORNER USED TO SWITCH VIEWS*/
  /* position helper for icons inside a viewer */
  .viewer { 
    position: relative; 
  } 
  
  .viewerAction {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;                 /* above crosshair/grid/pill */
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.45);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(2px);
  }
  .viewerAction:hover { background: rgba(0,0,0,.6); }
  .viewerAction i { font-size: 18px; line-height: 1; }



  /*THIS IS TO SET THE COLOR OF THE PILL THAT INFORMS USER OF CT IMAGE AND TODAYS IMAGE*/
#opacityHoldPill{
  background: rgba(135, 206, 250, 0.678); /* light sky blue */
  color: #09202b;
}


:root{ --header-h: 64px; }          /* default header height */
@media (max-width:780px){ :root{ --header-h: 56px; } }  /* your smaller header */


/* ── THIS IS THE CASE STUDY PERSONA SCENARIO Top‑center case‑study pill ─────────────────────────── */
/* ── Top‑center case‑study pill (staged + slow) ─────────── */
/* ── Top‑center case‑study pill: drop-in → stretch → text ─────────── */
.case-pill{
  position: fixed;
  top: calc(var(--header-h) + 20px);
  left: 50%;
  transform: translate(-50%, -24px);   /* start slightly above */
  opacity: 0;                          /* fade in on drop */
  z-index: 95;

  display: flex;
  align-items: center;
  gap: 10px;

  background: #fff;
  color: #0b0b0b;
  border: 1px solid var(--border);
  border-radius: 9999px;
  box-shadow: var(--shadow);
  padding: 6px 12px;

  overflow: hidden;
  white-space: nowrap;
  max-width: 44px;                     /* face-only circle */

  /* phase 1: drop-in (no width anim yet) */
  transition: transform .35s cubic-bezier(.22,.8,.2,1), opacity .55s ease;
}
.case-pill img{ width:28px; height:28px; border-radius:50%; flex:0 0 auto; }
.case-pill .label{ 
  font-weight:600; 
  opacity:0; 
  transition: opacity .3s ease .3s; 
}

/* after drop completes */
.case-pill.ready{
  /* now allow width animation for phase 2 */
  transition:
    transform .9s cubic-bezier(.22,.8,.2,1),
    opacity .55s ease,
    max-width 1.8s cubic-bezier(.22,.8,.2,1),
    box-shadow .2s ease;
}

/* phase 1: end state (landed) */
.case-pill.entered{
  transform: translate(-50%, 0);
  opacity: 1;
}

/* phase 2: stretch to reveal the sentence */
.case-pill.show{ max-width: min(90vw, 560px); }
/* phase 3: text fades in (delay set above) */
.case-pill.show .label{ opacity: 1; }

.case-pill:hover{ cursor:pointer; box-shadow:0 8px 24px rgba(2,8,23,.35); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .case-pill{ transform: translate(-50%, 0); opacity:1; max-width:min(90vw,560px); transition:none; }
  .case-pill .label{ opacity:1; transition:none; }
}








/* ──THIS IS TO HAVE MORE INFO ABOUT THE PATIENT ───────────────────────────────────────────── */
.modal{ position:fixed; inset:0; display:none; z-index:120; }
.modal.show{ display:block; }
.modal__backdrop{
  position:absolute; inset:0;
  background:rgba(2,8,23,.65);
  backdrop-filter: blur(4px);
}
.modal__dialog{
  position:relative;
  width:min(720px,92vw);
  margin:10vh auto;
  background:linear-gradient(180deg,#0f172a,#0b1222);
  color:#e5e7eb;
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  box-shadow:0 24px 80px rgba(2,8,23,.6), inset 0 1px 0 rgba(255,255,255,.06);
  padding:18px 18px 16px;
  transform:translateY(12px) scale(.98);
  opacity:0;
  transition:transform .28s ease, opacity .28s ease;
}
.modal.show .modal__dialog{ transform:none; opacity:1; }

.modal__close{
  position:absolute; top:10px; right:10px;
  width:36px; height:36px; border:0; border-radius:999px;
  background:rgba(255,255,255,.1); color:#fff; font-size:22px; line-height:1;
  cursor:pointer; backdrop-filter:blur(2px);
}
.modal__close:hover{ background:rgba(255,255,255,.18); }

.modal__header{ display:flex; align-items:center; gap:12px; margin:6px 6px 12px; }
.modal__header .avatar{ width:38px; height:38px; border-radius:50%; }
.modal__header h3{ margin:0; font-size:18px; font-weight:800; }
.modal__header .sub{ margin:2px 0 0; color:#93a4b8; font-size:12px; }

.modal__body{ padding:4px 6px 10px; max-height:48vh; overflow:auto; }
.kv{ display:grid; gap:10px; }
.kv > div{ display:grid; grid-template-columns:160px 1fr; gap:10px; }
.kv dt{ font-weight:800; color:#cbd5e1; }
.kv dd{ margin:0; color:#e5e7eb; }

.modal__footer{
  display:flex; justify-content:flex-end; gap:10px; padding:8px 6px 2px;
  border-top:1px solid rgba(255,255,255,.08);
}
body.has-modal { overflow: hidden; }

/* Mobile tweaks */
@media (max-width:560px){
  .kv > div{ grid-template-columns:120px 1fr; }
}





/* THIS IS FOR THE HELP ADDITIONAL INFO ON HOW TO USE THE IMAGE MATCH COMMANDS */
.helpList { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; }
.helpList li { line-height: 1.35; }
.helpList kbd {
  padding: 2px 6px; border:1px solid rgba(255,255,255,.25); border-radius:6px;
  background:rgba(255,255,255,.06); font-size:.9em; margin:0 2px;
}





/* ── THIS IS FOR THE PTV LEGEND CARD ───────────────────────────────────────────── */
:root{
  /* Tweak this if you adjust the magenta on your overlay */
  --ptv-purple: #b1007a;   /* bright magenta/purple */
}

.legendRow{
  display:flex; align-items:center; gap:10px;
  font-size: 13px; font-weight: 700;
}

.swatch.line{
  display:inline-block;
  width: 36px; height: 0px;
  border-top: 4px solid var(--ptv-purple);
  border-radius: 2px;

}

.legendHr{
  margin: 8px 0;
  border: 0; height: 1px;
  background: rgba(255,255,255,.08);
}

.legendHead{
  font-size: 11px; font-weight: 900; letter-spacing: .3px;
  color: #cbd5e1; text-transform: uppercase;
  margin-bottom: 6px;
}

.tolList{
  list-style: none; padding: 0; margin: 0; display: grid; gap: 4px;
  font-size: 13px;
}
.tolList li{ display:flex; justify-content:space-between; gap:10px; }
.tolName{ color:#cbd5e1; }

/* keep it readable on small screens */
@media (max-width: 520px){
  .legendBox{ top: 68px; left: 12px; width: 200px; padding: 8px 10px; }
}
/* Make PTV the default style when no modifier is present */
.swatch.line:not(.ctv):not(.gtv){
  background-image: repeating-linear-gradient(90deg, var(--ptv-purple) 0 8px, transparent 8px 16px);
}








/* --- Force the legend in the bottom-left HUD to render --- */

/* Contour colours (match your standard) */
:root{
  --ptv-purple: #b1007a;
  --ctv-orange: #ff9466;
  --gtv-red:    #ef4444; 
}
/* Legend: stack items vertically, each item is a small row */
.legendCol{
  display: grid;
  gap: 8px;
}
.legendItem{
  display: flex;
  align-items: center;
  gap: 10px;
}
.legendItem .legendLabel{ font-weight: 700; }

/* ensure the “dashed pill” style wins */
.swatch.line{
  border: 0;                 /* ← important: remove old border-top */
  width:48px; height:5px;
  background-size:12px 100%;
  background-repeat:repeat-x;
  filter: drop-shadow(0 0 4px rgba(0,0,0,.25));
}
.swatch.line.ptv{
  background-image: none;               /* override dashed */
  background-color: var(--ptv-purple);     /* solid red */
}

.swatch.line.ctv{
  background-image: none;               /* override dashed */
  background-color: var(--ctv-orange);     /* solid red */
}

.swatch.line.gtv{
  background-image: none;               /* override dashed */
  background-color: var(--gtv-red);     /* solid red */
}






/*CONTOURING*/  

  /* make the nav a flex row */
  nav.topbar{
    display:flex;
    align-items:center;
    gap:12px;
    padding:8px 12px;
  }

  /* push the toolbar to the far right in the flex row */
  .drawToolbar{
    margin-left:auto;               /* <<< this is the key */
    display:flex; align-items:center; gap:8px;
    background:rgba(15,23,42,.6);
    border:1px solid rgba(255,255,255,.15);
    padding:6px; border-radius:12px; backdrop-filter:blur(6px);
  }

  .dt-btn{
    appearance:none; border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.08);
    border-radius:10px; padding:6px 8px; cursor:pointer; display:grid; place-items:center
  }
  .dt-btn[aria-pressed="true"]{ outline:2px solid rgba(255,255,255,.5) }
  .dt-colours{ display:flex; gap:6px; margin-left:4px }
  .dt-colour{
    width:18px; height:18px; border-radius:999px; border:2px solid rgba(255,255,255,.75);
    cursor:pointer; padding:0; background:#7c3aed;
  }
  #col-purple{ background:#7c3aed }
  #col-orange{ background:#fb923c }
  #col-green{  background:#db3315 }
  .dt-colour[aria-checked="true"]{ box-shadow:0 0 0 2px #fff, inset 0 0 0 2px rgba(0,0,0,.25) }

  /* SVG overlay fills the wrap (so it scales with zoom/pan) */
  .anno-svg{
  position:absolute; inset:0; width:100%; height:100%;
  pointer-events:auto; z-index:5;
  touch-action: none;         /* ← add this */
  
}

  /* Polygons default look */
  .anno-svg polygon{
    stroke-width:2;
    vector-effect: non-scaling-stroke; /* keep stroke width constant while zooming */
  }
  .anno-svg .temp-line{
    fill:none; stroke:rgba(255,255,255,.7); stroke-dasharray:4 4; stroke-width:2;
    vector-effect: non-scaling-stroke;
  }
  .anno-svg .vertex{
    r:3.5; fill:#fff; stroke:rgba(0,0,0,.6); stroke-width:1.5;
    vector-effect: non-scaling-stroke;
  }





  /*RIGHT SIDE CONTOURING FOR TODAY'S XRAY*/

  /* Right-side floating toolbar */
.drawToolbar--right{
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 75;
  display:flex; align-items:center; gap:8px;
  background:rgba(15,23,42,.6);
  border:1px solid rgba(255,255,255,.15);
  padding:6px; border-radius:12px; backdrop-filter:blur(6px);
}

/* Sky blue swatch */
#col-sky{ background:#38bdf8; }


  

/*THIS IS FOR THE EYE TO MAKE CONTOURS VISIBLE AND INVISIBLE*/

  .legendItem .eye-toggle{
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    margin-left:6px;
    user-select:none;
  }
  /* subtle “off” state + hover/focus affordances */
  .eye-toggle[aria-pressed="true"]{ opacity:.55; }
  .eye-toggle:hover{ transform:translateY(-1px); }
  .eye-toggle:focus-visible{
    outline:2px solid #38bdf8;
    outline-offset:2px;
    border-radius:6px;
  }


    /* THIS IS TO HIDE TODAY GTV TREATMENT SITE */
  
  #anno-live polygon[stroke="#38bdf8"] {
    stroke: transparent !important;
    fill: transparent !important;
  }
    
/*USED THIS TO HIDE ALL THE OTHER DRAWING ELEMENTS ON THE PAGE*/
  .hidden{
    display: none;
  }









  /* ===== Hover tip pill for toolbarCenter THIS IS FOR THE TOOL BAR ===== */
@media (hover:hover) and (pointer:fine){
  .toolbarCenter [data-tip]{
    position: relative;
  }
  .toolbarCenter [data-tip]::after{
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);          /* pill shows BELOW the icon */
    left: 50%;
    transform: translate(-50%, 4px);
    opacity: 0; pointer-events: none;

    background: #fff;
    color: #0f172a;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 9999px;
    padding: 6px 10px;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(2,8,23,.18), inset 0 1px 0 rgba(255,255,255,.8);
    transition: opacity .15s ease, transform .15s ease;
    z-index: 2000;
  }
  .toolbarCenter [data-tip]::before{
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent; /* little caret */
    filter: drop-shadow(0 1px 0 rgba(0,0,0,.08));
    opacity: 0; transition: opacity .15s ease;
  }
  .toolbarCenter [data-tip]:hover::after,
  .toolbarCenter [data-tip]:focus-visible::after,
  .toolbarCenter [data-tip]:hover::before,
  .toolbarCenter [data-tip]:focus-visible::before{
    opacity: 1;
    transform: translate(-50%, 0);
  }
}




/* --- THIS IS FOR THE HOW TO IMAGE MATCH VIDEOS --- */
.helpList__video{
  list-style: none;                 /* no bullet */
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,.10);
}

.miniVideo__top{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.miniVideo__pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  color: #0f5132;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.miniVideo__title{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.15;
}

.miniVideo__sub{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
}

/* Small responsive frame */
.miniVideo__frame{
  width: 100%;
  max-width: 380px;               /* ✅ keep small */
  margin: 0 auto;                 /* center it */
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 28px rgba(2,8,23,.10);
}

.miniVideo__frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 420px){
  .miniVideo__frame{ max-width: 320px; }
}

