/* ResetNow · timeline
   Editorial, paper-like, mobile-first. Allo is self-hosted (SIL OFL 1.1);
   Chinese falls back to PingFang SC / Microsoft YaHei. */

@font-face {
  font-family: "Allo";
  /* Latin/symbol subset of the variable font: 182KB instead of 481KB. */
  src: url("fonts/AlloVariableSubset.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f4ed;
  --paper-soft: #fbf8f1;
  --card: #fffdf8;
  --ink: #1b1a17;
  --ink-soft: #35312a;
  --muted: #6f6a61;
  --faint: #9b958a;
  --line: #ded8cc;
  --line-soft: #e8e2d7;
  --line-strong: #c9c2b4;
  --red: #b53a22;
  --red-soft: #f3e3dc;
  --sans: "Allo", "PingFang SC", "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --shadow: 0 10px 30px rgba(46, 37, 22, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red-soft); color: var(--ink); }

a { color: inherit; }

[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { left: 12px; }

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

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

.masthead {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.88);
}

.masthead-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--sans);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  line-height: 1;
}

.brand-dot { color: var(--red); }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}

.nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- hero ---------- */

main { display: block; }

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 28px 26px;
}

.kicker {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--red);
  text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: clamp(38px, 5.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.dek {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.75;
  color: #514c44;
  text-wrap: pretty;
}

.hero-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend .dot { position: static; width: 7px; height: 7px; box-shadow: none; }

/* ---------- filters ---------- */

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  max-width: 880px;
  margin: 28px auto 0;
  background: var(--paper);
}

.filter-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 11px 28px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: visible;
  padding: 2px 0;
}

.filters::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover { border-color: var(--ink); color: var(--ink); }

.chip .count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip.is-active .count { color: #bdb5a6; }

.filter-status {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 28px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.status-toggle {
  margin-left: 10px;
  padding: 0 0 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--red);
  font: inherit;
  font-family: var(--mono);
  font-size: 10.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-toggle:hover { color: var(--ink); }

/* ---------- timeline ---------- */

.timeline {
  max-width: 880px;
  margin: 0 auto;
  padding: 4px 28px 22px;
}

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

.event {
  position: relative;
  padding: 20px 0 0;
}

.event-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.event-head .dot {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.event-date {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.event-head .type { font-size: 11.5px; }
.event-head .product { font-size: 11.5px; }
.event-head .status { margin-left: auto; }

.dot {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}

.t-reset { background: #b53a22; }
.t-card { background: #a97612; }
.t-teaser { background: #2b647d; }
.t-expiry { background: #6f6a61; }
.t-change { background: #3f6b4f; }

/* Same class names are used for the legend dots and the text labels.
   Labels keep the colour, not the solid dot background. */
.type.t-reset { background: none; color: #b53a22; }
.type.t-card { background: none; color: #96650f; }
.type.t-teaser { background: none; color: #2b647d; }
.type.t-expiry { background: none; color: #6f6a61; }
.type.t-change { background: none; color: #3f6b4f; }

.card {
  background: var(--card);
  border: 1px solid #e4ded2;
  border-radius: 7px;
  padding: 17px 19px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
}

.type { font-weight: 700; letter-spacing: 0.01em; }

.product {
  position: relative;
  padding-left: 11px;
  color: var(--muted);
}

.product::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--line-strong);
}

.status {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--faint);
  white-space: nowrap;
}

.s-landed { color: #2f6b4a; border-color: #cfdccf; background: #f3f8f2; }
.s-rolling { color: #8a5a0a; border-color: #ecdcb8; background: #fdf7e8; }
.s-available { color: #8a5a0a; border-color: #ecdcb8; background: #fdf7e8; }
.s-reported { color: #2b647d; border-color: #cbdfe7; background: #f1f8fa; }
.s-expired { color: #7a746a; border-color: #e2ddd3; background: #f7f3ea; }
.s-announced { color: #6b4694; border-color: #ddd0ea; background: #f8f4fc; }
.s-info { color: #6f6a61; border-color: #e2ddd3; background: #f7f3ea; }

.card h3 {
  margin: 0 0 6px;
  word-break: normal;
  text-wrap: wrap;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.card h3 a { text-decoration: none; }

.card h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.summary {
  margin: 0 0 12px;
  text-wrap: pretty;
  color: #5c574e;
  font-size: 13.5px;
  line-height: 1.7;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line-soft);
  font-size: 10.5px;
  color: var(--faint);
}

.source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.more {
  flex: 0 0 auto;
  color: var(--red);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.more:hover { text-decoration: underline; }

.empty {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.older-gate {
  list-style: none;
  padding: 26px 0 10px;
}

.older-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.older-toggle:hover { border-color: var(--ink); color: var(--ink); }

.older-count {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  color: var(--faint);
}

.older-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.js.old-open .older-arrow { transform: rotate(180deg); }

.js .event.is-old { display: none; }
.js.old-open .event.is-old { display: block; }

/* ---------- detail ---------- */

.article-main { padding: 0 28px; }

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 0 70px;
}

.back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
}

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

.article-tags { margin-bottom: 14px; }

.article h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.2;
  word-break: auto-phrase;
  text-wrap: balance;
}

.article .dek {
  margin: 0 0 14px;
  font-size: 16.5px;
  color: #514c44;
}

.article-meta {
  margin: 0 0 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--faint);
}

.article-body p {
  margin: 0 0 18px;
  text-wrap: pretty;
  color: #2f2b25;
  font-size: 15.5px;
  line-height: 1.9;
}

.facts {
  display: grid;
  gap: 14px;
  margin: 34px 0;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
}

.facts dt {
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: #3f3a33;
  font-size: 13px;
  line-height: 1.65;
}

.facts a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid rgba(181, 58, 34, 0.35);
}

.facts a:hover { border-color: var(--red); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 30px 0;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
}

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

.pager-dir {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.pager-title {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}

.pager-empty {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.pager-empty .pager-title {
  color: #b7b0a4;
  font-size: 11px;
}

.related {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 700;
}

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

.related li { border-bottom: 1px dashed var(--line-soft); }

.related a {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

.related a:hover { color: var(--red); }

.related-date {
  flex: 0 0 auto;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

/* ---------- about ---------- */

.about h2 {
  margin: 34px 0 10px;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.about p {
  margin: 0 0 14px;
  color: #3f3a33;
  font-size: 14.5px;
  line-height: 1.9;
}

.about ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #3f3a33;
  font-size: 14.5px;
  line-height: 1.9;
}

.about li { margin-bottom: 6px; }

.status-table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 12.5px;
}

.status-table th {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-align: left;
  text-transform: uppercase;
}

.status-table td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: #3f3a33;
  vertical-align: top;
}

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

.footer {
  margin-top: 56px;
  border-top: 1px solid #2c2923;
  background: #1b1a17;
  color: #a8a196;
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 28px 30px;
  color: #a8a196;
  font-size: 11px;
  line-height: 1.75;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.7fr 0.95fr 0.8fr 0.7fr;
  gap: 24px;
  padding-bottom: 28px;
}

.footer-brand-link {
  display: inline-block;
  margin-bottom: 12px;
  color: #f4efe4;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
}

.footer-brand-link .brand-dot { color: var(--red); }

.footer-tagline {
  max-width: 260px;
  margin: 0 0 10px;
  color: #b8b0a2;
  font-size: 11px;
  line-height: 1.7;
}

.footer-note {
  max-width: 275px;
  margin: 0;
  color: #827b70;
  font-size: 10px;
  line-height: 1.7;
}

.footer-updated {
  margin: 13px 0 0;
  color: #6f685e;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.footer-col h2 {
  margin: 0 0 10px;
  color: #f0ebe0;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  margin: 0 0 6px;
  color: #a8a196;
  font-size: 11px;
  line-height: 1.5;
  text-decoration: none;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copyright,
.footer-legal {
  margin: 0;
  color: #7f786d;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.65;
}

.footer-legal { max-width: 460px; text-align: right; }

.footer .online-now,
.footer .online-total { color: #827b70; }
.footer .online-now strong,
.footer .online-total strong { color: #e9e2d4; }
.footer .online-dot { background: #68b984; box-shadow: 0 0 0 3px rgba(104, 185, 132, 0.14); }

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

@media (max-width: 720px) {
  .masthead-inner {
    height: 60px;
    padding: 0 18px;
    gap: 12px;
  }

  .brand { font-size: 24px; }

  .nav { gap: 15px; font-size: 12px; }

  .hero { padding: 38px 18px 18px; }

  h1 { font-size: 34px; }

  .dek { font-size: 15px; }

  .legend { gap: 6px 12px; font-size: 11.5px; }


  .filter-bar { position: static; margin-top: 20px; max-width: none; }

  .filter-inner { padding: 9px 18px; }

  .chip { padding: 6px 10px; font-size: 12px; }

  .filters {
    flex-wrap: wrap;
    overflow: visible;
  }

  .filter-status { padding: 12px 18px 0; }

  .timeline { padding: 4px 18px 16px; }

  .event { padding: 16px 0 0; }

  .event-head { gap: 7px; margin-bottom: 7px; }

  .event-date { font-size: 10.5px; }

  .event-head .status { margin-left: 0; }

  .older-gate { padding: 20px 0 8px; }

  .older-toggle { padding: 12px 14px; font-size: 10px; }

  .card { padding: 14px 15px; border-radius: 6px; }

  .card h3 { font-size: 17px; }

  .summary { font-size: 13px; }

  .foot { font-size: 10px; }

  .article-main { padding: 0 18px; }

  .article { padding: 32px 0 60px; }

  .article h1 { font-size: 29px; }

  .article .dek { font-size: 15px; }

  .facts div { grid-template-columns: 1fr; gap: 4px; }

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

  .footer { margin-top: 34px; }
  .footer-inner { padding: 28px 18px 26px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-tagline, .footer-note { max-width: none; }
  .footer-bottom { display: block; padding-top: 15px; }
  .footer-copyright { margin-bottom: 6px; }
  .footer-legal { max-width: none; text-align: left; }
}

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

/* ---------- v2: type hubs, news, products ---------- */

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.main-nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
  border-color: var(--ink);
}

.rss-link {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.rss-link:hover { color: var(--red); }

.mobile-nav { display: none; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  line-height: 1.5;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.bc-sep { color: var(--line-strong); }

.page-head {
  max-width: 880px;
  margin: 0 auto;
  padding: 46px 28px 10px;
}

.page-head h1 {
  font-size: clamp(34px, 5vw, 52px);
  margin-bottom: 14px;
}

.page-head .dek { margin-bottom: 14px; }

.prose {
  max-width: 880px;
  margin: 0 auto 12px;
  padding: 0 28px;
  color: #3f3a33;
  font-size: 15px;
  line-height: 1.85;
}

.type-grid {
  max-width: 880px;
  margin: 26px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 166px;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.type-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.type-card .kicker { margin: 0 0 14px; font-size: 8.5px; letter-spacing: 0.14em; }
.type-card strong { display: block; font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.type-count { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.type-card p { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.type-arrow { margin-top: auto; padding-top: 12px; color: var(--red); font-size: 14px; }

.section {
  max-width: 880px;
  margin: 34px auto 0;
  padding: 0 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  margin-bottom: 10px;
  border-top: 1px solid var(--ink);
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-head a {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.section-head a:hover { text-decoration: underline; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
}

.side-panel {
  padding: 14px;
  border: 1px solid var(--line);
  background: #f2eee5;
  align-self: start;
}

.side-panel h2 { margin: 0 0 10px; font-size: 15px; }
.side-note { margin: 12px 0 0; color: var(--faint); font-size: 10.5px; line-height: 1.6; }

.product-grid {
  display: grid;
  gap: 7px;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name arrow" "vendor arrow" "count arrow";
  gap: 1px 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.product-card:hover { border-color: var(--ink); background: #fff; }
.product-card-name { grid-area: name; font-size: 13.5px; font-weight: 700; }
.product-card-vendor { grid-area: vendor; color: var(--faint); font-size: 9.5px; }
.product-card-count { grid-area: count; margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: 9.5px; }
.product-card-arrow { grid-area: arrow; align-self: center; color: var(--red); font-size: 14px; }

.product-grid-large {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.product-grid-large .product-card { min-height: 120px; padding: 16px; }
.product-grid-large .product-card-name { font-size: 18px; }
.product-grid-large .product-card-arrow { font-size: 18px; }

.news-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.news-card {
  display: flex;
  flex-direction: column;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
}

.news-meta .product { padding-left: 9px; font-size: 10px; }
.news-type { padding: 1px 5px; border: 1px solid var(--line); font-family: var(--mono); font-size: 9px; }
.n-release { color: #2b647d; border-color: #cbdfe7; background: #f1f8fa; }
.n-free { color: #2f6b4a; border-color: #cfdccf; background: #f3f8f2; }
.n-rollout { color: #8a5a0a; border-color: #ecdcb8; background: #fdf7e8; }

.news-card h3 { margin: 8px 0 5px; font-size: 15.5px; line-height: 1.45; }
.news-card h3 a { text-decoration: none; }
.news-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.news-card .summary { margin: 0 0 10px; font-size: 12.5px; line-height: 1.65; }
.news-card .foot { margin-top: auto; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--card); }
.rules-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 12px; }
.rules-table th { padding: 9px 12px; text-align: left; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: var(--faint); border-bottom: 1px solid var(--line); }
.rules-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: #3f3a33; vertical-align: top; }
.rules-table tr:last-child td { border-bottom: 0; }
.rules-table td b { color: var(--ink); }

.faq-section details { max-width: 880px; }
.faq-section details p { max-width: 820px; }

.links-section { padding-bottom: 50px; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link-row a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: none;
}
.link-row a:hover { border-color: var(--ink); color: var(--ink); }

.product-head .dek { max-width: 820px; }

.back-row { margin-top: 30px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 26px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

.home-events { margin-top: 0; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .rss-link { display: none; }
  .mobile-nav {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 18px 9px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a { color: var(--muted); font-size: 11.5px; text-decoration: none; white-space: nowrap; }
  .mobile-nav a.active { color: var(--ink); border-bottom: 1px solid var(--ink); }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .news-list { grid-template-columns: 1fr; }
  .product-grid-large { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 640px) {
  .page-head { padding: 32px 18px 8px; }
  .page-head h1 { font-size: 30px; }
  .prose { padding: 0 18px; font-size: 14px; }
  .type-grid { padding: 0 18px; gap: 8px; }
  .type-card { min-height: 146px; padding: 13px; }
  .type-card strong { font-size: 18px; }
  .type-card p { font-size: 10.5px; }
  .section { padding: 0 18px; }
  .section-head h2 { font-size: 18px; }
  .product-grid-large { grid-template-columns: 1fr; }
  .news-card h3 { font-size: 15px; }
}

.hero-meta span + span { margin-left: 14px; }
.hero-meta span { white-space: nowrap; }

.split .news-list { grid-template-columns: 1fr; }

/* product-news types mixed into the timeline */
.dot.n-release { background: #2b647d; }
.dot.n-free { background: #2f6b4a; }
.dot.n-rollout { background: #a97612; }

.type.n-release { background: none; color: #2b647d; }
.type.n-free { background: none; color: #2f6b4a; }
.type.n-rollout { background: none; color: #96650f; }

.event[data-kind="news"] .card { background: #fffcf5; }

.section-nav {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px 9px;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.section-nav a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .section-nav {
    flex-wrap: wrap;
    overflow: visible;
    padding: 0 18px 9px;
    gap: 8px 14px;
    font-size: 11px;
  }
}

/* clickable type legend */
.legend-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: inherit;
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}
.legend-filter:hover { color: var(--ink); }
.legend-filter.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.legend-filter .dot { position: static; width: 7px; height: 7px; box-shadow: none; }

.legend-hint {
  margin: 8px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.hub-legend {
  max-width: 880px;
  margin: 18px auto 0;
  padding: 0 28px;
}

@media (max-width: 640px) {
  .hub-legend { padding: 0 18px; margin-top: 14px; }
}

/* calendar */
.month-list { display: grid; gap: 8px; }
.month-row {
  display: grid;
  grid-template-columns: 1.1fr 80px 1.6fr 20px;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.month-row:hover { border-color: var(--ink); background: #fff; }
.month-name { font-size: 15px; font-weight: 700; }
.month-count { font-family: var(--mono); font-size: 11px; color: var(--red); }
.month-mix { color: var(--muted); font-size: 11.5px; }
.month-arrow { color: var(--red); }
.month-nav {
  max-width: 880px;
  margin: 4px auto 14px;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
}
.month-nav a { color: var(--muted); text-decoration: none; }
.month-nav a:hover { color: var(--ink); }
.calendar {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px 10px;
}
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head { border: 1px solid var(--line); border-bottom: 0; background: #f2eee5; }
.cal-head span { padding: 8px 4px; text-align: center; font-family: var(--mono); font-size: 9px; color: var(--faint); }
.cal-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-cell {
  position: relative;
  min-height: 72px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.cal-cell.is-empty { background: #faf7f0; }
.cal-cell.has-entry:hover { background: #fff; outline: 1px solid var(--ink); outline-offset: -1px; }
.cal-day { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cal-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 0 4px;
  border: 1px solid rgba(181, 58, 34, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--red);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 14px;
}
.cal-cell.is-today .cal-day { color: var(--red); font-weight: 700; }
.cal-day-block { margin-top: 28px; }
.cal-day-block:first-child { margin-top: 0; }
.cal-day-title { margin: 0 0 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.cal-day-title span { color: var(--faint); font-family: var(--mono); font-size: 10px; font-weight: 400; }

@media (max-width: 640px) {
  .month-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .month-mix { grid-column: 1 / -1; }
  .month-arrow { display: none; }
  .month-nav, .calendar { padding: 0 18px; }
  .cal-cell { min-height: 52px; padding: 5px; }
  .cal-day { font-size: 10px; }
  .cal-count { right: 4px; bottom: 4px; font-size: 8px; line-height: 13px; }
}

/* upcoming / expired reminders */
.dot.t-upcoming { background: #a97612; }
.type.t-upcoming { background: none; color: #96650f; }
.status.s-upcoming { color: #96650f; border-color: #ecdcb8; background: #fdf7e8; }

/* pagination */
.filter-note {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}
.pagination {
  max-width: 880px;
  margin: 6px auto 0;
  padding: 20px 28px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pagination[hidden] { display: none !important; }
.pagination a,
.pagination button,
.pagination .page-disabled,
.pagination .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination .page-num.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.pagination .page-disabled { color: #bdb5a6; border-color: var(--line-soft); }
.pagination .page-prev,
.pagination .page-next { padding: 0 12px; }
.pagination button { cursor: pointer; }
.pagination button:disabled { color: #bdb5a6; border-color: var(--line-soft); cursor: default; }
.client-pagination { margin-top: -8px; }

@media (max-width: 640px) {
  .filter-note { padding: 0 18px; }
  .pagination { padding: 16px 18px 34px; gap: 4px; }
  .pagination a, .pagination button, .pagination .page-disabled, .pagination .page-num {
    min-width: 28px; height: 28px; padding: 0 7px; font-size: 10px;
  }
  .pagination .page-prev, .pagination .page-next { padding: 0 9px; }
}

/* unified reminder type */
.dot.t-reminder { background: #a97612; }
.type.t-reminder { background: none; color: #96650f; }

/* ---------- back to top + interaction hierarchy ---------- */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 13px 0 11px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 24px rgba(35, 29, 18, 0.18);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--red); border-color: var(--red); }
.back-to-top-arrow { font-size: 15px; line-height: 1; }

.dot.n-release,
.dot.n-free,
.dot.n-rollout { background: #5f6f6a; }
.dot.t-expiry { background: #a97612; }

/* Secondary text links: do not compete with primary actions. */
.more {
  color: var(--ink-soft);
  font-weight: 600;
}
.more:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.section-head a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.section-head a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
  text-decoration: none;
}

/* Secondary controls: quieter outline, primary state stays ink-filled. */
.chip { border-color: var(--line); }
.chip:hover { border-color: var(--line-strong); }
.chip.is-active { border-color: var(--ink); }

@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; height: 38px; padding: 0 12px 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

.pagination .page-ellipsis {
  min-width: 18px;
  text-align: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

/* ---------- type palette: three priority families + secondary types ---------- */
:root {
  --type-reset: #c0442a;    /* 额外重置：优先 */
  --type-card: #2f7d52;     /* 重置卡：优先 */
  --type-teaser: #2f6f8a;   /* 预告：优先 */
  --type-reminder: #a56b0a; /* 到期提醒：时间敏感 */
  --type-release: #7a52a8;  /* 新模型：发布 */
  --type-free: #ad4567;     /* 限免：活动 */
  --type-rollout: #596a84;  /* 订阅覆盖：范围 */
}

.t-reset, .dot.t-reset { background: var(--type-reset); }
.t-card, .dot.t-card { background: var(--type-card); }
.t-teaser, .dot.t-teaser { background: var(--type-teaser); }
.t-reminder, .dot.t-reminder { background: var(--type-reminder); }
.n-release, .dot.n-release { background: var(--type-release); }
.n-free, .dot.n-free { background: var(--type-free); }
.n-rollout, .dot.n-rollout { background: var(--type-rollout); }

.type.t-reset, .legend-filter.t-reset { color: var(--type-reset); }
.type.t-card, .legend-filter.t-card { color: var(--type-card); }
.type.t-teaser, .legend-filter.t-teaser { color: var(--type-teaser); }
.type.t-reminder, .legend-filter.t-reminder { color: var(--type-reminder); }
.type.n-release, .legend-filter.n-release { color: var(--type-release); }
.type.n-free, .legend-filter.n-free { color: var(--type-free); }
.type.n-rollout, .legend-filter.n-rollout { color: var(--type-rollout); }

/* Timeline labels keep their category colour; status pills still carry state. */
.event-head .type,
.article-tags .type {
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Type filters are a tertiary control, but their labels match the timeline colours. */
.legend-filter.is-active {
  color: inherit;
  border-bottom-color: currentColor;
}
.legend-filter[data-type-filter="all"].is-active { color: var(--ink); }

/* Legend buttons reuse type classes for colour; they must not inherit the dot background. */
.legend-filter { background: transparent; }

@media (max-width: 720px) {
  .card h3,
  .summary {
    text-align: left;
  }
}

.nav a.active,
.section-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* bilingual switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 21px;
  margin-left: 4px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch:hover { border-color: var(--ink); color: var(--ink); }

@media (max-width: 720px) {
  html[lang="en"] .card h3,
  html[lang="en"] .summary {
    text-align: left;
  }
  .nav { gap: 12px; }
  .lang-switch { height: 20px; padding: 0 6px; }
}

.hero + .filter-bar {
  margin-top: 6px;
}

.hero-archive {
  padding-top: 34px;
  padding-bottom: 10px;
}

.hero-archive .kicker { margin-bottom: 10px; }
.hero-archive h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 10px; }
.hero-archive .hero-meta { color: var(--muted); }

@media (max-width: 720px) {
  .hero-archive { padding-top: 24px; }
  .hero-archive h1 { font-size: 29px; }
}

/* lightweight 15-minute online counter */
.online-now {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.online-now[hidden] { display: none !important; }
.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2f6b4a;
  box-shadow: 0 0 0 3px rgba(47, 107, 74, 0.12);
}
.online-now strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.online-total {
  margin: 6px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
}
.online-total[hidden] { display: none !important; }
.online-total strong {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* open-source model releases */
:root { --type-open: #2f7d6a; }
.n-open, .dot.n-open { background: var(--type-open); }
.type.n-open, .legend-filter.n-open { color: var(--type-open); }
.type.n-open, .legend-filter.n-open { background: transparent; color: var(--type-open); }


/* ---------- browser notification prompt ---------- */

.notify-toast {
  position: fixed;
  left: clamp(12px, 2vw, 24px);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(400px, calc(100vw - 24px));
  padding: 9px 10px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(35, 29, 18, 0.12);
  animation: notify-toast-in 0.3s ease both;
}
.notify-toast-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.notify-toast button {
  flex: 0 0 auto;
  padding: 3px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-family: var(--sans);
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
}
.notify-toast-open { color: var(--ink); font-weight: 650; }
.notify-toast-open:hover { background: var(--paper-soft); }
.notify-toast-later { color: var(--faint); }
.notify-toast-later:hover { color: var(--muted); }
@keyframes notify-toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .notify-toast { animation: none; }
}

.notify-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.notify-modal[hidden] { display: none !important; }
.notify-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 26, 23, 0.42);
}
.notify-card {
  position: relative;
  outline: none;
  width: min(460px, 100%);
  padding: 25px 26px 22px;
  border: 1px solid #ddd5c8;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 30px 90px rgba(30, 24, 15, 0.24);
  animation: notify-in 0.2s ease-out both;
}
.notify-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
}
.notify-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--muted);
}
.notify-kicker {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.4;
}
.notify-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.notify-close:hover { background: var(--paper); color: var(--ink); }
.notify-card h2 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.notify-intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.notify-benefits {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  padding: 13px 15px;
  list-style: none;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--paper-soft);
}
.notify-benefits li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
}
.notify-benefits .dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  box-shadow: none;
}
.notify-benefits li {
  font-size: 13px;
}
.notify-note {
  margin: 0 0 18px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.65;
}
.notify-primary {
  width: 100%;
  min-height: 41px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.notify-primary:hover { background: var(--paper-soft); border-color: var(--ink-soft); }
.notify-primary:disabled { opacity: 0.55; cursor: default; }
.notify-sub-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}
.notify-secondary,
.notify-noask {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  cursor: pointer;
}
.notify-secondary:hover { color: var(--ink); }
.notify-noask { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }
.notify-noask:hover { color: var(--muted); }
.notify-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.notify-status[hidden] { display: none !important; }
body.notify-open { overflow: hidden; }
@keyframes notify-in {
  from { transform: translateY(6px) scale(0.985); }
  to { transform: translateY(0) scale(1); }
}
@media (max-width: 600px) {
  .notify-modal { align-items: flex-end; padding: 0; }
  .notify-card {
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    animation-name: notify-in-mobile;
  }
  .notify-card h2 { font-size: 19px; }
  .notify-benefits { padding: 11px 13px; }
  .notify-sub-actions { gap: 16px; }
}
@keyframes notify-in-mobile {
  from { transform: translateY(20px); }
  to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .notify-card { animation: none; }
}


/* ---------- phone tables: stack rows as cards ---------- */
@media (max-width: 640px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .rules-table,
  .status-table {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    border-collapse: separate;
    font-size: 12px;
  }
  .rules-table thead,
  .status-table thead { display: none; }
  .rules-table tbody,
  .status-table tbody { display: block; }
  .rules-table tr,
  .status-table tr {
    display: block;
    margin: 0 0 8px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
  }
  .rules-table tr:last-child,
  .status-table tr:last-child { margin-bottom: 0; }
  .rules-table td,
  .status-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px dashed var(--line-soft);
    vertical-align: top;
  }
  .rules-table td:last-child,
  .status-table td:last-child { border-bottom: 0; }
  .rules-table td::before,
  .status-table td::before {
    content: attr(data-label);
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.7;
    letter-spacing: 0.03em;
  }
}

/* ---------- bot information page ---------- */
.bot-page .article-meta {
  margin-bottom: 26px;
}
.bot-page h2 {
  margin-top: 34px;
}
.bot-page ul + h2 {
  margin-top: 38px;
}
.bot-ua {
  margin: 12px 0 18px;
  padding: 13px 15px;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}
.bot-ua code {
  color: inherit;
  white-space: pre;
  font-family: inherit;
}
.bot-page code {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--paper-soft);
  color: inherit;
  font-family: var(--mono);
  font-size: 0.9em;
}
.bot-page .bot-ua code {
  padding: 0;
  background: transparent;
  color: var(--paper);
}
