:root {
  --ink: #16202a;
  --ink-muted: #49596a;
  --ink-soft: #667585;
  --paper: #f7f9fb;
  --surface: #ffffff;
  --line: #d9e1e8;
  --brand: #0b5d5b;
  --brand-dark: #07413f;
  --brand-soft: #e6f2f1;
  --accent: #b16000;
  --accent-soft: #fff2dd;
  --ok: #176b3f;
  --ok-soft: #e8f5ed;
  --warn: #8a5500;
  --warn-soft: #fff4e0;
  --risk: #a52a2a;
  --risk-soft: #fdeeee;
  --focus: #0b68a4;
  --shadow: 0 12px 34px rgba(22, 32, 42, 0.08);
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.05rem, 8vw, 3.85rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.45rem, 4vw, 2.2rem); margin: 3rem 0 0.9rem; }
h3 { font-size: clamp(1.16rem, 3vw, 1.45rem); margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin: 0.45rem 0; }
a { color: var(--brand-dark); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--focus); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: -5rem;
  padding: 0.7rem 1rem;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.layout { min-width: 300px; }
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: clamp(190px, 21vw, 250px);
  height: auto;
}

.nav-toggle { display: none; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.2rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.94rem;
}

.site-nav a:not(.button) {
  color: var(--ink-muted);
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:not(.button):hover { color: var(--brand-dark); text-decoration: underline; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 780;
  font-size: 0.98rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(11, 93, 91, 0.18); }
.button-primary:hover { background: var(--brand-dark); color: #fff; }
.button-secondary { background: #fff; border-color: #b9c8d3; color: var(--brand-dark); }
.button-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.button-quiet { background: var(--brand-soft); color: var(--brand-dark); }
.button:disabled { opacity: 0.55; cursor: not-allowed; }

main { display: block; }
.container, .footer-inner {
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.page-hero, .hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 85% 8%, rgba(23, 143, 120, 0.14), transparent 34%), linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3.2rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 6rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #c7d9d7;
  border-radius: 999px;
  background: #eef7f6;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero p.lede, .page-hero p.lede { color: var(--ink-muted); font-size: clamp(1.05rem, 3vw, 1.24rem); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.upload-card {
  position: relative;
  padding: clamp(1.3rem, 3vw, 1.8rem);
  border: 1px solid #c8d6e1;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.upload-card h2 { margin: 0 0 0.5rem; font-size: 1.22rem; }
.upload-card p { color: var(--ink-muted); font-size: 0.95rem; }

.drop-zone {
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  min-height: 220px;
  padding: 1.6rem 1rem;
  border: 2px dashed #a9bec9;
  border-radius: 18px;
  background: #f8fbfc;
  color: var(--ink-muted);
  text-align: center;
}

.drop-zone.dragging { border-color: var(--brand); background: var(--brand-soft); }
.drop-zone strong { color: var(--ink); }
.drop-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.5rem;
}
.formats { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }
.privacy-note { display: flex; gap: 0.55rem; margin: 0.9rem 0 0; color: var(--ink-muted); font-size: 0.82rem; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head p { color: var(--ink-muted); font-size: 1.04rem; }

.grid { display: grid; gap: 1.2rem; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(22, 32, 42, 0.03);
}

.icon-card h3 { margin: 0.8rem 0 0.45rem; font-size: 1.08rem; }
.icon-card p { color: var(--ink-muted); font-size: 0.95rem; }
.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 850;
}

.report-preview {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 1.5rem;
  align-items: start;
}

.quote-document {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf7;
  color: var(--ink-muted);
  box-shadow: var(--shadow);
  transform: rotate(-0.5deg);
}

.quote-document strong { color: var(--ink); }
.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #ded4bc;
  font-variant-numeric: tabular-nums;
}
.quote-total { display: flex; justify-content: space-between; margin-top: 0.8rem; font-weight: 800; }

.status-card {
  padding: 1.5rem;
  border-left: 6px solid var(--warn);
  border-radius: var(--radius);
  background: var(--warn-soft);
}
.status-card h3 { margin-top: 0; color: var(--warn); }
.status-list { display: grid; gap: 0.7rem; }
.status-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid rgba(138, 85, 0, 0.16);
  border-radius: 11px;
  background: #fff;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-warn { background: var(--warn-soft); color: var(--warn); }
.status-risk { background: var(--risk-soft); color: var(--risk); }
.status-muted { background: #eef2f6; color: var(--ink-muted); }

.steps { counter-reset: step; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step;
  position: relative;
  min-height: 56px;
  margin: 0;
  padding: 1rem 1rem 1rem 4.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 850;
}

.prose { max-width: 780px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 780px) minmax(280px, 300px); gap: 3rem; align-items: start; }
.article-meta { color: var(--ink-soft); font-size: 0.9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; min-width: 500px; border-collapse: collapse; }
caption { padding: 1rem; color: var(--ink-muted); font-size: 0.9rem; text-align: left; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f1f5f8; color: var(--ink); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.04em; }
td:last-child, th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

.callout {
  margin: 1.5rem 0;
  padding: 1.2rem;
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  background: var(--brand-soft);
}
.callout.warning { border-color: var(--warn); background: var(--warn-soft); }
.callout p:last-child { margin-bottom: 0; }

.breadcrumb { padding-top: 1.4rem; color: var(--ink-soft); font-size: 0.86rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li::after { content: "/"; margin-left: 0.4rem; color: #a4b1bc; }
.breadcrumb li:last-child::after { content: ""; }

.final-cta {
  padding: clamp(3rem, 7vw, 5rem) 1.7rem;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--brand-dark), #128c74);
  color: #fff;
  text-align: center;
}
.final-cta h2 { margin-top: 0; color: #fff; }
.final-cta p { color: rgba(255, 255, 255, 0.88); }

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink-muted);
  font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding: 3rem 0; }
.footer-grid h2 { margin: 0 0 0.8rem; color: var(--ink); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid a { color: var(--ink-muted); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1.22fr);
  gap: 1.5rem;
  align-items: start;
}
.tool-help { position: sticky; top: 100px; }
.tool-panel {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.tool-panel h2 { margin-top: 0; }
.choice-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.choice-tab { min-height: 42px; }
.choice-tab[aria-selected="true"] { background: var(--brand-dark); color: #fff; }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-weight: 750; }
.field small, .field .hint { color: var(--ink-muted); }
input, textarea, select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid #b8c6d1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 185px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tool-step { margin-bottom: 1rem; }
.tool-step[hidden] { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }
.file-state { padding: 0.8rem; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-size: 0.9rem; }
.error-box { padding: 0.85rem; border-left: 4px solid var(--risk); border-radius: 8px; background: var(--risk-soft); color: #7f2020; }
.progress-list { list-style: none; margin: 0; padding: 0; }
.progress-list li { display: flex; align-items: center; gap: 0.6rem; margin: 0.55rem 0; color: var(--ink-muted); }
.progress-dot {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #b7c4cf;
  background: #fff;
  color: transparent;
  font-size: 0.75rem;
  font-weight: 900;
}
.progress-list .done .progress-dot { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.progress-list .active { color: var(--ink); font-weight: 750; }
.progress-list .active .progress-dot { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }

.report-result { border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.result-summary { padding: 1.4rem; border-bottom: 1px solid var(--line); background: #fbfdfe; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 1rem; }
.metric { padding: 0.8rem; border-radius: 11px; background: #fff; border: 1px solid var(--line); }
.metric strong { display: block; font-size: 1.2rem; }
.metric span { color: var(--ink-muted); font-size: 0.8rem; }
.report-section { padding: 1.4rem; border-bottom: 1px solid var(--line); }
.report-section:last-child { border-bottom: 0; }
.report-section h3 { margin-top: 0; }
.report-item { display: grid; gap: 0.35rem; padding: 0.9rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 0.7rem; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: center; }
.benchmark { color: var(--ink-muted); font-size: 0.9rem; }
.question-list li { margin: 0.6rem 0; }
.confidence { font-weight: 780; }

@media (max-width: 980px) {
  .hero-grid, .report-preview, .article-layout, .tool-shell { grid-template-columns: 1fr; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-help { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .container, .footer-inner { width: min(100% - 1.5rem, 1160px); }
  .header-inner { min-height: 63px; }
  .brand img { width: min(210px, 62vw); }
  .nav-toggle {
    display: inline-flex;
    order: 3;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 1.2rem;
  }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.7rem 1rem 1.2rem; }
  .site-nav li { border-bottom: 1px solid #edf1f4; }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a:not(.button) { display: block; padding: 0.85rem 0; font-size: 1rem; }
  .grid-4, .grid-3, .grid-2, .field-row, .metrics, .footer-grid { grid-template-columns: 1fr; }
  .actions .button { width: 100%; }
  .final-cta { border-radius: 20px; }
}

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

@media print {
  .site-header, .site-footer, .breadcrumb, .actions, .tool-help, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .card, .tool-panel, .report-result, .table-wrap { border-color: #999; box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}
