:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111113;
  --bg-elev: #151518;
  --surface: #18181b;
  --surface-hover: #1e1e23;
  --stage: #121215;
  --stage-elev: #19191e;
  --ink: #f5f5f7;
  --ink-soft: #d2d2d8;
  --muted: #8e8e98;
  --faint: #62626d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --inset-top: rgba(255, 255, 255, 0.06);
  --accent: #0071fc;
  --accent-hover: #1d84ff;
  --accent-soft: rgba(0, 113, 252, 0.16);
  --accent-ink: #7db4ff;
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.15);
  --purple: #8b6bff;
  --purple-soft: rgba(139, 107, 255, 0.15);
  --nav-bg: rgba(17, 17, 19, 0.78);
  --pill-active-bg: #f5f5f7;
  --pill-active-ink: #111113;
  --card-shadow: inset 0 1px 0 var(--inset-top), inset 0 0 0 1px var(--line);
  --card-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px var(--line-strong), 0 24px 48px -28px rgba(0, 0, 0, 0.75);
  --menubar-bg: rgba(30, 30, 36, 0.88);
  --menubar-border: rgba(255, 255, 255, 0.09);
  --grid-dot: rgba(255, 255, 255, 0.06);
  --toast-bg: #f5f5f7;
  --toast-ink: #111113;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elev: #fafafa;
  --surface: #f6f7f9;
  --surface-hover: #eff1f5;
  --stage: #f1f3f7;
  --stage-elev: #ffffff;
  --ink: #14161a;
  --ink-soft: #30343d;
  --muted: #666c78;
  --faint: #9298a4;
  --line: rgba(20, 22, 26, 0.08);
  --line-strong: rgba(20, 22, 26, 0.15);
  --inset-top: rgba(255, 255, 255, 0.9);
  --accent: #0066eb;
  --accent-hover: #0057cc;
  --accent-soft: rgba(0, 102, 235, 0.1);
  --accent-ink: #0057cc;
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.12);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --purple: #6d4aff;
  --purple-soft: rgba(109, 74, 255, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --pill-active-bg: #14161a;
  --pill-active-ink: #ffffff;
  --card-shadow: inset 0 1px 0 var(--inset-top), inset 0 0 0 1px var(--line);
  --card-shadow-hover: inset 0 1px 0 #ffffff, inset 0 0 0 1px var(--line-strong), 0 20px 40px -28px rgba(15, 23, 42, 0.18);
  --menubar-bg: rgba(255, 255, 255, 0.88);
  --menubar-border: rgba(20, 22, 26, 0.08);
  --grid-dot: rgba(20, 22, 26, 0.08);
  --toast-bg: #14161a;
  --toast-ink: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

.mono {
  font-family: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.tabular { font-variant-numeric: tabular-nums; }

/* Masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 113, 252, 0.25);
}

.brand-name {
  font-size: 15px;
  color: var(--ink);
}

.brand-host {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: background-color 180ms ease, color 180ms ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav-link.active {
  color: var(--pill-active-ink);
  background: var(--pill-active-bg);
}

.nav-mini-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: block;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.search-trigger:hover {
  color: var(--ink);
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 11px;
  color: var(--faint);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.icon-btn:hover {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.icon-btn:active { transform: scale(0.95); }

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Home Hero */
.hero {
  position: relative;
  padding: 92px 0 68px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -120px auto auto 50%;
  transform: translateX(-50%);
  width: 780px;
  height: 440px;
  background: radial-gradient(ellipse at center, rgba(0, 113, 252, 0.16) 0%, rgba(139, 107, 255, 0.08) 40%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .hero-glow {
  background: radial-gradient(ellipse at center, rgba(0, 102, 235, 0.1) 0%, rgba(109, 74, 255, 0.06) 40%, transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 54px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero-sub {
  margin: 18px auto 30px;
  max-width: 480px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-ctas {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease, box-shadow 180ms ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(0, 113, 252, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(0, 113, 252, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--card-shadow);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  box-shadow: inset 0 1px 0 var(--inset-top), inset 0 0 0 1px var(--line-strong);
  transform: translateY(-1px);
}

/* Floating Hero Tiles (Libraries.dev inspired) */
.hero-tiles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-tile {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 118px;
  height: 118px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), background-color 200ms ease, box-shadow 220ms ease;
  animation: floatY 6.5s ease-in-out infinite;
}

.float-tile:hover {
  background: var(--surface-hover);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-5px) scale(1.04) !important;
}

.float-tile img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
}

.float-tile span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.tile-tl { left: 28px; top: 44px; animation-delay: 0s; }
.tile-tr { right: 28px; top: 52px; animation-delay: -2.2s; }

.tile-pill {
  position: absolute;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  font-size: 12px;
  color: var(--ink-soft);
  animation: floatY 7.2s ease-in-out infinite;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease;
}

.tile-pill:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.tile-bl { left: 72px; bottom: 26px; animation-delay: -1.4s; }
.tile-br { right: 64px; bottom: 30px; animation-delay: -3.8s; }

@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

/* Filter Toolbar (allan.xin inspired) */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms ease;
}

.filter-pill:hover { color: var(--ink); background: var(--surface-hover); }
.filter-pill.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-ink);
  box-shadow: none;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  color: var(--faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 34px 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  outline: none;
  transition: box-shadow 180ms ease, background-color 180ms ease;
}

.search-box input:focus {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft);
}

.search-box .kbd {
  position: absolute;
  right: 8px;
}

/* App Showcase Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 12px;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), background-color 200ms ease, box-shadow 260ms ease;
}

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

.card-stage {
  position: relative;
  height: 248px;
  border-radius: 16px;
  background: var(--stage);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 18px 18px;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-badge-float {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 550;
  background: var(--menubar-bg);
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
}

.card-footer {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 8px 8px;
}

.card-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.card-meta {
  flex: 1;
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.ver-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 550;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card-desc {
  margin: 5px 0 10px;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--faint);
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: transform 200ms ease, color 200ms ease;
}

.app-card:hover .card-arrow {
  color: var(--accent-ink);
  transform: translateX(3px);
}

/* Mini macOS MenuBar & Interactive Widgets inside Stages */
.mac-menubar {
  width: 100%;
  max-width: 390px;
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--menubar-bg);
  box-shadow: inset 0 0 0 1px var(--menubar-border), 0 8px 24px -10px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink);
}

.mac-menubar-left, .mac-menubar-right {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.mac-apple-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.72;
}

.mac-fish-img {
  height: 17px;
  width: auto;
  display: block;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}

.stage-glass-card {
  width: 100%;
  max-width: 390px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--stage-elev);
  box-shadow: var(--card-shadow), 0 14px 30px -18px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.wifi-mini-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.dot-live.warn { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.dot-live.checking { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.wifi-mini-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11.5px;
  color: var(--ink-soft);
}

.clock-big-display {
  margin-top: 14px;
  padding: 14px 22px;
  border-radius: 16px;
  background: var(--stage-elev);
  box-shadow: var(--card-shadow), 0 16px 32px -18px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.clock-big-time {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.clock-big-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.clock-preset-chips {
  margin-top: 10px;
  display: inline-flex;
  gap: 6px;
}

.clock-preset-chips span {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.clock-preset-chips span.active {
  background: var(--purple-soft);
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(139, 107, 255, 0.28);
}

/* Future coming-soon slot */
.more-banner {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: 20px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.more-banner strong { color: var(--ink); font-weight: 600; }

/* Architecture Section */
.section {
  padding: 72px 0 0;
}

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

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

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

.bento-card {
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.bento-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--stage);
  box-shadow: inset 0 0 0 1px var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  margin-bottom: 14px;
}

.bento-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.bento-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.api-box {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.api-code {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.api-badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 650;
}

.api-url {
  font-size: 12.5px;
  color: var(--ink-soft);
  word-break: break-all;
}

/* Detail Page (Libraries.dev /beam sidebar + main stage layout) */
.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 80px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-group { margin-bottom: 24px; }

.sidebar-label {
  padding: 0 10px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.sidebar-link.active {
  background: var(--surface-hover);
  color: var(--ink);
  box-shadow: var(--card-shadow);
}

.sidebar-app-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.sidebar-ver {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
}

.detail-main { min-width: 0; }

.detail-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--line);
}

.detail-icon-wrap img {
  width: 100%;
  height: 100%;
  display: block;
}

.detail-pager {
  display: inline-flex;
  gap: 8px;
}

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

.detail-main h1 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 40px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.detail-sub {
  margin: 10px 0 24px;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 660px;
}

.download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.download-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

.download-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Tabs */
.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tab-group {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tab-btn {
  height: 30px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

.tab-btn.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-ink);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 200ms ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Interactive Playground Stage */
.playground {
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  padding: 14px;
  margin-bottom: 26px;
}

.playground-stage {
  min-height: 290px;
  border-radius: 16px;
  background: var(--stage);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 20px 20px;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.playground-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 8px 4px;
}

.ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ctrl-chip {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--stage);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms ease;
}

.ctrl-chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }

.ctrl-chip.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 252, 0.35);
}

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

/* Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.highlight-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.highlight-card h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.highlight-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Install & Requirements */
.install-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
}

.req-list li::before {
  content: "✓";
  color: var(--green);
  margin-right: 8px;
  font-weight: 700;
}

.notice-card {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.meta-kv-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}

.meta-kv-key { font-size: 12px; color: var(--muted); }
.meta-kv-val { font-size: 12px; color: var(--ink-soft); word-break: break-all; }

/* Changelog */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.release-card {
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.release-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.release-ver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 650;
}

.release-body ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.75;
}

.release-body p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* Footer */
.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin: 10px 0 0;
  max-width: 300px;
  font-size: 13px;
  color: var(--muted);
}

.footer-cols {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  transition: color 160ms ease;
}

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

.footer-copy {
  max-width: 1120px;
  margin: 26px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--faint);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 13px;
  font-weight: 550;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: opacity 200ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 100;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 1060px) {
  .hero-tiles { display: none; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .sidebar { position: static; display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
  .sidebar-group { display: flex; align-items: center; gap: 6px; margin: 0; }
  .sidebar-label { display: none; }
  .sidebar-link { white-space: nowrap; margin: 0; }
}

@media (max-width: 820px) {
  .nav-pills { display: none; }
  .brand-host { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .arch-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .search-box { width: 100%; }
  .hero { padding: 60px 0 44px; }
}
