/* Layout: left-aligned shell, 1120px max. Reading column at ~66ch. Navy "envelope lining" bands top and bottom. */
/* Layout: left-aligned shell, 1120px max. Reading column at ~66ch. Graphite bands with a faint unlock-dot lattice. Doberman black and tan. */
:root {
  --paper: #F7F7F5;
  --panel: #ECEBE8;
  --ink: #161616;
  --muted: #5C5A55;
  --rule: #DAD9D4;
  --lining: #161616;
  --lining-line: #34322F;
  --on-lining: #EFE7DA;
  --on-lining-muted: #ADA79C;
  --tan: #D08C48;
  --tan-ink: #161616;
  --accent: #8F5216;
  --accent-soft: #F1E4D4;
  --focus: #8F5216;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --shell: 1120px;
  --read: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121212;
    --panel: #1C1C1B;
    --ink: #ECE6DB;
    --muted: #A6A096;
    --rule: #2B2A28;
    --lining: #1A1918;
    --lining-line: #34322F;
    --on-lining: #EFE7DA;
    --on-lining-muted: #A9A397;
    --tan: #D08C48;
    --tan-ink: #161616;
    --accent: #DB9A5C;
    --accent-soft: #33261A;
    --focus: #E0A468;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121212;
  --panel: #1C1C1B;
  --ink: #ECE6DB;
  --muted: #A6A096;
  --rule: #2B2A28;
  --lining: #1A1918;
  --lining-line: #34322F;
  --on-lining: #EFE7DA;
  --on-lining-muted: #A9A397;
  --tan: #D08C48;
  --tan-ink: #161616;
  --accent: #DB9A5C;
  --accent-soft: #33261A;
  --focus: #E0A468;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img, svg, canvas, video { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Envelope lining: a dense wave pattern masked in the line colour, so it follows the theme. */
.lining { position: relative; background: var(--lining); color: var(--on-lining); isolation: isolate; }
.lining::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--lining-line);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='1.2' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='1.2' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 22px 22px;
  mask-size: 22px 22px;
}

/* Header */
.site-head { padding-block: 14px; }
.site-head .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; }
.logo svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; align-items: center; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--on-lining-muted); }
.nav a:hover { color: var(--on-lining); }
.site-head.plain { border-bottom: 1px solid var(--rule); }
.site-head.plain .nav a { color: var(--muted); }
.site-head.plain .nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--tan);
  color: var(--tan-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8em 1.25em;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  line-height: 1.1;
}
.btn:hover { filter: brightness(1.06); }
.btn.small { font-size: 0.9rem; padding: 0.6em 1em; }
.btn.quiet { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn svg { width: 18px; height: 18px; flex: none; }
.site-head .nav .btn, .site-head.plain .nav .btn { color: var(--tan-ink); }

/* Home hero */
.hero { padding-block: 40px 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
  text-wrap: balance;
  max-width: 14ch;
}
.hero p.lede { font-size: 1.2rem; color: var(--on-lining-muted); max-width: 34rem; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero .note { color: var(--on-lining-muted); font-size: 0.95rem; }

.dots { width: 100%; max-width: 340px; justify-self: center; aspect-ratio: 1; }
.dots circle.ring { fill: none; stroke: var(--on-lining-muted); stroke-opacity: 0.35; stroke-width: 1.2; }
.dots circle.dot { fill: var(--on-lining); }
.dots .trace { fill: none; stroke: var(--tan); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dots .hit { fill: var(--tan); }
@media (prefers-reduced-motion: no-preference) {
  .dots .trace { animation: trace 2.4s cubic-bezier(.55,.1,.35,1) 0.4s both; }
  .dots .hit { animation: pop 0.25s ease-out both; }
}
@keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { r: 0; } }

/* Sections */
.band { padding-block: 64px; border-top: 1px solid var(--rule); }
.band:first-of-type { border-top: 0; }
.band h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 12px; text-wrap: balance; max-width: 22ch; }
.band .intro { color: var(--muted); max-width: 38rem; margin: 0 0 32px; font-size: 1.1rem; }

.facts { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.facts dt, .facts dd { padding-block: 16px; border-bottom: 1px solid var(--rule); margin: 0; }
.facts dt { font-weight: 700; padding-right: 20px; }
.facts dd { color: var(--muted); }
.facts dd strong { color: var(--ink); font-weight: 700; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.vaults { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.vault-pair { display: flex; gap: 28px; flex-wrap: wrap; }
.vault-pair figure { margin: 0; flex: 1 1 140px; }
.vault-pair svg { width: 100%; max-width: 170px; aspect-ratio: 1; display: block; }
.vault-pair figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 8px; }
.mini circle { fill: var(--muted); }
.mini .ring { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.mini path { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.mini.decoy path { stroke: var(--muted); stroke-dasharray: 2 10; }

.link-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; max-width: 60rem; }
.link-list li { border-top: 1px solid var(--rule); padding-block: 16px; }
.link-list a { font-weight: 700; text-decoration: none; font-size: 1.08rem; }
.link-list a:hover { text-decoration: underline; }
.link-list p { margin: 4px 0 0; color: var(--muted); font-size: 0.97rem; }

.prices { width: 100%; max-width: 46rem; border-collapse: collapse; }
.prices th, .prices td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prices th { font-weight: 700; white-space: nowrap; }
.prices td.amt { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prices td.what { color: var(--muted); }
.small-print { color: var(--muted); font-size: 0.92rem; margin-top: 14px; max-width: 46rem; }

/* Article pages */
.crumbs { font-size: 0.9rem; color: var(--muted); padding-block: 26px 0; }
.crumbs a { color: var(--muted); }
.article-head { padding-block: 10px 8px; }
.article-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: 20ch;
  text-wrap: balance;
}
.article-head .dek { font-family: var(--serif); font-size: 1.2rem; color: var(--muted); max-width: var(--read); margin: 0; }
.answer {
  max-width: var(--read);
  margin: 28px 0 8px;
  padding: 18px 20px;
  background: var(--panel);
  border-radius: 10px;
}
.answer b { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.answer p { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.6; }

.prose { max-width: var(--read); font-family: var(--serif); font-size: 1.12rem; line-height: 1.68; padding-bottom: 40px; }
.prose h2 { font-family: var(--display); font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.2; margin: 2.2em 0 0.5em; text-wrap: balance; }
.prose h3 { font-family: var(--display); font-size: 1.18rem; margin: 1.8em 0 0.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.prose strong { font-weight: 650; }
.prose .table-scroll { overflow-x: auto; margin: 1.4em 0; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--display); font-size: 0.97rem; min-width: 30rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 700; }

.cta {
  margin: 2em 0;
  padding: 22px 22px;
  border-radius: 12px;
  font-family: var(--display);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 18px;
  align-items: center;
}
.cta svg.mark { width: 52px; height: 52px; grid-row: span 2; }
.cta p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--on-lining-muted); }
.cta p b { color: var(--on-lining); font-size: 1.08rem; }
.cta .btn { grid-column: 2; justify-self: start; margin-top: 8px; }

.related { border-top: 1px solid var(--rule); padding-block: 36px 56px; }
.related h2 { font-size: 1.25rem; margin: 0 0 14px; }

/* Tools */
.tool { max-width: 52rem; margin: 28px 0 10px; padding: 22px; border: 1.5px dashed var(--rule); border-radius: 12px; }
.tool .drop { display: grid; place-items: center; text-align: center; gap: 10px; padding: 26px 12px; border-radius: 10px; background: var(--panel); cursor: pointer; }
.tool .drop.over { outline: 3px solid var(--accent); }
.tool .drop p { margin: 0; color: var(--muted); }
.tool input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tool .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.tool label { font-size: 0.95rem; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.tool input[type="range"] { accent-color: var(--accent); }
.tool .out { margin-top: 18px; display: grid; gap: 16px; }
.tool .result { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 16px; align-items: start; padding-top: 16px; border-top: 1px solid var(--rule); }
.tool .result img { border-radius: 8px; width: 100%; height: auto; display: block; }
.tool .result h3 { margin: 0 0 4px; font-size: 1rem; word-break: break-word; }
.tool .result p { margin: 0 0 6px; color: var(--muted); font-size: 0.95rem; }
.tool .warn { color: var(--ink); background: var(--accent-soft); padding: 8px 10px; border-radius: 6px; }
.tool canvas { display: block; width: 100%; height: auto; border-radius: 8px; touch-action: none; cursor: crosshair; background: var(--panel); }
.tool .seg { display: inline-flex; border: 1.5px solid var(--rule); border-radius: 999px; overflow: hidden; }
.tool .seg button { font: inherit; font-size: 0.92rem; background: transparent; color: var(--ink); border: 0; padding: 6px 14px; cursor: pointer; }
.tool .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tool .plainbtn { font: inherit; font-size: 0.92rem; background: transparent; color: var(--ink); border: 1.5px solid var(--rule); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tool .hint { font-size: 0.92rem; color: var(--muted); }

/* Footer */
.site-foot { padding-block: 48px 40px; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-foot h2 { font-size: 0.95rem; margin: 0 0 10px; color: var(--on-lining); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.94rem; }
.site-foot a { color: var(--on-lining-muted); text-decoration: none; }
.site-foot a:hover { color: var(--on-lining); text-decoration: underline; }
.site-foot p { color: var(--on-lining-muted); font-size: 0.94rem; margin: 0 0 10px; max-width: 22rem; }
.site-foot .fine { margin-top: 36px; font-size: 0.85rem; }

@media (max-width: 860px) {
  .hero-grid, .vaults { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .dots { max-width: 240px; justify-self: start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .nav { margin-left: 0; width: 100%; gap: 14px; }
  .nav .btn { display: none; }
  .hero { padding-block: 20px 44px; }
  .steps, .link-list { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .facts dd { padding-top: 0; }
  .band { padding-block: 44px; }
  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta svg.mark { grid-row: auto; }
  .cta .btn { grid-column: 1; }
  .tool { padding: 14px; }
  .tool .result { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 3vw, 40px); max-width: 56rem; }
.screens figure { margin: 0; min-width: 0; }
.screens img { display: block; width: 100%; height: auto; max-width: 100%; border-radius: clamp(12px, 2.4vw, 28px); box-shadow: 0 0 0 clamp(3px, 0.6vw, 7px) var(--lining); }
.screens figcaption { margin-top: 14px; font-size: 0.95rem; color: var(--muted); }
