/* hostwithRahyl pages: shares bayersnests.com's fonts and colours. Layout: sticky brand bar, a reading column for guides, wider grids for the hub and calculator. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --ink: #16213a; --muted: #5a6478; --line: #dde2ea;
  --deep: #14203a; --on-deep: #efe8d8; --gold: #e8c97f; --gold-ink: #7d5a1c; --accent: #a57a2c;
  --soft-gold: #f4ecd8; --mark: #fff4c2;
  --good: #2f7a4f; --good-bg: #e6f2ea; --warn: #8a5a00; --warn-bg: #fbf0dc; --bad: #b3262e; --bad-bg: #fbe6e7;
  --field: #ffffff; --field-line: #cfd6e0;
  color-scheme: light;
  --display: "Gilda Display", "Playfair Display", Georgia, serif;
  --body: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.65; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
img { max-width: 100%; }
a { color: var(--gold-ink); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.read { max-width: 760px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
mark.todo { background: var(--mark); color: var(--ink); padding: 0 .25em; border-radius: 4px; }

/* brand bar */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px 24px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.2; }
.brand .wordmark { font-family: var(--display); font-size: 1.45rem; letter-spacing: .05em; }
.brand .wordmark span { color: var(--accent); }
.brand .tag { font-size: .8rem; color: var(--muted); }
nav.links { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
nav.links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
nav.links a:hover { color: var(--ink); }
@media (max-width: 720px) { nav.links .hide-sm { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--deep); color: var(--gold); border: 1px solid var(--deep); text-decoration: none; font: 500 .8rem var(--body); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
.btn:hover { color: var(--gold); filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
nav.links .btn { color: var(--gold); min-height: 42px; padding: 0 16px; }

/* article */
main { padding-block: 36px 64px; display: flex; flex-direction: column; gap: 56px; }
.crumbs { font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article-head { display: flex; flex-direction: column; gap: 14px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-left: 0; border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.answer .lab { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.prose { display: flex; flex-direction: column; gap: 18px; }
.prose h2 { margin-top: 18px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 600; }
.note { font-size: .9rem; color: var(--muted); }
.warning { background: var(--warn-bg); color: var(--ink); border-radius: 14px; padding: 16px 18px; }
.warning strong { color: var(--warn); }

/* bands */
.band { background: var(--deep); color: var(--on-deep); border-radius: 22px; padding: 28px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.band h2 { font-size: 1.7rem; color: #fff; }
.band p { opacity: .85; max-width: 52ch; }
.band .btn { background: var(--gold); color: #14203a; border-color: var(--gold); }
.author { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }
.author img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.author div { flex: 1 1 280px; min-width: 0; }
.author .who { font-family: var(--display); font-size: 1.25rem; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.card:hover { border-color: var(--accent); color: var(--ink); }
.card .k { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.card h3 { font-size: 1.2rem; }
.card p { font-size: .92rem; color: var(--muted); }

/* hub */
.hero { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.pill { align-self: flex-start; padding: 6px 14px; border-radius: 999px; border: 1px solid #d8c393; font-size: .85rem; color: var(--gold-ink); font-weight: 600; }
.lead { font-family: var(--display); font-size: 1.45rem; line-height: 1.35; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-weight: 400; font-size: 1.75rem; }
.stats span { font-size: .85rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.tool.lead-tool { background: var(--deep); color: var(--on-deep); border-color: var(--deep); }
.tool.lead-tool h3 { color: #fff; }
.tool .when { align-self: flex-start; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid #d8c393; color: var(--gold-ink); }
.tool.lead-tool .when { background: var(--gold); color: #14203a; border-color: var(--gold); }
.tool .stage { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tool.lead-tool .stage { color: var(--gold); }
.tool p { font-size: .95rem; }
.join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 40px; align-items: center; }
@media (max-width: 860px) { .join { grid-template-columns: minmax(0, 1fr); } }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 600; }
form.wait { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px -28px rgba(20, 32, 58, .35); }
form.wait label, form.wait legend { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
form.wait input, form.wait select { min-height: 48px; padding: 0 14px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--field); color: var(--ink); font: 400 1rem var(--body); }
form.wait fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips label { flex-direction: row; font-weight: 500; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field-line); background: var(--field); cursor: pointer; }
.chips input:checked + span { background: var(--deep); color: var(--gold); border-color: var(--deep); }
.chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.done { display: flex; flex-direction: column; gap: 12px; padding: 10px 0; }
.err { color: var(--bad); font-size: .9rem; }
.founders { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }
.founders img { width: 100%; max-width: 340px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; }
.founders > div { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sign { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--gold-ink); }

footer.bottom { background: var(--deep); color: var(--on-deep); }
footer.bottom .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; font-size: .92rem; }
footer.bottom a { color: var(--gold); }
footer.bottom .wordmark { font-family: var(--display); font-size: 1.3rem; color: #fff; }
footer.bottom .wordmark span { color: var(--gold); }
footer.bottom .fine { flex-basis: 100%; opacity: .7; font-size: .82rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* section links land below the sticky header */
[id] { scroll-margin-top: 96px; }

/* calculator page: results link, checks, free vs detailed, FAQs */
.more-link { align-self: flex-start; font-weight: 500; color: var(--gold-ink); }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.check { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.check h3 { font-size: 1.15rem; }
.check p { font-size: .95rem; color: var(--muted); }
.compare { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.compare-head { display: flex; flex-direction: column; gap: 8px; }
.compare-head p { color: var(--muted); max-width: 60ch; }
table.vs th.c, table.vs td.c { text-align: center; width: 120px; }
table.vs th.tier { background: var(--deep); color: var(--gold); }
table.vs .sub { font-size: .72rem; letter-spacing: .06em; text-transform: none; font-weight: 500; opacity: .85; }
table.vs .yes { color: var(--good); font-weight: 600; font-size: 1.05rem; }
table.vs .no { color: var(--muted); }
.compare-cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin-top: 8px; color: var(--muted); }

/* alignment: reading column centred on wide screens, text stays left */
.read { margin-inline: auto; width: 100%; }
.wide { max-width: 960px; margin-inline: auto; width: 100%; }
.compare { margin-inline: auto; width: 100%; }
.hero { margin-inline: auto; text-align: center; align-items: center; }
.hero .pill { align-self: center; }
.hero .stats, .hero .actions { justify-content: center; }
.hero .note { max-width: 60ch; }
.sec-head { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.intro { margin-inline: auto; text-align: center; align-items: center; }
.intro .example-note { align-self: center; }

/* illustrations */
figure.illus { margin: 6px 0; display: flex; flex-direction: column; gap: 8px; }
figure.illus svg { width: 100%; height: auto; display: block; }
figure.illus figcaption { font-size: .88rem; color: var(--muted); text-align: center; }
.illus .t { font-family: var(--body); fill: var(--ink); }
.illus .tm { font-family: var(--body); fill: var(--muted); }
.illus .td { font-family: var(--display); fill: var(--ink); }

/* phones: keep the brand bar on one row */
@media (max-width: 520px) {
  .brand .tag { display: none; }
  nav.links { gap: 12px; }
  nav.links .btn { min-height: 40px; padding: 0 14px; font-size: .7rem; letter-spacing: .12em; }
}
@media (max-width: 400px) { nav.links a.nav-calc { display: none; } }
