/* PercyBuy stylesheet. Colours and type live in the :root block so the brand is easy to retune. */
@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --paper: #f5f1e8;
  --surface: #fffdf8;
  --sunk: #ece6d8;
  --ink: #14211c;
  --muted: #5c6a63;
  --line: #ded7c6;
  --brand: #12493a;
  --brand-deep: #0b3228;
  --lime: #cdf25c;
  --lime-deep: #b5dd3c;
  --clay: #e8643c;
  --ok-bg: #dff3e3; --ok: #1b6b3a;
  --info-bg: #dfeaf6; --info: #1f4f86;
  --warn-bg: #fbe9c9; --warn: #8a5300;
  --mute-bg: #e8e3d6; --mute: #55605a;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-sm: 10px; --r: 16px; --r-lg: 28px;
  --shadow: 0 1px 2px rgba(20, 33, 28, .06), 0 12px 32px -16px rgba(20, 33, 28, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.eyebrow { font: 600 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.stack > * + * { margin-top: 14px; }
.ico { width: 20px; height: 20px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ribbon, header */
.ribbon { background: var(--ink); color: #e9efe6; font-size: .82rem; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 7px 16px; text-align: center; }
.ribbon .ico { width: 16px; height: 16px; color: var(--lime); }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 241, 232, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo-mark { width: 32px; height: 32px; }
.logo-word { font: 600 1.32rem/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.logo-word b { font-weight: 800; color: var(--brand); }
.site-header a { text-decoration: none; }
.nav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--sunk); }
.bar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--ink); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--clay); color: #fff; font: 700 .72rem/20px var(--body); text-align: center; }
.nav-toggle { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s, background .12s, border-color .12s; }
.btn:active { transform: translateY(1px); }
.btn-lime { background: var(--lime); color: var(--brand-deep); }
.btn-lime:hover { background: var(--lime-deep); }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-deep); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.text-link { font-weight: 600; color: var(--brand); text-underline-offset: 3px; }

/* forms */
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18, 73, 58, .16); }
textarea.input { min-height: 96px; resize: vertical; }
.field + .field { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hint { font-size: .84rem; color: var(--muted); margin-top: 6px; }
.error { color: #a4311a; font-size: .9rem; font-weight: 500; margin-top: 10px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--sunk); font-size: .9rem; color: var(--muted); }
.note .ico { color: var(--brand); margin-top: 1px; }

/* cards, pills */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); } .pill-info { background: var(--info-bg); color: var(--info); }
.pill-warn { background: var(--warn-bg); color: var(--warn); } .pill-mute { background: var(--mute-bg); color: var(--mute); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; font-weight: 500; cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--ink); }
.art { width: 100%; height: auto; border-radius: var(--r-sm); }

/* hero */
.hero { padding: 20px 0 0; }
.hero-panel { background: var(--brand); color: #f2f6ee; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 56px); align-items: center; position: relative; overflow: hidden; }
.hero-panel::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(205, 242, 92, .22), transparent 68%); pointer-events: none; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero .lede { color: #c6d6cc; margin-top: 18px; }
.hero .eyebrow { color: var(--lime); margin-bottom: 18px; display: block; }
.linkbox { margin-top: 28px; display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 999px; box-shadow: var(--shadow); }
.linkbox .ico { color: var(--muted); align-self: center; margin-left: 12px; }
.linkbox input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 6px; color: var(--ink); }
.linkbox input:focus { outline: none; }
.linkbox:focus-within { box-shadow: 0 0 0 3px var(--lime); }
.hero .error { color: #ffd0c2; }
.samples { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .88rem; color: #c6d6cc; }
.samples .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.samples .chip:hover { border-color: var(--lime); }
.journey { position: relative; z-index: 1; background: var(--brand-deep); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r); padding: 22px; }
.journey h3 { font-size: 1rem; color: #c6d6cc; font-weight: 500; margin-bottom: 14px; }
.journey ol { list-style: none; margin: 0; padding: 0; }
.journey li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .09); }
.journey li:first-child { border-top: 0; }
.journey .dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #c6d6cc; }
.journey li.done .dot { background: var(--lime); color: var(--brand-deep); }
.journey li.now .dot { box-shadow: 0 0 0 3px rgba(205, 242, 92, .35); color: var(--lime); }
.journey b { display: block; font-weight: 600; }
.journey small { color: #9fb4a8; }
.journey time { font-size: .8rem; color: #9fb4a8; }
.platforms { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding: 26px 4px 0; color: var(--muted); font-size: .92rem; }
.platforms b { font: 650 1.05rem var(--display); color: var(--ink); }

/* steps, features */
.head { display: grid; gap: 14px; margin-bottom: 36px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.card.step { counter-increment: step; position: relative; padding-top: 58px; }
.step::before { content: "0" counter(step); position: absolute; top: 20px; left: 24px; font: 700 1.6rem/1 var(--display); color: var(--line); }
.step .ico { position: absolute; top: 20px; right: 24px; width: 26px; height: 26px; color: var(--brand); }
.step p { color: var(--muted); margin-top: 8px; font-size: .96rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .ico-wrap { width: 46px; height: 46px; border-radius: 14px; background: var(--lime); color: var(--brand-deep); display: grid; place-items: center; margin-bottom: 16px; }
.feature p { color: var(--muted); margin-top: 8px; font-size: .96rem; }
.feature.wide { grid-column: span 2; background: var(--ink); color: #eef2ea; border-color: var(--ink); }
.feature.wide p { color: #b9c6bd; }
.band { background: var(--sunk); }
.fee-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fee b { display: block; font: 700 2.4rem/1 var(--display); letter-spacing: -.03em; color: var(--brand); }
.fee span { display: block; margin-top: 8px; font-weight: 600; }
.fee p { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.cta { background: var(--lime); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; color: var(--brand-deep); }
.cta p { margin-top: 8px; max-width: 46ch; }

/* product */
.crumbs { font-size: .88rem; color: var(--muted); padding: 22px 0 16px; }
.crumbs a { color: var(--brand); font-weight: 600; text-decoration: none; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.gallery .main { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gallery .main .art { border-radius: 0; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: none; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--brand); }
.price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 4px; }
.price b { font: 700 2.2rem/1 var(--display); letter-spacing: -.03em; }
.opt { margin-top: 20px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-row button { padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; }
.opt-row button:hover { border-color: var(--ink); }
.opt-row button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 1.2rem; border-radius: 50%; }
.qty output { min-width: 34px; text-align: center; font-weight: 600; }
.sum { margin-top: 22px; }
.sum dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 0; font-size: .95rem; }
.sum dt { color: var(--muted); } .sum dd { margin: 0; padding-left: 16px; text-align: right; font-weight: 500; }
.sum .total { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.empty { text-align: center; padding: clamp(40px, 8vw, 80px) 20px; }
.empty .ico { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--brand); }
.empty p { color: var(--muted); margin: 10px auto 22px; max-width: 44ch; }
.empty .linkbox { max-width: 620px; margin: 0 auto; border: 1px solid var(--line); }

/* cart */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.line { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; padding-top: 0; }
.line h3 { font-size: 1.02rem; }
.line .meta { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.line .end { text-align: right; display: grid; gap: 10px; justify-items: end; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.split-calc { grid-template-columns: 380px minmax(0, 1fr); }
.sticky { position: sticky; top: 92px; }

/* calculator */
.result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.result + .result { margin-top: 12px; }
.result.best { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.result.off { opacity: .6; }
.result h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.result .cost { font: 700 1.5rem/1 var(--display); letter-spacing: -.02em; text-align: right; }
.result .meta { color: var(--muted); font-size: .9rem; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: .92rem; }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--clay); outline-offset: 2px; }

/* account */
.auth { max-width: 440px; margin: clamp(28px, 6vw, 72px) auto; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 999px; }
.tabs button, .tabs a { flex: 1; text-align: center; padding: 9px 14px; border-radius: 999px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: .93rem; }
.tabs [aria-selected="true"], .tabs [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.dash-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; justify-content: space-between; padding: 32px 0 20px; }
.dash-tabs { overflow-x: auto; margin-bottom: 22px; }
.dash-tabs .tabs { display: inline-flex; min-width: 100%; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { display: block; text-decoration: none; }
.stat:hover { border-color: var(--brand); }
.stat .ico { color: var(--brand); }
.stat b { display: block; font: 700 2rem/1 var(--display); letter-spacing: -.03em; margin: 14px 0 4px; }
.stat span { color: var(--muted); font-size: .9rem; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 12px 10px; font-weight: 600; }
.table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: middle; font-size: .95rem; }
.table .item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.table .num { text-align: right; white-space: nowrap; }
.scroll-x { overflow-x: auto; }
.wh { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wh-item { position: relative; cursor: pointer; padding: 14px; display: block; margin: 0; font-weight: 400; font-size: 1rem; }
.wh-item input { position: absolute; top: 24px; left: 24px; width: 20px; height: 20px; accent-color: var(--brand); }
.wh-item:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.wh-item h3 { font-size: .98rem; margin-top: 12px; }
.wh-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; }
.track { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.track li { font-size: .8rem; color: var(--muted); padding-top: 14px; position: relative; }
.track li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 99px; background: var(--line); }
.track li.done::before { background: var(--brand); }
.track li.done { color: var(--ink); font-weight: 600; }
.amount-pos { color: var(--ok); font-weight: 600; } .amount-neg { color: var(--ink); font-weight: 600; }

/* help */
.help-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 92px; display: grid; gap: 4px; }
.toc a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; }
.toc a:hover { background: var(--sunk); color: var(--ink); }
.help-sec { scroll-margin-top: 92px; padding-bottom: 56px; }
.help-sec > h2 { margin-bottom: 20px; }
.guide { list-style: none; margin: 0; padding: 0; counter-reset: g; }
.guide li { counter-increment: g; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.guide li::before { content: counter(g); width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--lime); display: grid; place-items: center; font: 700 1.1rem var(--display); }
.guide p { color: var(--muted); margin-top: 4px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font: 600 1.05rem var(--display); position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; font-weight: 400; color: var(--brand); transition: transform .15s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding: 0 36px 18px 0; max-width: 68ch; }

/* footer, toast */
.site-footer { background: var(--ink); color: #cfd8d1; margin-top: clamp(48px, 8vw, 96px); padding: 56px 0 28px; }
.site-footer .logo-word, .site-footer .logo-word b { color: #fff; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand p { margin-top: 14px; max-width: 34ch; color: #9fb0a6; font-size: .95rem; }
.foot h4 { font: 600 .78rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: #8fa197; margin-bottom: 12px; }
.foot a { display: block; padding: 5px 0; text-decoration: none; color: #e4eae5; }
.foot a:hover { color: var(--lime); }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .84rem; color: #8fa197; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: .93rem; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .hero-panel, .product, .split, .help-grid { grid-template-columns: minmax(0, 1fr); }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; }
  .sticky { position: static; }
  .nav-toggle { display: grid; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 10px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
}
@media (max-width: 620px) {
  .features, .fee-row, .steps { grid-template-columns: 1fr; }
  .feature.wide { grid-column: auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .acct span { display: none; } .acct { padding: 0; width: 42px; height: 42px; }
  .linkbox { border-radius: 20px; flex-wrap: wrap; }
  .linkbox input { flex-basis: 60%; }
  .linkbox .btn { width: 100%; }
  .line { grid-template-columns: 64px minmax(0, 1fr); }
  .line .end { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .track { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr; } .result .cost { text-align: left; }
  .foot { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- forwarding, manual orders, parcel builder, tracking, account details ---------- */
.ribbon-news { background: var(--lime); color: var(--brand-deep); font-weight: 500; }
.ribbon-news .ico { color: var(--brand-deep); }
.cur { appearance: none; height: 42px; padding: 0 30px 0 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: .88rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2314211c' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m3 4.500 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 11px center / 11px; }
.cur:hover { border-color: var(--ink); }
.quick { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.quick .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.quick .chip:hover { border-color: var(--lime); }
.quick .chip .ico { width: 16px; height: 16px; color: var(--lime); }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.way { display: flex; flex-direction: column; gap: 10px; }
.way ul { margin: 4px 0 8px; padding-left: 18px; color: var(--muted); font-size: .96rem; }
.way li + li { margin-top: 4px; }
.way .btn { align-self: flex-start; margin-top: auto; }
.way.alt { background: var(--brand); border-color: var(--brand); color: #f2f6ee; }
.way.alt ul, .way.alt p { color: #c6d6cc; }
.way.alt .eyebrow { color: var(--lime); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
button.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); margin-bottom: 16px; font-weight: 500; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.btn-xs { padding: 6px 12px; font-size: .84rem; }
.btn-demo { background: none; border: 1px dashed var(--muted); color: var(--muted); }
.btn-demo:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: none; border-color: var(--line); color: #a4311a; }
.btn-danger:hover { border-color: #a4311a; }
.table tr.detail td { background: var(--paper); padding: 20px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.kv { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.track.fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; }
.sub { font: 600 .78rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sub:not(:first-child) { margin-top: 22px; }

.addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.addr p { color: var(--muted); font-size: .94rem; margin-top: 6px; white-space: pre-line; }
.addr .row-actions { justify-content: flex-start; margin-top: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .96rem; margin: 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--muted); }
.pick { display: grid; gap: 10px; }
.pick > label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; margin: 0; font-weight: 400; font-size: .96rem; }
.pick > label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pick input { width: 18px; height: 18px; accent-color: var(--brand); }
.pick small { display: block; color: var(--muted); }
.pick b.cost { font: 700 1.1rem var(--display); white-space: nowrap; }
.build > .card + .card { margin-top: 16px; }
.build h2 { font-size: 1.25rem; margin-bottom: 16px; }
.mini { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.mini:first-of-type { border-top: 0; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: .76rem; font-weight: 600; color: var(--muted); margin: 6px 6px 0 0; }

.wh-addr { display: grid; gap: 0; }
.wh-addr .copy-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.wh-addr .copy-row:first-child { border-top: 0; }
.wh-addr .copy-row span { color: var(--muted); font-size: .88rem; }
.wh-addr .copy-row b { font-weight: 600; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.copy-btn:hover { border-color: var(--ink); }
.copy-btn .ico { width: 15px; height: 15px; }
.locked { position: relative; }
.locked .wh-addr { filter: blur(5px); user-select: none; pointer-events: none; }
.locked .lock-cta { position: absolute; inset: 0; display: grid; place-items: center; }
.events { list-style: none; margin: 18px 0 0; padding: 0; }
.events li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.events li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.events li.done::before { background: var(--brand); }
.events time { color: var(--muted); font-size: .86rem; }
.restrict { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.restrict ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: .94rem; }

@media (max-width: 960px) {
  .ways, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .restrict { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .cur { padding: 0 24px 0 10px; background-position: right 8px center; }
  .bar { gap: 10px; } .bar-actions { gap: 6px; }
  .wh-addr .copy-row { grid-template-columns: minmax(0, 1fr) auto; } .wh-addr .copy-row span { grid-column: 1 / -1; }
  .pick > label { grid-template-columns: auto minmax(0, 1fr); } .pick b.cost { grid-column: 2; }
  .track.fit { grid-auto-flow: row; }
}

/* live listings and search */
img.photo { aspect-ratio: 1; object-fit: cover; background: var(--sunk); }
.opt-row button { max-width: 100%; text-align: left; }
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.item-card { padding: 12px; text-decoration: none; display: block; }
.item-card:hover { border-color: var(--brand); }
.item-card h3 { font: 500 .92rem/1.35 var(--body); letter-spacing: 0; margin: 10px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-card b { font: 700 1.1rem var(--display); }

/* language and currency pickers */
.prefs { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.nav { align-items: center; }
:lang(zh) { --display: "Bricolage Grotesque", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; --body: "DM Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; line-height: 1.25; }
:lang(zh) .eyebrow, :lang(zh) .table th, :lang(zh) .foot h4, :lang(zh) .sub { letter-spacing: .06em; }
@media (max-width: 1100px) and (min-width: 961px) { .nav a { padding: 8px 9px; font-size: .9rem; } .bar { gap: 12px; } }
@media (max-width: 960px) { .nav { align-items: stretch; } .prefs { margin: 10px 14px 0; } }

/* photo review, staff back office */
.banner-info { background: var(--info-bg); color: var(--info); }
.review { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--ink); font-size: .94rem; }
.review p { margin-bottom: 12px; }
.photos a { display: block; }
.admin .site-header .bar { min-height: 60px; }
.admin-h { font-size: 1.25rem; margin: 30px 0 14px; }
.job { margin-bottom: 14px; }
.job-head { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.job-head:not(:has(> .art)) { grid-template-columns: minmax(0, 1fr) auto; }
.job-head h3 { font: 600 1rem/1.35 var(--body); letter-spacing: 0; }
.job-head p { margin-top: 3px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.job-form { margin-top: 12px; padding: 14px; border-radius: var(--r-sm); background: var(--paper); }
.job-form .row-actions { align-items: center; }
.input-sm { padding: 7px 10px; font-size: .9rem; width: auto; min-width: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form .input-sm { width: 110px; }
.hist { border: 0 !important; margin-top: 8px; }
.hist summary { font: 600 .84rem var(--body); padding: 6px 0; color: var(--muted); }
.hist summary::after { content: none; }
.shot { position: relative; display: block; }
.shot button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(20, 33, 28, .8); color: #fff; cursor: pointer; line-height: 1; }
@media (max-width: 620px) { .job-head { grid-template-columns: 56px minmax(0, 1fr); } .job-side { grid-column: 1 / -1; } .inline-form { flex-wrap: wrap; } }

/* the full menu needs room: below this width it folds into the menu button */
.nav a { white-space: nowrap; }
@media (max-width: 1180px) {
  .nav-toggle { display: grid; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 10px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .prefs { margin: 10px 14px 0; }
}

/* staff reports */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filters .input { width: auto; flex: 1 1 260px; } .filters select.input { flex: 0 1 200px; }
.stat .hint { margin-top: 8px; }
div.stat b { margin-top: 0; }
.chart { margin: 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.plot { position: relative; }
.plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.plot .bar path { fill: var(--brand); }
.plot .bar:hover path { fill: var(--brand-deep); }
.plot .bar:hover rect { fill: var(--sunk); }
.plot line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot .tip { position: absolute; top: -8px; background: var(--ink); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: .82rem; white-space: nowrap; pointer-events: none; }
.axis { display: flex; justify-content: space-between; margin-top: 6px; }
.chart .hist .card { padding: 12px; margin-top: 8px; max-height: 260px; overflow: auto; }
.admin .tabs a { padding: 9px 10px; }

/* ---------- staff console: sidebar layout, dark by default (add .light to the body for the light palette) ---------- */
body.admin { display: block; }
body.admin:not(.light) {
  --paper: #0d0f16; --surface: #161924; --sunk: #1e2230; --ink: #e9ebf3; --muted: #8b91a6; --line: #272c3c; --field: #10131b;
  --brand: #f0388a; --brand-deep: #d32475;
  --ok-bg: #10382a; --ok: #6fe0a4; --info-bg: #162a4c; --info: #8fbaff; --warn-bg: #3b2b0c; --warn: #ffc766; --mute-bg: #252a38; --mute: #a3a9bb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
body.admin.light { --field: #fff; }
.admin .logo-mark rect { fill: #12493a; }
.admin:not(.light) .logo-word, .admin:not(.light) .logo-word b { color: #fff; }
.admin .input, .admin select.input, .admin textarea.input, .admin .cur { background-color: var(--field); color: var(--ink); }
.admin:not(.light) .cur { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23e9ebf3' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m3 4.500 3 3 3-3'/%3E%3C/svg%3E"); }
.admin:not(.light) .toast, .admin:not(.light) .plot .tip { background: #000; color: #fff; border: 1px solid var(--line); }
.admin:not(.light) .error, .admin:not(.light) .btn-danger { color: #ff8f7a; }
.admin:not(.light) .amount-pos { color: var(--ok); }
.admin:not(.light) .btn-dark:hover { background: var(--brand-deep); }
.admin:not(.light) .chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.admin:not(.light) .review { background: var(--warn-bg); }

.adm { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 0 10px 20px; }
.side-brand { display: flex; align-items: center; height: 60px; padding: 0 8px; text-decoration: none; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); font: 500 .93rem var(--body); text-decoration: none; text-align: left; }
.side-item:hover { background: var(--sunk); }
.side-item.on { color: var(--brand); }
.side-item .ico { width: 18px; height: 18px; }
.side-item span { flex: 1; }
.chev { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .7; margin-right: 4px; }
.side-item[aria-expanded="true"] .chev { transform: rotate(-135deg); }
.side-sub { display: grid; gap: 2px; padding: 2px 0 6px; }
.side-sub a { padding: 8px 10px 8px 38px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.side-sub a:hover { color: var(--ink); background: var(--sunk); }
.side-sub a[aria-current] { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); font-weight: 600; }
.adm-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.adm-top .icon-btn { width: 38px; height: 38px; background: none; border-color: transparent; }
.adm-top .icon-btn:hover { background: var(--sunk); border-color: transparent; }
.adm-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--sunk); color: var(--muted); width: min(280px, 34vw); }
.adm-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.adm-gap { flex: 1; }
.adm-crumb { padding: 12px 24px; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.adm-crumb b { color: var(--brand); font-weight: 600; }
.adm-main > main { padding: 22px 24px 60px; }
.side-closed .adm { grid-template-columns: minmax(0, 1fr); } .side-closed .side { display: none; }
.scrim { display: none; }
.kpi h3 { font-size: 1.02rem; }
.kpi-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font-size: .9rem; color: var(--muted); }
.kpi-row > b { font: 600 1.7rem/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.kpi-row .ico { width: 30px; height: 30px; color: var(--info); }
.kpi-row span b { color: var(--ink); font-weight: 600; }
.plot path.fill { fill: color-mix(in srgb, var(--info) 30%, transparent); }
.plot path.stroke { fill: none; stroke: var(--info); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plot line.grid { stroke: var(--line); stroke-dasharray: 3 4; }
.admin .stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 960px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .18s; }
  .side-open .side { transform: none; }
  .side-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .5); }
  .adm-top { padding: 0 10px; gap: 4px; } .adm-me, .adm-full { display: none; }
  .adm-main > main { padding: 16px 12px 60px; } .adm-crumb { padding: 10px 14px; }
}

/* manual order: an item we could only partly read */
.found { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px; margin-bottom: 20px; border-radius: var(--r-sm); background: var(--sunk); }
@media (max-width: 620px) { .found { grid-template-columns: 72px minmax(0, 1fr); } }

/* warehouse console: scan screens, parcel lists by line, open-page tabs */
.scan-form { max-width: 860px; }
.scan-form .input[data-scan] { font-size: 1.1rem; }
.scan-out { max-width: 860px; margin-top: 14px; padding: 16px 20px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok); font-size: 1.15rem; border: 1px solid currentColor; }
.scan-out.bad { background: var(--warn-bg); color: var(--warn); }
.scan-out p + p { margin-top: 6px; }
.plist { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.lines { display: grid; gap: 6px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.line-b { text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none; color: var(--ink); cursor: pointer; font-size: .9rem; }
.line-b:hover { background: var(--sunk); }
.line-b.on { background: var(--info); color: #06121f; font-weight: 600; }
.thumb { width: 64px; }
.adm-crumb { display: flex; gap: 6px; overflow-x: auto; padding: 8px 20px; }
.adm-tab { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 8px; white-space: nowrap; font-size: .86rem; border: 1px solid transparent; }
.adm-tab a { text-decoration: none; color: var(--muted); }
.adm-tab.on { background: color-mix(in srgb, var(--brand) 14%, transparent); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.adm-tab.on a { color: var(--brand); font-weight: 600; }
.adm-tab button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.adm-tab button:hover { background: var(--sunk); color: var(--ink); }
.admin a.stat span { order: -1; }
@media (max-width: 960px) { .plist { grid-template-columns: minmax(0, 1fr); } .lines { display: flex; flex-wrap: wrap; } }
