@font-face {
  font-family: "WBR Monaspace";
  src: url("/font/MonaspaceNeon-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "WBR Monaspace";
  src: url("/font/MonaspaceNeon-SemiBold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "WBR Monaspace";
  src: url("/font/MonaspaceNeon-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "WBR Monaspace Wide";
  src: url("/font/MonaspaceNeon-WideBold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "WBR LINE Seed JP";
  src: url("/font/LINESeedJP_OTF_Rg.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "WBR LINE Seed JP";
  src: url("/font/LINESeedJP_OTF_Bd.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "WBR LINE Seed JP";
  src: url("/font/LINESeedJP_OTF_Eb.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 800;
}

:root {
  color-scheme: dark;
  --bg: #050807;
  --panel: #0a0e0d;
  --panel-raised: #0d1210;
  --line: #2a302d;
  --line-soft: rgba(70, 79, 74, .48);
  --amber: #f4b52b;
  --amber-soft: #d79b18;
  --red: #ff4b3e;
  --orange: #ff783d;
  --gray: #7c8580;
  --green: #57c96b;
  --purple: #8d79e8;
  --blue: #69a8ff;
  --text: #d5d8d2;
  --muted: #8d948f;
  --nav-width: 220px;
  --rail-width: 312px;
  --ui-copy: clamp(16px, .82vw, 17px);
  --ui-card-copy: clamp(14px, .7vw, 15px);
  --ui-small: clamp(13px, .66vw, 14px);
  --ui-label: clamp(12px, .58vw, 13px);
  --mono: "WBR Monaspace", "WBR LINE Seed JP", monospace;
  --sans: "WBR LINE Seed JP", sans-serif;
  --safe-area-top: constant(safe-area-inset-top);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: constant(safe-area-inset-right);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: constant(safe-area-inset-bottom);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: constant(safe-area-inset-left);
  --safe-area-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

::selection {
  background: #40e0d0;
  color: #03100e;
}

::-moz-selection {
  background: #40e0d0;
  color: #03100e;
}

html {
  min-width: 0;
  background: var(--bg);
  scrollbar-color: #4d4938 var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 48% -10%, rgba(244, 181, 43, .055), transparent 32rem),
    linear-gradient(180deg, #060a09, var(--bg) 50%);
  color: var(--text);
  font: var(--ui-copy)/1.7 var(--mono);
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: .2;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .018) 4px),
    linear-gradient(90deg, rgba(244, 181, 43, .019) 1px, transparent 1px),
    linear-gradient(rgba(244, 181, 43, .015) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

body::after {
  opacity: .025;
  background-image: url("../textures/noise.svg");
}

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
}

svg {
  display: block;
}

.app-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--amber);
  letter-spacing: .12em;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--amber);
  color: #050807;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 13fr minmax(0, 67fr) 20fr;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 14px 12px 16px;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 7, .96);
}

.brand-block {
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-emblem {
  position: relative;
  width: 98px;
  height: 98px;
  margin: 0 auto 11px;
  border: 1px solid rgba(244, 181, 43, .32);
  border-radius: 50%;
  background:
    url("../icons/favicon.svg") center/76px no-repeat,
    radial-gradient(circle, rgba(244, 181, 43, .08), transparent 70%);
  box-shadow: 0 0 28px rgba(244, 181, 43, .08) inset;
}

.brand-emblem::before {
  position: absolute;
  top: 0;
  left: -3px;
  color: var(--amber);
  content: ">_";
  font-weight: 700;
}

.os-meta {
  color: var(--muted);
  font-size: var(--ui-label);
  letter-spacing: .07em;
}

.os-meta b {
  color: var(--amber);
  font-weight: 500;
}

.nav-list {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.nav-link {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: #aab0ac;
  text-decoration: none;
  letter-spacing: .055em;
}

.nav-icon,
.inline-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:is(:hover, :focus-visible, .active) {
  border-color: #765816;
  outline: none;
  color: var(--amber);
  background: linear-gradient(90deg, rgba(244, 181, 43, .15), transparent);
}

.nav-link.active {
  box-shadow: -2px 0 var(--amber), 0 0 20px rgba(244, 181, 43, .07);
}

.nav-link.nav-section-start {
  margin-top: 10px;
  border-top-color: var(--line);
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: var(--ui-label);
  line-height: 1.35;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line);
  color: #747b77;
  font-size: var(--ui-label);
}

.sidebar-foot .world-delta {
  color: #9ea39f;
}

.main {
  min-width: 0;
  padding: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
  padding: 0 6px 13px;
  border-bottom: 1px solid var(--line);
}

.topbar-copy {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.site-purpose {
  display: grid;
  gap: 2px;
  max-width: 780px;
  margin-top: 10px;
  font-family: var(--sans);
  line-height: 1.65;
}

.site-purpose strong {
  color: #d9dcd8;
  font-size: var(--ui-card-copy);
  font-weight: 700;
}

.stable-badge { font-size: var(--font-label); }

.site-purpose span,
.site-purpose small {
  color: #9da49f;
  font-size: var(--ui-small);
}

.site-purpose small {
  font-family: var(--mono);
}

.brand-title,
.page-title {
  margin: 0;
  color: #ffd068;
  font-family: "WBR Monaspace Wide", "WBR Monaspace", var(--sans);
  font-size: clamp(30px, 3.05vw, 50px);
  font-stretch: condensed;
  font-weight: 600;
  line-height: .98;
  letter-spacing: .125em;
  text-shadow: 0 0 16px rgba(244, 181, 43, .42);
}

.build-line {
  margin-top: 5px;
  color: #a9afaa;
  font-size: var(--ui-small);
  letter-spacing: .12em;
}

.stable-badge {
  flex: 0 0 auto;
  margin-bottom: 1px;
  padding: 4px 11px;
  border: 1px solid #213625;
  border-radius: 3px;
  background: #0d1a11;
  color: #b2d6b7;
  font-size: var(--ui-label);
  letter-spacing: .06em;
}

.stable-badge::before {
  margin-right: 6px;
  color: var(--green);
  content: "●";
}

.mobile-menu,
.drawer-close,
.help-reopen,
.intro-close {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--amber);
  cursor: pointer;
}

.mobile-header {
  display: none;
}

.mobile-header-title {
  color: #ffd068;
  font-family: "WBR Monaspace Wide", "WBR Monaspace", var(--sans);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .105em;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(244, 181, 43, .36);
}

.mobile-header-title:visited {
  color: #ffd068;
}

.wbr-mobile-burger {
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  place-items: center;
  cursor: pointer;
}

.wbr-mobile-burger::before,
.wbr-mobile-burger::after {
  content: none;
}

.wbr-burger-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--amber) 16%, transparent));
  transition: transform .2s ease, filter .2s ease;
}

.wbr-burger-bun-top,
.wbr-burger-bun-bottom {
  fill: #f6b15a;
  stroke: #ffd58a;
  stroke-width: 1.6;
  transition: fill .18s ease, stroke .18s ease, transform .2s ease;
}

.wbr-burger-sesame {
  fill: #fff2b6;
  opacity: .95;
  transition: fill .18s ease, opacity .18s ease;
}

.wbr-burger-cheese {
  fill: #9cff64;
  stroke: #d8ff8c;
  stroke-width: 1.4;
  transition: fill .18s ease, stroke .18s ease, transform .2s ease;
}

.wbr-burger-patty {
  fill: #6b3d23;
  stroke: #b96a36;
  stroke-width: 1.5;
  transition: fill .18s ease, stroke .18s ease, transform .2s ease;
}

.wbr-mobile-burger:is(:hover, :focus-visible) .wbr-burger-icon {
  transform: translateY(-1px) rotate(-3deg) scale(1.08);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--amber) 54%, transparent));
}

.wbr-mobile-burger:is(:hover, :focus-visible) :is(.wbr-burger-bun-top, .wbr-burger-bun-bottom) {
  fill: color-mix(in srgb, #f6b15a 70%, var(--amber));
  stroke: color-mix(in srgb, #ffd58a 66%, var(--amber));
}

.wbr-mobile-burger:is(:hover, :focus-visible) .wbr-burger-cheese {
  fill: color-mix(in srgb, #9cff64 68%, var(--amber));
  stroke: color-mix(in srgb, #d8ff8c 62%, var(--amber));
}

.wbr-mobile-burger:is(:hover, :focus-visible) .wbr-burger-patty {
  fill: color-mix(in srgb, #6b3d23 68%, var(--amber));
  stroke: color-mix(in srgb, #b96a36 58%, var(--amber));
}

.wbr-mobile-burger[aria-expanded="true"] .wbr-burger-bun-top { transform: translateY(-3px); }
.wbr-mobile-burger[aria-expanded="true"] .wbr-burger-cheese { transform: translateY(1px); }
.wbr-mobile-burger[aria-expanded="true"] .wbr-burger-patty { transform: translateY(2px); }
.wbr-mobile-burger[aria-expanded="true"] .wbr-burger-bun-bottom { transform: translateY(4px); }

body.wbr-burger-open .wbr-burger-icon {
  animation: wbr-burger-hop .38s cubic-bezier(.2, 1.4, .3, 1) both;
}

@keyframes wbr-burger-hop {
  0% { transform: translateY(0) rotate(0) scale(1); }
  40% { transform: translateY(-5px) rotate(-8deg) scale(1.1); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}

.help-reopen {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: auto;
  min-width: 44px;
  padding: 8px 10px;
  color: #c4c9c5;
}

.help-reopen .inline-icon {
  width: 18px;
  height: 18px;
}

.help-reopen:is(:hover, :focus-visible),
.intro-close:is(:hover, :focus-visible) {
  border-color: var(--amber);
  outline: none;
  color: var(--amber);
}

.phase-banner {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  padding: 7px 10px;
  border: 1px solid #5b491f;
  background: rgba(244, 181, 43, .055);
  color: #d3a947;
  font-size: var(--ui-small);
}

.intro-panel {
  margin: 0 0 12px;
  padding: 16px 18px;
  border-color: #765819;
  background:
    linear-gradient(120deg, rgba(244, 181, 43, .085), transparent 52%),
    var(--panel);
  box-shadow: 0 0 24px rgba(244, 181, 43, .055);
}

.intro-panel[hidden] {
  display: none;
}

.intro-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.intro-heading h2 {
  margin: 3px 0 0;
  color: var(--amber);
  font-size: clamp(20px, 1.35vw, 26px);
  letter-spacing: .07em;
}

.intro-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.intro-panel > p {
  max-width: 850px;
  margin: 10px 0 13px;
  color: #d0d4d0;
  font: var(--ui-copy)/1.8 var(--sans);
}

.intro-fields,
.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.intro-fields > div,
.definition-grid > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 7, .55);
}

.intro-fields strong,
.definition-grid strong {
  display: block;
  color: var(--amber);
  letter-spacing: .05em;
}

.intro-fields span {
  color: #b8beb9;
  font: var(--ui-card-copy)/1.7 var(--sans);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.terminal-button.is-secondary {
  border-color: var(--line);
  background: transparent;
  color: #b7bdb8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .026), transparent 62%);
}

.stat-icon {
  width: 27px;
  height: 27px;
  color: var(--amber);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.stat-card strong {
  display: block;
  margin-top: 3px;
  color: var(--amber);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.stat-card.is-critical .stat-icon,
.stat-card.is-critical strong {
  color: var(--red);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(10, 14, 13, .84);
}

.map-panel {
  position: relative;
  height: 338px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(29, 53, 49, .36), transparent 70%),
    #07100f;
}

.map-panel.is-large {
  height: min(58vh, 570px);
  min-height: 380px;
}

.map-art {
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: .92;
}

.map-markers {
  position: absolute;
  inset: 0;
}

.map-marker {
  position: absolute;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(5, 8, 7, .9);
  color: var(--amber);
  cursor: pointer;
  box-shadow: 0 0 0 8px rgba(244, 181, 43, .08), 0 0 18px currentColor;
  animation: marker-pulse 3.2s ease-in-out infinite;
}

.map-marker::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.map-marker.severity-critical {
  color: var(--red);
  box-shadow: 0 0 0 8px rgba(255, 75, 62, .1), 0 0 18px currentColor;
}

.map-marker.severity-high {
  color: var(--orange);
  box-shadow: 0 0 0 8px rgba(255, 120, 61, .09), 0 0 18px currentColor;
}

.map-marker.severity-low {
  color: var(--gray);
  box-shadow: 0 0 0 8px rgba(124, 133, 128, .08), 0 0 18px currentColor;
}

.map-marker:is(:hover, :focus-visible, .is-selected) {
  z-index: 3;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.map-tooltip {
  position: absolute;
  z-index: 5;
  width: min(260px, calc(100% - 24px));
  padding: 9px 11px;
  transform: translate(-50%, calc(-100% - 25px));
  border: 1px solid #735819;
  background: #080c0b;
  color: var(--text);
  font-size: var(--ui-small);
  pointer-events: none;
  box-shadow: 0 12px 25px rgba(0, 0, 0, .45);
}

.map-tooltip b {
  display: block;
  color: var(--amber);
}

.map-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  gap: 4px;
}

.map-control {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 9, .92);
  color: var(--text);
  cursor: pointer;
}

.map-control:is(:hover, :focus-visible) {
  border-color: var(--amber);
  color: var(--amber);
}

.map-legend,
.map-count {
  position: absolute;
  bottom: 8px;
  z-index: 4;
  padding: 3px 6px;
  background: rgba(5, 8, 7, .75);
  font-size: var(--ui-label);
}

.map-legend {
  left: 10px;
  display: flex;
  gap: 12px;
}

.map-count {
  right: 10px;
  color: #aab0ac;
}

.legend-dot::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.legend-dot.severity-critical { color: var(--red); }
.legend-dot.severity-high { color: var(--orange); }
.legend-dot.severity-medium { color: var(--amber); }
.legend-dot.severity-low { color: var(--gray); }

.section-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0 8px;
}

.section-heading h2 {
  margin: 0;
  color: #c1c6c2;
  font-size: clamp(14px, .75vw, 16px);
  letter-spacing: .12em;
}

.section-heading span {
  color: var(--muted);
  font-size: var(--ui-label);
}

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

.bug-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #6f551b;
  border-top-color: var(--amber-soft);
  background:
    linear-gradient(150deg, rgba(244, 181, 43, .035), transparent 48%),
    var(--panel);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.bug-card.severity-high {
  border-color: #6b392c;
  border-top-color: var(--orange);
}

.bug-card.severity-critical {
  border-color: #74352f;
  border-top-color: var(--red);
}

.bug-card:is(:hover, :focus-within) {
  transform: translateY(-2px);
  border-color: var(--amber);
  box-shadow: 0 9px 25px rgba(0, 0, 0, .34), 0 0 16px rgba(244, 181, 43, .07);
}

.bug-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.card-top {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  color: #929994;
  font-size: var(--ui-label);
}

.new-label {
  padding: 0 5px;
  border: 1px solid #765819;
  color: var(--amber);
}

.card-category {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  min-height: 45px;
  margin: 10px 0 4px;
  color: var(--amber);
  font-size: var(--ui-small);
  line-height: 1.4;
  letter-spacing: .035em;
}

.card-category .inline-icon {
  width: 17px;
  height: 17px;
}

.category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
  margin: 0 0 8px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #42504a;
  color: #aeb6b0;
  font-size: var(--ui-label);
  line-height: 1.2;
  letter-spacing: .04em;
}

.category-badge.is-new {
  border-color: #765819;
  background: rgba(244, 181, 43, .08);
  color: var(--amber);
}

.category-badge.is-merged {
  border-color: #5b4d84;
  color: #b9a9ff;
}

.category-badge.is-legacy {
  border-color: #5e6561;
  color: #c2c7c3;
}

.kv-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--ui-label);
}

.kv-label {
  color: #777e7a;
}

.severity-value,
.status-value {
  color: var(--amber);
}

.severity-high .severity-value,
.severity-critical .severity-value {
  color: var(--red);
}

.copy-block {
  margin-top: 8px;
}

.copy-block p {
  margin: 3px 0 8px;
  color: #c8ccc8;
  font: var(--ui-card-copy)/1.75 var(--sans);
}

.expected-copy,
.observed-copy,
.mismatch-copy {
  padding-left: 9px;
  border-left: 2px solid var(--line);
}

.expected-copy { border-left-color: var(--blue); }
.observed-copy { border-left-color: var(--green); }
.mismatch-copy {
  border-left-color: var(--amber);
  background: linear-gradient(90deg, rgba(244, 181, 43, .045), transparent);
}

.mismatch-copy .eyebrow,
.mismatch-copy p {
  color: #f0c762;
}

.system-comment {
  margin-top: auto;
  padding: 8px 9px;
  border: 1px solid #58451a;
  background: #0c0e09;
  color: #dfac3a;
  font: var(--ui-card-copy)/1.7 var(--sans);
}

.system-comment .eyebrow {
  margin-bottom: 3px;
  color: var(--amber);
}

.ascii-art {
  display: block;
  margin-top: 3px;
  text-align: right;
  white-space: pre;
  font-family: var(--mono);
}

.right-rail {
  padding: 18px 14px;
  border-left: 1px solid var(--line);
  background: rgba(5, 8, 7, .65);
}

.rail-panel {
  margin-bottom: 12px;
}

.rail-title {
  padding: 7px 11px;
  border-bottom: 1px solid var(--line);
  color: #bec3bf;
  font-size: var(--ui-small);
  letter-spacing: .08em;
}

.rail-body {
  padding: 11px;
}

.supervisor {
  text-align: center;
}

.supervisor-globe {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 4px auto 13px;
  border: 1px dashed #795c1d;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 40% 36%, rgba(244, 181, 43, .2) 0 5%, transparent 6%),
    repeating-radial-gradient(ellipse, transparent 0 12px, rgba(244, 181, 43, .16) 13px 14px);
  color: var(--amber);
  box-shadow: 0 0 25px rgba(244, 181, 43, .08) inset;
}

.supervisor-globe::before {
  position: absolute;
  inset: 35px 20px auto;
  content: "⌐   ⌐";
  font-size: 22px;
  letter-spacing: 2px;
}

.supervisor-globe::after {
  position: absolute;
  top: 58px;
  left: 42px;
  content: "⌣";
  font-size: 24px;
}

.supervisor p {
  margin: 0 0 7px;
  color: #acb2ad;
  text-align: left;
  font: var(--ui-card-copy)/1.75 var(--sans);
}

.supervisor cite {
  color: var(--amber);
  font-size: var(--ui-label);
  font-style: normal;
}

.status-flow {
  display: grid;
}

.flow-item {
  position: relative;
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: 8px;
  padding: 7px 0;
}

.flow-item:not(:last-child)::after {
  position: absolute;
  bottom: -5px;
  left: 11px;
  color: #626965;
  content: "↓";
}

.flow-node {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.flow-item.open { color: var(--blue); }
.flow-item.investigating { color: var(--purple); }
.flow-item.resolved { color: var(--green); }
.flow-item.feature { color: var(--amber); }

.flow-item small {
  display: block;
  color: #7d8580;
  font-size: var(--ui-label);
}

.follow-links {
  display: flex;
  gap: 8px;
}

.follow-link {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  color: #aeb4af;
  text-decoration: none;
}

.follow-link[aria-disabled="true"] {
  opacity: .4;
  pointer-events: none;
}

.page-header {
  margin-bottom: 15px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}

.page-header .page-title {
  margin: 4px 0 6px;
  font-size: clamp(28px, 4vw, 44px);
}

.page-header p {
  max-width: 780px;
  margin: 0;
  color: #aeb4af;
  font-family: var(--sans);
}

.detail-lead {
  padding: 18px;
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(244, 181, 43, .07), transparent 70%);
}

.detail-lead .page-title {
  margin: 7px 0;
  font-family: var(--sans);
  font-size: clamp(25px, 3.6vw, 42px);
  line-height: 1.35;
  letter-spacing: .035em;
}

.detail-subtitle {
  color: #aeb4af;
  font-size: var(--ui-small);
}

.detail-meta {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1.2fr;
  gap: 9px;
  margin: 12px 0;
}

.meta-cell {
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-size: var(--ui-card-copy);
}

.meta-cell strong {
  color: var(--amber);
  font-weight: 500;
}

.category-detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 13, .84);
}

.category-detail strong {
  color: var(--amber);
  letter-spacing: .04em;
}

.category-detail p {
  margin: 4px 0 0;
  color: #b7bdb8;
  font: var(--ui-card-copy)/1.7 var(--sans);
}

.category-detail .category-badges {
  flex: 0 0 auto;
  margin: 0;
}

.content-panel {
  margin-bottom: 12px;
  padding: 16px 18px;
}

.content-panel h2 {
  margin: 0 0 7px;
  color: var(--amber);
  font-size: var(--ui-small);
  letter-spacing: .09em;
}

.content-panel p {
  margin: 0;
  color: #c9cdca;
  font: var(--ui-copy)/1.85 var(--sans);
}

.fact-panel { border-left: 2px solid var(--blue); }
.expected-panel { border-left: 3px solid var(--blue); }
.observed-panel { border-left: 3px solid var(--green); }
.mismatch-panel {
  border: 1px solid #72571e;
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(244, 181, 43, .075), rgba(10, 14, 13, .84) 55%);
}
.explanation-panel { border-left: 2px solid var(--purple); }
.comment-panel { border-left: 2px solid var(--amber); }

.behavior-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.behavior-stack .content-panel {
  height: 100%;
  margin: 0;
}

.field-help {
  margin-bottom: 12px;
  border-color: #45504b;
}

.field-help summary {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  color: #c8cdc9;
  cursor: pointer;
}

.field-help summary::marker {
  color: var(--amber);
}

.field-help summary .inline-icon {
  width: 18px;
  height: 18px;
  color: var(--amber);
}

.field-help-body {
  padding: 0 13px 13px;
}

.definition-grid p {
  margin: 4px 0 0;
  color: #c1c6c2;
  font: var(--ui-card-copy)/1.75 var(--sans);
}

.text-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  margin-top: 9px;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:is(:hover, :focus-visible) {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

.sources-primary {
  border-left: 2px solid var(--green);
}

.supplemental-details {
  margin-bottom: 12px;
}

.supplemental-details summary {
  padding: 13px 16px;
  color: var(--amber);
  font-size: var(--ui-small);
  letter-spacing: .06em;
  cursor: pointer;
}

.supplemental-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 12px;
}

.supplemental-grid .content-panel {
  margin: 0;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.status-history {
  padding: 0;
  margin: 0;
  list-style: none;
}

.status-history li {
  position: relative;
  margin-left: 6px;
  padding: 0 0 18px 20px;
  border-left: 1px solid #5e4b20;
}

.status-history li::before {
  position: absolute;
  top: 2px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.status-history time {
  color: var(--muted);
  font-size: var(--ui-label);
}

.source-link {
  display: block;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  color: #c7cbc8;
  text-decoration: none;
}

.source-link:is(:hover, :focus-visible) {
  border-color: var(--amber);
  outline: none;
}

.source-link b {
  color: var(--amber);
}

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

.info-section {
  position: relative;
  min-width: 0;
  padding: 18px 20px;
  border-left: 2px solid #6f551b;
}

.info-section h2,
.source-card h2 {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: clamp(16px, 1vw, 20px);
  letter-spacing: .06em;
}

.info-section p {
  margin: 0 0 10px;
  color: #ccd0cc;
  font: var(--ui-copy)/1.9 var(--sans);
}

.info-section p:last-child {
  margin-bottom: 0;
}

.info-index {
  position: absolute;
  top: 12px;
  right: 14px;
  color: #59615c;
  font-size: var(--ui-small);
}

.info-section .definition-grid {
  margin-top: 15px;
}

.source-policy {
  margin-bottom: 12px;
}

.source-card {
  padding: 16px 18px;
}

.source-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.source-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: #929a95;
  font-size: var(--ui-label);
}

.source-status.is-enabled {
  border-color: #35613c;
  color: var(--green);
}

.source-card dl {
  margin: 10px 0;
}

.source-card dl > div {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}

.source-card dt {
  color: var(--muted);
  font-size: var(--ui-label);
}

.source-card dd {
  margin: 0;
  color: #c5cac6;
  font: var(--ui-card-copy)/1.7 var(--sans);
}

.source-official {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-status {
  margin-top: 12px;
  padding: 18px 20px;
  border-color: #765819;
}

.contact-status strong {
  display: block;
  margin-top: 7px;
  color: var(--amber);
  font-size: clamp(17px, 1.1vw, 21px);
}

.contact-status p {
  margin: 8px 0 0;
  color: #c7ccc8;
  font-family: var(--sans);
}

.notice {
  margin: 12px 0;
  padding: 10px 13px;
  border-left: 3px solid var(--amber);
  background: rgba(244, 181, 43, .06);
  color: #c9cdca;
  font: var(--ui-card-copy)/1.8 var(--sans);
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.calendar-panel,
.archive-summary {
  padding: 15px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-toolbar strong {
  color: var(--amber);
  letter-spacing: .08em;
}

.terminal-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #69521d;
  background: rgba(244, 181, 43, .06);
  color: var(--amber);
  text-decoration: none;
  cursor: pointer;
}

.terminal-button:is(:hover, :focus-visible) {
  border-color: var(--amber);
  outline: none;
  background: rgba(244, 181, 43, .12);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-label {
  padding: 4px;
  color: var(--muted);
  text-align: center;
  font-size: var(--ui-label);
}

.calendar-day {
  display: grid;
  aspect-ratio: 1;
  min-height: 38px;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #747b77;
}

button.calendar-day {
  border-color: var(--line);
  color: #c5cac6;
  cursor: pointer;
}

button.calendar-day::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

button.calendar-day:is(:hover, :focus-visible, .active) {
  border-color: var(--amber);
  outline: none;
  background: rgba(244, 181, 43, .1);
  color: var(--amber);
}

.archive-days {
  display: grid;
  gap: 8px;
}

.archive-day {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.archive-day:is(:hover, :focus-visible, .active) {
  border-color: var(--amber);
  outline: none;
}

.archive-day strong {
  color: var(--amber);
  font-size: 15px;
}

.severity-bar {
  display: flex;
  gap: 3px;
  height: 5px;
  margin-top: 7px;
}

.severity-bar span {
  min-width: 3px;
}

.severity-bar .critical { background: var(--red); }
.severity-bar .high { background: var(--orange); }
.severity-bar .medium { background: var(--amber); }
.severity-bar .low { background: var(--gray); }

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

.category-button {
  min-height: 142px;
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 13, .84);
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.category-card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.category-card-top > span:first-child {
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.category-button:is(:hover, :focus-visible, .active) {
  border-color: var(--amber);
  outline: none;
  background: linear-gradient(135deg, rgba(244, 181, 43, .08), transparent);
}

.category-button h2 {
  margin: 6px 0;
  color: var(--amber);
  font-size: var(--ui-small);
}

.category-button p {
  margin: 0;
  color: #adb3af;
  font: var(--ui-card-copy)/1.75 var(--sans);
}

.category-button .category-ja {
  margin-bottom: 4px;
  color: #d3d7d3;
  font-weight: 700;
}

.category-registry-meta {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  font-size: var(--ui-label);
}

.category-registry-meta div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid var(--line-soft);
}

.category-registry-meta dt {
  color: var(--muted);
}

.category-registry-meta dd {
  margin: 0;
  color: #c2c7c3;
  overflow-wrap: anywhere;
}

.category-button .category-reason {
  margin-top: 12px;
  padding: 8px;
  border-left: 2px solid #5b4d84;
  background: rgba(141, 121, 232, .045);
}

.category-count {
  color: var(--amber);
  font-size: 18px;
}

.category-selection {
  margin-top: clamp(20px, 1.5vw, 30px);
  scroll-margin-top: 18px;
}

.category-selection[hidden] {
  display: none;
}

.category-back-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--amber);
  font: 700 var(--ui-label)/1.4 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.category-back-button .inline-icon {
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
}

.category-back-button:is(:hover, :focus-visible) {
  color: #ffd36a;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.category-selection-header {
  padding: clamp(18px, 1.3vw, 26px);
  border: 1px solid var(--amber);
  background: linear-gradient(135deg, rgba(244, 181, 43, .08), rgba(7, 13, 11, .88));
}

.category-selection-header h2 {
  margin: 7px 0 8px;
  color: var(--amber);
  font-size: clamp(23px, 1.7vw, 32px);
}

.category-selection-header p {
  max-width: 850px;
  margin: 0 0 14px;
  color: #d0d6d1;
  font: var(--ui-card-copy)/1.85 var(--sans);
}

.category-selection-header strong {
  color: #f4f0df;
  font-size: var(--ui-small);
}

.category-report-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.category-report-card {
  display: block;
  padding: clamp(17px, 1.1vw, 22px);
  border: 1px solid var(--line);
  background: rgba(7, 13, 11, .88);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.category-report-card:is(:hover, :focus-visible) {
  border-color: var(--amber);
  outline: none;
}

.category-report-card time {
  color: var(--amber);
  font: 700 var(--ui-label)/1.4 var(--mono);
}

.category-report-card h3 {
  margin: 7px 0 8px;
  font-size: clamp(17px, 1.05vw, 21px);
  line-height: 1.55;
}

.category-report-card h3 {
  color: #f3f5ef;
}

.category-report-card:is(:hover, :focus-visible) h3 {
  color: var(--amber);
}

.category-report-card > p {
  max-width: 900px;
  margin: 0;
  color: #bec6c0;
  font: var(--ui-card-copy)/1.8 var(--sans);
}

.category-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 14px 0 0;
}

.category-report-meta div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.category-report-meta dt {
  color: var(--muted);
  font-size: var(--ui-label);
}

.category-report-meta dd {
  margin: 0;
  color: #d2d7d3;
  font-size: var(--ui-label);
}

.category-report-link {
  margin-top: 14px;
}

.category-report-empty {
  min-height: 120px;
  padding: 38px 20px;
  color: #b8c0ba;
  text-align: center;
}

.empty-state,
.not-found {
  min-height: 320px;
  padding: 50px 24px;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--amber);
  font-size: clamp(72px, 15vw, 150px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: .08em;
  text-shadow: 0 0 25px rgba(244, 181, 43, .22);
}

.footer {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 18px;
  border-top: 1px solid var(--line);
  color: #6f7672;
  font-size: var(--ui-label);
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
}

.footer-disclaimer {
  max-width: 1000px;
  margin: 0 auto;
  color: #969d98;
  text-align: center;
  font: var(--ui-card-copy)/1.75 var(--sans);
}

.footer .world-delta {
  color: #969c97;
}

.drawer-backdrop {
  display: none;
}

.noscript-summary {
  max-width: 760px;
  margin: 20px auto;
  padding: 18px;
  border: 1px solid #765819;
  background: var(--panel);
  color: var(--text);
  font-family: var(--sans);
}

.noscript-summary h1 {
  color: var(--amber);
  font-family: var(--mono);
}

@keyframes marker-pulse {
  50% { opacity: .76; }
}

@media (min-width: 1600px) {
  .bug-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1366px) {
  :root {
    --nav-width: 202px;
    --rail-width: 286px;
  }

  .main {
    padding: 14px;
  }

  .right-rail {
    padding: 14px 11px;
  }

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

  .brand-title {
    font-size: clamp(27px, 3vw, 40px);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: var(--nav-width) minmax(0, 1fr);
  }

  .right-rail {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 0;
    border-left: 0;
  }

  .rail-panel {
    margin: 0;
  }

  .site-purpose {
    max-width: 650px;
  }
}

@media (max-width: 768px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -270px;
    width: 250px;
    transition: left .2s ease;
    box-shadow: 12px 0 45px rgba(0, 0, 0, .7);
  }

  .sidebar.open {
    left: 0;
  }

  .drawer-close {
    position: absolute;
    top: 10px;
    right: 8px;
    display: block;
  }

  .drawer-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, .68);
  }

  .main {
    padding: 11px;
  }

  .mobile-menu {
    display: block;
    flex: 0 0 auto;
  }

  .topbar {
    align-items: center;
  }

  .topbar-copy {
    flex: 1 1 auto;
  }

  .topbar-actions {
    align-self: flex-start;
  }

  .brand-title {
    font-size: clamp(22px, 6.4vw, 31px);
    letter-spacing: .08em;
  }

  .build-line {
    font-size: 11px;
  }

  .stable-badge {
    display: none;
  }

  .help-reopen span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .stat-card {
    min-height: 64px;
    padding: 8px 10px;
  }

  .map-panel,
  .map-panel.is-large {
    height: 250px;
    min-height: 250px;
  }

  .map-marker {
    width: 36px;
    height: 36px;
  }

  .map-legend {
    gap: 7px;
  }

  .bug-grid,
  .category-grid,
  .archive-layout,
  .detail-columns,
  .behavior-stack,
  .supplemental-grid,
  .info-layout,
  .sources-grid,
  .intro-fields,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .category-detail {
    display: block;
  }

  .category-detail .category-badges {
    margin-top: 10px;
  }

  .right-rail {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 11px 11px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .detail-lead {
    padding: 14px;
  }

  .category-button {
    min-height: auto;
  }

  .source-card-head {
    display: block;
  }

  .source-status {
    display: inline-flex;
    margin-bottom: 10px;
  }
}

@media (max-width: 430px) {
  .main {
    padding: 8px;
  }

  .topbar {
    gap: 9px;
    padding-right: 0;
    padding-left: 0;
  }

  .brand-title {
    font-size: 20px;
  }

  .site-purpose {
    margin-top: 7px;
  }

  .site-purpose strong,
  .site-purpose span,
  .site-purpose small {
    font-size: 12px;
  }

  .intro-panel,
  .info-section,
  .source-card,
  .contact-status {
    padding: 14px;
  }

  .source-card dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .phase-banner {
    font-size: 11px;
  }

  .stats-grid {
    gap: 6px;
  }

  .stat-card {
    grid-template-columns: 26px 1fr;
    gap: 6px;
  }

  .stat-icon {
    width: 22px;
    height: 22px;
  }

  .stat-card .eyebrow {
    font-size: 11px;
  }

  .map-panel,
  .map-panel.is-large {
    height: 230px;
    min-height: 230px;
  }

  .map-legend {
    max-width: 73%;
    flex-wrap: wrap;
  }

  .map-count {
    bottom: auto;
    top: 10px;
    right: 7px;
  }

  .calendar-panel,
  .archive-summary {
    padding: 10px;
  }

  .calendar-grid {
    gap: 2px;
  }

  .calendar-day {
    min-height: 35px;
  }
}

/* Actual article-view ranking */
.ranking-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-tab {
  min-width: 112px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  background: rgba(7, 12, 10, .82);
  font: 700 var(--ui-small)/1.2 var(--sans);
  cursor: pointer;
}

.ranking-tab:hover,
.ranking-tab:focus-visible,
.ranking-tab.is-active {
  border-color: var(--amber-soft);
  color: var(--amber);
  background: rgba(244, 181, 43, .08);
}

.ranking-tab:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.ranking-list {
  display: grid;
  gap: 9px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 104px;
  padding: 15px 18px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.ranking-card:is(:hover, :focus-visible) {
  border-color: var(--amber);
  outline: none;
}

.ranking-card.is-top-three {
  border-color: rgba(244, 181, 43, .56);
}

.ranking-position {
  color: #aab2ad;
  font: 700 28px/1 var(--mono);
  letter-spacing: .06em;
}

.ranking-card.is-top-three .ranking-position {
  color: var(--amber);
}

.ranking-card-main {
  min-width: 0;
}

.ranking-card-main h2 {
  margin: 0;
  color: var(--text);
  font: 700 clamp(17px, .95vw, 21px)/1.45 var(--sans);
}

.ranking-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--ui-label);
}

.ranking-card-meta span {
  color: #515a55;
}

.ranking-card-side {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 6px;
  align-items: baseline;
  justify-items: end;
}

.ranking-card-side strong {
  color: var(--amber);
  font: 700 22px/1 var(--mono);
}

.ranking-card-side > span {
  color: var(--muted);
  font-size: var(--ui-label);
}

.ranking-card-side .terminal-button {
  grid-column: 1 / -1;
  margin-top: 8px;
  white-space: nowrap;
}

.ranking-notes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
  font-size: var(--ui-small);
  line-height: 1.7;
}

@media (max-width: 767px) {
  .ranking-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .ranking-tab {
    min-width: 0;
    padding-inline: 8px;
  }

  .ranking-card {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .ranking-position {
    align-self: start;
    padding-top: 3px;
    font-size: 22px;
  }

  .ranking-card-side {
    grid-column: 2;
    grid-template-columns: auto auto minmax(0, 1fr);
    justify-items: start;
  }

  .ranking-card-side .terminal-button {
    grid-column: 3;
    justify-self: end;
    margin-top: 0;
  }
}

@media (max-width: 430px) {
  .ranking-card-side {
    grid-template-columns: auto auto;
  }

  .ranking-card-side .terminal-button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 7px;
  }
}

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

  .map-marker {
    animation: none;
  }

  .sidebar,
  .bug-card {
    transition: none;
  }
}

/* Full-viewport dashboard layout */
:root {
  --layout-gap: clamp(10px, .8vw, 20px);
  --space-xs: clamp(4px, .3vw, 7px);
  --space-sm: clamp(7px, .55vw, 12px);
  --space-md: clamp(10px, .8vw, 18px);
  --space-lg: clamp(16px, 1.15vw, 28px);
  --font-xs: clamp(11px, .58vw, 13px);
  --font-sm: clamp(12px, .68vw, 15px);
  --font-md: clamp(14px, .82vw, 18px);
  --font-lg: clamp(24px, 2.3vw, 52px);
}

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

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

.app-shell,
.world-bug-report-shell {
  display: grid;
  grid-template-columns: 13fr minmax(0, 67fr) 20fr;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
}

.sidebar,
.right-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar {
  padding: var(--space-md) var(--space-sm);
}

.brand-block {
  padding: var(--space-xs) var(--space-sm) var(--space-md);
}

.brand-emblem {
  width: clamp(72px, 6vw, 112px);
  height: clamp(72px, 6vw, 112px);
  background-size: clamp(56px, 4.8vw, 88px);
}

.nav-list {
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.nav-link {
  gap: clamp(7px, .7vw, 14px);
  min-height: clamp(42px, 3.2vw, 52px);
  padding: var(--space-xs) var(--space-sm);
  overflow-wrap: anywhere;
  font-size: var(--font-sm);
  line-height: 1.35;
}

.nav-icon {
  width: clamp(17px, 1.25vw, 23px);
  height: clamp(17px, 1.25vw, 23px);
}

.os-meta,
.sidebar-foot {
  font-size: var(--font-xs);
}

.main {
  container-type: inline-size;
  min-width: 0;
  padding: var(--space-md);
}

.topbar {
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding: 0 var(--space-xs) var(--space-sm);
}

.brand-title {
  font-size: var(--font-lg);
}

.site-purpose {
  max-width: none;
  margin-top: var(--space-sm);
  line-height: 1.55;
}

.site-purpose strong {
  font-size: var(--font-md);
}

.site-purpose span {
  font-size: var(--font-sm);
}

.right-rail {
  padding: var(--space-md) var(--space-sm);
}

.rail-panel {
  width: 100%;
  margin-bottom: var(--space-sm);
}

.rail-title,
.rail-body,
.flow-item small,
.supervisor p,
.rail-about p {
  overflow-wrap: anywhere;
}

.supervisor-globe {
  width: clamp(78px, 7vw, 128px);
  height: clamp(78px, 7vw, 128px);
}

.rail-about .terminal-button {
  width: 100%;
  justify-content: center;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
  margin-bottom: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
}

.intro-panel[hidden] {
  display: none;
}

.intro-heading,
.intro-panel > p,
.intro-fields {
  grid-column: 1;
}

.intro-heading h2 {
  font-size: clamp(17px, 1.05vw, 22px);
}

.intro-panel > p {
  max-width: none;
  margin: 0;
  font-size: var(--font-sm);
  line-height: 1.55;
}

.intro-fields {
  gap: var(--space-xs);
}

.intro-fields > div {
  display: flex;
  gap: var(--space-xs);
  align-items: baseline;
  padding: var(--space-xs) var(--space-sm);
}

.intro-fields strong,
.intro-fields span {
  font-size: var(--font-xs);
  line-height: 1.45;
}

.intro-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  margin: 0;
}

.map-panel.is-featured {
  width: 100%;
  height: auto;
  min-height: 260px;
  aspect-ratio: 3 / 1;
  margin: 0;
}

.map-panel.is-featured .map-art {
  object-fit: contain;
}

.map-marker {
  width: clamp(28px, 2.1cqi, 42px);
  height: clamp(28px, 2.1cqi, 42px);
}

.map-marker::after {
  width: clamp(6px, .48cqi, 9px);
  height: clamp(6px, .48cqi, 9px);
}

.primary-bug-panel {
  display: block;
  margin-top: var(--space-sm);
  overflow: hidden;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.primary-heading {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--line);
}

.primary-bug {
  display: grid;
  grid-template-columns: 42fr minmax(0, 58fr);
  min-width: 0;
}

.primary-bug-summary {
  min-width: 0;
  padding: var(--space-md);
  border-right: 1px solid var(--line);
}

.primary-category,
.latest-category {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  color: var(--amber);
  font-size: var(--font-sm);
}

.primary-category .inline-icon,
.latest-category .inline-icon {
  width: clamp(17px, 1.2vw, 22px);
  height: clamp(17px, 1.2vw, 22px);
}

.primary-bug-summary h3 {
  margin: var(--space-sm) 0;
  color: #f0d89d;
  font: 700 clamp(19px, 1.35vw, 28px)/1.35 var(--sans);
}

.primary-bug-summary > p {
  margin: 0 0 var(--space-sm);
  color: #b8beba;
  font: var(--font-sm)/1.7 var(--sans);
}

.primary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 var(--space-sm);
  background: var(--line);
}

.primary-meta > div {
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  background: var(--panel);
}

.primary-meta dt,
.primary-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.primary-meta dt {
  color: var(--muted);
  font-size: var(--font-xs);
}

.primary-meta dd {
  color: #d3d7d3;
  font: var(--font-sm)/1.5 var(--sans);
}

.primary-detail-link {
  width: fit-content;
}

.primary-bug-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.primary-comparison-item {
  min-width: 0;
  margin: 0;
  padding: var(--space-md);
  border-left: 1px solid var(--line);
  background: rgba(5, 8, 7, .32);
}

.primary-comparison-item:first-child {
  border-left: 0;
}

.primary-comparison-item p {
  margin: var(--space-sm) 0 0;
  overflow-wrap: anywhere;
  color: #c2c7c3;
  font: var(--font-sm)/1.72 var(--sans);
}

.primary-comparison-item.expected .eyebrow { color: var(--blue); }
.primary-comparison-item.observed .eyebrow { color: var(--green); }
.primary-comparison-item.mismatch .eyebrow,
.primary-comparison-item.mismatch p { color: #f0c762; }

.latest-heading {
  margin: var(--space-md) 0 var(--space-sm);
}

.latest-reports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.latest-report-card {
  min-width: 0;
  height: 100%;
  border: 1px solid #624d1c;
  border-top-color: var(--amber);
  background: linear-gradient(145deg, rgba(244, 181, 43, .035), transparent 52%), var(--panel);
}

.latest-report-card.severity-high { border-top-color: var(--orange); }
.latest-report-card.severity-critical { border-top-color: var(--red); }

.latest-report-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-md);
  color: inherit;
  text-decoration: none;
}

.latest-report-card > a:is(:hover, :focus-visible) {
  outline: 1px solid var(--amber);
  outline-offset: -1px;
  background: rgba(244, 181, 43, .035);
}

.latest-report-top {
  display: flex;
  gap: var(--space-sm);
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--font-xs);
}

.latest-report-card h3 {
  margin: var(--space-sm) 0;
  color: #e1c77e;
  font: 700 clamp(16px, 1vw, 21px)/1.4 var(--sans);
}

.latest-category {
  margin: 0 0 var(--space-sm);
}

.latest-report-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line-soft);
}

.latest-report-card dl > div {
  min-width: 0;
  padding: var(--space-xs);
  background: #090d0c;
}

.latest-report-card dt,
.latest-report-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.latest-report-card dt {
  color: var(--muted);
  font-size: var(--font-xs);
}

.latest-report-card dd {
  color: #d1d5d1;
  font: var(--font-sm)/1.45 var(--sans);
}

.latest-mismatch {
  margin: var(--space-sm) 0 0;
  color: #bec4bf;
  font: var(--font-sm)/1.65 var(--sans);
}

.latest-mismatch span {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--amber);
  font-family: var(--mono);
  font-size: var(--font-xs);
  letter-spacing: .08em;
}

@media (min-width: 1440px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .intro-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .intro-heading {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .intro-panel > p,
  .intro-fields {
    grid-column: 2;
  }

  .intro-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (min-width: 1024px) {
  .app-shell,
  .world-bug-report-shell {
    display: grid;
    grid-template-columns: 13fr minmax(0, 67fr) 20fr;
  }

  .mobile-menu,
  .drawer-close {
    display: none;
  }

  .sidebar { grid-column: 1; }
  .main { grid-column: 2; }

  .right-rail {
    grid-column: 3;
    display: block;
    padding: var(--space-md) var(--space-sm);
    border-left: 1px solid var(--line);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .app-shell,
  .world-bug-report-shell {
    display: grid;
    grid-template-columns: minmax(0, 70fr) minmax(230px, 30fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: min(-38vw, -270px);
    z-index: 30;
    width: clamp(270px, 38vw, 330px);
    height: 100dvh;
    transition: left .2s ease;
    box-shadow: 12px 0 45px rgba(0, 0, 0, .72);
  }

  .sidebar.open { left: 0; }

  .drawer-close,
  .mobile-menu { display: block; }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .topbar .title-status-row {
    display: none;
  }

  .drawer-close {
    position: absolute;
    top: 10px;
    right: 8px;
  }

  .drawer-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, .68);
  }

  .main { grid-column: 1; }

  .right-rail {
    grid-column: 2;
    display: block;
    height: 100dvh;
    padding: var(--space-md) var(--space-sm);
    border-left: 1px solid var(--line);
  }

  .primary-bug { grid-template-columns: 1fr; }

  .primary-bug-summary {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .latest-report-card dl { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .app-shell,
  .world-bug-report-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    z-index: 30;
    width: min(280px, 86vw);
    height: 100dvh;
    box-shadow: none;
    transition: left .2s ease;
  }

  .sidebar.open {
    left: 0;
    box-shadow: 12px 0 45px rgba(0, 0, 0, .72);
  }

  .drawer-close,
  .mobile-menu { display: block; }

  .main {
    padding-top: 0;
  }

  .topbar {
    display: block;
    padding-top: calc(68px + var(--safe-area-top));
  }

  .mobile-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 28;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(56px + var(--safe-area-top));
    padding: var(--safe-area-top) max(12px, var(--safe-area-right)) 0 max(12px, var(--safe-area-left));
    border-bottom: 1px solid rgba(244, 181, 43, .22);
    background: #050807;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .24);
    backdrop-filter: blur(8px);
  }

  .mobile-header::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--safe-area-top);
    background: #050807;
    pointer-events: none;
  }

  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .mobile-menu:focus-visible {
    outline: none;
  }

  .mobile-menu[aria-expanded="true"] {
    position: fixed;
    top: calc(6px + var(--safe-area-top));
    right: max(10px, var(--safe-area-right));
    z-index: 31;
    background: transparent;
  }

  .mobile-header-title {
    min-width: 0;
    font-size: clamp(14px, 4.3vw, 17px);
  }

  .topbar .title-status-row {
    display: none;
  }

  .topbar .site-purpose {
    margin-top: 0;
  }

  .right-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 0 var(--space-sm) var(--space-sm);
    border-left: 0;
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .intro-heading,
  .intro-panel > p,
  .intro-fields,
  .intro-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .intro-fields,
  .primary-bug,
  .primary-bug-comparison,
  .latest-reports-grid {
    grid-template-columns: 1fr;
  }

  .intro-actions { margin-top: var(--space-xs); }

  .map-panel.is-featured {
    min-height: clamp(220px, 66vw, 280px);
    aspect-ratio: auto;
  }

  .primary-bug-summary {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .primary-comparison-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .primary-comparison-item:first-child { border-top: 0; }

  .latest-report-card dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .latest-report-card > a {
    transition: none;
  }
}

/* Reference-dashboard composition: compact, full-screen and information dense. */
:root {
  --reference-line: rgba(181, 130, 22, .42);
  --reference-panel: rgba(5, 10, 9, .88);
}

.sidebar {
  padding: 0;
  border-color: var(--reference-line);
}

.brand-block {
  padding: clamp(12px, 1vw, 20px) clamp(8px, .8vw, 16px) clamp(14px, 1vw, 22px);
  border-bottom-color: var(--reference-line);
  text-align: center;
}

.brand-emblem {
  width: clamp(76px, 6.1vw, 112px);
  height: clamp(76px, 6.1vw, 112px);
  margin-bottom: clamp(6px, .6vw, 11px);
}

.sidebar-brand-name {
  margin-bottom: clamp(14px, 1.2vw, 24px);
  color: #d8ddd8;
  font: 600 clamp(11px, .75vw, 14px)/1.2 var(--mono);
  letter-spacing: .08em;
}

.sidebar-brand-home,
.brand-title-home {
  color: inherit;
  text-decoration: none;
}

.sidebar-brand-home {
  display: inline-block;
}

.brand-title-home {
  display: block;
  color: #ffd068;
}

.brand-title-home:visited {
  color: #ffd068;
}

.sidebar-brand-home:focus-visible,
.brand-title-home:focus-visible {
  outline: 2px solid var(--accent, #f0b51f);
  outline-offset: 4px;
}

.os-meta {
  text-align: left;
  line-height: 1.7;
}

.nav-list {
  gap: 0;
  margin-top: 0;
}

.nav-link {
  min-height: clamp(45px, 4.15vw, 64px);
  padding: clamp(7px, .62vw, 11px) clamp(8px, .9vw, 16px);
  border-bottom-color: rgba(50, 57, 53, .32);
}

.nav-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.nav-copy strong {
  overflow-wrap: anywhere;
  font-size: clamp(11px, .72vw, 14px);
  font-weight: 600;
  letter-spacing: .06em;
}

.nav-copy small {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #858c87;
  font: clamp(10px, .58vw, 12px)/1.2 var(--sans);
  letter-spacing: .02em;
}

.nav-link.active .nav-copy small { color: #cdbb8d; }

.sidebar-foot { display: none; }

.main {
  padding: clamp(10px, .95vw, 18px) clamp(12px, 1.05vw, 20px) 0;
}

.topbar {
  display: block;
  min-height: 0;
  margin: 0 0 clamp(7px, .55vw, 10px);
  padding: 0 clamp(4px, .35vw, 7px);
  border: 0;
}

.title-status-row {
  display: flex;
  gap: clamp(14px, 1.25vw, 24px);
  align-items: center;
}

.brand-title {
  font-size: clamp(27px, 2.65vw, 50px);
  line-height: 1;
}

.site-purpose {
  display: block;
  margin-top: clamp(4px, .35vw, 7px);
  line-height: 1.35;
}

.site-purpose strong {
  font-size: clamp(11px, .7vw, 14px);
  font-weight: 500;
}

.site-purpose span { display: none; }

.stable-badge {
  margin: 0;
  padding: 5px 10px;
  white-space: nowrap;
  font-size: clamp(10px, .57vw, 12px);
}

.about-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(10px, .85vw, 16px);
  align-items: center;
  min-height: clamp(35px, 2.6vw, 43px);
  margin-bottom: clamp(9px, .72vw, 13px);
  padding: 5px clamp(10px, .8vw, 15px);
  border-color: var(--reference-line);
  background: var(--reference-panel);
}

.about-strip-title {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--amber);
  cursor: pointer;
}

.about-strip-title .inline-icon,
.about-strip-link .inline-icon {
  width: 16px;
  height: 16px;
}

.about-strip p {
  margin: 0;
  overflow: hidden;
  color: #aab1ac;
  font: clamp(10px, .63vw, 13px)/1.4 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-strip-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--reference-line);
  color: var(--amber);
  font-size: var(--font-xs);
  text-decoration: none;
  white-space: nowrap;
}

.intro-panel {
  position: relative;
  z-index: 5;
}

.map-panel.is-featured {
  min-height: 250px;
  border-color: var(--reference-line);
  background: #031110;
  box-shadow: inset 0 0 55px rgba(17, 68, 61, .16);
}

.map-panel.is-featured::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, .34));
  content: "";
}

.map-label {
  position: absolute;
  top: clamp(8px, .7vw, 13px);
  left: clamp(12px, .9vw, 17px);
  z-index: 4;
  color: var(--amber);
  font: 600 var(--font-xs)/1 var(--mono);
  letter-spacing: .08em;
}

.map-panel.is-featured .map-art {
  width: 96%;
  height: 96%;
  margin: 2%;
  opacity: .84;
}

.map-marker {
  z-index: 3;
  display: grid;
  width: clamp(32px, 2.45cqi, 46px);
  height: clamp(32px, 2.45cqi, 46px);
  place-items: center;
  border: 1px solid currentColor;
  color: var(--amber);
  font: 700 clamp(12px, .82vw, 16px)/1 var(--mono);
  text-shadow: 0 0 7px currentColor;
}

.map-marker::after { display: none; }
.map-marker.severity-critical { color: var(--red); }
.map-marker.severity-high { color: var(--orange); }
.map-marker.severity-low { color: #aab0ac; }

.map-controls { z-index: 4; }
.map-panel.is-featured .map-controls { top: clamp(34px, 2.7vw, 48px); }
.map-legend, .map-count { z-index: 4; }

.primary-bug-panel {
  margin-top: clamp(8px, .65vw, 12px);
  border-color: var(--reference-line);
}

.primary-heading {
  min-height: 0;
  padding: 4px clamp(10px, .75vw, 14px);
}

.primary-heading h2,
.latest-heading h2 {
  color: var(--amber);
  font-size: clamp(11px, .72vw, 14px);
  line-height: 1.1;
  letter-spacing: .08em;
}

.primary-bug-summary,
.primary-comparison-item {
  padding: clamp(8px, .5vw, 10px);
}

.primary-category {
  font-size: clamp(10px, .6vw, 12px);
}

.primary-bug-summary h3 {
  margin: 5px 0;
  font-size: clamp(15px, 1.08vw, 21px);
  line-height: 1.25;
}

.primary-bug-summary > p {
  display: -webkit-box;
  margin-bottom: 7px;
  overflow: hidden;
  font-size: clamp(11px, .61vw, 12px);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.primary-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 7px;
}

.primary-meta > div { padding: 3px 6px; }
.primary-meta > div {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
.primary-meta dt { flex: 0 0 auto; font-size: clamp(9px, .5vw, 10px); }
.primary-meta dt::after { content: ":"; }
.primary-meta dd {
  overflow: hidden;
  font-size: clamp(11px, .6vw, 12px);
  line-height: 1.25;
  text-overflow: ellipsis;
}
.primary-detail-link { min-height: 30px; padding: 4px 10px; font-size: clamp(10px, .58vw, 12px); }

.primary-comparison-item p {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  font-size: clamp(11px, .63vw, 13px);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.latest-heading {
  margin: clamp(8px, .62vw, 12px) 0 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--reference-line);
}

.latest-heading a {
  color: var(--amber);
  font-size: clamp(9px, .55vw, 11px);
  text-decoration: none;
}

.latest-reports-grid { gap: clamp(5px, .42vw, 8px); }
.latest-report-card {
  height: clamp(104px, 5.55vw, 110px);
  overflow: hidden;
  border-color: rgba(118, 88, 22, .6);
}
.latest-report-card > a { overflow: hidden; padding: clamp(7px, .55vw, 10px); }
.latest-report-top { align-items: center; font-size: clamp(8px, .48vw, 10px); }

.latest-status {
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--purple);
  line-height: 1.2;
}

.latest-status.status-open { color: var(--orange); }
.latest-status.status-resolved { color: var(--green); }

.latest-report-card h3 {
  margin: 4px 0;
  font-size: clamp(12px, .78vw, 15px);
  line-height: 1.25;
}

.latest-category {
  margin-bottom: 4px;
  font-size: clamp(10px, .53vw, 11px);
}

.latest-report-card dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.latest-report-card dl > div { padding: 3px 4px; }
.latest-report-card dt { font-size: clamp(8px, .45vw, 9px); }
.latest-report-card dd { font-size: clamp(10px, .52vw, 11px); line-height: 1.25; }

.latest-mismatch {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: clamp(10px, .53vw, 11px);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.latest-mismatch span { display: inline; margin-right: 5px; font-size: inherit; }
.latest-time { margin-top: auto; padding-top: 4px; color: var(--muted); font-size: clamp(8px, .48vw, 10px); }

.right-rail {
  padding: clamp(10px, .85vw, 16px) clamp(9px, .72vw, 14px);
  border-left-color: var(--reference-line);
}

.rail-panel {
  margin-bottom: clamp(8px, .65vw, 12px);
  border-color: var(--reference-line);
  background: var(--reference-panel);
}

.rail-title {
  padding: clamp(7px, .55vw, 10px) clamp(10px, .75vw, 14px);
  color: var(--amber);
  font-size: clamp(10px, .62vw, 12px);
  letter-spacing: .08em;
}

.rail-body { padding: clamp(9px, .7vw, 13px); font-size: clamp(11px, .62vw, 13px); }
.supervisor-globe { width: clamp(68px, 5.5vw, 96px); height: clamp(68px, 5.5vw, 96px); }
.supervisor p { font-size: clamp(10px, .62vw, 13px); line-height: 1.65; }
.flow-item { gap: 9px; padding: clamp(4px, .35vw, 6px) 0; font-size: clamp(11px, .64vw, 13px); }
.flow-item small { margin-top: 1px; font-size: clamp(8px, .48vw, 10px); }
.flow-item.reproducing { color: var(--orange); }
.flow-item.closed { color: var(--gray); }

.footer {
  min-height: 26px;
  margin-top: 5px;
  padding: 4px 8px;
}

.footer-brand { width: 100%; justify-content: center; }
.footer-disclaimer { display: none; }

@media (min-width: 1024px) and (max-width: 1366px) {
  .nav-copy small { display: none; }
  .nav-link { min-height: 43px; }
  .map-panel.is-featured { min-height: 245px; }
}

@media (max-width: 1023px) {
  .sidebar-foot { display: block; }
  .site-purpose span { display: block; }
}

@media (max-width: 767px) {
  .main { padding: 10px 8px 0; }
  .title-status-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .brand-title { font-size: clamp(26px, 8.1vw, 34px); letter-spacing: .095em; }
  .stable-badge { display: none; }
  .site-purpose { padding-top: 3px; }
  .about-strip { grid-template-columns: 1fr auto; }
  .about-strip p { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .about-strip-link { grid-column: 2; grid-row: 1; }
  .map-panel.is-featured .map-art { width: 112%; height: 96%; margin: 2% -6%; }
  .primary-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-bug-summary > p,
  .primary-comparison-item p,
  .latest-mismatch { -webkit-line-clamp: initial; }
  .primary-bug-summary,
  .primary-comparison-item { padding: 12px; }
  .latest-report-card { height: auto; overflow: visible; }
  .latest-report-card > a { overflow: visible; }
  .latest-report-card h3 { font-size: 15px; }
  .latest-mismatch { font-size: 12px; }
  .right-rail { padding-top: 10px; }
}

/* Final readability and color hierarchy pass. */
:root {
  --font-aux: clamp(11px, .58vw, 12px);
  --font-label: clamp(12px, .65vw, 14px);
  --font-body: clamp(14px, .78vw, 16px);
  --font-primary: clamp(15px, .86vw, 17px);
  --font-card-title: clamp(16px, 1vw, 21px);
  --font-section: clamp(15px, .95vw, 20px);
  --font-xs: var(--font-aux);
  --font-sm: var(--font-body);
  --font-md: var(--font-primary);
  --text: #e2e6e2;
  --muted: #929a95;
  --reference-line: rgba(151, 111, 24, .46);
  --reference-panel: rgba(7, 13, 12, .92);
}

body {
  color: var(--text);
  font-size: var(--font-body);
}

.panel {
  border-color: var(--reference-line);
  border-radius: 4px;
  background: var(--reference-panel);
}

.eyebrow { font-size: var(--font-label); }

.site-purpose strong {
  color: #eef1ed;
  font-size: var(--font-body);
  line-height: 1.5;
}

.about-strip {
  padding-inline: clamp(12px, .9vw, 18px);
}

.about-strip-title,
.about-strip-link {
  font-size: var(--font-label);
}

.about-strip p {
  color: #c5cbc6;
  font-size: clamp(12px, .69vw, 14px);
  line-height: 1.5;
}

.map-panel.is-featured {
  min-height: 245px;
  aspect-ratio: 3.35 / 1;
}

.map-panel.is-featured .map-art {
  width: 98%;
  height: 98%;
  margin: 1%;
  opacity: .92;
}

.map-label { font-size: var(--font-label); }

.map-marker {
  width: clamp(44px, 2.45cqi, 48px);
  height: clamp(44px, 2.45cqi, 48px);
  isolation: isolate;
  color: var(--amber);
  font-size: clamp(14px, .82vw, 17px);
  text-shadow: none;
  box-shadow: 0 0 0 5px rgba(244, 181, 43, .035), 0 0 9px rgba(244, 181, 43, .28);
  animation: none;
}

.map-marker::after {
  position: absolute;
  z-index: -1;
  inset: -12px;
  display: block;
  width: auto;
  height: auto;
  transform: scale(.92);
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, currentColor 22%, transparent) 0,
    color-mix(in srgb, currentColor 9%, transparent) 38%,
    transparent 72%);
  content: "";
  opacity: .44;
  filter: blur(4px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}

.map-marker.severity-critical {
  color: var(--red);
  box-shadow: 0 0 0 7px rgba(255, 75, 62, .09), 0 0 18px rgba(255, 75, 62, .72);
}

.map-marker.severity-high {
  color: var(--orange);
  box-shadow: 0 0 0 6px rgba(255, 120, 61, .06), 0 0 13px rgba(255, 120, 61, .52);
}

.map-marker.severity-high::after {
  opacity: .38;
}

.map-marker.severity-low {
  color: #d5dad6;
  box-shadow: 0 0 0 5px rgba(213, 218, 214, .025), 0 0 8px rgba(213, 218, 214, .28);
}

.map-marker:is(:hover, :focus-visible, .is-selected) {
  outline: 3px solid #f4f7f4;
  outline-offset: 3px;
  box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 15%, transparent), 0 0 24px currentColor;
}

.map-marker:is(:hover, :focus-visible, .is-selected)::after {
  transform: scale(1.08);
  opacity: .72;
}

.map-control {
  width: 44px;
  height: 44px;
  font-size: var(--font-body);
}

.map-legend,
.map-count {
  min-height: 32px;
  font-size: var(--font-label);
  line-height: 1.45;
}

.primary-heading h2,
.latest-heading h2 {
  font-size: var(--font-section);
}

.latest-heading a { font-size: var(--font-label); }

.primary-bug {
  grid-template-columns: 40fr minmax(0, 60fr);
}

.primary-bug-summary,
.primary-comparison-item {
  padding: clamp(12px, .65vw, 14px);
}

.primary-category,
.latest-category {
  font-size: var(--font-label);
}

.primary-bug-summary h3 {
  color: #f2f4f1;
  font-size: clamp(18px, 1.15vw, 23px);
  line-height: 1.35;
}

.primary-bug-summary > p {
  color: #d9ded9;
  font-size: var(--font-body);
  line-height: 1.65;
  -webkit-line-clamp: 2;
}

.primary-meta > div {
  min-height: 34px;
  padding: 5px 7px;
}

.primary-meta dt { color: #858d88; font-size: var(--font-aux); }
.primary-meta dd { color: #d7dcd7; font-size: var(--font-label); }

.status-text.status-open { color: var(--blue); }
.status-text.status-investigating { color: var(--purple); }
.status-text.status-explained { color: #b9c3bd; }
.status-text.status-resolved { color: var(--green); }
.status-text.status-feature-not-a-bug { color: #ffd04a; }
.status-text.status-wont-fix { color: #a2aaa5; }
.severity-text.severity-critical,
.severity-text.severity-high { color: var(--red); }
.severity-text.severity-medium { color: var(--orange); }
.severity-text.severity-low { color: #c8ceca; }

.primary-detail-link {
  min-height: 44px;
  padding: 8px 14px;
  font-size: var(--font-label);
}

.primary-comparison-item { border-left-color: rgba(104, 114, 108, .6); }

.primary-comparison-item p,
.primary-comparison-item.mismatch p {
  color: #dfe4df;
  font-size: var(--font-body);
  line-height: 1.65;
  -webkit-line-clamp: 4;
}

.primary-comparison-item.expected .eyebrow { color: var(--blue); }
.primary-comparison-item.observed .eyebrow { color: var(--green); }
.primary-comparison-item.mismatch .eyebrow { color: var(--amber); }

.latest-reports-grid {
  grid-auto-rows: 1fr;
  gap: clamp(9px, .62vw, 13px);
}

.latest-report-card {
  height: auto;
  min-height: 190px;
  overflow: visible;
  border-color: rgba(113, 85, 25, .64);
  background: #080e0d;
}

.latest-report-card > a {
  overflow: visible;
  padding: clamp(11px, .62vw, 13px);
}

.latest-report-card > a:is(:hover, :focus-visible) {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
  background: rgba(244, 181, 43, .045);
}

.latest-report-top,
.latest-time { font-size: var(--font-aux); }

.latest-status {
  padding: 3px 8px;
  font-size: var(--font-aux);
}

.latest-status.status-open { color: var(--blue); }
.latest-status.status-investigating { color: var(--purple); }
.latest-status.status-explained { color: #b9c3bd; }
.latest-status.status-resolved { color: var(--green); }
.latest-status.status-feature-not-a-bug { color: #ffd04a; }
.latest-status.status-wont-fix { color: #a2aaa5; }

.latest-report-card h3 {
  display: -webkit-box;
  margin: 7px 0;
  overflow: hidden;
  color: #f0f3ef;
  font-size: var(--font-card-title);
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.latest-category {
  margin-bottom: 7px;
  color: var(--amber);
}

.latest-report-card dl > div {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 6px;
}
.latest-report-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.latest-report-card dl dt { flex: 0 0 auto; }
.latest-report-card dl dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-report-card dt { color: #7f8882; font-size: var(--font-aux); }
.latest-report-card dd { color: #d7dcd7; font-size: var(--font-label); line-height: 1.4; }

.latest-mismatch {
  margin-top: 8px;
  color: #d9ded9;
  font-size: var(--font-body);
  line-height: 1.6;
  -webkit-line-clamp: 2;
}

.latest-mismatch span {
  color: #8c948f;
  font-size: var(--font-aux);
}

.latest-time { padding-top: 7px; color: #858d88; }

.nav-link { min-height: 52px; color: #c7cdc8; }
.nav-icon { width: 22px; height: 22px; }
.nav-copy strong { color: inherit; font-size: clamp(14px, .76vw, 16px); }
.nav-copy small { color: #747d77; font-size: var(--font-aux); line-height: 1.35; }
.nav-link.active .nav-copy small { color: #b7aa88; }

.rail-title {
  padding: clamp(10px, .7vw, 14px) clamp(13px, .9vw, 18px);
  font-size: var(--font-section);
}

.rail-body {
  padding: clamp(13px, .9vw, 18px);
  color: #dce1dc;
  font-size: var(--font-body);
  line-height: 1.65;
}

.supervisor p {
  color: #dde2dd;
  font-size: var(--font-body);
  line-height: 1.75;
}

.supervisor cite { font-size: var(--font-label); }

.flow-item {
  min-height: 46px;
  font-size: var(--font-body);
  line-height: 1.4;
}

.flow-item small {
  color: #a3aaa5;
  font-size: var(--font-label);
  line-height: 1.45;
}

.footer {
  min-height: 34px;
  padding: 7px 10px;
  color: #8f9792;
  font-size: var(--font-label);
  line-height: 1.55;
}

.footer-brand { gap: 8px 24px; }
.footer .world-delta { color: #c0c6c1; }

:is(a, button):focus-visible {
  outline: 3px solid #f4c750;
  outline-offset: 3px;
}

@media (min-width: 1600px) {
  .latest-reports-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .nav-copy small { display: block; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .nav-copy small { display: none; }
  .nav-link { min-height: 48px; }
}

@media (max-width: 1023px) {
  .latest-report-card { min-height: 0; }
  .primary-bug { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .map-panel.is-featured { aspect-ratio: auto; min-height: 250px; }
  .map-marker { width: 44px; height: 44px; }
  .primary-bug-comparison { grid-template-columns: 1fr; }
  .primary-bug-summary > p,
  .primary-comparison-item p,
  .latest-mismatch { -webkit-line-clamp: initial; }
  .latest-report-card h3 { font-size: var(--font-card-title); }
  .right-rail { gap: 10px; }
  .footer-brand { flex-direction: column; align-items: center; gap: 4px; }
}

/* Page-specific right rail and wide-content layouts. */
.rail-panel { overflow: hidden; }

.rail-metrics {
  display: grid;
  gap: 0;
  margin: 0;
}

.rail-metrics > div {
  display: grid;
  grid-template-columns: minmax(86px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(110, 120, 114, .2);
}

.rail-metrics > div:last-child { border-bottom: 0; }
.rail-metrics dt { color: #929b95; font-size: var(--font-label); }
.rail-metrics dd { margin: 0; color: #e2e7e2; font-size: var(--font-label); line-height: 1.5; overflow-wrap: anywhere; }

.world-summary-panel .rail-metrics > div {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: clamp(7px, .55vw, 10px) 0;
}

.world-summary-panel .rail-metrics dt {
  color: #d7dcd7;
}

.world-summary-panel .rail-metrics dd {
  min-width: 4.5em;
  text-align: right;
  font-size: clamp(14px, .78vw, 17px);
  font-weight: 700;
  white-space: nowrap;
}

.world-summary-panel .summary-today { color: var(--amber); }
.world-summary-panel .summary-open { color: var(--orange); }
.world-summary-panel .summary-resolved { color: var(--green); }
.world-summary-panel .summary-areas { color: #c8d3cf; }

.right-rail > .rail-panel:last-child {
  margin-bottom: 0;
}

.rail-empty {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #c7cec8;
}

.rail-empty b { color: var(--amber); font-family: var(--mono); font-size: var(--font-label); }
.rail-empty span { color: #99a19c; font-size: var(--font-label); line-height: 1.6; }

.rail-filter-form { display: grid; gap: 11px; }
.rail-filter-form label { display: grid; gap: 5px; color: #aab2ac; font-size: var(--font-label); }
.rail-filter-form select {
  width: 100%;
  min-height: 40px;
  padding: 7px 30px 7px 9px;
  border: 1px solid rgba(151, 111, 24, .62);
  border-radius: 2px;
  color: #e7ebe7;
  background: #07100e;
  font: inherit;
}
.rail-filter-form select:focus-visible { outline: 3px solid #f4c750; outline-offset: 2px; }
.rail-filter-form select:disabled { color: #919993; opacity: .8; }
.rail-check { grid-template-columns: auto 1fr !important; align-items: center; cursor: pointer; }
.rail-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--amber); }
.rail-filter-form .terminal-button { width: 100%; min-height: 40px; justify-content: center; }

.rail-full-button { width: 100%; min-height: 42px; margin-top: 12px; justify-content: center; }
.rail-description { margin: 12px 0 0; color: #cbd2cc; line-height: 1.7; }
.rail-mismatch { display: grid; gap: 5px; margin: 12px 0 0; padding-top: 11px; border-top: 1px solid rgba(151, 111, 24, .34); }
.rail-mismatch b { color: var(--amber); font-size: var(--font-label); }
.rail-mismatch span { color: #d8ddd8; font-size: var(--font-label); line-height: 1.65; }

.rail-link-list { display: grid; gap: 8px; }
.rail-link-list a,
.rail-button-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px;
  border: 1px solid rgba(151, 111, 24, .42);
  color: #dfe4df;
  background: rgba(4, 10, 9, .55);
  text-align: left;
  text-decoration: none;
}
.rail-button-list button { cursor: pointer; font: inherit; }
.rail-link-list :is(a, button):is(:hover, :focus-visible) { border-color: var(--amber); background: rgba(244, 181, 43, .06); }
.rail-link-list b { color: var(--amber); font-size: var(--font-label); }
.rail-link-list span { color: #d5dbd6; font-size: var(--font-label); line-height: 1.45; }
.rail-link-list small { color: #919a94; font-size: var(--font-aux); }

.rail-rule-group + .rail-rule-group { margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(110, 120, 114, .22); }
.rail-rule-group b { color: var(--amber); font-size: var(--font-label); }
.rail-rule-group ul { margin: 6px 0 0; padding-left: 1.25em; color: #cbd2cc; font-size: var(--font-label); line-height: 1.65; }

.not-found-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

@media (min-width: 1024px) {
  .app-shell.layout--content-wide,
  .world-bug-report-shell.layout--content-wide {
    grid-template-columns: 13fr minmax(0, 87fr);
  }

  .layout--content-wide .main { grid-column: 2; }
  .layout--content-wide .info-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout--content-wide .sources-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .app-shell.layout--content-wide,
  .world-bug-report-shell.layout--content-wide { grid-template-columns: minmax(0, 1fr); }
  .layout--content-wide .main { grid-column: 1; }
}

@media (max-width: 767px) {
  .rail-metrics > div { grid-template-columns: minmax(100px, .85fr) minmax(0, 1.15fr); }
  #map-summary { display: none; }
  .not-found-actions { display: grid; }
}

/* Hybrid PNG + SVG equirectangular map with longitude-based horizontal looping. */
.world-map-panel {
  isolation: isolate;
  background: #03110f;
}

.world-map-viewport {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  user-select: none;
}

.world-map-viewport.is-dragging { cursor: grabbing; }
.world-map-viewport:focus-visible {
  outline: 3px solid rgba(244, 199, 80, .9);
  outline-offset: -4px;
}

.world-map-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #020b0a;
  contain: paint;
  transform-origin: center;
  transition: transform .16s ease;
  will-change: transform;
}

.world-map-viewport.is-dragging .world-map-scene { transition: none; }

.world-map-texture,
.world-map-grid,
.world-map-svg-layer {
  position: absolute;
  inset: 0;
  background-repeat: repeat-x;
  background-size: 100% 100%;
  pointer-events: none;
}

.world-map-texture {
  z-index: 0;
  background-color: #020b0a;
  background-image: url("../map/world-map-background-texture.png?v=1.0.0");
  opacity: .24;
  filter: saturate(.82) contrast(1.08);
}

.world-map-grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(71, 115, 106, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 115, 106, .055) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .62;
}

.world-map-grid::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 7, 7, .34), transparent 13%, transparent 87%, rgba(1, 7, 7, .34)),
    radial-gradient(ellipse at center, rgba(21, 70, 63, .08), transparent 56%, rgba(0, 0, 0, .28));
  content: "";
}

.world-map-svg-layer {
  z-index: 2;
  background-image: url("../map/world-map-real-equirectangular.svg?v=1.6.6");
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, .82))
    drop-shadow(0 0 4px rgba(120, 160, 153, .28));
}

.world-map-markers,
.world-map-user-layer {
  position: absolute;
  inset: 0;
}

.world-map-markers { z-index: 4; }
.world-map-user-layer { z-index: 3; pointer-events: none; }

.world-map-user-location {
  position: absolute;
  display: grid;
  gap: 2px;
  min-width: 44px;
  min-height: 44px;
  transform: translate(-50%, -50%);
  place-items: center;
  color: #72b7ad;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
  text-shadow: 0 0 7px rgba(114, 183, 173, .75);
}

.world-map-user-location span {
  width: 10px;
  height: 10px;
  border: 2px solid #8bc9c0;
  border-radius: 50%;
  background: #07110f;
  box-shadow: 0 0 0 6px rgba(114, 183, 173, .08), 0 0 12px rgba(114, 183, 173, .45);
}

.map-center-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 7;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(123, 158, 149, .34);
  background: rgba(3, 12, 10, .82);
  color: #9caea8;
  font: 600 var(--font-aux)/1.45 var(--mono);
  letter-spacing: .04em;
  pointer-events: none;
}

.world-map-panel .map-tooltip { z-index: 8; }
.world-map-panel .map-controls,
.world-map-panel .map-legend,
.world-map-panel .map-count,
.world-map-panel .map-label { z-index: 7; }

.world-map-panel.is-featured {
  min-height: 285px;
  aspect-ratio: 2.85 / 1;
}

.world-map-panel.is-featured .map-controls { top: clamp(40px, 3vw, 54px); }

@media (max-width: 767px) {
  .world-map-panel.is-featured {
    min-height: 280px;
    aspect-ratio: auto;
  }

  .world-map-panel.is-large {
    height: clamp(300px, 76vw, 380px);
    min-height: 300px;
  }

  .map-center-status {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 72px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .world-map-panel .map-count {
    top: auto;
    right: 8px;
    bottom: 8px;
  }

  .world-map-panel:not(.is-featured) .map-controls {
    top: 8px;
    left: 8px;
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-map-scene { transition: none; }
}

@media (max-width: 430px) {
  .world-map-panel .map-controls { display: none !important; }
}

/* PNG globe artwork: shared sidebar brand and TODAY system comment. */
.sidebar-brand-globe {
  display: block;
  width: clamp(118px, 7.6vw, 146px);
  max-width: 80%;
  height: auto;
  margin: 0 auto clamp(8px, .7vw, 13px);
  object-fit: contain;
}

.system-comment-globe {
  display: block;
  width: clamp(170px, 11.2vw, 220px);
  max-width: 100%;
  height: auto;
  margin: 8px auto 12px;
  object-fit: contain;
}

@media (max-width: 1366px) {
  .sidebar-brand-globe {
    width: clamp(104px, 8vw, 128px);
  }

  .system-comment-globe {
    width: clamp(150px, 12vw, 190px);
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .sidebar-brand-globe {
    max-width: 100%;
  }
}

@media (max-width: 1023px) {
  .sidebar-brand-globe {
    width: min(118px, 76%);
  }

  .system-comment-globe {
    width: min(190px, 70vw);
  }
}

@media (max-width: 430px) {
  .sidebar-brand-globe {
    width: min(112px, 74%);
  }

  .system-comment-globe {
    width: min(180px, 70vw);
  }
}

/* TODAY final tuning: readable report cards and map/card selection linkage. */
.primary-bug-panel,
.latest-report-card {
  scroll-margin-block: 14px;
}

.primary-bug-panel.is-selected,
.latest-report-card.is-selected {
  border-color: rgba(244, 181, 43, .95);
  background: linear-gradient(135deg, rgba(244, 181, 43, .075), rgba(4, 12, 10, .96) 58%);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 43, .16), 0 0 18px rgba(244, 181, 43, .09);
}

.primary-bug-panel:focus-visible,
.latest-report-card:focus-visible {
  outline: 3px solid #f4c750;
  outline-offset: 3px;
}

.primary-bug-summary,
.primary-comparison-item {
  padding: clamp(16px, 1.05vw, 22px);
}

.primary-bug-summary > p {
  font-size: clamp(15px, .82vw, 17px);
  line-height: 1.72;
  -webkit-line-clamp: 4;
}

.primary-comparison-item p,
.primary-comparison-item.mismatch p {
  font-size: clamp(15px, .82vw, 17px);
  line-height: 1.72;
  -webkit-line-clamp: 5;
}

.latest-report-card {
  position: relative;
  min-height: 238px;
  cursor: pointer;
}

.latest-report-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: inherit;
  padding: clamp(12px, .72vw, 15px);
  color: inherit;
  text-decoration: none;
}

.latest-report-card:is(:hover, :focus-visible) {
  border-color: var(--amber);
  background-color: rgba(244, 181, 43, .045);
}

.latest-report-card h3 {
  min-height: calc(2em * 1.32);
  font-size: clamp(16px, 1vw, 20px);
}

.latest-category {
  font-size: clamp(12px, .68vw, 14px);
  line-height: 1.55;
}

.latest-report-card dl {
  margin-bottom: 0;
}

.latest-report-card dt,
.latest-report-top,
.latest-time {
  font-size: clamp(11px, .58vw, 12px);
}

.latest-report-card dd {
  font-size: clamp(12px, .68vw, 14px);
}

.latest-mismatch {
  display: -webkit-box;
  min-height: calc(3em * 1.62);
  margin-bottom: 8px;
  overflow: hidden;
  font-size: clamp(13px, .74vw, 15px);
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.latest-mismatch span {
  font-size: clamp(11px, .58vw, 12px);
}

.latest-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid rgba(110, 120, 114, .22);
}

.latest-time { margin-right: auto; padding: 0; }

.selection-indicator {
  display: none;
  color: var(--amber);
  font: 700 clamp(11px, .58vw, 12px)/1.4 var(--mono);
  letter-spacing: .06em;
}

.latest-report-card.is-selected .selection-indicator { display: inline; }

.latest-detail-link {
  min-height: 40px;
  padding: 9px 3px 8px 9px;
  color: #f4c750;
  font: 700 clamp(12px, .68vw, 14px)/1.4 var(--mono);
  text-decoration: none;
}

.map-marker.is-selected::before {
  position: absolute;
  inset: -8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: .9;
  pointer-events: none;
}

.map-marker[aria-pressed="true"] {
  box-shadow: 0 0 0 3px rgba(3, 12, 10, .82), 0 0 0 6px rgba(244, 199, 80, .3), 0 0 22px currentColor;
}

.map-center-status,
.world-map-panel .map-count,
.world-map-panel .map-label,
.world-map-panel .map-legend {
  font-size: clamp(12px, .65vw, 14px);
}

.world-map-panel .map-control {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.system-comment-globe {
  width: clamp(190px, 12.5vw, 246px);
}

.supervisor p {
  font-size: clamp(15px, .8vw, 16px);
  line-height: 1.82;
}

.supervisor .supervisor-uncertainty {
  margin-top: 10px;
  color: #929b95;
  font-size: clamp(12px, .68vw, 14px);
  line-height: 1.65;
}

.supervisor cite {
  display: block;
  margin-top: 10px;
}

.os-meta { color: #aeb7b1; }
.nav-copy small { color: #929b95; }
.nav-link.active .nav-copy small { color: #c8b98f; }

.footer {
  color: #aab2ac;
  font-size: clamp(13px, .7vw, 15px);
  line-height: 1.7;
}

.footer-brand { flex-wrap: wrap; }
.footer .world-delta { color: #e5c86d; }

@media (min-width: 1600px) {
  .latest-reports-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1100px) and (max-width: 1599px) {
  .latest-reports-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .latest-reports-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1366px) {
  .system-comment-globe { width: clamp(168px, 13.4vw, 212px); }
}

@media (max-width: 1023px) {
  .system-comment-globe { width: min(212px, 70vw); }
}

@media (max-width: 767px) {
  .latest-reports-grid { grid-template-columns: minmax(0, 1fr); }
  .latest-report-card { min-height: 0; }
  .primary-bug-summary > p { -webkit-line-clamp: 4; }
  .primary-comparison-item p,
  .primary-comparison-item.mismatch p { -webkit-line-clamp: 5; }
  .latest-mismatch { -webkit-line-clamp: 3; }
  .footer-brand { flex-direction: row; justify-content: center; }
}

@media (max-width: 430px) {
  .world-map-panel .map-controls {
    display: grid !important;
    gap: 4px;
  }
  .system-comment-globe { width: min(200px, 70vw); }
}

@media (prefers-reduced-motion: reduce) {
  .primary-bug-panel,
  .latest-report-card,
  .map-marker { scroll-behavior: auto; transition: none; }
  .map-marker::after { transition: none; }
}

/* Version 1.3 all-page finishing pass. */
body {
  display: flex;
  flex-direction: column;
}

.app-shell {
  flex: 1 0 auto;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#page-content {
  flex: 1 0 auto;
}

.footer {
  flex: 0 0 auto;
  margin-top: auto;
}

.sidebar-brand-globe {
  filter: brightness(1.22) drop-shadow(0 0 5px rgba(240, 178, 42, .2));
}

.system-comment-globe {
  filter: brightness(1.12);
}

.right-rail {
  position: sticky;
  top: 12px;
  align-self: start;
  height: auto;
  max-height: none;
  overflow: visible;
}

.page-header p {
  font-size: clamp(14px, .8vw, 17px);
  line-height: 1.7;
}

.page-title {
  text-wrap: balance;
}

.empty-state {
  min-height: 180px;
  padding: 38px 24px;
  color: #cbd2cc;
  font-size: var(--font-body);
  line-height: 1.7;
}

.empty-inline {
  margin: 8px 0 0;
  color: #aeb7b1;
  font-size: var(--font-body);
  line-height: 1.7;
}

.bug-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(10px, .72vw, 15px);
}

.bug-card {
  height: 100%;
}

.bug-card-link {
  height: 100%;
  padding: clamp(14px, .85vw, 18px);
}

.bug-card h2,
.bug-card h3,
.card-category strong {
  font-size: clamp(16px, .95vw, 20px);
  line-height: 1.4;
}

.bug-card-title {
  display: -webkit-box;
  margin: 8px 0;
  overflow: hidden;
  color: #f0f3ef;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bug-card .kv-row,
.bug-card .copy-block p,
.bug-card .system-comment {
  font-size: clamp(13px, .68vw, 15px);
}

.bug-card .copy-block p {
  display: -webkit-box;
  overflow: hidden;
  color: #cdd3ce;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bug-card .system-comment {
  padding: 11px 12px;
  line-height: 1.65;
}

/* MAP compact result cards. */
.map-report-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: clamp(14px, .85vw, 18px);
  border: 1px solid rgba(113, 85, 25, .64);
  border-top: 2px solid var(--amber);
  border-radius: 4px;
  background: #080e0d;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.map-report-card.severity-critical { border-top-color: var(--red); }
.map-report-card.severity-high { border-top-color: var(--orange); }
.map-report-card.severity-low { border-top-color: #aab0ac; }

.map-report-card:is(:hover, :focus-visible, .is-selected) {
  border-color: var(--amber);
  outline: none;
  background: linear-gradient(135deg, rgba(244, 181, 43, .075), #080e0d 58%);
}

.map-report-card:focus-visible {
  outline: 3px solid #f4c750;
  outline-offset: 3px;
}

.map-card-head,
.map-card-meta,
.map-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.map-card-head {
  color: #aeb7b1;
  font-size: var(--font-aux);
}

.map-report-card h3 {
  display: -webkit-box;
  margin: 10px 0 7px;
  overflow: hidden;
  color: #f0f3ef;
  font-size: clamp(16px, .95vw, 20px);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.map-card-category {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0 0 8px;
  color: var(--amber);
  font-size: clamp(12px, .65vw, 14px);
  line-height: 1.55;
}

.map-card-category .inline-icon { width: 17px; height: 17px; }

.map-card-meta {
  margin: 0 0 9px;
  padding: 8px 0;
  border-block: 1px solid var(--line-soft);
}

.map-card-meta > div { display: flex; gap: 7px; min-width: 0; }
.map-card-meta dt { color: #8f9892; font-size: var(--font-aux); }
.map-card-meta dd { margin: 0; overflow: hidden; color: #d7dcd7; font-size: var(--font-label); text-overflow: ellipsis; white-space: nowrap; }

.map-card-copy {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 8px;
  margin-top: 7px;
  padding-left: 9px;
  border-left: 2px solid var(--line);
}

.map-card-copy > span,
.map-card-comment > span {
  color: #9aa39d;
  font-size: var(--font-aux);
}

.map-card-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #d7ddd8;
  font-size: clamp(13px, .68vw, 15px);
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.map-card-copy.expected-copy { border-left-color: var(--blue); }
.map-card-copy.observed-copy { border-left-color: var(--green); }
.map-card-copy.mismatch-copy { border-left-color: var(--amber); }
.map-card-copy.mismatch-copy p { color: #d7ddd8; }

.map-card-comment {
  display: -webkit-box;
  margin: 10px 0 0;
  padding: 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(113, 85, 25, .48);
  color: #d5dbd6;
  font-size: clamp(13px, .68vw, 15px);
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.map-card-comment > span { margin-right: 7px; color: var(--amber); }

.map-card-actions {
  min-height: 44px;
  margin-top: auto;
  padding-top: 9px;
}

.map-report-card.is-selected .selection-indicator { display: inline; }

/* Category registry readability. */
.category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(12px, .8vw, 16px);
}

.category-button {
  height: 100%;
  min-height: 0;
  padding: clamp(18px, 1.05vw, 22px);
}

.category-button h2 {
  margin: 9px 0 7px;
  font-size: clamp(17px, 1vw, 20px);
  line-height: 1.45;
}

.category-button > p:not(.category-reason) {
  display: -webkit-box;
  overflow: hidden;
  color: #c7cec8;
  font-size: clamp(14px, .75vw, 16px);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.category-registry-meta {
  font-size: var(--font-label);
  line-height: 1.55;
}

.category-button .category-reason {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(13px, .68vw, 15px);
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Archive details. */
.calendar-day,
.calendar-label { font-size: clamp(12px, .65vw, 14px); }

button.calendar-day::after {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 7px rgba(244, 181, 43, .45);
}

button.calendar-day.active {
  box-shadow: inset 0 0 0 1px var(--amber);
  font-weight: 700;
}

.calendar-toolbar .terminal-button { min-height: 44px; font-size: var(--font-label); }
.archive-day { grid-template-columns: minmax(0, 1fr) minmax(4em, auto); }
.archive-day > span:last-child { min-width: 4em; color: #e0e5e0; text-align: right; }
.severity-bar { min-width: 120px; height: 7px; }

/* Detail, information and short-page balance. */
.source-entry {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--line);
}

.source-entry > div { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; }
.source-entry > div b { color: var(--amber); }
.source-entry > div span { color: var(--green); font-size: var(--font-label); }
.source-entry p { margin: 7px 0; font-size: var(--font-body); line-height: 1.65; }
.source-entry dl { margin: 0; }
.source-entry dl > div { display: flex; gap: 8px; }
.source-entry dt { color: #929b95; font-size: var(--font-label); }
.source-entry dd { margin: 0; color: #cbd2cc; font-size: var(--font-label); }
.source-entry .source-link { min-height: 44px; margin-top: 8px; color: var(--amber); }
.source-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: flex-start !important;
}
.source-entry .source-link.is-primary { color: var(--amber); font-weight: 700; }
.source-entry .source-link.is-secondary { color: #aeb7b1; }
.source-entry .source-related-note {
  margin: 7px 0 0;
  color: #929b95;
  font-size: var(--font-label);
  line-height: 1.65;
}

.info-layout { grid-auto-rows: 1fr; }
.info-section { height: 100%; }
.info-section p { line-height: 2; }
.info-section .definition-grid > div { padding: 14px; }
.corrections-layout { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

.resolved-results[data-count="1"],
.resolved-results[data-count="2"] {
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  justify-content: start;
}

@media (max-width: 1399px) {
  .category-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .category-selection-header,
  .category-report-card {
    padding: 16px;
  }

  .category-report-meta {
    display: grid;
    gap: 5px;
  }

  .category-report-link {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .bug-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1099px) {
  .right-rail {
    position: static;
    top: auto;
    align-self: stretch;
    height: auto;
    overflow: visible;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .app-shell.layout--with-sidebar,
  .world-bug-report-shell.layout--with-sidebar {
    display: block;
  }

  .layout--with-sidebar .sidebar {
    position: fixed;
    top: 0;
    left: min(-38vw, -270px);
    z-index: 30;
    width: clamp(270px, 38vw, 330px);
    height: 100dvh;
    transition: left .2s ease;
    box-shadow: 12px 0 45px rgba(0, 0, 0, .72);
  }

  .layout--with-sidebar .sidebar.open { left: 0; }
  .layout--with-sidebar .drawer-close,
  .layout--with-sidebar .mobile-menu { display: block; }

  .layout--with-sidebar .drawer-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, .68);
  }

  .layout--with-sidebar .main { width: 100%; }
  .layout--with-sidebar .right-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 767px) {
  .bug-grid,
  .resolved-results[data-count="1"],
  .resolved-results[data-count="2"],
  .corrections-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .map-card-copy { grid-template-columns: 1fr; gap: 3px; }
  .page-title { max-width: 100%; font-size: clamp(28px, 9vw, 42px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-report-card,
  .category-button { transition: none; }
}

@media (max-width: 767px) {
  .main {
    padding-top: 0;
  }

  .topbar {
    padding: calc(68px + var(--safe-area-top)) max(clamp(4px, .35vw, 7px), var(--safe-area-right)) 0 max(clamp(4px, .35vw, 7px), var(--safe-area-left));
  }

  .mobile-menu:focus-visible {
    outline: none;
  }

  .drawer-close {
    display: none;
  }
}

@media (max-width: 720px) {
  .wbr-mobile-burger {
    width: 2.7rem;
    height: 2.7rem;
  }

  .wbr-burger-icon {
    width: 2.08rem;
    height: 2.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wbr-burger-icon,
  .wbr-burger-bun-top,
  .wbr-burger-bun-bottom,
  .wbr-burger-sesame,
  .wbr-burger-cheese,
  .wbr-burger-patty,
  .wbr-mobile-burger {
    animation: none;
    transition: none;
  }
}

/* X share control for the report detail page. */
.x-share-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #80631f;
  border-radius: 2px;
  background: #080b0a;
  color: #f4c750;
  font: 700 var(--font-label)/1.2 var(--mono);
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.x-share-mark {
  color: var(--amber);
  font-weight: 800;
}

.x-share-button:hover {
  border-color: var(--amber);
  background: rgba(244, 181, 43, .1);
  box-shadow: 0 0 16px rgba(244, 181, 43, .12);
}

.x-share-button:active {
  background: rgba(244, 181, 43, .16);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 43, .22);
}

.x-share-button:focus-visible {
  outline: 2px solid #ffe18b;
  outline-offset: 3px;
}

.detail-lead {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.detail-lead-copy { min-width: 0; }
.detail-lead > .x-share-button { flex: 0 0 auto; }

.share-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border: 1px solid #8c6b20;
  background: rgba(7, 11, 9, .97);
  color: #f0e4bd;
  font-size: var(--font-body);
  line-height: 1.65;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .52), 0 0 20px rgba(244, 181, 43, .08);
  transition: opacity .18s ease, transform .18s ease;
}

.share-notice.is-visible { opacity: 1; transform: translateY(0); }
.share-notice.is-error { border-color: #b44b38; color: #ffd3c9; }

.share-manual-fallback {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .78);
}

.share-manual-panel {
  width: min(620px, 100%);
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #8c6b20;
  background: #080c0a;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .72), 0 0 26px rgba(244, 181, 43, .1);
}

.share-manual-panel h2 {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: var(--font-heading);
}

.share-manual-panel p { margin: 0 0 12px; line-height: 1.75; }

.share-manual-text {
  display: block;
  width: 100%;
  min-height: 260px;
  margin-bottom: 14px;
  padding: 12px;
  resize: vertical;
  border: 1px solid rgba(244, 181, 43, .5);
  background: #020504;
  color: var(--text);
  font: 500 var(--font-body)/1.65 var(--mono);
}

.share-manual-text:focus-visible {
  outline: 2px solid #ffe18b;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .detail-lead {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-lead > .x-share-button { width: 100%; }
  .share-notice { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .share-manual-fallback { padding: 10px; }
  .share-manual-text { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .x-share-button,
  .share-notice { transition: none; }
}

/* Reader-first article flow. Existing colors and components remain intact. */
.reader-intro {
  width: 100%;
  max-width: none;
  margin: clamp(18px, 2.2vw, 30px) 0;
  padding: 0;
}

.reader-intro p {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #e2e7e2;
  font: clamp(17px, 1.05vw, 21px)/1.95 var(--sans);
  letter-spacing: .012em;
}

.reader-intro p,
.reader-mismatch-panel p,
.reader-facts .content-panel p,
.sources-reader-first {
  overflow-wrap: normal;
  line-break: strict;
  word-break: normal;
  text-wrap: pretty;
}

@supports (word-break: auto-phrase) {
  .reader-intro p,
  .reader-mismatch-panel p,
  .reader-facts .content-panel p,
  .sources-reader-first {
    word-break: auto-phrase;
  }
}

.reader-facts .content-panel p,
.sources-reader-first .source-entry > p {
  overflow-wrap: break-word;
}

.reader-story-flow {
  width: 100%;
  max-width: none;
  margin: 0 0 18px;
}

.reader-mismatch-panel {
  padding: clamp(20px, 1.5vw, 28px);
  border-width: 1px 1px 1px 4px;
  box-shadow: inset 0 0 0 1px rgba(244, 181, 43, .08);
}

.reader-mismatch-panel h2 {
  color: #f4c750;
  font-size: clamp(16px, .9vw, 19px);
}

.reader-mismatch-panel p {
  color: #f1e5bd;
  font-size: clamp(17px, 1vw, 20px);
  line-height: 1.85;
}

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

.reader-facts .content-panel {
  height: 100%;
}

.sources-reader-first {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-top: clamp(22px, 2vw, 32px);
  margin-left: 0;
  border-color: #3e4944;
  background: rgba(8, 13, 11, .74);
}

.sources-reader-first > h2 {
  color: #b7c0ba;
}

.sources-reader-first .evidence-status,
.sources-reader-first .source-entry {
  color: #aeb7b1;
}

.reader-card-summary,
.latest-summary {
  display: -webkit-box;
  margin: 8px 0 12px;
  overflow: hidden;
  color: #d7ddd8;
  font: clamp(14px, .76vw, 16px)/1.75 var(--sans);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.reader-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: #99a29c;
  font-size: var(--font-label);
}

.reader-card-meta span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.reader-card-meta .inline-icon {
  width: 15px;
  height: 15px;
}

.latest-summary {
  -webkit-line-clamp: 3;
}

.latest-category span {
  color: #99a29c;
}

@media (max-width: 767px) {
  .detail-lead {
    padding: 16px 14px;
  }

  .detail-lead .page-title {
    font-size: clamp(26px, 8.3vw, 38px);
    line-height: 1.34;
  }

  .reader-intro {
    margin: 18px 0 20px;
    padding: 0 4px;
  }

  .reader-intro p {
    font-size: 17px;
    line-height: 1.9;
  }

  .reader-story-flow {
    margin-bottom: 14px;
  }

  .sources-reader-first {
    margin-top: 18px;
  }

  .source-link-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .source-link-actions .source-link {
    width: fit-content;
    max-width: 100%;
  }

  .reader-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .reader-mismatch-panel {
    padding: 18px 16px;
  }

  .reader-mismatch-panel p {
    font-size: 16px;
    line-height: 1.8;
  }

  .detail-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .reader-card-summary,
  .latest-summary {
    -webkit-line-clamp: 4;
  }
}

/* Reader-facing globe artwork: preserve the supplied compositions. */
.sidebar-brand-globe {
  width: clamp(126px, 8vw, 154px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #000;
  filter: brightness(.96) drop-shadow(0 0 5px rgba(240, 178, 42, .18));
}

.system-comment-globe {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #000;
  filter: brightness(.96);
}

@media (max-width: 430px) {
  .sidebar-brand-globe {
    width: min(126px, 78%);
  }

  .system-comment-globe {
    width: 100%;
    max-width: 360px;
  }
}
.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-inline-start: 0.75rem;
  color: var(--text-muted, #9aa7a2);
  font-size: 0.72rem;
  white-space: nowrap;
}

.locale-switch button {
  min-height: 2rem;
  border: 1px solid transparent;
  padding: 0.35rem 0.55rem;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.locale-switch button[aria-pressed="true"] {
  color: var(--accent, #f0b51f);
  border-color: rgba(240, 181, 31, 0.65);
  background: rgba(240, 181, 31, 0.1);
}

.locale-switch button:not([aria-pressed="true"]):not(:disabled):hover {
  color: var(--text, #eef2ef);
  border-color: rgba(154, 167, 162, 0.45);
}

.locale-switch button:focus-visible {
  outline: 2px solid var(--accent, #f0b51f);
  outline-offset: 2px;
}

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

.mobile-header-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.mobile-header .locale-switch {
  margin-inline-start: 0;
}

.drawer-locale-switch {
  display: none;
}

.error-locale-switch {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .mobile-header .locale-switch {
    display: none;
  }

  .drawer-locale-switch {
    display: block;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .drawer-locale-switch .locale-switch {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
    margin: 0;
    font-size: 0.72rem;
  }

  .drawer-locale-switch .locale-switch button {
    min-height: 2.5rem;
    padding-inline: 0.5rem;
  }

  .mobile-header-title {
    max-width: calc(100% - 64px);
  }
}
