/* THOST help guides. Plain CSS, system fonts, light and dark from the OS setting (same palette as www.t-host.co.uk). */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --surface: #ffffff;
  --border: #dde3ea;
  --text: #16202b;
  --muted: #5b6875;
  --accent: #0b63ce;
  --accent-hover: #084ea3;
  --accent-soft: #e6f0fc;
  --brand: #ff6a1a;
  --warn-bg: #fff6e5;
  --warn-border: #f2c46d;
  --code-bg: #f1f4f8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 12px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a;
    --bg-alt: #151c24;
    --surface: #1a222c;
    --border: #2a3441;
    --text: #e8edf2;
    --muted: #9aa7b5;
    --accent: #5aa2ff;
    --accent-hover: #7db6ff;
    --accent-soft: #1b2a40;
    --warn-bg: #2b2414;
    --warn-border: #7a5d1e;
    --code-bg: #111821;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); margin: 0 0 .4em; font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 1.8em 0 .5em; font-weight: 750; }
h3 { font-size: 1.12rem; margin: 1.5em 0 .4em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--code-bg); padding: .12em .38em; border-radius: 5px; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand img { border: 0; box-shadow: none; border-radius: 0; height: 29px; width: auto; }
.brand-sub { font-weight: 650; font-size: .95rem; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.logo-d { display: none; }
@media (prefers-color-scheme: dark) { .logo-l { display: none; } .logo-d { display: inline; } }
.search { position: relative; flex: 1 1 auto; max-width: 480px; margin-left: auto; }
.search input, .hero-search input { width: 100%; font: inherit; font-size: .98rem; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.search input:focus, .hero-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.top-links { display: flex; gap: 14px; font-size: .95rem; flex: none; }
.top-links a { color: var(--text); text-decoration: none; }
.top-links a:hover { color: var(--accent); }
@media (max-width: 820px) {
  .top-in { flex-wrap: wrap; padding: 10px 0; gap: 10px; }
  .top-links { order: 2; margin-left: auto; gap: 10px; font-size: .9rem; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .brand-sub { display: none; }
}
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); max-height: 70vh; overflow: auto; padding: 6px; }
.results a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.results a .c { display: block; font-size: .78rem; color: var(--muted); }
.results a .t { font-weight: 600; }
.results a[aria-selected="true"], .results a:hover { background: var(--accent-soft); }
.results .none { padding: 10px; color: var(--muted); font-size: .92rem; }

/* breadcrumbs */
.crumbs { font-size: .88rem; color: var(--muted); margin: 18px 0 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 4px; opacity: .6; }

/* home */
.hero { text-align: center; padding: 48px 0 28px; }
.hero .lede { max-width: 640px; margin: 0 auto 22px; }
.hero-search { display: flex; gap: 8px; max-width: 620px; margin: 0 auto; }
.hero-search input { font-size: 1.05rem; padding: 13px 16px; }
.hero-search button { font: inherit; font-weight: 650; padding: 0 20px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; }
.hero-search button:hover { background: var(--accent-hover); }
.popular { margin-top: 16px; font-size: .92rem; color: var(--muted); }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 18px 0 48px; }
.cat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.cat h2 { margin: 0 0 4px; font-size: 1.2rem; }
.cat h2 a { color: var(--text); text-decoration: none; }
.cat h2 a:hover { color: var(--accent); }
.cat > p { font-size: .9rem; margin-bottom: 10px; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .96rem; }

/* category + related cards */
.cards { list-style: none; padding: 0; margin: 12px 0 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cards a { display: block; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.cards a:hover { border-color: var(--accent); }
.cards .t { display: block; font-weight: 650; margin-bottom: 4px; }
.cards .d { display: block; font-size: .9rem; color: var(--muted); }
.cards li[hidden] { display: none; }

/* guide */
.a-head { margin: 8px 0 18px; }
.kicker { margin: 0 0 6px; font-size: .9rem; font-weight: 600; }
.kicker a { text-decoration: none; }
.lede { font-size: 1.15rem; color: var(--muted); }
.meta { font-size: .85rem; color: var(--muted); }
.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 40px; }
@media (min-width: 1000px) { .guide { grid-template-columns: minmax(0, 1fr) 280px; } .related { position: sticky; top: 84px; align-self: start; } .related .cards { grid-template-columns: 1fr; } }
.article { max-width: 780px; min-width: 0; }
.related h2 { font-size: 1.05rem; margin: 8px 0; }
.related .cards { margin: 0; }
.toc { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 18px; font-size: .94rem; }
.toc-h { font-weight: 650; margin: 0 0 4px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose ol > li::marker { font-weight: 700; color: var(--accent); }
.prose img { display: block; margin: 12px 0 18px; }
.code { position: relative; margin: 8px 0 14px; }
.code pre { margin: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 64px 12px 14px; overflow-x: auto; font-size: .88rem; line-height: 1.5; }
.code pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.code .copy { position: absolute; top: 7px; right: 7px; font: inherit; font-size: .78rem; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.code .copy:hover { border-color: var(--accent); }
.table { overflow-x: auto; margin: 8px 0 16px; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.callout { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; margin: 12px 0 16px; }
.callout.warn { border-left-color: var(--warn-border); background: var(--warn-bg); }
.callout p { margin: 0; }
.help-box { margin-top: 32px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); }
.help-box p { margin: 0; }

/* footer */
.foot { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 24px 0; margin-top: 24px; }
.foot p { margin: 0 0 8px; }
mark { background: color-mix(in srgb, var(--brand) 25%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
