/* ============================================================
   LAWLY — AI Legal Notice Generator
   Design system: Inter / Professional / AI-first consumer
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  /* Palette */
  --bg:        #fafafa;
  --surface:   #ffffff;
  --border:    #e5e5e5;
  --border-h:  #d4d4d4;
  --text:      #171717;
  --text-2:    #525252;
  --text-3:    #a3a3a3;
  --accent:    #171717;
  --accent-fg: #ffffff;
  --accent-h:  #404040;
  --green:     #16a34a;
  --green-bg:  #f0fdf4;
  --green-bdr: #bbf7d0;
  --amber:     #d97706;
  --amber-bg:  #fffbeb;
  --amber-bdr: #fde68a;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --red-bdr:   #fecaca;
  --blue:      #2563eb;
  --blue-bg:   #eff6ff;
  --blue-bdr:  #bfdbfe;
  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
  /* Transition */
  --ease: cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Steps (show/hide) ─────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }
.hidden { display: none !important; }

/* ── Progress bar ──────────────────────────────────────────── */
.progress-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) var(--space-6);
}
.progress-steps {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  max-width: 600px;
  margin: 0 auto;
}
.p-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-3);
  transition: color .2s var(--ease);
}
.p-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-3);
  transition: all .2s var(--ease);
}
.p-step small { display: none; }
.p-step.active span { background: var(--accent); color: var(--accent-fg); }
.p-step.active { color: var(--text); font-weight: 500; }
.p-step.active small { display: inline; }
.p-step.done span { background: var(--green); color: #fff; }
.p-step.done { color: var(--text-2); }

@media (min-width: 640px) {
  .p-step small { display: inline; }
}

/* ── Landing ───────────────────────────────────────────────── */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}
.landing-content {
  max-width: 620px;
  text-align: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: var(--space-1) var(--space-4);
  margin-bottom: var(--space-6);
}
.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.landing h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-5);
}
.landing-sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: var(--space-8);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.landing-proof {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proof-item strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.proof-item span {
  font-size: 13px;
  color: var(--text-3);
}
.jago-banner {
  margin-top: var(--space-8);
  display: flex;
  justify-content: center;
}
.jago-img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.08));
  transition: transform .2s ease;
}
.jago-img:hover {
  transform: scale(1.05);
}
.landing-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.landing-badges span {
  font-size: 12px;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-3);
}

/* ── Card ──────────────────────────────────────────────────── */
.card {
  max-width: 680px;
  margin: var(--space-10) auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
/* Flush card: no bg/border/shadow for full-page feel */
.card.card-flush {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: var(--space-8) var(--space-4);
}
.card-header { margin-bottom: var(--space-6); }
.card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}
.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.card-sub {
  color: var(--text-2);
  font-size: 14px;
}
.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-8);
  gap: var(--space-3);
}

@media (max-width: 740px) {
  .card { margin: var(--space-4); padding: var(--space-5); border-radius: var(--r-md); }
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--bg); }
.btn-sm { font-size: 13px; padding: 6px 14px; }
.btn-lg { font-size: 16px; padding: 14px 28px; font-weight: 600; border-radius: var(--r-md); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text);
}
.req { color: var(--red); }
.opt { color: var(--text-3); font-weight: 400; }
.hint { display: block; font-size: 13px; color: var(--text-3); margin-top: var(--space-1); }

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,23,23,.08);
}
textarea { resize: vertical; }
select { cursor: pointer; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── Dynamic list (timeline, evidence) ─────────────────────── */
.dynamic-list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.dynamic-list .item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
}
.dynamic-list .item .remove {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
}
.dynamic-list .item .remove:hover { color: var(--red); }
.add-row {
  display: flex;
  gap: var(--space-2);
}
.add-row input { flex: 1; }
.add-row .btn { flex-shrink: 0; }

/* ── Composer (textarea + toolbar) ─────────────────────────── */
.composer {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,23,23,.08);
}
.composer textarea {
  border: none;
  border-radius: 0;
  padding: var(--space-4);
  min-height: 120px;
}
.composer textarea:focus { box-shadow: none; }
.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.composer-right { display: flex; gap: var(--space-2); }
.composer-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.composer-btn:hover { background: var(--surface); color: var(--text); }
.composer-btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.composer-btn-primary:hover { background: var(--accent-h); }
.composer-btn.recording { color: var(--red); animation: pulse 1s infinite; }

/* ── Upload file list ──────────────────────────────────────── */
.upload-file-list { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
.upload-file-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--bg);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.upload-file-item .remove { margin-left: auto; cursor: pointer; color: var(--text-3); }
.upload-file-item .remove:hover { color: var(--red); }

/* ── Loading card ──────────────────────────────────────────── */
.loading-card {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto var(--space-6);
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-stages {
  max-width: 360px;
  margin: var(--space-6) auto 0;
  text-align: left;
}
.stage {
  font-size: 14px;
  color: var(--text-3);
  padding: var(--space-2) 0;
  position: relative;
  padding-left: var(--space-6);
  transition: color .3s var(--ease);
}
.stage::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all .3s var(--ease);
}
.stage.active { color: var(--text); font-weight: 500; }
.stage.active::before { border-color: var(--accent); background: var(--accent); }
.stage.done { color: var(--green); }
.stage.done::before { border-color: var(--green); background: var(--green); }
.loading-tip {
  margin-top: var(--space-6);
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  padding: var(--space-3) var(--space-4);
  background: var(--blue-bg);
  border: 1px solid var(--blue-bdr);
  border-radius: var(--r-md);
  text-align: center;
  line-height: 1.5;
}

/* ── Found data grid ───────────────────────────────────────── */
.found-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.found-card {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.found-card h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.found-card p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.found-card.success {
  border-color: var(--green-bdr);
  background: var(--green-bg);
}
.found-card.success h4 { color: var(--green); }
.found-card.warn p.not-found { color: var(--text-3); }
@media (max-width: 540px) {
  .found-grid { grid-template-columns: 1fr; }
}

/* ── Case strength ─────────────────────────────────────────── */
.case-strength-box {
  padding: var(--space-5) var(--space-6);
  border-radius: var(--r-md);
  margin-bottom: var(--space-5);
  border: 2px solid var(--border);
}
.case-strength-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.case-strength-box p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.case-strength-box.strong {
  background: var(--green-bg);
  border-color: var(--green);
}
.case-strength-box.strong h3 { color: var(--green); }
.case-strength-box.moderate {
  background: var(--amber-bg);
  border-color: var(--amber);
}
.case-strength-box.moderate h3 { color: var(--amber); }
.case-strength-box.weak {
  background: var(--red-bg);
  border-color: var(--red);
}
.case-strength-box.weak h3 { color: var(--red); }

/* ── Strength nudge ────────────────────────────────────────── */
.strength-nudge { margin-bottom: var(--space-6); }
.strength-nudge-bar {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}
.strength-nudge-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .5s var(--ease);
  background: var(--text-3);
}
.strength-nudge-fill.strong { background: var(--green); }
.strength-nudge-fill.moderate { background: var(--amber); }
.strength-nudge-fill.weak { background: var(--red); }
.strength-nudge-text { font-size: 13px; color: var(--text-3); }

/* ── Questions ─────────────────────────────────────────────── */
.questions-section { margin-bottom: var(--space-4); }
.question-card {
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--space-3);
}
.q-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: var(--space-2);
}
.q-label.critical {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-bdr);
}
.q-label.high {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-bdr);
}
.q-label.medium, .q-label.low {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-bdr);
}
.q-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: var(--space-1);
}
.q-why {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}
.question-card p { font-size: 14px; font-weight: 500; margin-bottom: var(--space-3); }
.question-card textarea {
  min-height: 60px;
  font-size: 14px;
}
.question-card .btn { margin-top: var(--space-2); }
.question-card.answered { border-color: var(--green-bdr); background: var(--green-bg); }

/* ── Value preview ─────────────────────────────────────────── */
.value-preview { margin-bottom: var(--space-4); }
.value-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.vp-item {
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.vp-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.vp-item span {
  font-size: 12px;
  color: var(--text-3);
}
@media (max-width: 540px) {
  .value-preview-grid { grid-template-columns: 1fr; }
}

/* ── Customer controls ─────────────────────────────────────── */
.customer-controls { margin-bottom: var(--space-4); }
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.controls-grid .form-group { margin-bottom: 0; }
@media (max-width: 540px) {
  .controls-grid { grid-template-columns: 1fr; }
}

/* ── Tier cards ────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.tier-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.tier-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.tier-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.tier-card.recommended {
  border-color: var(--accent);
}
.tier-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 12px;
  border-radius: 100px;
}
.tier-price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-1);
}
.tier-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.tier-desc {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: var(--space-5);
}
.tier-features {
  list-style: none;
  margin-bottom: var(--space-5);
}
.tier-features li {
  font-size: 14px;
  padding: var(--space-1) 0;
  position: relative;
  padding-left: var(--space-5);
}
.tier-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}
.tier-feature-dim {
  color: var(--text-3);
}
.tier-feature-dim::before {
  content: '—' !important;
  color: var(--text-3) !important;
}
.tier-nudge {
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
  margin-top: var(--space-3);
}
.tier-urgency {
  text-align: center;
  font-size: 14px;
  color: var(--amber);
  margin-bottom: var(--space-4);
}
.tier-comparison {
  padding: var(--space-5);
  background: var(--bg);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  margin-bottom: var(--space-6);
}
.tier-comparison h4 { margin-bottom: var(--space-2); }
.tier-comparison p { font-size: 14px; color: var(--text-2); }

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

/* ── Final details panel ───────────────────────────────────── */
.final-details-panel {
  padding: var(--space-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-top: var(--space-6);
}
.final-details-panel h4 { margin-bottom: var(--space-1); }

/* ── Generation progress ───────────────────────────────────── */
.gen-progress-wrap {
  max-width: 400px;
  margin: var(--space-6) auto;
}
.gen-progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.gen-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 100px;
  transition: width .4s var(--ease);
}
.gen-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: var(--space-2);
  color: var(--text-2);
}

/* ── Result card ───────────────────────────────────────────── */
.result-header {
  text-align: center;
  margin-bottom: var(--space-6);
}
.result-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  margin-bottom: var(--space-4);
}
.info-box {
  padding: var(--space-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--space-5);
}
.info-box h3 { margin-bottom: var(--space-3); }
.info-box ol {
  padding-left: var(--space-5);
  font-size: 14px;
}
.info-box ol li { margin-bottom: var(--space-2); }
.info-box a { color: var(--blue); text-decoration: underline; }

/* ── Upsell ────────────────────────────────────────────────── */
.upsell-box {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--blue-bg);
  border: 1px solid var(--blue-bdr);
  border-radius: var(--r-md);
}
.upsell-box h4 { color: var(--blue); }
.upsell-box p { font-size: 14px; color: var(--text-2); margin-bottom: var(--space-4); }

/* ── Lawyer status timeline ────────────────────────────────── */
.status-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.status-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--text-3);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.status-step.done .dot { background: var(--green); border-color: var(--green); }
.status-step.done { color: var(--green); }
.status-step.active .dot { border-color: var(--accent); animation: pulse 2s infinite; }
.status-step.active { color: var(--text); font-weight: 500; }
.lawyer-note {
  font-size: 14px;
  color: var(--text-2);
  margin-top: var(--space-3);
}

/* ── Notice preview ────────────────────────────────────────── */
.notice-preview {
  margin-bottom: var(--space-5);
}
.notice-preview summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  padding: var(--space-3) 0;
}
.notice-preview summary:hover { color: var(--text); }
.notice-preview pre {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--space-5);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 500px;
  overflow-y: auto;
}

/* ── Error overlay ─────────────────────────────────────────── */
.error-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.error-box {
  background: var(--surface);
  border: 1px solid var(--red-bdr);
  border-radius: var(--r-lg);
  padding: var(--space-8);
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.error-box h3 { color: var(--red); margin-bottom: var(--space-3); }
.error-box p { font-size: 14px; color: var(--text-2); margin-bottom: var(--space-5); }

/* ── Responsive helpers ────────────────────────────────────── */
@media (max-width: 480px) {
  .landing-proof { flex-direction: column; gap: var(--space-4); align-items: center; }
  .btn-lg { width: 100%; justify-content: center; }
}

/* ── Company lookup ─────────────────────────────────────────── */
.lookup-result {
  padding: var(--space-4);
  background: var(--green-bg);
  border: 1px solid var(--green-bdr);
  border-radius: var(--r-md);
  margin-bottom: var(--space-5);
}
.lookup-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--green);
}
.lookup-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lookup-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.lookup-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lookup-row strong {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lookup-row span {
  font-size: 14px;
  color: var(--text);
}
.lookup-loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}
.loader-sm {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* ── Step header (used in flush steps) ─────────────────────── */
.step-header {
  margin-bottom: var(--space-8);
}
.step-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.step-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Form sections & dividers ─────────────────────────────── */
.form-section {
  margin-bottom: var(--space-6);
}
.section-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--text);
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: var(--space-5);
}
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-2);
}
.field-label svg {
  color: var(--text-3);
  flex-shrink: 0;
}
.field-hint {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* ── Hero composer (step 3) ────────────────────────────────── */
.composer-hero {
  border: 2px solid var(--border-h);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.composer-hero:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(23,23,23,.06), var(--shadow-md);
}
.composer-hero textarea {
  min-height: 240px;
  font-size: 16px;
  line-height: 1.7;
  padding: var(--space-6) var(--space-5);
}

/* ── Resolution textarea ───────────────────────────────────── */
.resolution-textarea {
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--space-4) var(--space-4);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.resolution-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,23,23,.06);
}

/* ── Accessibility ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

/* ── Use-cases grid (SEO landing) ──────────────────────────── */
.use-cases-section {
  margin-top: var(--space-10, 3.5rem);
  text-align: center;
}
.use-cases-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: var(--space-6, 1.5rem);
}
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3, 0.75rem);
}
.uc-card {
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 10px);
  padding: var(--space-4, 1rem) var(--space-4, 1rem);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.uc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transform: translateY(-2px);
}
.uc-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}
.uc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #171717);
  text-align: left;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .use-cases-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .use-cases-grid { grid-template-columns: 1fr; }
  .use-cases-heading { font-size: 1.15rem; }
}

/* ── FAQ section (AEO) ─────────────────────────────────────── */
.faq-section {
  margin-top: var(--space-10, 3.5rem);
  text-align: left;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.faq-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  text-align: center;
  margin-bottom: var(--space-6, 1.5rem);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  margin-bottom: var(--space-3, 0.75rem);
  overflow: hidden;
}
.faq-item summary {
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--fg);
}
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 var(--space-5, 1.25rem) var(--space-4, 1rem);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
}
