/* DemoDeployer_Token Launch — self-contained styles (law-firm: navy / gold / cream) */
:root {
  --navy: #16263f;
  --navy-deep: #0e1b2e;
  --gold: #b08d57;
  --gold-soft: #c9a96a;
  --cream: #f7f4ef;
  --paper: #ffffff;
  --ink: #1d2733;
  --muted: #5b6878;
  --line: #e3ddd2;
  --shadow: 0 8px 28px rgba(16, 27, 46, 0.08);
  --radius: 14px;

  --sev-low: #2f855a;      --sev-low-bg: #e6f4ec;
  --sev-medium: #b7791f;   --sev-medium-bg: #fbf2dd;
  --sev-high: #c05621;     --sev-high-bg: #fbe8da;
  --sev-critical: #b02a37; --sev-critical-bg: #f7dfe1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; color: var(--navy); letter-spacing: 0.2px; }
h1 { font-size: 2.4rem; line-height: 1.1; margin: 0 0 0.4rem; }
h2 { font-size: 1.7rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.35rem; }
p { margin: 0 0 0.8rem; }
a { color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Layout */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 940px; margin: 0 auto; padding: 2rem 1.25rem 3rem; flex: 1; }

/* Header */
.app-header { background: var(--navy); color: var(--cream); border-bottom: 3px solid var(--gold); }
.app-header-inner { max-width: 1040px; margin: 0 auto; padding: 0.85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--cream); }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-sep { width: 1px; height: 26px; background: rgba(247, 244, 239, 0.35); }
.brand-text { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 700; color: var(--cream); }

/* Slim "does not replace legal services" ribbon under the header */
.notice-ribbon { background: var(--gold); color: var(--navy-deep); text-align: center; font-size: 0.82rem; font-weight: 600; padding: 0.4rem 1rem; }
.header-actions { display: flex; align-items: center; gap: 0.9rem; }
.lang-toggle { display: inline-flex; border: 1px solid rgba(247,244,239,.35); border-radius: 999px; overflow: hidden; }
.lang-toggle button { background: transparent; color: var(--cream); border: 0; padding: 0.3rem 0.7rem; font: inherit; font-size: 0.82rem; cursor: pointer; }
.lang-toggle button.is-active { background: var(--gold); color: var(--navy-deep); font-weight: 600; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.6rem; margin-bottom: 1.25rem; }
.card.accent { border-top: 3px solid var(--gold); }
.kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 0.72rem; color: var(--gold); font-weight: 700; margin-bottom: 0.5rem; }

/* Hero */
.hero { background: linear-gradient(180deg, #fff, var(--cream)); }
.hero .lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }

/* Disclaimer */
.disclaimer-box { background: #fbf7f0; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 1rem 1.1rem; margin: 1rem 0; font-size: 0.92rem; }
.accept-row { display: flex; align-items: flex-start; gap: 0.6rem; margin: 1rem 0; }
.accept-row input { margin-top: 0.25rem; width: 18px; height: 18px; accent-color: var(--navy); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: inherit; font-weight: 600; border-radius: 999px; padding: 0.7rem 1.4rem; cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--gold); color: var(--navy-deep); }
.btn-primary:disabled { background: #b7bdc7; cursor: not-allowed; color: #eef1f4; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); padding: 0.5rem 1rem; }
.btn-ghost:hover { color: var(--navy); border-color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.1rem; }

/* Progress */
.progress { margin-bottom: 1.3rem; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.progress-track { height: 8px; background: #eae4d9; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 999px; transition: width .25s; }
.steps { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.7rem; }
.step-dot { font-size: 0.72rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: #efe9de; color: var(--muted); }
.step-dot.is-active { background: var(--navy); color: var(--cream); }
.step-dot.is-done { background: var(--sev-low-bg); color: var(--sev-low); }

/* Questions */
.q { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q-label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
.q-help { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.q input[type=text], .q input[type=date], .q input[type=email], .q select, .field input, .field select, .field textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; color: var(--ink);
}
.q input:focus, .q select:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold-soft); outline-offset: 1px; border-color: var(--gold); }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.85rem; cursor: pointer; background: #fff; font-size: 0.9rem; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill.checked { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.pill.checked.multi { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }

/* Report */
.report-title { border-bottom: 2px solid var(--gold); padding-bottom: 0.6rem; margin-bottom: 0.4rem; }
.report-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }
.section { margin-bottom: 1.15rem; }
.section h3 { display: flex; align-items: baseline; gap: 0.5rem; }
.section h3 .num { font-size: 0.8rem; color: var(--gold); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0; }
.chip { background: #f0ece3; border: 1px solid var(--line); border-radius: 8px; padding: 0.25rem 0.6rem; font-size: 0.85rem; }
ul.clean { margin: 0.3rem 0; padding-left: 1.2rem; }
ul.clean li { margin-bottom: 0.3rem; }
ol.pathway { margin: 0.3rem 0; padding-left: 1.3rem; }
ol.pathway li { margin-bottom: 0.35rem; }

/* Score gauge */
.gauge { margin: 0.4rem 0 0.2rem; }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.gauge-value { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--navy); font-weight: 700; }
.gauge-track { position: relative; height: 12px; border-radius: 999px; margin: 0.6rem 0; background: linear-gradient(90deg, var(--sev-low) 0%, var(--sev-medium) 40%, var(--sev-high) 70%, var(--sev-critical) 100%); }
.gauge-marker { position: absolute; top: -4px; width: 4px; height: 20px; background: var(--navy-deep); border-radius: 2px; box-shadow: 0 0 0 2px #fff; transform: translateX(-2px); }
.band { display: inline-block; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.85rem; }
.band.lower { background: var(--sev-low-bg); color: var(--sev-low); }
.band.moderate { background: var(--sev-medium-bg); color: var(--sev-medium); }
.band.high { background: var(--sev-high-bg); color: var(--sev-high); }
.band.critical { background: var(--sev-critical-bg); color: var(--sev-critical); }

/* Red flag table */
table.flags { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.flags th, table.flags td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.flags th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.badge.low { background: var(--sev-low-bg); color: var(--sev-low); }
.badge.medium { background: var(--sev-medium-bg); color: var(--sev-medium); }
.badge.high { background: var(--sev-high-bg); color: var(--sev-high); }
.badge.critical { background: var(--sev-critical-bg); color: var(--sev-critical); }
.flags-empty { color: var(--sev-low); background: var(--sev-low-bg); padding: 0.6rem 0.8rem; border-radius: 9px; }

/* Warnings / inconsistencies */
.warn { background: var(--sev-medium-bg); border: 1px solid #eddcb6; border-radius: 10px; padding: 0.8rem 1rem; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: var(--cream); border-radius: var(--radius); padding: 1.6rem 1.7rem; border-top: 3px solid var(--gold); }
.cta h2 { color: #fff; }
.cta p { color: #d7dce4; }
.cta .btn-primary { background: var(--gold); color: var(--navy-deep); }
.cta .btn-primary:hover { background: var(--gold-soft); }
.cta .btn-secondary { color: #fff; border-color: rgba(255,255,255,.6); }
.cta .btn-secondary:hover { background: #fff; color: var(--navy-deep); }

/* Form */
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.thankyou { text-align: center; padding: 2rem 1rem; }

/* Trust chips on the welcome hero */
.trust-chips { margin: 0.4rem 0 1rem; }
.trust-chips .chip { background: #fff; border-color: var(--gold-soft); color: var(--navy); font-weight: 500; }

/* Firm contact rows (popup, contact page, thank-you) */
.firm-rows { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.9rem 0; align-items: flex-start; }
.thankyou .firm-rows { align-items: center; }
.firm-row { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--navy); text-decoration: none; font-size: 0.93rem; }
a.firm-row:hover { color: var(--gold); }
.firm-ico { width: 1.4rem; text-align: center; }
.firm-card h3 { margin-bottom: 0.4rem; }
.firm-card { border-top: 3px solid var(--gold); }

/* ILP promotional popup */
.modal-backdrop { position: fixed; inset: 0; background: rgba(14, 27, 46, 0.55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 60; animation: fadeIn .25s ease; }
.modal { background: var(--paper); border-radius: var(--radius); max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 24px 64px rgba(14,27,46,.35); animation: slideUp .3s ease; }
.modal-head { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); border-bottom: 3px solid var(--gold); padding: 1.1rem 1.3rem; display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius) var(--radius) 0 0; }
.modal-logo { height: 40px; width: auto; display: block; }
.modal-x { background: transparent; border: 0; color: var(--cream); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.modal-x:hover { color: var(--gold-soft); }
.modal-body { padding: 1.2rem 1.4rem 1.4rem; }
.modal-body h2 { margin-bottom: 0.4rem; }
.modal-points { margin: 0.5rem 0 0.2rem; }
.modal-dismiss { display: block; margin: 0.9rem auto 0; background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 0.85rem; cursor: pointer; text-decoration: underline; }
.modal-dismiss:hover { color: var(--navy); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Footer */
.app-footer { background: var(--navy-deep); color: #c3cad6; font-size: 0.82rem; text-align: center; padding: 0.9rem 1rem; }
.app-footer strong { color: var(--gold-soft); }
.footer-by a { color: var(--gold-soft); text-decoration: none; }
.footer-by a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .app-header-inner { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  table.flags, table.flags thead, table.flags tbody, table.flags th, table.flags td, table.flags tr { display: block; }
  table.flags th { display: none; }
  table.flags td { border: 0; padding: 0.25rem 0; }
  table.flags tr { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
}

/* Print (Export PDF via browser print) */
@media print {
  .no-print, .modal-backdrop { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .cta { background: #fff; color: #000; border: 1px solid #ccc; }
  .cta h2, .cta p { color: #000; }
}
