:root {
  --ink: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --wash: #f6f7fb;
  --brand: #6d28d9;
  --brand-dark: #4c1d95;
  --teal: #0f766e;
  --amber: #d97706;
  --red: #b42318;
  --green: #15803d;
  --shadow: 0 24px 60px rgba(23, 32, 51, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
  font-size: 1.25rem;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  font-size: 1.1rem;
}
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem 1rem; }
.nav a { color: var(--ink); font-weight: 650; text-decoration: none; }
.nav a:hover { color: var(--brand); }

.hero {
  overflow: hidden;
  position: relative;
  padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 12% 15%, rgba(109, 40, 217, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.16), transparent 26rem),
    linear-gradient(180deg, #ffffff, #f6f7fb);
}
.hero-grid, .section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  background: #f5f3ff;
  color: var(--brand-dark);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.035em; }
h1 { margin: 1rem 0; font-size: clamp(2.7rem, 7vw, 5.4rem); }
h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { margin: 0 0 0.55rem; font-size: 1.25rem; }
.lede { color: #475569; font-size: clamp(1.08rem, 2vw, 1.3rem); max-width: 42rem; }
.small { font-size: 0.92rem; }
.muted { color: var(--muted); }
.strong { font-weight: 800; }
.center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.8rem;
  padding: 0.72rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.2);
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.teal { background: var(--teal); box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18); }
.btn.ghost { background: transparent; color: var(--brand-dark); border-color: #ddd6fe; box-shadow: none; }
.btn.small-btn { min-height: 2.25rem; padding: 0.42rem 0.75rem; font-size: 0.9rem; }
.btn.danger { background: #fff1f2; color: var(--red); border-color: #fecdd3; box-shadow: none; }
.btn:disabled { cursor: not-allowed; opacity: 0.5; box-shadow: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

.section {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 5vw, 4rem);
}
.section.white { background: #fff; }
.wrap { max-width: 1180px; margin: 0 auto; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(23, 32, 51, 0.07);
  padding: clamp(1.15rem, 3vw, 2rem);
}
.card.flat { box-shadow: none; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.feature-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.feature-icon { font-size: 1.7rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
}
.step-card { position: relative; padding: 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.step-card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: 0.38rem; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 750; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  padding: 0.72rem 0.85rem;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(109, 40, 217, 0.24);
  outline-offset: 2px;
}
.help { color: var(--muted); font-size: 0.88rem; }
.error { color: var(--red); font-weight: 700; }
.success { color: var(--green); font-weight: 700; }
.notice {
  padding: 1rem;
  border: 1px solid #fde68a;
  border-radius: 16px;
  background: #fffbeb;
  color: #713f12;
}
.info-box {
  padding: 1rem;
  border: 1px solid #ccfbf1;
  border-radius: 16px;
  background: #f0fdfa;
}

.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.4rem; align-items: start; }
.qr-card {
  --accent: var(--brand);
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  text-align: center;
  border: 2px solid var(--accent);
  border-radius: 24px;
  background: #fff;
}
.qr-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.55rem;
  background: var(--accent);
}
.qr-card h3 { margin-top: 0.7rem; font-size: 1.55rem; }
.qr-box {
  width: min(245px, 80vw);
  margin: 1rem auto;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.qr-box svg { display: block; width: 100%; height: auto; }
.stars { color: #f59e0b; letter-spacing: 0.12em; font-size: 1.25rem; }
.route-display { word-break: break-all; font-size: 0.82rem; color: var(--muted); }
.placeholder-qr {
  display: grid;
  place-items: center;
  min-height: 245px;
  padding: 1rem;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  color: var(--muted);
  background: #f8fafc;
}

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: 0.8rem; }
.price { font-size: 2.5rem; font-weight: 950; letter-spacing: -0.05em; }
.price span { font-size: 1rem; color: var(--muted); letter-spacing: 0; }
.price-card.featured { border: 2px solid var(--brand); }
.badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #ede9fe;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.gray { background: #f1f5f9; color: #475569; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.amber { background: #fef3c7; color: #92400e; }
.checkout-panel { margin-top: 1rem; }
.total-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 1.08rem; }
.checkbox-line { display: flex; gap: 0.65rem; align-items: flex-start; }
.checkbox-line input { width: auto; margin-top: 0.3rem; }

.app-shell { max-width: 1240px; margin: 0 auto; padding: 1.2rem clamp(0.8rem, 3vw, 2rem) 3rem; }
.app-title { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.2rem; }
.app-title h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0.35rem 0; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.app-grid .wide { grid-column: 1 / -1; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.metric { padding: 1rem; border-radius: 16px; background: #f8fafc; border: 1px solid var(--line); }
.metric strong { display: block; font-size: 2rem; line-height: 1; letter-spacing: -0.04em; }
.metric span { color: var(--muted); font-size: 0.9rem; }
.trend { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.45rem; align-items: end; min-height: 130px; margin-top: 1rem; }
.trend-day { display: grid; gap: 0.35rem; justify-items: center; color: var(--muted); font-size: 0.78rem; }
.trend-bar { width: 100%; min-height: 5px; border-radius: 999px 999px 3px 3px; background: linear-gradient(180deg, var(--brand), var(--teal)); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #475569; font-size: 0.83rem; text-transform: uppercase; letter-spacing: 0.04em; }
.status {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}
.status.sent { background: #dbeafe; color: #1e40af; }
.status.prepared { background: #fef3c7; color: #92400e; }
.status.review-confirmed { background: #dcfce7; color: #166534; }
.status.private-feedback { background: #fee2e2; color: #991b1b; }
.list { display: grid; gap: 0.8rem; }
.list-item { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.list-item.unresolved { border-color: #fecaca; background: #fff7f7; }
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.tab-button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.55rem 0.85rem; font-weight: 800; }
.tab-button.active { background: var(--ink); color: #fff; }

.route-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at top, #ede9fe, #f6f7fb 55%); }
.route-card { width: min(620px, 100%); text-align: center; }
.route-card .logo-mark { margin: 0 auto; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.choice {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  font-weight: 900;
  font-size: 1.05rem;
}
.choice.positive { border-color: #bbf7d0; background: #f0fdf4; }
.choice.private { border-color: #fecdd3; background: #fff1f2; }
.hidden { display: none !important; }

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
dialog { width: min(560px, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 23, 42, 0.48); }
.footer { padding: 2rem 1rem; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .hero-grid, .section-grid, .qr-layout, .app-grid { grid-template-columns: 1fr; }
  .feature-grid, .steps, .pricing-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .form-grid, .choice-grid, .metric-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2.2rem; }
}

@media print {
  body { background: #fff; }
  .site-header, .no-print, .footer, .toast { display: none !important; }
  .section, .app-shell { padding: 0; }
  .qr-layout, .app-grid { display: block; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .qr-card {
    width: 4.2in;
    margin: 0.4in auto;
    box-shadow: none;
    break-inside: avoid;
  }
}
