:root {
  color-scheme: light;
  --ink: #101511;
  --paper: #f5f5ef;
  --line: #cbd1c8;
  --muted: #5f695f;
  --lime: #c6f443;
  --teal: #087f86;
  --coral: #c44830;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; transform: translateY(-160%); padding: 10px 12px; background: var(--lime); color: var(--ink); border: 1px solid var(--ink); text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.site-header { min-height: 70px; display: flex; align-items: center; gap: 26px; padding: 14px max(24px, calc((100% - 1240px) / 2)); background: var(--ink); color: var(--paper); border-bottom: 1px solid #273028; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 700 15px Georgia, serif; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 34px; border: 1px solid currentColor; font: 700 12px Arial, sans-serif; }
.site-header nav { display: flex; gap: 18px; margin-left: auto; }
.site-header nav a, .language-status { color: #d3dbd2; font: 700 12px Arial, sans-serif; letter-spacing: 0; text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--lime); }
.language-status { color: var(--lime); border-left: 1px solid #455047; padding-left: 18px; }

main { max-width: 1240px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr); gap: 42px; padding: 66px 0 54px; border-bottom: 1px solid var(--ink); }
.hero-copy { align-self: center; padding-left: 0; }
.eyebrow, .section-index { margin: 0; color: var(--teal); font: 700 12px/1.25 "Courier New", monospace; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 20px; font: 700 54px/1.04 Georgia, "Times New Roman", serif; letter-spacing: 0; }
.lede { max-width: 650px; margin-bottom: 34px; color: #39443c; font-size: 18px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.hero-facts div { min-height: 88px; padding: 14px; background: var(--paper); }
.hero-facts dt { margin-bottom: 10px; color: var(--muted); font: 700 10px "Courier New", monospace; }
.hero-facts dd { margin: 0; font-size: 14px; font-weight: 700; }
.hero-visual { margin: 0; align-self: center; border: 1px solid var(--ink); background: #1a211c; }
.hero-visual img { display: block; width: 100%; height: auto; aspect-ratio: 1672 / 941; object-fit: cover; }
.hero-visual figcaption { padding: 13px 16px; color: #dce6da; font-size: 13px; }

.generator, .explainers { padding: 58px 0; border-bottom: 1px solid var(--ink); }
.section-heading { max-width: 780px; margin-bottom: 30px; }
.section-heading h2, .audit-bridge h2, .sources h2 { margin: 8px 0 12px; font: 700 34px/1.08 Georgia, "Times New Roman", serif; }
.section-heading > p:last-child { margin: 0; color: #414a42; font-size: 16px; }
.generator-layout { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr); gap: 24px; align-items: start; }
.policy-controls { display: grid; gap: 10px; }
.policy-choice { min-width: 0; margin: 0; padding: 21px; border: 1px solid var(--ink); background: #fbfbf7; }
.policy-choice legend { display: flex; align-items: baseline; gap: 12px; padding: 0; font-size: 17px; }
.policy-choice legend span { color: var(--teal); font: 700 12px "Courier New", monospace; }
.policy-choice p { margin: 12px 0 15px; color: #3f4840; font-size: 14px; }
.policy-choice small { display: block; margin-top: 13px; color: var(--muted); font-size: 12px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 280px; border: 1px solid var(--ink); }
.segmented button { min-height: 40px; border: 0; border-right: 1px solid var(--ink); background: transparent; color: var(--ink); font: 700 13px Arial, sans-serif; }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--lime); }
.segmented button:focus-visible, .output-actions button:focus-visible, .audit-bridge a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.policy-output { position: sticky; top: 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.policy-output-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding: 22px; border-bottom: 1px solid #3b463c; }
.policy-output h3 { max-width: 390px; margin: 6px 0 0; font: 700 25px/1.1 Georgia, "Times New Roman", serif; }
.local-badge { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #768378; color: var(--lime); font: 700 10px "Courier New", monospace; }
.policy-output pre { min-height: 418px; max-height: 520px; margin: 0; padding: 22px; overflow: auto; white-space: pre-wrap; color: #e9f2e7; background: #151b16; font: 12px/1.6 "Courier New", monospace; }
.output-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 22px 0; }
.output-actions button, .audit-bridge a { min-height: 46px; border: 1px solid var(--paper); background: transparent; color: var(--paper); text-align: center; text-decoration: none; font: 700 13px Arial, sans-serif; }
.output-actions button:first-child, .audit-bridge a { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.copy-status { min-height: 38px; margin: 0; padding: 11px 22px; color: #c6d1c6; font: 700 12px Arial, sans-serif; }
.copy-status[data-state="success"] { color: var(--lime); }
.copy-status[data-state="error"] { color: #ffb4a6; }
.output-boundary { margin: 0; padding: 16px 22px 22px; border-top: 1px solid #3b463c; color: #c6d1c6; font-size: 12px; }

.audit-bridge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr); align-items: center; gap: 40px; padding: 46px 38px; background: #dceff0; border-bottom: 1px solid var(--ink); }
.audit-bridge p { max-width: 720px; margin: 0; color: #344641; }
.audit-bridge a { display: grid; place-items: center; min-height: 62px; }

.explainer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.explainer-grid article { min-height: 248px; padding: 23px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: #fbfbf7; }
.explainer-grid article:nth-child(2) { background: #fff3ee; }
.explainer-grid article:nth-child(3) { background: #edf6e7; }
.explainer-grid span { color: var(--teal); font: 700 12px "Courier New", monospace; }
.explainer-grid h3 { margin: 42px 0 12px; font: 700 22px/1.1 Georgia, "Times New Roman", serif; }
.explainer-grid p { margin: 0; color: #3e463f; font-size: 14px; }

.sources { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 36px; padding: 54px 0; }
.sources ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; margin: 0; list-style: none; }
.sources li { border: 1px solid var(--line); }
.sources a { display: flex; align-items: center; min-height: 68px; padding: 13px 16px; color: var(--ink); font-weight: 700; text-decoration: none; }
.sources a:hover, .sources a:focus-visible { background: var(--lime); }
.site-footer { display: flex; justify-content: space-between; gap: 18px; padding: 20px max(24px, calc((100% - 1240px) / 2)); background: var(--ink); color: #d6ded4; font: 700 12px Arial, sans-serif; }
.site-footer a { color: var(--paper); text-decoration: none; }

@media (max-width: 1288px) { main { padding: 0 24px; } }
@media (max-width: 900px) {
  .site-header { padding: 14px 24px; }
  .hero, .generator-layout, .audit-bridge, .sources { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  .policy-output { position: static; }
  .explainer-grid { grid-template-columns: 1fr; }
  .explainer-grid article { min-height: 0; }
  .explainer-grid h3 { margin-top: 22px; }
}
@media (max-width: 620px) {
  .site-header { min-height: 56px; gap: 13px; padding: 11px 16px; }
  .site-header nav { display: none; }
  .language-status { margin-left: auto; border-left: 0; padding-left: 0; font-size: 10px; }
  main { padding: 0 16px; }
  .hero, .generator, .explainers, .sources { padding-top: 36px; padding-bottom: 36px; }
  h1 { font-size: 39px; }
  .section-heading h2, .audit-bridge h2, .sources h2 { font-size: 29px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div { min-height: auto; }
  .policy-choice { padding: 17px; }
  .policy-output-header, .policy-output pre { padding-left: 17px; padding-right: 17px; }
  .policy-output h3 { font-size: 22px; }
  .policy-output pre { min-height: 388px; font-size: 11px; }
  .output-actions { grid-template-columns: 1fr; padding-left: 17px; padding-right: 17px; }
  .copy-status, .output-boundary { padding-left: 17px; padding-right: 17px; }
  .audit-bridge { gap: 22px; padding: 32px 20px; }
  .sources ul { grid-template-columns: 1fr; }
  .site-footer { display: grid; padding: 18px 16px; }
}
