/* ==========================================================================
   Chronolipi — design system.  Dark navy / ink-gold "records room" identity.
   System font stack only: zero webfont bytes = zero font-swap CLS and no
   render delay.  Honours prefers-color-scheme and a manual override.
   ========================================================================== */

:root {
  --bg: #081525;
  --bg-2: #0d1e31;
  --bg-3: #132a42;
  --card: rgba(255, 255, 255, .035);
  --card-2: rgba(255, 255, 255, .06);
  --ink: #e8eef6;
  --ink-2: #a8bccf;
  --ink-3: #7590a8;
  --line: rgba(168, 188, 207, .18);
  --line-2: rgba(168, 188, 207, .10);
  --gold: #d9a441;
  --gold-2: #f0c46a;
  --teal: #4fd1c5;
  --green: #57c98a;
  --red: #e0736a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
          "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", "Roboto Mono",
          "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --maxw: 76rem;
  --gut: clamp(1.05rem, 4vw, 2.25rem);
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 24px 70px -28px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: dark light;
}

html[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-2: #fffefb;
  --bg-3: #ece7dc;
  --card: rgba(8, 21, 37, .035);
  --card-2: rgba(8, 21, 37, .06);
  --ink: #10233a;
  --ink-2: #46596e;
  --ink-3: #6b7f93;
  --line: rgba(16, 35, 58, .16);
  --line-2: rgba(16, 35, 58, .08);
  --gold: #a8761b;
  --gold-2: #8a5f10;
  --teal: #12897c;
  --shadow: 0 20px 50px -26px rgba(16, 35, 58, .35);
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 520px at 84% -8%, rgba(217, 164, 65, .16), transparent 62%),
    radial-gradient(900px 480px at 6% 8%, rgba(79, 209, 197, .10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 46%, var(--bg) 100%);
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.15rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* --------------------------------------------------------------- type */
h1, h2, h3, h4, .display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.09;
  letter-spacing: -.018em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 1.05rem + 5.1vw, 4.1rem); }
h2 { font-size: clamp(1.72rem, 1rem + 2.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, .95rem + .9vw, 1.48rem); line-height: 1.24; }
h4 { font-size: 1.06rem; line-height: 1.3; letter-spacing: -.005em; }
p { text-wrap: pretty; }
.lead {
  font-size: clamp(1.06rem, .98rem + .38vw, 1.24rem);
  color: var(--ink-2);
  line-height: 1.62;
  max-width: 58ch;
}
.muted { color: var(--ink-2); }
.tiny { font-size: .8rem; }
.mono { font-family: var(--mono); font-size: .84em; letter-spacing: -.01em; }
.kicker {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.kicker::before {
  content: "";
  width: 1.9rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.kicker--plain::before { display: none; }
strong { color: var(--ink); font-weight: 620; }
em { color: var(--ink); font-style: italic; }
::selection { background: rgba(217, 164, 65, .32); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.wrap--wide { max-width: 84rem; }
.wrap--narrow { max-width: 46rem; }
section { padding-block: clamp(3.4rem, 7vw, 6.6rem); position: relative; }
section > .wrap > .section-head { margin-bottom: clamp(1.9rem, 4vw, 3rem); max-width: 60ch; }
.section-head h2 + p { margin-top: .85rem; }
.grid { display: grid; gap: clamp(.9rem, 2vw, 1.4rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.stack > * + * { margin-top: 1.05rem; }
.center { text-align: center; }
.center .kicker { justify-content: center; }
.center .lead { margin-inline: auto; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* --------------------------------------------------------------- skip link */
.skip {
  position: absolute; left: .6rem; top: .6rem; z-index: 200;
  transform: translateY(-160%);
  background: var(--gold); color: #10233a; font-weight: 650;
  padding: .62rem 1rem; border-radius: 10px; transition: transform .18s var(--ease);
}
.skip:focus { transform: translateY(0); }

/* --------------------------------------------------------------- header */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.masthead.is-stuck { border-bottom-color: var(--line-2); background: color-mix(in srgb, var(--bg) 93%, transparent); }
.masthead .wrap { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); min-height: 4.15rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.24rem; letter-spacing: -.02em; }
.brand img { width: 27px; }
.brand b { font-weight: 600; }
.brand i { font-style: normal; color: var(--gold); }
.nav { display: flex; align-items: center; gap: .1rem; margin-left: auto; }
.nav a { padding: .5rem .68rem; border-radius: 9px; font-size: .925rem; color: var(--ink-2); transition: color .16s var(--ease), background .16s var(--ease); }
.nav a:hover, .nav a:focus-visible { color: var(--ink); background: var(--card); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: .28rem; background: var(--gold); border-radius: 2px; }
.nav-cta { display: flex; align-items: center; gap: .55rem; }
.burger { display: none; padding: .45rem; border: 1px solid var(--line); border-radius: 10px; }
.burger svg { width: 20px; }

@media (max-width: 60rem) {
  .nav {
    position: fixed; inset: 4.15rem 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: .1rem;
    padding: .8rem var(--gut) 1.4rem;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform-origin: top; opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: .2s var(--ease);
  }
  .nav a { padding: .82rem .6rem; font-size: 1.02rem; border-bottom: 1px solid var(--line-2); }
  [data-nav-open="true"] .nav { opacity: 1; visibility: visible; transform: translateY(0); }
  .burger { display: inline-flex; margin-left: auto; }
  .nav-cta .btn:not(.btn--primary) { display: none; }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.15rem; border-radius: 11px;
  font-size: .93rem; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid var(--line); color: var(--ink); background: var(--card);
  transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--card-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #14293f; border-color: transparent; font-weight: 700;
  box-shadow: 0 12px 30px -14px rgba(217, 164, 65, .6);
}
.btn--primary:hover { filter: brightness(1.06); }
html[data-theme="light"] .btn--primary { color: #fffaf0; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--lg { padding: .95rem 1.5rem; font-size: 1rem; border-radius: 12px; }
.btn--sm { padding: .5rem .8rem; font-size: .86rem; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.link { color: var(--gold); font-weight: 600; border-bottom: 1px solid color-mix(in srgb, var(--gold) 42%, transparent); }
.link:hover { border-bottom-color: var(--gold); }
.link-arrow::after { content: " →"; }

/* --------------------------------------------------------------- surfaces */
.card {
  background: linear-gradient(180deg, var(--card), transparent 140%);
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: clamp(1.05rem, 2.4vw, 1.5rem); position: relative;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }
.card--flat:hover { transform: none; }
.card h3, .card h4 { margin-bottom: .5rem; }
.card p { color: var(--ink-2); font-size: .94rem; }
.card .ico { margin-bottom: .85rem; }
.ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(217, 164, 65, .2), rgba(79, 209, 197, .1));
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.ico svg { width: 19px; stroke: var(--gold); fill: none; stroke-width: 1.6; }
.ico--teal svg { stroke: var(--teal); }
.ico--gold svg { stroke: var(--gold); }
.panel {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-2), color-mix(in srgb, var(--bg) 70%, var(--bg-2)));
  padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.chip {
  display: inline-flex; align-items: center; gap: .42rem;
  padding: .3rem .68rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-size: .78rem; color: var(--ink-2); font-weight: 550;
}
.chip--gold { border-color: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold-2); background: rgba(217, 164, 65, .1); }
.chip--teal { border-color: color-mix(in srgb, var(--teal) 45%, transparent); color: var(--teal); background: rgba(79, 209, 197, .1); }
.chip--green { border-color: color-mix(in srgb, var(--green) 45%, transparent); color: var(--green); background: rgba(87, 201, 138, .12); }
.tagline-note { font-size: .82rem; color: var(--ink-3); }

/* --------------------------------------------------------------- bullets */
.ticks { list-style: none; padding: 0; display: grid; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.55rem; font-size: .935rem; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .48rem; width: 15px; height: 15px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9A441' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.ticks--cross li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E0736A' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}
.ticks--wide { gap: .72rem; }
.ticks--wide li { font-size: 1rem; padding-left: 1.8rem; }
.ticks--wide li::before { top: .52rem; }

/* --------------------------------------------------------------- hero */
.hero { padding-block: clamp(2.6rem, 6vw, 5.2rem) clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 3.4rem); grid-template-columns: 1.04fr .96fr; align-items: center; }
/* a page head with one block of text (pricing, features, about…) is one column, not split across the two */
.hero .wrap--narrow { display: block; }
.hero h1 { margin-top: 1rem; }
.hero h1 .accent { color: var(--gold); white-space: nowrap; }
.hero .lead { margin-top: 1.15rem; }
.hero .btn-row { margin-top: 1.7rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .45rem .95rem; margin-top: 1.35rem; font-size: .82rem; color: var(--ink-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(87, 201, 138, .16); }
@media (max-width: 62rem) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 1.9rem; display: grid; gap: .6rem; }
.timeline::before {
  content: ""; position: absolute; left: .42rem; top: .45rem; bottom: .45rem; width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold) 12%, var(--teal) 82%, transparent);
}
.doc {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: .35rem .8rem;
  align-items: center; padding: .72rem .9rem; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2); transition: .18s var(--ease);
}
.doc:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); transform: translateX(3px); }
.doc::before {
  content: ""; position: absolute; left: -1.72rem; top: 50%; translate: 0 -50%;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold);
}
.doc b { font-size: .93rem; font-weight: 600; display: block; }
.doc small { color: var(--ink-3); font-size: .78rem; grid-column: 1 / -1; display: block; }
.doc .hash { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); letter-spacing: -.02em; }
.doc .hash b { display: inline; color: var(--teal); font-weight: 500; font-size: inherit; }
.doc-date {
  font-family: var(--mono); font-size: .74rem; color: var(--gold-2);
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  padding: .16rem .45rem; border-radius: 7px; white-space: nowrap;
}

/* --------------------------------------------------------------- ciphertext */
.cipher {
  font-family: var(--mono); font-size: .78rem; line-height: 1.75; word-break: break-all;
  color: var(--ink-3); background: #07111d; border: 1px solid var(--line-2);
  border-radius: 12px; padding: 1rem 1.05rem; max-height: 13rem; overflow: auto;
}
html[data-theme="light"] .cipher { background: #10233a; color: #9fb6cc; }
.cipher .hl { color: var(--teal); }

/* --------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--bg-2); padding: 1.15rem 1.15rem 1.25rem; }
.stat b { font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.05rem); display: block; letter-spacing: -.02em; }
.stat span { font-size: .82rem; color: var(--ink-3); display: block; margin-top: .25rem; }

/* --------------------------------------------------------------- steps */
.steps { counter-reset: step; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--mono); font-size: .82rem; color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
  border-radius: 9px; padding: .18rem .5rem;
}
.step h3 { margin-bottom: .45rem; }
.step p { color: var(--ink-2); font-size: .945rem; }
.step .time { margin-top: .7rem; }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 40rem; }
caption { text-align: left; padding: .95rem 1.05rem; color: var(--ink-3); font-size: .84rem; border-bottom: 1px solid var(--line-2); }
th, td { text-align: left; padding: .78rem 1.05rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th { background: var(--bg-2); font-weight: 650; font-size: .86rem; color: var(--ink); }
tbody tr:hover { background: var(--card); }
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--green); }
td.no { color: var(--ink-3); }
td b { font-weight: 650; }

/* --------------------------------------------------------------- pricing */
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); align-items: start; }
.plan { display: flex; flex-direction: column; gap: .55rem; padding: clamp(1.1rem, 2.4vw, 1.5rem); }
.plan--featured { border-color: color-mix(in srgb, var(--gold) 52%, transparent); background: linear-gradient(180deg, rgba(217, 164, 65, .09), transparent 70%); }
.plan .price { font-family: var(--serif); font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem); letter-spacing: -.03em; }
.plan .price small { font-family: var(--sans); font-size: .78rem; color: var(--ink-3); letter-spacing: 0; }
.plan .badge { position: absolute; top: -.72rem; right: 1rem; }
.plan .btn { margin-top: auto; }
.plan ul.ticks { margin-top: .3rem; }

/* --------------------------------------------------------------- calculator */
.calc { display: grid; gap: clamp(1.2rem, 3vw, 2rem); grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 56rem) { .calc { grid-template-columns: 1fr; } }
.field { display: grid; gap: .42rem; padding-block: .55rem; border-bottom: 1px solid var(--line-2); }
.field:last-of-type { border-bottom: 0; }
.field label { font-size: .88rem; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.field label output { font-family: var(--mono); color: var(--gold-2); font-size: .9rem; }
.field input[type="range"] { width: 100%; accent-color: var(--gold); height: 1.35rem; }
.field .hint { font-size: .78rem; color: var(--ink-3); }
.calc-out { position: sticky; top: 5.5rem; }
.calc-num { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -.035em; line-height: 1; }
.calc-num.is-neg { color: var(--red); }
.calc-rows { display: grid; gap: .1rem; margin-top: 1rem; font-size: .86rem; }
.calc-rows div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line-2); }
.calc-rows div:last-child { border-bottom: 0; }
.calc-rows span:last-child { font-family: var(--mono); text-align: right; }

/* --------------------------------------------------------------- architecture */
.arch { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.arch-row { background: var(--bg-2); padding: 1.05rem 1.15rem; display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: start; }
.arch-row dt { font-family: var(--mono); font-size: .78rem; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.arch-row dd { margin: 0; color: var(--ink-2); font-size: .93rem; }
.arch-row code { font-size: .78rem; }
@media (max-width: 44rem) { .arch-row { grid-template-columns: 1fr; gap: .3rem; } }

/* --------------------------------------------------------------- flow */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; padding: 0; list-style: none; }
.flow > li {
  flex: 1 1 8.5rem; border: 1px solid var(--line-2); border-radius: 12px; padding: .8rem .85rem;
  background: var(--bg-2); position: relative; font-size: .86rem; list-style: none;
}
.flow > li b { display: block; font-size: .93rem; margin-bottom: .25rem; font-weight: 650; }
.flow > li small { color: var(--ink-3); font-size: .78rem; line-height: 1.5; display: block; }
.flow > li:not(:last-child)::after {
  content: "→"; position: absolute; right: -.62rem; top: 50%; translate: 0 -50%;
  color: var(--gold); font-size: .9rem; z-index: 2;
}
@media (max-width: 44rem) { .flow > li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -.78rem; translate: -50% 0; } }

/* --------------------------------------------------------------- accordion */
details.acc { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); }
details.acc + details.acc { margin-top: .6rem; }
details.acc summary {
  list-style: none; cursor: pointer; padding: 1rem 1.15rem;
  font-family: var(--serif); font-size: 1.06rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-family: var(--mono); color: var(--gold); font-size: 1.15rem; transition: transform .2s var(--ease); flex: none; }
details.acc[open] summary::after { content: "−"; }
details.acc .acc-body { padding: 0 1.15rem 1.15rem; color: var(--ink-2); font-size: .94rem; }
details.acc .acc-body p + p { margin-top: .7rem; }

/* --------------------------------------------------------------- callouts */
.note { border-left: 2px solid var(--gold); background: rgba(217, 164, 65, .07); padding: .9rem 1.05rem; border-radius: 0 10px 10px 0; font-size: .9rem; color: var(--ink-2); }
.note--warn { border-left-color: var(--red); background: rgba(224, 115, 106, .08); }
.note--ok { border-left-color: var(--green); background: rgba(87, 201, 138, .08); }
.note b { display: block; color: var(--ink); margin-bottom: .2rem; }

/* --------------------------------------------------------------- quote */
.quote { padding: clamp(1.1rem, 2.6vw, 1.6rem); }
.quote p { font-family: var(--serif); font-size: clamp(1.05rem, .95rem + .5vw, 1.28rem); line-height: 1.5; font-style: italic; }
.quote footer { margin-top: .9rem; font-size: .84rem; color: var(--ink-3); }
.quote footer b { color: var(--ink-2); display: block; font-size: .9rem; }

/* --------------------------------------------------------------- article */
.article .prose { max-width: 44rem; margin-inline: auto; }
.prose { font-size: 1.055rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { margin-top: 2.4rem; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); }
.prose h3 { margin-top: 1.75rem; font-size: 1.2rem; }
.prose h2 + p, .prose h3 + p { margin-top: .65rem; }
.prose ul, .prose ol { display: grid; gap: .55rem; }
.prose li { padding-left: .2rem; }
.prose a { color: var(--gold); border-bottom: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.prose a:hover { border-bottom-color: var(--gold); }
.prose blockquote {
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.55; font-style: italic;
  padding-left: 1.1rem; border-left: 2px solid var(--gold); color: var(--ink);
}
.prose figure { margin-block: 1.8rem; }
.prose figcaption { font-size: .82rem; color: var(--ink-3); margin-top: .6rem; }
.prose .grid, .prose .table-wrap, .prose .flow { max-width: 62rem; }
.prose .not-prose { margin-top: 1.4rem; }
.byline { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: center; font-size: .85rem; color: var(--ink-3); padding-block: .9rem; border-block: 1px solid var(--line-2); }
.byline b { color: var(--ink-2); font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(160deg, var(--gold), var(--teal)); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #10233a; }
.post-card h3 { font-size: 1.12rem; margin-bottom: .45rem; }

/* --------------------------------------------------------------- breadcrumbs */
.crumbs { font-size: .82rem; color: var(--ink-3); padding-block: .9rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .35rem; opacity: .6; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--ink-2); }

/* --------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line-2); background: linear-gradient(180deg, transparent, var(--bg-2)); margin-top: clamp(2rem, 5vw, 4rem); }
/* brand column + four link columns; browsers reject a flexible track next to repeat(auto-fit),
   so the column count is set per width instead */
.foot-grid { display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); grid-template-columns: 1fr; padding-block: clamp(2.2rem, 4vw, 3.4rem) 1.2rem; }
@media (min-width: 34rem) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > .foot-col:first-child { grid-column: 1 / -1; } }
@media (min-width: 64rem) { .foot-grid { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); } .foot-grid > .foot-col:first-child { grid-column: auto; } }
.foot-col h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; font-weight: 650; }
.foot-col ul { list-style: none; padding: 0; display: grid; gap: .48rem; }
.foot-col a { font-size: .9rem; color: var(--ink-2); }
.foot-col a:hover { color: var(--gold); }
.foot-bar { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; align-items: center; justify-content: space-between; padding-block: 1.1rem 2rem; border-top: 1px solid var(--line-2); font-size: .8rem; color: var(--ink-3); }
.foot-bar nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.theme-btn { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .32rem .7rem; font-size: .78rem; color: var(--ink-2); }
.theme-btn svg { width: 14px; stroke: var(--gold); fill: none; stroke-width: 1.7; }

/* --------------------------------------------------------------- form controls */
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
  padding: .72rem .85rem; color: var(--ink); font-size: .95rem; line-height: 1.5;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
input[type="range"] { background: transparent; border: 0; padding: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--gold); }
.form-grid { display: grid; gap: .95rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.field-set { display: grid; gap: .4rem; }
.field-set .help { font-size: .78rem; color: var(--ink-3); }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 44rem) { .form-row { grid-template-columns: 1fr; } }
[role="status"] { font-size: .86rem; color: var(--teal); min-height: 1.4em; }
code { font-family: var(--mono); font-size: .9em; background: var(--card); border: 1px solid var(--line-2); padding: .06rem .3rem; border-radius: 6px; }
abbr[title] { text-decoration: underline dotted var(--ink-3); cursor: help; }

/* --------------------------------------------------------------- utilities */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
[id] { scroll-margin-top: 5.5rem; }

/* --------------------------------------------------------------- motion */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- print */
@media print {
  body::before, .masthead, .site-foot, .btn, .burger, .calc-out { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .panel { border: 1px solid #ccc; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}
