:root {
  color-scheme: light;
  --ink: #0b1220;
  --ink-2: #162236;
  --paper: #f7f4ed;
  --white: #fffefa;
  --muted: #617086;
  --line: #d9d8d2;
  --accent: #22d3ee;
  --accent-soft: #dff8fc;
  --success: #087c55;
  --warning: #a85b08;
  --shadow: 0 18px 55px rgba(11, 18, 32, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

html[data-accent="coral"] { --accent: #fb7185; --accent-soft: #ffe7eb; }
html[data-accent="lime"] { --accent: #a3e635; --accent-soft: #eefad8; }
html[data-accent="amber"] { --accent: #fbbf24; --accent-soft: #fff3cf; }
html[data-accent="violet"] { --accent: #a78bfa; --accent-soft: #eee9ff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 0.2em; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--white);
  border: 2px solid var(--accent);
  border-radius: 0.6rem;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  min-height: 68px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--ink);
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 9px;
  font-size: .75rem;
  letter-spacing: -.03em;
}
.site-header nav { margin-left: auto; display: flex; gap: 1.5rem; }
.site-header nav a { text-decoration: none; color: #c8d1df; font-size: .93rem; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: #fff; }
.header-action {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: .5rem .85rem;
  font-size: .9rem;
  white-space: nowrap;
}
.proof-strip {
  min-height: 44px;
  padding: .65rem 2rem;
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 5vw, 4.5rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  color: #3e4a5d;
  font-size: .86rem;
}

.hero {
  padding: clamp(3.25rem, 7vw, 6.5rem) 0 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .7fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
}
.eyebrow, .kicker {
  margin: 0 0 .65rem;
  color: #147286;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .75rem;
  font-weight: 800;
}
html[data-accent="coral"] .eyebrow, html[data-accent="coral"] .kicker { color: #b82f4a; }
html[data-accent="lime"] .eyebrow, html[data-accent="lime"] .kicker { color: #4a770b; }
html[data-accent="amber"] .eyebrow, html[data-accent="amber"] .kicker { color: #9a5b00; }
html[data-accent="violet"] .eyebrow, html[data-accent="violet"] .kicker { color: #6544bd; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 860px; margin-bottom: 1.25rem; font-size: clamp(2.5rem, 5.7vw, 5.1rem); line-height: .98; letter-spacing: -.06em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.045em; }
h3 { font-size: 1.1rem; letter-spacing: -.02em; }
.hero-copy { max-width: 760px; color: #475569; font-size: clamp(1rem, 1.5vw, 1.18rem); }
.tag-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.tag-row span { padding: .42rem .72rem; border: 1px solid #cbd5e1; border-radius: 999px; background: rgba(255,255,255,.55); font-size: .82rem; }
.hero-note { border-left: 4px solid var(--accent); padding: .15rem 0 .15rem 1.1rem; color: #4d5a6d; }
.hero-note strong { color: var(--ink); }
.hero-note p { margin: .45rem 0 0; font-size: .9rem; }

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, .82fr) minmax(440px, 1.18fr);
  min-height: 610px;
  margin-bottom: 2rem;
  background: var(--white);
  border: 1px solid #c8c8c3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tool-panel, .result-panel { padding: clamp(1.25rem, 3vw, 2rem); }
.tool-panel { border-right: 1px solid var(--line); }
.panel-heading, .result-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.panel-heading h2, .result-header h2 { margin-bottom: .6rem; font-size: 1.45rem; }
.status-pill { flex: none; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 55%, #fff); border-radius: 999px; padding: .35rem .65rem; font-size: .75rem; font-weight: 750; }
.tool-intro { color: var(--muted); font-size: .93rem; margin-bottom: 1.35rem; }
.field-grid { display: grid; gap: .9rem; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: .38rem; color: #243246; font-size: .82rem; font-weight: 730; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cbd1d8;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: .7rem .78rem;
  outline: none;
  font-weight: 450;
}
textarea { resize: vertical; min-height: 92px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
form > label, form > .check-row, form > .inline-status { margin-top: .9rem; }
.check-row { display: flex; align-items: flex-start; gap: .6rem; font-weight: 560; color: #435067; }
.check-row input { width: auto; margin-top: .2rem; accent-color: var(--accent); }
button {
  border: 1px solid #b8bec6;
  border-radius: 8px;
  padding: .58rem .8rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}
button:hover { border-color: #7b8798; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, #fff); outline-offset: 3px; }
button.primary { width: 100%; margin-top: 1rem; background: var(--accent); border-color: var(--accent); color: #07111d; }
button.primary.small { width: auto; margin-top: 0; }
button[disabled] { opacity: .55; cursor: not-allowed; }
.result-panel { display: flex; flex-direction: column; background: #f9fafb; }
.result-actions { display: flex; gap: .5rem; }
.result-actions button { font-size: .82rem; }
pre {
  flex: 1;
  min-height: 420px;
  margin: .7rem 0 0;
  padding: 1.25rem;
  overflow: auto;
  border: 1px solid #263951;
  border-radius: 12px;
  background: #0b1727;
  color: #c8f3f8;
  font: 500 .8rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.result-checks { display: grid; gap: .42rem; margin-top: .9rem; }
.result-checks p { margin: 0; font-size: .83rem; color: #405066; }
.result-checks .ok::before { content: "✓ "; color: var(--success); font-weight: 900; }
.result-checks .warn::before { content: "! "; color: var(--warning); font-weight: 900; }
.inline-status { padding: .72rem .8rem; border: 1px solid var(--line); border-radius: 9px; background: #f4f6f8; color: #526176; font-size: .83rem; }

.reference-inputs { display: grid; gap: .7rem; }
.reference-row { display: grid; grid-template-columns: 34px .9fr 1.15fr 1.6fr; gap: .55rem; align-items: end; padding: .65rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfbfa; }
.reference-row.optional { background: #f6f7f8; }
.reference-badge { width: 30px; height: 30px; align-self: center; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); font-weight: 850; }
.reference-row input, .reference-row select { padding: .48rem .52rem; font-size: .78rem; }
.reference-preview { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.reference-preview figure { width: 76px; margin: 0; }
.reference-preview img { width: 76px; height: 58px; display: block; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.reference-preview figcaption { margin-top: .2rem; font-size: .68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.evidence-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1rem; margin-top: 1rem; }
.evidence-lead, .source-card { padding: clamp(1.5rem, 3vw, 2.35rem); border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.evidence-lead p:last-child { max-width: 680px; color: #526176; }
.source-card { background: var(--ink); color: #e8edf5; }
.source-card .kicker { color: var(--accent); }
.source-card h2 { font-size: 1.55rem; }
.source-card ul { margin: 1.1rem 0; padding: 0; list-style: none; }
.source-card li { border-top: 1px solid rgba(255,255,255,.16); }
.source-card li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.source-card a { display: flex; justify-content: space-between; gap: .7rem; padding: .75rem 0; color: #f5f7fb; text-decoration: none; font-size: .88rem; }
.source-note { color: #aeb9c9; font-size: .78rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.feature-card { position: relative; min-height: 190px; padding: 1.45rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.62); }
.feature-number { display: inline-block; margin-bottom: 2rem; color: #6a788c; font: 700 .75rem/1 ui-monospace, monospace; }
.feature-card p { color: #5a6779; font-size: .9rem; }
.how { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; padding-block: clamp(4rem, 9vw, 7rem); }
.how > div > p:last-child { color: #5c687a; }
.how ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .8rem; }
.how li { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; align-items: center; padding: 1rem; border-bottom: 1px solid var(--line); }
.how li span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--accent); border-radius: 50%; font-weight: 850; }
.how li p { margin: 0; }
.faq { padding-bottom: clamp(4rem, 8vw, 6rem); }
.faq > h2 { margin-bottom: 1.5rem; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
details { border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding: 0 1rem; }
summary { cursor: pointer; padding: 1rem 0; font-weight: 750; }
details p { color: #586679; font-size: .9rem; }

footer { padding: 2.2rem 0; background: var(--ink); color: #e6ebf3; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
.footer-grid p { margin: .35rem 0 0; color: #98a7ba; font-size: .82rem; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-grid a { color: #cbd4e1; font-size: .82rem; text-decoration: none; }
.consent { position: fixed; z-index: 50; right: 1rem; bottom: 1rem; width: min(520px, calc(100% - 2rem)); padding: 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; border: 1px solid #bbc4d0; border-radius: 12px; background: #fff; box-shadow: 0 18px 60px rgba(11,18,32,.2); }
.consent p { margin: .25rem 0 0; color: #5b687a; font-size: .78rem; }
.consent > div:last-child { display: flex; gap: .5rem; flex: none; }
.noscript { position: fixed; bottom: 0; width: 100%; padding: 1rem; background: #fff3cd; color: #4d3b00; text-align: center; }

.legal-page { background: var(--paper); }
.legal { min-height: 70vh; max-width: 800px; padding-block: clamp(3rem, 7vw, 6rem); }
.legal h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.legal h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.legal p { color: #4c596c; }
.legal-back { margin-top: 3rem; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 1.2rem; transform: translateX(-50%); padding: .7rem 1rem; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: .84rem; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .55s ease both; }
  .feature-card:nth-child(2) { animation-delay: .08s; }
  .feature-card:nth-child(3) { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 920px) {
  .site-header { padding-inline: 1rem; }
  .site-header nav { display: none; }
  .header-action { margin-left: auto; }
  .proof-strip { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; }
  .hero-note { max-width: 620px; }
  .workspace { grid-template-columns: 1fr; }
  .tool-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-grid, .how { grid-template-columns: 1fr; gap: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .how { padding-block: 4rem; }
  .reference-row { grid-template-columns: 34px 1fr 1fr; }
  .reference-row label:last-child { grid-column: 2 / -1; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 1rem, 1160px); }
  .site-header { min-height: 60px; }
  .brand > span:last-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-action { display: none; }
  .proof-strip { padding-inline: 1rem; }
  .hero { padding-top: 3rem; }
  h1 { font-size: clamp(2.25rem, 14vw, 3.7rem); }
  .workspace { border-radius: 12px; }
  .tool-panel, .result-panel { padding: 1rem; }
  .field-grid.two { grid-template-columns: 1fr; }
  .panel-heading, .result-header { display: block; }
  .status-pill { display: inline-block; margin-bottom: .7rem; }
  .result-actions { margin: .75rem 0; }
  pre { min-height: 340px; font-size: .72rem; }
  .reference-row { grid-template-columns: 30px 1fr; }
  .reference-row label { grid-column: 2; }
  .faq-list { grid-template-columns: 1fr; }
  .footer-grid { display: grid; }
  .consent { align-items: stretch; display: grid; }
  .consent > div:last-child { justify-content: flex-end; }
}
