/* Local Sorted — compiled from docs/localsorted-DESIGN-SPEC.md ("The Sorted High Street"). */
@font-face { font-family: 'Bricolage'; src: url('/assets/fonts/bricolage-grotesque.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }

:root {
  --surface-lowest: #fffbf2; --surface-low: #fbf1d9; --surface: #f4e8ca; --surface-high: #efe5cd; --surface-highest: #e4d6b4;
  --ink: #35261e; --ink-muted: #675a49; --line: #c5b99e;
  --accent: #b6361b; --on-accent: #fff8ec; --accent-container: #f6dccb; --navy: #22344f;
  --ok: #2f6b3e; --error: #9e2a16;
  --shadow-1: 0 1px 0 rgba(53, 38, 30, .06), 0 6px 18px -8px rgba(53, 38, 30, .22);
  --shadow-2: 0 2px 0 rgba(53, 38, 30, .06), 0 18px 40px -18px rgba(53, 38, 30, .35);
  --display: 'Bricolage', 'Arial Narrow', Arial, sans-serif;
  --body: 'DM Sans', Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --section: clamp(64px, 9vw, 96px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-low); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid rgba(182, 54, 27, .35); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-accent); padding: 10px 14px; border-radius: 7px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.prose { max-width: 65ch; }
.prose p, .prose li { color: var(--ink); }
.prose h2 { margin-top: 2.2em; }
.muted { color: var(--ink-muted); }
.label { font: 600 .8125rem/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.num { font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0 0 .5em; }
.display { font-size: clamp(3rem, 7.4vw, 7rem); font-weight: 800; line-height: .92; letter-spacing: -.045em; }
.headline, h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.display em, .headline em, h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }

/* Header */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.06em; text-decoration: none; position: relative; padding-bottom: 6px; line-height: 1; }
.brand::after { content: ''; position: absolute; left: 2px; bottom: 0; width: 58px; height: 4px; background: var(--accent); transform: rotate(-3deg); border-radius: 3px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; font-size: .95rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; padding: 10px 0; }
@media (max-width: 700px) {
  .site-header .wrap { gap: 4px; padding-block: 12px 4px; }
  .site-nav { width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; gap: 18px; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; }
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* Buttons */
.button, .button-secondary { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 7px; font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s ease-out, background-color .15s ease-out; border: 0; }
.button { background: var(--accent); color: var(--on-accent); }
.button:hover { background: #9f2e16; color: var(--on-accent); }
.button-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button-secondary:hover { background: var(--surface-high); color: var(--ink); }
.button .arrow, .button-secondary .arrow { transition: transform .15s ease-out; }
.button:hover .arrow, .button-secondary:hover .arrow { transform: translateX(5px); }
.button:active, .button-secondary:active { transform: translateY(1px); }

/* Hero (home) */
/* The street art's top ~45% is plain sky: keep it at natural aspect, bottom-anchored, and add sky
   above it so the copy always sits on sky, never on the rooftops. */
.hero { position: relative; overflow: hidden; background: #f8ecd2; min-height: calc(62.5vw + 150px); }
.hero-street { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; }
.hero .button-secondary { background: var(--surface-lowest); }
.hero-copy { position: relative; z-index: 2; text-align: center; padding: clamp(24px, 4vw, 56px) 20px 0; }
.hero-copy .display > span { display: block; }
.hero-copy p { font-size: clamp(1.05rem, 1.6vw, 1.45rem); line-height: 1.35; max-width: 34ch; margin: 18px auto 22px; }
.hero-copy .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-route { position: absolute; left: 0; right: 0; top: 47%; height: 170px; z-index: 1; pointer-events: none; width: 100%; }
.hero-route path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-dasharray: 3 9; stroke-linecap: round; opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .hero-route path { animation: route 2.4s ease-out both; }
  @keyframes route { from { opacity: 0; } to { opacity: .75; } }
}
@media (max-width: 700px) { .hero { min-height: calc(62.5vw + 470px); } .hero-route { display: none; } }

/* Strip */
.strip { background: var(--ink); color: var(--surface-low); }
.strip .wrap { display: flex; gap: 12px 36px; flex-wrap: wrap; justify-content: center; padding-block: 16px; font-size: .95rem; }
.strip span::before { content: '✓'; color: #f2a07f; margin-right: 8px; }

/* Sections */
.section { padding-block: var(--section); }
.section-band { background: var(--surface); }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: end; margin-bottom: 48px; }
.section-head p { color: var(--ink-muted); margin: 0; max-width: 46ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* Trade tiles: asymmetric — first tile spans two rows */
.trades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trade { background: var(--surface-lowest); border-radius: 14px; box-shadow: var(--shadow-1); padding: 28px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .15s ease-out, box-shadow .15s ease-out; min-height: 220px; }
.trade:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--ink); }
.trade:first-child { grid-row: span 2; background: var(--ink); color: var(--surface-low); }
.trade:first-child:hover { color: var(--surface-low); }
.trade:first-child h3, .trade:first-child .label { color: var(--surface-low); }
.trade:first-child .trade-docs { color: #e7d9bb; }
.trade .trade-mark { width: 52px; height: 52px; border-radius: 12px; background: var(--accent-container); display: grid; place-items: center; font-size: 1.6rem; }
.trade:first-child .trade-mark { background: var(--accent); }
.trade .trade-docs { color: var(--ink-muted); font-size: .95rem; margin: 0; }
.trade-list { list-style: none; padding: 0; margin: 8px 0 18px; display: grid; gap: 0; }
.trade-list li { padding: 9px 0; border-bottom: 1px solid rgba(231, 217, 187, .22); color: #e7d9bb; font-size: .95rem; }
.trade-sister { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.trade-sister:hover { transform: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.trade-links { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: .95rem; }
.trade-links a { text-decoration: underline; text-decoration-color: var(--line); }
.trade .trade-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
@media (max-width: 960px) { .trades { grid-template-columns: repeat(2, minmax(0, 1fr)); } .trade:first-child { grid-row: auto; grid-column: span 2; } }
@media (max-width: 600px) { .trades { grid-template-columns: 1fr; } .trade:first-child { grid-column: auto; } }

/* Tools */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tool { border-top: 4px solid var(--accent); background: var(--surface-lowest); border-radius: 0 0 14px 14px; padding: 28px; box-shadow: var(--shadow-1); }
@media (max-width: 760px) { .tools { grid-template-columns: 1fr; } }

/* Split (image + ledger) */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.split figure { margin: 0; }
.split img { border-radius: 18px; box-shadow: var(--shadow-2); }
.split figcaption { font-size: .8rem; color: var(--ink-muted); margin-top: 10px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.ledger { list-style: none; margin: 24px 0; padding: 0; border-top: 1px solid var(--line); }
.ledger li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ledger .n { font: 600 .9rem/1.6 var(--body); letter-spacing: .08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.ledger h3 { font-size: 1.15rem; margin: 0 0 4px; }
.ledger p { margin: 0; color: var(--ink-muted); }

/* Answer box (AEO) */
.answer { border-left: 4px solid var(--accent); background: var(--surface-lowest); padding: 18px 22px; border-radius: 0 12px 12px 0; max-width: 70ch; font-size: 1.08rem; box-shadow: var(--shadow-1); }
.answer p:last-child { margin: 0; }

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(32px, 5vw, 64px) 32px; }
.page-hero .display { font-size: clamp(2.6rem, 6vw, 5.2rem); max-width: 16ch; }
.crumbs { font-size: .9rem; color: var(--ink-muted); margin-bottom: 18px; }
.crumbs a { color: var(--ink-muted); }

/* Pricing */
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 980px; }
.price { background: var(--surface-lowest); border-radius: 14px; box-shadow: var(--shadow-1); padding: 32px; display: flex; flex-direction: column; }
.price.pro { box-shadow: var(--shadow-2), inset 0 0 0 2px var(--accent); }
.price .chip { align-self: flex-start; background: var(--accent-container); color: var(--accent); font: 600 .78rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; margin-bottom: 14px; }
.price .amount { font: 800 3.2rem/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.price .amount small { font: 500 1rem var(--body); letter-spacing: 0; color: var(--ink-muted); }
.price ul { list-style: none; padding: 0; margin: 20px 0 26px; }
.price li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px dashed var(--line); }
.price li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
.price li.inherit { color: var(--ink-muted); }
.price .button { margin-top: auto; justify-content: center; }
.price .button[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.waiver { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-muted); margin: 0 0 14px; }
.waiver input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font: 700 1.15rem/1.3 var(--display); padding: 16px 32px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 1.6rem; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 18px; color: var(--ink); max-width: 65ch; }

/* Forms / calculator */
.panel { background: var(--surface-lowest); border-radius: 14px; box-shadow: var(--shadow-2); padding: clamp(20px, 3vw, 36px); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs button { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font: 600 .95rem var(--body); color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface-low); border-color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; }
.field .hint { font-size: .88rem; color: var(--ink-muted); }
.field input, .field select { min-height: 48px; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; background: #fffdf8; color: var(--ink); width: 100%; max-width: 320px; }
.field input:focus, .field select:focus { outline: 3px solid rgba(182, 54, 27, .35); outline-offset: 1px; border-color: var(--accent); }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 600px) { .fields-2 { grid-template-columns: 1fr; } }
.result { margin-top: 20px; padding: 20px 22px; border-radius: 12px; background: var(--surface-high); }
.result .big { font: 800 clamp(2.2rem, 5vw, 3.4rem)/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.result .error { color: var(--error); font-weight: 600; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-row input[type="email"] { min-height: 52px; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; min-width: min(320px, 100%); background: #fffdf8; }
.notice { font-size: .9rem; color: var(--ink-muted); }

/* Tables (free templates) */
.table-scroll { overflow-x: auto; }
table.sheet { width: 100%; border-collapse: collapse; background: var(--surface-lowest); font-size: .95rem; }
table.sheet th, table.sheet td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.sheet th { background: var(--surface-highest); font-weight: 600; }
table.sheet td.blank { height: 3.2em; }

/* Footer */
.site-footer { background: var(--ink); color: #e7d9bb; padding-block: 56px 40px; margin-top: var(--section); }
.site-footer a { color: var(--surface-low); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--surface-low); font-size: 1rem; letter-spacing: .02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.site-footer .small { font-size: .85rem; margin-top: 36px; border-top: 1px solid rgba(231, 217, 187, .2); padding-top: 18px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

@media print { .site-header, .site-footer, .strip, .no-print { display: none !important; } body { background: #fff; } }
.page-hero .display.tool-title { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
.page-hero:has(.tool-title) { padding-block: clamp(20px, 3vw, 40px) 24px; }
