/* Sonic Dynasty · 音速新闻 — event-first broadsheet.
   Warm ivory paper, dark ink, serif headlines, one restrained colour per category, always
   paired with a shape and a Chinese label. */

:root {
  --paper: #f7f2e7;
  --paper-deep: #efe8d8;
  --paper-raised: #fbf8f1;
  --ink: #1b1a17;
  --ink-2: #4a463e;
  --ink-3: #5f5a50;
  --accent: #1a43c8;
  --accent-strong: #0f2f99;
  --focus: #2450d8;
  --rule: #d8cfbc;
  --control: #8a8172;

  /* Category tokens — every value is ≥ 5:1 on --paper and --paper-deep, so the same
     colour serves the shape mark, the label text, the card edge and the filter underline. */
  --cat-military-security: #a2291f;
  --cat-international-politics: #344a8c;
  --cat-finance: #855700;
  --cat-technology: #0b6670;
  --cat-society: #3c6420;
  --cat-culture-sports: #86306f;
  --cat-other: #645f56;

  --serif: "Iowan Old Style", "Charter", Georgia, "Noto Serif SC", "Noto Serif CJK SC",
    "Source Han Serif SC", "Songti SC", "STSong", "Microsoft YaHei", serif;
  --display: "Didot", "Bodoni 72", "Bodoni MT", "Iowan Old Style", Georgia, "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --sans-ja: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", YuGothic, "Noto Sans CJK JP", "Source Han Sans JP", Meiryo, sans-serif;
  --latin-serif: "Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-ui: 0.875rem;
  --fs-body: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-card: 1.1875rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --tap: 2.75rem;
  --wrap: 72rem;
  --narrow: 42rem;
  --nameplate-size: clamp(2.8rem, 8.4vw, 6rem);
  --overview: 52rem;
  --rail: 19rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}

[data-cat="military-security"] { --cat: var(--cat-military-security); }
[data-cat="international-politics"] { --cat: var(--cat-international-politics); }
[data-cat="finance"] { --cat: var(--cat-finance); }
[data-cat="technology"] { --cat: var(--cat-technology); }
[data-cat="society"] { --cat: var(--cat-society); }
[data-cat="culture-sports"] { --cat: var(--cat-culture-sports); }
[data-cat="other"] { --cat: var(--cat-other); }

/* ---------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(26, 67, 200, 0.18);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

button {
  font: inherit;
}

h1:focus,
h2:focus,
.site-main:focus {
  outline: none;
}

mark {
  padding: 0 0.05em;
  background: rgba(133, 87, 0, 0.18);
  color: inherit;
  border-radius: 1px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--paper);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: calc(var(--narrow) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-overview {
  max-width: calc(var(--overview) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- shared type */

/* A date never breaks inside (no lone 日 on a new line); the groups around it still wrap. */
time,
.date,
.counts,
.edition-date {
  white-space: nowrap;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
  margin: 0 0 0.55rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.kicker-flag {
  padding-right: 0.6rem;
  border-right: 1px solid var(--rule);
  color: var(--ink);
  letter-spacing: 0.2em;
}

.kicker-region {
  font-weight: 400;
  color: var(--ink-3);
}

/* Category tag: coloured shape + coloured Chinese label. Never colour alone. */
.cat {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  color: var(--cat, var(--ink-2));
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cat-mark {
  flex: none;
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  background: var(--cat, var(--ink-3));
}

.cat-mark[data-shape="diamond"] {
  transform: rotate(45deg) scale(0.86);
}

.cat-mark[data-shape="triangle"] {
  width: 0.7em;
  clip-path: polygon(50% 4%, 100% 100%, 0 100%);
}

.cat-mark[data-shape="circle"] {
  border-radius: 50%;
}

.cat-mark[data-shape="ring"] {
  background: transparent;
  border: 2px solid var(--cat, var(--ink-3));
  border-radius: 50%;
}

.cat-mark[data-shape="square-outline"] {
  background: transparent;
  border: 2px solid var(--cat, var(--ink-3));
}

.cat-mark[data-shape="dash"] {
  width: 0.72em;
  height: 0.2em;
}

.badge {
  display: inline-block;
  padding: 0 0.45em;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  white-space: nowrap;
}

.badge-multi {
  color: var(--ink);
  border-color: var(--ink);
}

.meta {
  margin: 0.6rem 0 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-3);
}

.sep {
  margin: 0 0.45em;
}

.counts {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.text-link:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: var(--tap);
  padding: 0.55rem 1.25rem;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

.button-text {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.5rem 0.1rem;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.button-text:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 1.25rem;
  padding-top: 0.75rem;
  border-top: 3px solid var(--ink);
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.section-note {
  margin: 0;
  font-size: var(--fs-ui);
  color: var(--ink-3);
}

.mini-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.mini-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------------------------------------------------------------- masthead */

.masthead-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

.masthead-strip p {
  margin: 0;
}

.strip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
}

.strip-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}

.strip-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.nameplate-wrap {
  padding-block: clamp(1.25rem, 3.5vw, 2.25rem) clamp(0.9rem, 2.5vw, 1.5rem);
  border-bottom: 3px solid var(--ink);
  text-align: center;
}

.nameplate {
  margin: 0;
  font-family: var(--display);
  font-size: var(--nameplate-size);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.nameplate-link {
  text-decoration: none;
}

.nameplate-link:hover {
  color: var(--ink);
}

.edition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "date count";
  align-items: center;
  gap: 0.25rem 1rem;
  margin: 3px 0 0;
  padding-block: 0.5rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.edition-date {
  grid-area: date;
}

.edition-count {
  grid-area: count;
  text-align: right;
}

.edition-updated {
  margin: 0.4rem 0;
  color: var(--ink-2);
  font-size: var(--fs-sm);
}

.sections {
  border-bottom: 1px solid var(--rule);
}

.sections-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sections-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: var(--tap);
  padding: 0.35rem 0.1rem;
  font-size: var(--fs-body);
  line-height: 1.5;
  text-decoration: none;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 transparent;
}

.sections-list a:hover {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--rule);
}

.sections-list a[aria-current] {
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--cat, var(--ink));
}

.sections-list .cat-mark {
  width: 0.5em;
  height: 0.5em;
}

.page-event .nameplate,
.page-notfound .nameplate {
  font-size: clamp(2rem, 7.6vw, 3.25rem);
}

.page-event .nameplate-wrap,
.page-notfound .nameplate-wrap {
  padding-block: 1rem 0.75rem;
}

/* A report keeps its own metadata; edition and browsing navigation belong to the index. */
.page-reader .masthead .edition,
.page-reader .masthead .sections,
.page-reader .crumbs {
  display: none;
}

/* ---------------------------------------------------------------- front page */

.front {
  padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(2rem, 5vw, 3.5rem);
}

.front-grid {
  display: grid;
  gap: 2.25rem;
}

.lead-title {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lead-title a,
.brief-title a,
.lead-report-title,
.mr-title {
  text-decoration: none;
}

.lead-title a:hover,
.brief-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.excerpt-label {
  margin: 0 0 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.lead-excerpt p:not(.excerpt-label) {
  max-width: 40em;
  margin: 0 0 0.7rem;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-2);
}

.lead .meta {
  margin-top: 0.25rem;
}

.lead-reports-block {
  margin-top: 1.5rem;
}

.lead-reports {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lead-reports li {
  border-bottom: 1px solid var(--rule);
}

.lead-reports a {
  display: grid;
  gap: 0.1rem 1.25rem;
  min-height: var(--tap);
  padding-block: 0.7rem;
}

.lead-report-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.lead-report-title {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
}

.lead-reports a:hover .lead-report-title {
  color: var(--accent);
  text-decoration: underline;
}

.lead-more {
  margin: 1.5rem 0 0;
}

.briefs-title {
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

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

.brief {
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.brief:last-child {
  border-bottom: 0;
}

.brief .kicker {
  margin-bottom: 0.35rem;
}

.brief-title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-card);
  font-weight: 700;
  line-height: 1.42;
}

.brief-sources {
  margin: 0.4rem 0 0;
  font-size: var(--fs-ui);
  color: var(--ink-2);
}

.brief .meta {
  margin-top: 0.15rem;
}

/* ---------------------------------------------------------------- index (browse by category) */

.index {
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  scroll-margin-top: 1rem;
}

.toolbar {
  display: grid;
  gap: 0.5rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--ink);
}

.search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.search-label {
  flex: none;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--ink-2);
}

.search-input {
  flex: 1;
  min-width: 0;
  min-height: var(--tap);
  padding: 0.6rem 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus,
.search-input:focus-visible {
  outline: none;
}

.search-input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  flex: none;
  min-height: var(--tap);
  padding: 0.4rem 0.2rem;
  font-size: var(--fs-ui);
  color: var(--ink-2);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.search-clear:hover {
  color: var(--accent);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: var(--tap);
  padding: 0.5rem 0.1rem;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink-2);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 transparent;
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.chip .cat-mark {
  width: 0.5em;
  height: 0.5em;
}

.chip:hover {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--rule);
}

.chip[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--cat, var(--ink));
}

.chip-count {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  margin: 0.25rem 0 0.75rem;
  padding-block: 0.15rem;
  border-top: 1px solid var(--rule);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--tap);
  font-size: var(--fs-body);
  color: var(--ink);
  cursor: pointer;
}

.toggle input {
  flex: none;
  display: inline-grid;
  place-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  background: transparent;
  border: 1.5px solid var(--ink-2);
  border-radius: 2px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.toggle input::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  background: var(--paper);
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 39% 70%);
  transform: scale(0);
}

.toggle input:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.toggle input:checked::before {
  transform: scale(1);
}

.toggle input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.list-status {
  flex: 1 1 14rem;
  margin: 0;
  padding-block: 0.6rem;
  font-size: var(--fs-ui);
  color: var(--ink-3);
}

.cat-section {
  margin-top: 2rem;
}

.cat-section:first-child {
  margin-top: 0.75rem;
}

.cat-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--ink);
}

.cat-head::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 3rem;
  height: 3px;
  background: var(--cat);
}

.cat-head-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.cat-head-title .cat-mark {
  width: 0.5em;
  height: 0.5em;
}

.cat-head-count {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.event-grid {
  display: grid;
  gap: 0 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-grid > li {
  padding-block: 1rem 1.15rem;
  border-bottom: 1px solid var(--rule);
}

.event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid var(--cat);
}

.event-card .kicker {
  margin-bottom: 0.3rem;
}

.card-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: var(--fs-card);
  font-weight: 700;
  line-height: 1.42;
}

.card-link {
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-link:focus-visible {
  outline: none;
}

.card-link:focus-visible::after {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.event-card:hover .card-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.card-sources {
  margin: 0;
  font-size: var(--fs-ui);
  line-height: 1.55;
  color: var(--ink-2);
}

.src-more {
  color: var(--ink-3);
}

.card-meta {
  margin: 0.15rem 0 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-3);
}

.card-match {
  margin: 0.45rem 0 0;
  padding-left: 0.6rem;
  border-left: 1px solid var(--rule);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-2);
}

.card-cta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--accent);
}

.event-card:hover .card-cta {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.empty-state {
  padding-block: 2.25rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.empty-title {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
}

.empty-text {
  max-width: 36em;
  margin: 0 0 1.25rem;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- subscribe */

.subscribe {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  scroll-margin-top: 1rem;
}

.subscribe-body {
  display: grid;
  gap: 2rem;
}

.subscribe-lede {
  max-width: 36em;
  margin: 0 0 1rem;
  color: var(--ink-2);
  line-height: 1.75;
}

.feed-url {
  display: block;
  padding: 0.65rem 0.85rem;
  font-family: var(--mono);
  font-size: var(--fs-body);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.feed-url a {
  color: var(--ink);
}

.subscribe-note {
  max-width: 36em;
  margin: 1rem 0 0;
  font-size: var(--fs-ui);
  line-height: 1.7;
  color: var(--ink-3);
}

.subscribe-subtitle {
  margin: 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
}

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

.feed-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}

.feed-list a {
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-height: var(--tap);
  text-decoration: none;
}

.feed-list a:hover {
  text-decoration: underline;
}

.feed-count {
  font-size: var(--fs-sm);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- event pages */

.event-page {
  padding-block: 0.75rem clamp(2.5rem, 6vw, 4rem);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: var(--fs-ui);
  color: var(--ink-3);
}

.crumbs li {
  display: inline-flex;
  align-items: center;
}

.crumbs li + li::before {
  content: "›";
  margin: 0 0.55rem;
  color: var(--control);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.crumbs [aria-current] {
  color: var(--ink);
}

.event-head {
  position: relative;
  margin-bottom: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.event-head::before,
.reader-single .reader-head::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 3rem;
  height: 3px;
  background: var(--cat);
}

.event-title {
  margin: 0.15rem 0 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.event-meta {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--ink-3);
}

.event-note {
  max-width: 40em;
  margin: 0.75rem 0 0;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink-2);
}

.chooser-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.chooser-count {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--ink-3);
}

.source-group {
  display: grid;
  gap: 0 2rem;
  padding-top: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.source-name {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.45;
}

.source-reports-count {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--ink-3);
}

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

.report-choice {
  position: relative;
  padding: 0.6rem 0 1.1rem;
}

.report-choice + .report-choice {
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
}

.report-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
}

.report-flags:empty {
  display: none;
}

.report-title {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-size: var(--fs-card);
  font-weight: 700;
  line-height: 1.45;
}

.report-link {
  text-decoration: none;
}

.report-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.report-link:focus-visible {
  outline: none;
}

.report-link:focus-visible::after {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.report-choice:hover .report-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.report-excerpt {
  display: -webkit-box;
  max-width: 44em;
  margin: 0 0 0.4rem;
  overflow: hidden;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink-2);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.report-excerpt-label {
  margin-right: 0.5em;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.report-meta {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

.report-cta {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--accent);
}

.report-choice:hover .report-cta {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.back-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 2rem 0 0;
  font-size: var(--fs-ui);
}

.back-row a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink-2);
  text-decoration: none;
}

.back-row a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---- reading layout: rail (source/report chooser) + reading pane */

.event-layout {
  display: grid;
  gap: 1.75rem;
}

/* The category tab is a background (not a pseudo-element) so the desktop scroll container cannot clip it. */
.rail {
  position: relative;
  min-width: 0;
  background-image: linear-gradient(var(--cat), var(--cat));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 3rem 3px;
  border-top: 1px solid var(--ink);
}

.rail-head {
  padding-top: 0.85rem;
}

.rail-kicker {
  margin: 0 0 0.35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.rail-event {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
}

.rail-event a {
  text-decoration: none;
}

.rail-event a:hover {
  text-decoration: underline;
}

.rail-counts {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

.rail-now {
  margin: 0.6rem 0 0;
  font-size: var(--fs-ui);
  color: var(--ink-2);
}

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

.rail-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: var(--tap);
  margin-top: 0.6rem;
  padding: 0.5rem 0.85rem;
  font-size: var(--fs-body);
  font-weight: 600;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
}

.rail-toggle:hover {
  background: var(--paper-deep);
}

.rail-toggle-icon {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.15s ease;
}

.rail-toggle[aria-expanded="true"] .rail-toggle-icon {
  transform: translateY(25%) rotate(-135deg);
}

.rail-list {
  padding-bottom: 0.5rem;
}

.rail-group-name {
  margin: 0.9rem 0 0.2rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
}

.rail-group-count {
  font-weight: 400;
  color: var(--ink-3);
}

.rail-reports {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-link {
  display: block;
  min-height: var(--tap);
  padding: 0.5rem 0.7rem 0.55rem;
  font-family: var(--serif);
  font-size: 0.975rem;
  line-height: 1.5;
  text-decoration: none;
  border-left: 3px solid var(--rule);
}

.rail-link:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.rail-link:focus-visible {
  outline-offset: -2px;
}

.rail-link[aria-current="page"] {
  font-weight: 700;
  background: var(--paper-deep);
  border-left-color: var(--ink);
}

.rail-link-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
  font-family: var(--sans);
}

.rail-link-flags:empty {
  display: none;
}

.reading-badge {
  display: inline-block;
  padding: 0 0.45em;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: var(--ink);
  border-radius: 2px;
}

.reader {
  min-width: 0;
  max-width: var(--narrow);
}

.reader-single {
  max-width: none;
}

.reader-head {
  position: relative;
  margin-bottom: 1.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ink);
}

.reader-title {
  margin: 0.1rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.26;
  text-wrap: balance;
}

.reader-meta {
  margin: 0;
  font-size: var(--fs-ui);
  color: var(--ink-3);
}

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

.reader-original {
  margin: 1rem 0 0;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--ink);
}

.source-link {
  max-width: 100%;
  flex-wrap: wrap;
  text-align: left;
}

.source-host {
  font-weight: 400;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

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

.reading-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 2rem;
}

.reading-modes-label {
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--ink);
  border-radius: 2px;
}

.segmented button {
  position: relative;
  min-height: var(--tap);
  padding: 0.45rem 1rem;
  font-size: var(--fs-ui);
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.segmented button + button {
  border-left: 1px solid var(--ink);
}

.segmented button:hover {
  background: var(--paper-deep);
}

.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.segmented button:focus-visible {
  z-index: 1;
}

.single-note {
  margin: 0 0 2rem;
  padding: 0.7rem 0.9rem;
  font-size: var(--fs-ui);
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--paper-deep);
  border-left: 3px solid var(--rule);
}

.part + .part {
  margin-top: 3rem;
}

.part-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.25rem;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.part-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.prose {
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.85;
  color: var(--ink);
  overflow-wrap: break-word;
}

.prose p {
  margin: 0 0 1.15em;
}

.prose:lang(zh) p,
.prose:lang(ja) p {
  text-align: justify;
}

.prose h2,
.prose h3,
.prose h4,
.prose h5 {
  margin: 1.8em 0 0.6em;
  font-family: var(--serif);
  line-height: 1.4;
}

.prose h2 {
  font-size: 1.375rem;
}

.prose h3 {
  font-size: 1.25rem;
}

.prose h4,
.prose h5 {
  font-size: var(--fs-md);
}

.prose a {
  color: var(--accent);
}

.prose blockquote {
  margin: 1.25em 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--ink-2);
}

.prose em:lang(zh),
.prose em:lang(ja) {
  font-style: normal;
  font-weight: 600;
}

.prose:lang(en) {
  font-family: var(--latin-serif);
  font-size: 1.1875rem;
  line-height: 1.7;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.prose:lang(ja) {
  font-family: var(--sans-ja);
  line-height: 1.9;
}

.reader-foot {
  margin-top: 3rem;
}

.provenance {
  padding-top: 0.85rem;
  border-top: 3px solid var(--ink);
}

.provenance-title,
.more-title {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
}

.provenance-list {
  margin: 0;
}

.provenance-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-body);
}

.provenance-row dt {
  color: var(--ink-3);
}

.provenance-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.provenance-row a {
  color: var(--accent);
}

.permalink {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  -webkit-user-select: all;
  user-select: all;
}

.dim {
  color: var(--ink-3);
}

.more-reports {
  margin-top: 2.5rem;
  padding-top: 0.85rem;
  border-top: 3px solid var(--ink);
}

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

.more-list li {
  border-bottom: 1px solid var(--rule);
}

.more-list a {
  display: grid;
  gap: 0.1rem;
  min-height: var(--tap);
  padding-block: 0.75rem;
}

.mr-source {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.mr-title {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
}

.more-list a:hover .mr-title {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- states */

.state {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.state-loading {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink-2);
}

.state-title {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
}

.state-text {
  max-width: 36em;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin: 1.75rem 0 0;
}

.state-chooser {
  margin-top: 2.25rem;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding-bottom: 3rem;
  font-size: var(--fs-ui);
  color: var(--ink-2);
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 3px solid var(--ink);
}

.footer-nameplate {
  margin: 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.footer-sub {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: var(--fs-ui);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--accent);
}

.footer-about p {
  max-width: 40em;
  margin: 0 0 0.6rem;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 639px) {
  .masthead-strip {
    font-size: var(--fs-xs);
  }

  .edition {
    font-size: var(--fs-xs);
  }

  .sections-list {
    gap: 0 1rem;
  }

  .provenance-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .segmented {
    display: flex;
    width: 100%;
  }

  .segmented button {
    flex: 1 1 auto;
    padding-inline: 0.5rem;
  }
}

@media (min-width: 720px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-reports a {
    grid-template-columns: 9rem minmax(0, 1fr);
    align-items: baseline;
  }

  .source-group {
    grid-template-columns: 10rem minmax(0, 1fr);
  }

  .source-name {
    padding-top: 0.6rem;
  }

  .more-list a {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1.25rem;
    align-items: baseline;
  }

  .feed-list {
    columns: 2;
    column-gap: 2rem;
  }
}

@media (min-width: 960px) {
  .front-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0;
  }

  .lead {
    padding-right: 2.5rem;
    border-right: 1px solid var(--rule);
  }

  .briefs {
    padding-left: 2.5rem;
  }

  .toolbar {
    grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem 2.5rem;
  }

  .subscribe-body {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 3rem;
  }

  .feed-list {
    columns: 1;
  }

  .footer-inner {
    grid-template-columns: 13rem minmax(0, 1fr) auto;
    gap: 3rem;
  }
}

/* Mobile and tablet: the chooser sits above the article and collapses to one line. */
@media (max-width: 1023px) {
  .rail {
    padding: 0 0.95rem 0.95rem;
    border: 1px solid var(--rule);
    border-top: 1px solid var(--ink);
    background-color: var(--paper-raised);
  }

  .rail.is-collapsed .rail-list {
    display: none;
  }
}

@media (min-width: 1024px) {
  .event-layout.has-rail {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: 3rem;
  }

  .rail {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .rail-now,
  .rail-toggle {
    display: none;
  }
}

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

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


/* ---------------------------------------------------------------- browser appearance
   Classic retains the original tokens. Other styles vary palette, typography and card
   treatment without changing document order, data loading or the reading-mode controls. */
.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: var(--tap);
  color: var(--ink-2);
  font-family: var(--sans);
  font-weight: 600;
}
.theme-picker select {
  max-width: 12rem;
  min-height: var(--tap);
  padding: 0.4rem 1.6rem 0.4rem 0.6rem;
  font: inherit;
  color: var(--ink);
  background-color: var(--paper-raised);
  border: 1px solid var(--control);
  border-radius: 4px;
  cursor: pointer;
}
/* The shared media gallery already uses these tokens, including original captions. */
:root { --line: var(--rule); --muted: var(--ink-3); }
html[data-theme="modern"] {
  --paper: #f2f4f7; --paper-deep: #e5eaf0; --paper-raised: #ffffff;
  --ink: #172330; --ink-2: #3e4f60; --ink-3: #536575;
  --rule: #cbd4de; --control: #718194;
  --accent: #155bc3; --accent-strong: #104798; --focus: #155bc3;
  --serif: var(--sans); --display: var(--sans);
}
html[data-theme="night"] {
  --paper: #181d25; --paper-deep: #252d38; --paper-raised: #202833;
  --ink: #e9edf3; --ink-2: #c5cdd9; --ink-3: #aebaca;
  --rule: #475366; --control: #8190a6;
  --accent: #a6c7ff; --accent-strong: #c4daff; --focus: #a6c7ff;
  --cat-military-security: #ffa090; --cat-international-politics: #b8c4ff;
  --cat-finance: #f2cc77; --cat-technology: #88dce3;
  --cat-society: #b9dc91; --cat-culture-sports: #efb4df; --cat-other: #c3cbd6;
  color-scheme: dark;
}
html[data-theme="nasa"] {
  --paper: #101b29; --paper-deep: #233347; --paper-raised: #172637;
  --ink: #f0eee6; --ink-2: #ced7de; --ink-3: #b2c2cf;
  --rule: #52677c; --control: #8297aa;
  --accent: #ffb36b; --accent-strong: #ffd0a2; --focus: #ffb36b;
  --cat-military-security: #ffaaa0; --cat-international-politics: #b8caff;
  --cat-finance: #f2cf88; --cat-technology: #96dce3;
  --cat-society: #c0db94; --cat-culture-sports: #eab8dc; --cat-other: #c6cbd2;
  --display: var(--mono); --serif: var(--sans);
  color-scheme: dark;
}
html[data-theme="swiss"] {
  --paper: #f3eddf; --paper-deep: #e8dfcc; --paper-raised: #faf6eb;
  --ink: #24211c; --ink-2: #494138; --ink-3: #61574a;
  --accent: #b33824; --accent-strong: #8c2819; --focus: #b33824;
  --rule: #b3a58c; --control: #7b6d57;
  --display: var(--sans); --serif: var(--sans);
}
html[data-theme="nordic"] {
  --paper: #eef3f3; --paper-deep: #e1e9e9; --paper-raised: #fafcfc;
  --ink: #24383b; --ink-2: #3e5558; --ink-3: #536a6d;
  --accent: #2f626b; --accent-strong: #214851; --focus: #2f626b;
  --rule: #c5d4d5; --control: #74898d;
  --display: var(--sans); --serif: var(--sans);
}
html[data-theme="mechanical"] {
  --paper: #e4e5e0; --paper-deep: #d5d7ce; --paper-raised: #f3f3ec;
  --ink: #1c2420; --ink-2: #36433a; --ink-3: #505d52;
  --accent: #665000; --accent-strong: #493900; --focus: #665000;
  --rule: #939c90; --control: #596958;
  --display: var(--mono); --serif: var(--sans);
  --industrial-yellow: #efd359;
  --cat-finance: #795000; --cat-other: #59564d;
}
html[data-theme="warm"] {
  --paper: #fff6eb; --paper-deep: #f4e6d6; --paper-raised: #fffcf6;
  --ink: #493229; --ink-2: #654b40; --ink-3: #795e50;
  --accent: #9f3e30; --accent-strong: #7a2c23; --focus: #9f3e30;
  --rule: #dfc7b2; --control: #a17c62;
  --cat-military-security: #a03c30; --cat-international-politics: #4c5680;
  --cat-finance: #805622; --cat-technology: #366a68;
  --cat-society: #526e39; --cat-culture-sports: #8b4975; --cat-other: #706257;
}
:where(html[data-theme]:not([data-theme="classic"])) .event-grid {
  gap: 1rem;
}
:where(html[data-theme]:not([data-theme="classic"])) .event-grid > li {
  padding: 0;
  border-bottom: 0;
}
:where(html[data-theme]:not([data-theme="classic"])) .event-card {
  padding: 1.15rem 1.2rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--cat);
}
html[data-theme="modern"] .event-card {
  border-radius: 12px;
  box-shadow: 0 3px 12px rgb(23 35 48 / 4%);
}
html[data-theme="modern"] .nameplate { letter-spacing: -0.065em; font-weight: 750; }
html[data-theme="night"] .event-card { border-radius: 8px; }
html[data-theme="nasa"] body {
  background-image: linear-gradient(rgb(178 194 207 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(178 194 207 / 4%) 1px, transparent 1px);
  background-size: 32px 32px;
}
html[data-theme="nasa"] .nameplate-wrap {
  text-align: left;
  border-bottom-color: var(--accent);
}
html[data-theme="nasa"] .nameplate {
  letter-spacing: -0.055em;
  text-transform: uppercase;
}
html[data-theme="nasa"] .edition,
html[data-theme="nasa"] .card-meta,
html[data-theme="mechanical"] .edition,
html[data-theme="mechanical"] .card-meta { font-family: var(--mono); }
html[data-theme="nasa"] .event-card { border-radius: 2px 18px 2px 2px; }
html[data-theme="nasa"] .section-head { border-top-color: var(--accent); }
html[data-theme="swiss"] .nameplate-wrap { text-align: left; border-bottom-width: 6px; }
html[data-theme="swiss"] .nameplate {
  font-weight: 850;
  letter-spacing: -0.07em;
  color: var(--accent);
}
html[data-theme="swiss"] .sections-list { justify-content: flex-start; }
html[data-theme="swiss"] .event-card {
  border: 0;
  border-top: 4px solid var(--ink);
  padding: 1.15rem 0.5rem 1.2rem 0;
  background: transparent;
}
html[data-theme="swiss"] .card-title { font-weight: 800; font-size: 1.3rem; line-height: 1.35; }
html[data-theme="nordic"] .nameplate {
  font-weight: 450;
  letter-spacing: -0.045em;
}
html[data-theme="nordic"] .nameplate-wrap { padding-block: 2.25rem 2rem; border-bottom-width: 1px; }
html[data-theme="nordic"] .event-grid { gap: 1.5rem; }
html[data-theme="nordic"] .event-card { padding: 1.6rem 1.35rem; border-radius: 3px; border-left-width: 1px; }
html[data-theme="nordic"] .card-title { font-weight: 550; line-height: 1.55; }
html[data-theme="nordic"] .section-head { border-top-width: 1px; }
html[data-theme="mechanical"] .nameplate-wrap {
  text-align: left;
  border-top: 9px solid var(--industrial-yellow);
  border-bottom-width: 5px;
}
html[data-theme="mechanical"] .nameplate {
  font-weight: 800;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}
html[data-theme="mechanical"] .event-card {
  border: 1px solid var(--ink);
  border-left: 5px solid var(--industrial-yellow);
  box-shadow: 3px 3px 0 var(--rule);
}
html[data-theme="mechanical"] .card-title { font-weight: 800; }
html[data-theme="mechanical"] .theme-picker select { border-radius: 0; border-color: var(--ink); }
html[data-theme="warm"] .nameplate-wrap { border-bottom-color: var(--accent); }
html[data-theme="warm"] .nameplate { color: var(--accent); }
html[data-theme="warm"] .event-card {
  padding: 1.35rem;
  border-radius: 16px;
  border-left-width: 1px;
  box-shadow: 0 3px 14px rgb(112 64 36 / 4%);
}
html[data-theme="warm"] .section-head { border-top-color: var(--accent); }
@media (max-width: 440px) {
  .strip-links { gap: 0 0.85rem; }
  .theme-picker { gap: 0.35rem; }
  .theme-picker select { max-width: 10.5rem; }
}

@media print {
  html[data-theme] {
    --paper: #fff; --paper-raised: #fff; --paper-deep: #eee;
    --ink: #000; --ink-2: #333; --ink-3: #444; --accent: #222; --rule: #aaa;
  }
  .cat { color: var(--ink); }

  .skip-link,
  .masthead-strip,
  .sections,
  .toolbar,
  .list-controls,
  .subscribe,
  .reading-modes,
  .crumbs,
  .rail,
  .back-row,
  .more-reports,
  .footer-links {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .event-layout.has-rail {
    display: block;
  }

  .part[hidden] {
    display: block !important;
  }

  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* Sharing stays in the reader's flow; controls and dialog follow all eight themes. */
.reader-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin: 1.25rem 0; }
.reader-actions .reader-original { margin: 0; min-width: 0; }
.reader-share { display: none; align-items: center; gap: .35rem; }
.sd-sharing .reader-share { display: inline-flex; }
.share-open, .share-more { cursor: pointer; }
.share-open { gap: .45rem; }
.share-more { min-width: var(--tap); font-size: 1.25rem; letter-spacing: .08em; }
.sd-share-modal-open { overflow: hidden; }
.share-dialog {
  width: min(32rem, calc(100% - 2rem)); max-width: none;
  max-height: calc(100dvh - 2rem); overflow: auto; overscroll-behavior: contain;
  margin: auto; padding: 1.5rem; border: 1px solid var(--control); border-radius: .8rem;
  background: var(--paper-raised); color: var(--ink); font-family: var(--sans);
  box-shadow: 0 .75rem 3rem #0004;
}
.share-dialog::backdrop { background: #0008; }
.share-dialog .share-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.share-dialog h2 { margin: 0; font: 600 1.25rem/1.4 var(--sans); }
.share-dialog .share-close { min-height: var(--tap); padding: .5rem; white-space: nowrap; cursor: pointer; }
.share-title { margin: .75rem 0 1.25rem; color: var(--ink-2); font-size: .9375rem; line-height: 1.6; overflow-wrap: anywhere; }
.share-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.share-options .button { min-width: 0; min-height: var(--tap); justify-content: center; text-align: center; cursor: pointer; white-space: normal; }
.share-options [hidden], .share-wechat[hidden], .share-page-link[hidden] { display: none; }
.share-wechat { margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--rule); background: var(--paper); border-radius: .4rem; }
.share-hint { margin: 0; color: var(--ink-2); font-size: .875rem; line-height: 1.7; }
.share-qr:empty { display: none; }
.share-qr { display: flex; justify-content: center; margin-top: 1rem; }
.share-qr svg { display: block; width: 13rem; max-width: 100%; height: auto; background: #fff; }
.share-link-label { display: block; margin: 1.25rem 0 .5rem; color: var(--ink-2); font-size: .8125rem; }
.share-link { display: block; width: 100%; min-width: 0; min-height: var(--tap); padding: .6rem .75rem; border: 1px solid var(--control); border-radius: .25rem; background: var(--paper); color: var(--ink); font: .8125rem/1.5 var(--sans); }
.share-status { min-height: 1.5em; margin: .75rem 0 0; color: var(--ink-2); font-size: .875rem; }
@media (max-width: 480px) {
  .reader-actions { align-items: flex-start; }
  .reader-actions .source-host { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
  .share-dialog { padding: 1.1rem; width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
}
@media (max-width: 340px) { .share-options { grid-template-columns: 1fr; } }

.share-page-link { margin-top: .75rem; }
.reader-share { flex-wrap: wrap; max-width: 100%; }

/* Cover-first reader. Language columns depend on the reader's available width,
   including when an event's report chooser occupies the left side. */
.page-reader .wrap-narrow { max-width: calc(70rem + 2 * var(--gutter)); }
.reader {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  container: reader / inline-size;
}
.reader .reader-head,
.reader .reader-foot,
.reader .reading-modes,
.reader .newsmedia-copy,
.reader .newsmedia-gallery {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
}
.reader > .newsmedia-layout,
.reader > .newsmedia-layout.newsmedia-has-images {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.reader .reader-original { border-bottom: 0; padding-bottom: 0; }
.reader .reader-actions { margin: 1rem 0 1.5rem; }
.reader .source-link,
.reader .share-open { padding: .4rem .7rem; font-size: var(--fs-sm); }
.reader .reading-modes { order: 1; margin-top: .25rem; margin-bottom: 1.75rem; }
.reader .newsmedia-copy { order: 2; min-width: 0; }
.reader .newsmedia-gallery[data-news-media-layout="hero"] {
  order: 0;
  margin-top: 0;
  margin-bottom: 1.75rem;
}
.reader .newsmedia-gallery[data-news-media-layout="hero"] > .newsmedia-title { display: none; }
.reader .newsmedia-more { order: 0; margin-top: 2rem; }
.reader .newsmedia-gallery figure { margin: 0 0 1.5rem; }
.reader .newsmedia-gallery img {
  width: 100%;
  max-height: 32rem;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.reader .newsmedia-gallery figcaption { color: var(--ink-3); font-family: var(--sans); }
.reader .newsmedia-gallery summary { width: fit-content; cursor: pointer; padding: .35rem 0; }
.reader .newsmedia-gallery figcaption p { margin: .5rem 0 0; }
.reader .newsmedia-gallery summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.reader .part + .part { margin-top: 2.5rem; }
.reader .prose { line-height: 1.85; }
.reader .prose p { margin-bottom: 1em; }
@container reader (min-width: 52rem) {
  .reader [data-parts][data-reading-mode="both"]:has(> [data-part="zh"]):has(> [data-part="orig"]) {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
  .reader [data-parts][data-reading-mode="both"] > .part + .part { margin-top: 0; }
}
@media (max-width: 639px) {
  .reader .reading-modes { gap: .5rem; margin-bottom: 1.4rem; }
  .reader .reading-modes-label { display: none; }
  .reader .newsmedia-gallery img { max-height: 26rem; }
}
@media print {
  .reader .newsmedia-gallery details:not([open]) > p { display: block; }
  .reader .newsmedia-gallery summary { display: none; }
}
.share-xhs { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.share-xhs h3 { margin: 0 0 .5rem; font: 600 1.1rem/1.5 var(--sans); }
.share-image { display: block; width: 100%; height: auto; margin: 1rem 0; border: 1px solid var(--rule); }
.share-xhs[hidden], .share-image[hidden] { display: none; }
.share-image-actions { margin: .75rem 0; }
.share-caption { display: block; width: 100%; resize: vertical; min-height: 8rem; margin-bottom: .75rem; padding: .75rem; border: 1px solid var(--control); border-radius: .25rem; background: var(--paper); color: var(--ink); font: .875rem/1.6 var(--sans); }
.share-dialog button:disabled { opacity: .55; cursor: wait; }

/* A failed image removes its link, restoring the existing full-width text layout. */
.event-card:has(> .list-thumbnail), .report-choice:has(> .list-thumbnail) {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 14px;
  align-content: start;
}
.event-card:has(> .list-thumbnail) > *, .report-choice:has(> .list-thumbnail) > * { grid-column: 1; min-width: 0; }
.event-card > .list-thumbnail, .report-choice > .list-thumbnail {
  grid-column: 2; grid-row: 1 / span 8; align-self: start; position: relative; z-index: 1;
  display: block; width: 96px; height: 96px; border-radius: 7px; overflow: hidden; background: var(--rule);
}
.list-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-title, .report-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.report-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  .event-card:has(> .list-thumbnail), .report-choice:has(> .list-thumbnail) { grid-template-columns: minmax(0, 1fr) 80px; column-gap: 12px; }
  .event-card > .list-thumbnail, .report-choice > .list-thumbnail { width: 80px; height: 80px; }
}
@media (max-width: 22em) {
  .event-card:has(> .list-thumbnail), .report-choice:has(> .list-thumbnail) { display: flex; flex-direction: column; }
  .event-card > .list-thumbnail, .report-choice > .list-thumbnail { display: none; }
}
.rail-link:has(> .list-thumbnail), .more-list a:has(> .list-thumbnail) {
  display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 6px 12px; align-content: start;
}
.rail-link:has(> .list-thumbnail) > *, .more-list a:has(> .list-thumbnail) > * { grid-column: 1; min-width: 0; }
.rail-link > .list-thumbnail, .more-list a > .list-thumbnail {
  display: block; grid-column: 2; grid-row: 1 / span 4; align-self: start;
  width: 80px; height: 80px; border-radius: 7px; overflow: hidden; background: var(--rule);
}
.rail-title, .more-list .mr-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 22em) {
  .rail-link:has(> .list-thumbnail), .more-list a:has(> .list-thumbnail) { display: block; }
  .rail-link > .list-thumbnail, .more-list a > .list-thumbnail { display: none; }
}


/* Pinned v2 galleries are server-rendered and remain visible without JavaScript. */
.reader [data-parts] > [data-bundle-id]:has(> .article-media-gallery) { display: flex; flex-direction: column; min-width: 0; }
.reader .article-media-gallery { order: -1; grid-column: 1 / -1; grid-row: 1; min-width: 0; margin-top: 0; margin-bottom: 1.5rem; }
.reader .article-media-gallery figure { margin: 0 0 1.5rem; }
.reader .article-media-gallery img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; }
.reader .article-media-gallery figcaption { margin-top: .5rem; overflow-wrap: anywhere; }
@media (min-width: 72rem) {
  .reader [data-reading-mode="both"] > [data-bundle-id]:has(> [data-part="zh"]):has(> [data-part="orig"]) {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2rem;
  }
  .reader [data-reading-mode="both"] > [data-bundle-id] > .part + .part { margin-top: 0; }
}
/* Several fallback images are moved between paragraphs by reader-images.js; the emptied
   gallery is removed, so the wrapper keeps its normal (or 对照 grid) layout. */
.reader [data-sd-inline-images="inline"] .prose figure { margin: 1.75rem 0; min-width: 0; max-width: 100%; }
.reader [data-sd-inline-images="inline"] .prose figure img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; }
.reader [data-sd-inline-images="inline"] .prose figure figcaption {
  margin-top: .5rem; color: var(--ink-2); font: var(--fs-sm)/1.6 var(--sans); text-align: start; overflow-wrap: anywhere;
}

/* Independent SonicNews logo in the utility bar; the Chinese page title stands alone. */
.sonic-brand-block { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1rem; }
.sonic-logo { display: inline-flex; align-items: center; gap: .4rem; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.sonic-logo:hover { color: var(--ink); text-decoration: none; }
.sonic-logo-art { display: block; width: 14rem; height: 2.24rem; overflow: visible; }
.logo-ink { flood-color: var(--ink); }
.logo-accent { flood-color: var(--accent); }
.logo-glyph { flood-color: #fff; }
html[data-theme="night"] .logo-glyph, html[data-theme="nasa"] .logo-glyph { flood-color: var(--paper); }
.nameplate-link { display: inline-block; color: var(--ink); max-width: 100%; }
.nameplate-wrap { text-align: center !important; }
.sonic-chinese { display: block; white-space: nowrap; font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-weight: 800; font-style: normal; font-size: var(--nameplate-size); line-height: 1.12; letter-spacing: .015em; color: var(--ink); }
html[data-theme="swiss"] .sonic-chinese, html[data-theme="warm"] .sonic-chinese { color: var(--accent); }
body:not(.page-home) .sonic-chinese { font-size: 2.5rem; }
@media (max-width: 600px) {
  .sonic-brand-block { width: 100%; justify-content: space-between; }
  .sonic-brand-block .strip-tagline { font-size: .6875rem; }
  .sonic-chinese { font-size: clamp(2.65rem, 11vw, 3.5rem); }
}
