/* Shared structure. Each theme file sets the tokens below and adds its own signature pieces.
   Breakpoints: phone < 720px, tablet 720–1023px, desktop >= 1024px. */
:root {
  --bg: #fff; --surface: #fff; --alt: #f3f5fa; --fg: #0b1033; --muted: #5b6280; --line: #dce0ec;
  --accent: #2b3bff; --accent-fg: #fff; --cta: #2b3bff; --cta-fg: #fff; --hi: #ffc6d6;
  --display: system-ui, sans-serif; --body: system-ui, sans-serif;
  --display-weight: 700; --display-case: none; --display-track: -0.02em; --display-lh: 1;
  --radius: 14px; --radius-lg: 28px;
  --gutter: clamp(16px, 4.5vw, 56px);
  --max: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 16px; z-index: 20; background: var(--surface); padding: 8px 14px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Type */
h1, h2, h3, .display {
  font-family: var(--display); font-weight: var(--display-weight); text-transform: var(--display-case);
  letter-spacing: var(--display-track); line-height: var(--display-lh); margin: 0; text-wrap: balance;
}
h1 { font-size: clamp(40px, 7.2vw, 92px); }
h2 { font-size: clamp(30px, 4.6vw, 60px); margin-bottom: 18px; }
h3 { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.2; margin-bottom: 6px; }
p { margin: 0 0 1em; max-width: 40em; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 32em; margin-top: 18px; }
.small { font-size: 14px; color: var(--muted); }

/* Sections */
.sec { padding: clamp(56px, 8vw, 120px) 0; }
.sec.alt { background: var(--alt); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 40px; margin-bottom: clamp(24px, 4vw, 48px); }
.sec-head h2 { margin: 0; max-width: 16ch; }
.sec-head p { margin: 0; color: var(--muted); max-width: 30em; }

/* Grids */
.g2, .g3, .g4 { display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 720px) {
  .g2 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) { .g4 { grid-template-columns: repeat(4, 1fr); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; border: 2px solid var(--cta);
  background: var(--cta); color: var(--cta-fg); font-weight: 700; font-size: 17px; text-decoration: none;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Site header */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg, var(--bg)); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-size: 16px; }
.nav nav a { text-decoration: none; }
.nav nav a:hover, .nav nav a[aria-current] { text-decoration: underline; }
.nav .btn { min-height: 42px; padding: 0 20px; font-size: 15px; }
@media (max-width: 560px) { .nav .btn { display: none; } .brand span { display: none; } }

/* Landing header: brand only, nothing to wander off to */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.top-note { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .top-note { display: none; } }

/* Media frames */
.frame { border-radius: var(--radius-lg); overflow: hidden; background: var(--alt); }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.cutout { background: #fff; border-radius: var(--radius-lg); }
.cutout img { width: 100%; aspect-ratio: 1; object-fit: contain; }

/* Buy box */
.buy { background: var(--surface); color: var(--fg); border: 2px solid var(--fg); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 32px); }
.buy h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 16px; }
.opts { display: grid; gap: 12px; }
.opt {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 2px 14px; align-items: center; width: 100%;
  text-align: left; padding: 12px 14px 12px 10px; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s;
}
.opt img { grid-row: span 3; width: 80px; height: 80px; object-fit: contain; background: #fff; border-radius: calc(var(--radius) - 4px); }
.opt:hover { border-color: var(--accent); }
.opt[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--opt-on, var(--alt)); }
.opt-name { font-weight: 800; font-size: 18px; }
.opt-price { font-weight: 800; font-size: 18px; grid-column: 3; grid-row: 1; }
.opt-fit, .opt-size { grid-column: 2 / 4; font-size: 14px; color: var(--muted); line-height: 1.35; }
.opt-size { font-size: 13px; }
.tag { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--hi); color: var(--fg); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.price-big { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(30px, 3.4vw, 40px); line-height: 1; margin: 14px 0 4px; }
.addon { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 12px 14px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; font-size: 15px; }
.addon input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.addon img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 8px; flex: none; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 6px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; }
.qty button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; font-weight: 700; border-radius: 999px; }
.qty output { min-width: 26px; text-align: center; font-weight: 800; }
.total { margin: 0; font-size: 14px; color: var(--muted); text-align: right; }
.total strong { display: block; color: var(--fg); font-size: 26px; font-family: var(--display); font-weight: var(--display-weight); }
.pay { margin-top: 16px; min-height: 56px; }
.pay:empty { min-height: 0; margin: 0; }
.pay-msg { margin: 10px 0 0; font-size: 15px; }
.pay-msg.err { color: #c4320a; }
.assure { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.done h2 { color: var(--accent); }

/* Lists, tables, FAQ */
.fits { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.fits li { padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 15px; background: var(--surface); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: clamp(14px, 1.4vw, 16px); }
th, td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1.5px solid var(--line); vertical-align: top; }
thead th { font-family: var(--display); font-weight: var(--display-weight); font-size: 18px; text-transform: var(--display-case); }
tbody th { font-weight: 600; color: var(--muted); width: 32%; }
details { border-bottom: 1.5px solid var(--line); padding: 18px 0; }
summary { font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 26px; line-height: 1; color: var(--accent); flex: none; }
details[open] summary::after { content: '\2212'; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Scale drawing */
.scale { margin: 0; }
.scale svg { width: 100%; }
.scale text { font-family: var(--body); }
.scale figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.dim { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.dim-t { fill: var(--accent); font-size: 22px; font-weight: 700; }
.case-box { fill: var(--case, var(--fg)); }
.case-dot { fill: var(--hi); }
.phone { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.lbl { fill: var(--fg); font-size: 22px; font-weight: 700; }
.lbl-mut { fill: var(--muted); font-size: 19px; }

/* Sticky buy bar (phones and tablets) */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1.5px solid var(--line);
  transform: translateY(110%); transition: transform .2s;
}
.sticky.show { transform: none; }
.sticky .btn { min-height: 46px; font-size: 16px; padding: 0 22px; }
.sticky p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.3; }
.sticky strong { display: block; color: var(--fg); font-size: 17px; }
@media (min-width: 1024px) { .sticky { display: none; } }

/* Footer */
.foot { background: var(--foot-bg, var(--fg)); color: var(--foot-fg, #fff); padding: clamp(48px, 7vw, 88px) 0 120px; font-size: 15px; }
.foot .cols { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .foot .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot h3 { font-size: 15px; font-family: var(--body); font-weight: 700; letter-spacing: 0; margin-bottom: 12px; opacity: .7; text-transform: none; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .fine { margin-top: 48px; opacity: .6; font-size: 13px; }
.foot-brand p { opacity: .75; max-width: 26em; margin-top: 12px; }
.lp-foot { padding: 32px 0 120px; font-size: 14px; color: var(--muted); }
.lp-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Prose pages */
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 48px 0 12px; }
.prose h3 { margin-top: 24px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2em; }
