@font-face {
  font-family: 'Archivo';
  src: url('/prototype/fonts/archivo.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/prototype/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --carbon: #10130f;
  --carbon-2: #171b16;
  --paper: #eeeade;
  --ink: #11130f;
  --lime: #c8ff2e;
  --orange: #ee563f;
  --line-dark: rgba(238, 234, 222, 0.18);
  --line-light: rgba(17, 19, 15, 0.18);
  font-family: 'Archivo', Arial, sans-serif;
  background: var(--carbon);
  color: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px),
    var(--carbon);
  background-size: 46px 46px;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 1500px);
  margin: 0 auto;
  overflow: hidden;
}

.topbar,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(16, 19, 15, 0.92);
  backdrop-filter: blur(12px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-signal {
  width: 5px;
  height: 38px;
  background: var(--lime);
}

.eyebrow,
.hero-index,
.source-state,
.section-label,
.filter-proof,
.notice-topline,
.notice-grid span,
.resource-kicker,
footer {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 3px;
  color: rgba(238, 234, 222, 0.62);
  font-size: 10px;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(18px, 3vw, 27px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.source-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(200, 255, 46, 0.1);
}

.hero {
  padding: clamp(72px, 10vw, 150px) 5vw clamp(58px, 8vw, 110px);
  border-bottom: 1px solid var(--line-dark);
}

.hero-index {
  margin: 0 0 24px;
  color: var(--orange);
  font-size: 11px;
}

.hero h2,
.digest-heading h2 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(48px, 9vw, 132px);
  font-weight: 850;
  line-height: 0.84;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.hero h2 span,
.digest-heading h2 span {
  color: var(--lime);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  margin-top: 42px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.hero-meta p {
  margin: 0;
}

.hero-meta strong {
  color: var(--lime);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.32fr) 1fr;
  min-height: 780px;
  background: var(--paper);
  color: var(--ink);
}

.filters,
.results {
  padding: 38px 32px;
}

.filters {
  border-right: 1px solid var(--line-light);
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--orange);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
}

.search-field,
.select-field,
fieldset {
  display: block;
  margin: 30px 0 0;
  padding: 0;
  border: 0;
}

.search-field > span,
.select-field > span,
legend {
  display: block;
  margin-bottom: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  box-shadow: inset 5px 0 0 var(--lime);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--ink);
}

.segment {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.segment.is-active {
  background: var(--ink);
  color: var(--lime);
}

.filter-proof {
  margin-top: 50px;
  padding: 18px;
  border-left: 4px solid var(--lime);
  background: rgba(17, 19, 15, 0.05);
  font-size: 10px;
}

.filter-proof ol {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.results-label {
  margin-bottom: 12px;
}

.selection-count {
  color: #5a5c54;
}

.notice-list {
  border-top: 1px solid var(--ink);
}

.notice-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-light);
  transition: background 180ms ease, padding 180ms ease;
}

.notice-card.is-selected {
  margin-inline: -14px;
  padding-inline: 14px;
  background: rgba(200, 255, 46, 0.25);
}

.notice-select {
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.select-mark {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

.notice-select[aria-pressed='true'] .select-mark {
  background: var(--ink);
  clip-path: polygon(0 50%, 35% 83%, 100% 8%, 100% 35%, 36% 100%, 0 70%);
}

.notice-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 9px;
}

.lane-label {
  color: var(--orange);
}

.verification-label {
  color: #6c6e66;
}

.verification-label.is-current {
  color: #426000;
}

.notice-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.notice-entity {
  margin: 9px 0 22px;
  color: #55574f;
  font-size: 13px;
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.notice-grid div {
  border-top: 1px solid var(--line-light);
  padding-top: 8px;
}

.notice-grid span {
  display: block;
  margin-bottom: 3px;
  color: #6c6e66;
  font-size: 8px;
}

.notice-grid strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.source-link {
  align-self: end;
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-decoration: none;
}

.source-link:hover {
  color: var(--orange);
}

.no-results {
  padding: 80px 0;
  text-align: center;
}

.digest-stage {
  padding: clamp(70px, 9vw, 130px) 5vw;
  border-top: 1px solid var(--line-dark);
}

.digest-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.digest-heading h2 {
  font-size: clamp(50px, 8vw, 110px);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--lime);
  border-radius: 0;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

.primary-action:hover,
.secondary-action:hover {
  background: var(--paper);
  border-color: var(--paper);
}

.digest-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  gap: 1px;
  margin-top: 70px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.digest-preview,
.resource-panel {
  min-height: 420px;
  padding: 34px;
  background: var(--carbon-2);
}

.digest-preview pre {
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
}

.empty-state {
  display: grid;
  align-content: center;
  min-height: 350px;
  text-align: center;
  color: rgba(238, 234, 222, 0.55);
}

.empty-state span {
  color: var(--lime);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}

.empty-state p {
  max-width: 420px;
  margin: 16px auto;
}

.empty-state.is-alert span {
  color: var(--orange);
}

.digest-actions {
  margin-top: 28px;
}

.secondary-action {
  min-height: 48px;
  border-color: var(--paper);
  background: transparent;
  color: var(--paper);
}

.resource-panel {
  border-top: 5px solid var(--lime);
}

.resource-kicker {
  color: var(--lime);
  font-size: 10px;
}

.resource-panel h3 {
  margin: 34px 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.resource-panel > p:not(.resource-kicker) {
  max-width: 330px;
  color: rgba(238, 234, 222, 0.7);
  line-height: 1.5;
}

.resource-panel .secondary-action {
  margin-top: 28px;
}

footer {
  min-height: 62px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 0;
  font-size: 9px;
}

@media (max-width: 820px) {
  .source-state span:last-child {
    display: none;
  }

  .topbar {
    min-height: 68px;
  }

  .hero {
    padding-top: 76px;
  }

  .hero h2,
  .digest-heading h2 {
    font-size: clamp(42px, 14vw, 68px);
  }

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

  .filters {
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }

  .segmented {
    grid-template-columns: repeat(3, 1fr);
  }

  .segment {
    padding-inline: 8px;
    border-right: 1px solid var(--ink);
    font-size: 11px;
    text-align: center;
  }

  .segment:last-child {
    border-right: 0;
  }

  .filter-proof {
    display: none;
  }

  .filters,
  .results {
    padding: 28px 20px;
  }

  .notice-card {
    grid-template-columns: 36px 1fr;
  }

  .source-link {
    grid-column: 2;
    margin-top: -8px;
  }

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

  .notice-title {
    font-size: 24px;
  }

  .digest-heading {
    display: block;
  }

  .primary-action {
    width: 100%;
    margin-top: 34px;
  }

  .digest-layout {
    grid-template-columns: 1fr;
    margin-top: 42px;
  }

  .digest-preview,
  .resource-panel {
    min-height: 330px;
    padding: 24px 20px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  footer p {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
