/* =====================================================================
   dicom2png.com — site.css  (design system, Nov 2026)
   "Reading room": film-grey surfaces, blue-black ink, phosphor teal,
   amber annotation highlights. One signature element: the window strip.
   ===================================================================== */

:root {
  --film: #F2F5F8;
  --paper: #FFFFFF;
  --paper-2: #E9EEF3;
  --ink: #132231;
  --ink-2: #4A5B6B;
  --line: #D6DEE6;
  --phosphor: #0B7A84;
  --phosphor-deep: #075E66;
  --phosphor-wash: #E1F1F2;
  --amber: #C98A00;
  --amber-wash: #FFF4D6;
  --danger: #B42318;
  --ok: #1F7A3E;

  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --shadow: 0 1px 2px rgba(19, 34, 49, .06), 0 8px 24px -12px rgba(19, 34, 49, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1160px;
  --measure: 68ch;

  /* aliases so the legacy page CSS (quiz, glossary, hub) picks up the new palette */
  --bg-color: var(--film);
  --text-color: var(--ink);
  --header-bg: var(--paper);
  --header-border: var(--line);
  --box-bg: var(--paper);
  --box-border: var(--line);
  --box-border-hover: var(--phosphor);
  --title-color: var(--ink);
  --link-color: var(--phosphor);
  --footer-bg: var(--ink);
  --footer-text: #C9D4DE;
  --secondary-btn-bg: var(--ink-2);
  --error-color: var(--danger);
  --danger-btn-bg: var(--danger);
  --special-link-color: var(--phosphor);
}

.dark-mode {
  --film: #0F171F;
  --paper: #16212C;
  --paper-2: #1C2936;
  --ink: #E4ECF3;
  --ink-2: #9FB1C2;
  --line: #2A3B4C;
  --phosphor: #43C2CB;
  --phosphor-deep: #7AD7DD;
  --phosphor-wash: #123238;
  --amber: #F0B43C;
  --amber-wash: #3A2E12;
  --danger: #F2766B;
  --ok: #5BC48A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --footer-bg: #0A1016;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--film);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img, svg, canvas { max-width: 100%; height: auto; }
a { color: var(--phosphor); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--phosphor-deep); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); font-weight: 750; margin-top: 1.6em; }
h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.4em; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--paper-2); padding: .1em .35em; border-radius: 4px; }
.container, .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1;
  padding: .85em 1.3em; border-radius: var(--r-s); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; color: #fff !important;
  background: var(--phosphor);
  transition: background-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--phosphor-deep); color: #fff; }
.dark-mode .btn { color: #06252A !important; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-primary, .btn-convert, .btn-download { background: var(--phosphor); }
.btn-ghost, .btn-secondary {
  background: transparent; color: var(--ink) !important; border-color: var(--line);
}
.btn-ghost:hover, .btn-secondary:hover { background: var(--paper-2); }
.btn-danger { background: transparent; color: var(--danger) !important; border-color: currentColor; }
.btn-danger:hover { background: var(--danger); color: #fff !important; }
.btn-small { padding: .55em .9em; font-size: .9rem; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.site-header .bar {
  display: flex; align-items: center; gap: 18px;
  max-width: var(--wrap); margin: 0 auto; padding: 10px 22px; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand:hover { color: var(--ink); }
.brand .tld { color: var(--ink-2); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav > a, .nav-group > button {
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink-2);
  text-decoration: none; padding: 8px 11px; border-radius: var(--r-s);
  background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s, background-color .15s;
}
.nav > a:hover, .nav-group > button:hover, .nav-group.open > button { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--phosphor); border-radius: 0; }
.nav-group { position: relative; }
.nav-group > button svg { transition: transform .2s var(--ease); }
.nav-group.open > button svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.nav-group.open .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu a { display: block; padding: 9px 12px; border-radius: var(--r-s); text-decoration: none; color: var(--ink); }
.nav-menu a span { display: block; font-size: .85rem; color: var(--ink-2); }
.nav-menu a strong { font-weight: 650; }
.nav-menu a:hover { background: var(--phosphor-wash); }
.nav-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search { position: relative; }
.search input {
  font: inherit; font-size: .92rem; width: 210px; padding: 8px 12px 8px 34px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--film); color: var(--ink);
  transition: width .25s var(--ease), border-color .2s;
}
.search input:focus { width: 260px; border-color: var(--phosphor); outline: none; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search-results-box {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); width: 340px; max-height: 60vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px;
}
.search-result-item { display: block; padding: 9px 11px; border-radius: var(--r-s); text-decoration: none; color: var(--ink); }
.search-result-item strong { display: block; font-size: .95rem; }
.search-result-item span { font-size: .82rem; color: var(--ink-2); }
.search-result-item:hover { background: var(--phosphor-wash); }
.search-results-box mark { background: var(--amber-wash); color: inherit; }
.no-results { padding: 10px; color: var(--ink-2); font-size: .9rem; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s, transform .3s var(--ease);
}
.icon-btn:hover { background: var(--paper-2); }
#theme-toggle .moon { display: none; }
.dark-mode #theme-toggle .sun { display: none; }
.dark-mode #theme-toggle .moon { display: block; }
#theme-toggle:active { transform: rotate(40deg); }
.menu-toggle { display: none; }

/* signature: window/level strip */
.window-strip {
  position: relative; height: 6px;
  background: linear-gradient(90deg, #000 0%, #000 var(--wl-lo, 30%), #fff var(--wl-hi, 70%), #fff 100%);
  animation: wl-sweep 1.6s var(--ease) .15s both;
}
.window-strip::before, .window-strip::after {
  content: ""; position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber);
  left: var(--wl-lo, 30%); animation: wl-lo 1.6s var(--ease) .15s both;
}
.window-strip::after { left: var(--wl-hi, 70%); animation-name: wl-hi; }
@keyframes wl-sweep { from { --wl-lo: 49%; --wl-hi: 51%; } to { --wl-lo: 30%; --wl-hi: 70%; } }
@keyframes wl-lo { from { left: 49%; } to { left: 30%; } }
@keyframes wl-hi { from { left: 51%; } to { left: 70%; } }
@property --wl-lo { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --wl-hi { syntax: "<percentage>"; inherits: false; initial-value: 70%; }

/* ---------- page layout ---------- */
main { display: block; }
.page { padding: 40px 0 72px; }
.page-head { max-width: 780px; margin-bottom: 28px; }
.page-head .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.breadcrumbs { font-size: .88rem; color: var(--ink-2); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--phosphor); text-decoration: underline; }
.breadcrumbs span[aria-hidden] { margin: 0 .45em; opacity: .6; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section > .wrap > h2:first-child, .section h2.first { margin-top: 0; }

/* ---------- tool hero + converter ---------- */
.tool-hero { padding: 44px 0 20px; }
.tool-hero h1 { max-width: 18ch; }
.tool-hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 58ch; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--ink-2); }
.trust-row li { display: flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--phosphor); flex: none; }

.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow); padding: 22px;
}
.mode-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding: 4px; background: var(--paper-2); border-radius: var(--r-m); width: fit-content; max-width: 100%; }
.mode-tabs button {
  font: inherit; font-size: .92rem; font-weight: 600; border: 0; background: transparent; color: var(--ink-2);
  padding: 8px 14px; border-radius: 7px; cursor: pointer; transition: background-color .2s var(--ease), color .2s;
}
.mode-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(19,34,49,.12); }
.upload-area {
  position: relative; border: 2px dashed var(--line); border-radius: var(--r-m);
  padding: 42px 20px; text-align: center; background: var(--film);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.upload-area.drag-over { border-color: var(--phosphor); background: var(--phosphor-wash); transform: scale(1.01); }
.upload-area .drop-icon { color: var(--phosphor); margin-bottom: 6px; transition: transform .3s var(--ease); }
.upload-area.drag-over .drop-icon { transform: translateY(-4px); }
.upload-area p { margin: 4px 0; color: var(--ink-2); }
.upload-area p strong { color: var(--ink); font-size: 1.1rem; }
.upload-area .accept { font-size: .85rem; margin-top: 10px; }
.file-list-header { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .9rem; color: var(--ink-2); }
.file-list { display: grid; gap: 6px; margin-top: 8px; }
.file-item, .result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper);
  animation: item-in .28s var(--ease) both;
}
@keyframes item-in { from { opacity: 0; transform: translateY(6px); } }
.file-thumbnail, .result-thumbnail { width: 28px; height: 28px; flex: none; opacity: .8; }
.file-details, .result-details { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name, .original-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size, .converted-name { font-size: .85rem; color: var(--ink-2); }
.converted-name.error { color: var(--danger); }
.remove-file-btn { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 2px 8px; border-radius: 4px; }
.remove-file-btn:hover { color: var(--danger); background: var(--paper-2); }
.conversion-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
#output-options-container { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
select, input[type="text"], input[type="number"], input[type="search"].field {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px;
}
select:focus, input.field:focus { border-color: var(--phosphor); outline: none; }
#results-container:empty { display: none; }
#results-container { margin-top: 18px; }
#results-container h3 { margin-top: 0; }
.results-list { display: grid; gap: 6px; }
.results-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.privacy-note {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px;
  background: var(--phosphor-wash); border-radius: var(--r-m); font-size: .93rem; color: var(--ink);
}
.privacy-note svg { color: var(--phosphor); flex: none; margin-top: 2px; }
.privacy-note p { margin: 0; }

/* tool directory (list, not cards) */
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--line); }
.tool-list li { border-bottom: 1px solid var(--line); }
.tool-list a { display: grid; grid-template-columns: 40px 1fr; gap: 2px 14px; padding: 16px 8px; text-decoration: none; color: var(--ink); border-radius: var(--r-s); transition: background-color .15s; }
.tool-list a:hover { background: var(--paper); }
.tool-list .ti { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; background: var(--phosphor-wash); color: var(--phosphor); display: grid; place-items: center; }
.tool-list strong { font-weight: 700; }
.tool-list span { color: var(--ink-2); font-size: .93rem; }

/* steps (a real sequence) */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--phosphor); color: var(--phosphor); font-weight: 800; display: grid; place-items: center;
}
.steps h3 { margin: 4px 0 6px; font-size: 1.08rem; }
.steps p { color: var(--ink-2); margin: 0; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 650; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 0 18px; color: var(--ink-2); max-width: var(--measure); }
.faq details[open] .answer { animation: faq-open .3s var(--ease); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } }

/* article lists */
.article-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 32px; }
.article-rows li { border-bottom: 1px solid var(--line); }
.article-rows a { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 16px 0; text-decoration: none; color: var(--ink); }
.article-rows img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-s); background: var(--paper-2); transition: transform .3s var(--ease); }
.article-rows a:hover img { transform: scale(1.04); }
.article-rows strong { display: block; font-weight: 700; line-height: 1.3; }
.article-rows a:hover strong { color: var(--phosphor); }
.article-rows span { display: block; font-size: .9rem; color: var(--ink-2); margin-top: 3px; }

/* author strip / box */
.author-box {
  display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: start;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--paper);
}
.author-box img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.author-box .name { font-weight: 800; letter-spacing: .02em; margin: 0; font-size: 1.05rem; }
.author-box .role { color: var(--ink-2); font-size: .93rem; margin: 2px 0 8px; }
.author-box p { margin: 0 0 .5em; }
.creds { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.creds li { font-size: .82rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--phosphor-wash); color: var(--phosphor-deep); }

.byline { display: flex; align-items: center; gap: 12px; margin: 6px 0 26px; font-size: .93rem; color: var(--ink-2); }
.byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.byline a { color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: .02em; }
.byline a:hover { color: var(--phosphor); }

/* ---------- article ---------- */
.article-layout { padding: 36px 0 64px; }
.article-content { max-width: var(--measure); margin: 0 auto; font-size: 1.1rem; line-height: 1.7; }
.article-content > h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.7rem); margin-bottom: .3em; }
.article-content h2 { margin-top: 1.8em; }
.article-content ul, .article-content ol { padding-left: 1.3em; }
.article-content li { margin: .3em 0; }
.article-content img:not(.byline img), .inline-image { display: block; width: 100%; height: auto; border-radius: var(--r-m); margin: 1.4em 0 .4em; border: 1px solid var(--line); }
.article-content figure { margin: 1.6em 0; }
.article-content figcaption { font-size: .88rem; color: var(--ink-2); }
.article-content blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--amber); color: var(--ink-2); }
.article-content table, .data-table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.article-content th, .article-content td, .data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-content th, .data-table th { font-weight: 700; background: var(--paper-2); }
.table-scroll { overflow-x: auto; }
.quick-answer {
  margin: 0 0 2em; padding: 18px 20px; border-radius: var(--r-m);
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--phosphor);
}
.quick-answer h2 { font-size: 1.05rem; margin: 0 0 .4em; color: var(--phosphor-deep); }
.quick-answer p:last-child, .quick-answer ul:last-child { margin-bottom: 0; }
.callout { margin: 1.6em 0; padding: 14px 18px; border-radius: var(--r-m); background: var(--amber-wash); font-size: 1rem; }
.callout p:last-child { margin: 0; }
.article-end { max-width: var(--measure); margin: 40px auto 0; display: grid; gap: 18px; }
.disclaimer { font-size: .9rem; color: var(--ink-2); padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r-m); }
.disclaimer p { margin: 0; }
.related-articles-section { max-width: var(--measure); margin: 40px auto 0; }
.related-articles-section h2 { font-size: 1.3rem; }
.related-articles-grid { display: grid; gap: 0; }
.related-articles-grid .article-preview-box { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.related-articles-grid .article-thumbnail { width: 88px; height: 64px; object-fit: cover; border-radius: var(--r-s); border: 0; margin: 0; }
.related-articles-grid h3 { font-size: 1rem; margin: 0; }
.related-articles-grid p { font-size: .88rem; color: var(--ink-2); margin: 2px 0 0; }
.comments-section { max-width: var(--measure); margin: 40px auto 0; }
.comments-section h2 { font-size: 1.3rem; }

/* hub (radiology articles) */
.hub-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 4px; background: var(--paper-2); border-radius: var(--r-m); width: fit-content; max-width: 100%; }
.hub-nav-btn { font: inherit; font-size: .93rem; font-weight: 600; border: 0; background: none; color: var(--ink-2); padding: 8px 14px; border-radius: 7px; cursor: pointer; }
.hub-nav-btn.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(19,34,49,.12); }
.hub-content-pane { display: none; }
.hub-content-pane.active { display: block; animation: item-in .3s var(--ease); }
.hub-content-pane > h2 { margin-top: 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 32px; }
.hub-grid .article-preview-box, .featured-articles-grid .article-preview-box {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 16px 0;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); background: none; box-shadow: none;
}
.hub-grid .article-thumbnail, .featured-articles-grid .article-thumbnail { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-s); transition: transform .3s var(--ease); }
.hub-grid .article-preview-box:hover .article-thumbnail { transform: scale(1.04); }
.hub-grid h3, .featured-articles-grid h3 { font-size: 1.02rem; margin: 0; line-height: 1.3; }
.hub-grid .article-preview-box:hover h3 { color: var(--phosphor); }
.hub-grid p, .featured-articles-grid p { font-size: .9rem; color: var(--ink-2); margin: 3px 0 0; }

/* legal / about */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.4rem; }
.legal-container, .about-container { max-width: var(--measure); }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 52px 0 28px; margin-top: 0; font-size: .95rem; }
.site-footer a { color: #E6EEF5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2 { font-size: .95rem; color: #fff; margin: 0 0 12px; font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-about p { margin: 10px 0 0; max-width: 40ch; color: var(--footer-text); }
.footer-about .brand { color: #fff; }
.footer-about .brand .tld { color: #9FB1C2; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; color: #9FB1C2; }
.footer-legal p { margin: 0; max-width: 80ch; }

/* ---------- glossary popups (legacy js) ---------- */
.definition-popup { background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-m); }

/* ---------- viewer / tag viewer / anonymizer ---------- */
.app-shell { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.viewport-wrap {
  position: relative; background: #000; border-radius: var(--r-l); overflow: hidden; min-height: 520px;
  border: 1px solid #1d2a36; touch-action: none; user-select: none;
}
.viewport-wrap canvas.view { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.viewport-wrap .drop-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #C9D4DE; padding: 20px;
  background: radial-gradient(ellipse at center, #101b25 0%, #000 75%);
  transition: opacity .3s var(--ease);
}
.viewport-wrap.loaded .drop-overlay { opacity: 0; pointer-events: none; }
.viewport-wrap.drag-over .drop-overlay { background: radial-gradient(ellipse at center, #0e3a40 0%, #000 75%); }
.drop-overlay h2 { color: #fff; margin: 8px 0; font-size: 1.4rem; }
.drop-overlay p { margin: 4px 0; color: #9FB1C2; }
.overlay-text { position: absolute; font-family: var(--mono); font-size: 12px; line-height: 1.45; color: #F0C24B; text-shadow: 0 1px 2px #000; pointer-events: none; white-space: pre; }
.overlay-text.tl { top: 10px; left: 12px; } .overlay-text.tr { top: 10px; right: 12px; text-align: right; }
.overlay-text.bl { bottom: 10px; left: 12px; } .overlay-text.br { bottom: 10px; right: 12px; text-align: right; }
.viewport-wrap:not(.loaded) .overlay-text { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.tool-btn {
  font: inherit; font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.tool-btn:hover { background: var(--paper-2); }
.tool-btn[aria-pressed="true"] { background: var(--phosphor); border-color: var(--phosphor); color: #fff; }
.dark-mode .tool-btn[aria-pressed="true"] { color: #06252A; }
.tool-btn:disabled { opacity: .45; cursor: not-allowed; }
.toolbar .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.side { display: grid; gap: 14px; align-content: start; }
.side .panel { padding: 16px; }
.side h2 { font-size: 1rem; margin: 0 0 10px; }
.side label { display: block; font-size: .85rem; color: var(--ink-2); margin: 8px 0 4px; }
.side input[type="range"] { width: 100%; accent-color: var(--phosphor); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.frame-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.frame-bar input { flex: 1; accent-color: var(--phosphor); }
.status { font-size: .9rem; padding: 10px 12px; border-radius: var(--r-s); background: var(--amber-wash); margin-top: 10px; }
.status.error { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status:empty { display: none; }

.tag-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 10px; }
.tag-toolbar input[type="search"] { flex: 1; min-width: 220px; }
.tag-table-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.tag-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tag-table th { position: sticky; top: 0; background: var(--paper-2); text-align: left; padding: 9px 12px; font-weight: 700; z-index: 1; }
.tag-table td { padding: 7px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tag-table td.tag, .tag-table td.vr { font-family: var(--mono); font-size: .84rem; white-space: nowrap; color: var(--ink-2); }
.tag-table td.val { overflow-wrap: anywhere; max-width: 520px; }
.tag-table tr.phi td.val { background: var(--amber-wash); }
.tag-table tr.seq td { color: var(--ink-2); font-style: italic; }
.tag-table tr.depth-1 td.name { padding-left: 28px; } .tag-table tr.depth-2 td.name { padding-left: 44px; }
.legend { font-size: .85rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--amber-wash); border: 1px solid var(--amber); }

.option-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.option-list label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.option-list input { margin-top: 4px; accent-color: var(--phosphor); width: 17px; height: 17px; flex: none; }
.option-list span small { display: block; color: var(--ink-2); font-size: .85rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .search input { width: 160px; } .search input:focus { width: 200px; }
  .app-shell { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; margin: 0;
    max-height: calc(100vh - 64px); overflow: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; box-shadow: var(--shadow); }
  .nav > a, .nav-group > button { padding: 12px 10px; width: 100%; justify-content: space-between; font-size: 1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--phosphor); }
  .nav-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 10px; display: none; min-width: 0; }
  .nav-group.open .nav-menu { display: block; }
  .search { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .viewport-wrap { min-height: 380px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-rows, .hub-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .author-box { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* hub sections + quiz list */
.hub-section { scroll-margin-top: 90px; padding-top: 8px; }
.hub-section + .hub-section { margin-top: 26px; }
.hub-section h2 { margin-top: 0; font-size: 1.35rem; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.quiz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 820px; }
.quiz-list li { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--paper); padding: 4px; transition: border-color .2s var(--ease); }
.quiz-list li:hover { border-color: var(--phosphor); }
.quiz-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 18px 6px; text-decoration: none; color: var(--ink); }
.quiz-row strong { font-size: 1.15rem; }
.quiz-row span { grid-column: 1; color: var(--ink-2); }
.quiz-row em { grid-column: 2; grid-row: 1; font-style: normal; font-size: .85rem; font-weight: 650; color: var(--phosphor-deep); background: var(--phosphor-wash); padding: 3px 10px; border-radius: 999px; align-self: start; }
.quiz-list p { margin: 0 18px 14px; font-size: .9rem; }
/* legacy glossary/quiz pages on the new system */
.glossary-container, .quiz-container { max-width: 860px; }
.term-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.term-title { font-weight: 750; font-size: 1.05rem; }
.term-definition { color: var(--ink-2); margin-top: 4px; }
.glossary-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 24px; position: sticky; top: 72px; background: var(--film); padding: 8px 0; z-index: 2; }
.glossary-nav a { min-width: 34px; text-align: center; padding: 5px 8px; border-radius: var(--r-s); border: 1px solid var(--line); text-decoration: none; font-weight: 650; background: var(--paper); }
.glossary-nav a:hover { border-color: var(--phosphor); }
.glossary-section { scroll-margin-top: 130px; }
.glossary-term { border-bottom: 1px dashed var(--phosphor); cursor: help; }
.tool-btn[aria-pressed="true"] .muted { color: inherit; opacity: .8; }

.article-content .byline img { width: 40px; height: 40px; margin: 0; border: 0; border-radius: 50%; }
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 16, 22, .55); opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s; z-index: 80; }
.modal-content { position: fixed; left: 50%; top: 50%; width: min(460px, calc(100vw - 32px)); transform: translate(-50%, -46%); background: var(--paper); color: var(--ink); border-radius: var(--r-l); padding: 22px 24px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), transform .25s var(--ease), visibility .2s; z-index: 81; }
.modal-overlay.active, .modal-content.active { opacity: 1; visibility: visible; }
.modal-content.active { transform: translate(-50%, -50%); }
.modal-content h3 { margin: 0 0 8px; }
.modal-content p { margin: 0; color: var(--ink-2); }
.modal-close-btn { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close-btn:hover { background: var(--paper-2); }

/* =====================================================================
   Radiology touches (Nov 2026): skeleton-hand cursor, collimator click,
   CT-gantry spinner, X-ray film on a lightbox, spine in the footer
   ===================================================================== */

/* skeleton hand cursor (mouse users only; text fields and the viewer keep their own cursors) */
@media (hover: hover) and (pointer: fine) {
  html { cursor: url("/images/xr/cursor-point.png") 9 1, auto; cursor: image-set(url("/images/xr/cursor-point.png") 1x, url("/images/xr/cursor-point@2x.png") 2x) 9 1, auto; }
  a, button, summary, label, select, [role="button"], [role="tab"], .tool-btn, .btn, .glossary-term, input[type="checkbox"], input[type="radio"], input[type="range"] {
    cursor: url("/images/xr/cursor-link.png") 9 1, pointer; cursor: image-set(url("/images/xr/cursor-link.png") 1x, url("/images/xr/cursor-link@2x.png") 2x) 9 1, pointer;
  }
  input[type="text"], input[type="search"], input[type="number"], textarea { cursor: text; }
  button:disabled, .btn[disabled] { cursor: not-allowed; }
}

/* click = collimator light: the lit field closes down on the spot, then a soft exposure flash */
.collimator, .exposure { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 9999; }
.collimator {
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border: 1.5px solid rgba(240, 194, 75, .95); border-radius: 2px;
  background: rgba(240, 194, 75, .10);
  box-shadow: 0 0 14px rgba(240, 194, 75, .35);
  animation: collimate .52s cubic-bezier(.2, .7, .2, 1) forwards;
}
.collimator::before, .collimator::after { content: ""; position: absolute; background: rgba(240, 194, 75, .95); }
.collimator::before { left: 50%; top: -7px; bottom: -7px; width: 1.5px; margin-left: -.75px; }
.collimator::after { top: 50%; left: -7px; right: -7px; height: 1.5px; margin-top: -.75px; }
@keyframes collimate { 0% { transform: scale(1.7); opacity: 0; } 22% { opacity: 1; } 60% { transform: scale(.78); opacity: .9; } 100% { transform: scale(.72); opacity: 0; } }
.exposure {
  width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 247, 248, .75) 0%, rgba(67, 194, 203, .28) 38%, rgba(67, 194, 203, 0) 70%);
  animation: expose .5s ease-out .22s both;
}
@keyframes expose { 0% { transform: scale(.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }

/* spinner = CT gantry: the tube (amber) orbits, detector arc opposite */
.spinner {
  width: 20px; height: 20px; border-radius: 50%; position: relative; flex: none;
  border: 2px solid rgba(255, 255, 255, .28); border-bottom-color: rgba(255, 255, 255, .9);
  animation: spin .9s linear infinite;
}
.spinner::before { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #F0C24B; top: -4px; left: 50%; margin-left: -3px; box-shadow: 0 0 6px #F0C24B; }

/* hero with an X-ray film on a lightbox */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: center; }
.xr-film {
  margin: 0; padding: 12px 12px 10px; border-radius: 14px; position: relative;
  background: linear-gradient(180deg, #F4FBFD, #DCEEF4);           /* the lit viewbox */
  box-shadow: 0 0 0 1px rgba(19, 34, 49, .08), 0 18px 40px -18px rgba(11, 122, 132, .55), 0 0 60px -20px rgba(180, 230, 240, .8);
  transform: rotate(1.2deg);
}
.dark-mode .xr-film { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 50px -18px rgba(0, 0, 0, .8), 0 0 70px -10px rgba(120, 210, 225, .35); }
.xr-film::before { /* film clip */
  content: ""; position: absolute; top: -7px; left: 50%; width: 46px; height: 14px; margin-left: -23px;
  border-radius: 3px; background: linear-gradient(#9fb1bf, #6f8291); box-shadow: 0 2px 3px rgba(0, 0, 0, .25);
}
.xr-film .film { position: relative; border-radius: 6px; overflow: hidden; background: #04080c; line-height: 0; }
.xr-film svg { display: block; width: 100%; height: auto; transition: filter .35s var(--ease); animation: develop 1.6s var(--ease) .2s both; }
.xr-film .film::after { /* one scan line sweep on load */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18%;
  background: linear-gradient(180deg, rgba(160, 235, 245, 0), rgba(160, 235, 245, .22) 70%, rgba(220, 250, 255, .55));
  transform: translateY(-110%); animation: scanline 1.5s var(--ease) .25s both; pointer-events: none;
}
@keyframes develop { from { filter: brightness(0) contrast(1.6); } to { filter: none; } }
@keyframes scanline { 0% { transform: translateY(-110%); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(560%); opacity: 0; } }
.xr-film .wl-readout {
  position: absolute; right: 10px; bottom: 9px; font: 600 11px/1 var(--mono); color: #F0C24B; letter-spacing: .02em;
  text-shadow: 0 1px 2px #000; opacity: .85; pointer-events: none;
}
.xr-film figcaption { font-size: .8rem; color: #4A5B6B; text-align: center; margin-top: 8px; line-height: 1.3; }
.xr-film.flip svg .xr-art { transform: scaleX(-1); transform-origin: 150px 190px; }

/* footer spine watermark */
.site-footer { position: relative; overflow: hidden; }
.site-footer .footer-spine { position: absolute; right: 4%; top: -10px; width: 90px; color: #fff; opacity: .05; pointer-events: none; }
.site-footer .wrap { position: relative; }

@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; } }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .xr-film { display: none; } .site-footer .footer-spine { display: none; } }
@media (prefers-reduced-motion: reduce) { .collimator, .exposure { display: none; } }

/* ---------- converter v2: format chips, options, thumbnails, size deltas ---------- */
#conv-controls { margin-top: 16px; }
.conv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.conv-label { font-size: .86rem; font-weight: 650; color: var(--ink-2); }
.fmt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt-chip {
  font: 700 .86rem/1 var(--font); letter-spacing: .02em; padding: 9px 13px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s, transform .15s var(--ease);
}
.fmt-chip:hover { border-color: var(--phosphor); }
.fmt-chip[aria-checked="true"] { background: var(--phosphor); border-color: var(--phosphor); color: #fff; }
.dark-mode .fmt-chip[aria-checked="true"] { color: #06252A; }
.fmt-chip:active { transform: scale(.96); }
.fmt-note { margin: 8px 0 0; font-size: .86rem; color: var(--ink-2); min-height: 1.2em; }
.conv-more { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--film); }
.conv-more > summary { list-style: none; padding: 11px 14px; font-weight: 650; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.conv-more > summary::-webkit-details-marker { display: none; }
.conv-more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(-45deg); transition: transform .2s var(--ease); }
.conv-more[open] > summary::before { transform: rotate(45deg); }
.conv-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 22px; padding: 4px 14px 16px; }
.conv-more[open] .conv-opts { animation: faq-open .25s var(--ease); }
.conv-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.conv-field small { color: var(--ink-2); font-size: .8rem; font-weight: 400; }
.conv-field input[type="range"] { accent-color: var(--phosphor); width: 100%; }
.conv-field input[type="text"], .conv-field select { width: 100%; }
.conv-field output { font-family: var(--mono); color: var(--phosphor-deep); margin-left: 6px; }
.resize-row { display: flex; gap: 8px; align-items: center; }
.resize-row select { flex: 1; min-width: 0; }
.resize-row input[type="number"] { width: 96px; }
.resize-row input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.conv-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; font-weight: 600; }
.conv-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--phosphor); flex: none; }
.conv-check small { display: block; margin-top: 2px; }
.size-chips { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .9rem; }
.size-chips label { display: inline-flex; gap: 5px; align-items: center; }
.size-chips input { accent-color: var(--phosphor); }
.file-thumb { width: 40px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; background: repeating-conic-gradient(var(--paper-2) 0 25%, var(--paper) 0 50%) 0 0 / 10px 10px; border: 1px solid var(--line); }
.file-thumb--type { display: grid; place-items: center; font: 700 .66rem/1 var(--mono); color: var(--phosphor-deep); background: var(--phosphor-wash); }
.result-item--error .file-thumb--type { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.fmt-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font: 700 .7rem/1.5 var(--mono); background: var(--paper-2); color: var(--ink-2); }
.delta { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font: 700 .72rem/1.5 var(--font); vertical-align: 1px; }
.delta.down { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.delta.up { background: var(--amber-wash); color: var(--amber); }
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.results-head h3 { margin: 0 0 8px; }
.conversion-options { justify-content: flex-end; }
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.format-grid li { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.format-grid strong { display: block; font-family: var(--mono); font-size: .95rem; color: var(--phosphor-deep); }
.format-grid span { font-size: .84rem; color: var(--ink-2); }
.format-grid a { text-decoration: none; color: inherit; display: block; }
.format-grid li:hover { border-color: var(--phosphor); }

/* ---------- "Try a sample" buttons ---------- */
.sample-line { margin: 12px 0 0; font-size: .9rem; color: var(--ink-2); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--phosphor, #0B7A84); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { text-decoration-thickness: 2px; }
.link-btn:disabled { opacity: .6; cursor: progress; }
.link-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }
.drop-overlay .sample-line { color: #9FB1C2; }
.drop-overlay .link-btn { color: #43C2CB; }
.sample-table td:first-child { font-family: var(--mono); font-size: .9rem; word-break: break-all; }
.sample-table td:nth-child(3), .sample-table td:nth-child(4) { white-space: nowrap; }
