:root {
  --bg-base: #07080d;
  --bg-elevated: #0e1018;

  --text: #f4f6fb;
  --text-secondary: #9aa3b8;
  --text-tertiary: #6b7289;

  --accent: #818cf8;
  --accent-bright: #a5b4fc;
  --accent-glow: rgba(129, 140, 248, 0.45);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.35);

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-strong: rgba(255, 255, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;
  --glass-blur-heavy: 40px;

  --input-bg: rgba(0, 0, 0, 0.35);
  --input-border: rgba(255, 255, 255, 0.1);

  --positive: #34d399;
  --negative: #f87171;

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-glass:
    0 0 0 1px var(--glass-border),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 var(--glass-highlight);
  --shadow-card:
    0 0 0 1px var(--glass-border),
    0 24px 48px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 var(--glass-highlight);

  --font: "DM Sans", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-system: "DM Sans", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 1140px;
  --header-offset: 6.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-system);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ambient background */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 22s var(--ease-out) infinite alternate;
}

.orb-a {
  width: 55vw;
  height: 55vw;
  max-width: 620px;
  max-height: 620px;
  top: -18%;
  right: -12%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.55) 0%, transparent 70%);
}

.orb-b {
  width: 45vw;
  height: 45vw;
  max-width: 480px;
  max-height: 480px;
  bottom: -8%;
  left: -10%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.4) 0%, transparent 70%);
  animation-delay: -8s;
}

.orb-c {
  width: 30vw;
  height: 30vw;
  max-width: 320px;
  max-height: 320px;
  top: 42%;
  left: 38%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.35) 0%, transparent 70%);
  animation-delay: -14s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(3%, 4%) scale(1.06);
  }
}

/* Glass utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--cyan);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg-base);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 1.25rem 0;
}

.header-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  border-radius: var(--radius-pill);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.55rem 0.55rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-mark-img {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: block;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.1rem;
}

.brand-title-row {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand-hq {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #67e8f9 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-toggle {
  margin-left: auto;
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  margin: 0 auto;
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
}

.nav-toggle-icon::before {
  top: -5px;
}

.nav-toggle-icon::after {
  top: 5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.site-nav-list,
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  justify-content: flex-end;
  align-items: center;
}

.nav-cta-partner {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: #07080d;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.25);
  transition: transform 0.2s var(--ease-out), filter 0.2s;
  white-space: nowrap;
}

.nav-cta-partner:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.nav-cta-partner[aria-current="page"] {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.site-nav a:not(.nav-cta-partner) {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.site-nav a:not(.nav-cta-partner):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border);
}

.site-nav a:not(.nav-cta-partner)[aria-current="page"] {
  color: var(--text);
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.15);
}

.site-main {
  min-height: calc(100vh - var(--header-offset) - 7rem);
}

.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Footer */
.site-footer {
  padding: 0 1.25rem 2rem;
}

.footer-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  border-radius: var(--radius);
}

.footer-inner {
  padding: 1.35rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.footer-meta {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Hero */
.hero {
  margin-bottom: 2.75rem;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-with-visual {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  max-width: var(--max-width);
  text-align: left;
}

.hero-with-visual .hero-content {
  max-width: 36rem;
}

.hero-with-visual .hero-badges {
  justify-content: flex-start;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero-with-visual {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .hero-with-visual .hero-content {
    margin: 0;
    max-width: none;
  }
  .hero-visual {
    width: 100%;
  }
  .hero-calc-widget {
    width: 100%;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-bright);
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.25);
  box-shadow: 0 0 32px rgba(129, 140, 248, 0.12);
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 8px var(--positive);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.035em;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 45%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.badge {
  padding: 0.35rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}

/* Search */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  padding: 0.65rem 1rem 0.65rem 1rem;
  border-radius: var(--radius-pill);
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
}

.search-input:focus {
  outline: none;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.calc-section {
  scroll-margin-top: calc(var(--header-offset) + 0.5rem);
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.no-results {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 2rem 0;
}

/* Calculator grid */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.calc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.35rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.25s ease,
    box-shadow 0.35s var(--ease-out),
    background 0.25s ease;
}

.calc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(129, 140, 248, 0.12),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.calc-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-strong);
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.2),
    0 28px 56px -16px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 var(--glass-highlight);
}

.calc-card:hover::before {
  opacity: 1;
}

.calc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.calc-card .icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  color: var(--accent-bright);
}

.calc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-icon svg {
  display: block;
}

.calc-card .arrow {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition:
    transform 0.3s var(--ease-out),
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.calc-card:hover .arrow {
  transform: translate(2px, -2px);
  color: var(--accent-bright);
  border-color: var(--glass-border);
  background: rgba(129, 140, 248, 0.12);
}

.calc-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.calc-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.calc-card .tag {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-pill);
}

/* Calculator page */
.page-header {
  margin-bottom: 2rem;
}

.page-header .page-eyebrow {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  margin: 0 0 0.6rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-header p {
  margin: 0;
  color: var(--text-secondary);
  width: 100%;
  max-width: none;
  font-size: 0.95rem;
}

.page-header .page-lead {
  font-size: 1rem;
  line-height: 1.65;
}

.page-summary-list {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  max-width: none;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.page-summary-list li {
  padding-left: 0.9rem;
  border-left: 2px solid rgba(34, 211, 238, 0.35);
}

.page-summary-list strong {
  color: var(--text);
}

/* Calculator page guide */
.calc-guide {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
}

.calc-guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .calc-guide-grid {
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 2rem;
  }
}

.calc-guide-visual {
  display: flex;
  justify-content: center;
}

.calc-guide-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.calc-guide-content h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  margin: 1.25rem 0 0.5rem;
}

.calc-guide-content h3:first-of-type {
  margin-top: 0;
}

.calc-guide-content p {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.calc-guide-content ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.calc-guide-content li {
  margin-bottom: 0.35rem;
}

/* Illustrations */
.illus-wrap {
  width: 100%;
  color: var(--accent-bright);
}

.illus-wrap .illus-svg {
  width: 100%;
  height: auto;
  display: block;
}

.illus-wrap-hero .illus-svg {
  max-width: 400px;
}

.illus-wrap-card .illus-svg {
  max-height: 100px;
}

.illus-wrap-banner .illus-svg {
  max-width: 160px;
}

.illus-wrap-guide .illus-svg {
  max-width: 180px;
}

/* Homepage categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    background 0.25s var(--ease-out);
}

.category-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

.category-card-visual {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
}

.category-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.25rem 0 0.4rem;
  letter-spacing: -0.02em;
}

.category-card-body p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.category-count {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.category-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
}

@media (min-width: 640px) {
  .category-banner {
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
  }
}

.category-banner-text .section-title {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.category-banner-text p {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 42rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .calc-layout.has-sidebar {
    grid-template-columns: 1fr 340px;
    align-items: start;
  }
}

.panel {
  padding: 1.5rem 1.5rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(var(--glass-blur-heavy)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
}

.panel h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin: 0 0 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1.1rem;
}

.form-grid.cols-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.field .hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-top: 0.25rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--input-bg);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input::placeholder {
  color: var(--text-tertiary);
}

.field input:hover,
.field select:hover {
  border-color: var(--glass-border-strong);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow:
    0 0 0 3px rgba(129, 140, 248, 0.15),
    0 0 24px rgba(129, 140, 248, 0.1);
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239aa3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.field select option {
  background: var(--bg-elevated);
  color: var(--text);
}

.input-prefix {
  display: flex;
  align-items: stretch;
}

.input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--input-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 0.88rem;
  font-weight: 600;
}

.input-prefix input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex: 1;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--input-bg);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.radio-group label:hover {
  border-color: var(--glass-border-strong);
  color: var(--text);
}

.radio-group label:has(input:checked) {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(129, 140, 248, 0.12);
  color: var(--text);
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.1);
}

.radio-group input {
  accent-color: var(--accent);
}

.field:has(input[type="checkbox"]) label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.field:has(input[type="checkbox"]) input {
  width: auto;
  accent-color: var(--accent);
}

/* Results */
.results {
  display: grid;
  gap: 0.25rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  margin: 0 -0.85rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.result-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.result-row .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.result-row .value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
}

.result-row.highlight {
  margin-top: 0.35rem;
  padding: 1rem 0.85rem;
  background: linear-gradient(
    135deg,
    rgba(129, 140, 248, 0.15) 0%,
    rgba(34, 211, 238, 0.08) 100%
  );
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: var(--radius-md);
}

.result-row.highlight .label {
  color: var(--text);
  font-weight: 600;
}

.result-row.highlight .value {
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent-bright), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-row.negative .value {
  color: var(--negative);
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.breakdown-table th,
.breakdown-table td {
  padding: 0.55rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.breakdown-table th {
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breakdown-table td:last-child,
.breakdown-table th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.note-box {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.note-box a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.calc-methodology {
  background: rgba(34, 211, 238, 0.08);
}

.calc-methodology details {
  margin-top: 0.65rem;
}

.calc-methodology summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.calc-methodology ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.85rem 0.4rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.back-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
}

.back-link::before {
  content: "←";
  font-size: 0.9em;
}

/* Calculate button */
.form-actions {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border);
}

.btn-calculate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #0d9488 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 8px 24px rgba(99, 102, 241, 0.35);
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn-calculate:hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 12px 32px rgba(99, 102, 241, 0.45);
}

.btn-calculate:active {
  transform: scale(0.98);
}

.btn-calculate:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.panel-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.panel-empty p {
  margin: 0;
  padding: 0.5rem 0;
}

.panel-empty strong {
  color: var(--text);
}

/* Homepage sections */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 700px) {
  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--accent-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.home-section {
  margin-bottom: 3rem;
}

.section-head {
  margin-bottom: 1.25rem;
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.calc-grid-featured {
  margin-bottom: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  padding: 1.25rem;
  border-radius: var(--radius);
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-bright);
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 40rem;
  margin: 0 auto;
}

.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--text-tertiary);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-panel {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.cta-panel h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.cta-panel p {
  margin: 0 auto 1.25rem;
  max-width: 32rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cta-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn-cta {
  width: auto;
  max-width: 320px;
  margin: 0;
  text-decoration: none;
}

.btn-cta-secondary {
  background: transparent;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
  color: inherit;
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  filter: none;
}

/* Sidebar results stick on desktop */
@media (min-width: 900px) {
  .calc-layout.has-sidebar > :last-child .panel {
    position: sticky;
    top: calc(var(--header-offset) + 1rem);
  }
}

@media (max-width: 1024px) {
  .site-nav a:not(.nav-cta-partner) {
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
  }

  .nav-cta-partner {
    font-size: 0.7rem;
    padding: 0.4rem 0.65rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0.55rem;
    right: 0.55rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(14, 16, 24, 0.92);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  }

  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .site-nav-list,
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 0.65rem 0.85rem;
  }

  .nav-cta-partner {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.panel-table {
  margin-top: 1rem;
}

.panel-table h2 {
  margin-bottom: 0.85rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -0.25rem;
}

.payslip-table .row-highlight td {
  font-weight: 700;
  color: var(--accent-bright);
}

.payslip-table .row-deduction td:last-child {
  color: var(--negative);
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .hero-eyebrow .dot {
    animation: none;
  }

  .calc-card {
    transition: border-color 0.2s ease;
  }

  .calc-card:hover {
    transform: none;
  }
}

/* —— Performance & responsive (speed + all screen sizes) —— */

html.fonts-ready body {
  font-family: var(--font);
}

.site-header {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.site-main {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.calc-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

.calc-sections-host {
  min-height: 12rem;
}

.sections-loading {
  text-align: center;
  color: var(--text-tertiary);
  padding: 2rem 1rem;
}

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 12rem;
  padding: 2rem;
  text-align: center;
}

.page-loading-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-calculate,
.nav-toggle,
.site-nav a {
  min-height: 44px;
}

.calc-card {
  touch-action: manipulation;
}

/* Comprehensive focus-visible for keyboard navigation */
.calc-card:focus-visible,
.category-card:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.site-nav a:focus-visible,
.nav-cta-partner:focus-visible,
.nav-cta-bracket:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: var(--radius-pill);
}

.btn-partner:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.partner-code:focus-visible,
.partner-strip-code:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* Ensure partner code chips meet 44px touch target on mobile */
@media (max-width: 768px) {
  .partner-code--sm {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .guide-breadcrumb a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.35rem;
  }
}

/* iOS Safari auto-zoom prevention: inputs must be >= 16px on mobile */
.search-input,
.form-grid input,
.form-grid select,
.field input,
.field select,
.field textarea {
  font-size: 1rem; /* 16px — prevents iOS Safari auto-zoom */
}

@media (min-width: 600px) {
  .search-input,
  .form-grid input,
  .form-grid select,
  .field input,
  .field select,
  .field textarea {
    font-size: 0.9375rem;
  }
}

@media (max-width: 479px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .calc-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 519px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --glass-blur: 12px;
    --glass-blur-heavy: 20px;
  }

  .orb {
    filter: blur(48px);
    opacity: 0.4;
  }

  .glass,
  .glass-subtle,
  .site-header .header-shell {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .app-container {
    padding-top: 0.5rem;
  }

  .table-scroll {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 380px) {
  .brand-tagline {
    display: none;
  }

  .brand-name,
  .brand-hq {
    font-size: 0.95rem;
  }

  .hero-badges {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Partner offers (Tide REFER200 · Capital on Tap SETTINGUP) */
.partner-strip-host {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0 var(--page-pad, 1rem);
  margin: 0 auto;
  max-width: var(--content-max, 1200px);
}

.partner-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.55rem 1rem;
  margin-top: 0.35rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.partner-strip-label {
  margin: 0;
  font-weight: 600;
  color: var(--accent, #7dd3fc);
  white-space: nowrap;
}

.partner-strip-offers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  flex: 1;
  min-width: 0;
}

.partner-strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.partner-strip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.partner-strip-link:hover {
  color: var(--accent, #7dd3fc);
}

.partner-strip-link strong {
  font-weight: 600;
}

.partner-strip-code {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
}

.partner-strip-code:hover,
.partner-code:hover {
  border-color: var(--accent, #7dd3fc);
}

.partner-strip-code.is-copied,
.partner-code.is-copied {
  border-color: #4ade80;
  color: #4ade80;
}

.partner-strip-divider {
  opacity: 0.35;
  user-select: none;
}

.partner-section .section-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent, #7dd3fc);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.partner-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
}

.partner-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
}

.partner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: rgba(125, 211, 252, 0.12);
  color: var(--accent, #7dd3fc);
}

.partner-card--card .partner-icon {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}

.partner-kind {
  display: block;
  font-size: 0.75rem;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.partner-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.partner-headline {
  text-align: right;
  line-height: 1.1;
}

.partner-headline strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent, #7dd3fc), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.partner-headline span {
  font-size: 0.7rem;
  opacity: 0.8;
}

.partner-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

.partner-bullets {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  line-height: 1.45;
  opacity: 0.88;
}

.partner-bullets li + li {
  margin-top: 0.35rem;
}

.partner-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--glass-border, rgba(255, 255, 255, 0.18));
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.partner-code-label {
  font-size: 0.75rem;
  opacity: 0.75;
  width: 100%;
}

.partner-code-value {
  font-family: ui-monospace, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.partner-code-hint {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.6;
}

.partner-code--sm {
  width: auto;
  padding: 0.35rem 0.6rem;
}

.partner-code--sm .partner-code-value {
  font-size: 0.85rem;
}

.btn-partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  color: #07080d;
  background: linear-gradient(135deg, var(--accent, #7dd3fc), #38bdf8);
  transition: transform 0.2s var(--ease-out), filter 0.2s;
}

.partner-card--card .btn-partner {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
}

.btn-partner:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-partner--sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.partner-terms {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  opacity: 0.65;
}

.partner-terms-mark {
  font-weight: 700;
  margin-right: 0.15rem;
}

.partner-disclosure-inline {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.45;
}

.partner-disclosure-inline--sm {
  margin-top: 0.5rem;
  font-size: 0.72rem;
}

.partner-calc-strip {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.03);
}

.partner-calc-strip-label {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.partner-calc-chips {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.partner-calc-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
}

.partner-calc-chip-text {
  flex: 1;
  min-width: 140px;
  font-size: 0.875rem;
}

.partner-calc-chip-text strong {
  display: block;
}

.partner-calc-chip-text span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-partner-disclosure {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  opacity: 0.75;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .partner-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .partner-card-top {
    grid-template-columns: auto 1fr;
  }

  .partner-headline {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
  }

  .partner-headline strong {
    font-size: 1.5rem;
  }

  .partner-calc-chip {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-partner--sm {
    width: 100%;
  }
}

/* Hub pages (categories, partner offers) */
.hub-page {
  max-width: 100%;
}

.hub-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.hub-breadcrumb a {
  color: var(--accent, #7dd3fc);
  text-decoration: none;
}

.hub-hero {
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
}

.hub-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent, #7dd3fc);
}

.hub-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hub-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 52rem;
}

.hub-lead a {
  color: var(--accent, #7dd3fc);
}

.hub-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hub-section {
  margin-bottom: 2rem;
}

.hub-section-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--text);
}

.hub-search {
  margin-bottom: 1.5rem;
}

.hub-no-results {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.category-hub-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

.category-hub-hero-text h1 {
  margin-bottom: 0.5rem;
}

.hub-category-nav {
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.hub-category-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.hub-category-links a {
  color: var(--accent, #7dd3fc);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.partner-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.hub-compare {
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.hub-compare p {
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.hub-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hub-table th,
.hub-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.hub-table thead th {
  background: rgba(129, 140, 248, 0.15);
  color: var(--text);
  font-weight: 600;
}

.hub-table tbody th {
  color: var(--text-secondary);
  font-weight: 500;
}

.hub-review-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hub-review-links a {
  color: var(--accent, #7dd3fc);
  font-weight: 600;
}

.home-promo-teaser {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.home-promo-teaser-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-promo-teaser h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.15rem;
}

.home-promo-teaser p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-cta-partner--inline {
  flex-shrink: 0;
}

.search-more-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

@media (max-width: 720px) {
  .category-hub-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Longform partner guide pages */
.guide-page {
  max-width: 100%;
}

.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.guide-breadcrumb a {
  color: var(--accent, #7dd3fc);
  text-decoration: none;
}

.guide-hero {
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
}

.guide-hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--accent, #7dd3fc);
  font-weight: 600;
}

.guide-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.guide-hero-lead {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52rem;
}

.guide-hero-code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.partner-code--hero .partner-code-value {
  font-size: 1.35rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}

.guide-content-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.guide-toc {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
}

.guide-toc-title {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.guide-toc a {
  color: var(--accent, #7dd3fc);
  text-decoration: none;
}

.guide-toc a:hover {
  text-decoration: underline;
}

.guide-main {
  padding: 2rem 1.75rem;
  border-radius: var(--radius-md);
}

.article-prose {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.article-prose section {
  margin-bottom: 0.5rem;
}

.article-prose h2 {
  margin: 0 0 0.85rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.article-prose h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.article-prose p {
  margin: 0 0 1rem;
}

.article-prose a {
  color: var(--accent, #7dd3fc);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0 1.25rem;
  border-left: 3px solid var(--accent, #7dd3fc);
}

.guide-callout p {
  margin: 0;
}

.guide-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-table th,
.guide-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  vertical-align: top;
}

.guide-table thead th {
  background: rgba(129, 140, 248, 0.12);
  color: var(--text);
  font-weight: 600;
}

.guide-list {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.guide-bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.guide-bonus-card {
  padding: 1.25rem;
  text-align: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.guide-bonus-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.guide-bonus-amount {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, var(--accent, #7dd3fc), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guide-bonus-card--total {
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
  counter-reset: gstep;
}

.guide-steps li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
}

.guide-steps li:last-child {
  border-bottom: none;
}

.guide-step-body strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.guide-step-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.guide-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.guide-pros,
.guide-cons {
  padding: 1.15rem;
  border-radius: var(--radius-sm);
}

.guide-pros {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.guide-cons {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.guide-pros h3,
.guide-cons h3 {
  margin-top: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.guide-pros ul,
.guide-cons ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.guide-terms-block {
  font-size: 0.8rem;
  opacity: 0.75;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
}

.guide-faq {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
}

.guide-faq > h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--text);
}

.guide-faq-item {
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  padding: 0.35rem 1rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.06));
}

.guide-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.65rem 0;
}

.guide-faq-answer {
  padding: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.guide-related {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
}

.guide-related h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--text);
}

.guide-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-related-list a {
  font-weight: 600;
}

.guide-final-cta {
  padding: 1.75rem 1.5rem;
  text-align: center;
  border-radius: var(--radius-md);
}

.guide-final-cta h2 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.guide-final-cta p {
  margin: 0 0 1rem;
}

.guide-final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.guide-sidebar-cta {
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
}

.guide-sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.guide-sidebar-cta h3 {
  margin: 0.25rem 0;
  font-size: 1.1rem;
}

.guide-sidebar-amount {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.35rem 0 0;
  color: #fbbf24;
}

.guide-sidebar-sub {
  font-size: 0.8rem;
  opacity: 0.85;
  margin: 0 0 0.75rem;
}

.guide-sidebar-terms {
  font-size: 0.65rem;
  opacity: 0.7;
  margin: 0.75rem 0 0;
  line-height: 1.4;
}

.guide-sidebar-nav {
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.guide-sidebar-nav h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.guide-sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-sidebar-nav a {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--accent, #7dd3fc);
}

.btn-partner--block {
  width: 100%;
  margin-top: 0.5rem;
}

.partner-guide-link {
  margin: 0;
  font-size: 0.85rem;
}

.partner-guide-link a {
  color: var(--accent, #7dd3fc);
  text-decoration: none;
  font-weight: 600;
}

.footer-guide-links {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.footer-guide-links a {
  color: var(--accent, #7dd3fc);
  text-decoration: none;
}

.footer-guide-links a:hover {
  text-decoration: underline;
}

.footer-legal-links {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.footer-legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Info pages (About, Contact, Privacy) */
.info-page {
  max-width: 760px;
  margin: 0 auto;
}

.info-page-header {
  margin-bottom: 2rem;
}

.info-page-body {
  padding: 2rem 2.25rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.info-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.info-section p {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.info-section p:last-child {
  margin-bottom: 0;
}

.info-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.info-list li + li {
  margin-top: 0.4rem;
}

.info-cta {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.info-cta p {
  margin: 0;
}

@media (max-width: 600px) {
  .info-page-body {
    padding: 1.25rem 1rem;
  }
}

.partner-strip-claim {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #7dd3fc);
  text-decoration: none;
  white-space: nowrap;
}

.partner-strip-claim:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    order: -1;
  }

  .guide-pros-cons {
    grid-template-columns: 1fr;
  }

  .guide-main {
    padding: 1.35rem 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loading-spinner {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  .btn-partner:hover,
  .nav-cta-partner:hover {
    transform: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   ADDITIONAL MOBILE & PERFORMANCE FIXES
   ══════════════════════════════════════════════════════════════ */

/* Prevent overflow on small screens globally */
html, body {
  overflow-x: hidden;
}

/* Ensure images never overflow their containers */
img, svg {
  max-width: 100%;
  height: auto;
}

/* Improve table scrolling on mobile */
.breakdown-table,
.hub-table,
.guide-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

/* Restore normal display for table internals */
.breakdown-table thead,
.breakdown-table tbody,
.breakdown-table tr,
.hub-table thead,
.hub-table tbody,
.hub-table tr,
.guide-table thead,
.guide-table tbody,
.guide-table tr {
  display: table-row-group;
}
.breakdown-table thead,
.hub-table thead,
.guide-table thead {
  display: table-header-group;
}
.breakdown-table tr,
.hub-table tr,
.guide-table tr {
  display: table-row;
}
.breakdown-table th,
.breakdown-table td,
.hub-table th,
.hub-table td,
.guide-table th,
.guide-table td {
  display: table-cell;
}

/* Ensure the app container never causes horizontal scroll */
.app-container {
  overflow-x: hidden;
}

/* Improve focus ring visibility on mobile for accessibility */
@media (max-width: 768px) {
  :focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
  }
}

/* Optimise paint for animated elements */
.orb {
  will-change: transform;
}
.calc-card,
.category-card {
  will-change: transform;
}

/* Remove will-change after interaction to free GPU memory */
.calc-card:not(:hover),
.category-card:not(:hover) {
  will-change: auto;
}
