:root {
  --ink: #14213d;
  --ink-soft: #3f4c68;
  --muted: #68738a;
  --line: #dce2ea;
  --line-strong: #c7cfdb;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --surface-blue: #edf4ff;
  --brand: #2357d9;
  --brand-dark: #173d9b;
  --brand-soft: #dce8ff;
  --success: #177245;
  --success-soft: #e8f7ef;
  --warning: #8a5a00;
  --warning-soft: #fff5d8;
  --danger: #a82d2d;
  --danger-soft: #fff0f0;
  --shadow: 0 18px 50px rgba(26, 42, 80, 0.09);
  --radius: 14px;
  --radius-small: 9px;
  --container: 1180px;
  --focus: 0 0 0 3px rgba(35, 87, 217, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand-dark); text-underline-offset: 0.16em; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.58; }
input, select, textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.72rem 0.8rem;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
textarea { resize: vertical; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.025em; margin-top: 0; }
h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); max-width: 900px; margin-bottom: 1rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); margin-bottom: 0.55rem; }
h4 { font-size: 1rem; margin: 1.25rem 0 0.35rem; }
p { margin-top: 0; }
.container { width: min(var(--container), calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.optional { color: var(--muted); font-weight: 400; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-140%);
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.96); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.62rem; font-weight: 750; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #fff; background: var(--brand); font-size: 0.95rem; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav > a:not(.button) { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.94rem; }
.site-nav > a:hover { color: var(--brand); }

.breadcrumbs { padding: 1rem 0 0; font-size: 0.88rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.45rem; color: #a2aabc; }
.breadcrumbs a { color: inherit; }

.hero { padding: 4rem 0 3.2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.65fr); gap: 3rem; align-items: center; }
.eyebrow { margin-bottom: 0.55rem; color: var(--brand-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.hero-copy { max-width: 780px; color: var(--ink-soft); font-size: clamp(1.06rem, 1.8vw, 1.3rem); }
.trust-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.trust-row span { padding: 0.34rem 0.64rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface-soft); font-size: 0.84rem; font-weight: 650; }
.hero-aside { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); padding: 1.35rem; }
.aside-title { font-weight: 760; margin-bottom: 0.65rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 0.9rem; }
.check-list li { position: relative; padding: 0.38rem 0 0.38rem 1.45rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }

.tool-section { padding: 0 0 4rem; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.tool-panel { padding: clamp(1.1rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--surface); box-shadow: var(--shadow); }
.section-heading.compact { max-width: 820px; }
.section-heading.compact p:last-child { color: var(--ink-soft); }
.instruction-box { margin: 1.25rem 0 1.5rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-soft); }
.instruction-box summary { font-weight: 700; cursor: pointer; }
.instruction-box ol { margin: 0.85rem 0 0; padding-left: 1.25rem; }
.instruction-box li + li { margin-top: 0.42rem; }

.file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.file-drop { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 0.8rem; align-items: start; min-height: 190px; padding: 1.2rem; border: 1.5px dashed #aeb9cc; border-radius: var(--radius); background: var(--surface-soft); transition: border-color 120ms ease, background 120ms ease; }
.file-drop:hover, .file-drop.is-dragging { border-color: var(--brand); background: var(--surface-blue); }
.file-drop input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop:focus-within { border-color: var(--brand); box-shadow: var(--focus); background: var(--surface-blue); }
.file-step { grid-row: 1 / span 2; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #fff; background: var(--brand); font-weight: 800; }
.file-title { font-weight: 780; font-size: 1.05rem; }
.file-help { grid-column: 2; color: var(--muted); font-size: 0.9rem; }
.file-button { grid-column: 1 / -1; justify-self: start; margin-top: 1rem; padding: 0.58rem 0.9rem; border: 1px solid var(--brand); border-radius: 8px; color: var(--brand-dark); background: #fff; font-weight: 720; }
.file-name { grid-column: 1 / -1; min-width: 0; margin-top: 0.7rem; color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.9rem; margin: 1rem 0 1.45rem; color: var(--muted); font-size: 0.9rem; }
.text-button { border: 0; padding: 0; color: var(--brand-dark); background: transparent; font-weight: 700; text-decoration: underline; text-underline-offset: 0.16em; }
.text-button:hover { color: var(--brand); }
.settings-fieldset { margin: 0 0 1.25rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-small); }
.settings-fieldset legend { padding: 0 0.4rem; font-weight: 750; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.settings-grid label, .form-grid label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 680; }
.field-inline { display: flex; align-items: center; gap: 0.45rem; font-weight: 500; }
.field-inline input { max-width: 90px; }
.field-help { color: var(--muted); font-size: 0.78rem; font-weight: 450; }
.privacy-note { display: flex; gap: 0.55rem; align-items: baseline; margin-bottom: 1rem; padding: 0.9rem 1rem; border-left: 4px solid var(--success); background: var(--success-soft); color: var(--ink-soft); font-size: 0.9rem; }
.privacy-note strong { color: var(--ink); white-space: nowrap; }
.alert { margin: 1rem 0; padding: 0.9rem 1rem; border-radius: var(--radius-small); }
.alert-error { color: #7f2020; background: var(--danger-soft); border: 1px solid #f0bcbc; }
.progress-box { display: flex; align-items: center; gap: 0.65rem; margin: 1rem 0; color: var(--brand-dark); font-weight: 650; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-limit { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.8rem; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 42px; padding: 0.67rem 1rem; border: 1px solid transparent; border-radius: 8px; font-weight: 760; line-height: 1.2; text-decoration: none; transition: transform 100ms ease, background 100ms ease, border-color 100ms ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.button-primary:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.button-secondary:hover { color: var(--brand-dark); border-color: var(--brand); }
.button-quiet { color: var(--muted); background: transparent; border-color: transparent; }
.button-small { min-height: 36px; padding: 0.5rem 0.75rem; }
.button-large { min-height: 50px; padding-inline: 1.35rem; }
.button-block { width: 100%; }

.results-section { padding: 4.5rem 0; background: var(--surface-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.results-section:focus { outline: none; }
.results-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.report-actions .button { min-height: 38px; padding: 0.5rem 0.75rem; font-size: 0.86rem; }
.inline-notice { margin: -0.5rem 0 1rem; color: var(--success); font-weight: 680; }
.summary-panel, .result-card, .service-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.summary-panel { padding: clamp(1.1rem, 3vw, 2rem); margin-bottom: 1.25rem; }
.summary-lead { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr); gap: 1.5rem; align-items: start; }
.status-badge { display: inline-flex; margin-bottom: 0.9rem; padding: 0.28rem 0.62rem; border-radius: 999px; font-size: 0.78rem; font-weight: 820; }
.status-high { color: #8a2020; background: var(--danger-soft); }
.status-medium { color: var(--warning); background: var(--warning-soft); }
.status-low { color: var(--brand-dark); background: var(--brand-soft); }
.status-none { color: var(--success); background: var(--success-soft); }
.summary-kicker { margin: 0 0 0.15rem; color: var(--muted); font-size: 0.8rem; font-weight: 740; text-transform: uppercase; letter-spacing: 0.08em; }
.summary-lead h3 { font-size: clamp(1.45rem, 3vw, 2rem); }
.summary-callout { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; border-radius: var(--radius-small); background: var(--surface-blue); }
.summary-callout span { color: var(--ink-soft); font-size: 0.88rem; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 1.75rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-small); overflow: hidden; }
.metric-grid > div { padding: 1rem; border-right: 1px solid var(--line); }
.metric-grid > div:last-child { border-right: 0; }
.metric-grid dt { color: var(--muted); font-size: 0.78rem; font-weight: 680; }
.metric-grid dd { margin: 0.28rem 0 0; font-size: 1.08rem; font-weight: 800; overflow-wrap: anywhere; }
.metric-grid span { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.2rem; }
.results-grid.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.result-card { padding: clamp(1rem, 2.5vw, 1.5rem); }
.result-card > p { color: var(--ink-soft); }
.result-card ol, .result-card ul { padding-left: 1.2rem; }
.result-card li + li { margin-top: 0.45rem; }
.wide-card { margin-bottom: 1.25rem; }
.card-heading-row { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.breakdown-list { display: grid; gap: 0.85rem; margin-top: 1.2rem; }
.breakdown-label { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; font-size: 0.9rem; }
.breakdown-label strong { font-size: 0.8rem; color: var(--muted); }
.bar-track { height: 9px; overflow: hidden; background: #e9edf3; border-radius: 999px; }
.bar-fill { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.link-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.link-chips a { padding: 0.35rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 0.8rem; font-weight: 650; text-decoration: none; }
.link-chips a:hover { border-color: var(--brand); color: var(--brand-dark); }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll:focus-visible { outline: 3px solid rgba(31, 94, 224, 0.34); outline-offset: 3px; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { padding: 0.76rem 0.72rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { color: var(--ink-soft); background: var(--surface-soft); font-size: 0.78rem; font-weight: 780; white-space: nowrap; }
tbody th { font-weight: 650; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.segment-table { min-width: 680px; }
.table-heading-row { align-items: flex-end; }
.table-filters { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; gap: 0.55rem; min-width: min(100%, 620px); }
.table-filters label { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.table-filters input, .table-filters select { margin-top: 0.23rem; padding: 0.55rem; font-size: 0.82rem; }
.loss-table-wrap { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); }
.loss-table { min-width: 1120px; }
.loss-table thead button { display: inline-flex; align-items: center; gap: 0.25rem; border: 0; padding: 0; color: inherit; background: transparent; font-weight: inherit; white-space: nowrap; }
.loss-table td:nth-child(n+4) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-detail-button { max-width: 390px; border: 0; padding: 0; color: var(--brand-dark); background: transparent; text-align: left; font-weight: 680; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 0.15em; }
.row-detail-button:hover { color: var(--brand); }
.mini-badge { display: inline-flex; padding: 0.22rem 0.48rem; border-radius: 999px; font-size: 0.72rem; font-weight: 780; white-space: nowrap; }
.priority-high { color: #8a2020; background: var(--danger-soft); }
.priority-medium { color: var(--warning); background: var(--warning-soft); }
.priority-low { color: var(--brand-dark); background: var(--brand-soft); }
.priority-none, .confidence-badge, .classification-badge { color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); }
.table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.9rem; }
.table-footer p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.page-size-label { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.8rem; }
.page-size-label select { width: auto; padding: 0.35rem 0.55rem; }
.pagination { display: flex; align-items: center; gap: 0.65rem; color: var(--muted); font-size: 0.82rem; }
.pagination button { padding: 0.4rem 0.65rem; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); }
.empty-state { padding: 1.2rem; color: var(--muted); text-align: center; }
.limitation-card { border-left: 4px solid var(--warning); }

.service-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr); gap: 2rem; padding: clamp(1.2rem, 3vw, 2rem); margin-top: 1.5rem; }
.fit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fit-grid > div { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); }
.fit-grid h3 { font-size: 1rem; }
.fit-grid ul { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; }
.service-boundary { color: var(--muted); font-size: 0.84rem; }
.inquiry-form { padding: 1.2rem; border-radius: var(--radius-small); background: var(--surface-soft); }
.inquiry-form > p { color: var(--ink-soft); font-size: 0.88rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.form-grid .full-width { grid-column: 1 / -1; }
.checkbox-row { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0.6rem; margin: 1rem 0 0; font-size: 0.86rem; }
.checkbox-row input { width: auto; margin-top: 0.28rem; }
.privacy-copy { margin: 0.7rem 0; color: var(--muted) !important; font-size: 0.76rem !important; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.form-notice { margin: 0.75rem 0; padding: 0.7rem 0.8rem; border-radius: 7px; font-size: 0.84rem; }
.form-notice.is-error { color: #7f2020; background: var(--danger-soft); }
.form-notice.is-success { color: var(--success); background: var(--success-soft); }
.honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.supporting-content { padding: 4.5rem 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; align-items: start; }
.article-layout article { max-width: 820px; }
.article-layout article > section + section { margin-top: 3.5rem; }
.article-layout article p, .article-layout article li { color: var(--ink-soft); }
.numbered-steps { counter-reset: steps; list-style: none; padding: 0; }
.numbered-steps li { counter-increment: steps; position: relative; padding: 0 0 1.1rem 3rem; }
.numbered-steps li::before { content: counter(steps); position: absolute; left: 0; top: -0.12rem; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); font-weight: 800; }
.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.definition-list > div { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); }
.definition-list h3 { font-size: 1rem; }
.definition-list p { margin-bottom: 0; font-size: 0.9rem; }
#faq details { border-top: 1px solid var(--line); padding: 0.95rem 0; }
#faq details:last-child { border-bottom: 1px solid var(--line); }
#faq summary { font-weight: 720; cursor: pointer; }
#faq details p { margin: 0.65rem 0 0; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.related-grid a { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); color: var(--ink); text-decoration: none; }
.related-grid a:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(35,87,217,0.08); }
.related-grid span { color: var(--muted); font-size: 0.85rem; }
.review-note { padding: 1.2rem; border-radius: var(--radius-small); background: var(--surface-soft); }
.review-note h2 { font-size: 1.35rem; }
.review-note p, .review-note li { font-size: 0.86rem; }
.article-aside { position: relative; }
.sticky-card { position: sticky; top: 96px; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.sticky-card h2 { font-size: 1.15rem; }
.sticky-card dl { margin: 0 0 1rem; }
.sticky-card dl > div { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.sticky-card dt { color: var(--muted); }
.sticky-card dd { margin: 0; font-weight: 700; text-align: right; }

.row-dialog { width: min(720px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.5rem; border: 0; border-radius: var(--radius); color: var(--ink); box-shadow: 0 26px 90px rgba(16, 28, 55, 0.32); }
.row-dialog::backdrop { background: rgba(16, 28, 55, 0.62); }
.dialog-key { font-size: 1.25rem; overflow-wrap: anywhere; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius-small); overflow: hidden; }
.detail-metrics dt, .detail-metrics dd { padding: 0.7rem; margin: 0; border-bottom: 1px solid var(--line); }
.detail-metrics dt { color: var(--muted); background: var(--surface-soft); }
.detail-metrics dd { font-weight: 700; }

.site-footer { padding: 2.8rem 0 1rem; color: #d9e1f0; background: #101a31; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.7fr 0.7fr; gap: 2rem; }
.site-footer p { color: #aeb9cc; max-width: 480px; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.45rem; }
.site-footer a { color: #cbd5e6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.13); color: #93a1b8; font-size: 0.82rem; }

@media (max-width: 1050px) {
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid > div:nth-child(3) { border-right: 0; }
  .metric-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .service-panel { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-layout article { max-width: none; }
  .article-aside { display: none; }
}

@media (max-width: 800px) {
  .site-header { position: static; }
  .site-nav a:not(.button) { display: none; }
  .hero { padding: 2.8rem 0 2.2rem; }
  .hero-grid, .summary-lead, .results-grid.two-column { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: 1fr; }
  .results-topbar { align-items: flex-start; flex-direction: column; }
  .report-actions { justify-content: flex-start; }
  .table-heading-row { display: block; }
  .table-filters { grid-template-columns: 1fr; min-width: 0; }
  .fit-grid { grid-template-columns: 1fr; }
  .definition-list, .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 1.1rem, var(--container)); }
  h1 { font-size: 2.3rem; }
  .tool-panel, .summary-panel, .result-card, .service-panel { border-radius: 10px; }
  .settings-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-width { grid-column: auto; }
  .privacy-note { display: block; }
  .privacy-note strong { display: block; margin-bottom: 0.25rem; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid > div { border-bottom: 1px solid var(--line); }
  .metric-grid > div:nth-child(2n) { border-right: 0; }
  .metric-grid > div:nth-child(n+5) { border-bottom: 0; }
  .metric-grid > div:nth-child(3) { border-right: 1px solid var(--line); }
  .report-actions .button { flex: 1 1 auto; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .detail-metrics { grid-template-columns: 1fr 1fr; }
}

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

@media print {
  .site-header, .breadcrumbs, .hero, .tool-section, .report-actions, .supporting-content, .site-footer, .service-panel, .table-filters, .table-footer, .link-chips, .row-dialog { display: none !important; }
  body, .results-section { background: #fff; }
  .results-section { padding: 0; border: 0; }
  .container { width: 100%; }
  .summary-panel, .result-card { break-inside: avoid; box-shadow: none; }
  .loss-table-wrap { overflow: visible; }
  .loss-table { min-width: 0; font-size: 8pt; }
  .loss-table th, .loss-table td { padding: 4pt; }
  .row-detail-button { color: #000; text-decoration: none; }
}
