/* ============================================================
   hth-data-sync.com.cn — 共享站点外壳
   /assets/site.css
   ============================================================ */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, dl, dd, dt, figure, blockquote, pre {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, svg, video, canvas {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ---------- Tokens ---------- */
:root {
  --ink-900: #14100E;
  --cream-050: #F6F1E7;
  --cream-100: #EDE6D8;
  --brand-red: #D62828;
  --red-deep: #8E1B1B;
  --deep-blue: #13294B;
  --cool-gray: #7C8794;
  --cyan: #22D3C5;
  --amber: #F2A93B;
  --line: #C9BFAE;

  --rail-w: 0px;
  --topbar-h: 54px;
  --radius-cut: 12px;
  --shell-pad: clamp(20px, 4vw, 56px);

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-rail: 0 24px 60px -30px rgba(20, 16, 14, .7);
}

/* ---------- Base ---------- */
body {
  background: var(--cream-050);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.mono,
[data-latency],
[data-refresh-time] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

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

.rail :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--cyan);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 14px;
  top: -70px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--brand-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  transition: top .2s var(--ease);
}

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

/* ---------- Header shell ---------- */
.site-header {
  position: relative;
  z-index: 70;
}

/* ---------- Mobile bar ---------- */
.mobilebar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--ink-900);
  color: var(--cream-050);
  border-bottom: 1px solid rgba(201, 191, 174, .18);
}

.mobilebar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .01em;
}

.mobilebar__mark {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--brand-red);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(201, 191, 174, .35);
  border-radius: 6px;
  color: var(--cream-050);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}

.nav-toggle:hover {
  background: rgba(246, 241, 231, .1);
  border-color: rgba(201, 191, 174, .6);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), top .2s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Side rail ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  width: min(310px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(19, 41, 75, .85) 0%, rgba(19, 41, 75, 0) 62%),
    var(--ink-900);
  color: var(--cream-050);
  border-right: 1px solid rgba(201, 191, 174, .16);
  transform: translateX(-102%);
  transition: transform .28s var(--ease);
  box-shadow: none;
}

.rail[data-open="true"] {
  transform: translateX(0);
  box-shadow: var(--shadow-rail);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(201, 191, 174, .18);
}

.brand__mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--brand-red);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .01em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--cool-gray);
  line-height: 1.5;
}

.railnav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.railnav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.railnav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 10px 11px 14px;
  border-radius: 6px;
  color: rgba(246, 241, 231, .72);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.railnav__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--brand-red);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
  transition: height .22s var(--ease);
}

.railnav__idx {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--cool-gray);
  transition: color .18s var(--ease);
}

.railnav__label {
  min-width: 0;
}

.railnav__link:hover {
  background: rgba(246, 241, 231, .08);
  color: var(--cream-050);
}

.railnav__link:hover::before { height: 58%; }

.railnav__link[aria-current="page"] {
  background: rgba(214, 40, 40, .16);
  color: #fff;
}

.railnav__link[aria-current="page"]::before { height: 68%; }

.railnav__link[aria-current="page"] .railnav__idx { color: var(--amber); }

.railstatus {
  padding: 12px;
  background: linear-gradient(160deg, var(--deep-blue) 0%, #0d1c33 100%);
  border: 1px solid rgba(34, 211, 197, .2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.railstatus__title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--cyan);
}

.pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-ring 900ms ease-out infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 197, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 211, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 197, 0); }
}

.railstatus__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
}

.railstatus__row + .railstatus__row {
  border-top: 1px dashed rgba(201, 191, 174, .18);
}

.railstatus__row dt {
  color: var(--cool-gray);
  white-space: nowrap;
}

.railstatus__row dd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--cream-050);
  text-align: right;
}

.railhelp {
  display: block;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--cream-050);
  border: 1px solid rgba(201, 191, 174, .3);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.railhelp:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.railscrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  padding: 0;
  border: 0;
  background: rgba(20, 16, 14, .58);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s var(--ease), visibility .24s linear;
}

.railscrim[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

/* ---------- Top data strip ---------- */
.topbar {
  position: sticky;
  top: 52px;
  z-index: 55;
  margin-left: var(--rail-w);
  background: var(--cream-100);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 1024px) {
  .topbar { top: 0; }
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  min-height: var(--topbar-h);
  padding: 8px var(--shell-pad);
}

.leagues {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.leagues__title {
  flex: 0 0 auto;
  position: relative;
  padding-right: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--cool-gray);
  white-space: nowrap;
}

.leagues__title::after {
  content: "/";
  position: absolute;
  right: 4px;
  color: var(--line);
}

.league {
  flex: 0 0 auto;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-900);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

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

.league[aria-pressed="true"] {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.topbar__refresh {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  font-size: 13px;
  color: var(--cool-gray);
  white-space: nowrap;
}

.topbar__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  outline: 2px solid var(--deep-blue);
  outline-offset: 0;
}

.topbar__help {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  border: 1px solid var(--line);
  background: var(--cream-050);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.topbar__help:hover {
  background: var(--deep-blue);
  border-color: var(--deep-blue);
  color: var(--cream-050);
}

.topbar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-red) 0%, var(--red-deep) 45%, var(--amber) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- Main canvas offset ---------- */
main {
  display: block;
  margin-left: var(--rail-w);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-left: var(--rail-w);
  padding: clamp(40px, 6vw, 76px) var(--shell-pad) 26px;
  background: var(--deep-blue);
  color: rgba(246, 241, 231, .82);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(246, 241, 231, .1) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: .35;
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background:
    linear-gradient(90deg,
      var(--brand-red) 0 34%,
      var(--amber) 34% 46%,
      var(--cyan) 46% 54%,
      rgba(246, 241, 231, .18) 54% 100%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 22px;
  margin-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid rgba(246, 241, 231, .18);
}

.footer__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--brand-red);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
}

.footer__brand-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--cream-050);
  line-height: 1.35;
  letter-spacing: .01em;
}

.footer__brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(246, 241, 231, .5);
  line-height: 1.6;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 46px);
}

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

@media (min-width: 1100px) {
  .footer__grid { grid-template-columns: 1fr 1.5fr 1.3fr 1fr; }
}

.footer__title {
  position: relative;
  padding-left: 15px;
  margin-bottom: 15px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  color: var(--cyan);
}

.footer__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--brand-red);
  transform: translateY(-50%);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__links a {
  display: inline-block;
  font-size: 15px;
  color: rgba(246, 241, 231, .78);
  transition: color .16s var(--ease), padding-left .16s var(--ease);
}

.footer__links a:hover {
  color: var(--cream-050);
  padding-left: 5px;
}

.footer__links--legal a {
  font-size: 14px;
}

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__meta > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.footer__meta dt {
  min-width: 66px;
  font-size: 12px;
  letter-spacing: .1em;
  color: rgba(246, 241, 231, .5);
}

.footer__meta dd {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cream-050);
  word-break: break-word;
}

.footer__note {
  max-width: 34em;
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(246, 241, 231, .58);
}

.footer__copy {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(246, 241, 231, .78);
}

.footer__copy + .footer__copy {
  margin-top: 10px;
}

.footer__copy--muted {
  font-size: 13px;
  color: rgba(246, 241, 231, .55);
}

.footer__icp {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(246, 241, 231, .62);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  margin-top: clamp(28px, 5vw, 54px);
  padding-top: 18px;
  border-top: 1px solid rgba(246, 241, 231, .18);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: rgba(246, 241, 231, .5);
}

/* ---------- Shared utilities ---------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.wrap--narrow {
  max-width: 840px;
}

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.75;
}

.prose p + p { margin-top: 1.1em; }

.prose strong { font-weight: 700; }

.prose a {
  color: var(--red-deep);
  border-bottom: 1px solid rgba(142, 27, 27, .35);
}

.prose a:hover { border-bottom-color: var(--red-deep); }

/* ---------- Panels ---------- */
.panel {
  background: var(--cream-100);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 30px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.panel--ink {
  background: var(--ink-900);
  border-color: transparent;
  color: var(--cream-050);
}

.panel--blue {
  background: var(--deep-blue);
  border-color: transparent;
  color: var(--cream-050);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  border: 1px solid transparent;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.btn--primary {
  background: var(--brand-red);
  color: #fff;
}

.btn--primary:hover { background: var(--red-deep); }

.btn--ghost {
  background: transparent;
  border-color: var(--ink-900);
  color: var(--ink-900);
}

.btn--ghost:hover {
  background: var(--ink-900);
  color: var(--cream-050);
}

.btn--dark {
  background: var(--deep-blue);
  color: var(--cream-050);
}

.btn--dark:hover { background: var(--ink-900); }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--cool-gray);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.crumbs li + li::before {
  content: "/";
  color: var(--line);
}

.crumbs a {
  color: var(--cool-gray);
  transition: color .16s var(--ease);
}

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

.crumbs [aria-current="page"] {
  color: var(--ink-900);
  font-weight: 700;
}

/* ---------- Data table ---------- */
.dtable {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--cream-050);
}

.dtable caption {
  padding-bottom: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--cool-gray);
  text-align: left;
}

.dtable th {
  padding: 11px 14px;
  background: var(--deep-blue);
  color: var(--cream-050);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: left;
  white-space: nowrap;
}

.dtable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.dtable tbody tr {
  transition: background .16s var(--ease), box-shadow .16s var(--ease);
}

.dtable tbody tr:nth-child(even) {
  background: var(--cream-100);
}

.dtable tbody tr:hover {
  background: #E4DCCC;
  box-shadow: inset 3px 0 0 var(--brand-red);
}

.dtable td.is-negative { color: var(--red-deep); }
.dtable td.is-highlight { color: var(--deep-blue); font-weight: 700; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  border-radius: 2px;
}

.tag--red { background: var(--brand-red); color: #fff; }
.tag--cyan { background: var(--deep-blue); color: var(--cyan); }
.tag--amber { background: rgba(242, 169, 59, .22); color: #7A4E06; }
.tag--line { border: 1px solid var(--line); color: var(--cool-gray); }

/* ---------- Accordion ---------- */
.accordion {
  border-bottom: 1px solid var(--line);
}

.acc {
  border-top: 1px solid var(--line);
}

.acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 18px 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  color: var(--ink-900);
  transition: color .18s var(--ease);
}

.acc__btn::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-red);
  transition: transform .2s var(--ease);
}

.acc__btn:hover { color: var(--red-deep); }

.acc__btn[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}

.acc__panel[data-open="true"] {
  grid-template-rows: 1fr;
}

.acc__inner {
  overflow: hidden;
  min-height: 0;
}

.acc__inner > * {
  padding-bottom: 20px;
}

/* ---------- Figure / image containers ---------- */
.figure {
  display: block;
  margin: 0;
}

.figure__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream-100);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

.figure__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(20, 16, 14, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 16, 14, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.figure__frame > img,
.figure__frame > picture,
.figure__frame > svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__cap {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--cool-gray);
}

.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--square .figure__frame { aspect-ratio: 1 / 1; }
.figure--portrait .figure__frame { aspect-ratio: 3 / 4; }

/* ---------- Reveal ---------- */
html.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

html.js-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .48s var(--ease), transform .48s var(--ease);
}

/* ---------- Responsive rail widths ---------- */
@media (max-width: 1023px) {
  body.nav-open { overflow: hidden; }
}

@media (min-width: 1024px) {
  :root { --rail-w: 88px; }

  .mobilebar { display: none; }
  .railscrim { display: none; }

  .rail {
    width: var(--rail-w);
    transform: none;
    padding: 22px 10px 20px;
    gap: 12px;
  }
  .rail[data-open="true"] { box-shadow: none; }

  .brand {
    justify-content: center;
    padding: 2px 0 14px;
  }
  .brand__text { display: none; }

  .railnav__link {
    justify-content: center;
    padding: 12px 0;
  }
  .railnav__label { display: none; }

  .railstatus {
    padding: 10px 4px;
  }
  .railstatus__title { justify-content: center; margin-bottom: 5px; }
  .railstatus__label { display: none; }
  .railstatus__row {
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 3px 0;
  }
  .railstatus__row + .railstatus__row { border-top: 0; }
  .railstatus__row dt { display: none; }
  .railstatus__row dd {
    font-size: 10.5px;
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
  }
  .railstatus__row:first-child { display: none; }

  .railhelp {
    padding: 8px 2px;
    font-size: 11px;
    letter-spacing: .04em;
  }
}

@media (min-width: 1280px) {
  :root { --rail-w: 236px; }

  .rail {
    padding: 22px 14px 20px;
    gap: 14px;
  }

  .brand {
    justify-content: flex-start;
    padding: 4px 6px 16px;
  }
  .brand__text { display: flex; }

  .railnav__link {
    justify-content: flex-start;
    padding: 11px 10px 11px 14px;
  }
  .railnav__label { display: inline; }

  .railstatus { padding: 12px; }
  .railstatus__title { justify-content: flex-start; margin-bottom: 8px; }
  .railstatus__label { display: inline; }
  .railstatus__row {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
  }
  .railstatus__row + .railstatus__row { border-top: 1px dashed rgba(201, 191, 174, .18); }
  .railstatus__row dt { display: block; }
  .railstatus__row dd {
    font-size: 12px;
    text-align: right;
    word-break: normal;
  }
  .railstatus__row:first-child { display: flex; }

  .railhelp {
    padding: 10px 8px;
    font-size: 13px;
    letter-spacing: .08em;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html.js-motion [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .pulse { animation: none; }
}
