/* Tally support site: one stylesheet for the support page, the user guide and the privacy policy. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eff1f4; --text: #14171c; --muted: #5a6270; --line: #e1e4e9;
  --accent: #c2410c; --accent-ink: #9a3412; --accent-soft: #fff1e7;
  --blue: #0062d6; --blue-soft: #eaf2fe; --green: #15803d; --green-soft: #e8f6ee;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px rgba(15, 23, 42, .09);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e15; --surface: #111722; --surface-2: #18202c; --text: #e8ecf2; --muted: #9ba4b2; --line: #243041;
    --accent: #fb923c; --accent-ink: #fdba74; --accent-soft: rgba(251, 146, 60, .13);
    --blue: #5aa9ff; --blue-soft: rgba(90, 169, 255, .12); --green: #4ade80; --green-soft: rgba(74, 222, 128, .1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 600px) { .brand span { display: none; } .nav a { padding: 7px 9px; font-size: 14.5px; } }

/* Hero: a blueprint sheet */
.hero { position: relative; color: #fff;
  background:
    linear-gradient(rgba(140, 180, 255, .09) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(140, 180, 255, .09) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(900px 420px at 85% -10%, rgba(251, 146, 60, .25), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(64, 140, 255, .22), transparent 60%),
    linear-gradient(180deg, #0b1a30, #102a4c); }
.hero-in { position: relative; max-width: 1200px; margin: 0 auto; padding: 56px 16px 52px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #fdba74; background: rgba(251, 146, 60, .12); border: 1px solid rgba(251, 146, 60, .3); padding: 5px 11px; border-radius: 999px; }
.eyebrow .ic { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.06; letter-spacing: -.025em; margin: 18px 0 14px; max-width: 18ch; }
.hero h1 em { font-style: normal; color: #fb923c; }
.lead { font-size: clamp(17px, 2.1vw, 20px); color: #c9d4e5; max-width: 58ch; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #c2410c; color: #fff; box-shadow: 0 8px 24px rgba(194, 65, 12, .35); }
.btn-primary:hover { background: #ad3a0b; color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: #a9b8ce; font-size: 14.5px; }
.platforms span { display: inline-flex; align-items: center; gap: 7px; }
.platforms .ic { width: 16px; height: 16px; color: #4ade80; }

/* The app on a Mac and an iPhone, overlapping the page below */
.devices { position: relative; z-index: 2; max-width: 1000px; margin: 44px auto -150px; padding-right: 7%; }
.devices .mac { display: block; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 90px rgba(0, 0, 0, .5); width: 100%; height: auto; }
.devices .phone { position: absolute; right: 0; bottom: -36px; width: 23%; border-radius: 13% / 6%; border: 5px solid #111; background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12); height: auto; }
.wrap.after-devices { padding-top: 200px; }
@media (max-width: 700px) { .devices { margin-bottom: -70px; } .wrap.after-devices { padding-top: 100px; } }

/* Page body */
.wrap { max-width: 1200px; margin: 0 auto; padding: 40px 16px 72px; }
.narrow { max-width: 860px; }
.section-title { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
.section-sub { color: var(--muted); font-size: 18px; margin: 0 0 24px; max-width: 62ch; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--text); }
.card h3 { margin: 12px 0 4px; font-size: 17.5px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.tile { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tile.blue { background: var(--blue-soft); color: var(--blue); }
.tile.green { background: var(--green-soft); color: var(--green); }
.tile .ic { width: 22px; height: 22px; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; font-size: 15px; color: var(--accent); }
.more .ic { width: 16px; height: 16px; }

/* Quick start strip on the support page */
.quick { counter-reset: q; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 20px 0 0; }
.quick li { counter-increment: q; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 18px; box-shadow: var(--shadow-sm); }
.quick li::before { content: counter(q); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.quick li > b { display: block; margin-bottom: 3px; }
.quick li > span { color: var(--muted); font-size: 15.5px; line-height: 1.5; display: block; }
@media (max-width: 820px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .quick { grid-template-columns: 1fr; } }

/* Guide layout: contents on the left, sections on the right */
.layout { max-width: 1200px; margin: 0 auto; padding: 36px 16px 80px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
.sidebar nav { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; padding: 4px 8px 24px 0; scrollbar-width: thin; }
.toc-group { margin-bottom: 18px; }
.toc-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 6px 10px; }
.toc a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc a .ic { width: 16px; height: 16px; opacity: .8; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toc a.dim { opacity: .35; }
.mtoc { display: none; margin: 0 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.mtoc summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.mtoc summary::-webkit-details-marker { display: none; }
.mtoc summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.mtoc[open] summary::after { transform: rotate(-135deg); }
.mtoc .toc { padding: 0 8px 12px; columns: 2; column-gap: 8px; }
.mtoc .toc-group { break-inside: avoid; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; gap: 0; padding-top: 24px; } .sidebar { display: none; } .mtoc { display: block; } }
@media (max-width: 520px) { .mtoc .toc { columns: 1; } }

.content { min-width: 0; max-width: 840px; }
.g-section { scroll-margin-top: 76px; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.g-section:last-of-type { border-bottom: 0; }
.sec-head { display: flex; align-items: center; gap: 14px; }
.sec-head .tile { width: 46px; height: 46px; }
.content h2 { font-size: clamp(25px, 3.2vw, 31px); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.content h2 a.anchor { color: inherit; text-decoration: none; }
.sec-intro { font-size: 18.5px; color: var(--muted); margin: 12px 0 22px; }
.content h3 { font-size: 19.5px; letter-spacing: -.01em; margin: 30px 0 10px; scroll-margin-top: 80px; }
.content p { margin: 0 0 14px; }
.content ul { padding-left: 0; list-style: none; margin: 0 0 16px; }
.content ul > li { position: relative; padding-left: 22px; margin: 0 0 9px; }
.content ul > li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); opacity: .85; }

/* Numbered steps */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 10px; }
ol.steps > li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
ol.steps > li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; }
ol.steps > li > b:first-child { display: block; margin-bottom: 2px; }
ol.steps > li > span { color: var(--muted); }

/* Callouts */
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; margin: 18px 0; background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 22%, transparent); font-size: 16px; }
.note > .ic { margin-top: 2px; color: var(--blue); }
.note p { margin: 0 0 6px; } .note p:last-child { margin: 0; }
.note.tip { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.note.tip > .ic { color: var(--green); }
.note.pro { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.note.pro > .ic { color: var(--accent); }

.pro-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .07em; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #f97316, #c2410c); color: #fff; vertical-align: 3px; margin-left: 6px; line-height: 1.6; }
h2 .pro-badge { vertical-align: 6px; }
kbd { font: 600 13px/1 var(--mono); padding: 3px 7px 4px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); color: var(--text); white-space: nowrap; }
code { font: 14.5px var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.ui { font-weight: 600; }

/* Screenshots */
figure.shot { margin: 22px 0; }
figure.shot a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface-2); cursor: zoom-in; }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot.dark a { border-color: #1f2937; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; line-height: 1.45; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: start; }
.split.narrow-fig { grid-template-columns: minmax(0, 1fr) 250px; }
.split > figure.shot { margin-top: 4px; position: sticky; top: 84px; }
@media (max-width: 760px) { .split, .split.narrow-fig { grid-template-columns: 1fr; } .split > figure.shot { position: static; max-width: 340px; margin: 8px auto 20px; } }

/* Screen map: numbered pins on a screenshot */
.screenmap { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 30px; align-items: start; margin: 8px 0 10px; }
.map { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map img { display: block; width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #c2410c; color: #fff;
  font: 700 12px/24px var(--font); text-align: center; box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 3px 10px rgba(0, 0, 0, .35); transition: transform .15s; }
.pin.on { transform: translate(-50%, -50%) scale(1.35); background: #0062d6; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; counter-reset: l; }
.legend li { counter-increment: l; display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 16px; line-height: 1.45; }
.legend li::before { content: counter(l); width: 24px; height: 24px; border-radius: 50%; background: #c2410c; color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; margin-top: 1px; }
.legend li:hover, .legend li.on { background: var(--surface-2); }
.legend b { font-weight: 600; }
@media (max-width: 760px) { .screenmap { grid-template-columns: 1fr; } .map { max-width: 400px; margin: 0 auto; } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 16px 0 20px; box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.5; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }


/* Free and Pro */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.plan.pro { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); }
.plan h3 { margin: 0 0 4px !important; display: flex; align-items: center; gap: 8px; }
.plan .price { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.plan ul { margin: 0; }
.plan ul > li::before { content: none; }
.plan ul > li { padding-left: 26px; }
.plan ul > li .ic { position: absolute; left: 0; top: 4px; width: 17px; height: 17px; color: var(--green); }
.plan.pro ul > li .ic { color: var(--accent); }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }

/* Search */
.search { position: relative; max-width: 600px; margin-top: 26px; }
.search input { width: 100%; padding: 15px 16px 15px 50px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .09);
  color: #fff; font: 17px var(--font); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: #9fb0c8; }
.search input:focus { outline: none; border-color: #fb923c; background: rgba(255, 255, 255, .13); box-shadow: 0 0 0 4px rgba(251, 146, 60, .25); }
.search > .ic { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #9fb0c8; }
.search-status { color: #c9d4e5; font-size: 14.5px; margin-top: 10px; min-height: 22px; }
.search-status a { color: #fdba74; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips a { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #e2e8f0; text-decoration: none; font-size: 14px; }
.chips a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
::highlight(hit) { background: #fde68a; color: #111; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
.faq-nav { position: sticky; top: 80px; align-self: start; }
.faq-nav a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 15px; }
.faq-nav a:hover { background: var(--surface-2); color: var(--text); }
.faq-nav .ic { width: 16px; height: 16px; }
@media (max-width: 900px) { .faq-layout { grid-template-columns: 1fr; gap: 0; } .faq-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .faq-nav a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; } }
.faq-group { scroll-margin-top: 80px; margin-bottom: 34px; }
.faq-group > h3 { display: flex; align-items: center; gap: 12px; font-size: 21px; margin: 0 0 12px; }
.faq-group > h3 .tile { width: 36px; height: 36px; border-radius: 10px; }
.faq-group > h3 .tile .ic { width: 19px; height: 19px; }
details.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 10px; box-shadow: var(--shadow-sm); scroll-margin-top: 84px; transition: border-color .15s; }
details.qa[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
details.qa summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 600; position: relative; line-height: 1.45; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: ""; position: absolute; right: 21px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details.qa[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
details.qa .a { padding: 0 18px 16px; }
details.qa .a p { margin: 0 0 10px; } details.qa .a p:last-child { margin: 0; }
details.qa .a ul { margin: 0 0 10px; }

/* Contact */
.contact { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.contact h3 { margin: 0 0 4px; font-size: 20px; }
.contact p { margin: 0; color: var(--muted); }
.contact .tile { width: 52px; height: 52px; border-radius: 14px; }
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; } }

/* Privacy */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.doc h2 { font-size: 21px; margin: 28px 0 8px; }
.doc ul { padding-left: 0; list-style: none; }
.doc ul > li { position: relative; padding-left: 26px; margin: 0 0 12px; }
.doc ul > li .ic { position: absolute; left: 0; top: 4px; width: 17px; height: 17px; color: var(--green); }

/* Footer, back to top, image viewer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .in { max-width: 1200px; margin: 0 auto; padding: 28px 16px 36px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; color: var(--muted); font-size: 15px; }
.site-footer .brand { font-size: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.totop { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; z-index: 40; }
.totop.show { opacity: 1; pointer-events: auto; transform: none; }
dialog.viewer { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
dialog.viewer::backdrop { background: rgba(5, 10, 20, .85); }
dialog.viewer img { display: block; max-width: 96vw; max-height: 94vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); cursor: zoom-out; }

@media print {
  .topbar, .sidebar, .mtoc, .totop, .search, .chips, .site-footer nav { display: none !important; }
  .hero { background: none; color: #000; } .hero .lead, .eyebrow { color: #333; }
  .layout { display: block; } .g-section { break-inside: avoid-page; }
}

/* Search on a light page (the questions) */
.search input.light { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.search input.light::placeholder { color: var(--muted); }
.search input.light:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input.light ~ .ic, .search:has(input.light) > .ic { color: var(--muted); }
.search-status.light { color: var(--muted); }
.search-status.light a { color: var(--accent); }
