:root {
  --juniper: #33523f;
  --juniper-deep: #22382b;
  --plum: #8a4b6b;
  --plum-dark: #6f3a55;
  --bg: #f7f3ec;
  --surface: #ffffff;
  --line: #ddd3c2;
  --text: #2c2a26;
  --muted: #6f6a5e;
  --cta: #8a4b6b;
  --cta-hover: #6f3a55;
  --ok: #1e7d46;
  --ok-bg: #e6f4ec;
  --out: #b03a2e;
  --out-bg: #fbeae8;
  --danger: #b03a2e;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(34, 56, 43, 0.13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.brand { color: var(--juniper); text-decoration: none; font-weight: 800; letter-spacing: 0.03em; font-size: 1.08rem; }
.brand span { color: var(--plum); font-weight: 600; font-size: 0.82em; }
.header-phone { margin: 0 0 0 auto; color: var(--muted); font-size: 0.95rem; }
.header-phone strong { color: var(--juniper); font-size: 1.05rem; }
.trust-strip { background: var(--juniper); }
.trust-inner {
  max-width: 1100px; margin: 0 auto; padding: 9px 20px;
  display: flex; gap: 26px; flex-wrap: wrap;
  color: #dce8df; font-size: 0.86rem; font-weight: 600;
}

.hero {
  background: linear-gradient(135deg, var(--juniper-deep), var(--juniper) 60%, #476b55);
  color: #fff; padding: 44px 0 38px;
}
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.eyebrow { color: #e8b7cd; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.78rem; font-weight: 700; margin: 0; }
.hero h1 { font-size: 2.15rem; margin: 10px 0 12px; line-height: 1.18; }
.hero-lede { color: #d3e2d8; max-width: 600px; }
.hero-instruction { color: #eef5f0; max-width: 600px; }
.hero-card { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-kicker { color: var(--plum); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.76rem; font-weight: 700; margin: 0 0 10px; }
.steps-list { margin: 0; padding-left: 20px; color: var(--muted); }
.steps-list li { margin-bottom: 7px; }
.steps-list strong { color: var(--text); }
.price-card { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.price-line { color: var(--muted); margin: 0; }
.price-line strong { color: var(--plum-dark); }
.audit-line { color: var(--muted); font-size: 0.92rem; margin: 6px 0 0; }

.pitch-strip { background: var(--plum); color: #fff; margin: 0; padding: 13px 0; font-weight: 600; }
.pitch-inner { display: block; }

.flow-section { padding: 30px 0 12px; }
.flow-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
.flow-main { display: flex; flex-direction: column; gap: 20px; }

.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step-card h2 { margin: 0 0 14px; font-size: 1.25rem; color: var(--juniper); display: flex; align-items: center; gap: 10px; }
.step-num {
  background: var(--plum); color: #fff; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; flex: none;
}
.demo-label { color: var(--plum-dark); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.11em; margin: 0; }

.chip-group { margin-bottom: 18px; }
.chip-q { font-weight: 700; color: var(--juniper); margin: 0 0 8px; }
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: #fbf9f4; color: var(--text);
  border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--plum); }
.chip:focus-visible, .button:focus-visible, .view-btn:focus-visible, input:focus-visible { outline: 3px solid #c99ab2; outline-offset: 2px; }
.chip.is-selected { background: var(--juniper); border-color: var(--juniper); color: #fff; }

.button {
  border: 0; cursor: pointer; border-radius: 9px; padding: 12px 18px;
  font-size: 0.98rem; font-weight: 700; font: inherit;
}
.button-primary { background: var(--cta); color: #fff; }
.button-primary:hover { background: var(--cta-hover); }
.button-secondary { background: var(--surface); color: var(--juniper); border: 1.5px solid var(--juniper); }
.reset-btn { align-self: flex-start; }

.form-error {
  border: 1px solid var(--danger); color: var(--danger); border-radius: 9px;
  padding: 9px 12px; font-size: 0.93rem; margin: 12px 0;
}

.ask-box { border-top: 1px dashed var(--line); margin-top: 22px; padding-top: 16px; }
.ask-box label { font-weight: 600; display: block; margin-bottom: 8px; }
.ask-row { display: flex; gap: 10px; }
.ask-row input {
  flex: 1; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); font-size: 1rem; min-width: 0;
}
.ask-reply {
  background: #f6eef2; border: 1px solid #e2cbd8; border-radius: 10px;
  padding: 12px 14px; margin: 12px 0 0; color: var(--text);
}

.match-line { font-weight: 700; color: var(--juniper); margin: 0 0 14px; }
.outfit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.piece-card {
  border: 2px solid var(--line); background: #fbf9f4; border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 7px;
}
.piece-name { margin: 0; font-size: 1.05rem; color: var(--juniper); }
.piece-price { margin: 0; font-size: 1.3rem; font-weight: 800; color: var(--text); }
.size-run { display: flex; gap: 6px; }
.size-cell {
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px;
  font-size: 0.82rem; font-weight: 700; color: var(--muted); background: var(--surface);
}
.size-cell.is-mine { border-color: var(--plum); color: var(--plum-dark); box-shadow: inset 0 0 0 1px var(--plum); }
.size-cell.is-zero { color: var(--out); text-decoration: line-through; background: var(--out-bg); }
.stock-badge {
  margin: 0; border-radius: 999px; padding: 5px 11px; font-size: 0.84rem; font-weight: 700;
  align-self: flex-start;
}
.stock-badge.is-in { background: var(--ok-bg); color: var(--ok); }
.stock-badge.is-out { background: var(--out-bg); color: var(--out); }
.stock-badge.is-reserved { background: #e6ecf7; color: #2f4d8f; }
.piece-note { margin: 0; color: var(--muted); font-size: 0.9rem; }
.piece-card .button { margin-top: auto; }

.alert-form { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 9px; }
.alert-form-title { margin: 0; font-weight: 600; font-size: 0.93rem; }
.alert-form label { display: block; font-weight: 600; font-size: 0.92rem; }
.alert-form input {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border-radius: 9px; border: 1px solid var(--line); font-size: 1rem;
}
.alert-form .form-error { margin: 0; }

.bundle-line {
  margin: 16px 0 0; background: #fdf6ef; border: 1.5px solid var(--plum);
  border-radius: 10px; padding: 12px 14px; font-weight: 700; color: var(--juniper);
}
.result-note { color: var(--muted); font-size: 0.94rem; margin: 12px 0 0; }

.phone {
  border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 430px;
}
.thread-header {
  display: flex; align-items: center; gap: 11px; background: var(--juniper);
  color: #fff; padding: 12px 15px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--plum); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none;
}
.thread-name { margin: 0; font-weight: 700; }
.thread-sub { margin: 0; font-size: 0.8rem; color: #cfe0d4; }
.thread {
  background: #f2efe8; padding: 15px; display: flex; flex-direction: column; gap: 10px;
  min-height: 90px; max-height: 340px; overflow-y: auto;
}
.msg {
  background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px;
  padding: 10px 13px; max-width: 92%; align-self: flex-start;
}
.msg p { margin: 0; }
.lever-row { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.lever-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 9px; }
.mock-note { color: var(--muted); font-size: 0.86rem; margin: 12px 0 0; }

.owner-board { background: var(--surface); border: 1.5px solid var(--ok); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.owner-board .demo-label { color: var(--ok); }
.owner-board h2 { margin: 6px 0 14px; font-size: 1.2rem; color: var(--juniper); }
.owner-empty { color: var(--muted); margin: 0; }
.owner-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.owner-entry {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: flex; gap: 10px; align-items: flex-start; background: #fbf9f4; font-size: 0.94rem;
}
.owner-tag {
  flex: none; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  border-radius: 6px; padding: 3px 7px; margin-top: 2px;
}
.owner-entry-quiz .owner-tag { background: #e9e2f2; color: #5b4390; }
.owner-entry-signup .owner-tag { background: var(--out-bg); color: var(--out); }
.owner-entry-reserve .owner-tag { background: var(--ok-bg); color: var(--ok); }

/* Customer view / Owner Admin flip */
.view-switch { padding: 24px 0 2px; }
.view-switch-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.view-toggle {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface); border: 1.5px solid var(--juniper); border-radius: 999px;
}
.view-btn {
  border: 0; background: transparent; color: var(--juniper); cursor: pointer;
  border-radius: 999px; padding: 9px 20px; font: inherit; font-weight: 700; font-size: 0.95rem;
}
.view-btn.is-active { background: var(--juniper); color: #fff; }
.view-hint { color: var(--muted); margin: 10px 0 0; font-size: 0.93rem; max-width: 760px; }
.view-hint strong { color: var(--juniper); }

/* Owner Admin — Demand Board */
.admin-section { padding: 30px 0 12px; }
.admin-panel {
  background: var(--surface); border: 1.5px solid var(--juniper);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.admin-panel .demo-label { color: var(--ok); }
.admin-panel h2 { margin: 6px 0 4px; font-size: 1.3rem; color: var(--juniper); }
.admin-headline {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: #edf3ee; border: 1px solid var(--juniper);
  border-radius: var(--radius); padding: 16px 18px; margin: 14px 0 6px;
}
.headline-number { font-size: 2.6rem; font-weight: 800; color: var(--juniper); margin: 0; line-height: 1; }
.headline-text { margin: 0; }
.headline-sub { color: var(--muted); }
.admin-h { color: var(--juniper); font-size: 1.05rem; margin: 22px 0 10px; }
.admin-note { color: var(--muted); font-size: 0.93rem; margin: 0 0 10px; }

.admin-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-entry {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: flex; gap: 10px; align-items: flex-start; background: #fbf9f4; font-size: 0.94rem;
}
.admin-entry-yours { border-color: var(--plum); background: #fdf3f7; }
.admin-tag {
  flex: none; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  border-radius: 6px; padding: 3px 7px; margin-top: 2px;
}
.admin-entry-quiz .admin-tag { background: #e9e2f2; color: #5b4390; }
.admin-entry-signup .admin-tag { background: var(--out-bg); color: var(--out); }
.admin-entry-reserve .admin-tag { background: var(--ok-bg); color: var(--ok); }
.admin-entry-body { display: block; }
.feed-when {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); margin-right: 8px;
}
.badge-new {
  display: inline-block; background: var(--plum); color: #fff;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 9px; margin-right: 8px; vertical-align: 2px;
}

.demand-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demand-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fbf9f4; border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px;
}
.demand-name { font-weight: 700; color: var(--juniper); }
.demand-size {
  background: var(--plum); color: #fff; border-radius: 999px;
  padding: 1px 9px; font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.demand-counts { color: var(--muted); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.demand-more { color: var(--muted); font-size: 0.9rem; margin: 10px 0 0; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.stat-card {
  background: #fbf9f4; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; text-align: center;
}
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--juniper); margin: 0; line-height: 1.1; }
.stat-label { color: var(--muted); margin: 4px 0 0; font-size: 0.86rem; font-weight: 600; }
.admin-insight {
  background: #fdf6ef; border-left: 4px solid var(--plum);
  border-radius: 9px; padding: 13px 15px; margin: 18px 0 0;
}

.notes-section { padding: 34px 0 46px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.notes-grid h2 { font-size: 1.3rem; color: var(--juniper); }
.notes-grid li { margin-bottom: 8px; color: var(--muted); }
.notes-grid li strong, .notes-grid p strong { color: var(--text); }
.notes-grid p { color: var(--muted); }
.notes-grid .price-line, .notes-grid .audit-line { color: var(--muted); }

.site-footer { background: var(--juniper-deep); padding: 20px 0 28px; color: #bccfc2; font-size: 0.9rem; }

@media (max-width: 860px) {
  .hero-grid, .flow-grid, .notes-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .outfit-grid { grid-template-columns: 1fr; }
  .header-phone { margin-left: 0; }
  .ask-row { flex-direction: column; }
  .view-btn { padding: 9px 14px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .admin-headline { gap: 10px; }
  .admin-panel { padding: 18px; }
  .demand-row { flex-wrap: wrap; }
  .demand-counts { white-space: normal; }
}
