:root {
  --ink: #12161d;
  --ink-soft: #3c4552;
  --muted: #6d7684;
  --paper: #f6f2e9;
  --card: #fffdf8;
  --line: #e3dccd;
  --line-strong: #cfc6b2;
  --cyan: #0d8ea6;
  --magenta: #d42a6f;
  --yellow: #eda716;
  --green: #2f7a51;
  --shadow: 0 18px 40px -28px rgba(18, 22, 29, 0.55);
  --radius: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

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

.cmyk-bar {
  height: 4px;
  background: linear-gradient(90deg,
    var(--cyan) 0 25%,
    var(--magenta) 25% 50%,
    var(--yellow) 50% 75%,
    var(--ink) 75% 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: Georgia, serif; font-size: 18px; }
.brand-text small { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.tab {
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tab:hover { background: #efe9dc; color: var(--ink); }

.tab.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

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

main {
  padding: 0 clamp(16px, 4vw, 44px) 64px;
  max-width: 1240px;
  margin: 0 auto;
}

.hero { padding: clamp(28px, 5vw, 56px) 0 28px; max-width: 720px; }
.hero.compact { padding-bottom: 22px; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 10px;
}

.hero h1 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); margin-bottom: 14px; }
.lede { color: var(--ink-soft); font-size: 1.02rem; max-width: 60ch; }

.section-title { font-size: 1.12rem; margin-bottom: 14px; }

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}

.order-side { display: grid; gap: 18px; position: sticky; top: 92px; }

.shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

/* ---------- product cards ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.product-card.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink) inset, var(--shadow);
}

.product-name { font-family: Georgia, serif; font-size: 1.05rem; font-weight: 600; }
.product-blurb { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.product-from { margin-top: 6px; font-size: 0.85rem; font-weight: 600; color: var(--cyan); }

.hint { color: var(--muted); font-size: 0.86rem; margin-top: 16px; max-width: 68ch; }
.hint.small, .small { font-size: 0.8rem; }
.muted { color: var(--muted); }

/* ---------- cards & forms ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.configurator { display: grid; gap: 16px; }

.cfg-head h2 { font-size: 1.3rem; margin: 2px 0 4px; }
.cfg-head .eyebrow { margin-bottom: 2px; }

.field { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
}

.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices.two > .choice { flex: 1 1 130px; }

.choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.choice:hover { border-color: var(--line-strong); color: var(--ink); }

.choice.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.radio-choice { gap: 8px; }
.radio-choice input { accent-color: var(--ink); margin: 0; }
.radio-choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.radio-choice:has(input:checked) input { accent-color: var(--yellow); }

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  background: #fbf7ee;
}

.switch-row input { width: 18px; height: 18px; accent-color: var(--magenta); }
.switch-row span { display: flex; flex-direction: column; line-height: 1.3; }
.switch-row strong { font-size: 0.9rem; }
.switch-row small { color: var(--muted); font-size: 0.78rem; }

.quote {
  border-radius: 12px;
  background: #f4efe3;
  padding: 14px;
  display: grid;
  gap: 7px;
}

.quote-line { display: flex; justify-content: space-between; gap: 12px; font-size: 0.87rem; color: var(--ink-soft); }
.quote-line span:last-child { font-variant-numeric: tabular-nums; }

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line-strong);
  padding-top: 9px;
  margin-top: 3px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

.quote-total strong { font-family: Georgia, serif; font-size: 1.55rem; letter-spacing: -0.01em; text-transform: none; }

.order-form { display: grid; gap: 12px; }
.order-form h2 { font-size: 1.05rem; }

.input-row { display: grid; gap: 5px; font-size: 0.84rem; font-weight: 600; color: var(--ink-soft); }
.input-row em { font-style: normal; font-weight: 400; color: var(--muted); }

input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink);
}

textarea { resize: vertical; min-height: 74px; }

input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn {
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn:hover { background: #232a35; }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn.ghost:hover { background: #efe9dc; }

.small-btn { font-size: 0.8rem; padding: 8px 12px; }

.feedback { font-size: 0.86rem; border-radius: 11px; padding: 12px; margin-top: 2px; }
.feedback.is-error { background: #fbe9ef; color: #8c1240; border: 1px solid #f0c3d3; }
.feedback.is-ok { background: #e8f3ec; color: #1f5638; border: 1px solid #bcd9c7; }
.feedback strong { display: block; font-family: Georgia, serif; font-size: 1rem; margin-bottom: 4px; }
.feedback .feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.feedback a.btn, .feedback button.btn { font-size: 0.82rem; padding: 8px 12px; text-decoration: none; display: inline-block; }

/* ---------- price list ---------- */

.price-list { display: grid; gap: 14px; }

.price-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  align-items: center;
}

.price-block h3 { font-size: 1.08rem; margin-bottom: 3px; }
.tier-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.tier-chip {
  display: grid;
  gap: 1px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf7ee;
  min-width: 96px;
}

.tier-chip strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.tier-chip small { color: var(--muted); font-size: 0.72rem; }

.price-block .options-line { grid-column: 1 / -1; margin: 0; }

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

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 16px;
}

.stat small { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stat strong { font-family: Georgia, serif; font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.list-head .section-title { margin: 0; }
.list-actions { display: flex; gap: 8px; align-items: center; }
.list-actions select { width: auto; padding: 8px 10px; font-size: 0.84rem; }

.orders { display: grid; gap: 12px; }

.order-card {
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.order-strip { width: 5px; flex: 0 0 5px; background: var(--muted); }
.order-main { padding: 14px 16px; display: grid; gap: 6px; flex: 1; min-width: 0; }

.order-main header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.order-main header strong { font-size: 0.95rem; letter-spacing: 0.02em; }

.pill {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2ecdf;
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

.order-detail { font-size: 0.86rem; color: var(--ink-soft); }
.order-note {
  font-size: 0.84rem;
  color: var(--ink-soft);
  background: #f8f3e8;
  border-left: 2px solid var(--line-strong);
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
}

.order-main footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 2px;
}

.order-total { font-weight: 600; font-size: 0.86rem; }
.order-actions { display: flex; gap: 8px; align-items: center; }
.order-actions select { width: auto; padding: 7px 9px; font-size: 0.8rem; }
.btn.tiny { font-size: 0.76rem; padding: 6px 10px; }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.settings { display: grid; gap: 12px; }
.settings h2 { font-size: 1.05rem; }
.settings .hint { margin-top: 0; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 20px clamp(16px, 4vw, 44px) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 1240px;
  margin: 0 auto;
}

.site-footer span:first-child { font-family: Georgia, serif; color: var(--ink-soft); }

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .order-layout, .shop-grid { grid-template-columns: 1fr; }
  .order-side { position: static; }
  .price-block { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { padding: 12px 16px; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; text-align: center; padding: 8px 10px; font-size: 13px; }
  .hero { padding-top: 22px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-card { padding: 13px; }
  .product-blurb { display: none; }
  .two-cols { grid-template-columns: 1fr; }
  .order-main footer { align-items: flex-start; flex-direction: column; }
}

/* shared links */
a.footer-link { color: var(--cyan); text-decoration: none; }
a.footer-link:hover { text-decoration: underline; }
