:root {
  /* Day 1 Digital — Sage & Stone palette */
  --ink: #2D2D2D;
  --bark: #3D3A34;
  --drift: #8A8272;
  --sage: #6B8F71;
  --sage-dark: #4A6B50;
  --parchment: #FAF8F3;
  --sand: #EDE8DD;
  --sand-light: #F4F0E8;
  --stone: #D9D3C7;
  --white: #FFFFFF;
  --green: #6B8F71;
  --red: #C0392B;
  --radius: 16px;
  --max: 620px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--parchment);
  color: var(--bark);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 28px 22px 60px; }

/* ---------- brand row ---------- */
.brand-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 44px; }
.brand { font-family: "Montserrat", sans-serif; font-weight: 900; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand-sub { font-size: 0.85rem; color: var(--drift); font-weight: 500; }

/* ---------- hero ---------- */
.eyebrow { color: var(--sage); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-family: "Montserrat", sans-serif; font-size: clamp(2.6rem, 11vw, 3.8rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 18px; color: var(--ink); }
.amber { color: var(--sage); }
.lede { color: var(--drift); font-size: 1.05rem; max-width: 30em; margin-bottom: 30px; line-height: 1.6; }

/* ---------- cards / form ---------- */
.card { background: var(--sand); border: 1px solid var(--stone); border-radius: var(--radius); padding: 22px; }
.form-card { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--bark); }
.field .opt { font-weight: 400; color: var(--drift); }
input, select {
  background: var(--white); border: 1px solid var(--stone); border-radius: 11px;
  color: var(--bark); padding: 14px 15px; font-size: 1rem; font-family: inherit; width: 100%;
}
input::placeholder { color: var(--drift); }
input:focus, select:focus { outline: none; border-color: var(--sage); }
select { appearance: none; -webkit-appearance: none; }

.cta {
  background: var(--sage); color: var(--white); border: none; border-radius: 12px;
  padding: 16px; font-size: 1.05rem; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all .2s ease; width: 100%;
}
.cta:hover { background: var(--sage-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(107, 143, 113, 0.25); }
.cta:active { transform: translateY(0); }
.cta:disabled { opacity: .5; cursor: default; }
.cta-block { display: block; text-align: center; text-decoration: none; margin-top: 18px; }

.reassure { color: var(--drift); font-size: 0.82rem; text-align: center; }
.error { color: var(--red); font-size: 0.88rem; font-weight: 500; }

/* ---------- how / pillars explainer ---------- */
.how { margin-top: 56px; }
.how h2 { font-family: "Montserrat", sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -0.02em; color: var(--ink); }
.pillars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pillar-explainer { background: var(--sand); border: 1px solid var(--stone); border-radius: 13px; padding: 16px; }
.p-num { display: block; color: var(--sage); font-weight: 800; font-size: 0.95rem; margin-bottom: 6px; }
.pillar-explainer p { font-size: 0.9rem; color: var(--drift); line-height: 1.55; }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--stone); color: var(--drift); font-size: 0.85rem; }
.foot-url { color: var(--ink); font-weight: 600; }

/* ---------- scanning overlay ---------- */
.overlay { position: fixed; inset: 0; background: rgba(250, 248, 243, .96); display: flex; align-items: center; justify-content: center; z-index: 50; }
.overlay[hidden] { display: none; }
.scanner { text-align: center; }
.ring { width: 64px; height: 64px; border: 4px solid var(--stone); border-top-color: var(--sage); border-radius: 50%; margin: 0 auto 22px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#scan-status { color: var(--bark); font-weight: 500; }

/* ================= REPORT ================= */
.result { margin-top: 8px; }
.biz-name { font-family: "Montserrat", sans-serif; font-size: clamp(1.8rem, 7vw, 2.4rem); font-weight: 900; letter-spacing: -0.02em; margin: 4px 0 18px; color: var(--ink); }

.score-hero { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.score-num { font-family: "Montserrat", sans-serif; font-size: clamp(5rem, 26vw, 8rem); font-weight: 900; line-height: 0.85; color: var(--sage); letter-spacing: -0.04em; }
.score-meta { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; }
.score-denom { color: var(--drift); font-weight: 800; font-size: 1.4rem; }
.grade { font-weight: 700; font-size: 0.9rem; padding: 4px 12px; border-radius: 20px; width: fit-content; letter-spacing: 0.05em; }
.grade-A, .grade-B { background: rgba(107, 143, 113, .16); color: var(--sage); }
.grade-C, .grade-D { background: rgba(138, 130, 114, .16); color: var(--drift); }
.grade-F { background: rgba(192, 57, 43, .12); color: var(--red); }

.headline { font-family: "Montserrat", sans-serif; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; color: var(--ink); }
.summary { color: var(--drift); margin-bottom: 32px; line-height: 1.6; }

/* pillar rows */
.pillars { display: flex; flex-direction: column; gap: 22px; margin-bottom: 38px; }
.pillar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.pillar-name { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.pillar-score { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.pillar-score span { color: var(--drift); font-size: 0.85rem; font-weight: 600; }
.bar { background: var(--stone); border-radius: 99px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 99px; background: var(--sage); transition: width 1s cubic-bezier(.2,.7,.3,1); }
.pillar-note { color: var(--drift); font-size: 0.9rem; margin-top: 9px; line-height: 1.55; }

/* fixes */
.fixes-block { margin-bottom: 40px; }
.fixes-block h2 { font-family: "Montserrat", sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; letter-spacing: -0.02em; color: var(--ink); }
.fixes { list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: fix; }
.fixes li { background: var(--sand); border: 1px solid var(--stone); border-left: 3px solid var(--sage); border-radius: 12px; padding: 16px 18px; position: relative; }
.fix-action { display: block; font-weight: 700; margin-bottom: 5px; color: var(--ink); }
.fix-why { display: block; color: var(--drift); font-size: 0.92rem; margin-bottom: 10px; line-height: 1.55; }
.fix-tag { display: inline-block; background: rgba(107, 143, 113, .14); color: var(--sage-dark); font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.cost-line { margin-top: 18px; font-weight: 600; color: var(--ink); font-size: 1.02rem; }

.gate { text-align: center; }
.gate-lede { font-weight: 700; margin-bottom: 16px; color: var(--ink); }
.gate .field { margin-bottom: 12px; text-align: left; }

/* share */
.share-block h2 { font-family: "Montserrat", sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.02em; color: var(--ink); }
.share-cards figure { margin: 0 auto; max-width: 320px; }
.share-cards img { width: 100%; border-radius: 14px; border: 1px solid var(--stone); display: block; }
.share-cards figcaption { text-align: center; color: var(--drift); font-size: 0.82rem; margin-top: 8px; }
.share-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ghost-btn { flex: 1; text-align: center; background: var(--sand); border: 1px solid var(--stone); color: var(--ink); text-decoration: none; padding: 13px; border-radius: 11px; font-weight: 600; font-size: 0.92rem; white-space: nowrap; transition: all .2s ease; }
.ghost-btn:hover { border-color: var(--sage); color: var(--sage-dark); }

@media (max-width: 420px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
  .ring { animation-duration: 2s; }
}
