:root {
  --gold: #ffbd12;
  --sky: #37a9d3;
  --gold-pale: #fbf7e8;
  --sky-pale: #eaf7fc;
}

.mega-nav { position: relative; }
.mega-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 27px 0; }
.mega-trigger span { color: var(--gold); font-size: 13px; transition: transform .18s ease; }
.mega-panel {
  position: fixed;
  top: 63px;
  left: 50%;
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100vh - 84px);
  overflow: auto;
  transform: translate(-50%, 9px);
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  border: 1px solid #cbdce3;
  border-top: 3px solid var(--gold);
  border-radius: 0 0 15px 15px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 26px 68px rgba(8,45,58,.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  text-align: left;
}

.mega-nav:hover .mega-panel,
.mega-nav:focus-within .mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 6px);
}

.mega-nav:hover .mega-trigger span,
.mega-nav:focus-within .mega-trigger span { transform: rotate(180deg); }
.mega-intro { padding: 28px; background: linear-gradient(150deg, var(--navy), #0b4355); color: #fff; }
.mega-intro .eyebrow { color: var(--gold); margin-bottom: 11px; }
.mega-intro h2 { margin: 0 0 12px; color: #fff; font-size: 25px; line-height: 1.08; letter-spacing: -.04em; }
.mega-intro p { margin: 0; color: #b9d7e1; font-size: 11px; line-height: 1.65; }
.mega-all { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(55,169,211,.14); color: #fff; font-size: 10px; font-weight: 800; }
.mega-all b { color: var(--gold); font-size: 15px; }
.mega-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 20px; padding: 24px 26px 58px; }
.mega-groups section { min-width: 0; }
.mega-groups h3 { margin: 0 0 9px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--navy); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.mega-groups a { display: flex; gap: 9px; align-items: flex-start; padding: 8px 7px; border-radius: 8px; transition: background .15s, transform .15s; }
.mega-groups a:hover,
.mega-groups a:focus { background: var(--sky-pale); transform: translateX(2px); outline: none; }
.mega-groups i { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 7px; background: var(--sky-pale); color: #087ca9; font-size: 9px; font-style: normal; font-weight: 900; }
.mega-groups section:nth-child(2) i { background: #edf8fc; color: var(--sky); }
.mega-groups section:nth-child(3) i { background: var(--gold-pale); color: #8d7118; }
.mega-groups section:nth-child(4) i { background: #eef2f4; color: var(--navy); }
.mega-groups span { min-width: 0; display: grid; gap: 2px; }
.mega-groups b { color: var(--navy); font-size: 10.5px; line-height: 1.2; }
.mega-groups small { color: var(--muted); font-size: 8px; line-height: 1.3; }
.mega-foot { position: absolute; right: 0; bottom: 0; width: calc(100% - 238px); display: flex; justify-content: space-between; align-items: center; padding: 12px 27px; border-top: 1px solid var(--line); background: #f8fbfc; color: var(--muted); font-size: 9px; }
.mega-foot b { color: var(--navy); }
.mega-foot a { color: #087ca9; font-weight: 850; }

.hero .eyebrow,
.section-head .eyebrow { text-decoration-color: var(--gold); }
.trust-row span:nth-child(even):before { background: var(--gold-pale); color: #9a7c1b; }
.feature-grid article:nth-child(3n+2)>span { color: var(--sky); }
.feature-grid article:nth-child(3n)>span { color: #a38420; }
.dark-section .eyebrow,
.cta .eyebrow { color: var(--gold); }
.ai-chat { border-top: 4px solid var(--gold); }

@media (max-width: 1050px) {
  .mega-panel { display: none; }
}

/* Public AI notice */
.legal-main { background: #fff; }
.legal-hero { padding: 82px max(24px, calc((100vw - 920px)/2)) 60px; background: radial-gradient(circle at 88% 18%,rgba(55,169,211,.23),transparent 34%),linear-gradient(125deg,#062631,#0a4d63); color: #fff; }
.legal-hero h1 { max-width: 800px; margin: 0 0 18px; color: #fff; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.055em; }
.legal-hero p { max-width: 760px; color: #c3dae2; font-size: 16px; line-height: 1.7; }
.legal-hero .eyebrow { color: #37a9d3; }
.legal-version { display: inline-flex; margin-top: 15px; padding: 7px 10px; border-radius: 999px; background: rgba(255,189,18,.15); color: #ffd96e; font-size: 10px; font-weight: 850; }
.legal-content { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 38px; padding: 52px max(24px, calc((100vw - 920px)/2)) 100px; }
.legal-toc { align-self: start; position: sticky; top: 96px; display: grid; gap: 7px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.legal-toc strong { margin-bottom: 5px; color: var(--navy); font-size: 11px; }
.legal-toc a { color: var(--muted); font-size: 10px; line-height: 1.4; }
.legal-toc a:hover { color: var(--blue); }
.legal-sections { display: grid; gap: 14px; }
.legal-sections section { padding: 25px 27px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.legal-sections h2 { margin: 0 0 10px; color: var(--navy); font-size: 21px; letter-spacing: -.02em; }
.legal-sections p,
.legal-sections li { color: var(--muted); font-size: 13px; line-height: 1.65; }
.legal-sections ul { margin: 10px 0 0; padding-left: 20px; }
.legal-warning { border-left: 4px solid var(--gold) !important; background: var(--gold-pale) !important; }
.legal-sources a { color: #087ca9; font-weight: 750; }

@media (max-width: 760px) {
  .legal-content { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}
