/* ==========================================================================
   MangaCore — 公共站点样式
   零框架、无外链字体，全部使用系统字体与内联 SVG。
   ========================================================================== */

:root {
  --bg: #0a0c11;
  --bg-soft: #0d1017;
  --surface: #12161f;
  --surface-2: #171d29;
  --surface-3: #1d2433;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --text-soft: #c3cadb;
  --muted: #98a2b8;
  --faint: #6b7488;
  --brand: #7f97ff;
  --brand-2: #b387ff;
  --brand-ink: #0b1020;
  --brand-soft: rgba(127, 151, 255, 0.12);
  --brand-glow: rgba(127, 151, 255, 0.3);
  --ok: #3ddc97;
  --warn: #f5b942;
  --bad: #ff6b7a;
  --ok-soft: rgba(61, 220, 151, 0.12);
  --warn-soft: rgba(245, 185, 66, 0.12);
  --bad-soft: rgba(255, 107, 122, 0.12);
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 20px 50px -22px rgba(0, 0, 0, 0.75);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef1f8;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #101728;
  --text-soft: #2c3648;
  --muted: #5a6478;
  --faint: #8a93a6;
  --brand: #4f63f0;
  --brand-2: #8b5cf6;
  --brand-ink: #ffffff;
  --brand-soft: rgba(79, 99, 240, 0.1);
  --brand-glow: rgba(79, 99, 240, 0.2);
  --ok-soft: rgba(16, 160, 105, 0.12);
  --warn-soft: rgba(190, 125, 10, 0.12);
  --bad-soft: rgba(212, 47, 64, 0.1);
  --shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.28);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(127, 151, 255, 0.14), transparent 62%),
    radial-gradient(720px 440px at 92% 4%, rgba(179, 135, 255, 0.12), transparent 60%);
  pointer-events: none;
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(79, 99, 240, 0.14), transparent 62%),
    radial-gradient(720px 440px at 92% 4%, rgba(139, 92, 246, 0.12), transparent 60%);
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: rgba(127, 151, 255, 0.32);
  color: var(--text);
}

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

.wrap {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.ico {
  flex: none;
  vertical-align: -0.15em;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  transition: top 0.2s ease;
}

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

/* ------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 6px 18px -8px var(--brand-glow);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--brand-soft);
}

.nav-link.active {
  color: var(--text);
  background: var(--brand-soft);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--brand);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.menu-btn {
  display: none;
}

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 14px 30px -14px var(--brand-glow);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px -14px var(--brand-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 10px;
}

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

.hero {
  position: relative;
  padding: clamp(52px, 8vw, 104px) 0 clamp(56px, 7vw, 90px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 640px;
  background:
    radial-gradient(48% 52% at 30% 34%, rgba(127, 151, 255, 0.22), transparent 70%),
    radial-gradient(42% 48% at 74% 26%, rgba(179, 135, 255, 0.18), transparent 68%);
  filter: blur(12px);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(72% 62% at 50% 24%, #000 20%, transparent 78%);
  pointer-events: none;
}

:root[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
  background: linear-gradient(180deg, var(--text) 18%, color-mix(in srgb, var(--brand) 55%, var(--text)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root[data-theme="light"] .hero-copy h1 {
  background: linear-gradient(180deg, #0f172a 30%, #3b4a9c);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-intro {
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  font-size: 12.5px;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55);
  animation: pulse 2.2s infinite;
  flex: none;
}

.live-dot.ok {
  background: var(--ok);
}

.live-dot.warn {
  background: var(--warn);
  animation: none;
}

.live-dot.bad {
  background: var(--bad);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(61, 220, 151, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0);
  }
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

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

.stat b {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 12.5px;
  color: var(--faint);
}

/* hero chat card */

.hero-chat {
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-2) 88%, transparent));
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(0.3deg);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.chat-logo {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

.chat-name {
  font-size: 13.5px;
  font-weight: 700;
}

.chat-state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.hero-chat > .chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px;
}

.bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.65;
}

.bubble b {
  color: var(--brand);
}

.bubble em {
  font-style: normal;
  color: var(--brand-2);
}

.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-bottom-right-radius: 5px;
}

.bubble.bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
  color: var(--text-soft);
}

.bubble.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 13px 14px;
}

.bubble.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s infinite ease-in-out;
}

.bubble.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.bubble.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--faint);
}

.chat-foot a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  font-weight: 600;
}

/* ------------------------------------------------------------- sections */

.section {
  padding: clamp(48px, 6vw, 76px) 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 42%, transparent) 12%, color-mix(in srgb, var(--surface) 42%, transparent) 88%, transparent);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-head h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.02em;
  font-weight: 750;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 6px;
  transition: color 0.18s ease, gap 0.18s ease;
}

.more-link:hover {
  color: var(--brand);
  gap: 9px;
}

/* ---------------------------------------------------------------- apps */

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  gap: 15px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}

.app-card-accent .app-icon {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 24px -12px var(--brand-glow);
}

.app-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.app-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-arrow {
  margin-left: auto;
  color: var(--faint);
  transition: color 0.18s ease, transform 0.18s ease;
}

.app-card:hover .app-arrow {
  color: var(--brand);
  transform: translateX(2px);
}

.app-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.app-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------- split rows */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 24px;
  gap: 16px;
  align-items: start;
  padding: 20px 12px;
  border-bottom: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.18s ease;
}

.row:hover {
  background: color-mix(in srgb, var(--surface) 66%, transparent);
}

.row-side {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  padding-top: 3px;
  letter-spacing: 0.02em;
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.row-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.row-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.row-arrow {
  color: var(--faint);
  padding-top: 3px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.row:hover .row-arrow {
  color: var(--brand);
  transform: translateX(3px);
}

.rows-lg .row {
  padding: 24px 12px;
}

.rows-lg .row-title {
  font-size: 19px;
}

/* --------------------------------------------------------------- notes */

.notes-section .wrap {
  width: min(880px, calc(100% - 48px));
}

.notes-section .notes-lg {
  max-width: none;
}


.notes {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 20px;
}

.notes::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--border-strong), transparent);
}

.note-row {
  position: relative;
}

.note-marker {
  position: absolute;
  left: -20px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}

.note-time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  margin-bottom: 6px;
}

.note-body {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.note-body p {
  margin: 0 0 8px;
}

.note-body p:last-child {
  margin-bottom: 0;
}

.note-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notes-lg {
  max-width: 760px;
  gap: 32px;
}

.notes-lg .note-body {
  font-size: 15px;
}

/* ------------------------------------------------------------ projects */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-head h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.chip-ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-soft);
}

.chip-warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  background: var(--warn-soft);
}

.chip-dim {
  opacity: 0.7;
}

.project-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-year {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 600;
}

/* ----------------------------------------------------------------- cta */

.section-cta {
  padding-bottom: clamp(64px, 8vw, 110px);
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  background:
    radial-gradient(480px 220px at 8% 0%, color-mix(in srgb, var(--brand) 4%, transparent), transparent 70%),
    linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.cta-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-glow), transparent 68%);
  opacity: 0.5;
  pointer-events: none;
}

.cta-card h2 {
  margin: 6px 0 8px;
  font-size: clamp(23px, 3vw, 32px);
  letter-spacing: -0.02em;
}

.cta-card p {
  max-width: 56ch;
  color: var(--muted);
  font-size: 14px;
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: none;
}

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

.page {
  padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 100px);
}

.page-head {
  max-width: 720px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 800;
}

.page-head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.page-head a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty {
  padding: 26px 0;
  color: var(--faint);
  font-size: 14px;
}

/* -------------------------------------------------------------- article */

.article-wrap {
  padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 8vw, 100px);
}

.article {
  max-width: 780px;
  margin-inline: auto;
}

.article-head {
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  transition: color 0.18s ease;
}

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

.article-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.article-head h1 {
  font-size: clamp(29px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.article-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 13px;
  color: var(--faint);
  font-family: var(--mono);
}

.article-foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}

.article-nav {
  display: flex;
  gap: 8px;
}

.prose {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text-soft);
  overflow-wrap: break-word;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.2em 0 0.8em;
  font-size: 1.45em;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
  scroll-margin-top: 90px;
}

.prose h3 {
  margin: 1.8em 0 0.6em;
  font-size: 1.18em;
  color: var(--text);
}

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

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.prose li {
  margin: 0.35em 0;
}

.prose li::marker {
  color: var(--brand);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 20px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
}

.prose blockquote p {
  margin: 0.6em 0;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
}

.prose pre {
  margin: 1.5em 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow-x: auto;
  line-height: 1.65;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
}

.prose img {
  margin: 1.6em auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  font-size: 14px;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--surface-2);
  color: var(--text);
}

/* ---------------------------------------------------------------- tools */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  background: var(--surface);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.tool-name {
  font-size: 15px;
  font-weight: 700;
}

.tool-desc {
  font-size: 12.5px;
  color: var(--muted);
}

.tool-panels {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-panel {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.tool-panel[hidden] {
  display: none;
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tool-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.tool-row .btn {
  margin-top: 0;
}

.code-input {
  width: 100%;
  min-height: 150px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
}

.code-input-sm {
  width: auto;
  min-height: 0;
  flex: 1;
  min-width: 200px;
}

.code-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.code-output {
  margin: 12px 0 0;
  padding: 14px 16px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-soft);
}

.code-output:empty {
  display: none;
}

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

.field-inline .code-input {
  width: 90px;
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
}

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

.check input {
  accent-color: var(--brand);
}

/* --------------------------------------------------------------- status */

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.status-banner.ok {
  border-color: color-mix(in srgb, var(--ok) 34%, transparent);
  background: linear-gradient(120deg, var(--ok-soft), transparent 60%), var(--surface);
}

.status-banner.warn {
  border-color: color-mix(in srgb, var(--warn) 34%, transparent);
  background: linear-gradient(120deg, var(--warn-soft), transparent 60%), var(--surface);
}

.status-banner.bad {
  border-color: color-mix(in srgb, var(--bad) 34%, transparent);
  background: linear-gradient(120deg, var(--bad-soft), transparent 60%), var(--surface);
}

.status-banner-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-banner-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px var(--ok-soft);
  flex: none;
}

.status-banner.warn .status-banner-dot {
  background: var(--warn);
  box-shadow: 0 0 0 6px var(--warn-soft);
}

.status-banner.bad .status-banner-dot {
  background: var(--bad);
  box-shadow: 0 0 0 6px var(--bad-soft);
}

.status-banner h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.status-banner p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--faint);
  font-family: var(--mono);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-pill.ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-soft);
}

.status-pill.warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  background: var(--warn-soft);
}

.status-pill.bad {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 30%, transparent);
  background: var(--bad-soft);
}

.status-section {
  margin-top: 34px;
}

.status-sub {
  margin-bottom: 14px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px) 220px;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.service-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.service-state {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.service-state.ok {
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.service-state.warn {
  background: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-soft);
}

.service-state.bad {
  background: var(--bad);
  box-shadow: 0 0 0 4px var(--bad-soft);
}

.service-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 650;
}

.service-detail {
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
}

.service-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 26px;
}

.bar {
  flex: 1;
  height: 100%;
  min-width: 2px;
  border-radius: 2px;
  background: var(--border-strong);
  opacity: 0.9;
}

.bar.up {
  background: color-mix(in srgb, var(--ok) 68%, transparent);
}

.bar.mid {
  background: color-mix(in srgb, var(--warn) 68%, transparent);
}

.bar.down {
  background: color-mix(in srgb, var(--bad) 68%, transparent);
}

.service-numbers {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}

.service-numbers > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 56px;
}

.service-numbers b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.service-numbers span {
  font-size: 10.5px;
  color: var(--faint);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-label {
  font-size: 12px;
  color: var(--faint);
}

.metric-value {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.metric-value-sm {
  font-size: 18px;
  margin-top: 6px;
}

.metric-note {
  font-size: 11.5px;
  color: var(--faint);
}

.meter {
  margin-top: 8px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

.cert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.status-foot {
  margin-top: 24px;
  font-size: 12px;
  color: var(--faint);
  font-family: var(--mono);
}

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

.about-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.about-card {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  text-align: center;
}

.avatar-lg {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 22px;
  font-size: 30px;
}

.about-card h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.about-card > p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--faint);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.about-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  font-size: 12px;
  color: var(--muted);
}

.about-prose {
  padding-top: 4px;
}

.about-prose h2:first-child {
  margin-top: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
}

.chip-list .chip {
  font-size: 12px;
  padding: 5px 12px;
}

.cta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* ------------------------------------------------------------- notfound */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(80px, 14vw, 160px) 0;
}

.notfound-code {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--brand);
  margin-bottom: 10px;
}

.notfound h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}

.notfound p {
  margin-top: 10px;
  color: var(--muted);
}

.notfound .hero-cta {
  justify-content: center;
  margin-top: 26px;
}

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

.footer {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 56%, transparent);
  padding: clamp(36px, 5vw, 56px) 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
}

.brand-sm .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 13px;
}

.brand-sm .brand-name {
  font-size: 14.5px;
}

.footer-note {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.7;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.footer-col h4 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-col a {
  color: var(--muted);
  width: fit-content;
  transition: color 0.16s ease;
}

.footer-col a:hover {
  color: var(--brand);
}

.copyright {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--faint);
}

/* -------------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-chat {
    max-width: 520px;
    transform: none;
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .service-row {
    grid-template-columns: minmax(0, 1fr) 200px;
  }

  .service-numbers {
    grid-column: 1 / -1;
    justify-content: flex-start;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
  }

  .service-numbers > div {
    align-items: flex-start;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .about-side {
    max-width: 420px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .wrap {
    width: min(1160px, calc(100% - 36px));
  }

  .nav {
    position: absolute;
    top: 66px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    padding: 11px 14px;
    font-size: 14.5px;
  }

  .nav-link.active::after {
    left: 4px;
    top: 50%;
    bottom: auto;
    margin-top: -2px;
  }

  .menu-btn {
    display: grid;
  }

  .topbar-actions .btn span {
    display: none;
  }

  .topbar-actions .btn {
    padding: 9px 11px;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .service-bars {
    height: 20px;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .brand-tag {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .hero-cta .btn {
    flex: 1;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat b {
    font-size: 20px;
  }

  .app-grid,
  .project-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr 20px;
    gap: 8px;
    padding: 18px 8px;
  }

  .row-side {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .row-arrow {
    grid-row: 2;
    grid-column: 2;
    align-self: center;
  }

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .article-head h1 {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
/* ------------------------------------------------ embed（工作台 iframe） */
/* 被 / 工作台以 iframe 嵌入时（?embed=1）：站点自己的顶栏/页脚不渲染，
   这里只收紧首屏留白，让内容在应用条下方显得自然。 */

html[data-embed="1"] body {
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}

html[data-embed="1"] .skip-link {
  display: none;
}

html[data-embed="1"] .hero {
  padding-top: clamp(34px, 5.5vw, 72px);
  padding-bottom: clamp(46px, 6vw, 76px);
}

html[data-embed="1"] .page {
  padding-top: clamp(26px, 3.5vw, 44px);
}

html[data-embed="1"] .studio {
  padding-top: clamp(24px, 3vw, 36px);
}

html[data-embed="1"] .footer {
  display: none;
}
