/* ============================================
   Numbly SaaS — Shared Design System
   Theme: 深炭青 + 蓝色极光玻璃态 (保持不变)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---------- Core Colors ---------- */
  --bg-deep: #0d0f16;
  --bg-deep2: #141721;
  --accent-blue: #4d7cfe;
  --accent-blue-soft: rgba(77, 124, 254, 0.35);
  --accent-blue-light: #7fa0ff;
  --accent-blue-light-soft: rgba(127, 160, 255, 0.3);
  --accent-teal: #3dd6c8;
  --accent-teal-soft: rgba(61, 214, 200, 0.2);
  --accent-amber: #f0b34b;
  --accent-amber-soft: rgba(240, 179, 75, 0.2);

  --ink-white: #e7ebf4;
  --ink-mute: #8791a8;
  --ink-faint: #565d70;

  --glass-fill: rgba(140, 160, 220, 0.045);
  --glass-fill-strong: rgba(140, 160, 220, 0.08);
  --glass-border: rgba(160, 180, 230, 0.1);
  --field-fill: rgba(255, 255, 255, 0.04);
  --field-fill-hover: rgba(255, 255, 255, 0.06);
  --divider-line: rgba(255, 255, 255, 0.07);
  --icon-fill: rgba(255, 255, 255, 0.05);
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --sheen: rgba(255, 255, 255, 0.35);
  --card-shadow: rgba(0, 0, 0, 0.5);
  --ledger-line: rgba(255, 255, 255, 0.02);
  --grain-opacity: 0.035;
  --nav-bg: rgba(13, 15, 22, 0.72);

  --aurora-bg:
    radial-gradient(650px 650px at var(--mx) var(--my), rgba(77, 124, 254, 0.16), transparent 60%),
    radial-gradient(900px 900px at calc(100% - var(--mx)) calc(100% - var(--my)), rgba(127, 160, 255, 0.08), transparent 60%),
    radial-gradient(1200px 1200px at 20% 10%, rgba(77, 124, 254, 0.04), transparent 50%),
    radial-gradient(1400px 1400px at 90% 90%, rgba(91, 100, 120, 0.05), transparent 50%);

  --mx: 50%;
  --my: 40%;

  /* ---------- Typography ---------- */
  --font-display: 'Bricolage Grotesque', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;

  /* ---------- Spacing ---------- */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* ---------- Animation ---------- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-deep: #f4f6fb;
  --bg-deep2: #e8ecf5;
  --accent-blue-light: #2f5fe0;
  --accent-blue-light-soft: rgba(47, 95, 224, 0.25);
  --ink-white: #161a24;
  --ink-mute: #57607a;
  --ink-faint: #838da5;
  --glass-fill: rgba(30, 45, 90, 0.035);
  --glass-fill-strong: rgba(30, 45, 90, 0.06);
  --glass-border: rgba(30, 45, 90, 0.1);
  --field-fill: rgba(30, 45, 90, 0.035);
  --field-fill-hover: rgba(30, 45, 90, 0.06);
  --divider-line: rgba(30, 45, 90, 0.09);
  --icon-fill: rgba(30, 45, 90, 0.045);
  --hairline: rgba(30, 45, 90, 0.09);
  --hairline-strong: rgba(30, 45, 90, 0.2);
  --sheen: rgba(255, 255, 255, 0.8);
  --card-shadow: rgba(50, 60, 100, 0.12);
  --ledger-line: rgba(30, 45, 90, 0.03);
  --grain-opacity: 0.02;
  --nav-bg: rgba(244, 246, 251, 0.78);
  --aurora-bg:
    radial-gradient(650px 650px at var(--mx) var(--my), rgba(77, 124, 254, 0.10), transparent 60%),
    radial-gradient(900px 900px at calc(100% - var(--mx)) calc(100% - var(--my)), rgba(47, 95, 224, 0.05), transparent 60%),
    radial-gradient(1200px 1200px at 20% 10%, rgba(77, 124, 254, 0.03), transparent 50%),
    radial-gradient(1400px 1400px at 90% 90%, rgba(91, 100, 120, 0.03), transparent 50%);
}

/* ========== View Transitions API 主题切换动画 ========== */

/* 禁用默认 crossfade 动画 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* 旧视图留在底层 */
::view-transition-old(root) {
  z-index: 0;
}

/* 新视图从点击位置圆形扩散展开 */
::view-transition-new(root) {
  z-index: 1;
  animation: vt-circle-expand 0.5s cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes vt-circle-expand {
  from {
    clip-path: circle(0% at var(--tx, 50vw) var(--ty, 50vh));
  }
  to {
    clip-path: circle(150% at var(--tx, 50vw) var(--ty, 50vh));
  }
}

/* 降级方案：不支持 View Transitions API 时，body 已有的 transition 作为平滑过渡 */
/* body { transition: background 0.3s ease, color 0.3s ease; } 已在下方定义 */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--ink-white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Ambient Layers ---------- */
.aurora-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--aurora-bg);
  transition: background 0.15s ease-out;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ledger-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, transparent, transparent 47px, var(--ledger-line) 48px);
}

/* ---------- Layout Wrapper ---------- */
.wrap {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ---------- View Transitions ---------- */
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: page-enter 0.4s var(--ease-out-expo) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-scale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-up {
  animation: fade-up 0.5s var(--ease-out-expo) both;
}

.animate-fade-scale {
  animation: fade-scale 0.35s var(--ease-spring) both;
}

/* Staggered children */
.stagger > * {
  opacity: 0;
  animation: fade-up 0.5s var(--ease-out-expo) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ---------- Header ---------- */
header.main-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  margin-top: 12px;
  border-radius: 100px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
  gap: 16px;
}
[data-theme="light"] header.main-header {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-white);
}

.logo .mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(77, 124, 254, 0.22), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.logo .mark svg,
.logo .mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

nav.main-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-mute);
}
nav.main-nav a {
  color: inherit;
  text-decoration: none;
  padding: 0;
  cursor: pointer;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--ink-white);
}
nav.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 2px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover {
  background: var(--field-fill-hover);
  color: var(--ink-white);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.icon-btn .icon-moon { display: none; }
[data-theme="light"] .icon-btn .icon-sun { display: none; }
[data-theme="light"] .icon-btn .icon-moon { display: block; }

.lang-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.lang-btn:hover {
  background: var(--field-fill-hover);
  color: var(--ink-white);
}

/* ---------- Sticky Nav ---------- */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  transform: translateY(0);
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}
.sticky-nav.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.sticky-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-nav-inner::-webkit-scrollbar { display: none; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-faint);
  padding: 0;
  flex-shrink: 0;
  margin-right: 12px;
}
.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--ink-white);
}
.breadcrumb .sep {
  color: var(--ink-faint);
  font-size: 10px;
  margin: 0 2px;
}
.breadcrumb .current {
  color: var(--accent-blue-light);
}

.qn-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: var(--field-fill);
  color: var(--ink-mute);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.qn-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  flex-shrink: 0;
}
.qn-btn:hover {
  background: var(--field-fill-hover);
  color: var(--ink-white);
}
.qn-btn.active {
  background: rgba(77, 124, 254, 0.14);
  border-color: rgba(77, 124, 254, 0.4);
  color: var(--accent-blue-light);
}

/* ---------- Cards ---------- */
.glass-card {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 20px 60px -20px var(--card-shadow), inset 0 1px 0 var(--hairline);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sheen), transparent);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Tool Cards Grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 780px) {
  .tool-grid { grid-template-columns: 1fr; }
}

.tool-card {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  transition: transform 0.25s var(--ease-spring), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(77, 124, 254, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-4px);
  background: var(--glass-fill-strong);
  border-color: var(--hairline-strong);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.4);
}
.tool-card:hover::after {
  opacity: 1;
}

.tool-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--icon-fill);
  border: 1px solid var(--glass-border);
  color: var(--ink-mute);
  transition: all 0.3s var(--ease-smooth);
}
.tool-card:hover .tool-card-icon {
  color: var(--accent-blue-light);
  background: rgba(77, 124, 254, 0.1);
  border-color: rgba(77, 124, 254, 0.25);
  transform: scale(1.05);
}
.tool-card-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink-white);
}
.tool-card p {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
}

.tool-card .tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  font-family: var(--font-mono);
  font-weight: 500;
}
.tag.live {
  background: rgba(77, 124, 254, 0.15);
  color: var(--accent-blue-light);
  border: 1px solid rgba(77, 124, 254, 0.3);
}
.tag.soon {
  background: var(--icon-fill);
  color: var(--ink-faint);
  border: 1px solid var(--glass-border);
}
.tag.hot {
  background: rgba(77, 124, 254, 0.12);
  color: var(--accent-blue-light);
  border: 1px solid rgba(77, 124, 254, 0.3);
}
.tag.new {
  background: rgba(61, 214, 200, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(61, 214, 200, 0.3);
}

/* ---------- Form Elements ---------- */
.money-input {
  width: 100%;
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink-white);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.money-input:focus {
  border-color: var(--accent-blue-soft);
  background: var(--field-fill-hover);
  box-shadow: 0 0 0 3px rgba(77, 124, 254, 0.08);
}

.select-input {
  width: 100%;
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink-white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238791a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.select-input:focus {
  border-color: var(--accent-blue-soft);
  background: var(--field-fill-hover);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--field-fill-hover));
  outline: none;
  margin-top: 4px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-blue-light);
  border: 2px solid var(--bg-deep);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(77, 124, 254, 0.18);
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 8px;
  font-weight: 500;
}
.field-label .val {
  font-family: var(--font-mono);
  color: var(--ink-white);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.field { margin-bottom: 22px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Section Titles ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 72px 0 24px;
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-white);
}
.section-title span {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- Trust Badges ---------- */
.trust-strip {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 60px 0 40px;
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-mute);
}
.trust-item .trust-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(77, 124, 254, 0.08);
  color: var(--accent-blue-light);
  flex-shrink: 0;
}
.trust-item .trust-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* ---------- Footer ---------- */
footer.main-footer {
  text-align: center;
  margin-top: 100px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-size: 12.5px;
}
footer.main-footer nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
footer.main-footer nav a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s;
}
footer.main-footer nav a:hover {
  color: var(--ink-white);
}

/* ---------- Calculator Grid ---------- */
.calc-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
}
@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.calc-inputs {
  padding: 36px 36px 32px;
}

.calc-result {
  background: linear-gradient(160deg, rgba(77, 124, 254, 0.05), rgba(91, 100, 120, 0.05));
  border-left: 1px solid var(--glass-border);
  border-radius: 0 22px 22px 0;
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 860px) {
  .calc-result {
    border-left: none;
    border-top: 1px solid var(--glass-border);
    border-radius: 0 0 22px 22px;
  }
}

.result-label {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 6px;
  font-weight: 500;
}

.result-number {
  font-family: var(--font-mono);
  font-size: clamp(38px, 4.5vw, 50px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-blue-light);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.result-number .cents {
  font-size: 0.55em;
  color: var(--ink-mute);
}

.result-sub {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 6px;
  margin-bottom: 26px;
}

.breakdown-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--field-fill);
}
.breakdown-bar div {
  height: 100%;
  transition: width 0.4s var(--ease-smooth);
}
.seg-net { background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-light)); }
.seg-tax { background: #4a5164; }
.seg-social { background: #2c313d; }

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: auto;
}
.b-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 10px 14px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}
.b-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 9px;
}
.b-row .name {
  display: flex;
  align-items: center;
  color: var(--ink-mute);
}
.b-row .amt {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Note ---------- */
.note {
  margin-top: 22px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.7;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

/* ---------- Dividers ---------- */
.divider-label {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-family: var(--font-display);
}
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider-line);
}

/* ---------- Toggle Row ---------- */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ink-mute);
}
.toggle-row .rate-input {
  width: 64px;
  background: var(--icon-fill);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--accent-blue-light);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  outline: none;
}

/* ---------- Segmented Control ---------- */
.segmented {
  display: flex;
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.segmented button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.segmented button.active {
  background: var(--accent-blue);
  color: #fff;
}

/* ---------- Calc Confirm Button ---------- */
.calc-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 20px;
  margin-top: 16px;
  border: none;
  border-radius: 12px;
  background: var(--accent-blue);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.calc-confirm-btn:hover {
  background: #5d8cff;
  box-shadow: 0 4px 16px rgba(77, 124, 254, 0.35);
}
.calc-confirm-btn:active {
  transform: scale(0.98);
}
.calc-confirm-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* ---------- Swap Row ---------- */
.swap-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.swap-row .field {
  flex: 1;
  margin-bottom: 0;
}
.swap-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.3s;
  margin-bottom: 1px;
}
.swap-btn:hover {
  background: var(--field-fill-hover);
  color: var(--accent-blue-light);
  transform: rotate(180deg);
}
.swap-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

/* ---------- Stat Grid ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-box {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 18px;
}
.stat-box .stat-label {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 6px;
  font-weight: 500;
}
.stat-box .stat-value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-white);
}

/* ---------- Compare Grid ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 520px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-box {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px;
  position: relative;
}
.compare-box.winner {
  border-color: rgba(77, 124, 254, 0.45);
  background: rgba(77, 124, 254, 0.07);
}
.compare-box .compare-title {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-bottom: 10px;
  font-weight: 500;
}
.compare-box .compare-value {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink-white);
  font-variant-numeric: tabular-nums;
}
.compare-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(77, 124, 254, 0.18);
  color: var(--accent-blue-light);
  letter-spacing: 0.02em;
}

/* ---------- Conv List ---------- */
.conv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--accent-blue-light);
  background: rgba(77, 124, 254, 0.08);
  border: 1px solid rgba(77, 124, 254, 0.25);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue-light);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--ink-white);
}
h1 .accent {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light), var(--accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.sub {
  color: var(--ink-mute);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Search Bar ---------- */
.search-bar-wrap {
  max-width: 520px;
  margin: 28px auto 0;
  position: relative;
}
.search-bar {
  width: 100%;
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 48px 14px 48px;
  color: var(--ink-white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-bar:focus {
  border-color: var(--accent-blue-soft);
  background: var(--field-fill-hover);
  box-shadow: 0 0 0 4px rgba(77, 124, 254, 0.08);
}
.search-bar::placeholder {
  color: var(--ink-faint);
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
.search-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}
.search-kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.search-kbd kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-strong);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

/* ---------- Hero Stats ---------- */
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-blue-light);
  line-height: 1;
}
.hero-stat .label {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* ---------- Page Header (Sub Pages) ---------- */
.page-header {
  padding: 20px 0 32px;
}
.page-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 10px;
}
.page-header .sub {
  font-size: 15px;
  color: var(--ink-mute);
  max-width: 600px;
}

/* ---------- History Sidebar ---------- */
.history-panel {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.history-panel h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-panel h3 .actions {
  display: flex;
  gap: 8px;
}
.history-panel h3 .actions button {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--ink-faint);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}
.history-panel h3 .actions button:hover {
  border-color: var(--hairline-strong);
  color: var(--ink-mute);
}
.history-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 13px;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-item:hover {
  background: var(--field-fill-hover);
  color: var(--ink-white);
}
.history-item .ts {
  font-size: 11px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.history-empty {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  padding: 20px 0;
}

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-spring), background 0.2s;
}
.back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover {
  background: var(--field-fill-hover);
  color: var(--ink-white);
}
.back-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .aurora-layer { transition: none; }
  html { scroll-behavior: auto !important; }
}

/* ---------- Solution Page ---------- */
.solution-header {
  padding: 40px 0 32px;
  text-align: center;
}
.solution-header .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(77, 124, 254, 0.1);
  border: 1px solid rgba(77, 124, 254, 0.25);
  color: var(--accent-blue-light);
}
.solution-header .icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}
.solution-header h1 {
  font-size: clamp(28px, 4vw, 42px);
}
.solution-header p {
  font-size: 15px;
  color: var(--ink-mute);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.faq-item {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color 0.25s, background 0.25s;
}
.faq-item:hover {
  border-color: var(--hairline-strong);
  background: var(--glass-fill-strong);
}
.faq-item .faq-q {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-white);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.faq-item .faq-q .q-mark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(77, 124, 254, 0.12);
  color: var(--accent-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-top: 1px;
}
.faq-item .faq-a {
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.75;
  padding-left: 34px;
}

/* ---------- Docs Page ---------- */
.docs-layout {
  display: flex;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: flex-start;
}
.docs-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
}
.docs-content h2[id],
.docs-content h3[id],
.docs-content .faq-item[id] {
  scroll-margin-top: 100px;
}
.docs-content h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 44px 0 16px;
  color: var(--ink-white);
}
.docs-content h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--ink-white);
}
.docs-content p {
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.8;
  margin-bottom: 16px;
}
.docs-content pre {
  background: var(--field-fill);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.docs-content pre code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-white);
  line-height: 1.7;
}
.docs-content .endpoint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(77, 124, 254, 0.1);
  color: var(--accent-blue-light);
}
.docs-content .method {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 13px;
}
.docs-content th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-white);
  font-weight: 600;
}
.docs-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-mute);
}

.docs-toc {
  position: sticky;
  top: 100px;
  width: 240px;
  flex-shrink: 0;
  padding: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.35s, border-color 0.35s, transform 0.35s;
}
.docs-toc:hover {
  box-shadow: 0 0 32px rgba(77, 124, 254, 0.14);
  border-color: rgba(77, 124, 254, 0.35);
  transform: translateY(-2px);
}
.docs-toc-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-white);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.docs-toc > a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  line-height: 1.5;
}
.docs-toc > a:hover,
.docs-toc > a.active {
  background: rgba(77, 124, 254, 0.12);
  color: var(--accent-blue-light);
}

.docs-toc-sub {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-left: 0;
  margin: 0 0 4px 8px;
  border-left: 1px solid var(--hairline);
  transition: max-height 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.35s ease,
              padding 0.35s ease;
}
.docs-toc:hover .docs-toc-sub {
  max-height: 700px;
  opacity: 1;
  padding: 4px 0 8px 12px;
}
.docs-toc-sub a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-mute);
  text-decoration: none;
  line-height: 1.45;
  opacity: 0.8;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.docs-toc-sub a:hover,
.docs-toc-sub a.active {
  background: rgba(77, 124, 254, 0.1);
  color: var(--accent-blue-light);
  opacity: 1;
}

@media (max-width: 900px) {
  .docs-layout {
    flex-direction: column;
    gap: 24px;
  }
  .docs-toc {
    position: static;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
  }
  .docs-toc:hover {
    transform: none;
  }
  .docs-toc-title {
    width: 100%;
    margin-bottom: 10px;
  }
  .docs-toc > a {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
  }
  .docs-toc-sub {
    display: none;
  }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}