/* GINKA API 状态页：尺寸、配色按 status.openai.com 实测值 */

/* ---------- 字体 ----------
   Inter 可变字体（100–900），西文与数字用它；中日文交给系统字体。
   “Inter CJK” 去掉了 U+2010–2027（引号、省略号、破折号），中日文页面里这些标点由中文字体渲染，不会出现夹在汉字里的窄引号。
   “Inter Fallback” 是按 Inter 尺寸校准过的 Arial，字体加载前后不跳版。 */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter CJK'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200F, U+2028-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter CJK'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); ascent-override: 89.91%; descent-override: 22.41%; line-gap-override: 0%; size-adjust: 107.74%; }

:root {
  --slate-50: #f7f7f8;
  --slate-100: #e4e4e7;
  --slate-200: #cacace;
  --slate-300: #afafb6;
  --slate-400: #95959d;
  --slate-500: #787882;
  --slate-600: #5f5f68;
  --slate-700: #39393f;
  --slate-800: #29292f;
  --slate-900: #161618;

  /* 状态色：主色 / 悬停 / 浅底 / 深色文字 */
  --op: #24c19a;    --op-hover: #1fa382;    --op-surface: #d8f8f0;    --op-ink: #146b55;
  --deg: #fbbf24;   --deg-hover: #f59e0b;   --deg-surface: #fef3c7;   --deg-ink: #92400e;
  --par: #f5785c;   --par-hover: #f25533;   --par-surface: #fddfd9;   --par-ink: #a8280b;
  --full: #f87171;  --full-hover: #ef4444;  --full-surface: #fee2e1;  --full-ink: #b91c1b;
  --maint: #3c82f6; --maint-hover: #2463eb; --maint-surface: #dbe9fe; --maint-ink: #1d40b0;

  --text: var(--slate-900);
  --muted: var(--slate-500);
  --faint: var(--slate-400);
  --border: var(--slate-100);
  --divider: var(--slate-50);

  --font: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
  --mono: 'SFMono-Regular', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 8px;
}
html:lang(zh-CN) { --font: 'Inter CJK', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif; }
html:lang(zh-TW) { --font: 'Inter CJK', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'Noto Sans TC', 'Source Han Sans TC', sans-serif; }
html:lang(ja) { --font: 'Inter CJK', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo UI', 'Meiryo', 'Noto Sans JP', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--slate-400); outline-offset: 2px; border-radius: 4px; }
a, button { -webkit-tap-highlight-color: transparent; }

.page {
  width: 100%;
  max-width: calc(670px + 32px);
  margin: 0 auto;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; margin-bottom: 24px; }
.brand { display: inline-flex; align-items: flex-start; gap: 3px; line-height: 1; color: var(--text); }
.brand__word { font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 25px; font-weight: 700; letter-spacing: -0.035em; }
.brand__api { margin-top: 1px; font-family: 'Inter', 'Inter Fallback', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 6px; border: 0.5px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap; transition: color 0.15s var(--ease), background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.btn--primary { background: var(--slate-800); border-color: var(--slate-900); color: #fff; }
.btn--primary:hover { background: var(--slate-700); }
.btn--secondary { background: #fff; border-color: var(--slate-200); color: var(--text); height: 36px; }
.btn--secondary:hover { background: var(--slate-50); border-color: var(--slate-300); }
.btn--modal { background: rgba(228, 228, 231, 0.4); color: var(--text); height: 36px; padding: 0 12px; }
.btn--modal:hover { background: rgba(228, 228, 231, 0.7); }
.btn--modal:disabled { opacity: 0.55; cursor: default; }
.btn--sm { height: 30px; font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted); transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.icon-btn:hover { background: var(--slate-50); color: var(--text); }

/* ---------- 主体与页面切换 ---------- */
.view { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.has-motion .view.is-entering > * { animation: view-in 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden; }
.card__head { display: flex; align-items: center; gap: 16px; min-height: 52px; padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.card__title { font-size: 16px; font-weight: 500; line-height: 24px; }

/* ---------- 顶部状态框（ContentBox） ---------- */
.box { --tone: var(--op); --surface: var(--op-surface); --ink: var(--op-ink); border-color: var(--tone); }
.box--degraded { --tone: var(--deg); --surface: var(--deg-surface); --ink: var(--deg-ink); }
.box--partial { --tone: var(--par); --surface: var(--par-surface); --ink: var(--par-ink); }
.box--full { --tone: var(--full); --surface: var(--full-surface); --ink: var(--full-ink); }
.box--maintenance { --tone: var(--maint); --surface: var(--maint-surface); --ink: var(--maint-ink); }
.box__head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 16px; background: var(--surface); font-size: 16px; font-weight: 500; line-height: 24px; }
.box__sub { padding: 16px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-bottom: 1px solid var(--divider); }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: var(--surface); color: var(--ink); font-weight: 500; transition: border-color 0.15s var(--ease); }
.badge:hover, .badge.is-highlighted { border-color: var(--tone); }
.badge--degraded { --tone: var(--deg); --surface: var(--deg-surface); --ink: var(--deg-ink); }
.badge--partial { --tone: var(--par); --surface: var(--par-surface); --ink: var(--par-ink); }
.badge--full { --tone: var(--full); --surface: var(--full-surface); --ink: var(--full-ink); }
.badge--maintenance { --tone: var(--maint); --surface: var(--maint-surface); --ink: var(--maint-ink); }

.event { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 10px; padding: 16px; }
.event + .event { border-top: 1px solid var(--divider); }
.event > .status-icon { margin-top: 2px; }
.event__title { justify-self: start; font-weight: 500; }
.event__title:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--slate-300); }
.event__msg { grid-column: 2; margin-top: 8px; white-space: pre-line; overflow-wrap: anywhere; }
.event__msg a, .inc-body a.inline, .update__msg a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--slate-300); }
.event__meta { grid-column: 2; margin-top: 8px; color: var(--muted); }
/* 按“·”分隔的整项换行，不在词中间断开。每一项前面都放一个点，再把每行最左边那个裁掉：
   换行后的行首不会出现“·”（用在没有左内边距的元素上） */
.dots { margin-left: -18px; clip-path: inset(-6px -6px -6px 18px); }
.dots > * { display: inline-block; }
.dots > *::before { content: '·'; display: inline-block; width: 18px; text-align: center; color: var(--slate-300); }

/* 状态图标 */
.status-icon { flex: none; display: block; width: 16px; height: 16px; }
.status-icon--operational { color: var(--op); }
.status-icon--degraded { color: var(--deg); }
.status-icon--partial { color: var(--par); }
.status-icon--full { color: var(--full); }
.status-icon--maintenance { color: var(--maint); }
.status-icon--none { color: var(--slate-200); }

/* ---------- 系统状态 ---------- */
.range { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); }
.range__btn { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: var(--slate-400); transition: color 0.15s var(--ease); }
.range__btn:hover:not(:disabled) { color: var(--slate-500); }
.range__btn:disabled { color: var(--slate-100); cursor: not-allowed; }
.range__label { white-space: nowrap; }

.group + .group { border-top: 1px solid var(--divider); }
.row { padding: 16px 16px 17px; }
.row__line { display: flex; align-items: center; gap: 10px; min-height: 20px; }
.row__name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; }
.row__name > span:first-child, .row__name > h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__name > h3, .box__head > h2 { font: inherit; }
.row__info { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--slate-300); cursor: help; transition: color 0.15s var(--ease); }
.row__info:hover, .row__info:focus-visible { color: var(--slate-500); }
.row__toggle { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); white-space: nowrap; transition: color 0.15s var(--ease); }
.row__toggle:hover { color: var(--text); }
.row__toggle svg { transition: transform 0.3s var(--ease); }
.group.is-open .row__toggle { color: var(--text); }
.group.is-open .row__toggle svg { transform: rotate(90deg); }
.row__uptime { margin-left: auto; color: var(--muted); white-space: nowrap; }
.group.is-open > .row > .row__line > .status-icon,
.group.is-open > .row > .bars,
.group.is-open > .row > .row__line .row__uptime { display: none; }
.group.is-open > .row { padding-bottom: 0; }

.group__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.group.is-open .group__body { grid-template-rows: 1fr; }
.group__inner { min-height: 0; overflow: hidden; }
.group__inner > .row { padding-top: 16px; padding-bottom: 0; opacity: 0; transition: opacity 0.25s var(--ease); }
.group__inner > .row:last-child { padding-bottom: 17px; }
.group.is-open .group__inner > .row { opacity: 1; transition-delay: calc(var(--i, 0) * 20ms + 40ms); }

/* 每日色块：整条是热区，按指针 x 坐标换算到天，色块间隙也能命中 */
.bars { position: relative; display: flex; height: 24px; margin: 4px -1.17px -4px; touch-action: pan-y; }
.pill { flex: 1 1 0; min-width: 0; padding: 4px 1.17px; }
.pill::before { content: ''; display: block; height: 16px; border-radius: 1px; background: var(--c); transition: background-color 0.15s var(--ease); }
.pill--operational { --c: var(--op); --h: var(--op-hover); }
.pill--degraded { --c: var(--deg); --h: var(--deg-hover); }
.pill--partial { --c: var(--par); --h: var(--par-hover); }
.pill--full { --c: var(--full); --h: var(--full-hover); }
.pill--maintenance { --c: var(--maint); --h: var(--maint-hover); }
.pill--none { --c: var(--slate-50); --h: var(--slate-100); }
.pill.is-active::before { background: var(--h); }
.has-motion .bars.is-entering .pill::before { animation: pill-in 0.5s var(--ease) both; animation-delay: calc(var(--d, 0) * 3ms + var(--rd, 0ms)); transform-origin: 50% 100%; }
@keyframes pill-in { from { transform: scaleY(0.2); opacity: 0; } to { transform: none; opacity: 1; } }

.foot-actions { display: flex; justify-content: center; }

/* ---------- 色块悬浮提示（TooltipBubble） ---------- */
.tip { position: fixed; z-index: 90; width: 256px; padding-top: 4px; opacity: 0; visibility: hidden; transform: translateY(-2px) scale(0.95); transform-origin: top center; transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s linear 0.2s; pointer-events: none; }
.tip.is-visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s; }
.tip__bubble { padding: 4px; border: 1px solid var(--slate-100); border-radius: 6px; background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.tip__date { padding: 4px; color: var(--faint); white-space: nowrap; }
.tip__empty { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; color: var(--faint); }
.tip__link { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border-radius: 4px; font-weight: 500; transition: background-color 0.15s var(--ease); }
.tip__link:hover, .tip__link:focus-visible { background: var(--slate-50); }
.tip__link .status-icon { flex: none; }
.tip--text { width: auto; max-width: min(300px, 60vw); }
.tip--text .tip__bubble { padding: 6px 8px; }

/* ---------- 历史记录 ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }
.hist-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.hist-head h1 { font-size: 16px; font-weight: 600; line-height: 24px; }
.hist-head .filter { margin-left: auto; }
.hist-section-title { padding: 4px 0; font-weight: 600; }
.month__title { padding: 12px 0 4px; font-size: 14px; line-height: 20px; font-weight: 600; }
.day { display: grid; grid-template-columns: 72px minmax(0, 1fr); padding: 20px 0 28px; border-bottom: 1px solid var(--divider); }
.month .day:last-child { border-bottom: 0; }
.day__date { font-weight: 600; white-space: nowrap; }
.day__date small { margin-left: 4px; color: var(--faint); font-size: 12px; font-weight: 400; }
.day__list { display: grid; gap: 24px; min-width: 0; }
.h-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 0 12px 0 16px; }
.h-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--c, var(--deg)); }
.h-item__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 500; }
.h-item:hover .h-item__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--slate-300); }
.h-item__time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.h-item__msg { grid-column: 1 / -1; color: var(--slate-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--slate-50); color: var(--slate-600); font-size: 12px; font-weight: 500; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 48px 16px; text-align: center; color: var(--muted); }
.empty .status-icon { width: 24px; height: 24px; }

/* 组件筛选 */
.filter { position: relative; }
.filter__btn { height: 34px; padding: 0 10px; border: 0.5px solid var(--slate-200); border-radius: 6px; background: #fff; color: var(--text); font-weight: 500; gap: 8px; }
.filter__btn:hover, .filter.is-open .filter__btn { background: var(--slate-50); border-color: var(--slate-300); }
.filter__btn svg { color: var(--muted); transition: transform 0.25s var(--ease); }
.filter.is-open .filter__btn svg { transform: rotate(180deg); }
.filter__panel { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: 300px; max-width: calc(100vw - 32px); max-height: min(420px, 60vh); overflow: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--slate-100); border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.05); opacity: 0; visibility: hidden; transform: translateY(-2px) scale(0.98); transform-origin: top right; transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s linear 0.2s; }
.filter.is-open .filter__panel { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s; }
.filter__clear { display: block; width: calc(100% + 8px); margin: 4px -4px -4px; padding: 8px; border-top: 1px solid var(--divider); color: var(--muted); text-align: center; }
.filter__clear:hover { color: var(--text); }

/* 复选框（与参考站一致：深色填充 + 白色对勾） */
.check { position: relative; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 8px; border-radius: 4px; cursor: pointer; user-select: none; }
.check:hover { background: var(--slate-50); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box { flex: none; width: 16px; height: 16px; border: 1px solid var(--slate-200); border-radius: 4px; background: #fff center / 100% no-repeat; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.check:hover .check__box { border-color: var(--slate-500); }
.check input:checked + .check__box { background-color: var(--slate-900); border-color: var(--slate-900); background-image: url("data:image/svg+xml,%3Csvg viewBox='-2.25 -2.25 14.5 12.5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.40387 4.63462L3.30772 6.75L8.59618 1.25' stroke='%23f5f7f9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check input:indeterminate + .check__box { background-color: var(--slate-900); border-color: var(--slate-900); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 8h7' stroke='%23f5f7f9' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.check input:focus-visible + .check__box { outline: 2px solid var(--slate-400); outline-offset: 2px; }
.check--child { padding-left: 32px; }
.check--group { font-weight: 500; }

/* ---------- 事件详情 ---------- */
.inc-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 16px; background: var(--surface); font-size: 16px; font-weight: 500; line-height: 24px; }
.inc-head .back { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; margin-left: -4px; border-radius: 4px; color: var(--slate-400); transition: color 0.15s var(--ease); }
.inc-head .back:hover { color: var(--slate-600); }
.inc-head h1 { font-size: inherit; font-weight: inherit; line-height: inherit; overflow-wrap: anywhere; }
.inc-sub { padding: 12px 16px; border-bottom: 1px solid var(--divider); color: var(--muted); }
.inc-body { padding: 16px; }
.inc-body > p:first-child { white-space: pre-line; overflow-wrap: anywhere; }
.inc-body .event__meta { margin-top: 12px; }
.inc-body .event__meta a:hover { color: var(--text); }
.writeup { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--divider); }
.writeup svg { flex: none; color: var(--muted); }
.writeup a { margin-left: auto; font-weight: 500; white-space: nowrap; }
.writeup a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--slate-300); }

.timeline-axis { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--divider); color: var(--faint); font-size: 12px; line-height: 16px; }
.seg-row { padding: 16px; }
.seg-row + .seg-row { border-top: 1px solid var(--divider); }
.seg-row.is-open .row__toggle { color: var(--text); }
.seg-row.is-open .row__toggle svg { transform: rotate(90deg); }
.segs { display: flex; gap: 4px; height: 16px; margin-top: 12px; }
.seg { flex: var(--w) 1 0; min-width: 4px; border-radius: 2px; background: var(--c); transition: background-color 0.15s var(--ease); }
.seg:hover { background: var(--h); }
.has-motion .segs.is-entering .seg { animation: seg-in 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); transform-origin: 0 50%; }
@keyframes seg-in { from { transform: scaleX(0); } to { transform: none; } }
.seg-children { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.seg-row.is-open .seg-children { grid-template-rows: 1fr; }
.seg-children > div { min-height: 0; overflow: hidden; }
.seg-child { padding-top: 16px; }
.seg-child .segs { margin-top: 8px; }

.updates { padding: 20px 16px 0; }
.update { position: relative; padding: 0 0 24px 16px; }
.update::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--slate-300)); }
.update::after { content: ''; position: absolute; left: 2.5px; top: 21px; bottom: 4px; width: 1px; background: var(--c, var(--slate-100)); }
.update:last-child::after { display: none; }
.update__status { font-weight: 500; }
.update__msg { margin-top: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.update__time { margin-top: 12px; color: var(--muted); }
.update__time span { color: var(--faint); }
.update--resolved, .update--completed { --c: var(--op); }
.update--investigating, .update--identified { --c: var(--full); }
.update--monitoring { --c: var(--deg); }
.update--scheduled, .update--in_progress { --c: var(--maint); }
.update--pending { --c: var(--slate-200); color: var(--faint); }
.update--pending::after { background: none; border-left: 1px dashed var(--slate-200); width: 0; }

/* ---------- 页脚 ---------- */
.foot { display: grid; justify-items: center; gap: 12px; margin-top: 40px; color: var(--muted); text-align: center; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.foot__brand { display: inline-flex; align-items: flex-start; gap: 2px; font-family: 'Inter', 'Inter Fallback', sans-serif; font-weight: 700; letter-spacing: -0.02em; transition: color 0.15s var(--ease); }
.foot__brand span { font-size: 8px; line-height: 10px; letter-spacing: 0.06em; font-weight: 600; }
.foot__brand:hover { color: var(--text); }
.foot__dot { color: var(--slate-300); }
.foot__links { display: flex; align-items: center; gap: 16px; }
.foot__links > a:hover { color: var(--text); }
.foot__note { max-width: 660px; color: var(--faint); font-size: 12px; line-height: 16px; }

.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--muted); transition: color 0.15s var(--ease), background-color 0.15s var(--ease); }
.lang__btn:hover, .lang.is-open .lang__btn { color: var(--text); background: var(--slate-50); }
.lang__menu { position: absolute; left: 50%; bottom: calc(100% + 4px); z-index: 30; min-width: 140px; padding: 4px; border: 1px solid var(--slate-100); border-radius: 6px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.05); text-align: left; opacity: 0; visibility: hidden; transform: translate(-50%, 2px) scale(0.98); transform-origin: bottom center; transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s linear 0.2s; }
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s; }
.lang__menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 32px; padding: 6px 8px; border-radius: 4px; color: var(--text); white-space: nowrap; }
.lang__menu button:hover { background: var(--slate-50); }
.lang__menu button[aria-selected='true'] { font-weight: 500; }
.lang__menu button[aria-selected='true']::after { content: ''; width: 4px; height: 8px; margin: -2px 2px 0 12px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }

/* ---------- 订阅弹窗 ---------- */
.modal { width: min(624px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: 110px auto auto; padding: 0; border: 0; border-radius: var(--radius); background: #fff; color: var(--text); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04); overflow: hidden; }
.modal::backdrop { background: rgba(22, 22, 24, 0.05); }
.modal[open] { display: flex; flex-direction: column; }
.has-motion .modal[open] { animation: modal-in 0.2s ease-out; }
.has-motion .modal[open]::backdrop { animation: fade-in 0.2s ease-out; }
.has-motion .modal.is-closing { animation: modal-out 0.15s ease-in forwards; }
.has-motion .modal.is-closing::backdrop { animation: fade-out 0.15s ease-in forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-2px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(-2px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.modal__inner { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 12px 16px 16px; border-bottom: 1px solid var(--divider); }
.modal__head h2 { font-size: 18px; font-weight: 500; line-height: 28px; }
.modal__body { min-height: 0; overflow: auto; padding: 16px; }
.modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px; border-top: 1px solid var(--divider); }
.modal__msg { margin-right: auto; color: var(--muted); font-size: 13px; line-height: 18px; }
.modal__msg.is-error { color: var(--full-ink); }
.modal__msg.is-ok { color: var(--op-ink); }

.tabs { position: relative; display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--slate-100); }
.tabs__tab { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; color: var(--faint); font-weight: 500; transition: color 0.15s var(--ease); }
.tabs__tab:hover, .tabs__tab.is-active { color: var(--text); }
.tabs__ink { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--w, 0); background: var(--text); transform: translateX(var(--x, 0)); transition: transform 0.3s var(--ease), width 0.3s var(--ease); }
.field { display: grid; gap: 8px; }
.field__label { display: block; font-weight: 500; }
.input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--slate-200); border-radius: 6px; background: #fff; color: var(--text); font: inherit; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--slate-400); box-shadow: 0 0 0 3px rgba(149, 149, 157, 0.15); }
.input.is-invalid { border-color: var(--full); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }
.tabpanel > .check { margin: 16px -8px 0; }
.sub-components { margin-top: 6px; padding: 4px; max-height: 240px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--slate-100); border-radius: 6px; }
.notice { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 6px; background: var(--slate-50); }
.notice svg { flex: none; margin-top: 2px; color: var(--muted); }
.feed-links { display: grid; gap: 8px; margin-top: 12px; }
.feed-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0.5px solid var(--slate-200); border-radius: 6px; font-weight: 500; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease); }
.feed-link:hover { background: var(--slate-50); border-color: var(--slate-300); }
.feed-link svg { color: var(--muted); }
.feed-link .feed-link__copy { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 13px; }
.feed-empty { margin-top: 12px; color: var(--muted); }

/* ---------- 其它 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; padding: 8px 14px; border-radius: 6px; background: var(--slate-800); color: #fff; font-size: 13px; transform: translate(-50%, 6px); opacity: 0; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.demo-flag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--maint-surface); color: var(--maint-ink); font-size: 12px; font-weight: 500; }

.skeleton { display: grid; gap: 24px; }
.skeleton__card { height: 108px; border-radius: var(--radius); background: linear-gradient(90deg, var(--slate-50) 0%, #fcfcfc 40%, var(--slate-50) 80%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton__card--tall { height: 420px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice-card { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; text-align: center; }
.notice-card h1 { font-size: 16px; font-weight: 500; line-height: 24px; }
.notice-card p { color: var(--muted); }
.notice-card .status-icon { width: 24px; height: 24px; }

/* ---------- 窄屏：与参考站一致，只列状态与名称，不画色块 ---------- */
@media (max-width: 639px) {
  .page { padding-top: calc(24px + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .top { margin-bottom: 24px; }
  .brand__word { font-size: 23px; }
  .status-card .range,
  .status-card .bars,
  .status-card .row__uptime,
  .status-card .row__count { display: none; }
  .status-card .row { padding: 20px 16px; }
  .status-card .row__line { cursor: pointer; }
  .status-card .group.is-open > .row > .row__line > .status-icon { display: block; }
  .status-card .group.is-open > .row { padding-bottom: 8px; }
  .status-card .group__inner > .row { padding: 10px 16px 10px 42px; }
  .status-card .group__inner > .row:last-child { padding-bottom: 18px; }
  .status-card .group__inner .row__name { font-weight: 400; }
  .day { grid-template-columns: 1fr; gap: 12px; }
  .h-item { padding-right: 0; }
  .hist-head .filter { margin-left: 0; width: 100%; }
  .filter__btn { width: 100%; justify-content: space-between; }
  .filter__panel { left: 0; right: auto; width: 100%; max-width: none; transform-origin: top center; }
  .modal { width: 100%; max-height: 88dvh; margin: auto 0 0; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .has-motion .modal[open] { animation: sheet-in 0.3s var(--ease); }
  .has-motion .modal.is-closing { animation: sheet-out 0.2s var(--ease) forwards; }
  .timeline-axis span:first-child { max-width: 60%; }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }

@media (pointer: coarse) {
  .row__info { width: 32px; height: 32px; margin: -8px; }
  .range__btn { width: 32px; height: 32px; }
  .row__toggle { min-height: 32px; }
  .check { min-height: 40px; }
  .lang__btn { height: 36px; padding: 0 12px; }
  .lang__menu button { min-height: 40px; }
}
@media (hover: none) {
  .btn--primary:hover { background: var(--slate-800); }
  .btn--secondary:hover { background: #fff; border-color: var(--slate-200); }
  .row__toggle:hover { color: var(--muted); }
  .seg:hover { background: var(--c); }
  .check:hover { background: none; }
  .check:hover .check__box { border-color: var(--slate-200); }
  /* 触屏点过后浏览器会一直保持 :hover，恢复成各自的默认样式 */
  .badge:hover:not(.is-highlighted) { border-color: transparent; }
  .row__info:hover:not(:focus-visible) { color: var(--slate-300); }
  .icon-btn:hover { background: transparent; color: var(--muted); }
  .btn--modal:hover { background: rgba(228, 228, 231, 0.4); }
  .tip__link:hover:not(:focus-visible), .lang__menu button:hover { background: transparent; }
  .feed-link:hover { background: transparent; border-color: var(--slate-200); }
  .filter:not(.is-open) .filter__btn:hover { background: #fff; border-color: var(--slate-200); }
  .lang:not(.is-open) .lang__btn:hover { background: transparent; color: var(--muted); }
  .tabs__tab:hover:not(.is-active) { color: var(--faint); }
  .range__btn:hover:not(:disabled) { color: var(--slate-400); }
  .event__title:hover, .h-item:hover .h-item__name, .writeup a:hover { text-decoration: none; }
}

.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
@media (forced-colors: active) {
  .pill::before, .seg { forced-color-adjust: none; }
}
