@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  --gg-cyan: #20dcff;
  --gg-magenta: #ff35d4;
  --gg-violet: #7c3aed;
  --gg-scroll-accent: #810fec;

  --gg-text: rgba(240, 236, 255, 0.94);
  --gg-text-soft: rgba(225, 217, 255, 0.78);
  --gg-muted: rgba(205, 196, 232, 0.66);

  --gg-border: rgba(178, 138, 255, 0.12);
  --gg-border-strong: rgba(148, 87, 240, 0.575);

  --gg-card-top: rgba(255, 255, 255, 0.055);
  --gg-card-bottom: rgba(255, 255, 255, 0.018);
  --gg-card-base-1: rgba(18, 18, 28, 0.84);
  --gg-card-base-2: rgba(12, 12, 20, 0.88);

  --gg-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.26);
  --gg-shadow-card: 0 14px 40px rgba(0, 0, 0, 0.42);
  --gg-shadow-card-hover: 0 14px 40px rgba(117, 38, 182, 0.42);

  --gg-radius: 28px;
  --gg-container: 1180px;
  --gg-header-h: 78px;

  --gg-section-gap: 92px;
  --gg-card-gap: 22px;

  --mx: 50vw;
  --my: 24vh;
}

/* =========================================
                SCROLLBAR
   ========================================= */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--gg-scroll-accent) rgba(255, 255, 255, 0.06);
}

::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(7, 12, 28, 0.98) 0%, rgba(11, 10, 24, 0.98) 52%, rgba(22, 8, 28, 0.98) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 12px 0 30px rgba(32, 220, 255, 0.04),
    inset 0 -28px 42px rgba(255, 53, 212, 0.07);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(10, 10, 18, 0.92);
  background: linear-gradient(180deg, var(--gg-cyan) 0%, #73b8ff 36%, #8d79ff 68%, var(--gg-magenta) 100%);
  box-shadow:
    0 0 16px rgba(32, 220, 255, 0.18),
    0 0 26px rgba(255, 53, 212, 0.12);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #52e6ff 0%, #8fc8ff 34%, #9d89ff 68%, #ff5ce0 100%);
  box-shadow:
    0 0 18px rgba(32, 220, 255, 0.24),
    0 0 30px rgba(255, 53, 212, 0.16);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #3ddfff 0%, #7ab8ff 34%, #886eff 68%, #f93bd6 100%);
}

::-webkit-scrollbar-corner {
  background: rgba(10, 10, 18, 0.96);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  color: var(--gg-text);
  background:
    radial-gradient(circle at top left, rgba(32, 220, 255, 0.055), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 53, 212, 0.05), transparent 26%),
    linear-gradient(180deg, #090910 0%, #06070b 48%, #05060a 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}

.gg-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
}

.gg-bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.gg-bg,
.gg-grid,
.gg-noise,
.gg-grid-riders,
.gg-mouse-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gg-bg {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #07080c 0%, #090910 38%, #05060a 100%);
}

.gg-grid {
  z-index: 2;
  inset: -10%;
  background-image:
    linear-gradient(rgba(176, 142, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 142, 255, 0.038) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
  transform: perspective(1200px) rotateX(66deg) scale(1.4) translateY(18%);
  transform-origin: center center;
  opacity: 0.34;
}

.gg-noise {
  z-index: 3;
  opacity: 0.028;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, #fff 0 1px, transparent 1px);
  background-size:
    180px 180px,
    240px 240px,
    210px 210px,
    260px 260px;
  animation: noiseFloat 24s linear infinite;
}

.gg-grid-riders {
  z-index: 4;
  inset: -12%;
  transform: perspective(1200px) rotateX(66deg) scale(1.4) translateY(18%);
  transform-origin: center center;
  opacity: 0.92;
}

.gg-mouse-glow {
  z-index: 5;
  background:
    radial-gradient(circle 240px at var(--mx) var(--my), rgba(32, 220, 255, 0.085), transparent 60%),
    radial-gradient(
      circle 320px at calc(var(--mx) + 120px) calc(var(--my) + 30px),
      rgba(255, 53, 212, 0.045),
      transparent 68%
    );
  transition: opacity 0.25s ease;
}

.rider {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(155, 95, 255, 0.96), rgba(227, 194, 255, 0.96), transparent);
  box-shadow:
    0 0 18px rgba(155, 95, 255, 0.4),
    0 0 34px rgba(124, 58, 237, 0.2);
}

.rider-h {
  height: 3px;
}
.rider-v {
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(155, 95, 255, 0.96), rgba(227, 194, 255, 0.96), transparent);
}

.rider-h-1 {
  width: 240px;
  top: 24%;
  animation: rideHorizontalA 14s linear infinite;
}
.rider-h-2 {
  width: 180px;
  top: 58%;
  animation: rideHorizontalB 17s linear infinite;
}
.rider-h-3 {
  width: 130px;
  top: 78%;
  animation: rideHorizontalC 11s linear infinite;
}
.rider-v-1 {
  height: 220px;
  left: 30%;
  animation: rideVerticalA 16s linear infinite;
}
.rider-v-2 {
  height: 180px;
  left: 64%;
  animation: rideVerticalB 13s linear infinite;
}
.rider-v-3 {
  height: 140px;
  left: 84%;
  animation: rideVerticalC 10s linear infinite;
}

.gg-content {
  position: relative;
  z-index: 2;
  width: min(var(--gg-container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  z-index: 30;
  width: 100%;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-row {
  min-height: var(--gg-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow:
    0 0 18px rgba(159, 103, 255, 0.22),
    0 0 36px rgba(32, 220, 255, 0.08);
}

.brand-name {
  font-family: "Sora", Arial, sans-serif;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--gg-cyan) 0%, #8f8cff 46%, var(--gg-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  color: rgba(225, 215, 250, 0.82);
  font-weight: 600;
  transition:
    color 0.22s ease,
    text-shadow 0.22s ease;
}

.site-nav a:hover {
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 18px rgba(155, 92, 255, 0.2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
  cursor: pointer;
  border: 0;
}

.gg-btn:hover {
  transform: translateY(-2px);
}

.gg-btn-primary {
  color: #071018;
  background: linear-gradient(135deg, var(--gg-cyan) 0%, #2fb7eb 30%, #8c88ff 68%, #8091f5 100%);
  box-shadow:
    0 16px 40px rgba(32, 220, 255, 0.16),
    0 0 36px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.gg-btn-secondary {
  color: rgba(241, 236, 255, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(174, 141, 255, 0.18);
  backdrop-filter: blur(12px);
}

.gg-kicker,
.card-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--gg-shadow-soft);
  color: rgba(240, 236, 255, 0.96);
  font-size: 0.92rem;
  font-weight: 600;
  backdrop-filter: blur(14px);
}

.gg-kicker::before,
.card-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gg-cyan), var(--gg-magenta));
  box-shadow: 0 0 16px rgba(32, 220, 255, 0.7);
}

.gg-title,
.section-title,
.gg-panel-title,
.gg-card h3 {
  font-family: "Sora", Arial, sans-serif;
  letter-spacing: -0.055em;
}

.gg-title,
.section-title {
  margin: 18px 0 16px;
  line-height: 1.09;
  font-weight: 800;
}

.gg-title .line {
  display: block;
}
.gg-title .line-1 {
  background: linear-gradient(90deg, #a68ae5 0%, #dd30c0 34%, #7b5fcb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gg-title .line-2 {
  background: linear-gradient(90deg, var(--gg-cyan) 0%, #7118ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gg-title .line-3 {
  background: linear-gradient(90deg, #8b70ff 0%, var(--gg-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gg-sub,
.section-sub,
.gg-panel-text,
.gg-card p,
.site-footer p,
.category-text {
  color: var(--gg-muted);
  line-height: 1.75;
}

.gg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-pills,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(240, 236, 255, 0.94);
  font-weight: 700;
}

.gg-card {
  position: relative;
  padding: 28px;
  border-radius: var(--gg-radius);
  border: 1px solid var(--gg-border);
  backdrop-filter: blur(18px);
  background:
    linear-gradient(180deg, var(--gg-card-top), var(--gg-card-bottom)),
    linear-gradient(145deg, var(--gg-card-base-1), var(--gg-card-base-2));
  box-shadow:
    var(--gg-shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/*.gg-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:
    radial-gradient(circle at 18% 18%, rgba(124,58,237,0.12), transparent 38%),
    radial-gradient(circle at 84% 84%, rgba(255,53,212,0.10), transparent 46%);
  opacity:.72;
  pointer-events:none;
}

.gg-card::after{
  content:"";
  position:absolute;
  inset:-150% auto auto -40%;
  width:60%;
  height:320%;
  transform:rotate(24deg) translateX(-120%);
  background:linear-gradient(90deg, transparent, rgba(206,174,255,0.42), transparent);
  opacity:0;
  pointer-events:none;
}*/

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

.gg-card:hover::after {
  opacity: 1;
  animation: purpleOutlineSweep 1s linear forwards;
}

.gg-card-primary {
  border-color: rgba(32, 220, 255, 0.22);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(32, 220, 255, 0.06) inset,
    0 0 26px rgba(32, 220, 255, 0.06);
}

.gg-card-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    linear-gradient(145deg, rgba(15, 15, 24, 0.8), rgba(10, 10, 18, 0.86));
}

.gg-card-hero {
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(155, 95, 255, 0.08) inset,
    0 0 28px rgba(124, 58, 237, 0.06);
}

.gg-panel-title,
.gg-card h3 {
  position: relative;
  z-index: 1;
  margin: 16px 0 10px;
  font-size: clamp(1.18rem, 2.6vw, 2rem);
  line-height: 1.04;
  color: rgba(239, 234, 255, 0.97);
}

.gg-card p,
.gg-panel-text,
.card-chip,
.card-link,
.mini-chip,
.hero-highlight-grid {
  position: relative;
  z-index: 1;
}

.gg-card > .card-chip + h3,
.gg-card > .card-chip + .gg-panel-title {
  margin-top: 22px;
}

.section-gap {
  padding: 30px 0 var(--gg-section-gap);
}

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

.section-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ffffff 0%, #dacbff 28%, #9d82ff 58%, #ff82e7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  max-width: 64ch;
  margin: 0;
}

.section-link {
  color: var(--gg-cyan);
  font-weight: 800;
  white-space: nowrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gg-card-gap);
}

.stack-grid {
  display: grid;
  gap: var(--gg-card-gap);
}

.tool-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.too-card p {
  flex-grow: 1;
}

.card-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--gg-cyan);
  font-weight: 800;
}

.category-card {
  padding: 24px 28px;
}

.category-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.category-text {
  margin: 14px 0 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 30px;
  align-items: start;
}

.link-grid .link-card {
  min-height: 100%;
}

.link-card a {
  display: block;
  margin-top: 10px;
  color: var(--gg-text-soft);
  font-weight: 600;
}

.link-card a:hover {
  color: var(--gg-cyan);
}

.site-footer {
  padding: 34px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(7, 7, 13, 0), rgba(7, 7, 13, 0.5));
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
}

.footer-row p {
  margin: 10px 0 0;
  max-width: 50ch;
}

.footer-meta {
  color: rgba(219, 210, 241, 0.62);
  white-space: nowrap;
}

.hero-load {
  opacity: 0;
  will-change: transform, opacity, filter;
  animation-fill-mode: forwards;
}

.hero-load-copy {
  transform: translateY(36px) scale(0.985);
  filter: blur(14px);
  animation: heroCopyIn 1s cubic-bezier(0.18, 0.82, 0.24, 1) 0.08s forwards;
}

.hero-load-panel {
  transform: translateX(46px) rotateY(-8deg) scale(0.96);
  transform-origin: center left;
  filter: blur(16px);
  animation: heroPanelIn 1.05s cubic-bezier(0.16, 0.84, 0.24, 1) 0.24s forwards;
}

.scroll-reveal {
  opacity: 0;
  transition:
    opacity 0.8s ease,
    filter 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.78, 0.2, 1);
  will-change: opacity, filter, transform;
}

.reveal-fade {
  transform: translateY(28px);
  filter: blur(10px);
}

.reveal-left {
  transform: translateX(-34px);
  filter: blur(10px);
}

.reveal-card {
  transform: translateY(42px) scale(0.965);
  filter: blur(12px);
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.delay-1 {
  transition-delay: 0.05s;
}
.delay-2 {
  transition-delay: 0.1s;
}
.delay-3 {
  transition-delay: 0.15s;
}

@keyframes heroCopyIn {
  0% {
    opacity: 0;
    transform: translateY(36px) scale(0.985);
    filter: blur(14px);
  }
  65% {
    opacity: 1;
    transform: translateY(-4px) scale(1.002);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroPanelIn {
  0% {
    opacity: 0;
    transform: translateX(46px) rotateY(-8deg) scale(0.96);
    filter: blur(16px);
  }
  70% {
    opacity: 1;
    transform: translateX(-4px) rotateY(0deg) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotateY(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes purpleOutlineSweep {
  from {
    transform: rotate(24deg) translateX(-120%);
  }
  to {
    transform: rotate(24deg) translateX(300%);
  }
}

@keyframes rideHorizontalA {
  0% {
    left: -20%;
  }
  100% {
    left: 100%;
  }
}
@keyframes rideHorizontalB {
  0% {
    left: 100%;
  }
  100% {
    left: -26%;
  }
}
@keyframes rideHorizontalC {
  0% {
    left: -12%;
  }
  100% {
    left: 100%;
  }
}
@keyframes rideVerticalA {
  0% {
    top: -26%;
  }
  100% {
    top: 100%;
  }
}
@keyframes rideVerticalB {
  0% {
    top: 100%;
  }
  100% {
    top: -26%;
  }
}
@keyframes rideVerticalC {
  0% {
    top: -18%;
  }
  100% {
    top: 100%;
  }
}
@keyframes noiseFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-10px, 12px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .gg-noise,
  .rider,
  .hero-load,
  .scroll-reveal,
  .gg-card:hover::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-load,
  .scroll-reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .gg-mouse-glow {
    display: none;
  }
}

@media (max-width: 980px) {
  .card-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-top,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .gg-content {
    width: min(100% - 20px, var(--gg-container));
  }

  .nav-row {
    min-height: auto;
    padding: 18px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav,
  .nav-actions {
    flex-wrap: wrap;
    gap: 14px;
  }

  .gg-card {
    padding: 22px;
  }

  .card-grid,
  .hero-highlight-grid {
    grid-template-columns: 1fr;
  }

  .gg-grid {
    background-size: 46px 46px;
  }

  .gg-btn {
    width: 100%;
  }

  .nav-row > .theme-toggle,
  .nav-row > .nav-toggle {
    width: auto;
  }

  .gg-actions,
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

/* Mobile header toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: var(--gg-shadow-soft);
  color: var(--gg-text);
  cursor: pointer;
}

.nav-toggle-bars {
  display: grid;
  gap: 5px;
}

.nav-toggle-bars span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto; /* THIS fixes your issue */
}

@media (max-width: 760px) {
  .nav-row {
    min-height: var(--gg-header-h);
    padding: 12px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
  }

  .brand {
    min-width: 0;
    min-height: 52px;
    flex: none;
    gap: 10px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .nav-row > .theme-toggle,
  .nav-row > .nav-toggle {
    align-self: center;
  }

  .nav-row > .theme-toggle {
    order: 2;
    justify-self: end;
  }

  .nav-row > .nav-toggle {
    order: 3;
    justify-self: end;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .nav-menu {
    display: none;
    width: 100%;
    grid-column: 1 / -1;
    margin-top: 0;
    gap: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  body.nav-open .nav-menu {
    display: flex;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018));
    box-shadow: var(--gg-shadow-soft);
  }

  .site-nav a {
    width: 100%;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-actions .gg-btn {
    width: 100%;
  }

  body.nav-open .nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

.mobile-blog-link {
  display: none;
}

.mobile-blog-link {
  display: none;
}

@media (max-width: 760px) {
  .mobile-blog-link {
    display: flex;
    align-items: center;
    justify-content: center; /* centers text */
    width: 100%; /* full width like buttons */
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018));
    box-shadow: var(--gg-shadow-soft);
    color: var(--gg-text);
    font-weight: 600;
    text-decoration: none;
    text-align: center; /* fallback */
    transition:
      border-color 0.2s ease,
      transform 0.2s ease;
  }

  .mobile-blog-link:hover {
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
  }
}

/* Content page hero spacing */
.content-page-hero {
  padding-top: calc(var(--gg-header-h, 78px) + 42px);
}

/* Keep content page headings clear on smaller screens too */
@media (max-width: 760px) {
  .content-page-hero {
    padding-top: calc(var(--gg-header-h, 78px) + 28px);
  }
}

html.theme-light body,
html.light-theme body,
html.light body,
html[data-theme="light"] body,
body.theme-light,
body.light-theme,
body.light,
body[data-theme="light"] {
  --gg-text: #24314d;
  --gg-text-soft: #51627f;
  --gg-muted: #6b7a96;
  --gg-border: rgba(108, 128, 170, 0.18);
  --gg-border-strong: rgba(72, 116, 214, 0.28);
  --gg-card-top: rgba(255, 255, 255, 0.98);
  --gg-card-bottom: rgba(246, 249, 255, 0.94);
  --gg-card-base-1: rgba(255, 255, 255, 0.98);
  --gg-card-base-2: rgba(244, 247, 255, 0.95);
  --gg-shadow-soft: 0 10px 26px rgba(66, 84, 122, 0.1);
  --gg-shadow-card: 0 16px 42px rgba(66, 84, 122, 0.12);
  --gg-shadow-card-hover: 0 16px 44px rgba(76, 110, 190, 0.16);
  color-scheme: light;
}

html.theme-light body,
html.light-theme body,
html.light body,
html[data-theme="light"] body,
body.theme-light,
body.light-theme,
body.light,
body[data-theme="light"] {
  color: var(--gg-text);
  background:
    radial-gradient(circle at top left, rgba(32, 220, 255, 0.06), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 53, 212, 0.045), transparent 28%),
    linear-gradient(180deg, #f8faff 0%, #f2f5fb 46%, #edf2fa 100%);
}

html.theme-light body .site-header,
html.light-theme body .site-header,
html.light body .site-header,
html[data-theme="light"] body .site-header,
body.theme-light .site-header,
body.light-theme .site-header,
body.light .site-header,
body[data-theme="light"] .site-header {
  background: rgba(248, 250, 255, 0.88);
  border-bottom: 1px solid rgba(111, 129, 170, 0.12);
}

html.theme-light body .gg-bg,
html.light-theme body .gg-bg,
html.light body .gg-bg,
html[data-theme="light"] body .gg-bg,
body.theme-light .gg-bg,
body.light-theme .gg-bg,
body.light .gg-bg,
body[data-theme="light"] .gg-bg {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, #f7f9ff 0%, #f3f6fd 40%, #eef3fb 100%);
}

html.theme-light body .gg-grid,
html.light-theme body .gg-grid,
html.light body .gg-grid,
html[data-theme="light"] body .gg-grid,
body.theme-light .gg-grid,
body.light-theme .gg-grid,
body.light .gg-grid,
body[data-theme="light"] .gg-grid {
  background-image:
    linear-gradient(rgba(130, 148, 191, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 148, 191, 0.12) 1px, transparent 1px);
  opacity: 0.55;
}

html.theme-light body .gg-noise,
html.light-theme body .gg-noise,
html.light body .gg-noise,
html[data-theme="light"] body .gg-noise,
body.theme-light .gg-noise,
body.light-theme .gg-noise,
body.light .gg-noise,
body[data-theme="light"] .gg-noise {
  opacity: 0.015;
}

html.theme-light body .gg-card,
html.theme-light body .hero-highlight-box,
html.theme-light body .site-nav,
html.theme-light body .mobile-blog-link,
html.light-theme body .gg-card,
html.light-theme body .hero-highlight-box,
html.light-theme body .site-nav,
html.light-theme body .mobile-blog-link,
html.light body .gg-card,
html.light body .hero-highlight-box,
html.light body .site-nav,
html.light body .mobile-blog-link,
html[data-theme="light"] body .gg-card,
html[data-theme="light"] body .hero-highlight-box,
html[data-theme="light"] body .site-nav,
html[data-theme="light"] body .mobile-blog-link,
body.theme-light .gg-card,
body.theme-light .hero-highlight-box,
body.theme-light .site-nav,
body.theme-light .mobile-blog-link,
body.light-theme .gg-card,
body.light-theme .hero-highlight-box,
body.light-theme .site-nav,
body.light-theme .mobile-blog-link,
body.light .gg-card,
body.light .hero-highlight-box,
body.light .site-nav,
body.light .mobile-blog-link,
body[data-theme="light"] .gg-card,
body[data-theme="light"] .hero-highlight-box,
body[data-theme="light"] .site-nav,
body[data-theme="light"] .mobile-blog-link {
  border-color: rgba(111, 129, 170, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.94)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.96));
  box-shadow:
    0 14px 36px rgba(66, 84, 122, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html.theme-light body .gg-card-primary,
html.theme-light body .result-box-highlight,
html.theme-light body .comparison-card-accent,
html.theme-light body .result-box-dynamic-highlight,
html.theme-light body .macro-stat-highlight,
html.light-theme body .gg-card-primary,
html.light-theme body .result-box-highlight,
html.light-theme body .comparison-card-accent,
html.light-theme body .result-box-dynamic-highlight,
html.light-theme body .macro-stat-highlight,
html.light body .gg-card-primary,
html.light body .result-box-highlight,
html.light body .comparison-card-accent,
html.light body .result-box-dynamic-highlight,
html.light body .macro-stat-highlight,
html[data-theme="light"] body .gg-card-primary,
html[data-theme="light"] body .result-box-highlight,
html[data-theme="light"] body .comparison-card-accent,
html[data-theme="light"] body .result-box-dynamic-highlight,
html[data-theme="light"] body .macro-stat-highlight,
body.theme-light .gg-card-primary,
body.theme-light .result-box-highlight,
body.theme-light .comparison-card-accent,
body.theme-light .result-box-dynamic-highlight,
body.theme-light .macro-stat-highlight,
body.light-theme .gg-card-primary,
body.light-theme .result-box-highlight,
body.light-theme .comparison-card-accent,
body.light-theme .result-box-dynamic-highlight,
body.light-theme .macro-stat-highlight,
body.light .gg-card-primary,
body.light .result-box-highlight,
body.light .comparison-card-accent,
body.light .result-box-dynamic-highlight,
body.light .macro-stat-highlight,
body[data-theme="light"] .gg-card-primary,
body[data-theme="light"] .result-box-highlight,
body[data-theme="light"] .comparison-card-accent,
body[data-theme="light"] .result-box-dynamic-highlight,
body[data-theme="light"] .macro-stat-highlight {
  border-color: rgba(55, 191, 236, 0.28) !important;
  box-shadow:
    0 14px 36px rgba(66, 84, 122, 0.1),
    0 0 0 1px rgba(55, 191, 236, 0.1) inset,
    0 0 0 2px rgba(55, 191, 236, 0.06);
}

html.theme-light body .result-box,
html.theme-light body .loan-stat-item,
html.theme-light body .comparison-metric,
html.theme-light body .summary-panel,
html.theme-light body .mini-info,
html.theme-light body .warning-panel,
html.theme-light body .amortization-table th,
html.theme-light body .amortization-table td,
html.theme-light body .input-wrap input,
html.theme-light body .select-wrap select,
html.light-theme body .result-box,
html.light-theme body .loan-stat-item,
html.light-theme body .comparison-metric,
html.light-theme body .summary-panel,
html.light-theme body .mini-info,
html.light-theme body .warning-panel,
html.light-theme body .amortization-table th,
html.light-theme body .amortization-table td,
html.light-theme body .input-wrap input,
html.light-theme body .select-wrap select,
html.light body .result-box,
html.light body .loan-stat-item,
html.light body .comparison-metric,
html.light body .summary-panel,
html.light body .mini-info,
html.light body .warning-panel,
html.light body .amortization-table th,
html.light body .amortization-table td,
html.light body .input-wrap input,
html.light body .select-wrap select,
html[data-theme="light"] body .result-box,
html[data-theme="light"] body .loan-stat-item,
html[data-theme="light"] body .comparison-metric,
html[data-theme="light"] body .summary-panel,
html[data-theme="light"] body .mini-info,
html[data-theme="light"] body .warning-panel,
html[data-theme="light"] body .amortization-table th,
html[data-theme="light"] body .amortization-table td,
html[data-theme="light"] body .input-wrap input,
html[data-theme="light"] body .select-wrap select,
body.theme-light .result-box,
body.theme-light .loan-stat-item,
body.theme-light .comparison-metric,
body.theme-light .summary-panel,
body.theme-light .mini-info,
body.theme-light .warning-panel,
body.theme-light .amortization-table th,
body.theme-light .amortization-table td,
body.theme-light .input-wrap input,
body.theme-light .select-wrap select,
body.light-theme .result-box,
body.light-theme .loan-stat-item,
body.light-theme .comparison-metric,
body.light-theme .summary-panel,
body.light-theme .mini-info,
body.light-theme .warning-panel,
body.light-theme .amortization-table th,
body.light-theme .amortization-table td,
body.light-theme .input-wrap input,
body.light-theme .select-wrap select,
body.light .result-box,
body.light .loan-stat-item,
body.light .comparison-metric,
body.light .summary-panel,
body.light .mini-info,
body.light .warning-panel,
body.light .amortization-table th,
body.light .amortization-table td,
body.light .input-wrap input,
body.light .select-wrap select,
body[data-theme="light"] .result-box,
body[data-theme="light"] .loan-stat-item,
body[data-theme="light"] .comparison-metric,
body[data-theme="light"] .summary-panel,
body[data-theme="light"] .mini-info,
body[data-theme="light"] .warning-panel,
body[data-theme="light"] .amortization-table th,
body[data-theme="light"] .amortization-table td,
body[data-theme="light"] .input-wrap input,
body[data-theme="light"] .select-wrap select {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 255, 0.94));
  border-color: rgba(111, 129, 170, 0.16);
}

html.theme-light body .gg-panel-title,
html.theme-light body .gg-card h3,
html.theme-light body .section-title,
html.theme-light body .tool-title,
html.theme-light body .results-title,
html.theme-light body .field label,
html.light-theme body .gg-panel-title,
html.light-theme body .gg-card h3,
html.light-theme body .section-title,
html.light-theme body .tool-title,
html.light-theme body .results-title,
html.light-theme body .field label,
html.light body .gg-panel-title,
html.light body .gg-card h3,
html.light body .section-title,
html.light body .tool-title,
html.light body .results-title,
html.light body .field label,
html[data-theme="light"] body .gg-panel-title,
html[data-theme="light"] body .gg-card h3,
html[data-theme="light"] body .section-title,
html[data-theme="light"] body .tool-title,
html[data-theme="light"] body .results-title,
html[data-theme="light"] body .field label,
body.theme-light .gg-panel-title,
body.theme-light .gg-card h3,
body.theme-light .section-title,
body.theme-light .tool-title,
body.theme-light .results-title,
body.theme-light .field label,
body.light-theme .gg-panel-title,
body.light-theme .gg-card h3,
body.light-theme .section-title,
body.light-theme .tool-title,
body.light-theme .results-title,
body.light-theme .field label,
body.light .gg-panel-title,
body.light .gg-card h3,
body.light .section-title,
body.light .tool-title,
body.light .results-title,
body.light .field label,
body[data-theme="light"] .gg-panel-title,
body[data-theme="light"] .gg-card h3,
body[data-theme="light"] .section-title,
body[data-theme="light"] .tool-title,
body[data-theme="light"] .results-title,
body[data-theme="light"] .field label {
  color: #24314d;
}

html.theme-light body .gg-card p,
html.theme-light body .gg-panel-text,
html.theme-light body .gg-sub,
html.theme-light body .section-sub,
html.theme-light body .result-label,
html.theme-light body .loan-stat-label,
html.theme-light body .comparison-metric span,
html.theme-light body .summary-text,
html.theme-light body .summary-label,
html.theme-light body .mini-info p,
html.theme-light body .hero-intro-label,
html.theme-light body .card-heading p,
html.theme-light body .warning-text,
html.theme-light body .warning-label,
html.theme-light body .amortization-table th,
html.theme-light body .input-prefix,
html.theme-light body .input-suffix,
html.theme-light body .schedule-label,
html.theme-light body .site-nav a,
html.theme-light body .card-chip,
html.theme-light body .gg-kicker,
html.theme-light body .mini-chip,
html.light-theme body .gg-card p,
html.light-theme body .gg-panel-text,
html.light-theme body .gg-sub,
html.light-theme body .section-sub,
html.light-theme body .result-label,
html.light-theme body .loan-stat-label,
html.light-theme body .comparison-metric span,
html.light-theme body .summary-text,
html.light-theme body .summary-label,
html.light-theme body .mini-info p,
html.light-theme body .hero-intro-label,
html.light-theme body .card-heading p,
html.light-theme body .warning-text,
html.light-theme body .warning-label,
html.light-theme body .amortization-table th,
html.light-theme body .input-prefix,
html.light-theme body .input-suffix,
html.light-theme body .schedule-label,
html.light-theme body .site-nav a,
html.light-theme body .card-chip,
html.light-theme body .gg-kicker,
html.light-theme body .mini-chip,
html.light body .gg-card p,
html.light body .gg-panel-text,
html.light body .gg-sub,
html.light body .section-sub,
html.light body .result-label,
html.light body .loan-stat-label,
html.light body .comparison-metric span,
html.light body .summary-text,
html.light body .summary-label,
html.light body .mini-info p,
html.light body .hero-intro-label,
html.light body .card-heading p,
html.light body .warning-text,
html.light body .warning-label,
html.light body .amortization-table th,
html.light body .input-prefix,
html.light body .input-suffix,
html.light body .schedule-label,
html.light body .site-nav a,
html.light body .card-chip,
html.light body .gg-kicker,
html.light body .mini-chip,
html[data-theme="light"] body .gg-card p,
html[data-theme="light"] body .gg-panel-text,
html[data-theme="light"] body .gg-sub,
html[data-theme="light"] body .section-sub,
html[data-theme="light"] body .result-label,
html[data-theme="light"] body .loan-stat-label,
html[data-theme="light"] body .comparison-metric span,
html[data-theme="light"] body .summary-text,
html[data-theme="light"] body .summary-label,
html[data-theme="light"] body .mini-info p,
html[data-theme="light"] body .hero-intro-label,
html[data-theme="light"] body .card-heading p,
html[data-theme="light"] body .warning-text,
html[data-theme="light"] body .warning-label,
html[data-theme="light"] body .amortization-table th,
html[data-theme="light"] body .input-prefix,
html[data-theme="light"] body .input-suffix,
html[data-theme="light"] body .schedule-label,
html[data-theme="light"] body .site-nav a,
html[data-theme="light"] body .card-chip,
html[data-theme="light"] body .gg-kicker,
html[data-theme="light"] body .mini-chip,
body.theme-light .gg-card p,
body.theme-light .gg-panel-text,
body.theme-light .gg-sub,
body.theme-light .section-sub,
body.theme-light .result-label,
body.theme-light .loan-stat-label,
body.theme-light .comparison-metric span,
body.theme-light .summary-text,
body.theme-light .summary-label,
body.theme-light .mini-info p,
body.theme-light .hero-intro-label,
body.theme-light .card-heading p,
body.theme-light .warning-text,
body.theme-light .warning-label,
body.theme-light .amortization-table th,
body.theme-light .input-prefix,
body.theme-light .input-suffix,
body.theme-light .schedule-label,
body.theme-light .site-nav a,
body.theme-light .card-chip,
body.theme-light .gg-kicker,
body.theme-light .mini-chip,
body.light-theme .gg-card p,
body.light-theme .gg-panel-text,
body.light-theme .gg-sub,
body.light-theme .section-sub,
body.light-theme .result-label,
body.light-theme .loan-stat-label,
body.light-theme .comparison-metric span,
body.light-theme .summary-text,
body.light-theme .summary-label,
body.light-theme .mini-info p,
body.light-theme .hero-intro-label,
body.light-theme .card-heading p,
body.light-theme .warning-text,
body.light-theme .warning-label,
body.light-theme .amortization-table th,
body.light-theme .input-prefix,
body.light-theme .input-suffix,
body.light-theme .schedule-label,
body.light-theme .site-nav a,
body.light-theme .card-chip,
body.light-theme .gg-kicker,
body.light-theme .mini-chip,
body.light .gg-card p,
body.light .gg-panel-text,
body.light .gg-sub,
body.light .section-sub,
body.light .result-label,
body.light .loan-stat-label,
body.light .comparison-metric span,
body.light .summary-text,
body.light .summary-label,
body.light .mini-info p,
body.light .hero-intro-label,
body.light .card-heading p,
body.light .warning-text,
body.light .warning-label,
body.light .amortization-table th,
body.light .input-prefix,
body.light .input-suffix,
body.light .schedule-label,
body.light .site-nav a,
body.light .card-chip,
body.light .gg-kicker,
body.light .mini-chip,
body[data-theme="light"] .gg-card p,
body[data-theme="light"] .gg-panel-text,
body[data-theme="light"] .gg-sub,
body[data-theme="light"] .section-sub,
body[data-theme="light"] .result-label,
body[data-theme="light"] .loan-stat-label,
body[data-theme="light"] .comparison-metric span,
body[data-theme="light"] .summary-text,
body[data-theme="light"] .summary-label,
body[data-theme="light"] .mini-info p,
body[data-theme="light"] .hero-intro-label,
body[data-theme="light"] .card-heading p,
body[data-theme="light"] .warning-text,
body[data-theme="light"] .warning-label,
body[data-theme="light"] .amortization-table th,
body[data-theme="light"] .input-prefix,
body[data-theme="light"] .input-suffix,
body[data-theme="light"] .schedule-label,
body[data-theme="light"] .site-nav a,
body[data-theme="light"] .card-chip,
body[data-theme="light"] .gg-kicker,
body[data-theme="light"] .mini-chip {
  color: #61718f;
}

html.theme-light body .result-value,
html.theme-light body .loan-stat-item strong,
html.theme-light body .comparison-metric strong,
html.theme-light body .amortization-table td,
html.theme-light body .info-card strong,
html.theme-light body .result-badge.invalid,
html.light-theme body .result-value,
html.light-theme body .loan-stat-item strong,
html.light-theme body .comparison-metric strong,
html.light-theme body .amortization-table td,
html.light-theme body .info-card strong,
html.light-theme body .result-badge.invalid,
html.light body .result-value,
html.light body .loan-stat-item strong,
html.light body .comparison-metric strong,
html.light body .amortization-table td,
html.light body .info-card strong,
html.light body .result-badge.invalid,
html[data-theme="light"] body .result-value,
html[data-theme="light"] body .loan-stat-item strong,
html[data-theme="light"] body .comparison-metric strong,
html[data-theme="light"] body .amortization-table td,
html[data-theme="light"] body .info-card strong,
html[data-theme="light"] body .result-badge.invalid,
body.theme-light .result-value,
body.theme-light .loan-stat-item strong,
body.theme-light .comparison-metric strong,
body.theme-light .amortization-table td,
body.theme-light .info-card strong,
body.theme-light .result-badge.invalid,
body.light-theme .result-value,
body.light-theme .loan-stat-item strong,
body.light-theme .comparison-metric strong,
body.light-theme .amortization-table td,
body.light-theme .info-card strong,
body.light-theme .result-badge.invalid,
body.light .result-value,
body.light .loan-stat-item strong,
body.light .comparison-metric strong,
body.light .amortization-table td,
body.light .info-card strong,
body.light .result-badge.invalid,
body[data-theme="light"] .result-value,
body[data-theme="light"] .loan-stat-item strong,
body[data-theme="light"] .comparison-metric strong,
body[data-theme="light"] .amortization-table td,
body[data-theme="light"] .info-card strong,
body[data-theme="light"] .result-badge.invalid {
  color: #24314d;
}

html.theme-light body .card-chip,
html.theme-light body .gg-kicker,
html.theme-light body .mini-chip,
html.light-theme body .card-chip,
html.light-theme body .gg-kicker,
html.light-theme body .mini-chip,
html.light body .card-chip,
html.light body .gg-kicker,
html.light body .mini-chip,
html[data-theme="light"] body .card-chip,
html[data-theme="light"] body .gg-kicker,
html[data-theme="light"] body .mini-chip,
body.theme-light .card-chip,
body.theme-light .gg-kicker,
body.theme-light .mini-chip,
body.light-theme .card-chip,
body.light-theme .gg-kicker,
body.light-theme .mini-chip,
body.light .card-chip,
body.light .gg-kicker,
body.light .mini-chip,
body[data-theme="light"] .card-chip,
body[data-theme="light"] .gg-kicker,
body[data-theme="light"] .mini-chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.92));
  border-color: rgba(111, 129, 170, 0.14);
  box-shadow: 0 8px 22px rgba(66, 84, 122, 0.08);
}

html.theme-light body .warning-panel,
html.light-theme body .warning-panel,
html.light body .warning-panel,
html[data-theme="light"] body .warning-panel,
body.theme-light .warning-panel,
body.light-theme .warning-panel,
body.light .warning-panel,
body[data-theme="light"] .warning-panel {
  background: linear-gradient(180deg, rgba(255, 239, 246, 0.96), rgba(255, 231, 242, 0.92));
  border-color: rgba(232, 109, 165, 0.18);
}

/* Shared theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 18px;
  padding: 0;
  border-radius: 18px;
  border: 0;
  background: transparent;
  color: var(--gg-text, #f3f5ff);
  box-shadow: none;
  font: 700 0.98rem/1 var(--gg-font, inherit);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    color 0.18s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
}
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 196, 255, 0.22);
}
.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(38, 197, 255, 0.26), rgba(172, 92, 255, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.theme-toggle-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2ecfff, #b06cff);
  box-shadow: 0 6px 14px rgba(128, 89, 255, 0.34);
  transform: translateX(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.theme-toggle-label {
  white-space: nowrap;
}
html[data-theme="light"] .theme-toggle,
body[data-theme="light"] .theme-toggle,
html.theme-light .theme-toggle,
body.theme-light .theme-toggle {
  background: transparent;
  color: #283149;
  border-color: transparent;
  box-shadow: none;
}
html[data-theme="light"] .theme-toggle-track,
body[data-theme="light"] .theme-toggle-track,
html.theme-light .theme-toggle-track,
body.theme-light .theme-toggle-track {
  background: linear-gradient(135deg, rgba(46, 207, 255, 0.18), rgba(176, 108, 255, 0.22));
  border-color: rgba(118, 145, 187, 0.16);
}
html[data-theme="light"] .theme-toggle-thumb,
body[data-theme="light"] .theme-toggle-thumb,
html.theme-light .theme-toggle-thumb,
body.theme-light .theme-toggle-thumb {
  transform: translateX(24px);
  box-shadow: 0 6px 14px rgba(119, 114, 255, 0.22);
}
@media (max-width: 760px) {
  .theme-toggle {
    order: 2;
    margin-left: auto;
    margin-right: 10px;
    padding: 8px 12px;
    gap: 10px;
    font-size: 0.92rem;
  }
  .theme-toggle-track {
    width: 46px;
    height: 26px;
  }
  .theme-toggle-thumb {
    width: 20px;
    height: 20px;
  }
  html[data-theme="light"] .theme-toggle-thumb,
  body[data-theme="light"] .theme-toggle-thumb,
  html.theme-light .theme-toggle-thumb,
  body.theme-light .theme-toggle-thumb {
    transform: translateX(20px);
  }
}

/* =========================================
   LIGHT THEME VISIBILITY HARDENING
   Project-wide pass for pale text, faint boxes, and weak secondary UI.
   Dark theme intentionally unchanged.
   ========================================= */
:is(
  html[data-theme="light"],
  html.theme-light,
  html.light,
  body[data-theme="light"],
  body.theme-light,
  body.light,
  body.light-theme
) {
  --gg-light-surface-1: #ffffff;
  --gg-light-surface-2: #f5f8ff;
  --gg-light-surface-3: #eef4ff;
  --gg-light-line: rgba(96, 120, 168, 0.24);
  --gg-light-line-strong: rgba(84, 112, 170, 0.34);
  --gg-light-text-strong: #24314d;
  --gg-light-text: #4f6285;
  --gg-light-text-soft: #677996;
  --gg-light-shadow: 0 16px 40px rgba(67, 84, 120, 0.12);
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(
    .gg-card,
    .hero-highlight-box,
    .tool-card,
    .blog-preview-card,
    .seo-card,
    .info-card,
    .comparison-card,
    .result-box,
    .loan-stat-item,
    .comparison-metric,
    .summary-panel,
    .mini-info,
    .warning-panel,
    .hero-intro-point,
    .result-box-highlight,
    .gg-card-primary,
    .gg-card-secondary,
    .gg-card-hero,
    .theme-toggle,
    .site-nav,
    .mobile-blog-link,
    .input-wrap input,
    .select-wrap select,
    .amortization-table th,
    .amortization-table td
  ) {
  border-color: var(--gg-light-line) !important;
  box-shadow:
    var(--gg-light-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(
    .gg-card,
    .tool-card,
    .blog-preview-card,
    .seo-card,
    .info-card,
    .comparison-card,
    .result-box,
    .loan-stat-item,
    .comparison-metric,
    .summary-panel,
    .mini-info,
    .hero-intro-point,
    .theme-toggle,
    .site-nav,
    .mobile-blog-link,
    .input-wrap input,
    .select-wrap select,
    .amortization-table th,
    .amortization-table td
  ) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(244, 248, 255, 0.97)) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.gg-kicker, .card-chip, .mini-chip) {
  color: var(--gg-light-text) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 255, 0.96)) !important;
  border: 1px solid rgba(108, 130, 176, 0.18) !important;
  box-shadow:
    0 10px 24px rgba(72, 90, 130, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(
    .gg-panel-title,
    .gg-card h3,
    .gg-card h2,
    .section-title,
    .tool-title,
    .results-title,
    .field label,
    .hero-highlight-box strong,
    .card-link,
    .section-link,
    .gg-btn-secondary,
    .mobile-blog-link,
    .site-nav a,
    .result-value,
    .loan-stat-item strong,
    .comparison-metric strong,
    .amortization-table td,
    .info-card strong,
    .theme-toggle-label,
    .warning-label,
    .summary-label,
    .mini-info-label
  ) {
  color: var(--gg-light-text-strong) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(
    .gg-sub,
    .section-sub,
    .gg-panel-text,
    .gg-card p,
    .site-footer p,
    .category-text,
    .result-label,
    .loan-stat-label,
    .comparison-metric span,
    .summary-text,
    .summary-label,
    .mini-info p,
    .hero-intro-label,
    .card-heading p,
    .warning-text,
    .schedule-label,
    .hero-highlight-label,
    .input-prefix,
    .input-suffix,
    .amortization-table th
  ) {
  color: var(--gg-light-text-soft) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.gg-btn-secondary, .section-link, .mobile-blog-link) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 244, 255, 0.97)) !important;
  border: 1px solid rgba(97, 120, 171, 0.24) !important;
  box-shadow:
    0 10px 26px rgba(72, 90, 132, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.gg-btn-secondary:hover, .section-link:hover, .mobile-blog-link:hover, .hero-highlight-box:hover) {
  border-color: rgba(86, 116, 179, 0.34) !important;
  box-shadow:
    0 14px 28px rgba(72, 90, 132, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.hero-highlight-box) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(241, 246, 255, 0.97)) !important;
  border: 1px solid rgba(98, 121, 171, 0.2) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.warning-panel) {
  background: linear-gradient(180deg, rgba(255, 243, 248, 0.96), rgba(255, 236, 247, 0.94)) !important;
  border: 1px solid rgba(229, 129, 174, 0.24) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.warning-label) {
  color: #8b2d63 !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.warning-text) {
  color: #7a4566 !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.input-wrap input::placeholder) {
  color: rgba(102, 120, 155, 0.72) !important;
}

:is(
    html[data-theme="light"],
    html.theme-light,
    html.light,
    body[data-theme="light"],
    body.theme-light,
    body.light,
    body.light-theme
  )
  body
  :is(.result-value-hero) {
  background: linear-gradient(90deg, #1eb9eb, #6b6bff, #d83fc7) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

.legal-hero {
  padding-top: 104px;
}
