/* ==========================================================================
   base.css — structure only.
   Palette, type and the signature device live in each store's theme.css.
   Everything here reads from custom properties so a theme can restyle a
   component without touching layout.
   ========================================================================== */

*, *::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-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: var(--display-weight, 700);
  line-height: 1.12;
  letter-spacing: var(--display-tracking, -0.02em);
  margin: 0 0 .5em;
  color: var(--ink-strong, var(--ink));
}
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.3rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.4rem); }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }

a { color: var(--link, var(--primary)); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus, var(--accent));
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */

.wrap { width: min(1220px, 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(1220px, 100% - 1.6rem); } }

.stack     { padding-block: clamp(2.6rem, 1.4rem + 4vw, 5rem); }
.stack--sm { padding-block: clamp(1.8rem, 1.2rem + 2vw, 3rem); }
.stack--flush-top { padding-top: 0; }

.grid {
  display: grid; gap: var(--card-gap, 1.4rem);
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 236px), 1fr));
}
.grid--wide { --card-min: 290px; }

.split { display: grid; gap: clamp(1.5rem, 4vw, 3.4rem); }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr .95fr; align-items: start; } }
@media (min-width: 900px) { .split--sidebar { grid-template-columns: 250px 1fr; } }

.section-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: end; justify-content: space-between;
  margin-bottom: clamp(1.3rem, 1rem + 1vw, 2.1rem);
}
.section-head p { margin: 0; }
.section-head h2 { margin: 0; }

.eyebrow {
  font-family: var(--font-util, var(--font-body));
  font-size: .68rem; font-weight: 600;
  letter-spacing: var(--eyebrow-tracking, .16em);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .5rem;
}

/* ---------- header ---------- */

.announce {
  background: var(--announce-bg, var(--primary));
  color: var(--announce-ink, #fff);
  font-size: .78rem; letter-spacing: .02em;
}
.announce__in { display: flex; justify-content: space-between; gap: 1rem; padding: 7px 0; }
.announce a { color: inherit; text-decoration: none; font-weight: 600; }

.hdr {
  position: sticky; top: 0; z-index: 60;
  background: var(--hdr-bg, var(--surface));
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1.4) blur(8px);
}
.hdr__in {
  display: grid; align-items: center; gap: 1rem;
  grid-template-columns: auto 1fr auto;
  padding: .7rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand__txt  { display: grid; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display); font-size: 1.24rem;
  font-weight: var(--brand-weight, 700); letter-spacing: -.02em; color: var(--ink-strong, var(--ink));
}
.brand__sub {
  font-family: var(--font-util, var(--font-body));
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}

.nav { display: flex; gap: clamp(.7rem, 1.6vw, 1.6rem); justify-self: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 500;
  padding: .4rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { border-bottom-color: var(--primary); font-weight: 600; }

.utils { display: flex; align-items: center; gap: .55rem; }
.util {
  display: inline-flex; align-items: center; gap: .35rem;
  text-decoration: none; color: var(--ink); font-size: .82rem; font-weight: 500;
  padding: .42rem .6rem; border-radius: var(--radius-sm, 8px);
}
.util:hover { background: var(--tint); }
.util svg { width: 19px; height: 19px; }
.util span { display: none; }
@media (min-width: 1080px) { .util span { display: inline; } }
.pill {
  background: var(--accent); color: var(--accent-ink, #111);
  font-size: .66rem; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}

.searchbox { display: none; position: relative; }
@media (min-width: 960px) { .searchbox { display: block; } }
.searchbox input {
  width: 190px; padding: .48rem 2.1rem .48rem .8rem;
  border: 1px solid var(--rule); border-radius: var(--radius-pill, 999px);
  background: var(--bg); font-size: .84rem; transition: width .2s ease;
}
.searchbox input:focus { width: 240px; }
.searchbox button {
  position: absolute; right: 3px; top: 50%; translate: 0 -50%;
  background: none; border: 0; cursor: pointer; padding: .35rem; color: var(--muted);
}
.searchbox svg { width: 16px; height: 16px; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.burger span {
  display: block; width: 21px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: .22s;
}
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .hdr__in { grid-template-columns: auto 1fr; }
  .burger { display: block; order: 3; }
  .utils { order: 2; justify-self: end; }
  .nav {
    order: 4; grid-column: 1 / -1;
    display: none; flex-direction: column; gap: 0;
    border-top: 1px solid var(--rule); padding-top: .5rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .2rem; border-bottom: 1px solid var(--rule); }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: var(--btn-pad, .78rem 1.5rem);
  border-radius: var(--radius-btn, 10px);
  border: 1px solid transparent;
  font-family: var(--font-util, var(--font-body));
  font-size: .88rem; font-weight: 600; letter-spacing: var(--btn-tracking, .01em);
  text-decoration: none; cursor: pointer;
  transition: transform .14s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--on-primary, #fff); }
.btn--primary:hover { background: var(--primary-hi, var(--primary)); box-shadow: var(--btn-shadow, 0 6px 18px rgb(0 0 0 / .16)); }
.btn--accent  { background: var(--accent); color: var(--accent-ink, #111); }
.btn--ghost   { background: transparent; color: var(--ink); border-color: var(--rule-strong, var(--rule)); }
.btn--ghost:hover { background: var(--tint); }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--rule-strong, var(--rule)); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm  { padding: .5rem .9rem; font-size: .8rem; }
.btn--lg  { padding: .95rem 2rem; font-size: .95rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn--disabled { opacity: .5; pointer-events: none; }

/* ---------- forms ---------- */

.field { display: grid; gap: .34rem; margin-bottom: 1rem; }
.field > label, .lbl {
  font-family: var(--font-util, var(--font-body));
  font-size: .74rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.input, input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: .72rem .85rem;
  border: 1px solid var(--rule-strong, var(--rule));
  border-radius: var(--radius-sm, 8px);
  background: var(--surface); color: var(--ink); font-size: .93rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
  outline: none;
}
textarea { min-height: 118px; resize: vertical; }
.field__hint { font-size: .78rem; color: var(--muted); }
.field__err  { font-size: .78rem; color: var(--danger, #b3261e); font-weight: 600; }
.row2 { display: grid; gap: 0 1rem; }
@media (min-width: 620px) { .row2 { grid-template-columns: 1fr 1fr; } }
.row3 { display: grid; gap: 0 1rem; }
@media (min-width: 620px) { .row3 { grid-template-columns: 1fr 1fr 1fr; } }

.check { display: flex; gap: .6rem; align-items: start; font-size: .87rem; line-height: 1.5; }
.check input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--primary); }

/* ---------- flashes & notices ---------- */

.flashes { padding-top: 1rem; }
.flash {
  padding: .8rem 1rem; border-radius: var(--radius-sm, 8px);
  border-left: 4px solid var(--primary); background: var(--tint);
  font-size: .89rem; margin-bottom: .6rem;
}
.flash--error { border-left-color: var(--danger, #b3261e); background: color-mix(in srgb, var(--danger, #b3261e) 8%, var(--surface)); }
.flash--warn  { border-left-color: var(--warn, #b26a00);  background: color-mix(in srgb, var(--warn, #b26a00) 10%, var(--surface)); }
.flash--ok    { border-left-color: var(--ok, #2f7c48);    background: color-mix(in srgb, var(--ok, #2f7c48) 10%, var(--surface)); }

.notice {
  padding: 1rem 1.1rem; border-radius: var(--radius-sm, 8px);
  background: var(--tint); border: 1px solid var(--rule);
  font-size: .87rem; line-height: 1.6;
}
.notice--tax { border-left: 3px solid var(--accent); }
.notice strong { color: var(--ink-strong, var(--ink)); }

.empty {
  text-align: center; padding: clamp(2.4rem, 6vw, 4.5rem) 1.2rem;
  border: 1px dashed var(--rule-strong, var(--rule)); border-radius: var(--radius-lg, 14px);
  background: var(--surface);
}

/* ---------- badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-util, var(--font-body));
  font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .26rem .55rem; border-radius: var(--radius-xs, 5px);
  background: var(--tint); color: var(--muted);
}
.badge--ok    { background: color-mix(in srgb, var(--ok, #2f7c48) 15%, transparent); color: var(--ok, #2f7c48); }
.badge--low   { background: color-mix(in srgb, var(--warn, #b26a00) 16%, transparent); color: var(--warn, #b26a00); }
.badge--out   { background: color-mix(in srgb, var(--danger, #b3261e) 12%, transparent); color: var(--danger, #b3261e); }
.badge--tax   { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink-strong, var(--ink)); }

/* ---------- tables ---------- */

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th {
  text-align: left; font-family: var(--font-util, var(--font-body));
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: .6rem .7rem;
  border-bottom: 2px solid var(--rule-strong, var(--rule)); white-space: nowrap;
}
.table td { padding: .72rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table tbody tr:hover { background: var(--tint); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--tight td, .table--tight th { padding: .5rem .55rem; }

/* ---------- product card shared skeleton ---------- */

.pcard { position: relative; display: flex; flex-direction: column; }
.pcard__media { display: block; overflow: hidden; position: relative; }
.pcard__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.pcard:hover .pcard__media img { transform: scale(1.045); }
.pcard__body { display: flex; flex-direction: column; flex: 1; }
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.pcard__price b { font-variant-numeric: tabular-nums; }

/* ---------- product page ---------- */

.gallery__main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg, 14px); }
.speclist { display: grid; gap: 0; margin: 0; }
.speclist div { display: grid; grid-template-columns: 40% 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.speclist dt { font-size: .82rem; color: var(--muted); }
.speclist dd { margin: 0; font-size: .89rem; font-weight: 500; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule-strong, var(--rule)); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.qty button { background: var(--surface); border: 0; width: 38px; height: 42px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.qty button:hover { background: var(--tint); }
.qty input { width: 50px; height: 42px; border: 0; border-inline: 1px solid var(--rule); text-align: center; padding: 0; font-variant-numeric: tabular-nums; }

/* ---------- cart & checkout ---------- */

.summary { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg, 14px); padding: 1.3rem; }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; font-size: .9rem; }
.summary__row--total { border-top: 2px solid var(--rule-strong, var(--rule)); margin-top: .5rem; padding-top: .8rem; font-size: 1.08rem; font-weight: 700; }
.summary__row .num { font-variant-numeric: tabular-nums; }

.lineitem { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.lineitem img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm, 8px); }

.paychoice { display: grid; gap: .7rem; }
.paychoice label {
  display: flex; gap: .8rem; align-items: start; cursor: pointer;
  border: 1.5px solid var(--rule-strong, var(--rule)); border-radius: var(--radius-md, 11px);
  padding: 1rem; background: var(--surface); transition: border-color .16s, background .16s;
}
.paychoice label:has(input:checked) { border-color: var(--primary); background: var(--tint); }
.paychoice input { margin-top: 3px; accent-color: var(--primary); width: 17px; height: 17px; flex: none; }
.paychoice .t { font-weight: 600; font-size: .93rem; }
.paychoice .d { font-size: .8rem; color: var(--muted); }

.steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.6rem; font-size: .76rem; }
.steps span { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.steps span::after { content: "›"; margin-left: .3rem; opacity: .5; }
.steps span:last-child::after { content: ""; }
.steps .on { color: var(--primary); font-weight: 700; }

/* ---------- order timeline ---------- */

.timeline { display: grid; gap: 0; margin: 1.2rem 0; }
.tl { display: grid; grid-template-columns: 26px 1fr; gap: .9rem; position: relative; padding-bottom: 1.2rem; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 12px; top: 22px; bottom: -4px; width: 2px; background: var(--rule); }
.tl:last-child::before { display: none; }
.tl__dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--rule-strong, var(--rule)); font-size: .7rem; z-index: 1; }
.tl--done .tl__dot { background: var(--ok, #2f7c48); border-color: var(--ok, #2f7c48); color: #fff; }
.tl--now  .tl__dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.tl__t { font-weight: 600; font-size: .9rem; }
.tl__d { font-size: .79rem; color: var(--muted); }

/* ---------- policy / prose ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2rem; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1em; }
.prose li { margin-bottom: .45rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .88rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .6rem .7rem; text-align: left; }
.prose th { background: var(--tint); font-weight: 600; }
.prose__toc { position: sticky; top: 92px; font-size: .87rem; }
.prose__toc a { display: block; padding: .34rem 0; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; padding-left: .7rem; }
.prose__toc a:hover, .prose__toc a.on { color: var(--primary); border-left-color: var(--primary); }

/* ---------- footer ---------- */

.foot { background: var(--foot-bg, var(--ink)); color: var(--foot-ink, #e9e6df); margin-top: clamp(3rem, 8vw, 6rem); }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__grid { display: grid; gap: 2rem; padding: clamp(2.4rem, 5vw, 3.8rem) 0 2rem; }
@media (min-width: 720px) { .foot__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr 1.5fr; } }
.foot h4 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--foot-head, #fff); margin: 0 0 .9rem; font-family: var(--font-util, var(--font-body)); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .86rem; }
.foot__brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--foot-head, #fff); margin-bottom: .8rem; }
.foot__blurb { font-size: .87rem; opacity: .82; max-width: 34ch; }
.foot__legalname { font-size: .76rem; opacity: .62; letter-spacing: .04em; }
.foot address { font-style: normal; display: grid; gap: .7rem; font-size: .84rem; }
.foot__ico { display: grid; grid-template-columns: 16px 1fr; gap: .55rem; align-items: start; opacity: .86; }
.foot__ico svg { width: 15px; height: 15px; margin-top: 3px; }

.foot__legal { border-top: 1px solid rgb(255 255 255 / .13); padding: 1.4rem 0 2.2rem; display: grid; gap: 1.1rem; }
.foot__ids { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .76rem; opacity: .82; }
.foot__ids strong { opacity: .6; font-weight: 500; }
.foot__pay { display: grid; gap: .5rem; font-size: .76rem; }
.foot__pay > span { opacity: .6; letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; }
.foot__paylist { display: flex; flex-wrap: wrap; gap: .4rem; }
.foot__paylist b { font-weight: 600; font-size: .72rem; padding: .3rem .6rem; border: 1px solid rgb(255 255 255 / .2); border-radius: 5px; opacity: .9; }
.foot__secure { display: flex; gap: .45rem; align-items: start; opacity: .7; font-size: .75rem; margin: .3rem 0 0; max-width: 76ch; }
.foot__secure svg { flex: none; margin-top: 3px; }
.foot__base { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; justify-content: space-between; font-size: .78rem; opacity: .8; }
.foot__mini { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.foot__tax { font-size: .72rem; opacity: .55; max-width: 96ch; margin: 0; line-height: 1.6; }

/* ---------- admin ---------- */

.adm { display: grid; min-height: 100vh; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 900px) { .adm { grid-template-columns: 232px 1fr; } }
.adm__side { background: var(--ink); color: #e8e6e0; padding: 1.2rem 0; }
.adm__brand { padding: 0 1.2rem 1.1rem; font-family: var(--font-display); font-size: 1.05rem; color: #fff; border-bottom: 1px solid rgb(255 255 255 / .12); margin-bottom: .8rem; }
.adm__brand small { display: block; font-family: var(--font-util, var(--font-body)); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .55; margin-top: .2rem; }
.adm__nav { display: grid; gap: 1px; }
.adm__nav a { padding: .6rem 1.2rem; color: #cfcdc6; text-decoration: none; font-size: .86rem; display: flex; justify-content: space-between; gap: .5rem; }
.adm__nav a:hover { background: rgb(255 255 255 / .07); color: #fff; }
.adm__nav a.on { background: var(--primary); color: #fff; font-weight: 600; }
.adm__nav .grp { padding: 1rem 1.2rem .35rem; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .45; }
.adm__nav .n { background: rgb(255 255 255 / .16); border-radius: 9px; padding: 0 6px; font-size: .68rem; }
.adm__main { padding: clamp(1.2rem, 3vw, 2rem); min-width: 0; }
.adm__head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.adm__head h1 { margin: 0; font-size: 1.5rem; }

.kpis { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); margin-bottom: 1.6rem; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-md, 11px); padding: .95rem 1.05rem; }
.kpi b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi--alert b { color: var(--danger, #b3261e); }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-md, 11px); padding: 1.2rem; margin-bottom: 1.3rem; }
.panel > h2, .panel > h3 { margin-top: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.filters .field { margin: 0; min-width: 140px; }

.chip { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .24rem .5rem; border-radius: 5px; background: var(--tint); color: var(--muted); }
.chip--Paid, .chip--Successful, .chip--Delivered, .chip--Approved, .chip--Completed { background: color-mix(in srgb, var(--ok, #2f7c48) 16%, transparent); color: var(--ok, #2f7c48); }
.chip--Failed, .chip--Cancelled, .chip--Rejected { background: color-mix(in srgb, var(--danger, #b3261e) 13%, transparent); color: var(--danger, #b3261e); }
.chip--Pending, .chip--Initiated, .chip--Packing, .chip--Open { background: color-mix(in srgb, var(--warn, #b26a00) 15%, transparent); color: var(--warn, #b26a00); }
.chip--Shipped { background: color-mix(in srgb, var(--info, #2c5f9e) 15%, transparent); color: var(--info, #2c5f9e); }

/* ---------- invoice (screen + print) ---------- */

.inv { background: #fff; color: #111; max-width: 820px; margin: 2rem auto; padding: 2.4rem; border: 1px solid #ddd; }
.inv__head { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border-bottom: 3px solid #111; padding-bottom: 1.2rem; margin-bottom: 1.4rem; }
.inv__title { font-size: 1.5rem; margin: 0 0 .3rem; letter-spacing: .04em; text-transform: uppercase; }
.inv__meta { text-align: right; font-size: .84rem; line-height: 1.7; }
.inv__parties { display: grid; gap: 1.6rem; margin-bottom: 1.4rem; font-size: .85rem; line-height: 1.6; }
@media (min-width: 620px) { .inv__parties { grid-template-columns: 1fr 1fr; } }
.inv__parties h4 { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #666; margin: 0 0 .4rem; }
.inv table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.inv th { background: #f2f2ef; text-align: left; padding: .55rem .6rem; border: 1px solid #ddd; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.inv td { padding: .55rem .6rem; border: 1px solid #ddd; vertical-align: top; }
.inv .num { text-align: right; font-variant-numeric: tabular-nums; }
.inv__totals { margin-left: auto; margin-top: 1rem; width: min(340px, 100%); }
.inv__totals td { border: 0; padding: .3rem .2rem; }
.inv__totals tr:last-child td { border-top: 2px solid #111; font-weight: 700; font-size: 1rem; padding-top: .5rem; }
.inv__words { margin-top: 1rem; font-size: .82rem; }
.inv__foot { margin-top: 2rem; border-top: 1px solid #ddd; padding-top: 1rem; font-size: .75rem; color: #555; line-height: 1.6; }
.inv__actions { max-width: 820px; margin: 1.4rem auto 0; display: flex; gap: .6rem; }

@media print {
  .announce, .hdr, .foot, .inv__actions, .skip { display: none !important; }
  body { background: #fff; }
  .inv { margin: 0; border: 0; padding: 0; max-width: none; }
  a { text-decoration: none; color: #111; }
}

/* ---------- reveal-on-scroll ---------- */

/* Scoped to .js so content is never hidden when scripting is unavailable —
   a crawler, a reader with JS off, or a failed script must still see the page. */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; } }

/* ---------- utilities ---------- */

.mono { font-family: var(--font-util, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt1 { margin-top: .6rem; } .mt2 { margin-top: 1.2rem; } .mt3 { margin-top: 2rem; }
.hide { display: none; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- hero stat chip ----------
   Sits over the hero image in all four themes. Constrained here rather than
   per-theme so a long caption wraps inside the chip instead of spilling out
   of its background. */
.hero__stat {
  max-width: min(15rem, 62vw);
  box-sizing: border-box;
}
.hero__stat span {
  display: block;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  /* On a narrow screen the chip stops overlapping and just sits under the image. */
  .hero__stat { position: static; margin-top: .8rem; rotate: none; max-width: none; }
}
