:root {
  --p-bg: #f7f9fa; --p-surface: #ecf0f2; --p-ink: #1f3038; --p-muted: #5d6b72;
  --p-accent: #0d7480; --p-accent-ink: #ffffff; --p-action: #0d7480; --p-action-ink: #ffffff;
  --p-inv-bg: #1f3038; --p-inv-surface: #2c3c44; --p-inv-ink: #f7f9fa; --p-inv-muted: #9ea7ab;
  --p-inv-accent: #f7f9fa; --p-inv-accent-ink: #1f3038; --p-inv-action: #f7f9fa; --p-inv-action-ink: #1f3038;
  --font-display: "IBM Plex Sans", system-ui, sans-serif;
  --font-text: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.025em;
  --display-tracking-xl: -0.035em;
  --ly-scale: 0.98;
  --line: #dce4e8;
  --white: #fff;
  --radius: 8px;
  --target: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .56; }
:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
.wrap { width: min(calc(100% - 2 * clamp(20px, 5.3vw, 76px)), 1200px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  overflow: hidden;
}
.skip-link {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 2;
  padding: 10px 14px;
  background: var(--white);
  border-radius: var(--radius);
}
.nav { border-bottom: 1px solid var(--line); background: var(--white); }
.nav-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 68px; }
.wordmark {
  display: inline-flex;
  justify-self: start;
  min-height: var(--target);
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}
.brand-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: var(--p-accent); }
.brand-icon::before {
  content: "";
  width: 13px;
  height: 16px;
  border: 1px solid var(--white);
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, var(--white) 0 1px, transparent 1px 4px) 3px 4px / 5px 9px no-repeat;
}
.skill-link {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  min-height: var(--target);
  color: var(--p-accent);
  white-space: nowrap;
}
.skill-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.channel-bar { border-top: 1px solid var(--line); }
.channel-links { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-block: 7px; }
.channel-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  max-width: 100%;
  padding: 5px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.channel-links a:hover { background: var(--p-surface); }
.channel-links a[aria-current] { color: #075c66; background: #e3f0ee; border-color: #c9dbdc; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  align-items: center;
  gap: clamp(32px, 7vw, 106px);
  margin-block: 42px 34px;
}
.m-enter .hero[data-enter] { animation: enter 380ms ease-out both; }
.hero-copy { min-width: 0; }
.hero h1 {
  min-height: 1.17em;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
  font-size: clamp(36px, 5.2vw, 66px);
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: var(--display-tracking);
  margin-bottom: 14px;
}
.search-label { display: block; width: fit-content; margin-bottom: 5px; color: var(--p-muted); font-size: 13px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 4px;
  padding-inline-start: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.search-field:focus-within { border-color: var(--p-accent); }
.search-icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-right: 2px;
  border: 1.5px solid var(--p-muted);
  border-radius: 50%;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1.5px;
  background: var(--p-muted);
  right: -4px;
  bottom: -2px;
  transform: rotate(47deg);
}
.search-field input {
  padding: 0;
  min-width: 0;
  min-height: var(--target);
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--p-ink);
}
.search-field input:focus-visible { outline-offset: 0; }
.search-field input::placeholder { color: var(--p-muted); }
.primary, .secondary, .text-button {
  min-height: var(--target);
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  white-space: nowrap;
}
.primary { color: var(--p-action-ink); background: var(--p-action); }
.search-button span { margin-inline-start: 5px; }
.primary:hover { background: #055e69; }
.secondary { border-color: var(--line); color: var(--p-ink); background: var(--white); }
.secondary:not(:disabled):hover { background: var(--p-surface); }
.text-button { background: transparent; color: var(--p-accent); }
.text-button:hover { background: var(--p-surface); }
.primary, .secondary, .text-button { transition: background 150ms ease, transform 150ms ease; }
.primary:active, .secondary:not(:disabled):active, .text-button:active { transform: translateY(1px); }
.edition {
  position: relative;
  min-width: 0;
  min-height: 186px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 92% 0%, #dcefe7, transparent 82%), #e9f1f0;
  border: 1px solid #d8e5e2;
  border-radius: var(--radius);
}
.edition::before, .edition::after {
  content: "";
  position: absolute;
  width: 208px;
  aspect-ratio: 1;
  border: 1px solid #0d748029;
  border-radius: 50%;
  right: -78px;
  top: -53px;
  pointer-events: none;
}
.edition::after { width: 242px; right: -115px; top: -70px; }
.edition-content { position: relative; z-index: 1; padding: 18px 24px; }
.edition-kind { display: flex; align-items: center; gap: 8px; color: var(--p-accent); font-size: 13px; font-weight: 600; }
.edition-kind span { width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; background: currentColor; }
.edition-title {
  margin-block: 4px;
  font-size: clamp(29px, 4.15vw, 54px);
  line-height: 1.2;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
.edition-title time { font-family: var(--font-mono); display: inline-block; animation: enter 420ms ease both; }
.edition-meta { color: #3b5558; font-size: 13px; }
@keyframes enter { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.archive { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 264px); gap: clamp(28px, 4vw, 60px); align-items: start; }
.stories { min-width: 0; }
.stories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  border-block: 1px solid var(--line);
  padding-block: 10px;
}
.stories-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.stories-header h2 { font-size: 22px; font-weight: 650; line-height: 1.35; }
.result-total { color: var(--p-muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.filter { min-width: 0; flex: 0 0 auto; }
.filter select {
  min-height: var(--target);
  max-width: min(225px, 40vw);
  padding: 0 30px 0 11px;
  color: var(--p-ink);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%235d6b72' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 9px center / 14px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter select:not(:disabled):hover { border-color: var(--p-accent); }
.mobile-date { display: none; }
.archive-sidebar { border-top: 1px solid var(--line); padding-top: 16px; }
.archive-sidebar > p { font-size: 16px; font-weight: 650; margin-bottom: 12px; }
.date-links { margin: 0; padding: 0; list-style: none; }
.date-links li + li { border-top: 1px solid var(--line); }
.date-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--target);
  padding: 3px 10px;
  border-radius: 5px;
  transition: background 150ms ease;
}
.date-links a:hover { background: var(--p-surface); }
.date-links a[aria-current] { background: #e3f0ee; color: #075c66; }
.date-links time { font-family: var(--font-mono); font-size: 13px; letter-spacing: .01em; }
.date-count { color: var(--p-muted); font-size: 12px; }
#more-dates { margin-top: 6px; }
.story {
  --story-padding: 22px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 12px;
  padding: 19px var(--story-padding);
  border-bottom: 1px solid var(--line);
  transition: background 150ms ease;
}
.story:hover, .story:focus-within { background: #edf4f3; }
.story--lead {
  margin-top: 12px;
  border: 1px solid #d7e7e5;
  border-left: 3px solid var(--p-accent);
  border-radius: var(--radius);
  background: #eaf4f3;
  padding-block: 22px;
}
.story-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; font-size: 12px; margin-bottom: 4px; }
.story-meta time, .story-rank { color: var(--p-muted); font-family: var(--font-mono); }
.story-category { color: #096672; font-weight: 650; }
.story-title { font-weight: 650; font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.story--lead .story-title { font-size: clamp(19px, 2.05vw, 23px); }
.story-title a::after { position: absolute; inset: 13px calc(var(--story-padding) - 6px) auto auto; width: 44px; height: 44px; content: ""; }
.story-title a:hover, .story-title a:focus-visible { color: var(--p-accent); }
.story-summary { margin-top: 6px; color: #465a63; overflow-wrap: anywhere; }
.story-source { margin-top: 8px; color: var(--p-muted); font-size: 12px; overflow-wrap: anywhere; }
.story-arrow {
  pointer-events: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c9dbdc;
  border-radius: 50%;
  color: var(--p-accent);
  font-size: 18px;
  transition: color 150ms ease, background 150ms ease;
}
.story:hover .story-arrow, .story:focus-within .story-arrow { color: var(--white); background: var(--p-accent); }
.story:not(:has(a)) .story-arrow { display: none; }
.results-status { display: grid; justify-items: start; gap: 12px; padding: 33px 10px; color: var(--p-muted); }
.results-status:has(#status-text[hidden]) { padding: 0; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; }
.pagination span { text-align: center; color: var(--p-muted); font-size: 13px; }
.closing { margin-top: 46px; border-top: 1px solid var(--line); color: var(--p-muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 10px; min-height: 68px; align-items: center; }
.footer-inner a { display: flex; min-height: var(--target); align-items: center; gap: 8px; }
.footer-inner a:hover { color: var(--p-accent); }

@media (max-width: 760px) {
  .nav-inner { gap: 10px; min-height: 62px; }
  .skill-link { font-size: 13px; }
  .wordmark { font-size: 15px; gap: 8px; }
  .brand-icon { width: 27px; height: 27px; }
  .channel-links { gap: 4px; }
  .channel-links a { padding-inline: 10px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 14px; margin-block: 25px 23px; }
  .hero h1 { margin-bottom: 10px; }
  .search-button span { display: none; }
  .edition { min-height: 128px; }
  .edition-content { padding: 14px 18px; }
  .archive { display: block; }
  .archive-sidebar { display: none; }
  .mobile-date { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--p-muted); }
  .filter select { max-width: min(46vw, 240px); }
  .stories-header h2 { font-size: 19px; }
  .story { --story-padding: 13px; gap: 8px; grid-template-columns: minmax(0, 1fr) 26px; }
  .story-arrow { width: 26px; height: 26px; font-size: 15px; }
  .story-title a { display: inline-flex; align-items: center; min-height: var(--target); }
  .story-summary { font-size: 14px; }
  .closing { margin-top: 30px; }
}
@media (max-width: 360px) {
  .skill-link { font-size: 12px; }
  .skill-link span { display: none; }
  .search-field { gap: 8px; padding-inline-start: 12px; }
  .search-field input { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
