:root {
  color-scheme: dark;
  --bg: #080d16;
  --panel: #0e1622;
  --line: #253141;
  --line-soft: #1b2635;
  --text: #e8eef7;
  --muted: #9aaac0;
  --accent: #5eead4;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; }
button, a, summary { transition: color 140ms, background 140ms, border-color 140ms; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px 20px; background: var(--accent); color: var(--bg); z-index: 20; }
.skip-link:focus { top: 12px; }
.app { max-width: 1184px; margin: 0 auto; padding: 0 32px 80px; }
h1 { font-size: 16px; font-weight: 620; margin: 0; letter-spacing: -.02em; }
.quiet-button, .primary-button { display: inline-flex; justify-content: center; align-items: center; gap: 4px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 500; }
.quiet-button { color: var(--muted); }
.quiet-button:hover, .quiet-button:active { color: var(--text); background: #172231; border-color: #536378; }
.primary-button { background: var(--accent); color: #062923; border-color: var(--accent); }
.primary-button:hover { background: #a0f6e8; }
.main { display: grid; grid-template-columns: minmax(280px, 372px) minmax(0, 716px); gap: 64px; align-items: start; padding-top: 38px; }
.feed-column { min-width: 0; scroll-margin-top: 28px; }
.feed-column:focus { outline: none; }
.feed-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.feed-heading h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 36px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.035em;
}
.feed-heading .brief-controls { justify-self: end; }
.feed-tagline, .feed-subtitle { margin: 0; align-self: baseline; line-height: 1.5; }
.feed-tagline { font-size: 14px; font-weight: 600; }
.feed-subtitle { color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: right; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: #111b28; border: 1px solid var(--line-soft); border-radius: 9px; }
.seg button { min-width: 54px; min-height: 34px; padding: 6px 14px; border-radius: 6px; color: var(--muted); font-size: 12px; }
.seg button:hover { color: var(--text); background: #1a293a; }
.seg button.on { background: #2b3b4e; color: #fff; }
.text-button { color: var(--muted); font-size: 11px; min-height: 32px; padding: 3px 0; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--text); }
.feed-item { position: relative; padding: 16px 0 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.feed-item.selected { border-top: 1px solid #5eead46b; background: linear-gradient(90deg, #5eead407, transparent 75%); }
.selection-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--accent); font-size: 11px; margin: -8px 0 14px; }
.selection-note { color: #e5b87b; font-size: 12px; }
.item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; margin-top: 6px; }
.category-dot { background: var(--c); width: 6px; height: 6px; border-radius: 50%; margin-right: 1px; }
.meta-separator { color: #6f819a; }
.badge { padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; font: 9px/1.5 var(--mono); letter-spacing: .03em; }
.provisional { color: #e5b87b; border-color: #e5b87b4a; }
.article-heading { display: flex; align-items: flex-start; gap: 8px; }
.article-heading h3 { flex: 1; min-width: 0; }
.feed-item h3 { margin: 0; font-size: 21px; font-weight: 590; line-height: 1.38; letter-spacing: -.025em; text-wrap: pretty; }
.feed-item h3 a { text-decoration: none; }
.feed-item h3 a:hover { color: var(--accent); }
.why { color: #b6c4d6; margin: 7px 0 0; font-size: 13px; line-height: 1.65; }
summary { cursor: pointer; color: var(--muted); }
summary:hover { color: var(--text); }
.tags, .entities { margin-top: 12px; }
.radar-column { position: sticky; top: 32px; }
.scope { --sweep-period: 36s; position: relative; aspect-ratio: 1; isolation: isolate; border: 1px solid #4a78634f; border-radius: 50%; background: radial-gradient(circle, #112c23, #071912 75%); }
#radar { position: relative; z-index: 1; display: block; width: 100%; height: 100%; overflow: visible; border-radius: 50%; }
.blip { cursor: pointer; outline: none; }
.blip:hover .halo, .blip:focus-visible .halo { opacity: .6; }
.blip.dimmed { opacity: .17; }
.ping { fill: none; stroke-width: 1.2; animation: ping 2.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { from { r: 8; opacity: .75; } to { r: 25; opacity: 0; } }
.radar-readout {
  /* Align with the faceplate edges inside the transparent image. */
  width: min(93%, 344px);
  height: 344px;
  margin-inline: auto;
  padding-top: 8px;
  overflow: hidden auto;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent, #000 48px);
  font: 11px/1.45 var(--mono);
}
.radar-readout { -webkit-user-select: none; user-select: none; }
.radar-readout a { text-decoration: none; }
.radar-readout a:hover, .radar-readout a:focus-visible { color: var(--accent); text-decoration: underline; }
.radar-readout::-webkit-scrollbar { display: none; }
#radar-preview { margin: 0; padding: 0; list-style: none; }
.radar-preview-entry {
  padding: 4px 0 5px;
  border-bottom: 1px solid var(--line-soft);
  opacity: var(--preview-opacity, 1);
  animation: radar-preview-fade 10s linear both;
}
.radar-readout.is-paused .radar-preview-entry { animation-play-state: paused; }
.radar-preview-entry:nth-last-child(2) { --preview-opacity: .75; }
.radar-preview-entry:nth-last-child(n+3) { --preview-opacity: .55; }
@keyframes radar-preview-fade {
  0%, 25% { opacity: var(--preview-opacity, 1); }
  100% { opacity: 0; }
}
.radar-preview-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--text);
}
.radar-preview-meta {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.scope-state { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; border-radius: 50%; background: #080d16de; padding: 28px; font-size: 11px; overflow-wrap: anywhere; }
.scope-state .state { margin: 0; padding: 0; }
.state { padding: 36px 0; color: var(--muted); }
.state strong { color: var(--text); font-size: 17px; font-weight: 500; }
.state p { margin: 8px 0 16px; }
.state-error, .warn { color: #e9b28c; }
.notice { padding: 14px 0; color: #e9b28c; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
dialog { position: fixed; width: min(680px, calc(100vw - 32px)); max-height: min(82dvh, 850px); overflow: auto; overscroll-behavior: contain; margin: auto; padding: 28px; border: 1px solid #3b4a5e; border-radius: 16px; color: var(--text); background: var(--panel); box-shadow: 0 28px 90px #0009; }
dialog::backdrop { background: #03070dcc; backdrop-filter: blur(5px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dialog-head h2 { font-size: 19px; font-weight: 580; margin: 0; letter-spacing: -.02em; }
.close-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 24px; line-height: 1; }
.close-btn:hover { background: #26384d; color: var(--text); }
#filter-dialog {
  width: min(480px, calc(100vw - 32px));
  inset-block-start: max(9dvh, calc((100dvh - 850px) / 2));
  inset-block-end: auto;
  margin-block: 0;
  overflow-anchor: none;
}
.filter-section { margin: 24px 0; }
.filter-section h3, .filter-section label { display: block; font-size: 12px; font-weight: 550; margin: 0 0 12px; }
.filter-section output { float: right; font-family: var(--mono); color: var(--accent); }
#min-score { width: 100%; min-height: 36px; accent-color: var(--accent); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.legend button { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid #3e5966; background: #172a33; border-radius: 8px; padding: 8px 10px; font-size: 11px; }
.legend .dot { width: 6px; height: 6px; background: var(--c); border-radius: 50%; }
.legend .n { color: var(--muted); margin-left: auto; font-family: var(--mono); }
.legend .off { color: var(--muted); border-color: var(--line); background: transparent; }
.legend .off .dot { background: transparent; border: 1px solid var(--muted); }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.run-pick { display: grid; gap: 8px; font-size: 12px; }
select { min-width: 0; max-width: 100%; width: 100%; border: 1px solid #445670; border-radius: 7px; color: var(--text); background: #152131; min-height: 42px; padding: 8px; }
.system-section { border-top: 1px solid var(--line); margin-top: 20px; }
.system-section > summary { padding: 16px 0; font-size: 13px; }
.run h2 { font-size: 12px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 12px; font-size: 11px; overflow-wrap: anywhere; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.health { width: 100%; border-collapse: collapse; font-size: 11px; }
.health td { padding: 8px 4px; border-bottom: 1px solid var(--line-soft); }
.health .num { text-align: right; font-family: var(--mono); }
.health .err { color: #e9b28c; overflow-wrap: anywhere; }
.st-failed { color: #e9b28c; }
.timeline { padding: 8px 0 16px; font-size: 11px; }
.bars { height: 80px; display: flex; gap: 12px; align-items: flex-end; }
.bar-col { flex: 1; text-align: center; }
.bar-fill { background: #5eead466; border-radius: 3px 3px 0 0; }
.bar-label { margin-top: 6px; color: var(--muted); font: 10px var(--mono); }
#help-btn { margin-top: 20px; }
.help-keys { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 16px; margin: 0; font-size: 12px; }
.help-keys :is(dt, dd) { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.help-keys dt { font-family: var(--mono); color: var(--accent); }
.help-keys dd { margin: 0; color: var(--muted); }
.help-keys kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff5;
  font: inherit;
  text-align: center;
}
@media (max-width: 1000px) { .main { gap: 32px; grid-template-columns: 280px minmax(0,1fr); } .app { padding-inline: 28px; } }
@media (max-width: 800px) {
  .app { max-width: 720px; padding: 0 24px 48px; }
  .main { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; }
  .radar-column { order: -1; position: static; width: 100%; }
  .scope { width: min(100%, 320px); margin: 0 auto 8px; }
  .feed-column { width: 100%; }
  .feed-item h3 { font-size: 20px; }
  .why { font-size: 14px; }
  .quiet-button, .primary-button, .seg button { min-height: 44px; }
}
@media (max-width: 440px) {
  .app { padding-inline: 20px; }
  h1 { font-size: 13px; }
  .feed-item h3 { font-size: 19px; }
  dialog { padding: 20px; }
  .dialog-head h2 { font-size: 17px; }
  .kv { grid-template-columns: 70px minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
#radar { overflow: hidden; }


/* Full faceplate at its original aspect ratio, with contacts registered to the CRT. */
.radar-photo {
  position: relative;
  aspect-ratio: 1;
  background: url("./assets/radar-console-alpha.webp") center / contain no-repeat;
}
.radar-photo .scope {
  position: absolute;
  left: 25.25%;
  top: 19.7%;
  width: 49.5%;
  height: auto;
  margin: 0;
  border: 0;
  background: transparent;
}
.feed-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 3px; }
.item-meta :is(.feed-tag, .badge) { -webkit-user-select: none; user-select: none; }
.feed-item { scroll-margin-top: 12px; }
@media (max-width: 800px) { .radar-photo { max-width: 370px; margin-inline: auto; } }

.crt-grid { fill: none; stroke: #75ec7c; stroke-width: 2; opacity: .53; pointer-events: none; }
.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, #d6ffc69c 0, #75ff7140 2%, transparent 9%),
  conic-gradient(
    transparent 0 252deg,
    #45ff470a 278deg,
    #45ff4736 320deg,
    #51ff5282 349deg,
    #a0ff8cce 358deg,
    #eaffde 359.6deg,
    #eaffde 360deg
  );
  animation: radar-sweep var(--sweep-period) linear infinite;
  pointer-events: none;
}
@keyframes radar-sweep { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .sweep { animation: none; } }

.feed-column, .paper-dialog {
  --text: #292820;
  --muted: #615b4e;
  --line: #c8bdab;
  --accent: #31583e;
  background: linear-gradient(110deg, #f7f0e2, #eee4d1);
  color: var(--text);
}
.feed-column {
  padding: clamp(18px, 3vw, 38px);
  container-type: inline-size;
  box-shadow: 0 9px 24px #0004;
}
.feed-heading h2, .feed-item h3, .paper-dialog .dialog-head h2 {
  font-family: "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", "PingFang SC", sans-serif;
  font-weight: 700;
  letter-spacing: .015em;
}
.paper-dialog .dialog-head h2 { text-transform: uppercase; letter-spacing: .055em; }
.item-meta { font-family: var(--mono); }
.item-meta { font-variant-numeric: tabular-nums; }
.feed-column .why {
  color: #484237;
  font-family: Georgia, "Songti SC", "Noto Serif CJK SC", SimSun, serif;
}
.feed-column .feed-tag { background: #fff5; }
.feed-column .category-dot { box-shadow: 0 0 0 1px #51493e; }
.feed-column .quiet-button:hover, .feed-column .quiet-button:active { background: #dfd2bb; color: var(--text); }
.feed-column .selection-note, .feed-column .state-error, .feed-column .provisional { color: #853d20; }
.feed-column .feed-item.selected { background: #52744213; border-top-color: #527442; }
.feed-column :focus-visible { outline-color: var(--accent); }

@font-face {
  font-family: "Material Symbols Outlined";
  src: url("./assets/material-symbols-radar.woff2") format("woff2");
  font-display: block;
}
.material-icon { font: normal 20px/1 "Material Symbols Outlined"; font-feature-settings: "liga"; }
.brief-controls { display: flex; gap: 8px; }
.brief-controls button {
  position: relative;
  width: 44px;
  padding: 0;
  border: 0;
}
#filter-btn { position: relative; }
#filter-btn.has-filter-changes::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
}
.feed-column .brief-controls button:hover,
.feed-column .brief-controls button:active {
  background: transparent;
  color: var(--accent);
}
.blip .echo {
  opacity: .64;
  transform-box: fill-box;
  transform-origin: center;
  animation: phosphor-decay var(--sweep-period) linear infinite;
  animation-delay: var(--echo-delay);
  pointer-events: none;
}
.blip .echo-bloom {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: phosphor-bloom var(--sweep-period) ease-out infinite;
  animation-delay: var(--echo-delay);
  pointer-events: none;
}
.blip.rumor :is(.echo, .echo-bloom) { filter: brightness(.65); }
@keyframes phosphor-bloom {
  0% { opacity: .78; transform: scale(.85); }
  1.3% { opacity: .5; transform: scale(1.5); }
  6%, 100% { opacity: 0; transform: scale(1.9); }
}
.blip:focus-visible .echo, .blip[aria-pressed="true"] .echo { filter: brightness(1.55); }
@keyframes phosphor-decay {
  0% { opacity: 1; transform: scale(1.12); }
  1% { opacity: .96; transform: scale(2.25); }
  4% { opacity: .78; transform: scale(1.3); }
  12% { opacity: .58; transform: scale(1); }
  45%, 100% { opacity: .34; transform: scale(.75); }
}

.paper-dialog {
  color-scheme: light;
  --line-soft: #d9cfbd;
  border-color: var(--line);
  border-radius: 4px;
}
.paper-dialog .dialog-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.paper-dialog .close-btn { border: 0; }
.paper-dialog .close-btn:hover { color: var(--accent); background: transparent; }
.paper-dialog :is(.seg, .legend button) { background: #fff5; border-color: var(--line); }
.paper-dialog .legend button:not(.off) { background: #dce5d5; border-color: #83967e; }
.paper-dialog .legend .dot { box-shadow: 0 0 0 1px #615b4e; }
.paper-dialog :is(.seg button:hover, .quiet-button:hover) { background: #dfd2bb; color: var(--text); }
.paper-dialog :is(.seg button.on, .primary-button) { background: var(--accent); color: #fff; border-color: var(--accent); }
.paper-dialog .primary-button:hover { background: #254831; }
.paper-dialog :is(.filter-section output, .kv dd, .legend .n) { font-family: var(--mono); }
.paper-dialog :is(.state-error, .warn, .health .err, .st-failed) { color: #853d20; }
.paper-dialog .bar-fill { background: #527442a0; }

#summary-language { font: 10px var(--mono); }
.brief-controls { gap: 4px; }
.brief-controls #language-btn { width: 52px; }

@container (max-width: 460px) {
  .feed-heading { column-gap: 8px; }
  .feed-heading h2 { font-size: clamp(22px, 7cqi, 28px); }
  .feed-heading .brief-controls { gap: 2px; }
  .feed-heading .brief-controls button { width: 32px; }
  .feed-heading .brief-controls #language-btn { width: 44px; }
  .feed-tagline, .feed-subtitle { grid-column: 1 / -1; text-align: left; }
}


.paper-dialog select {
  appearance: none;
  min-height: 44px;
  padding: 8px 32px 8px 12px;
  border-color: var(--line);
  border-radius: 4px;
  background:
    linear-gradient(45deg, transparent 50%, currentColor 51%) right 15px center / 5px 5px no-repeat,
    linear-gradient(135deg, currentColor 49%, transparent 50%) right 10px center / 5px 5px no-repeat,
    #faf4e8;
  font: 12px/1.4 var(--mono);
  cursor: pointer;
}
.paper-dialog select:hover { border-color: #83967e; background-color: #f4ead7; }
.paper-dialog select:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.paper-dialog select:disabled { cursor: default; opacity: .55; }

@supports (appearance: base-select) and selector(::picker(select)) {
  .paper-dialog select, .paper-dialog select::picker(select) { appearance: base-select; }
  .paper-dialog select {
    align-items: center;
    gap: 8px;
    padding-inline-end: 12px;
    background: #faf4e8;
  }
  .paper-dialog select::picker-icon {
    display: grid;
    place-items: center;
    flex: 0 0 16px;
    inline-size: 16px;
    block-size: 16px;
    margin: 0 0 0 auto;
    line-height: 1;
    transform-origin: center;
    color: var(--muted);
    transition: rotate 160ms ease;
  }
  .paper-dialog select:open {
    border-color: #83967e;
    background: #f4ead7;
  }
  .paper-dialog select:open::picker-icon { rotate: 180deg; }
  .paper-dialog select::picker(select) {
    margin-block: 6px;
    max-height: min(280px, 45dvh);
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f7f0e2;
    color: var(--text);
    box-shadow: 0 2px 4px #29282014, 0 8px 20px #29282026;
    font: 12px/1.4 var(--mono);
  }
  .paper-dialog option {
    min-height: 38px;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .paper-dialog option + option { margin-top: 2px; }
  .paper-dialog option::checkmark { order: 1; margin-inline-start: auto; color: var(--accent); }
  .paper-dialog option:checked { background: #dce5d5; color: var(--accent); font-weight: 600; }
  .paper-dialog option:not(:checked):is(:hover, :focus-visible) { background: #ece0ca; }
  .paper-dialog option:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer-contact { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.footer-contact button { padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact button:hover, #copy-contact-status { color: var(--accent); }

#entity-body { max-height: 240px; overflow-y: auto; --c: var(--accent); }
#entity-body .entity-name { overflow-wrap: anywhere; text-align: left; }
#entity-selection-count { color: var(--muted); font-size: 12px; }

#entity-show-more {
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 32px;
  margin: 4px auto 0;
  color: var(--accent);
  border-radius: 4px;
}
#entity-show-more:hover { background: #dfd2bb; }
#entity-show-more::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
#entity-show-more[aria-expanded="true"]::before {
  transform: translateY(2px) rotate(225deg);
}
