/* Dorvia help centre. Builds on /assets/site.css (tokens, header, footer, buttons, tags) and adds only the
   help layout: search, the topic list, article typography, step lists, the at-a-glance box and callouts.
   Colours come from the site tokens, so light and dark (and the theme button) work without extra rules. */

/* ---------- Hero and search ---------- */
.help-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); text-align: center; position: relative; overflow: clip; }
.help-hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 140%; background: radial-gradient(45% 40% at 50% 45%, var(--glow), transparent 70%); pointer-events: none; }
.help-hero > .wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.help-hero .lede { max-width: 680px; }

.hsearch { position: relative; width: 100%; max-width: 640px; text-align: left; display: none; }
.js .hsearch { display: block; }
.hsearch label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.hsearch-box { position: relative; }
.hsearch-box svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hsearch input { width: 100%; min-height: 52px; padding: 12px 16px 12px 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 17px/1.3 var(--font); box-shadow: var(--shadow-1); -webkit-appearance: none; appearance: none; }
.hsearch input::placeholder { color: var(--ink-3); opacity: 1; }
.hsearch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.hsearch input::-webkit-search-cancel-button { cursor: pointer; }
.hsearch-compact input { min-height: 44px; font-size: 16px; box-shadow: none; }
.hsearch-status { font-size: 14px; color: var(--ink-3); min-height: 0; margin-top: 8px; }
.hsearch-status:empty { margin: 0; }
.hsearch-results { list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 2px; max-height: min(60vh, 520px); overflow-y: auto; }
.hsearch-results[hidden] { display: none; }
.hsearch-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.hsearch-results a:hover, .hsearch-results a:focus-visible { background: var(--accent-soft); text-decoration: none; outline-offset: -2px; }
.hsearch-results .r-t { font-weight: 700; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.hsearch-results .r-p { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.hsearch-results .r-x { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.hsearch-results mark { background: var(--amber-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.hsearch-noscript { font-size: 14px; color: var(--ink-3); }
.js .hsearch-noscript { display: none; }

/* ---------- Topic cards on the help home ---------- */
.help-groups { display: flex; flex-direction: column; gap: clamp(36px, 5vw, 56px); }
.help-group h2 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.02em; margin-bottom: 16px; }
.help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.help-cards a { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.help-cards a:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); text-decoration: none; }
.help-cards b { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.help-cards span.d { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 900px) { .help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .help-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Layout: topic list beside the article ---------- */
.help-wrap { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(64px, 9vw, 112px); }
.help-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.help-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.help-nav h2 { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 6px 10px; }
.help-nav h2:first-child { margin-top: 0; }
.help-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.help-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none; }
.help-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.help-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.help-nav .tag { padding: 2px 7px; font-size: 10.5px; }
.help-toc-m { display: none; }
@media (max-width: 900px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-side { display: none; }
  .help-toc-m { display: block; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 24px; }
  .help-toc-m summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
  .help-toc-m summary::-webkit-details-marker { display: none; }
  .help-toc-m summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); }
  .help-toc-m[open] summary::after { transform: rotate(225deg) translateY(-1px); }
  .help-toc-m .help-nav { padding: 0 8px 12px; }
  .help-toc-m .help-nav a { padding: 10px; min-height: 44px; }
}

/* ---------- Article ---------- */
.help-article { min-width: 0; max-width: 780px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); }
.help-article h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.04em; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.help-article h1 .tag { font-size: 13px; letter-spacing: .02em; }
.help-article .lede { margin-top: 16px; font-size: clamp(18px, 1.6vw, 20px); }
.help-article .updated { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.help-article h2 { font-size: clamp(23px, 2.2vw, 27px); letter-spacing: -0.02em; margin: 52px 0 14px; scroll-margin-top: 80px; }
.help-article h3 { font-size: 19px; letter-spacing: -0.01em; margin: 30px 0 10px; scroll-margin-top: 80px; }
.help-article p, .help-article li, .help-article dd { color: var(--ink-2); font-size: 17px; line-height: 1.65; overflow-wrap: break-word; }
.help-article p + p { margin-top: 12px; }
.help-article ul, .help-article ol { padding-left: 22px; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.help-article li > ul, .help-article li > ol { margin-top: 8px; }
.help-article strong, .help-article b { color: var(--ink); }
.help-article a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.help-article code, .help-article .path { font-family: var(--mono); font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink); overflow-wrap: anywhere; word-break: break-word; }
/* An on-screen label in Dorvia: a button, a menu or a field. */
.ui { font-weight: 700; color: var(--ink); white-space: normal; }
.help-article p + ul, .help-article p + ol { margin-top: 10px; }
.help-article ul + p, .help-article ol + p { margin-top: 14px; }

/* Numbered steps */
.help-article ol.steps { list-style: none; padding: 0; counter-reset: hstep; gap: 0; margin-top: 16px; border-top: 1px solid var(--line); }
.help-article ol.steps > li { counter-increment: hstep; position: relative; padding: 16px 0 16px 46px; border-bottom: 1px solid var(--line); }
.help-article ol.steps > li::before { content: counter(hstep); position: absolute; left: 0; top: 16px; width: 30px; height: 30px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.help-article ol.steps > li > b:first-child { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }

/* At a glance */
.glance { margin: 28px 0 0; padding: 20px 22px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 20px; }
.glance dt { font-size: 14px; font-weight: 800; color: var(--ink); padding-top: 2px; }
.glance dd { margin: 0; font-size: 16px; line-height: 1.55; }
@media (max-width: 600px) { .glance { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 18px; } .glance dd + dt { margin-top: 10px; } }

/* Callouts */
.callout { margin: 20px 0 0; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); border-left: 4px solid var(--line-2); }
.callout p { font-size: 16px; margin: 0; }
.callout p + p { margin-top: 6px; }
.callout .ct { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.callout.ok { background: var(--accent-soft); border-left-color: var(--accent); }
.callout.ok .ct { color: var(--accent); }
.callout.warn { background: var(--amber-soft); border-left-color: var(--amber-line); }
.callout.warn .ct { color: var(--amber); }

/* Message lookup: what the screen says, and what to do */
.msgs { list-style: none !important; padding: 0 !important; margin-top: 14px !important; gap: 10px !important; }
.msgs li { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.msgs q { quotes: "\201C" "\201D"; font-weight: 700; color: var(--ink); font-size: 16px; }
.msgs span { font-size: 16px; }

/* Plain tables that wrap on phones */
.htable { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15.5px; table-layout: auto; }
.htable caption { text-align: left; font-weight: 800; color: var(--ink); padding-bottom: 8px; font-size: 16px; }
.htable th, .htable td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.htable thead th { color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-bottom-color: var(--line-2); }
.htable tbody th { color: var(--ink); font-weight: 700; width: 38%; }
@media (max-width: 560px) {
  .htable.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .htable.stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .htable.stack th, .htable.stack td { display: block; width: auto; padding: 2px 0; border: 0; }
  .htable.stack td[data-k]::before { content: attr(data-k) ": "; font-weight: 700; color: var(--ink); }
}

/* FAQ on help pages reuses .faq from site.css; keep it inside the article column */
.help-article .faq { margin-top: 18px; max-width: none; }
.help-article .faq summary { font-size: 18px; padding: 18px 2px; }
.help-article .faq .a { font-size: 16px; padding-bottom: 20px; }
.help-article .faq .a p, .help-article .faq .a li { font-size: 16px; }

/* Related links and previous / next */
.related { margin-top: 48px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); }
.related h2 { margin: 0 0 8px !important; font-size: 18px !important; }
.related ul { margin-top: 4px !important; }
.pager { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none !important; min-height: 48px; }
.pager a:hover { border-color: var(--accent); }
.pager a span { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 480px) { .pager { grid-template-columns: minmax(0, 1fr); } .pager .next { grid-column: 1; } }
.help-still { margin-top: 40px; font-size: 15px; color: var(--ink-3); }

@media print { .help-side, .help-toc-m, .hsearch, .pager { display: none !important; } .help-layout { display: block; } }

/* Search placement: in the topic column on wide screens, above the article on phones */
.help-m-search { display: none; }
@media (max-width: 900px) { .help-m-search { display: block; margin-bottom: 28px; } }

/* On this page */
.hpage-toc { margin-top: 28px; padding: 18px 22px; border-radius: 18px; border: 1px solid var(--line); }
.hpage-toc > span { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.hpage-toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; display: block; }
.hpage-toc li { font-size: 15px; padding: 3px 0; break-inside: avoid; color: var(--ink-2); }
.hpage-toc a { text-decoration: none; }
.hpage-toc a:hover { text-decoration: underline; }
@media (max-width: 600px) { .hpage-toc ol { columns: 1; } }
.help-article .crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 0; }
.help-article .crumbs li { font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.help-article .crumbs a { color: var(--ink-2); text-decoration: none; }
.help-article .crumbs a:hover { text-decoration: underline; }
