/* Shared look for every page except the homepage (which keeps its own inline styles). Same tokens as index.html. */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url(/vendor/schibsted-grotesk-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url(/vendor/schibsted-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url(/vendor/schibsted-grotesk-latin-800-normal.woff2) format("woff2"); }
:root {
  --bg: #e5e1d8; --surface: #dad5ca; --ink: #2a1d17; --muted: #574740; --accent: #456f3a; --bone: #e5e1d8;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-mega: clamp(2.75rem, 1rem + 6vw, 7rem);
  --m: clamp(16px, 4vw, 48px); --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.5 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: -0.01em; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 800; letter-spacing: -0.04em; line-height: .95; }
p, li { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--accent); color: #fff; }
input { caret-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 14px var(--m); background: var(--ink); color: var(--bone); }
.top .mark { font-weight: 800; font-size: 1.375rem; letter-spacing: -0.04em; text-decoration: none; margin-right: auto; padding: 6px 0; }
.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-weight: 600; font-size: var(--step-small); }
.top nav a { text-decoration: none; padding: 10px 0; }
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; }
.top select { min-height: 40px; border: 0; background: #3d2c24; color: var(--bone); padding: 0 10px; }
@media (max-width: 760px) {
  .top { padding-bottom: 0; }
  .top nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; gap: 18px; }
  .top nav::-webkit-scrollbar { display: none; }
}

/* building blocks */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; background: var(--accent); color: #fff; border: 0; text-decoration: none; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: transform .15s var(--ease), background-color .15s; }
.btn:hover { background: #3a5f30; } .btn:active { transform: scale(.96); }
.btn.alt { background: var(--ink); color: var(--bone); } .btn.alt:hover { background: #3d2c24; }
.btn.ghost { background: var(--surface); color: var(--ink); } .btn.ghost:hover { background: #d0cabd; }
.chip { min-height: 40px; padding: 0 14px; border: 0; background: var(--surface); font-weight: 600; font-size: var(--step-small); cursor: pointer; transition: background-color .15s, transform .15s var(--ease); }
.chip:hover { background: #d0cabd; } .chip:active { transform: scale(.96); }
.field { width: 100%; min-height: 56px; border: 0; background: #fff; padding: 0 16px; }
.note { font-size: var(--step-small); color: var(--muted); }

/* page layout */
.lead { padding: 56px var(--m) 40px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(24px, 5vw, 80px); row-gap: 20px; align-content: start; }
.lead > * { grid-column: 1; }
.lead > .lead-sheet { grid-column: 2; grid-row: 1 / span 4; align-self: start; }
.lead-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: start; }
.lead-sheet .frame:nth-child(3n+2) { margin-top: 48px; } .lead-sheet .frame:nth-child(3n) { margin-top: 20px; }
.frame { display: block; background: var(--surface); text-decoration: none; }
.frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.strip { display: flex; justify-content: space-between; gap: 6px; height: 26px; align-items: center; padding: 0 8px; font-size: var(--step-small); font-weight: 600; white-space: nowrap; overflow: hidden; }
.strip span:first-child { overflow: hidden; text-overflow: ellipsis; }
.s1 { background: var(--ink); color: var(--bone); } .s2 { background: var(--accent); color: #fff; } .s3 { background: #6b5b51; color: #fff; } .s4 { background: #c9c2b4; color: var(--ink); }
.lead h1 { font-size: clamp(2.5rem, 1rem + 3.6vw, 4.75rem); max-width: 22ch; }
.lead > p { font-size: var(--step-lead); line-height: 1.35; max-width: 46ch; margin: 0; }
.band { padding: 40px var(--m); }
.band.ink { background: var(--ink); color: var(--bone); }
.band.green { background: var(--accent); color: #fff; }
.band h2 { font-size: var(--step-head); margin-bottom: 24px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.steps li { background: var(--surface); padding: 20px; counter-increment: s; }
.steps li::before { content: counter(s); display: block; font-size: var(--step-head); font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin-bottom: 12px; }
.band.ink .steps li { background: #3d2c24; }
.steps b { display: block; font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 6px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-lead); letter-spacing: -0.02em; margin: 32px 0 8px; line-height: 1.15; }
.faq details { border-top: 2px solid var(--surface); padding: 14px 0; max-width: 68ch; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 32px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; font-size: var(--step-lead); line-height: 1; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.band h2.small-h { font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 12px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-row .chip, .cat-nav .chip { display: inline-flex; align-items: center; text-decoration: none; }
.faq p { margin: 10px 0 0; }

/* converter */
.tool { background: var(--ink); color: var(--bone); padding: 24px; display: grid; gap: 12px; max-width: 900px; }
.tool form { display: flex; gap: 8px; flex-wrap: wrap; }
.tool .field { flex: 1 1 320px; color: var(--ink); }
.tool .ex { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: var(--step-small); }
.tool .ex .chip { background: #3d2c24; color: var(--bone); }
.tool .ex .chip:hover { background: #4d382e; }
.tool .err { color: #f1b8a8; margin: 0; }
.agents { display: grid; gap: 6px; }
.agent-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.agent-row a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; background: #3d2c24; color: var(--bone); text-decoration: none; font-weight: 600; transition: background-color .15s; }
.agent-row a:hover { background: #4d382e; }
.agent-row a.main { background: var(--accent); color: #fff; }
.agent-row a.main:hover { background: #3a5f30; }
.agent-row a small { font-weight: 400; }
.agent-row .chip { min-height: 48px; background: var(--bone); color: var(--ink); }
.meta-links { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: var(--step-small); font-weight: 600; }

/* find page */
.find { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; padding: 32px var(--m); align-items: start; }
.find .photo { background: var(--surface); }
.find .photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }
.find .info { display: grid; gap: 16px; }
.find h1 { font-size: var(--step-head); overflow-wrap: anywhere; }
.find .big { font-size: var(--step-head); font-weight: 800; letter-spacing: -0.04em; line-height: .9; }
.find .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.find .agents a { background: var(--surface); color: var(--ink); }
.find .agents a:hover { background: #d0cabd; }
.find .agents a.main { background: var(--accent); color: #fff; }
.find .agent-row .chip { background: var(--ink); color: var(--bone); }
.crumbs { font-size: var(--step-small); padding: 16px var(--m) 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.card { background: var(--surface); text-decoration: none; display: block; }
.card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }
.card span { display: block; padding: 8px; font-size: 1rem; line-height: 1.3; }
.card b { display: block; padding: 0 8px 10px; }
.card:hover span { text-decoration: underline; }
.stickybuy { display: none; }
@media (max-width: 760px) {
  .find { grid-template-columns: 1fr; padding-top: 16px; }
  .stickybuy { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 18px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(42,29,23,.12), 0 12px 32px -8px rgba(42,29,23,.32); transform: translateY(160%); transition: transform .3s var(--ease); }
  .stickybuy.on { transform: none; }
}

/* spreadsheet */
.sheet-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.sheet-table th { text-align: left; font-size: var(--step-small); color: var(--muted); padding: 8px; position: sticky; top: 0; background: var(--bg); }
.sheet-table td { padding: 6px 8px; border-top: 1px solid var(--surface); vertical-align: middle; }
.sheet-table img { width: 56px; min-width: 56px; height: 56px; object-fit: cover; }
.sheet-table td:first-child { width: 64px; }
.sheet-table td small { display: block; margin-top: 2px; font-size: var(--step-small); font-weight: 600; }
.sheet-table td:last-child { white-space: nowrap; }
.sheet-table .btn { min-height: 40px; padding: 0 14px; }
.table-wrap { overflow-x: auto; }
@media (max-width: 760px) {
  .lead { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .lead > .lead-sheet { grid-column: 1; grid-row: auto; }
  .lead-sheet .frame:nth-child(n+4) { display: none; }
  .lead-sheet .frame:nth-child(3n+2) { margin-top: 24px; } .lead-sheet .frame:nth-child(3n) { margin-top: 10px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .tool .btn { flex: 1 1 100%; }
}
.cat-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-nav a { text-decoration: none; display: inline-flex; align-items: center; }

/* weight estimator */
.wt { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.wt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.wt-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; background: var(--surface); padding: 6px 6px 6px 14px; }
.wt-row > span { display: grid; line-height: 1.2; } .wt-row small { font-size: var(--step-small); }
.wt-row button { width: 40px; height: 40px; border: 0; background: var(--ink); color: var(--bone); font-weight: 800; cursor: pointer; }
.wt-row output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.wt-total { background: var(--ink); color: var(--bone); padding: 24px; display: grid; gap: 12px; position: sticky; top: 16px; }
.wt-total .big { font-size: var(--step-mega); font-weight: 800; letter-spacing: -0.04em; line-height: .9; }
@media (max-width: 760px) { .wt { grid-template-columns: 1fr; } .wt-total { position: static; } }

/* footer */
.foot { margin-top: 64px; padding: 32px var(--m); background: var(--surface); display: grid; gap: 16px; font-size: var(--step-small); }
.foot nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-weight: 600; }
.foot nav a { padding: 6px 0; }
.foot p { margin: 0; max-width: 80ch; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 84px; z-index: 40; background: var(--ink); color: var(--bone); padding: 12px 16px; font-weight: 600; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); box-shadow: 0 1px 2px rgba(42,29,23,.12), 0 12px 32px -8px rgba(42,29,23,.32); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
