:root {
  color-scheme: light;
  --ink: #16211f;
  --muted: #5d6a66;
  --line: #d8e1dd;
  --paper: #ffffff;
  --soft: #f5f8f6;
  --blue: #1d5f8f;
  --blue-dark: #124562;
  --green: #1f7a5c;
  --amber: #b36a18;
  --teal-soft: #dff0ea;
  --blue-soft: #dcecf6;
  --shadow: 0 20px 55px rgba(22, 33, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(216, 225, 221, 0.86);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.language-switch button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--blue-dark);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 750;
  line-height: 1;
}

.nav-cta {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 86svh;
  overflow: hidden;
  padding: 88px 32px 72px;
  background: #edf4f1;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(237, 244, 241, 0.97) 0%, rgba(237, 244, 241, 0.86) 52%, rgba(237, 244, 241, 0.52) 100%),
    repeating-linear-gradient(0deg, rgba(22, 33, 31, 0.04), rgba(22, 33, 31, 0.04) 1px, transparent 1px, transparent 56px),
    repeating-linear-gradient(90deg, rgba(22, 33, 31, 0.035), rgba(22, 33, 31, 0.035) 1px, transparent 1px, transparent 72px);
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.query-window {
  position: absolute;
  right: max(32px, 6vw);
  top: 14%;
  width: min(520px, 44vw);
  padding: 18px;
  border: 1px solid rgba(29, 95, 143, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  transform: rotate(-1.4deg);
}

.window-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--line);
}

.redaction-line {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid rgba(31, 122, 92, 0.22);
  border-radius: 8px;
  background: var(--teal-soft);
}

.deleted {
  display: inline-flex;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--green);
  font-size: 0.78rem;
  font-weight: 750;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.data-grid span {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(29, 95, 143, 0.18);
  border-radius: 8px;
  background: #f7fbfd;
  color: var(--blue-dark);
  font-weight: 700;
}

.report-sheet {
  position: absolute;
  right: 18%;
  bottom: 8%;
  width: min(360px, 32vw);
  padding: 20px;
  border: 1px solid rgba(179, 106, 24, 0.25);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.report-sheet p {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--amber);
  background: #ffffff;
  font-weight: 750;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
}

h2 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.24;
}

.hero-copy {
  max-width: 680px;
  margin: 24px 0 0;
  color: #33413d;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.hero-actions,
.donate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button.primary {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.button.secondary {
  color: var(--blue-dark);
  border-color: rgba(29, 95, 143, 0.32);
  background: #ffffff;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 0;
  color: #33413d;
  font-size: 0.9rem;
  font-weight: 700;
}

.trust-list li::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  content: "";
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--blue-dark);
  color: #ffffff;
}

.band .section-kicker,
.band p {
  color: #dcecf6;
}

.section,
.band {
  padding: 88px 32px;
}

.section.alt {
  background: var(--soft);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-inner > p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.07rem;
}

.steps,
.feature-grid,
.faq-list,
.disclaimer-grid,
.legal-grid,
.guide-grid,
.settings-grid,
.query-notes,
.app-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.app-panel {
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lookup-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lookup-panel h3,
.lookup-panel p {
  margin: 0;
}

.lookup-panel p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.query-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.query-header p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.07rem;
}

.query-language-control {
  margin-top: 2px;
}

.query-language-control p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.query-language-switch button {
  min-width: 74px;
}

.query-panel {
  margin-top: 28px;
}

.query-short-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.query-short-list li {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
}

.query-short-list li::before {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--green);
  text-align: center;
  line-height: 28px;
  font-weight: 850;
  content: counter(list-item);
}

.query-details {
  margin-top: 18px;
  border: 1px solid rgba(29, 95, 143, 0.2);
  border-radius: 8px;
  background: #ffffff;
}

.query-details summary {
  min-height: 48px;
  padding: 14px 18px;
  color: var(--blue-dark);
  font-weight: 850;
  cursor: pointer;
}

.query-details[open] {
  padding-bottom: 18px;
}

.query-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.query-details .settings-grid,
.query-details .query-table-wrap,
.query-details .query-notes {
  margin-right: 18px;
  margin-left: 18px;
}

.section-link {
  margin-top: 22px;
}

.section-link a {
  color: var(--blue-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-control,
.tax-year-control,
.redaction-review,
.review-gates,
.review-check,
.app-actions,
.upload-code-box,
.lookup-panel,
.lookup-row,
.classification-review,
.upload-status {
  min-width: 0;
}

.upload-control label,
.tax-year-control label,
.lookup-panel label,
.review-check {
  font-weight: 800;
}

.tax-year-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tax-year-control select {
  width: min(180px, 100%);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 800;
}

.tax-year-control p {
  grid-column: 2;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.upload-control p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.upload-control input {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.file-picker {
  display: grid;
  justify-items: center;
  gap: 12px;
  align-content: center;
  min-height: 160px;
  margin-top: 14px;
  padding: 28px;
  border: 2px dashed rgba(27, 79, 114, 0.34);
  border-radius: 8px;
  background: #f8fbfd;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.file-picker.is-dragover {
  border-color: var(--blue);
  background: #eef7fb;
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.file-picker span {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
}

.file-picker .drop-hint {
  color: var(--blue-dark);
}

.selected-file-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.selected-file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.selected-file-list span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-list small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.selected-file-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(22, 33, 31, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  line-height: 1;
}

.selected-file-list button:hover,
.selected-file-list button:focus-visible {
  color: #ffffff;
  background: var(--blue-dark);
}

.redaction-review {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(31, 122, 92, 0.24);
  border-radius: 8px;
  background: var(--teal-soft);
}

.redaction-review[data-pii-status="needs-action"] {
  border-color: rgba(179, 106, 24, 0.38);
  background: #fff7ec;
}

.redaction-review[data-pii-status="anonymized"] {
  border-color: rgba(31, 122, 92, 0.28);
  background: var(--teal-soft);
}

.redaction-review p {
  margin: 0;
  font-weight: 800;
}

.redaction-review ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  color: #33413d;
  font-size: 0.92rem;
  list-style: none;
}

.review-gates {
  display: grid;
  gap: 12px;
}

.review-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(29, 95, 143, 0.18);
  border-radius: 8px;
  background: #f7fbfd;
  color: #33413d;
  font-size: 0.94rem;
  line-height: 1.35;
}

.review-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-code-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(29, 95, 143, 0.18);
  border-radius: 8px;
  background: #f7fbfd;
}

.hash-lookup {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(29, 95, 143, 0.18);
  border-radius: 8px;
  background: #f7fbfd;
}

.hash-lookup > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.hash-lookup input {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.lookup-row input {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.classification-review {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(29, 95, 143, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.classification-review-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.classification-review h3,
.classification-review p {
  margin: 0;
}

.classification-review p,
.review-empty {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
}

.review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-tabs button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(29, 95, 143, 0.24);
  border-radius: 8px;
  color: var(--blue-dark);
  background: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.review-tabs button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--blue-dark);
}

.review-table-wrap {
  overflow-x: auto;
}

.review-table-wrap table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.review-table-wrap th,
.review-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.review-table-wrap th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.review-table-wrap select {
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 750;
}

.review-table-wrap[data-review-section="funds"] table {
  min-width: 980px;
}

.review-table-wrap[data-review-section="funds"] th:last-child,
.review-table-wrap[data-review-section="funds"] td:last-child {
  width: 390px;
  min-width: 390px;
}

.review-table-wrap[data-review-section="funds"] select {
  width: 100%;
  min-width: 360px;
  max-width: none;
}

.review-treatment-control {
  display: grid;
  gap: 6px;
  min-width: 320px;
  max-width: 460px;
}

.review-treatment-control select {
  width: 100%;
  max-width: none;
}

.review-treatment-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.review-submit-row {
  display: flex;
  justify-content: flex-end;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hidden {
  display: none;
}

.upload-status,
.upload-hash,
.upload-code-box,
.classification-review,
.uploaded-file-list,
.input-health-list {
  grid-column: 1 / -1;
}

.upload-hash {
  min-height: 24px;
  margin: 0;
  color: var(--blue-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.upload-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.uploaded-file-list,
.input-health-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  list-style: none;
}

.uploaded-file-list li {
  padding: 10px 12px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  color: #173f32;
  font-weight: 750;
}

.uploaded-file-list li[data-upload-status="needs_review"] {
  border-left-color: var(--amber);
  background: #fff7ec;
  color: #5f3d0a;
}

.input-health-list li {
  padding: 10px 12px;
  border-left: 4px solid var(--amber);
  background: #fff7ec;
}

.feature-grid,
.faq-list,
.disclaimer-grid,
.legal-grid,
.query-notes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps article,
.feature-grid article,
.faq-list article,
.disclaimer-grid article,
.legal-grid article,
.guide-grid article,
.settings-grid article,
.query-notes article,
.privacy-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.steps article,
.feature-grid article,
.faq-list article,
.disclaimer-grid article,
.legal-grid article,
.guide-grid article,
.settings-grid article,
.query-notes article {
  padding: 22px;
}

.steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 850;
}

.steps p,
.feature-grid p,
.faq-list p,
.disclaimer-grid p,
.legal-grid p,
.query-notes p {
  margin: 0;
  color: var(--muted);
}

code {
  padding: 2px 5px;
  border: 1px solid rgba(29, 95, 143, 0.16);
  border-radius: 5px;
  background: #eef6fb;
  color: var(--blue-dark);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.guide-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  margin: 12px 0 0;
  color: var(--muted);
}

.settings-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.settings-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(216, 225, 221, 0.8);
}

.settings-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-list dt {
  color: var(--muted);
  font-weight: 750;
}

.settings-list dd {
  margin: 0;
  text-align: right;
}

.query-table-wrap {
  width: 100%;
  margin-top: 34px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.query-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.query-table caption {
  padding: 16px 18px;
  color: var(--blue-dark);
  text-align: left;
  font-weight: 850;
}

.query-table th,
.query-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.query-table th {
  color: #ffffff;
  background: var(--blue-dark);
  font-size: 0.9rem;
}

.query-table td {
  color: var(--muted);
}

.query-table td:first-child {
  width: 25%;
}

.query-table td:nth-child(2) {
  width: 30%;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 32px;
  align-items: start;
}

.privacy-list {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.privacy-list p {
  margin: 0;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.privacy-list p:last-child {
  border-bottom: 0;
}

.donate {
  color: #ffffff;
  background: var(--green);
}

.donate .section-kicker,
.donate p {
  color: #e6f4ee;
}

.donate .button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}

.disclaimers {
  background: #fff7ec;
}

.disclaimers .section-kicker {
  color: var(--amber);
}

.disclaimer-grid article {
  border-color: rgba(179, 106, 24, 0.26);
  background: #ffffff;
}

.disclaimer-grid h3 {
  color: #6a3c0f;
}

.legal-section {
  background: var(--soft);
}

.legal-page h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.legal-page .legal-grid {
  margin-top: 30px;
}

.legal-page .legal-grid h2 {
  margin: 0 0 10px;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.15;
}

.legal-grid article {
  min-height: 180px;
}

.legal-note {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(179, 106, 24, 0.22);
  color: #6a3c0f !important;
  font-size: 0.92rem;
  font-weight: 750;
}

.site-footer {
  display: grid;
  gap: 8px;
  padding: 32px;
  color: #d7e1dd;
  background: #121b19;
  font-size: 0.92rem;
}

.site-footer p {
  max-width: 1000px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  color: #ffffff;
  font-weight: 750;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 76px;
  }

  .query-window {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 540px);
    margin-left: auto;
    opacity: 0.3;
  }

  .report-sheet {
    display: none;
  }

  .query-header {
    grid-template-columns: 1fr;
  }

  .query-short-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps,
  .feature-grid,
  .faq-list,
  .disclaimer-grid,
  .legal-grid,
  .guide-grid,
  .settings-grid,
  .query-notes,
  .app-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section,
  .band,
  .hero,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header {
    min-height: 58px;
  }

  .nav-cta {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .language-switch button {
    min-width: 34px;
    min-height: 38px;
    font-size: 0.86rem;
  }

  .hero {
    padding-top: 58px;
    padding-bottom: 48px;
  }

  .hero::after {
    background:
      rgba(237, 244, 241, 0.92),
      repeating-linear-gradient(0deg, rgba(22, 33, 31, 0.04), rgba(22, 33, 31, 0.04) 1px, transparent 1px, transparent 48px);
  }

  .query-window {
    display: none;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.2rem);
  }

  .section,
  .band {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .steps,
  .feature-grid,
  .faq-list,
  .disclaimer-grid,
  .legal-grid,
  .guide-grid,
  .settings-grid,
  .query-notes,
  .app-panel {
    grid-template-columns: 1fr;
  }

  .query-short-list {
    grid-template-columns: 1fr;
  }

  .query-details .settings-grid,
  .query-details .query-table-wrap,
  .query-details .query-notes {
    margin-right: 12px;
    margin-left: 12px;
  }

  .settings-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .settings-list dd {
    text-align: left;
  }

  .hero-actions,
  .donate-actions,
  .app-actions {
    flex-direction: column;
  }

  .tax-year-control,
  .upload-code-box,
  .lookup-row,
  .classification-review-header {
    grid-template-columns: 1fr;
  }

  .tax-year-control p {
    grid-column: 1;
  }

  .button {
    width: 100%;
  }
}
