/* ThankGod Shoes design system.
   One stylesheet, no build step. See DESIGN.md for the reasoning. */

:root {
  --paper: #F7F2E8;
  --kraft: #E9DDC8;
  --kraft-2: #F1E7D6;
  --line: #DCCDB0;
  --ink: #171717;
  --ink-soft: #6B6055;
  --plum: #211B27;
  --plum-deep: #171717;
  --brass: #C8922E;
  --gold-deep: #9F7220;
  --dark-2: #221F1C;
  --whatsapp: #1FA855;
  --danger: #9E2020;
  --white: #FFFFFF;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Karla", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;

  --radius: 3px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(23, 23, 23, 0.06);
  --shadow-lift: 0 2px 10px rgba(23, 23, 23, 0.07);
  --tab-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: var(--tab-h);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 2px; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s2) var(--s3);
  z-index: 60;
}
.skip:focus { left: var(--s3); top: var(--s3); }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s4);
}

.section { padding: var(--s6) 0; }
.section.band { background: var(--kraft-2); border-block: 1px solid var(--line); }

.spread {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s4);
}

/* On phones the home row scrolls sideways so a fourth card peeks and invites
   the swipe. It becomes an ordinary grid from 640px up. */
@media (max-width: 639px) {
  .grid-scroll {
    display: flex;
    gap: var(--s3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--s2);
    margin-inline: calc(var(--s4) * -1);
    padding-inline: var(--s4);
    scrollbar-width: none;
  }
  .grid-scroll::-webkit-scrollbar { display: none; }
  .grid-scroll > .pcard {
    flex: 0 0 74%;
    scroll-snap-align: start;
  }
}

.mt-3 { margin-top: var(--s5); }

.prose { max-width: 62ch; }
.prose p { margin: 0 0 var(--s4); }

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 var(--s2);
}

.h1, .h2, .h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 var(--s3);
}
.h1 { font-size: clamp(28px, 7vw, 42px); }
.h2 { font-size: clamp(22px, 5vw, 30px); }
.h3 { font-size: 18px; letter-spacing: 0; }

.lede { font-size: 17px; color: var(--ink-soft); margin: 0 0 var(--s4); }

.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
}
.quiet-link svg { width: 16px; height: 16px; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  color: var(--ink-soft);
  text-align: center;
  margin: var(--s4) 0 0;
}

.resultline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin: var(--s4) 0 0;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--plum-deep);
  color: var(--paper);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: var(--s2);
}

/* The logo shrinks before the buttons do: the actions keep their size and the
   mark takes whatever width is left. This is what stops them colliding at
   360px. */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
}
.brand-mark {
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
}

.topbar-actions { display: flex; align-items: center; gap: var(--s2); flex: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--paper);
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  padding: 9px 13px;
  text-decoration: none;
  min-height: 42px;
}
.icon-btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn-t { display: inline; }

.tray-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--brass);
  color: var(--plum-deep);
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  padding: 9px 14px;
  text-decoration: none;
  min-height: 42px;
}
.tray-pill svg { width: 17px; height: 17px; flex: none; }
.tray-word {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tray-count { font-family: var(--body); font-weight: 700; font-size: 13px; }

/* ---------- bottom tab bar ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--plum-deep);
  border-top: 1px solid rgba(197, 150, 50, 0.25);
  padding-bottom: env(safe-area-inset-bottom);
}

.tab {
  position: relative;
  padding: var(--s2) var(--s1);
  text-align: center;
  text-decoration: none;
  color: rgba(247, 242, 232, 0.72);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: var(--tab-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tab svg { width: 22px; height: 22px; }
.tab-on { color: var(--brass); background: transparent; }
.tab-icon { position: relative; display: inline-flex; }
.tab-dot {
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-family: var(--body);
  font-weight: 700;
  background: var(--brass);
  color: var(--plum-deep);
  border-radius: 999px;
  padding: 0 4px;
  font-size: 10px;
  letter-spacing: 0;
}

/* ---------- flash ---------- */

.flash-wrap { padding-top: var(--s4); }
.flash {
  margin: 0 0 var(--s2);
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--ink-soft);
  background: var(--kraft-2);
  font-size: 15px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.flash-success { border-left-color: var(--whatsapp); }
.flash-warning { border-left-color: var(--brass); }
.flash-error { border-left-color: var(--danger); }
.flash-info { border-left-color: var(--plum); }

/* ---------- hero ---------- */

.shopfront { background: var(--paper); }

.hero-plate { min-width: 0; }

/* The hero is a dark plate. On mobile the product photo sits behind the copy
   at low opacity; from 900px it moves to its own column on the right. */
.hero {
  position: relative;
  background: var(--plum-deep);
  color: var(--paper);
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; padding: var(--s5) var(--s4) var(--s6); }

.hero-eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s4);
}

.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(34px, 9.5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s4);
  color: var(--paper);
  text-wrap: balance;
}
.hero-title em { font-style: normal; color: var(--brass); display: block; }

.hero-sub {
  color: rgba(247, 242, 232, 0.82);
  margin: 0 0 var(--s5);
  max-width: 42ch;
  font-size: 16px;
}
.hero-sub b { color: var(--brass); font-weight: 600; }

/* Light by default so the About page keeps working; the hero overrides it. */
.hero-terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--kraft-2);
  margin-top: var(--s6);
}
.term {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  padding: var(--s4) var(--s3);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.term:last-child { border-right: 0; }
.term svg { width: 22px; height: 22px; flex: none; color: var(--gold-deep); margin-top: 1px; }
.term-k {
  display: block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.term-v {
  display: block;
  font-family: var(--body);
  font-size: 13px;
  margin-top: 3px;
  color: var(--ink-soft);
}

.hero .hero-terms {
  border-color: rgba(197, 150, 50, 0.32);
  background: var(--dark-2);
}
.hero .term { border-right-color: rgba(197, 150, 50, 0.32); }
.hero .term svg { color: var(--brass); }
.hero .term-k { color: var(--paper); }
.hero .term-v { color: rgba(247, 242, 232, 0.72); }

.hero-cta { display: flex; flex-direction: column; gap: var(--s3); align-items: stretch; }
.hero-cta .btn { width: 100%; justify-content: space-between; }
.hero-cta .btn svg { width: 18px; height: 18px; flex: none; }

/* On phones the photo is its own band at full strength - dimming it to make
   room for text would defeat the point of showing the shoe. The copy sits on
   solid black underneath. From 900px the two share a row and the photo takes
   the right half. */
.hero-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--dark-2);
}
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, rgba(23, 23, 23, 0), var(--plum-deep));
}
.hero-media-tag { display: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s5);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--plum-deep); }
.btn-ghost {
  background: transparent;
  border-color: var(--brass);
  color: var(--brass);
}
.btn-quiet { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-wa { background: var(--whatsapp); border-color: var(--whatsapp); color: var(--white); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn-sm { min-height: 38px; padding: 0 var(--s3); font-size: 12px; }
.btn-block { display: flex; width: 100%; }

.linkbtn {
  background: none;
  border: 0;
  padding: var(--s2) 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- chips ---------- */

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s3) 0;
}
.chiprow-quiet { margin-top: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.chip-sm { min-height: 32px; font-size: 12px; }
.chip-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.qty-pick { font-family: var(--mono); }

/* ---------- the manifest strip: the signature device ---------- */

/* Figures strip: three equal columns of PAIR / MOQ / CARTON, with sizes on
   their own row underneath. Giving the price a full third is what keeps it
   from being clipped on a narrow card. */
.manifest {
  border-top: 1px solid var(--line);
  background: transparent;
}
.mrow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mcell { padding: var(--s3) var(--s2); min-width: 0; }
.mcell:first-child { padding-left: var(--s3); }
.msizes {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) var(--s3) var(--s3);
  border-top: 1px solid var(--line);
}
.mkey {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mval {
  display: block;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.msizes .mkey, .msizes .mval { margin-top: 0; }
.msizes .mval { font-size: 14px; }


/* ---------- product card ---------- */

.pcard {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pcard-media {
  position: relative;
  display: block;
  background: var(--kraft-2);
}
.pcard-media img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }

.pcard-ref {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--plum-deep);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 7px 11px;
  border-radius: 0 0 var(--radius) 0;
}

.pcard-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--kraft-2);
}

.pcard-body { padding: var(--s3) var(--s3) var(--s4); flex: 1; }
.pcard-name {
  display: block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}
.pcard-cat {
  margin: 0 0 5px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---------- steps explainer ---------- */

.steps {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
/* Number, title and icon share one line; the description sits under them and
   is indented to the title. Compact enough that all three steps read at a
   glance on a phone. */
.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: var(--s3);
  align-items: center;
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; padding-top: 0; }
.step-head {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
}
.step-n {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--brass);
  color: var(--white);
  border-radius: var(--radius);
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
}
.step-head svg { display: none; }
.step-h {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--body);
  font-weight: 700;
  font-size: 16px;
}
.step-t {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
  margin-top: 4px;
}

/* ---------- product detail ---------- */

.detail { display: grid; gap: var(--s5); }

.detail-media {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}
.detail-media img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }

.thumbrow {
  display: flex;
  gap: var(--s2);
  padding: var(--s2);
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.thumb {
  flex: 0 0 auto;
  width: 62px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: none;
  cursor: pointer;
}
.thumb img { aspect-ratio: 1 / 1; object-fit: cover; }

.detail-body { min-width: 0; }

.detail-ref {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 var(--s2);
}
.detail-cat { margin: 0 0 var(--s4); }

.price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s3);
}
.price-unit {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.rule {
  margin: var(--s3) 0 var(--s5);
  padding: var(--s3);
  border-left: 3px solid var(--brass);
  background: var(--kraft-2);
  font-size: 14px;
}

.colors { margin-bottom: var(--s5); }
.colorlist { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s2); }
.colortag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  background: var(--white);
}

/* ---------- quantity stepper ---------- */

.qtyform { border-top: 1px solid var(--line); padding-top: var(--s4); }

.stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.stepper-sm { grid-template-columns: 40px 1fr 40px; max-width: 190px; }

.step-btn {
  border: 0;
  background: var(--kraft);
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  min-height: 52px;
}
.stepper-sm .step-btn { min-height: 42px; font-size: 18px; }
.step-btn:active { background: var(--line); }

.step-qty {
  border: 0;
  border-inline: 1px solid var(--ink);
  text-align: center;
  font-family: var(--mono);
  font-size: 20px;
  min-width: 0;
  background: var(--white);
  color: var(--ink);
  -moz-appearance: textfield;
}
.stepper-sm .step-qty { font-size: 16px; border-inline-color: var(--line); }
.step-qty::-webkit-outer-spin-button,
.step-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.step-math {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin: var(--s2) 0 var(--s4);
}

/* second quantity control: cartons */
.eyebrow-gap { margin-top: var(--s4); }
.step-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin: 6px 0 0;
}
.steplabel {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.tline-steppers {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  width: 100%;
}
.tline-stepper { flex: 0 1 auto; }
.tline-form .step-math { margin: var(--s2) 0 0; width: 100%; }

.qtyactions { display: grid; gap: var(--s2); }
.quickpick { margin-top: var(--s5); }

/* ---------- order tray ---------- */

.traylist { display: grid; gap: var(--s3); margin: var(--s4) 0; }

.tline {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: var(--s3);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s3);
}
.tline-media { display: block; border-radius: var(--radius); overflow: hidden; }
.tline-media img { aspect-ratio: 1 / 1; object-fit: cover; }
.tline-body { min-width: 0; }
.tline-ref { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-soft); margin: 0; }
.tline-name { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.tline-math { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin: 4px 0 var(--s2); }
.tline-form { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.tline-end {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  padding-top: var(--s2);
}
.tline-total { font-family: var(--mono); font-size: 16px; font-weight: 500; margin: 0; }

.traytotal {
  background: var(--kraft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s4);
  margin-bottom: var(--s5);
}
.ttl-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.ttl-v { font-family: var(--mono); font-size: 15px; }
.ttl-big { font-size: 22px; font-weight: 500; }

.enquiry { border-top: 1px solid var(--line); padding-top: var(--s5); }
.clearform { margin-top: var(--s4); text-align: center; }

/* ---------- receipt ---------- */

.receipt {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  margin: var(--s4) 0;
}
.receipt-h {
  margin: 0;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.receipt-line {
  display: grid;
  gap: 2px;
  padding: var(--s3) var(--s4);
  border-bottom: 1px dashed var(--line);
}
.receipt-line:last-child { border-bottom: 0; }
.receipt-name { font-family: var(--display); font-weight: 600; font-size: 14px; }
.receipt-qty { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.receipt-amt { font-family: var(--mono); font-size: 15px; }
.receipt-sum { background: var(--kraft-2); }

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

.field { margin-bottom: var(--s4); }

.flabel {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.req {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
}

.input, .select, .textarea {
  width: 100%;
  min-height: 50px;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
}
.textarea { min-height: 90px; resize: vertical; }
.select { appearance: none; background-image: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--plum); }

.fhelp { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }
.ferror { font-size: 13px; color: var(--danger); margin: 6px 0 0; }

.searchbar { display: flex; gap: var(--s2); margin: var(--s4) 0 var(--s3); }
.searchbar .input { min-height: 46px; }

/* ---------- contact ---------- */

.contact-grid { display: grid; gap: var(--s2); margin: var(--s4) 0; }
.contact-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: var(--s3) var(--s4);
  text-decoration: none;
  color: var(--ink);
}
.contact-k {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-v { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; }
.contact-block { margin-top: var(--s5); }

/* ---------- pager ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  margin-top: var(--s5);
}
.pager-link {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px var(--s4);
  text-decoration: none;
  background: var(--white);
}
.pager-now { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

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

.foot {
  background: var(--ink);
  color: var(--kraft);
  padding: var(--s7) 0 var(--s6);
  margin-top: var(--s7);
}
.foot a { color: var(--kraft); }
.foot-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}
.foot-tag { color: rgba(234, 223, 206, 0.7); margin: var(--s2) 0 0; }

.foot-grid {
  display: grid;
  gap: var(--s5);
  margin: var(--s6) 0 0;
  border-top: 1px solid rgba(234, 223, 206, 0.2);
  padding-top: var(--s5);
}
.foot-block { min-width: 0; }

.foot-h {
  font-family: var(--body);
  font-weight: 700;
  padding-top: var(--s3);
  border-top: 1px solid rgba(200, 146, 46, 0.4);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s2);
}
.foot-line { margin: 0 0 4px; font-size: 15px; }
.foot-social { display: flex; flex-wrap: wrap; gap: var(--s3); margin: 0 0 var(--s2); }
.foot-legal {
  margin: var(--s6) 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(234, 223, 206, 0.55);
}

/* ---------- dashboard ---------- */

.backroom { background: var(--ink); color: var(--kraft); }
.backroom .h1, .backroom .h2, .backroom .h3 { color: var(--paper); }
.backroom .eyebrow { color: var(--brass); }
.backroom .empty { border-color: rgba(234, 223, 206, 0.3); color: rgba(234, 223, 206, 0.7); }
.backroom .empty a { color: var(--brass); }
.backroom .flash { background: rgba(234, 223, 206, 0.1); color: var(--paper); }
.backroom .fhelp { color: rgba(234, 223, 206, 0.65); }
.backroom .flabel { color: var(--paper); }
.backroom .chip { background: transparent; border-color: rgba(234, 223, 206, 0.35); color: var(--kraft); }
.backroom .chip-on { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.backroom .btn-quiet { background: transparent; border-color: rgba(234, 223, 206, 0.4); color: var(--kraft); }
.backroom .pager-link { background: transparent; border-color: rgba(234, 223, 206, 0.4); color: var(--kraft); }
.backroom .pager-now { color: rgba(234, 223, 206, 0.7); }
.backroom .receipt { background: rgba(255, 255, 255, 0.04); border-color: rgba(234, 223, 206, 0.25); }
.backroom .receipt-line { border-bottom-color: rgba(234, 223, 206, 0.2); }
.backroom .receipt-name { color: var(--paper); }
.backroom .receipt-qty { color: rgba(234, 223, 206, 0.7); }
.backroom .receipt-amt { color: var(--brass); }
.backroom .receipt-sum { background: rgba(200, 149, 43, 0.12); }

.dtop {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--plum-deep);
  border-bottom: 1px solid rgba(234, 223, 206, 0.2);
}
.dtop-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  gap: var(--s3);
}
.dbrand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
}
.dtop-actions { display: flex; gap: var(--s3); }
.dlink {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--kraft);
}

.dwrap { padding-top: var(--s5); padding-bottom: var(--s6); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  margin: var(--s4) 0;
}
.tile {
  display: block;
  padding: var(--s4);
  border: 1px solid rgba(234, 223, 206, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.tile-num {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--brass);
}
.tile-label {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kraft);
}

.statline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(234, 223, 206, 0.75);
  padding: var(--s3) 0;
  border-block: 1px solid rgba(234, 223, 206, 0.18);
}

.dsection { margin-top: var(--s6); }

.dgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s3);
}

.dcard {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(234, 223, 206, 0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dcard-media { position: relative; display: block; background: rgba(0, 0, 0, 0.2); }
.dcard-media img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.dcard-body { padding: var(--s3); flex: 1; }
.dcard-ref { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: rgba(234, 223, 206, 0.7); margin: 0; }
.dcard-name { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--paper); margin: 2px 0 6px; }
.dcard-price { font-family: var(--mono); font-size: 15px; color: var(--brass); margin: 0; }
.dcard-unit { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(234, 223, 206, 0.6); }
.dcard-terms { font-family: var(--mono); font-size: 11px; color: rgba(234, 223, 206, 0.7); margin: 4px 0 0; }
.dcard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  padding: var(--s2) var(--s3) var(--s3);
}

.flag {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 2px;
  background: var(--whatsapp);
  color: var(--white);
}
.flag-draft { background: var(--kraft-2); color: var(--ink-soft); border: 1px solid var(--line); }
.flag-sold_out { background: var(--brass); color: var(--ink); }
.flag-archived { background: var(--ink-soft); color: var(--paper); }
.flag-new { background: var(--brass); color: var(--ink); }
.flag-contacted { background: var(--plum); color: var(--paper); }
.flag-fulfilled { background: var(--whatsapp); color: var(--white); }
.flag-cancelled { background: var(--danger); color: var(--white); }

.ocards { display: grid; gap: var(--s2); margin-top: var(--s3); }
.ocard {
  position: relative;
  display: block;
  padding: var(--s4);
  border: 1px solid rgba(234, 223, 206, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: var(--kraft);
}
.ocard .flag { position: static; align-self: center; }
.ocard-ref { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--brass); }
.ocard-name { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--paper); margin: var(--s2) 0 0; }
.ocard-meta { font-family: var(--mono); font-size: 12px; margin: 2px 0 0; color: rgba(234, 223, 206, 0.75); }
.ocard-sum { font-family: var(--mono); font-size: 13px; margin: var(--s2) 0 0; color: var(--paper); }
.ocard-when { font-family: var(--mono); font-size: 11px; margin: 4px 0 0; color: rgba(234, 223, 206, 0.55); }

.obox {
  border: 1px solid rgba(234, 223, 206, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  padding: var(--s4);
  margin-top: var(--s4);
}
.obox-name { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--paper); margin: 0; }
.obox-meta { font-family: var(--mono); font-size: 13px; margin: 4px 0 0; }
.obox-actions { display: flex; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }

.notebox {
  border-left: 3px solid var(--brass);
  padding: var(--s3);
  background: rgba(255, 255, 255, 0.04);
  margin: var(--s3) 0 0;
}

.statusform { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.statusform .select { max-width: 220px; }

.msgbox {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(234, 223, 206, 0.2);
  border-radius: var(--radius);
  padding: var(--s3);
  margin: var(--s3) 0 0;
  color: var(--kraft);
}

.dform { margin-top: var(--s4); }
.dblock {
  border: 1px solid rgba(234, 223, 206, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  padding: var(--s4);
  margin-bottom: var(--s4);
}
.dblock-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s3);
  cursor: default;
}
.dblock-fold summary { cursor: pointer; margin-bottom: var(--s3); }

.dropzone {
  display: block;
  border: 1px dashed rgba(234, 223, 206, 0.45);
  border-radius: var(--radius-lg);
  padding: var(--s6) var(--s4);
  text-align: center;
  cursor: pointer;
}
.dropzone-t {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  color: var(--paper);
}
.dropzone-s { display: block; font-size: 13px; color: rgba(234, 223, 206, 0.7); margin-top: 4px; }
.dropzone-input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.filelist { font-family: var(--mono); font-size: 12px; color: var(--brass); margin: var(--s2) 0 var(--s3); }

.photogrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  margin: var(--s4) 0;
}
.photo {
  position: relative;
  margin: 0;
  border: 1px solid rgba(234, 223, 206, 0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.photo-cover { border-color: var(--brass); }
.photo img { aspect-ratio: 1 / 1; object-fit: cover; }
.photo-tag {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  background: var(--brass);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 2px;
}
.photo-actions { display: flex; gap: var(--s1); padding: var(--s2); flex-wrap: wrap; }

.dangerform { margin-top: var(--s5); }

.dnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--plum-deep);
  border-top: 1px solid rgba(234, 223, 206, 0.25);
  padding-bottom: env(safe-area-inset-bottom);
}
.dnav-item {
  min-height: var(--tab-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 223, 206, 0.75);
  text-decoration: none;
  border-top: 2px solid transparent;
}
.dnav-on { color: var(--paper); border-top-color: var(--brass); }
.dnav-add { color: var(--ink); background: var(--brass); }

.loginbox {
  max-width: 380px;
  margin: var(--s7) auto;
  border: 1px solid rgba(234, 223, 206, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  padding: var(--s5);
}

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
  .dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photogrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipt-line { grid-template-columns: 1fr auto auto; gap: var(--s4); align-items: baseline; }
  .tline { grid-template-columns: 110px 1fr auto; }
  .tline-end {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    border-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar, .dnav { display: none; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .section { padding: var(--s8) 0; }
  .hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--s7);
    align-items: center;
    padding: var(--s8) var(--s4);
  }
  .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .hero-inner { display: block; padding: var(--s8) var(--s5); align-self: center; }
  .hero-media { height: 100%; }
  .hero-media img { height: 100%; aspect-ratio: auto; min-height: 560px; }
  .hero-media::after {
    inset: 0;
    height: auto;
    background: linear-gradient(to right, var(--plum-deep), rgba(23, 23, 23, 0) 26%);
  }
  .hero-terms { max-width: 640px; }
  .hero-cta { flex-direction: row; flex-wrap: wrap; }
  .hero-cta .btn { width: auto; flex: 1 1 220px; }
  .detail { grid-template-columns: 1.1fr 0.9fr; gap: var(--s7); align-items: start; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .step { border-top: 0; border-left: 1px solid var(--line); padding: 0 var(--s5); align-content: start; }
  .step:first-child { border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .topbar, .tabbar, .dnav, .dtop, .foot { display: none; }
  body { background: #fff; color: #000; padding: 0; }
}

/* bulk photo upload */
.btnrow { display: flex; gap: var(--s2); flex-wrap: wrap; }
.dcard-todo { color: var(--ink-soft); font-style: normal; }
.previewgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--s2);
  margin: var(--s3) 0;
}
.previewcell {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--kraft-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.previewcell img { width: 100%; height: 100%; object-fit: cover; display: block; }

.uploadnote { font-size: 13px; color: var(--brass); margin: 0 0 var(--s3); }
.lede-quiet { color: var(--ink-soft); font-size: 13px; margin-top: calc(var(--s2) * -1); }
.previewmore {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-soft);
}
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- narrow phones ---------- */

@media (max-width: 400px) {
  .topbar-inner { gap: 6px; }
  .brand-mark { height: 34px; }
  .icon-btn { padding: 9px 10px; }
  .icon-btn-t { display: none; }
  .tray-pill { padding: 9px 11px; gap: 6px; }
  .term { padding: var(--s3) var(--s2); flex-direction: column; gap: 6px; }
  .term-k { font-size: 11px; letter-spacing: 0.08em; }
  .term-v { font-size: 12px; }
  .tab { font-size: 9px; letter-spacing: 0.08em; }
  .grid-scroll > .pcard { flex-basis: 78%; }
}

/* Long words in a narrow card must wrap rather than spill. */
.pcard-name, .pcard-cat { overflow-wrap: anywhere; }
