:root {
  --ink: #102a36;
  --muted: #5d7380;
  --paper: #f7fbfa;
  --white: #ffffff;
  --teal: #087f79;
  --teal-dark: #075f5c;
  --mint: #dff5ef;
  --mint-2: #effaf7;
  --coral: #df6f5e;
  --gold: #d5a93d;
  --line: #d6e5e1;
  --danger: #9f342c;
  --shadow: 0 18px 55px rgba(25, 65, 72, 0.13);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 44px; }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }

.crisis {
  background: #173b49;
  color: #fff;
  padding: .62rem 1rem;
  text-align: center;
  font-size: .86rem;
}
.crisis a { color: #d8fff5; font-weight: 800; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 4rem);
  background: rgba(247, 251, 250, .94);
  border-bottom: 1px solid rgba(214, 229, 225, .85);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 900; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 14px; color: white;
  background: linear-gradient(145deg, var(--teal), #36a99d);
  box-shadow: 0 8px 22px rgba(8,127,121,.28);
}
.brand span small { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 1.2rem; }
.site-nav a { text-decoration: none; font-weight: 750; font-size: .9rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .75rem 1.05rem; border: 0; border-radius: 999px;
  color: #fff; background: var(--teal); font-weight: 850; text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--teal-dark); }
.button.secondary { color: var(--teal-dark); background: var(--mint); }
.button.ghost { color: var(--teal-dark); background: transparent; border: 1px solid var(--line); }

.hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, .86fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.2rem, 6vw, 6rem);
  background:
    radial-gradient(circle at 82% 10%, rgba(83, 184, 167, .28), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(223, 111, 94, .12), transparent 25%),
    linear-gradient(180deg, #fbfffe, #f0faf7);
}
.eyebrow { margin: 0 0 1rem; color: var(--teal); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: .76rem; }
h1 { margin: 0; max-width: 850px; font-size: clamp(2.65rem, 6.3vw, 5.8rem); line-height: .98; letter-spacing: -.055em; }
h1 em { color: var(--teal); font-style: normal; }
.lede { max-width: 730px; margin: 1.45rem 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: .7rem 1.3rem; margin-top: 1.6rem; color: var(--muted); font-size: .85rem; font-weight: 700; }
.trust-row span::before { content: "✓"; color: var(--teal); margin-right: .45rem; }

.dashboard-preview {
  position: relative;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  padding: 1rem;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  transform: rotate(1.3deg);
}
.preview-shell { overflow: hidden; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.preview-top { display:flex; align-items:center; justify-content:space-between; padding: .9rem 1rem; background:#123b47; color:#fff; }
.preview-dots { display:flex; gap:.35rem; }
.preview-dots i { width:8px; height:8px; border-radius:50%; background:#75c9bc; }
.preview-body { display:grid; grid-template-columns: 105px 1fr; min-height: 350px; }
.preview-side { padding: 1rem .7rem; background:#edf8f5; display:grid; align-content:start; gap:.7rem; }
.preview-side span { height:9px; border-radius:9px; background:#a9d9cf; }
.preview-main { padding:1rem; }
.preview-banner { padding:.8rem; border-radius:12px; background:#fff3d6; color:#795412; font-size:.72rem; font-weight:800; }
.preview-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:.6rem; margin:.8rem 0; }
.preview-stat { padding:.8rem; border-radius:12px; background:#f1f8f6; }
.preview-stat strong { display:block; font-size:1.35rem; }
.preview-list { display:grid; gap:.55rem; }
.preview-row { height:46px; border-radius:12px; border:1px solid var(--line); background:linear-gradient(90deg,#fff,#f6fbfa); }

.section { padding: clamp(4rem, 7vw, 7rem) clamp(1.2rem, 6vw, 6rem); }
.feature-hero {
  padding:clamp(4rem,9vw,8rem) clamp(1.2rem,10vw,10rem);
  background:radial-gradient(circle at 85% 15%,rgba(83,184,167,.28),transparent 28%),linear-gradient(180deg,#fbfffe,#edf8f5);
}
.feature-hero h1 { max-width:980px; font-size:clamp(2.6rem,6vw,5.5rem); }
.reading { max-width:1180px; margin:0 auto; }
.reading > p { max-width:850px; font-size:1.05rem; }
.feature-grid.compact { grid-template-columns:repeat(2,minmax(0,1fr)); margin:2rem 0 3rem; }
.legal-page { max-width:900px; margin:0 auto; padding:clamp(3rem,7vw,6rem) 1.2rem; }
.legal-page h1 { font-size:clamp(2.5rem,6vw,4.8rem); margin-bottom:2rem; }
.legal-page h2 { margin-top:2.2rem; font-size:1.45rem; }
.legal-page p { color:var(--muted); line-height:1.75; }
.section.alt { background: #edf7f4; }
.section-head { max-width: 790px; margin-bottom: 2.2rem; }
.section h2 { margin: .2rem 0 .8rem; font-size: clamp(2rem, 4vw, 3.7rem); letter-spacing: -.045em; line-height: 1.05; }
.section-head p, .section > p { color: var(--muted); line-height: 1.7; }
.feature-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.card { border:1px solid var(--line); border-radius:var(--radius); background:var(--white); padding:1.35rem; box-shadow:0 10px 32px rgba(25,65,72,.07); }
.card .icon { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; background:var(--mint); color:var(--teal-dark); font-size:1.3rem; }
.card h3 { margin:1rem 0 .5rem; font-size:1.06rem; }
.card p { color:var(--muted); font-size:.92rem; line-height:1.6; }
.pill { display:inline-flex; padding:.28rem .58rem; border-radius:999px; background:var(--mint); color:var(--teal-dark); font-size:.72rem; font-weight:900; }

.workflow { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.7rem; counter-reset:step; }
.workflow article { position:relative; padding:1.1rem; border-radius:18px; background:#fff; border:1px solid var(--line); }
.workflow article::before { counter-increment:step; content:counter(step); display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--teal); color:#fff; font-weight:900; }
.workflow h3 { font-size:.95rem; }
.workflow p { color:var(--muted); font-size:.82rem; line-height:1.5; }

.compliance-panel { display:grid; grid-template-columns:.85fr 1.15fr; gap:2rem; align-items:center; border-radius:30px; padding:clamp(1.5rem,4vw,3rem); background:#113b48; color:#fff; }
.compliance-panel p { color:#c9e2e6; line-height:1.65; }
.checklist { display:grid; gap:.7rem; }
.checklist div { padding:.8rem 1rem; border-radius:13px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); }
.checklist div::before { content:"○"; color:#74d3c2; margin-right:.6rem; font-weight:900; }

.plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.plan { position:relative; }
.plan.featured { border:2px solid var(--teal); transform:translateY(-7px); }
.plan ul { padding-left:1.2rem; color:var(--muted); line-height:1.8; }
.plan .price { font-size:2rem; font-weight:950; }
.plan .price small { font-size:.8rem; color:var(--muted); }
.faq-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.faq-grid details { border:1px solid var(--line); border-radius:18px; padding:1rem 1.15rem; background:#fff; }
.faq-grid summary { cursor:pointer; font-weight:900; line-height:1.4; }
.faq-grid p { color:var(--muted); line-height:1.65; }

.lead-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; max-width:850px; }
.field { display:grid; gap:.4rem; }
.field.full { grid-column:1/-1; }
.field label { font-size:.84rem; font-weight:850; }
.field input, .field select, .field textarea {
  width:100%; border:1px solid #bfd3ce; border-radius:13px; padding:.78rem .85rem; background:#fff; color:var(--ink);
}
.field textarea { min-height:120px; resize:vertical; }
.check-field { display:flex; align-items:flex-start; gap:.65rem; grid-column:1/-1; color:var(--muted); font-size:.84rem; line-height:1.5; }
.check-field input { width:20px; height:20px; flex:0 0 auto; }
.form-note { grid-column:1/-1; padding:.8rem 1rem; border-radius:12px; background:#fff2ee; color:#77392f; font-size:.82rem; }
.form-status { min-height:1.5rem; grid-column:1/-1; font-weight:800; }

.site-footer { padding:2.2rem clamp(1.2rem,6vw,6rem); background:#0d2f3a; color:#d8e8eb; display:flex; flex-wrap:wrap; justify-content:space-between; gap:1rem; }
.site-footer nav { display:flex; flex-wrap:wrap; gap:1rem; }

/* Protected workspace */
.app-body { background:#edf4f2; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:260px 1fr; }
.app-sidebar { position:sticky; top:0; height:100vh; padding:1.1rem; background:#0e3541; color:#fff; }
.app-sidebar .brand { color:#fff; margin-bottom:1.5rem; }
.app-nav { display:grid; gap:.35rem; }
.app-nav button { width:100%; text-align:left; border:0; border-radius:12px; padding:.72rem .82rem; color:#d7e9ec; background:transparent; cursor:pointer; font-weight:750; }
.app-nav button:hover, .app-nav button.active { background:rgba(102,210,192,.18); color:#fff; }
.sidebar-foot { position:absolute; bottom:1rem; left:1rem; right:1rem; color:#a9c6cc; font-size:.76rem; line-height:1.5; }
.app-main { min-width:0; }
.app-topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.5rem; background:#fff; border-bottom:1px solid var(--line); }
.app-topbar select { max-width:280px; border:1px solid var(--line); border-radius:10px; padding:.55rem; }
.topbar-actions { display:flex; align-items:center; gap:.7rem; }
.small-muted { color:var(--muted); font-size:.78rem; margin-top:.15rem; }
.app-content { padding:1.4rem; }
.gate { display:flex; justify-content:space-between; gap:1rem; align-items:center; padding:1rem 1.2rem; border-radius:16px; background:#fff3d6; border:1px solid #efd487; color:#6b4b0b; margin-bottom:1rem; }
.gate strong { display:block; }
.stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.stat-card { padding:1.1rem; border-radius:18px; background:#fff; border:1px solid var(--line); }
.stat-card span { color:var(--muted); font-size:.78rem; font-weight:800; }
.stat-card strong { display:block; margin-top:.3rem; font-size:1.8rem; }
.panel { margin-top:1rem; border:1px solid var(--line); border-radius:20px; background:#fff; overflow:hidden; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:1rem 1.15rem; border-bottom:1px solid var(--line); }
.panel-head h2 { margin:0; font-size:1.05rem; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding:.8rem 1rem; border-bottom:1px solid #edf2f0; text-align:left; white-space:nowrap; font-size:.86rem; }
th { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; }
.status { display:inline-flex; border-radius:999px; padding:.25rem .55rem; background:var(--mint); color:var(--teal-dark); font-size:.7rem; font-weight:900; }
.status.warn { background:#fff1ce; color:#76510a; }
.empty { padding:2rem; text-align:center; color:var(--muted); }
.view-title { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.view-title h1 { font-size:clamp(1.7rem,3vw,2.5rem); letter-spacing:-.03em; }
.view-title p { margin:.3rem 0 0; color:var(--muted); }
.compliance-list { display:grid; gap:.6rem; padding:1rem; }
.control { display:grid; grid-template-columns:1fr auto; gap:1rem; padding:.8rem; border:1px solid var(--line); border-radius:12px; }
.control small { display:block; margin-top:.28rem; color:var(--muted); }
.text-button { border:0; background:transparent; color:var(--teal-dark); padding:.35rem; font-weight:850; text-decoration:underline; cursor:pointer; }
.loading-card, .error-card { max-width:720px; margin:3rem auto; padding:2rem; border:1px solid var(--line); border-radius:22px; background:#fff; box-shadow:var(--shadow); }
.compliance-progress { padding:1.2rem; color:var(--muted); }
.compliance-progress strong { color:var(--ink); font-size:1.5rem; }
.dialog-actions { display:flex; justify-content:flex-end; gap:.65rem; padding:1rem 1.2rem; border-top:1px solid var(--line); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

dialog { width:min(620px,calc(100% - 2rem)); border:0; border-radius:22px; padding:0; box-shadow:var(--shadow); }
dialog::backdrop { background:rgba(9,35,43,.62); backdrop-filter:blur(3px); }
.dialog-head { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.2rem; border-bottom:1px solid var(--line); }
.dialog-head h2 { margin:0; font-size:1.1rem; }
.dialog-head button { border:0; background:transparent; font-size:1.4rem; cursor:pointer; }
.dialog-body { padding:1.2rem; display:grid; gap:.9rem; }

@media (max-width: 1050px) {
  .feature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 780px) {
  .site-nav a:not(.button) { display:none; }
  .hero { grid-template-columns:1fr; }
  .dashboard-preview { transform:none; }
  .compliance-panel, .plans { grid-template-columns:1fr; }
  .plan.featured { transform:none; }
  .app-shell { grid-template-columns:1fr; }
  .app-sidebar { position:static; height:auto; }
  .app-nav { grid-template-columns:repeat(4,minmax(0,1fr)); overflow:auto; }
  .app-nav button { text-align:center; font-size:.75rem; }
  .sidebar-foot { display:none; }
}
@media (max-width: 620px) {
  .feature-grid, .feature-grid.compact, .workflow, .lead-form, .stat-grid, .faq-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .preview-body { grid-template-columns:80px 1fr; }
  h1 { font-size:2.65rem; }
  .site-header { align-items:flex-start; }
  .brand span small { display:none; }
  .app-topbar { align-items:flex-start; flex-direction:column; }
  .topbar-actions { width:100%; align-items:stretch; flex-direction:column; }
  .app-topbar select { max-width:none; width:100%; }
  .gate { align-items:flex-start; flex-direction:column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
