/* Jamaican Ludi — site styles */
:root {
  --ink: #14130f;
  --ink-2: #2a2823;
  --paper: #fbf8f1;
  --cream: #f3ecdd;
  --line: #e4dccb;
  --muted: #6b6457;
  --green: #1f8a47;
  --green-d: #136b35;
  --gold: #f4c20d;
  --gold-d: #d9a900;
  --red: #c8202f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,19,15,.06), 0 8px 24px rgba(20,19,15,.08);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-d); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
em { font-style: italic; }
code { font-size: .85em; }
[v-cloak] > *:not(.builder-loading):not(noscript) { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.measure { max-width: 62ch; }
.rounded { border-radius: var(--radius); }
.mt { margin-top: 1.6rem; }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: .8rem; display: inline-flex; align-items: center; gap: .5rem; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(244,194,13,.25); }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 60ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 700 1rem/1 var(--sans); padding: .95rem 1.4rem; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { padding: .6rem 1rem; font-size: .9rem; }
.btn-lg { padding: 1.1rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 var(--gold-d); }
.btn-gold:hover { color: var(--ink); background: #ffd21f; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: currentColor; }
.btn-link { background: none; border: 0; padding: 0; color: var(--green-d); font: 600 .9rem var(--sans); text-decoration: underline; cursor: pointer; }
.link-arrow { font-weight: 700; text-decoration: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,248,241,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.2rem var(--serif); color: var(--ink); text-decoration: none; }
.brand-light { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a[aria-current] { color: var(--green-d); box-shadow: inset 0 -2px var(--gold); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 22px; height: 2px; background: var(--ink); position: relative; content: ''; }
.nav-toggle .bars::before { position: absolute; top: -7px; } .nav-toggle .bars::after { position: absolute; top: 7px; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; }
  .site-nav a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 1rem; }
  .nav-toggle[aria-expanded="true"] + .site-nav { display: flex; }
}

/* Hero */
.hero { padding: clamp(2rem, 6vw, 5rem) 0; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(31,138,71,.12), transparent 60%),
  radial-gradient(900px 400px at -10% 110%, rgba(244,194,13,.18), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 em { color: var(--green); font-style: italic; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2rem; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.3rem; }
.trust li { font-size: .88rem; color: var(--muted); line-height: 1.35; }
.trust strong { display: block; color: var(--ink); font-size: 1rem; }
.hero-media { margin: 0; position: relative; }
.hero-media img { border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(20,19,15,.45); transform: rotate(1.5deg); }
.hero-media figcaption { font-size: .82rem; color: var(--muted); margin-top: 1rem; text-align: center; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 520px; margin: 0 auto; }
  .trust { grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-cream { background: var(--cream); }
.section-dark { background: var(--ink); color: #f3ecdd; }
.section-dark h2 { color: #fff; }
.section-dark .link-arrow { color: var(--gold); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head h2 { margin-bottom: .2em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.two-col figure { margin: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1rem, 3vw, 2rem); background: linear-gradient(180deg, var(--cream), var(--paper)); }

/* Anatomy */
.anatomy-media { position: relative; margin: 0; }
.anatomy-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.pins { list-style: none; margin: 0; padding: 0; }
.pins li { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(20,19,15,.85), 0 6px 14px rgba(0,0,0,.35); font-size: .95rem; }
.feature-list { padding-left: 1.4rem; margin: 0 0 1.8rem; }
.feature-list li { margin-bottom: .8rem; padding-left: .3rem; }
.feature-list li::marker { font-weight: 800; color: var(--green); }

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }
.photo-card { display: block; border-radius: var(--radius); overflow: hidden; background: #1f1d18; color: #f3ecdd; text-decoration: none; transition: transform .2s; }
.photo-card:hover { transform: translateY(-4px); color: #fff; }
.photo-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-card span { display: block; padding: 1rem 1.2rem 1.2rem; font-size: .9rem; color: #bdb4a3; }
.photo-card strong { display: block; color: #fff; font-family: var(--serif); font-size: 1.2rem; }

/* Steps (marketing) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--gold); font-weight: 800; margin-bottom: 1rem; }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* Sizes */
.size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 960px) { .size-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .size-grid { grid-template-columns: 1fr; } }
.size-card { display: flex; flex-direction: column; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.size-card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.size-swatch { width: 84px; height: 84px; display: grid; place-items: end start; margin-bottom: .8rem; }
.size-swatch span { width: calc(84px * var(--s)); height: calc(84px * var(--s)); border-radius: 6px; background:
  linear-gradient(90deg, transparent 37.5%, var(--gold) 37.5% 62.5%, transparent 62.5%),
  linear-gradient(0deg, transparent 37.5%, var(--gold) 37.5% 62.5%, transparent 62.5%), var(--green); border: 4px solid var(--ink); }
.size-name { font: 700 1.5rem var(--serif); }
.size-dim { font-size: .88rem; color: var(--muted); }
.size-price { font-size: 2rem; font-weight: 800; margin-top: .6rem; }
.size-ship { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.size-cta { margin-top: auto; padding-top: 1rem; font-weight: 700; color: var(--green-d); }

/* Tables */
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--ink); color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.size-guide dt { font-weight: 800; margin-top: 1rem; }
.size-guide dd { margin: .2rem 0 0; color: var(--muted); }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .7rem; padding: 0 1.2rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 1.1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-2); padding-bottom: 1rem; margin: 0; }

/* CTA band */
.cta-band { background: var(--green); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; background-image: linear-gradient(135deg, rgba(0,0,0,.15) 25%, transparent 25% 50%, rgba(0,0,0,.15) 50% 75%, transparent 75%); background-size: 40px 40px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin: 0; max-width: 22ch; }

/* Gallery */
.masonry { columns: 3 280px; column-gap: 1rem; }
.masonry-item { display: block; margin-bottom: 1rem; break-inside: avoid; border-radius: 12px; overflow: hidden; }
.masonry-item img { transition: transform .3s; }
.masonry-item:hover img { transform: scale(1.03); }
.gallery-set + .gallery-set { padding-top: 0; }

/* Prose / misc */
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: .4rem; }
.prose figure { margin: 0 0 2rem; }
.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 860px) { .idea-grid { grid-template-columns: 1fr; } }
.idea { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--gold); border-radius: var(--radius); padding: 1.5rem; }
.idea h2 { font-size: 1.3rem; }
.idea p { color: var(--muted); margin: 0; }
.checks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checks li { padding-left: 1.8rem; position: relative; margin-bottom: .7rem; }
.checks li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.town-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.town-list li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; }
.process { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.process img { aspect-ratio: 4/3; object-fit: cover; margin-bottom: 1rem; }
.process h2 { font-size: 1.3rem; }
@media (max-width: 860px) { .process { grid-template-columns: 1fr; } }
.notice { background: #fff6d6; border: 1px solid var(--gold); padding: 1rem; border-radius: 10px; }
.test-mode { margin: 0 0 1rem; font-size: .9rem; }
.good { color: var(--green-d); font-weight: 700; }
.err { color: var(--red); font-size: .85rem; font-weight: 600; }
.next-box { background: #fff; border: 1px dashed var(--green); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.2rem 0; font-size: .95rem; }
.next-box ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.next-box.big { font-size: 1.05rem; padding: 1.4rem 1.6rem; }

/* Footer */
.site-footer { background: var(--ink); color: #bdb4a3; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #f3ecdd; text-decoration: none; display: block; padding: .2rem 0; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { display: inline-flex; margin-bottom: 1rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-h { font: 800 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid #2f2c25; margin-top: 2.5rem; padding-top: 1.2rem; font-size: .82rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ───────── Order builder ───────── */
.builder-page { background: #f6f1e6; }
.builder-intro { padding: 2rem 0 1rem; }
.builder-intro h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .2em; }
.builder-loading { padding: 4rem 0; text-align: center; color: var(--muted); }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.5rem); padding-bottom: 4rem; align-items: start; }
.preview-sticky { position: sticky; top: 84px; }
.preview-board { background: radial-gradient(circle at 50% 40%, #fff, #ece4d3); border-radius: 20px; padding: clamp(14px, 3vw, 28px); box-shadow: var(--shadow); }
.preview-board.recoloring { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.ludi-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 24px rgba(20,19,15,.25)); user-select: none; }
.ludi-svg.recolorable .cell { cursor: crosshair; }
.ludi-svg.recolorable .cell:hover rect { stroke: #fff; stroke-width: 10; }
.ludi-svg .slot-hit { fill: transparent; cursor: pointer; }
.ludi-svg .slot-hit:hover { fill: rgba(244,194,13,.25); stroke: var(--gold); stroke-width: 10; }
.preview-hint { text-align: center; font-size: .88rem; color: var(--muted); margin: .8rem 0; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.chip { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--ink); }
.price-card { background: #fff; border-radius: var(--radius); padding: 1rem 1.2rem; border: 1px solid var(--line); }
.price-row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-size: .95rem; }
.price-row.total { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .7rem; font-weight: 800; font-size: 1.15rem; }
.price-row .free { color: var(--green-d); font-weight: 700; }

.steps-panel { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: clamp(1.2rem, 3vw, 2rem); scroll-margin-top: 84px; }
.stepper { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.stepper button { width: 100%; background: none; border: 0; padding: .5rem 0 0; border-top: 4px solid var(--line); text-align: left; cursor: pointer; font: 600 .78rem var(--sans); color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.stepper button:disabled { cursor: default; }
.stepper .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: .75rem; flex: none; }
.stepper .done button { border-color: var(--green); color: var(--ink); }
.stepper .done .n { background: var(--green); color: #fff; }
.stepper .active button { border-color: var(--gold); color: var(--ink); font-weight: 800; }
.stepper .active .n { background: var(--gold); }
@media (max-width: 560px) { .stepper .t { display: none; } .stepper .active .t { display: inline; } .stepper { grid-template-columns: repeat(5, auto); } }
.step h2 { font-size: 1.6rem; }
.step-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

.size-options { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.size-option { position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 1rem; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "sw name price" "sw dim dim" "sw ship ship"; column-gap: .9rem; align-items: center; transition: border-color .15s, background .15s; }
.size-option input { position: absolute; opacity: 0; }
.size-option.selected { border-color: var(--green); background: #f1f8f3; }
.size-option:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.size-option .size-swatch { grid-area: sw; width: 52px; height: 52px; margin: 0; }
.size-option .size-swatch span { width: calc(52px * var(--s)); height: calc(52px * var(--s)); border-width: 3px; }
.so-name { grid-area: name; font: 700 1.35rem var(--serif); }
.so-price { grid-area: price; font-weight: 800; font-size: 1.15rem; }
.so-dim { grid-area: dim; font-size: .82rem; color: var(--muted); }
.so-ship { grid-area: ship; font-size: .76rem; color: var(--muted); }
@media (max-width: 420px) { .size-options { grid-template-columns: 1fr; } }

.seg { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; padding: .55rem 1rem; border-radius: 999px; font: 600 .9rem var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.frame-dot { width: 14px; height: 14px; border-radius: 50%; }
.frame-dot.black { background: #1b1a17; } .frame-dot.natural { background: #c9a46a; }

.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; margin: 1rem 0 1.4rem; }
.palette { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: .6rem; cursor: pointer; text-align: left; font: 600 .85rem var(--sans); color: var(--ink); }
.palette.selected { border-color: var(--green); background: #f1f8f3; }
.pal-swatches { display: flex; height: 28px; border-radius: 6px; overflow: hidden; margin-bottom: .45rem; border: 1px solid rgba(0,0,0,.1); }
.pal-swatches span { flex: 1; }
.pal-swatches.inline { display: inline-flex; width: 54px; height: 16px; margin: 0 .3rem -3px 0; }
.color-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.4rem; }
.color-slot { display: flex; gap: .6rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .5rem; font-size: .78rem; line-height: 1.3; cursor: pointer; }
.color-slot input[type=color] { width: 40px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
@media (max-width: 480px) { .color-slots { grid-template-columns: 1fr; } }
.recolor-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.recolor-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.switch { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 44px; height: 26px; border-radius: 999px; background: #cfc6b3; position: relative; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; position: relative; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.swatch-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); display: grid; place-items: center; overflow: hidden; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch-custom span { color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.6); pointer-events: none; }

.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.4rem; }
.mode-card { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 1rem; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.mode-card strong { display: block; margin-bottom: .25rem; }
.mode-card span { font-size: .85rem; color: var(--muted); }
.mode-card.selected { border-color: var(--green); background: #f1f8f3; }
@media (max-width: 480px) { .mode-cards { grid-template-columns: 1fr; } }
.upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: .8rem; }
.upload-slot { border: 2px dashed var(--line); border-radius: 12px; padding: .7rem; background: var(--paper); transition: border-color .15s, background .15s; min-width: 0; }
.upload-slot.filled { border-style: solid; border-color: #b9dcc5; background: #f4faf6; }
.upload-slot.drag { border-color: var(--gold); background: #fff8dc; }
.upload-slot:last-child { grid-column: 1 / -1; }
.us-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .4rem; }
.us-file { display: grid; grid-template-columns: 44px 1fr auto; gap: .5rem; align-items: center; margin-bottom: .4rem; font-size: .82rem; }
.us-file img, .us-icon { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.us-icon { display: grid; place-items: center; background: var(--ink); color: var(--gold); font-weight: 800; font-size: .7rem; }
.us-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-progress { grid-column: 2; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.us-progress span { display: block; height: 100%; background: var(--green); transition: width .2s; }
.us-file .err { grid-column: 2 / -1; }
.us-remove { grid-column: 3; grid-row: 1; border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); padding: .2rem .4rem; }
.us-add { border: 0; background: none; font: 700 .9rem var(--sans); color: var(--green-d); cursor: pointer; padding: .3rem 0; }
@media (max-width: 330px) { .upload-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: .35rem; margin: 1rem 0 0; font-size: .9rem; font-weight: 600; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select, .field textarea { font: 400 1rem var(--sans); padding: .75rem .85rem; border: 1.5px solid #d8cfbc; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,138,71,.18); }
.field .invalid, .field textarea.invalid { border-color: var(--red); }
.field small.err:empty { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: .8rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: .8rem; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.idea-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip-btn { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .35rem .75rem; font: 600 .8rem var(--sans); cursor: pointer; color: var(--ink); }
.chip-btn:hover { border-color: var(--green); }

.review { margin: 0 0 1rem; }
.review > div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.review dt { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.review dd { margin: 0; }
.review .pre { white-space: pre-wrap; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; margin: 1rem 0 1.2rem; }
.check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.pay-box { border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
#payment-element { margin-bottom: 1.2rem; }

@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
  .preview-board { max-width: 480px; margin: 0 auto; }
  .price-card { max-width: 480px; margin: 0 auto; }
}

/* ───────── Admin ───────── */
.admin { background: #f6f1e6; }
.admin-bar { background: var(--ink); padding: .8rem 0; }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.admin-bar a { color: #f3ecdd; }
.admin-main { padding: 2rem 20px 4rem; }
.admin h1 { font-size: 1.8rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.status-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.status-filter a { padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-size: .85rem; color: var(--ink); }
.status-filter a.on { background: var(--ink); color: #fff; }
.badge { display: inline-block; font: 700 .72rem var(--sans); padding: .25rem .6rem; border-radius: 999px; background: var(--cream); color: var(--ink); vertical-align: middle; }
.badge-paid { background: #fff1b8; } .badge-proof_sent { background: #dbeafe; } .badge-approved, .badge-in_production { background: #d1fae5; }
.badge-shipped, .badge-completed { background: var(--green); color: #fff; } .badge-cancelled { background: #fde2e2; }
.badge-test { background: #7c3aed; color: #fff; }
.admin-order { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.admin-board { background: #fff; border-radius: 16px; padding: 16px; }
.file-list { list-style: none; padding: 0; }
.file-list li { padding: .5rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.admin-form { background: #fff; border-radius: 14px; padding: 1rem 1.2rem 1.2rem; margin-top: 1rem; }
.admin-form .btn { margin-top: 1rem; }
@media (max-width: 860px) { .admin-order { grid-template-columns: 1fr; } }

/* ───────── Proofs ───────── */
.flash { padding: .8rem 1rem; border-radius: 10px; font-weight: 600; }
.flash.ok { background: #e7f5ec; color: var(--green-d); }
.flash.err-flash { background: #fde2e2; color: var(--red); }
.badge-revisions_requested, .badge-proof-revisions_requested { background: #fde7c8; color: #8a4b00; }
.badge-proof-sent { background: #dbeafe; } .badge-proof-approved { background: var(--green); color: #fff; }
.badge-proof-superseded { background: #ece7dc; color: var(--muted); }
a.badge { text-decoration: none; }
.proofs-panel { background: #fff; border-radius: 16px; padding: 1.2rem; margin-bottom: 1rem; }
.proofs-panel h2 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: 1.4rem; }
.send-proof { background: var(--paper); border: 1px dashed var(--green); margin: 0 0 1.2rem; }
.send-proof h3 { margin: .2rem 0 0; font-size: 1.1rem; }
.proof-timeline { list-style: none; padding: 0; margin: 0; }
.proof-item { border: 1px solid var(--line); border-radius: 12px; padding: .9rem; margin-bottom: .8rem; }
.proof-item.status-superseded { opacity: .75; }
.proof-item-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.proof-item-body { display: grid; grid-template-columns: 96px 1fr; gap: .8rem; align-items: start; }
.proof-item-body p { margin: 0 0 .4rem; }
.proof-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--ink); color: var(--gold); font-weight: 800; text-decoration: none; }
.proof-msg { background: var(--paper); border-radius: 8px; padding: .5rem .7rem; }
.revision-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.revision-list li { border-left: 4px solid #e8a33d; background: #fff8ec; padding: .6rem .8rem; border-radius: 0 8px 8px 0; margin-bottom: .5rem; font-size: .92rem; }
.revision-list li.resolved { border-left-color: var(--line); background: var(--paper); color: var(--muted); }
.revision-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .3rem; }
.pre { white-space: pre-wrap; }

/* Customer proof page */
.proof-hero h1 { margin-bottom: .4em; }
.proof-banner { border-radius: 12px; padding: 1rem 1.2rem; max-width: 760px; }
.proof-banner.ok { background: #e7f5ec; border: 1px solid #b9dcc5; }
.proof-banner.warn { background: #fff4e0; border: 1px solid #f2c98a; }
.proof-banner.info { background: #e8f0fe; border: 1px solid #bcd0f7; }
.proof-section { padding-top: 1.5rem; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.proof-view { background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.proof-view img { width: 100%; border-radius: 10px; }
.proof-pdf { width: 100%; height: 75vh; min-height: 480px; border-radius: 10px; }
.proof-file-links { text-align: center; margin: .6rem 0 0; }
.proof-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 84px; }
.proof-note { background: #fff; border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; padding: .9rem 1.1rem; }
.proof-note.mine { border-left-color: #e8a33d; }
.proof-note p { margin: .3rem 0 0; }
.proof-note-label { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.proof-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; }
.proof-card.approve { border: 2px solid var(--green); }
.proof-card h2 { font-size: 1.3rem; margin-bottom: .2rem; }
.proof-card .btn { margin-top: 1rem; }
.proof-versions ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.proof-versions li { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.proof-versions li.current a { font-weight: 800; color: var(--ink); }
@media (max-width: 860px) { .proof-grid { grid-template-columns: 1fr; } .proof-side { position: static; } }
.send-anyway { margin-bottom: 1.2rem; }
.send-anyway summary { cursor: pointer; font-weight: 700; color: var(--green-d); padding: .4rem 0; }
.send-anyway .send-proof { margin-top: .6rem; }
.email-preview { background: #fff; border-radius: 16px; padding: 1.2rem; }
.email-frame { width: 100%; height: 900px; border: 1px solid var(--line); border-radius: 12px; background: #f3ecdd; }
.email-text { white-space: pre-wrap; background: var(--paper); padding: 1rem; border-radius: 10px; font-size: .85rem; }

/* Admin nav + login */
.admin-bar .wrap { gap: 1rem; flex-wrap: wrap; }
.admin-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; font-size: .92rem; }
.admin-nav a { color: #d8d0bf; text-decoration: none; font-weight: 600; }
.admin-nav a[aria-current] { color: #fff; box-shadow: inset 0 -2px var(--gold); }
.admin-logout { display: inline-flex; align-items: center; gap: .6rem; margin: 0; padding-left: 1rem; border-left: 1px solid #3a372f; }
.admin-logout .admin-me { color: #fff; font-weight: 700; }
.admin-logout .btn-link { color: var(--gold); }
.admin-login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); }
.login-brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.2rem var(--serif); color: var(--ink); text-decoration: none; margin-bottom: 1.2rem; }
.login-card h1 { font-size: 1.6rem; }
.login-form .btn { margin-top: 1.2rem; }
.admin-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.admin-cards h2 { font-size: 1.2rem; margin: .3rem 0 0; }
@media (max-width: 760px) { .admin-cards { grid-template-columns: 1fr; } }
.user-actions summary { cursor: pointer; list-style: none; }
.user-actions[open] { background: var(--paper); border-radius: 10px; padding: .6rem; }
.inline-form { margin: .4rem 0; }
.inline-form .field { margin-top: .2rem; }
.inline-form .btn { margin-top: .4rem; }

/* Shipping */
.shipment { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; margin-bottom: .8rem; }
.shipment-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.shipment p { margin: .4rem 0 0; }
.shipment-actions { display: flex; gap: 1rem; margin-top: .5rem; }
.shipment-actions form { margin: 0; }
.btn-link.danger { color: var(--red); }
.tracking-link { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .02em; }
.carrier-badge { font: 800 .72rem var(--sans); letter-spacing: .06em; padding: .25rem .55rem; border-radius: 6px; color: #fff; }
.carrier-ups { background: #351c15; color: #ffb500; } .carrier-usps { background: #333366; }
.carrier-fedex { background: #4d148c; color: #ff6600; } .carrier-dhl { background: #ffcc00; color: #d40511; }
.ship-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ship-form #ship-tracking { font-family: ui-monospace, Menlo, monospace; letter-spacing: .03em; }
#ship-hint:empty { display: none; }
#ship-hint { margin: .4rem 0 0; }
.shipped-banner .shipped-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: .7rem; }

/* Customer order page */
.order-hero h1 { margin-bottom: .3em; }
.order-timeline { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.order-timeline li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 0 .2rem; }
.order-timeline li::before { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 4px; background: var(--line); z-index: 0; }
.order-timeline li:first-child::before { display: none; }
.order-timeline li.step-done::before, .order-timeline li.step-current::before { background: var(--green); }
.tl-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--line); color: #fff; font-weight: 800; font-size: .9rem; }
.step-done .tl-dot { background: var(--green); border-color: var(--green); }
.step-current .tl-dot { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 6px rgba(244,194,13,.25); }
.tl-label { font-weight: 700; font-size: .85rem; line-height: 1.2; }
.step-todo .tl-label { color: var(--muted); font-weight: 600; }
.tl-date { font-size: .75rem; color: var(--muted); min-height: 1em; }
.step-current .tl-date { color: #8a6a00; font-weight: 700; }
@media (max-width: 640px) {
  .order-timeline { grid-template-columns: 1fr; gap: 0; }
  .order-timeline li { flex-direction: row; text-align: left; gap: .8rem; padding: .35rem 0; }
  .order-timeline li::before { top: -50%; left: 15px; width: 4px; height: 100%; }
  .tl-date { margin-left: auto; }
}
.order-section { padding-top: 1.5rem; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } }
.order-card { background: #fff; border-radius: 16px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.order-card h2 { font-size: 1.3rem; margin-bottom: .8rem; }
.order-proof { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; align-items: start; }
.order-proof p { margin: 0 0 .5rem; }
.order-proof-thumb { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--ink); color: var(--gold); font-weight: 800; text-decoration: none; border: 1px solid var(--line); }
.order-proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 520px) { .order-proof { grid-template-columns: 1fr; } .order-proof-thumb { max-width: 240px; } }
.order-proof-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 760px) { .order-proof-actions { grid-template-columns: 1fr; } }
.order-board { max-width: 320px; margin: 0 auto; }
.review.compact > div { grid-template-columns: 84px 1fr; padding: .55rem 0; font-size: .92rem; }
.order-help .btn { margin: .2rem 0 .6rem; }

/* ───────── Finances / expenses / manual orders ───────── */
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-title-row h1 { margin: 0; }
.badge-manual { background: #e7e2f7; color: #4b3a8f; }
.filter-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 1rem 0; }
.filter-row select, .filter-row input[type=date] { font: inherit; font-size: .9rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.seg-link { padding: .45rem .9rem; border-radius: 999px; font-weight: 600; font-size: .85rem; color: var(--ink); text-decoration: none; }
.seg-link.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-opt { padding: .45rem .9rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; display: inline-flex; gap: .4rem; align-items: center; }
.seg-opt:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.compact-table th, .compact-table td { padding: .55rem .7rem; font-size: .9rem; }
.compact-table tfoot th { background: var(--cream); }
.pnl-hero { margin: 1rem 0 1.2rem; }
.pnl-label { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.pnl-hero-value { font: 700 clamp(2.8rem, 6vw, 3.6rem)/1.05 var(--sans); letter-spacing: -.02em; margin: .2rem 0 .3rem; }
.pnl-loss { font-size: 1rem; font-weight: 700; color: var(--muted); letter-spacing: 0; vertical-align: middle; }
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
@media (max-width: 960px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: #fff; border-radius: 14px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.kpi-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi-value { font: 700 1.5rem var(--sans); color: var(--ink); }
.kpi-sub { font-size: .75rem; color: var(--muted); }
.pnl-notes { background: #fff8e6; border: 1px solid #f2d899; border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1.2rem; font-size: .9rem; }
.pnl-notes p { margin: .3rem 0; }
.pnl-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 960px) { .pnl-grid { grid-template-columns: 1fr; } }
.pnl-grid .admin-form, .pnl-orders { margin-top: 0; margin-bottom: 1rem; }
.pnl-grid h2, .pnl-orders h2 { font-size: 1.2rem; margin: .2rem 0 .2rem; }
.bar-list { list-style: none; padding: 0; margin: .6rem 0; }
.bar-row { display: grid; grid-template-columns: 9.5rem 1fr 5.5rem; align-items: center; gap: .7rem; padding: .35rem .25rem; border-radius: 6px; cursor: default; }
.bar-row:hover, .bar-row:focus { background: var(--paper); outline: none; }
.bar-name { font-size: .85rem; color: var(--ink); }
.bar-track { height: 12px; }
.bar-fill { display: block; height: 100%; background: var(--green); border-radius: 0 4px 4px 0; }
.bar-value { font-size: .85rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.chart-tip { position: absolute; z-index: 60; background: var(--ink); color: #fff; font-size: .8rem; padding: .45rem .65rem; border-radius: 8px; max-width: 320px; pointer-events: none; box-shadow: var(--shadow); }
.add-expense summary { cursor: pointer; padding: .2rem 0; }
.add-expense[open] summary { margin-bottom: .6rem; }
.alloc { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem 1rem; margin: 1rem 0; }
.alloc legend { font-weight: 800; padding: 0 .4rem; }
.alloc-modes { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.alloc-mode { border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem; cursor: pointer; font-size: .9rem; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.alloc-mode:has(input:checked) { border-color: var(--green); background: #f1f8f3; }
.order-checklist { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .6rem; background: var(--paper); }
.order-checklist label { display: flex; gap: .5rem; align-items: center; padding: .3rem 0; font-size: .88rem; border-bottom: 1px solid var(--line); }
.order-checklist label:last-child { border-bottom: 0; }
.custom-amounts label { justify-content: space-between; }
.custom-amounts input { width: 7rem; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 6px; text-align: right; }
.alloc-preview { margin: .8rem 0 0; font-weight: 600; color: var(--green-d); }
.alloc-preview:empty { display: none; }
.ship-grid.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .ship-grid.three { grid-template-columns: 1fr; } }
.manual-order .admin-form { margin-bottom: 1rem; }
.manual-order h2 { font-size: 1.15rem; margin: .2rem 0 0; }
.mo-total { display: block; font-weight: 800; font-size: 1.2rem; padding: .7rem 0; }
.delete-expense { margin-top: 1rem; }
.fin-lines { width: 100%; border-collapse: collapse; font-size: .92rem; margin: .4rem 0 .8rem; }
.fin-lines td { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.fin-lines td.num { padding-left: .8rem; }
.fin-lines tr.total td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); }
/* Let grid panels shrink so wide tables scroll inside them instead of widening the page */
.pnl-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
@media (max-width: 960px) { .pnl-grid { grid-template-columns: minmax(0, 1fr); } }
.pnl-grid > *, .kpi-row > * { min-width: 0; }
.filter-row .seg { flex-wrap: wrap; border-radius: 16px; }
.seg-link { white-space: nowrap; }
@media (max-width: 480px) { .bar-row { grid-template-columns: 7rem 1fr 4.5rem; } .kpi-value { font-size: 1.25rem; } }
@media (max-width: 520px) {
  .bar-row { grid-template-columns: 1fr auto; grid-template-areas: "name value" "track track"; row-gap: .3rem; }
  .bar-name { grid-area: name; } .bar-value { grid-area: value; } .bar-track { grid-area: track; }
}

.size-included { font-size: .8rem; font-weight: 700; color: var(--green-d); margin-top: .4rem; }
.included-note { font-size: .82rem; color: var(--green-d); font-weight: 700; margin: .5rem 0 0; text-align: center; }

/* ───────── Articles ───────── */
.preview-bar { background: #fff1b8; font-size: .9rem; padding: .6rem 0; font-weight: 600; }
.preview-bar.subtle { background: var(--cream); font-weight: 500; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.article-hero h1 { margin-top: .6rem; }
.article-meta { margin: 0; }
.article-body-wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
.article-hero-img { margin: 0 0 1.6rem; }
.article-hero-img img { border-radius: 16px; width: 100%; box-shadow: var(--shadow); }
.quick-answer { background: #f1f8f3; border-left: 5px solid var(--green); border-radius: 0 14px 14px 0; padding: 1rem 1.3rem; margin: 0 0 1.6rem; }
.quick-answer p { margin: .3rem 0 0; font-size: 1.08rem; line-height: 1.6; }
.qa-label { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green-d); }
.toc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.3rem; margin: 0 0 2rem; }
.toc ol { margin: .4rem 0 0; padding-left: 1.2rem; } .toc li { margin: .2rem 0; }
.article-content { font-size: 1.08rem; line-height: 1.75; }
.article-content h2 { margin-top: 2.4rem; scroll-margin-top: 90px; }
.article-content h3 { margin-top: 1.8rem; scroll-margin-top: 90px; }
.article-content img { border-radius: 12px; margin: 1.2rem 0; }
.article-content blockquote { margin: 1.4rem 0; padding: .8rem 1.2rem; border-left: 4px solid var(--gold); background: #fffaeb; border-radius: 0 12px 12px 0; }
.article-content blockquote p { margin: 0; }
.article-content code { background: var(--cream); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.article-faq { margin-top: 2.5rem; }
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--ink); color: #f3ecdd; border-radius: 16px; padding: 1.3rem 1.5rem; margin-top: 2.5rem; }
.article-cta strong { color: #fff; font-family: var(--serif); font-size: 1.2rem; }
.article-cta p { margin: .3rem 0 0; font-size: .95rem; max-width: 46ch; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .article-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .article-grid { grid-template-columns: 1fr; } }
.article-card { display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.article-card:hover { transform: translateY(-3px); color: var(--ink); }
.article-card img, .article-card-ph { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.article-card-ph { display: block; background: linear-gradient(135deg, var(--green) 0 33%, var(--gold) 33% 66%, var(--ink) 66%); opacity: .85; }
.article-card-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.2rem; }
.article-card-body strong { font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; }
.article-card-date { font-size: .78rem; color: var(--muted); }
.article-card-excerpt { font-size: .9rem; color: var(--ink-2); }
.pager { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 2rem; font-weight: 700; }
.article-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .article-editor { grid-template-columns: minmax(0, 1fr); } }
.editor-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; }
.editor-side .admin-form { margin: 0; } .editor-side h2 { font-size: 1.05rem; margin: .2rem 0 .5rem; }
.md-input { font-family: ui-monospace, Menlo, monospace !important; font-size: .9rem !important; line-height: 1.55; }
.md-help { background: var(--paper); border-radius: 8px; padding: .7rem; font-size: .78rem; white-space: pre-wrap; margin: 0 0 .6rem; }
.slug-row { display: flex; align-items: center; gap: .3rem; } .slug-row input { flex: 1; }
.counter { font-style: normal; font-weight: 700; margin-left: .3rem; } .counter.ok { color: var(--green-d); } .counter.over { color: var(--red); }
.serp { display: flex; flex-direction: column; gap: .1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin-top: .8rem; font-family: Arial, sans-serif; }
.serp-url { font-size: .8rem; color: #4d5156; } .serp-title { font-size: 1.15rem; color: #1a0dab; } .serp-desc { font-size: .85rem; color: #4d5156; }
.hero-thumb { max-width: 240px; border-radius: 8px; }
.editor-actions { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .6rem; }
.media-item { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--paper); aspect-ratio: 1; }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item.copied { border-color: var(--green); } .media-item.just-uploaded { border-color: var(--gold); }
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.art-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.art-image { border: 1px solid var(--line); border-radius: 12px; padding: .5rem; background: #fff; display: flex; flex-direction: column; gap: .35rem; }
.art-image.is-cover { border-color: var(--green); box-shadow: 0 0 0 2px #cfe8d7; }
.art-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: var(--paper); }
.art-image-tags { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; min-height: 1.4rem; }
.art-image .field { margin: 0; } .art-image .art-alt { font-size: .82rem !important; padding: .4rem .5rem !important; }
.art-image-actions { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .85rem; }
.art-image-actions .btn-link { font-size: .82rem; }

/* ───────── Shop ───────── */
.design-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .design-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .design-grid { grid-template-columns: 1fr; } }
.design-card { display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.design-card:hover { transform: translateY(-3px); color: var(--ink); }
.design-card img, .design-card .article-card-ph { aspect-ratio: 1; object-fit: cover; width: 100%; }
.design-card-body { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem 1.2rem; align-items: flex-start; }
.design-card-body strong { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.design-card-tag { font-size: .9rem; color: var(--ink-2); }
.design-card-price { font-weight: 800; margin-top: .2rem; }
.product-section { padding-top: 1.5rem; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .product-grid { grid-template-columns: minmax(0, 1fr); } }
.product-main { margin: .6rem 0 0; }
.product-main img { width: 100%; border-radius: 16px; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; background: #fff; }
.product-thumbs { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.product-thumb { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.on { border-color: var(--green); }
.product-info h1 { margin-top: .4rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.shop-sizes { border: 0; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.shop-sizes legend { font-weight: 800; margin-bottom: .5rem; }
.shop-size { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "dim price"; border: 2px solid var(--line); border-radius: 12px; padding: .7rem .9rem; cursor: pointer; background: #fff; }
.shop-size input { position: absolute; opacity: 0; }
.shop-size:has(input:checked) { border-color: var(--green); background: #f1f8f3; }
.shop-size:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.shop-size-name { grid-area: name; font: 700 1.25rem var(--serif); }
.shop-size-dim { grid-area: dim; font-size: .78rem; color: var(--muted); }
.shop-size-price { grid-area: price; align-self: center; font-weight: 800; }
.shop-checkout .price-card { margin-bottom: 1rem; }
#sc-details h2 { font-size: 1.3rem; margin: 1.4rem 0 0; }
#sc-details .btn, #sc-pay { margin-top: 1rem; }
.product-points { margin-top: 1.4rem; font-size: .92rem; }
.product-description h2 { margin-top: 0; }
.order-design-img { width: 100%; border-radius: 12px; aspect-ratio: 1; object-fit: cover; margin-bottom: .6rem; }
.badge-shop { background: #fde7c8; color: #8a4b00; }
.admin-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.design-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.design-size { display: grid; gap: .3rem; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; background: #fff; }
.design-size input[type=text], .design-size input:not([type]) { padding: .45rem .6rem; border: 1px solid #d8cfbc; border-radius: 8px; font: inherit; }
.order-input { display: flex; align-items: center; gap: .4rem; } .order-input input { width: 5rem; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 6px; }
/* Homepage: featured from the shop */
.home-shop { padding-top: clamp(2rem, 5vw, 3.5rem); }
.home-shop-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .home-shop-grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-shop-grid.four { grid-template-columns: 1fr; } }
.design-card-sizes { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.design-card-sizes span { font-size: .78rem; background: var(--cream); border-radius: 999px; padding: .2rem .55rem; color: var(--ink-2); }
.design-card-sizes b { color: var(--ink); }
.design-card-cta { margin-top: .5rem; font-weight: 800; color: var(--green-d); }
.design-card:hover .design-card-cta { text-decoration: underline; }

/* Deleting orders + potential revenue */
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { color: #fff; background: #a51a26; }
.badge-online { background: #dbeafe; color: #1e3a8a; }
.danger-zone { margin-top: 1.5rem; border: 1px solid #f3c4c4; border-radius: 12px; padding: .6rem 1rem; background: #fff; }
.danger-zone summary { cursor: pointer; color: var(--red); font-weight: 700; font-size: .9rem; }
.danger-zone form { display: grid; gap: .6rem; margin-top: .6rem; }
.danger-zone .btn { justify-self: start; }
.bulk-bar { position: sticky; top: .5rem; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; background: #fff; border: 1px solid #f3c4c4; border-radius: 12px; padding: .6rem 1rem; margin-bottom: .8rem; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.bulk-bar[hidden] { display: none; }
.bulk-bar #sel-count { font-weight: 700; }
th.sel, td.sel { width: 2rem; text-align: center; }
.potential { margin-bottom: 1.2rem; }
.potential-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.potential-head h2 { margin-bottom: .2rem; }
.potential-total { font: 700 1.9rem var(--sans); margin: 0; }
.potential-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: .8rem; }
.potential-split > div { display: flex; flex-direction: column; gap: .15rem; background: var(--cream); border-radius: 12px; padding: .7rem .9rem; }
.potential-split strong { font: 700 1.25rem var(--sans); }
.potential-list { margin-top: .9rem; }
.potential-list summary { cursor: pointer; font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.potential-cleanup { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .potential-split { grid-template-columns: 1fr; } }
