:root {
  --iris: #4A3F8F;
  --iris-deep: #3B3273;
  --iris-tint: #E8E6F2;
  --apricot: #E08A5C;
  --ink: #171429;
  --muted: #5E5872;
  --soft: #7A748D;
  --paper: #F6F4F1;
  --surface: #FFFFFF;
  --line: #E4E0DA;
  --resolved: #3F7D5C;
  --overdue: #B8462F;
  --max: 1180px;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--iris);
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--apricot); }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,244,241,.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(228,224,218,.72);
}
.nav-shell {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-word {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 25px;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--iris);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #514B64;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover {
  color: var(--ink);
  background: rgba(255,255,255,.65);
}
.nav-links a.active {
  color: var(--iris);
  background: rgba(232,230,242,.72);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 14px;
  height: 1px;
  background: var(--apricot);
  transform: translateX(-50%);
}
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid rgba(207,202,213,.72);
}
.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.nav-login:hover { color: var(--iris); }
.nav-cta {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 9px;
  gap: 8px;
  box-shadow: 0 5px 16px rgba(59,50,115,.14);
}
.nav-cta span { font-size: 15px; transition: transform .18s ease; }
.nav-cta:hover span { transform: translateX(2px); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--iris); color: #fff; }
.btn-primary:hover { background: var(--iris-deep); }
.btn-secondary { border-color: #CAC5DF; color: var(--iris); background: transparent; }
.btn-secondary:hover { background: var(--iris-tint); }
.btn-light { background: #fff; color: var(--iris); }
.btn-ghost-light { border-color: rgba(255,255,255,.32); color: #fff; }
.mobile-toggle, .mobile-label, .mobile-panel { display: none; }

.hero { padding: 104px 0 86px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 70px; align-items: center; }
.hero-copy h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(54px, 6.4vw, 84px);
  line-height: .98;
  letter-spacing: -.035em;
  margin: 18px 0 24px;
  max-width: 780px;
}
.hero-copy p { margin: 0 0 30px; font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 650px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--soft); }
.hero-visual { position: relative; min-height: 510px; }
.hero-art {
  position: absolute;
  inset: -14px 0 0 34px;
  width: calc(100% - 34px);
  height: 100%;
  object-fit: contain;
}
.orbit::before, .orbit::after {
  content: '';
  position: absolute;
  border: 1px solid #E7E3EF;
  border-radius: 50%;
  inset: 52px;
}
.orbit::after { inset: 112px; }
.product-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(38,30,73,.08);
}
.product-main { width: 84%; right: 0; top: 72px; padding: 26px; }
.product-small { width: 54%; left: 0; bottom: 48px; padding: 22px; }
.card-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: 14px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #EFEBE6; }
.account-row:last-child { border-bottom: 0; }
.account-name { font-weight: 600; }
.account-meta { font-size: 12px; color: var(--soft); margin-top: 2px; }
.status { font-size: 11px; font-weight: 600; padding: 6px 9px; border-radius: 999px; background: var(--iris-tint); color: var(--iris); white-space: nowrap; }
.status.green { background: #E6F0EA; color: var(--resolved); }
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 9px 1fr; gap: 12px; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--apricot); margin-top: 7px; }
.timeline-item p { margin: 0; font-size: 13px; color: var(--muted); }
.timeline-item strong { color: var(--ink); font-weight: 600; }

.logo-strip { padding: 28px 0 46px; border-bottom: 1px solid var(--line); }
.logo-strip p { margin: 0; text-align: center; color: var(--soft); font-size: 13px; }

.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section-white { background: var(--surface); }
.section-iris { background: var(--iris); color: #fff; }
.section-heading { max-width: 760px; margin-bottom: 46px; }
.section-heading.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-heading h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 14px 0 18px;
}
.section-heading p { font-size: 18px; color: var(--muted); margin: 0; }
.section-iris .section-heading p { color: #D8D4EA; }

.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  min-height: 210px;
}
.feature-card .num { font-family: 'Instrument Serif', serif; color: var(--apricot); font-size: 30px; }
.feature-card h3 { margin: 44px 0 8px; font-size: 18px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--iris-tint); color: var(--iris); display: grid; place-items: center; font-weight: 700; }
.feature-icon svg { width: 21px; height: 21px; }

.split { display: grid; grid-template-columns: .92fr 1.08fr; gap: 72px; align-items: center; }
.split.reverse { grid-template-columns: 1.08fr .92fr; }
.split-copy h2, .split-copy h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 14px 0 18px;
}
.split-copy p { font-size: 17px; color: var(--muted); margin: 0 0 26px; }
.text-link { color: var(--iris); font-weight: 600; font-size: 14px; }
.text-link:hover { text-decoration: underline; }

.ui-shell { background: #F0EDF6; border: 1px solid #DDD8EB; border-radius: 22px; padding: 22px; }
.ui-window { background: #fff; border: 1px solid #E8E3ED; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 45px rgba(52,42,93,.08); }
.ui-top { height: 42px; border-bottom: 1px solid #ECE8EF; display: flex; align-items: center; gap: 6px; padding: 0 15px; }
.ui-dot { width: 7px; height: 7px; border-radius: 50%; background: #D8D3E0; }
.ui-body { display: grid; grid-template-columns: 150px 1fr; min-height: 310px; }
.ui-side { padding: 18px 12px; border-right: 1px solid #EFEAF1; background: #FBFAFC; }
.ui-side div { padding: 9px 10px; margin-bottom: 4px; font-size: 11px; border-radius: 7px; color: #777187; }
.ui-side .active { background: var(--iris-tint); color: var(--iris); font-weight: 600; }
.ui-content { padding: 24px; }
.ui-title { font-weight: 600; margin-bottom: 20px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { padding: 14px; border: 1px solid #ECE8EF; border-radius: 10px; }
.metric span { display: block; font-size: 10px; color: var(--soft); }
.metric strong { display: block; margin-top: 6px; font-size: 18px; }
.fake-chart { height: 92px; margin-top: 18px; border-radius: 10px; background: linear-gradient(180deg, rgba(74,63,143,.08), rgba(74,63,143,0)); position: relative; overflow: hidden; }
.fake-chart::after { content: ''; position: absolute; width: 110%; height: 2px; background: var(--iris); left: -5%; top: 52%; transform: rotate(-8deg); box-shadow: 110px -15px 0 var(--iris), 230px 8px 0 var(--iris); }

.context-list { display: grid; gap: 14px; margin-top: 28px; }
.context-item { display: grid; grid-template-columns: 32px 1fr; gap: 13px; }
.context-item .mark { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #CFC9DF; display: grid; place-items: center; color: var(--iris); font-size: 12px; }
.context-item strong { display: block; font-size: 14px; }
.context-item span { display: block; margin-top: 3px; font-size: 13px; color: var(--soft); }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.flow-step { padding: 26px; border-right: 1px solid var(--line); min-height: 180px; }
.flow-step:last-child { border-right: 0; }
.flow-step span { font-size: 11px; color: var(--soft); letter-spacing: .12em; text-transform: uppercase; }
.flow-step h3 { margin: 30px 0 8px; font-size: 17px; }
.flow-step p { margin: 0; font-size: 13px; color: var(--muted); }

.intelligence-band { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.intel-card { border-radius: 18px; padding: 30px; min-height: 270px; }
.intel-dark { background: var(--ink); color: #fff; }
.intel-light { background: var(--iris-tint); }
.intel-card h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 34px; margin: 46px 0 12px; }
.intel-card p { margin: 0; font-size: 14px; color: #CAC6D6; }
.intel-light p { color: var(--muted); }

.page-hero { padding: 92px 0 72px; border-bottom: 1px solid var(--line); }
.page-hero .inner { max-width: 850px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; }
.page-hero-art img { width: 100%; max-width: 440px; margin: 0 auto; }
.page-hero h1 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: clamp(54px, 7vw, 82px); line-height: .98; letter-spacing: -.035em; margin: 16px 0 22px; }
.page-hero p { font-size: 19px; color: var(--muted); max-width: 690px; margin: 0 0 28px; }

.subnav { border-bottom: 1px solid var(--line); background: #fff; }
.subnav .container { display: flex; gap: 28px; overflow-x: auto; }
.subnav a { padding: 18px 0; font-size: 13px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a.active { color: var(--iris); border-bottom-color: var(--iris); font-weight: 600; }

.faq { max-width: 840px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 8px; font-size: 16px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 14px; }

.cta-band { padding: 86px 0; }
.cta-box { background: var(--iris); color: #fff; border-radius: 26px; padding: 62px; display: grid; grid-template-columns: 1fr auto; gap: 44px; align-items: end; overflow: hidden; position: relative; }
.cta-box::after { content: ''; position: absolute; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -90px; top: -120px; box-shadow: inset 0 0 0 70px rgba(255,255,255,.02); }
.cta-box h2 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(42px, 5vw, 64px); line-height: 1; letter-spacing: -.025em; margin: 0 0 16px; position: relative; z-index: 1; }
.cta-box p { color: #D9D5EA; margin: 0; max-width: 650px; position: relative; z-index: 1; }
.cta-actions { display: flex; gap: 10px; position: relative; z-index: 1; }

.site-footer { padding: 56px 0 38px; border-top: 1px solid var(--line); }
/* Brand on its own row. Five link columns beside a brand block leaves each
   about 155px at container width, which crowds the labels and squeezes the
   tagline to four lines; given a full row they get ~209px each. */
.footer-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 34px; }
.footer-brand { grid-column: 1 / -1; margin-bottom: 10px; }
.footer-logo .logo-mark { width: 28px; height: 28px; }
.footer-logo .logo-word { font-size: 23px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 460px; margin: 14px 0 0; }
.footer-col h4 { margin: 0 0 14px; font-size: 13px; }
.footer-col a { display: block; font-size: 13px; color: var(--muted); padding: 5px 0; }
.footer-col a:hover { color: var(--iris); }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--soft); font-size: 12px; }

.note { font-size: 12px; color: var(--soft); margin-top: 18px; }

@media (max-width: 980px) {
  .nav-shell { grid-template-columns: 1fr auto auto; gap: 16px; min-height: 70px; }
  .nav-links { display: none; }
  .nav-actions { border-left: 0; padding-left: 0; }
  .nav-actions .nav-login { display: none; }
  .nav-cta { min-height: 40px; }
  .mobile-label { display: grid; width: 40px; height: 40px; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.62); cursor: pointer; }
  .mobile-label span { display: block; width: 17px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .18s ease; }
  .mobile-toggle:checked + .mobile-label span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .mobile-toggle:checked + .mobile-label span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .mobile-toggle:checked ~ .mobile-panel { display: block; }
  .mobile-panel { position: absolute; left: -20px; right: -20px; top: 70px; padding: 14px 20px 22px; background: rgba(246,244,241,.98); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 18px 35px rgba(38,30,73,.08); }
  .mobile-panel nav { display: grid; gap: 2px; }
  .mobile-panel nav a { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 12px 10px; border-radius: 9px; font-size: 15px; color: var(--muted); }
  .mobile-panel nav a:hover, .mobile-panel nav a.active { color: var(--iris); background: var(--iris-tint); }
  .mobile-panel nav a.active::after { content: '•'; color: var(--apricot); }
  .mobile-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; padding-top: 14px; margin-top: 10px; border-top: 1px solid var(--line); }
  .mobile-actions .nav-login { border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .hero-grid, .split, .split.reverse, .cta-box, .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-art img { max-width: 340px; margin: 0; }
  .hero { padding-top: 72px; }
  .hero-visual { min-height: 440px; max-width: 660px; }
  .three-col { grid-template-columns: repeat(2, 1fr); }
  .four-col, .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(2) { border-right: 0; }
  .flow-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .intelligence-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav-shell { min-height: 66px; gap: 10px; }
  .logo-mark { width: 26px; height: 26px; }
  .logo-word { font-size: 21px; }
  .nav-actions { display: none; }
  .mobile-panel { top: 66px; }
  .mobile-actions { grid-template-columns: 1fr; }
  .hero { padding: 58px 0 60px; }
  .hero-copy h1 { font-size: 53px; }
  .hero-copy p, .page-hero p, .section-heading p { font-size: 17px; }
  .hero-visual { min-height: 380px; }
  .product-main { width: 92%; padding: 18px; top: 50px; }
  .product-small { width: 65%; padding: 16px; bottom: 24px; }
  .section { padding: 70px 0; }
  .section-tight { padding: 54px 0; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2, .split-copy h2, .split-copy h3 { font-size: 43px; }
  .three-col, .four-col, .flow, .metric-grid { grid-template-columns: 1fr; }
  .flow-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-step:last-child { border-bottom: 0; }
  .intelligence-band { grid-template-columns: 1fr; }
  .ui-body { grid-template-columns: 1fr; }
  .ui-side { display: none; }
  .cta-box { padding: 38px 28px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 22px; }
  .footer-col:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Auth pages ---------- */
.auth-body { background: var(--paper); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); min-height: 100vh; }
.auth-panel { display: flex; flex-direction: column; padding: 34px clamp(28px, 7vw, 96px) 40px; }
.auth-panel .logo { align-self: flex-start; }
.auth-main { margin: auto 0; padding: 56px 0 40px; width: 100%; max-width: 430px; }
.auth-main h1 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: clamp(40px, 4vw, 54px); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 12px; }
.auth-main > p { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; }
.field input { padding: 13px 15px; border: 1px solid #D8D3E0; border-radius: 10px; background: #fff; font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.field input::placeholder { color: #A49EB4; }
.field input:focus { border-color: var(--iris); box-shadow: 0 0 0 3px rgba(74,63,143,.14); }
.field-row { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 20px; }
.field-hint { font-size: 12px; color: var(--soft); margin-top: -10px; margin-bottom: 16px; }
.forgot-link { font-size: 13px; font-weight: 500; color: var(--iris); }
.forgot-link:hover { text-decoration: underline; }
.remember { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.remember input { accent-color: var(--iris); width: 15px; height: 15px; }
.btn-block { width: 100%; min-height: 48px; font-size: 15px; }
.auth-alt { font-size: 14px; color: var(--muted); margin: 26px 0 0; }
.auth-alt a { color: var(--iris); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }
.auth-note { display: flex; gap: 12px; align-items: flex-start; background: var(--iris-tint); border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 26px; }
.auth-note svg { flex: none; width: 18px; height: 18px; color: var(--iris); margin-top: 1px; }
.auth-foot { font-size: 12px; color: var(--soft); }
.auth-foot a { color: var(--soft); }
.auth-foot a:hover { color: var(--iris); }
.auth-art { position: relative; background: var(--iris); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.auth-art-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-quote { position: relative; z-index: 1; max-width: 420px; }
.auth-quote p { font-family: 'Instrument Serif', Georgia, serif; font-size: 30px; line-height: 1.18; letter-spacing: -.015em; color: #FFFFFF; margin: 0 0 14px; }
.auth-quote span { font-size: 13px; color: #C4BEE6; }
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-main { margin: 0 auto; }
}

/* ---------- Legal pages (/terms, /privacy) ---------- */
/* Long-form documents. The shell is the standard container so the header and
   footer line up with every other page, but the measure is capped separately:
   a thirty-clause agreement set to 1180px runs to ~180 characters a line. The
   spare column carries the contents, which is what earns the width. */
.legal-main { padding: 64px 0 40px; }
.legal-head { max-width: 720px; }
.legal-head h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 14px 0 10px;
}
.legal-updated { color: var(--soft); font-size: 14px; margin: 0; }

.legal-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 64px;
  margin-top: 48px;
  align-items: start;
}
.legal-toc { position: sticky; top: 96px; }
.legal-toc h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 14px;
}
.legal-toc ol { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 160px); overflow-y: auto; }
.legal-toc li { margin-bottom: 6px; }
.legal-toc a { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); }
.legal-toc a:hover { color: var(--iris); }

.legal-body { max-width: 720px; }
.legal-section { margin-bottom: 52px; scroll-margin-top: 96px; }
.legal-section h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 18px;
}
.legal-section p { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 0 0 14px; }

.legal-list { list-style: none; margin: 0 0 14px; padding: 0; }
.legal-list li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 8px;
}
/* The apricot rule from .eyebrow, reused so the lists read as the same site. */
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .82em;
  width: 10px;
  height: 1px;
  background: var(--apricot);
}

.legal-table-wrap { overflow-x: auto; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); }
.legal-table thead th { font-size: 13px; font-weight: 600; }
.legal-table th[scope='row'] { width: 32%; font-weight: 500; padding-right: 24px; }
.legal-table td { color: var(--muted); line-height: 1.7; }

@media (max-width: 900px) {
  .legal-shell { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); }
  .legal-toc ol { max-height: none; columns: 2; column-gap: 28px; }
}
@media (max-width: 640px) {
  .legal-main { padding: 40px 0 32px; }
  .legal-toc ol { columns: 1; }
  .legal-table th[scope='row'] { width: auto; }
}

/* ---------- Product menu ---------- */
/* CSS-only, because the rest of this site is: the mobile nav is a checkbox and
   the only script on any page is JSON-LD. Opens on :hover for pointers and
   :focus-within for keyboards, so tabbing to the trigger reveals it without JS. */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-caret {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}
.nav-group:hover .nav-caret, .nav-group:focus-within .nav-caret { transform: translateY(1px) rotate(225deg); }

.nav-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: max-content;
  max-width: min(92vw, 780px);
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(38,30,73,.13);
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 60;
}
/* A gap between trigger and panel would close the menu as the pointer crosses
   it; this bridges it without being visible. */
.nav-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-menu-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 26px; }
.nav-col h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--soft);
}
.nav-col a { display: block; padding: 7px 9px; margin: 0 -9px; border-radius: 9px; }
.nav-col a:hover { background: var(--iris-tint); }
.nav-col a strong { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.nav-col a span { display: block; margin-top: 1px; font-size: 12px; line-height: 1.4; color: var(--soft); }
.nav-col a.active strong { color: var(--iris); }

/* Mobile: the panel is already a list, so the groups become labelled runs. */
.mobile-group-label {
  display: block;
  margin: 14px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--soft);
}
.mobile-group-label:first-child { margin-top: 4px; }

/* ---------- Pricing ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; align-items: stretch; }
.plan {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px 28px;
}
/* Pro is the plan being sold; the tint and the iris rule mark it without a
   shouty "most popular" badge. */
.plan.featured { border-color: #CFC9E2; box-shadow: 0 20px 50px rgba(38,30,73,.08); position: relative; }
.plan.featured::before { content: ''; position: absolute; left: 26px; right: 26px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--iris); }
.plan h3 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin: 0 0 14px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; font-family: 'Instrument Serif', Georgia, serif; }
.plan-price .amt { font-size: 42px; line-height: 1; letter-spacing: -.02em; }
.plan-price .per { font-family: inherit; font-size: 14px; color: var(--soft); font-family: 'Instrument Sans', system-ui, sans-serif; }
.plan-note { min-height: 76px; font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.plan .btn { width: 100%; justify-content: center; margin: 20px 0 22px; }
.plan-list { flex: 1 0 auto; list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; align-content: start; }
.plan-list li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.plan-list li::before {
  content: ''; position: absolute; left: 0; top: .5em;
  width: 10px; height: 1px; background: var(--apricot);
}
.plan-list li.strong { color: var(--ink); font-weight: 500; }

.tier-table { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: 14px; }
.tier-table th, .tier-table td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line); }
.tier-table thead th { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.tier-table td { color: var(--muted); }
.tier-table td:first-child { color: var(--ink); font-weight: 500; }
.tier-table tr.is-entry td { background: rgba(232,230,242,.42); }
.tier-wrap { overflow-x: auto; }

.def-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 34px; }
.def h3 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 24px; margin: 0 0 10px; }
.def p { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin: 0 0 10px; }
.def .eg { font-size: 13px; color: var(--soft); border-left: 2px solid var(--iris-tint); padding-left: 12px; }

@media (max-width: 980px) {
  .plan-grid { grid-template-columns: 1fr; }
  .def-grid { grid-template-columns: 1fr; gap: 22px; }
}
