:root,
[data-theme="light"] {
  --bg: #e8e2d5;
  --surface: #f4f0e8;
  --surface-2: #d9d0c0;
  --ink: #171615;
  --muted: #5e5a55;
  --faint: #8e877e;
  --line: #171615;
  --accent: #9f1f1f;
  --accent-strong: #7f1717;
  --accent-soft: #ead1cd;
  --alert: #9f1f1f;
  --alert-soft: #ead1cd;
  --warning: #8b1116;
  --shadow: none;
}

[data-theme="dark"] {
  --bg: #181715;
  --surface: #211f1c;
  --surface-2: #302d29;
  --ink: #eee8dc;
  --muted: #b8b0a4;
  --faint: #847d73;
  --line: #eee8dc;
  --accent: #d6584f;
  --accent-strong: #eb746c;
  --accent-soft: #482325;
  --alert: #ff676b;
  --alert-soft: #482325;
  --warning: #ff676b;
  --shadow: none;
}

[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

.brand-link,
.guide-home-link {
  color: inherit;
  text-decoration: none;
}

.field-guide-main {
  scroll-padding-top: 24px;
}

.market-finder-callout {
  border-color: var(--accent);
  box-shadow: 6px 6px 0 var(--ink);
}

.market-finder-callout .field-guide-callout-index {
  color: var(--surface);
  background: var(--accent);
}

.market-finder-callout .field-guide-callout-action {
  color: var(--surface);
  background: var(--ink);
}

.field-guide-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  max-width: 1500px;
  min-height: 310px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 84px) clamp(24px, 5vw, 72px) clamp(28px, 5vw, 64px) clamp(52px, 7vw, 104px);
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--surface);
}

.guide-spine {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  width: 34px;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.guide-spine span {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 2px 2px 0 color-mix(in srgb, var(--ink) 15%, transparent);
}

.field-guide-hero-copy {
  align-self: center;
  max-width: 860px;
}

.field-guide-hero-copy h2 {
  max-width: 12ch;
  margin-top: 10px;
  font-size: clamp(40px, 7vw, 94px);
  line-height: 0.92;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.field-guide-hero-copy p {
  max-width: 68ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
}

.guide-edition-stamp {
  display: grid;
  width: 188px;
  align-self: end;
  justify-items: center;
  padding: 16px 12px;
  border: 3px double var(--accent);
  color: var(--accent);
  transform: rotate(-1.5deg);
  text-align: center;
}

.guide-edition-stamp span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.guide-edition-stamp strong {
  font-size: 68px;
  line-height: 0.95;
}

.guide-edition-stamp small {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid currentColor;
  font-size: 11px;
}

.guide-rule {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  gap: 32px;
  max-width: 1500px;
  margin: 14px auto 0;
  padding: 22px 26px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--bg);
}

.guide-rule .eyebrow {
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}

.guide-rule p {
  max-width: 78ch;
  color: color-mix(in srgb, var(--bg) 82%, transparent);
}

.guide-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1500px;
  margin: 14px auto 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.guide-stats article {
  min-width: 0;
  padding: 18px 20px;
}

.guide-stats article + article {
  border-left: 1px solid var(--line);
}

.guide-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.guide-stats strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.1;
  text-overflow: ellipsis;
}

.guide-workspace {
  max-width: 1500px;
  margin: 16px auto 0;
}

.guide-controls {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.guide-control-heading,
.guide-filter-row,
.guide-results-head,
.guide-actions {
  display: flex;
  align-items: center;
}

.guide-control-heading {
  justify-content: space-between;
  gap: 20px;
}

.guide-search {
  margin-top: 16px;
}

.guide-filter-row {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.guide-actions {
  gap: 8px;
  margin-left: auto;
}

.guide-actions .export-button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  text-decoration: none;
}

.guide-sector-index {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.guide-sector-index button {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
}

.guide-sector-index button span {
  color: var(--muted);
  font-size: 12px;
}

.guide-sector-index button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--surface);
  background: var(--accent);
}

.guide-sector-index button[aria-pressed="true"] span {
  color: inherit;
}

.guide-results-head {
  justify-content: space-between;
  gap: 20px;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.guide-results-head p {
  color: var(--ink);
  font-weight: 700;
}

.guide-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-entry {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 0 31px, color-mix(in srgb, var(--accent) 16%, transparent) 31px 32px, transparent 32px),
    var(--surface);
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.field-entry-register,
.field-entry-heading,
.field-entry-evidence {
  padding-left: 27px;
}

.field-entry-register {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field-entry-heading {
  margin-top: 13px;
}

.field-entry-sector {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-entry-heading h3 {
  margin-top: 4px;
  font-size: clamp(21px, 2.2vw, 29px);
  line-height: 1.05;
  text-transform: uppercase;
}

.field-entry-heading p {
  margin-top: 5px;
  font-weight: 700;
}

.field-entry-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0 27px;
  border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.field-entry-facts div {
  min-width: 0;
  padding: 10px;
}

.field-entry-facts div:nth-child(even) {
  border-left: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.field-entry-facts div:nth-child(n + 3) {
  border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.field-entry-facts div:last-child {
  grid-column: 1 / -1;
}

.field-entry-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-entry-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.field-entry-evidence {
  margin-top: 15px;
}

.field-entry-evidence p {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.field-entry-evidence a {
  display: inline-block;
  min-height: 44px;
  margin-top: 8px;
  padding: 11px 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.field-entry-notes {
  margin: auto 0 0 27px;
  padding-top: 10px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 45%, transparent);
  font-size: 13px;
}

.field-entry-notes summary {
  min-height: 44px;
  padding: 11px 0;
  cursor: pointer;
  font-weight: 700;
}

.field-entry-notes p {
  margin-bottom: 8px;
  color: var(--muted);
}

.guide-load-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.guide-load-more {
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--line);
  color: var(--surface);
  background: var(--ink);
  font-weight: 700;
  text-transform: uppercase;
}

.guide-empty {
  border: 1px solid var(--line);
  background: var(--surface);
}

.guide-disclosure {
  max-width: 1500px;
  margin: 16px auto 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
}

.guide-disclosure strong {
  color: var(--ink);
}

.support-section {
  display: grid;
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(24px, 5vw, 72px);
  max-width: 1500px;
  margin: 16px auto 0;
  padding: clamp(24px, 4vw, 52px);
  border: 2px solid var(--line);
  background: var(--surface);
}

.support-section h2 {
  max-width: 12ch;
  margin-top: 6px;
  color: var(--accent);
  font-size: clamp(28px, 4vw, 52px);
  line-height: 0.98;
  text-transform: uppercase;
}

.support-copy {
  display: grid;
  gap: 14px;
}

.support-copy p {
  max-width: 76ch;
}

.support-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.support-contribution-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 2px solid var(--ink);
  color: var(--surface);
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.support-contribution-button:hover,
.support-contribution-button:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.support-action > span {
  color: var(--muted);
  font-size: 12px;
}

.support-copy small {
  display: block;
  max-width: 76ch;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.market-hero {
  background:
    linear-gradient(90deg, transparent 0 49%, color-mix(in srgb, var(--accent) 7%, transparent) 49% 50%, transparent 50%),
    var(--surface);
}

.market-spine span:nth-child(odd) {
  border-radius: 1px;
  transform: rotate(45deg);
}

.market-edition-stamp strong {
  font-size: clamp(42px, 5vw, 68px);
}

.market-rule {
  background: var(--accent);
}

.market-rule .eyebrow,
.market-rule p {
  color: color-mix(in srgb, var(--surface) 82%, transparent);
}

.market-stats strong {
  font-size: clamp(20px, 2.8vw, 34px);
}

.market-filter-row .market-weekend-button {
  min-height: 44px;
}

.market-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.market-entry {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
}

.market-entry-topline {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--surface);
  background: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.market-entry-topline .market-confirm {
  color: #ffaaa5;
}

.market-entry-heading {
  padding: 16px 16px 12px;
}

.market-entry-heading h3 {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  text-transform: uppercase;
}

.market-entry-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.market-day-ticket {
  display: grid;
  gap: 2px;
  margin: 0 16px;
  padding: 13px 14px;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.market-day-ticket span,
.market-day-ticket small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.market-day-ticket strong {
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
}

.market-day-ticket small {
  color: var(--muted);
}

.market-entry-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 16px 0;
  border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.market-entry-facts div {
  min-width: 0;
  padding: 10px;
}

.market-entry-facts div:nth-child(even) {
  border-left: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.market-entry-facts div:nth-child(n + 3) {
  border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.market-entry-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.market-entry-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.market-entry-note {
  margin: 12px 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.market-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: auto 16px 0;
  padding-top: 14px;
}

.market-entry-actions a {
  min-height: 44px;
  padding: 10px 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.market-last-checked {
  margin: 0 16px 14px;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 45%, transparent);
  color: var(--muted);
  font-size: 11px;
}

.market-submit-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 5vw, 70px);
  max-width: 1500px;
  margin: 16px auto 0;
  padding: clamp(24px, 4vw, 52px);
  border: 2px solid var(--line);
  background: var(--surface);
}

.market-submit-policy h2 {
  max-width: 10ch;
  margin-top: 7px;
  color: var(--accent);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.94;
  text-transform: uppercase;
}

.market-submit-lede {
  max-width: 58ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.market-inclusion-box {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.market-inclusion-box h3 {
  font-size: 15px;
  text-transform: uppercase;
}

.market-inclusion-box ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.market-inclusion-box li::marker {
  color: var(--accent);
  font-weight: 700;
}

.market-submit-privacy {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.market-submit-privacy strong {
  color: var(--ink);
}

.market-submission-form {
  align-self: start;
  border: 1px solid var(--line);
}

.market-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  color: var(--surface);
  background: var(--ink);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.market-form-heading strong {
  color: color-mix(in srgb, var(--surface) 72%, transparent);
  font-weight: 400;
}

.market-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.market-form-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.market-form-field > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.market-form-field input,
.market-form-field textarea,
.market-form-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
}

.market-form-field input {
  min-height: 44px;
  padding: 10px 11px;
}

.market-form-field select {
  min-height: 44px;
  padding: 10px 36px 10px 11px;
}

.market-form-field textarea {
  resize: vertical;
  padding: 11px;
  line-height: 1.45;
}

.market-form-field input:focus,
.market-form-field textarea:focus,
.market-form-field select:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-color: var(--accent);
}

.market-form-field input:user-invalid,
.market-form-field textarea:user-invalid {
  border-color: var(--accent);
}

.market-form-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.market-form-wide {
  grid-column: 1 / -1;
}

.market-form-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  margin: 0 18px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.market-form-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.market-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
}

.market-submit-button {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.market-submission-status {
  min-height: 0;
  margin: 0 18px;
  font-size: 12px;
  line-height: 1.4;
}

.market-submission-status:not(:empty) {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.market-submission-status[data-state="success"] {
  border-left-color: #287a45;
}

@media (max-width: 1050px) {
  .market-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-submit-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .field-guide-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-left: 54px;
  }

  .guide-edition-stamp {
    width: 160px;
    justify-self: end;
  }

  .guide-rule {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .support-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .guide-stats article:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guide-stats article:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .guide-results {
    grid-template-columns: 1fr;
  }

  .market-results {
    grid-template-columns: 1fr;
  }

  .guide-actions {
    width: 100%;
    margin-left: 0;
  }

  .guide-actions > * {
    flex: 1 1 0;
  }
}

@media (max-width: 560px) {
  .field-guide-topbar .brand h1 {
    font-size: 16px;
  }

  .field-guide-topbar .tagline,
  .field-guide-topbar .eyebrow {
    display: none;
  }

  .field-guide-hero-copy h2 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .guide-control-heading {
    align-items: flex-start;
  }

  .guide-filter-row .select-field {
    width: 100%;
    justify-content: space-between;
  }

  .guide-filter-row .select-field select {
    flex: 1;
    max-width: 66%;
  }

  .field-entry-facts {
    grid-template-columns: 1fr;
  }

  .field-entry-facts div:nth-child(even) {
    border-left: 0;
  }

  .field-entry-facts div:nth-child(n + 2) {
    border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  }

  .field-entry-facts div:last-child {
    grid-column: auto;
  }

  .market-entry-facts {
    grid-template-columns: 1fr;
  }

  .market-form-grid {
    grid-template-columns: 1fr;
  }

  .market-form-wide {
    grid-column: auto;
  }

  .market-form-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .market-entry-facts div:nth-child(even) {
    border-left: 0;
  }

  .market-entry-facts div:nth-child(n + 2) {
    border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  }
}

@media print {
  .field-guide-page {
    overflow: visible;
    color: #171615;
    background: #e8e2d5;
  }

  .field-guide-page .app-shell {
    display: block;
    height: auto;
  }

  .field-guide-page .main {
    overflow: visible;
    padding: 0;
  }

  .field-guide-topbar,
  .guide-controls,
  .guide-sector-index,
  .guide-results-head,
  .guide-load-row,
  .guide-disclosure,
  .support-section,
  .field-guide-page footer {
    display: none !important;
  }

  .field-guide-hero,
  .guide-rule,
  .guide-stats {
    break-after: page;
  }

  .guide-results {
    display: block;
  }

  .field-entry {
    min-height: 46vh;
    margin-bottom: 12mm;
    break-inside: avoid;
    color: #171615;
    background: #f4f0e8;
  }

  .field-entry-evidence a {
    color: #9f1f1f;
  }
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    color-mix(in srgb, var(--ink) 2%, transparent) 4px
  );
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: var(--surface);
  background: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(16px, 3vw, 40px);
  border-bottom: 2px solid var(--line);
  background: var(--surface);
}

.brand,
.top-actions,
.filter-row,
.table-toolbar,
.pagination,
.comparison-head {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.zed-mark {
  display: grid;
  width: 48px;
  flex: 0 0 48px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 0.78;
  text-align: center;
}

.zed-mark .zero {
  position: relative;
  display: inline-block;
  width: 100%;
  color: var(--accent);
  font-size: 31px;
  line-height: 0.74;
  transform: scaleX(0.62);
}

.zed-mark .zero i {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 32px;
  height: 3px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-58deg);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(18px, 1.8vw, 23px);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 17px;
}

.eyebrow,
.kpi-label,
.select-field > span,
fieldset legend {
  display: block;
  color: var(--muted);
  font-family: "Courier Prime", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.top-actions {
  gap: 8px;
}

.guide-language-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
}

.guide-language-toggle button {
  min-width: 42px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-family: "Courier Prime", monospace;
  font-size: 13px;
  font-weight: 700;
}

.guide-language-toggle button[aria-pressed="true"] {
  color: var(--surface);
  background: var(--accent);
}

.tagline {
  margin-top: 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.as-of {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
}

.icon-button,
.quiet-button,
.page-button,
.export-button,
.flag-button,
.tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-button {
  display: grid;
  width: 44px;
  place-items: center;
}

.icon-button svg,
.export-button svg,
.search-field svg,
.empty-state svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.text-button {
  width: auto;
  padding: 0 14px;
}

.top-support-button {
  width: auto;
  padding: 0 12px;
  border-color: var(--accent);
  color: var(--surface);
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.top-support-button:hover,
.top-support-button:focus-visible {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.form-jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.icon-button:hover,
.quiet-button:hover,
.page-button:hover:not(:disabled),
.export-button:hover,
.tab:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.main {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px clamp(16px, 3vw, 40px) 28px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1500px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi {
  min-width: 0;
  padding: 17px 20px;
}

.kpi + .kpi {
  border-left: 1px solid var(--line);
}

.kpi strong {
  display: block;
  margin-top: 2px;
  font-family: "Courier Prime", monospace;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.alert-kpi strong {
  color: var(--alert);
}

.kpi-note {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  max-width: 1500px;
  margin: 12px auto 0;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line));
  border-radius: 7px;
  color: var(--muted);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  font-size: 14px;
}

.notice strong {
  color: var(--ink);
}

.workspace {
  max-width: 1500px;
  margin: 16px auto 0;
}

.filters-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.quiet-button {
  padding: 0 14px;
  color: var(--muted);
}

.search-field {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
}

.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-help {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.search-help strong {
  color: var(--ink);
}

kbd {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  font-family: "Courier Prime", monospace;
  font-size: 12px;
}

.filter-row {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.rate-filter {
  display: flex;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.rate-filter legend {
  float: left;
  margin-right: 10px;
  line-height: 40px;
}

.rate-filter label {
  cursor: pointer;
}

.rate-filter input {
  position: absolute;
  opacity: 0;
}

.rate-filter span {
  display: grid;
  min-width: 58px;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--bg);
  font-family: "Courier Prime", monospace;
  font-size: 13px;
  font-weight: 600;
}

.rate-filter input:checked + span {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.rate-filter .rate-50 input:checked + span {
  border-color: var(--alert);
  color: var(--alert);
  background: var(--alert-soft);
}

.select-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-field select {
  min-height: 40px;
  min-width: 0;
  max-width: 220px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}

.flag-button {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 14px;
  font-weight: 600;
}

.flag-button[aria-pressed="true"] {
  border-color: var(--alert);
  color: var(--alert);
  background: var(--alert-soft);
}

.flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alert);
}

.view-tabs {
  display: flex;
  gap: 22px;
  margin-top: 16px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: transparent;
}

.tab.is-active {
  color: var(--ink);
}

.tab.is-active::after {
  background: var(--accent);
}

.view {
  padding-top: 14px;
}

.table-toolbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#showAllButton[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.result-count {
  color: var(--muted);
  font-family: "Courier Prime", monospace;
  font-size: 13px;
}

.export-button,
.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: var(--surface-2);
  font-family: "Courier Prime", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 0 64px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.code {
  color: var(--accent-strong);
  font-family: "Courier Prime", monospace;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.description {
  max-width: 650px;
  font-size: 14px;
}

.description strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

.description span,
.impact {
  color: var(--muted);
  font-size: 13px;
}

.sector-badge,
.rate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.rate-badge {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--accent-strong);
  font-family: "Courier Prime", monospace;
}

.rate-badge.rate-50 {
  border-color: color-mix(in srgb, var(--alert) 55%, var(--line));
  color: var(--alert);
  background: var(--alert-soft);
}

.details-button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}

.pagination {
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-family: "Courier Prime", monospace;
  font-size: 13px;
}

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

.empty-state {
  padding: 54px 20px;
  text-align: center;
}

.empty-state svg {
  width: 38px;
  margin: 0 auto 12px;
  color: var(--faint);
}

.empty-state p {
  margin: 4px auto 16px;
  color: var(--muted);
}

.comparison-head {
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.comparison-head p {
  max-width: 520px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.sector-chart {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.sector-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) 3fr 68px 68px 96px;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
}

.sector-row:last-child {
  border-bottom: 0;
}

.sector-name {
  font-weight: 600;
}

.bar-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-2);
}

.bar-total,
.bar-fifty {
  position: absolute;
  inset: 0 auto 0 0;
}

.bar-total {
  background: color-mix(in srgb, var(--accent) 68%, var(--surface));
}

.bar-fifty {
  background: var(--alert);
}

.sector-metric {
  font-family: "Courier Prime", monospace;
  font-size: 13px;
  text-align: right;
}

.aggregate-only {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

footer {
  display: flex;
  justify-content: space-between;
  max-width: 1500px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 13px;
}

footer a,
.source-link {
  color: var(--accent-strong);
  font-weight: 600;
}

dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 26px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(8, 14, 12, 0.62);
  backdrop-filter: blur(3px);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 26px;
}

.detail-code {
  color: var(--accent-strong);
  font-family: "Courier Prime", monospace;
  font-size: 25px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.detail-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
}

.detail-block strong {
  display: block;
  margin-top: 4px;
}

.detail-description {
  margin-top: 18px;
}

.detail-description p {
  margin-top: 6px;
  color: var(--muted);
}

.method-dialog ul {
  padding-left: 20px;
  color: var(--muted);
}

.method-dialog li + li {
  margin-top: 10px;
}

.manifesto-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1500px;
  margin: 0 auto 14px;
  padding: 8px 12px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.055em;
}

.manifesto-strip .slash {
  color: var(--accent);
  font-size: 20px;
}

.manifesto-strip .issue {
  margin-left: auto;
  color: var(--accent);
  white-space: nowrap;
}

.field-guide-callout {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: stretch;
  max-width: 1500px;
  margin: 0 auto 14px;
  overflow: hidden;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  box-shadow: 7px 7px 0 var(--accent);
  transform: translate(-3px, -3px);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-guide-callout:hover,
.field-guide-callout:focus-visible {
  background: var(--accent-soft);
  box-shadow: 3px 3px 0 var(--accent);
  transform: translate(1px, 1px);
}

.field-guide-callout-index {
  display: grid;
  min-height: 104px;
  place-content: center;
  border-right: 2px solid var(--ink);
  color: var(--surface);
  background: var(--accent);
  font-size: 17px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-align: center;
}

.field-guide-callout-copy {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 17px 22px;
}

.field-guide-callout-copy small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.055em;
}

.field-guide-callout-copy strong {
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.field-guide-callout-copy > span {
  color: var(--muted);
  font-size: 14px;
}

.field-guide-callout-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-left: 1px dashed var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.field-guide-callout-action b {
  color: var(--accent);
  font-size: 27px;
}

.impact-explainer {
  max-width: 1500px;
  margin: 0 auto 14px;
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.impact-intro {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  column-gap: 32px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.impact-intro .eyebrow {
  grid-column: 1;
}

.impact-intro h2 {
  grid-column: 1;
  max-width: 20ch;
  margin-top: 3px;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}

.impact-intro p {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 68ch;
  color: var(--muted);
  font-size: 14px;
}

.pressure-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--ink);
  list-style: none;
}

.pressure-chain li {
  position: relative;
  min-height: 162px;
  padding: 15px;
  border-right: 1px solid var(--ink);
}

.pressure-chain li:last-child {
  border-right: 0;
}

.pressure-chain li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -10px;
  z-index: 1;
  width: 19px;
  color: var(--accent);
  background: var(--surface);
  content: "→";
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  transform: translateY(-50%);
}

.chain-number {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.pressure-chain strong {
  display: block;
  max-width: 24ch;
  font-size: 14px;
  line-height: 1.25;
  text-transform: uppercase;
}

.pressure-chain p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.worked-example {
  padding-top: 16px;
}

.example-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.example-label span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.example-label strong {
  font-size: 15px;
  text-transform: uppercase;
}

.example-math {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  border: 1px solid var(--ink);
}

.example-math.milk-example {
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
}

.example-math.milk-example strong {
  font-size: clamp(20px, 2.25vw, 30px);
}

.example-math > div {
  padding: 12px 14px;
}

.example-math span,
.example-math small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.example-math strong {
  display: block;
  margin: 2px 0;
  font-size: clamp(22px, 2.7vw, 34px);
  line-height: 1;
}

.example-math .math-arrow {
  display: grid;
  width: 42px;
  place-items: center;
  border-right: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  color: var(--accent);
  font-size: 22px;
}

.example-math .critical-mass {
  color: var(--surface);
  background: var(--ink);
}

.example-math .critical-mass span,
.example-math .critical-mass small {
  color: color-mix(in srgb, var(--surface) 72%, transparent);
}

.example-math .critical-mass strong {
  color: var(--accent);
}

.example-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.priority-section {
  margin-bottom: 18px;
  padding: 18px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.priority-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.priority-heading h2 {
  max-width: 26ch;
  margin-top: 3px;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}

.priority-heading p,
.priority-caveat {
  color: var(--muted);
  font-size: 13px;
}

.priority-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.priority-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 14px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
}

.priority-card:nth-child(5n) {
  border-right: 0;
}

.priority-card:nth-child(n + 6) {
  border-bottom: 0;
}

.priority-rank {
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
}

.priority-card h3 {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.1;
  text-transform: uppercase;
}

.priority-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.priority-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.priority-meta span {
  padding: 2px 5px;
  border: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.priority-card button {
  align-self: flex-end;
  min-width: 44px;
  min-height: 44px;
  margin-top: auto;
  margin-bottom: -10px;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-weight: 700;
}

.priority-caveat {
  padding-top: 10px;
  border-top: 1px dashed var(--ink);
}

.alternatives-section {
  margin-bottom: 18px;
  padding: 18px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.alternatives-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.alternatives-heading h2 {
  max-width: 30ch;
  margin-top: 3px;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}

.alternatives-heading p,
.alternatives-disclosure {
  color: var(--muted);
  font-size: 13px;
}

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

.alternative-category {
  padding: 16px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.alternative-category:nth-child(2n) {
  border-right: 0;
}

.alternative-category:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.alternative-category header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}

.alternative-number {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.alternative-category h3 {
  font-size: 17px;
  line-height: 1.15;
  text-transform: uppercase;
}

.alternative-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.alternative-option {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.alternative-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
  justify-content: space-between;
}

.alternative-option h4 {
  font-size: 15px;
  line-height: 1.2;
}

.origin-status {
  padding: 2px 5px;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.alternative-option p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.alternative-option .alternative-products {
  color: var(--ink);
  font-weight: 700;
}

.alternative-option a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.alternatives-disclosure {
  padding-top: 12px;
  border-top: 1px dashed var(--ink);
}

.alternatives-disclosure strong {
  color: var(--ink);
}

.grocery-guide-section {
  margin-bottom: 18px;
  padding: 18px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.grocery-guide-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 28px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.grocery-guide-heading h2 {
  max-width: 18ch;
  margin-top: 3px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.95;
  text-transform: uppercase;
}

.grocery-guide-intro p,
.grocery-guide-disclosure {
  color: var(--muted);
  font-size: 13px;
}

.grocery-guide-intro {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.guide-download-all {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--ink);
  color: var(--surface);
  background: var(--ink);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.guide-download-all:hover {
  color: var(--surface);
  background: var(--accent-strong);
}

.grocery-swipe-hint {
  display: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.grocery-card-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 0;
}

.grocery-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--bg);
}

.grocery-card > a {
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: #d7cfc0;
}

.grocery-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  transition: transform 180ms ease;
}

.grocery-card > a:hover img {
  transform: scale(1.015);
}

.grocery-card figcaption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  font-size: 12px;
}

.grocery-card figcaption > span {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.grocery-card figcaption strong {
  min-width: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.grocery-card figcaption a {
  color: var(--accent-strong);
  font-weight: 700;
  white-space: nowrap;
}

.grocery-guide-disclosure {
  padding-top: 12px;
  border-top: 1px dashed var(--ink);
}

.grocery-guide-disclosure strong {
  color: var(--ink);
}

.status-strip,
.notice,
.filters-panel,
.table-wrap,
.sector-chart,
dialog {
  border-radius: 0;
  box-shadow: none;
}

.status-strip {
  border-width: 2px;
}

.kpi strong,
.code,
.result-count,
.sector-metric,
.detail-code {
  font-family: "Courier Prime", monospace;
}

.kpi strong,
.priority-rank,
.detail-code {
  text-shadow: 0.5px 0 var(--ink);
}

.search-field,
.icon-button,
.quiet-button,
.page-button,
.export-button,
.flag-button,
.select-field select,
.rate-filter span {
  border-radius: 0;
}

.notice {
  border-style: dashed;
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.filters-panel {
  border-width: 2px;
}

.export-button,
.flag-button[aria-pressed="true"] {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.flag-button[aria-pressed="true"] .flag-dot {
  background: var(--accent);
}

.sector-badge,
.rate-badge {
  border-radius: 0;
}

.view-tabs {
  border-bottom: 2px solid var(--ink);
}

footer {
  padding-top: 10px;
  border-top: 1px dashed var(--ink);
}

@media (max-width: 900px) {
  .status-strip {
    grid-template-columns: 1fr 1fr;
  }
  .kpi:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .kpi:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .as-of {
    display: none;
  }
  .flag-button {
    margin-left: 0;
  }
  .comparison-head {
    display: block;
  }
  .comparison-head p {
    margin-top: 6px;
    text-align: left;
  }
  .impact-intro {
    grid-template-columns: 1fr;
  }
  .impact-intro p {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
  }
  .pressure-chain {
    grid-template-columns: 1fr 1fr;
  }
  .pressure-chain li:nth-child(2) {
    border-right: 0;
  }
  .pressure-chain li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ink);
  }
  .pressure-chain li:nth-child(2)::after {
    display: none;
  }
  .priority-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grocery-card-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .priority-card:nth-child(5n),
  .priority-card:nth-child(n + 6) {
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
  }
  .priority-card:nth-child(2n) {
    border-right: 0;
  }
  .priority-card:nth-child(n + 9) {
    border-bottom: 0;
  }
  .sector-row {
    grid-template-columns: minmax(160px, 1.3fr) 2fr 54px 54px;
  }
  .aggregate-only {
    display: none;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px 12px;
    min-height: 68px;
    padding: 10px 14px;
  }
  .top-actions {
    margin-left: auto;
  }
  .top-support-button {
    min-height: 40px;
    padding: 0 9px;
    font-size: 10px;
  }
  .brand-mark {
    width: 30px;
  }
  .brand .eyebrow {
    display: none;
  }
  h1 {
    font-size: 20px;
  }
  .text-button {
    display: none;
  }
  .main {
    padding: 12px 12px 22px;
  }
  .manifesto-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
  }
  .manifesto-strip .slash {
    display: none;
  }
  .manifesto-strip .issue {
    margin: 5px 0 0;
  }
  .field-guide-callout {
    grid-template-columns: 70px minmax(0, 1fr);
    box-shadow: 4px 4px 0 var(--accent);
    transform: translate(-2px, -2px);
  }
  .field-guide-callout-index {
    min-height: 126px;
    font-size: 14px;
  }
  .field-guide-callout-copy {
    padding: 14px;
  }
  .field-guide-callout-copy small {
    font-size: 11px;
  }
  .field-guide-callout-copy strong {
    font-size: 19px;
  }
  .field-guide-callout-copy > span {
    font-size: 13px;
  }
  .field-guide-callout-action {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px dashed var(--ink);
    border-left: 0;
  }
  .impact-explainer {
    padding: 13px;
  }
  .pressure-chain {
    grid-template-columns: 1fr;
  }
  .pressure-chain li,
  .pressure-chain li:nth-child(2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }
  .pressure-chain li:last-child {
    border-bottom: 0;
  }
  .pressure-chain li:not(:last-child)::after {
    top: auto;
    right: 14px;
    bottom: -12px;
    transform: rotate(90deg);
  }
  .pressure-chain li:nth-child(2)::after {
    display: block;
  }
  .example-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .example-math {
    grid-template-columns: 1fr;
  }
  .example-math.milk-example {
    grid-template-columns: 1fr;
  }
  .example-math .math-arrow {
    width: auto;
    height: 35px;
    border: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    font-size: 0;
    transform: none;
  }
  .example-math .math-arrow::before {
    content: "↓";
    font-size: 20px;
  }
  .priority-section {
    padding: 13px;
  }
  .priority-heading {
    display: block;
  }
  .alternatives-heading {
    display: block;
  }
  .priority-heading p {
    margin-top: 10px;
  }
  .alternatives-heading p {
    margin-top: 10px;
  }
  .priority-grid {
    grid-template-columns: 1fr;
  }
  .priority-card,
  .priority-card:nth-child(2n),
  .priority-card:nth-child(5n),
  .priority-card:nth-child(n + 6),
  .priority-card:nth-child(n + 9) {
    min-height: 138px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }
  .priority-card:last-child {
    border-bottom: 0;
  }
  .alternatives-section {
    padding: 13px;
  }
  .grocery-guide-section {
    padding: 13px;
  }
  .grocery-guide-heading {
    display: block;
  }
  .grocery-guide-intro {
    margin-top: 10px;
  }
  .guide-download-all {
    width: 100%;
    justify-content: center;
  }
  .grocery-swipe-hint {
    display: block;
  }
  .grocery-card-rail {
    display: flex;
    gap: 12px;
    margin: 0 -13px;
    padding: 15px 13px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 13px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
  }
  .grocery-card {
    width: min(82vw, 340px);
    flex: 0 0 min(82vw, 340px);
    scroll-snap-align: start;
  }
  .grocery-card figcaption {
    min-height: 62px;
  }
  .alternatives-grid {
    grid-template-columns: 1fr;
  }
  .alternative-category,
  .alternative-category:nth-child(2n),
  .alternative-category:nth-last-child(-n + 2) {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }
  .alternative-category:last-child {
    border-bottom: 0;
  }
  .alternative-options {
    grid-template-columns: 1fr;
  }
  .kpi {
    padding: 12px;
  }
  .kpi strong {
    font-size: 25px;
  }
  .kpi-note {
    white-space: normal;
  }
  .notice {
    font-size: 13px;
  }
  .filters-panel {
    padding: 14px;
  }
  .filter-row {
    align-items: flex-start;
  }
  .rate-filter {
    width: 100%;
  }
  .rate-filter legend {
    width: 100%;
    line-height: 1.4;
  }
  .select-field {
    width: 100%;
    justify-content: space-between;
  }
  .select-field select {
    width: 0;
    flex: 1;
    max-width: none;
  }
  .flag-button {
    width: 100%;
    justify-content: center;
  }
  kbd {
    display: none;
  }
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .table-actions {
    flex-direction: column;
  }
  .export-button {
    width: 100%;
  }
  .pagination {
    justify-content: space-between;
  }
  table {
    min-width: 0;
  }
  thead {
    display: none;
  }
  tbody,
  tbody tr,
  tbody td {
    display: block;
    width: 100%;
  }
  tbody tr {
    content-visibility: visible;
    contain: none;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  tbody tr:last-child {
    border-bottom: 0;
  }
  tbody td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border: 0;
  }
  tbody td::before {
    grid-column: 1;
    grid-row: 1 / span 3;
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  tbody td > * {
    grid-column: 2;
  }
  .description strong,
  .description span {
    overflow-wrap: anywhere;
  }
  .details-button {
    justify-self: start;
    min-height: 36px;
    padding: 0;
    color: var(--accent-strong);
    font-size: 14px;
    font-weight: 700;
  }
  .sector-row {
    grid-template-columns: 1fr 56px 56px;
    gap: 8px;
  }
  .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

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