:root {
  --bg: #04060a;
  --bg2: #070a12;
  --surface: #0c121e;
  --surface2: #101726;
  --text: #f1f4f9;
  --text-pure: #ffffff;
  --muted: #a8b0c0;
  --text-dim: #a8b0c0;
  --faint: #70798b;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #c4a574;
  --gold2: #e4d0a8;
  --gold-glow: rgba(196, 165, 116, 0.35);
  --cosmic-blue: rgba(70, 110, 200, 0.2);
  --danger: #e07070;
  --ok: #78ab78;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  --sans: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", "Palatino Linotype", Georgia, serif;

  /* Apple Liquid Glass Tokens */
  --glass-bg: rgba(15, 22, 36, 0.62);
  --glass-bg-hover: rgba(22, 32, 50, 0.75);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-border-gold: rgba(228, 208, 168, 0.38);
  --glass-blur: blur(24px) saturate(190%);
  --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --glass-shadow: 0 18px 48px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --glass-shadow-hover: 0 24px 60px -10px rgba(0, 0, 0, 0.75), 0 0 32px rgba(196, 165, 116, 0.22), inset 0 1px 2px 0 rgba(255, 255, 255, 0.28);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { position: relative; }
.sky {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1400px 700px at 80% -10%, rgba(196, 165, 116, 0.12), transparent 60%),
    radial-gradient(1100px 600px at 10% 100%, rgba(65, 95, 175, 0.15), transparent 55%),
    radial-gradient(800px 400px at 50% 40%, rgba(130, 80, 200, 0.06), transparent 65%),
    radial-gradient(2px 2px at 12% 22%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 72% 18%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 88% 54%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 44% 12%, rgba(255,255,255,0.22), transparent),
    var(--bg);
}
a { color: var(--gold2); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #fff; }
.top, main, .foot { position: relative; z-index: 1; }

/* Apple Liquid Glass Sticky Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(6, 9, 16, 0.68);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 12px 36px rgba(0, 0, 0, 0.45);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: all 0.3s ease;
}

/* Liquid Glass Language Switcher */
.lang-switcher-wrap {
  display: flex;
  align-items: center;
}

.lang-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: #04060a;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(196, 165, 116, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 25px;
  color: var(--text-pure);
  letter-spacing: 0.06em;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease;
}
.brand:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  vertical-align: middle;
  box-shadow: 0 0 18px rgba(196, 165, 116, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.menu-toggle {
  display: none;
}
.menu-backdrop {
  display: none;
}
nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-icon { display: none; }
/* Navigation links visibility (Shown when user is logged in or a chart is active/shared) */
nav a[data-r] {
  display: none;
}

body.is-logged-in nav a[data-r] {
  display: inline-flex;
  align-items: center;
}

nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
nav a:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
nav a.active {
  color: #04060a;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  border-color: var(--gold2);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(196, 165, 116, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
nav a.disabled {
  color: var(--faint) !important;
  opacity: 0.38 !important;
  cursor: not-allowed !important;
  background: transparent !important;
}
nav a.disabled:hover {
  color: var(--faint) !important;
}

main { max-width: 1120px; margin: 0 auto; padding: 44px 24px 96px; }

/* Liquid Glass Cosmic Pill Kicker */
.badge-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold2);
  background: rgba(196, 165, 116, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(196, 165, 116, 0.32);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 4px 16px rgba(196, 165, 116, 0.12);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
  font-weight: 500;
}
.kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}
.hero { padding: 24px 0 12px; max-width: 760px; }
.hero h1, .page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.8vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text-pure);
}
.hero p, .lede { color: var(--muted); font-size: 17.5px; max-width: 520px; margin: 0; font-weight: 300; line-height: 1.6; }
.hero .hero-desc {
  color: #cad3e2;
  font-size: 19.5px;
  line-height: 1.62;
  max-width: 660px;
  margin: 0 0 30px;
  font-weight: 300;
}
.hero-cta-box {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 24px;
}

/* Apple-Style Glossy Liquid CTA */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ebd6b0 0%, #c4a574 50%, #a4824d 100%);
  color: #04060a;
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 8px 32px rgba(196, 165, 116, 0.4);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 12px 42px rgba(196, 165, 116, 0.65);
  color: #000;
}
.btn-cta:active {
  transform: translateY(0);
}
.page-head { margin-bottom: 30px; }
.page-head .meta { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

.grid { display: grid; gap: 18px; }
@media (min-width: 960px) {
  .cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .cols-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 959px) and (min-width: 640px) {
  .cols-3, .cols-2 { grid-template-columns: 1fr 1fr; }
}

.card {
  background: linear-gradient(145deg, rgba(16, 24, 38, 0.65) 0%, rgba(9, 14, 24, 0.82) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-specular), var(--glass-shadow);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.22), 0 22px 54px -10px rgba(0, 0, 0, 0.65);
}
.card h2, .card h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text-pure);
}
.card h3 { font-size: 19px; }

.metric {
  background: linear-gradient(145deg, rgba(19, 28, 46, 0.7) 0%, rgba(10, 16, 28, 0.85) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 16px 40px -10px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 24px;
}
.metric .lbl {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold2);
  font-weight: 500;
  margin-bottom: 10px;
}
.metric .val {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--text-pure);
  line-height: 1.2;
}

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

label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; letter-spacing: 0.04em; }
input, select, textarea {
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: all 0.2s ease;
}
input:focus, select:focus {
  border-color: rgba(196, 165, 116, 0.55);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 16px rgba(196, 165, 116, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
input[type="date"], input[type="time"], input[type="month"] { color-scheme: dark; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.check input { width: auto; accent-color: var(--gold); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
button, .btn {
  font: inherit;
  cursor: pointer;
  width: auto;
  border-radius: 999px;
  padding: 10px 22px;
  letter-spacing: 0.03em;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
button:hover, .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 6px 20px rgba(0, 0, 0, 0.3);
}
button.primary {
  background: linear-gradient(135deg, #ebd6b0 0%, #c4a574 50%, #a4824d 100%);
  color: #04060a;
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 4px 20px rgba(196, 165, 116, 0.4);
}
button.primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 8px 28px rgba(196, 165, 116, 0.6);
  filter: brightness(1.04);
}
button:disabled, .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(0.7);
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.warn { color: var(--danger); font-size: 13px; }

.suggest { position: relative; }
.suggest ul {
  position: absolute;
  left: 0; right: 0;
  background: #0b1018;
  border: 1px solid var(--line);
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  z-index: 8;
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.suggest li {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.suggest li:hover { background: rgba(255,255,255,0.04); }

.score { font-variant-numeric: tabular-nums; color: var(--gold2); font-weight: 500; }
.bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.bar > i { display: block; height: 100%; background: var(--gold); }

.event {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.event:last-child { border-bottom: 0; }
.event:hover .name { color: var(--gold2); }
.event .name { font-size: 15px; }
.event .when { color: var(--muted); font-size: 13px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--faint);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }

#chart-wrap { width: 100%; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
#chart-wrap svg { max-width: 100%; height: auto; display: block; }

.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.cal-head span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal .d {
  min-height: 88px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  font-size: 11px;
  color: var(--muted);
}
.cal .d strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 6px; font-size: 13px; }

.sys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.sys-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  color: inherit;
  min-height: 180px;
  transition: border-color 0.15s ease;
}
.sys-card:hover { border-color: var(--gold); }
.sys-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 4px 0 10px;
}
.sys-card .sys-head { color: var(--gold2); font-size: 14px; margin: 0 0 8px; }
.sys-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
}
.sys-sub a {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.sys-sub a:hover { color: var(--text); }
.sys-sub a.active {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

/* ==========================================================
   Main Modern Footer
   ========================================================== */
.main-footer {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.4), rgba(4, 6, 10, 0.95));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
  padding: 50px 24px 20px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.4fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
  font-size: 24px;
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-desc {
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 320px;
}

.footer-badge {
  display: inline-block;
  background: rgba(196, 165, 116, 0.1);
  color: var(--gold2);
  border: 1px solid rgba(196, 165, 116, 0.25);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.15s ease;
}

.footer-links a:hover {
  color: var(--gold2);
  transform: translateX(2px);
}

.footer-status-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
}

.footer-disclaimer {
  max-width: 640px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
  margin: 0;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-brand-col {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-brand-col {
    grid-column: span 1;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================
   Legal & Corporate Article Pages
   ========================================================== */
.legal-page {
  max-width: 840px;
  margin: 0 auto 50px;
  padding: 20px 0;
}

.legal-header {
  text-align: center;
  margin-bottom: 36px;
}

.legal-header h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  margin-bottom: 8px;
  color: #fff;
}

.legal-header p {
  color: var(--text-dim);
  font-size: 14px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.legal-card h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--gold2);
  margin: 0 0 14px;
}

.legal-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 20px 0 10px;
}

.legal-card p, .legal-card li {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
}

.legal-card p {
  margin-bottom: 14px;
}

.legal-card ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-card li {
  margin-bottom: 8px;
}

.legal-box {
  background: rgba(196, 165, 116, 0.06);
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}
pre.report, pre.why {
  white-space: pre-wrap;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #d5d0c4;
  margin: 0;
}

/* Apple Liquid Glass Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}
.modal-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.88) 0%, rgba(9, 14, 24, 0.96) 100%);
  border: 1px solid var(--glass-border-gold);
  border-radius: 24px;
  max-width: 460px;
  width: 100%;
  padding: 32px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 28px 72px rgba(0, 0, 0, 0.75), 0 0 35px rgba(196, 165, 116, 0.18);
  text-align: center;
  position: relative;
  animation: slideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(196, 165, 116, 0.12);
  border: 1px solid rgba(196, 165, 116, 0.4);
  box-shadow: 0 0 20px rgba(196, 165, 116, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.modal-card h3 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--text-pure);
  margin: 0 0 10px;
}
.modal-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-btn-primary {
  background: linear-gradient(135deg, #ebd6b0 0%, #c4a574 50%, #a4824d 100%);
  color: #04060a;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 4px 20px rgba(196, 165, 116, 0.4);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
}
.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 8px 30px rgba(196, 165, 116, 0.65);
}
.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--glass-border);
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}
.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--faint);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.feat { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.feat li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.feat li:last-child { border: 0; }
.feat strong { color: var(--text); font-weight: 500; display: block; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.dist {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  font-size: 13px;
}
.dist b { font-variant-numeric: tabular-nums; color: var(--gold2); text-align: right; }
.dossier {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.dossier:last-of-type { border-bottom: 0; }
.dossier summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  list-style: none;
}
.dossier summary::-webkit-details-marker { display: none; }
.dossier summary span { color: var(--muted); font-size: 13px; }
.pattern { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pattern:last-child { border: 0; }
.pattern p { margin: 6px 0 0; }
a.btn { display: inline-block; }
.feat strong { color: var(--text); font-weight: 500; display: block; margin-bottom: 2px; }

.badge.gold {
  color: #111827;
  background: var(--gold);
  border-color: var(--gold2);
  font-weight: 600;
}
.badge.highlight {
  color: var(--gold2);
  border-color: var(--gold);
  background: rgba(196, 165, 116, 0.12);
}
.highlight-row {
  background: rgba(196, 165, 116, 0.08);
}
.highlight-row td {
  color: var(--gold2);
  font-weight: 500;
}

.toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar label { margin-top: 0; }
.toolbar select, .toolbar input { width: auto; min-width: 160px; }

@media (max-width: 860px) {
  .top {
    padding: 12px 18px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }
  .brand {
    font-size: 22px;
  }

  /* Hamburger Menu Button */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(196, 165, 116, 0.4);
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    z-index: 105;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .menu-toggle:hover {
    background: rgba(196, 165, 116, 0.18);
    border-color: var(--gold2);
    transform: scale(1.04);
  }
  .menu-toggle .bar {
    display: block !important;
    width: 22px;
    height: 2.5px;
    background: #ebd6b0 !important;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
  }
  .menu-toggle.open .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: #ffffff !important;
  }
  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: #ffffff !important;
  }

  /* Dark Backdrop */
  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Mobile Drawer Navigation */
  nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(13, 18, 28, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(196, 165, 116, 0.35);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
    z-index: 100;
    gap: 6px;
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  nav.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  body.is-logged-in nav.open a[data-r] {
    display: flex !important;
  }

  body:not(.is-logged-in) .menu-toggle {
    display: none !important;
  }

  .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    width: 24px;
  }

  nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    text-transform: none;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
  }
  nav a:hover {
    background: rgba(196, 165, 116, 0.12);
    border-color: rgba(196, 165, 116, 0.4);
    color: #fff;
    transform: translateX(3px);
  }
  nav a.active {
    background: linear-gradient(135deg, var(--gold), #d8b880);
    color: #0d121c;
    font-weight: 600;
    border-color: var(--gold2);
    box-shadow: 0 4px 14px rgba(196, 165, 116, 0.3);
  }
}

@media (max-width: 640px) {
  main {
    padding: 20px 12px 70px;
  }
  .hero {
    padding: 12px 0 8px;
  }
  .hero h1, .page-title {
    font-size: clamp(28px, 8.5vw, 38px);
    line-height: 1.15;
    margin-bottom: 12px;
  }
  .hero .hero-desc {
    font-size: 15.5px;
    line-height: 1.5;
    margin-bottom: 20px;
  }
  .grid.cols-3, .grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card {
    padding: 16px 13px;
    border-radius: 14px;
  }
  .card h2 {
    font-size: 20px;
  }
  .card h3 {
    font-size: 17px;
  }
  .metric {
    padding: 16px 13px;
  }
  .metric .val {
    font-size: 22px;
  }
  .actions {
    flex-direction: column;
    gap: 8px;
  }
  .actions button, .actions .btn, .actions a.btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }
  input, select, textarea {
    font-size: 16px; /* iOS Safari zoom engelleyici */
    padding: 12px 14px;
    min-height: 44px;
  }
  button, .btn {
    min-height: 44px;
  }

  /* Table auto scroll */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  th, td {
    padding: 8px 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Calendar mobile */
  .cal-head {
    gap: 4px;
    margin-bottom: 4px;
  }
  .cal-head span {
    font-size: 9.5px;
    padding: 2px 0;
  }
  .cal {
    gap: 4px;
  }
  .cal .d {
    min-height: 56px;
    padding: 4px 2px;
    border-radius: 6px;
    font-size: 9px;
  }
  .cal .d strong {
    font-size: 11px;
    margin-bottom: 2px;
    text-align: center;
  }
  .cal-item {
    font-size: 8.5px;
    padding: 2px 3px;
    border-radius: 4px;
    margin-top: 2px;
    line-height: 1.2;
  }
  .cal-dot {
    width: 4px;
    height: 4px;
    margin-right: 2px;
  }

  /* Modal mobile */
  .modal-backdrop {
    padding: 12px 8px;
    align-items: flex-end;
  }
  .modal-card {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 14px 14px;
    padding: 20px 16px;
  }

  /* Synastry mobile */
  .synastry-hero-card {
    padding: 20px 12px !important;
  }
  .synastry-hero-card div[style*="font-size:64px"] {
    font-size: 42px !important;
  }
}

/* Floating Chart Tooltip */
.chart-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: rgba(13, 18, 28, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(196, 165, 116, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease;
  max-width: 85vw;
}
.chart-tooltip.active {
  opacity: 1;
  transform: scale(1);
}

/* Calendar Interactive Events */
.cal-item {
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  color: var(--gold2);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-item:hover {
  background: rgba(196, 165, 116, 0.18);
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-1px);
}
.cal-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 4px;
}

/* ==========================================================
   Advanced Astrology Engine Styles: Micro, Vargas, BaZi & UI
   ========================================================== */

/* Anaretic & Critical Degree Badges */
.anaretic-card {
  background: linear-gradient(135deg, rgba(196, 74, 74, 0.12), rgba(20, 10, 15, 0.6));
  border: 1px solid rgba(196, 74, 74, 0.4);
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: transform 0.15s ease;
}
.anaretic-card:hover { transform: translateX(2px); }

.badge.anaretic {
  background: rgba(196, 74, 74, 0.25);
  color: #ff9b9b;
  border: 1px solid rgba(196, 74, 74, 0.5);
  font-weight: 600;
  animation: pulse-danger 2.5s infinite;
}
@keyframes pulse-danger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 74, 74, 0.4); }
  50% { box-shadow: 0 0 10px 2px rgba(196, 74, 74, 0.2); }
}

.badge.ingress {
  background: rgba(80, 140, 200, 0.22);
  color: #a5d2ff;
  border: 1px solid rgba(80, 140, 200, 0.45);
  font-weight: 600;
}

.badge.cazimi {
  background: linear-gradient(135deg, rgba(228, 208, 168, 0.3), rgba(196, 165, 116, 0.4));
  color: #fff2d6;
  border: 1px solid var(--gold2);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(228, 208, 168, 0.35);
}

.badge.combust {
  background: rgba(220, 120, 50, 0.2);
  color: #ffb885;
  border: 1px solid rgba(220, 120, 50, 0.4);
}

.badge.vargottama {
  background: linear-gradient(135deg, rgba(168, 130, 240, 0.25), rgba(196, 165, 116, 0.25));
  color: #f1e2ff;
  border: 1px solid rgba(168, 130, 240, 0.6);
  font-weight: 600;
}

/* Midpoints Table & Cards */
.midpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.midpoint-card {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}
.midpoint-card:hover {
  border-color: rgba(196, 165, 116, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

/* Harmonic Cards */
.harmonic-box {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.harmonic-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

/* Ashtakavarga Matrix Table */
.ashtaka-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  margin-top: 12px;
  font-size: 13px;
}
.ashtaka-table th {
  background: var(--surface2);
  color: var(--gold2);
  padding: 8px 6px;
  text-align: center;
  font-weight: 500;
  border-radius: 4px;
}
.ashtaka-table td {
  padding: 8px 6px;
  text-align: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}
.ashtaka-table td.cell-high {
  background: rgba(125, 155, 125, 0.22);
  color: #b7e4b7;
  font-weight: 600;
}
.ashtaka-table td.cell-mid {
  background: rgba(196, 165, 116, 0.15);
  color: var(--gold2);
}
.ashtaka-table td.cell-low {
  background: rgba(196, 122, 122, 0.18);
  color: #ffb0b0;
}

/* Shadbala Power Bars */
.shadbala-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.shadbala-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.shadbala-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.shadbala-bar-fill.exceed {
  background: linear-gradient(90deg, #7d9b7d, #a8d5a8);
}

/* BaZi 4 Pillars Rich UI */
.bazi-pillars-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
@media (max-width: 768px) {
  .bazi-pillars-wrap {
    grid-template-columns: repeat(2, 1fr);
  }
}
.bazi-pillar-card {
  background: linear-gradient(180deg, var(--surface2), rgba(13, 18, 28, 0.95));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.bazi-pillar-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.bazi-pillar-card.day-master-card {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(196, 165, 116, 0.12), rgba(17, 24, 39, 0.95));
}
.bazi-stem-char {
  font-size: 32px;
  font-family: var(--serif);
  color: var(--gold2);
  line-height: 1.1;
  margin: 4px 0;
}
.bazi-branch-char {
  font-size: 28px;
  font-family: var(--serif);
  color: var(--text);
  line-height: 1.1;
  margin: 4px 0;
}
.bazi-hidden-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  text-align: left;
}
.bazi-hidden-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* Da Yun Luck Pillars Timeline */
.dayun-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.dayun-card {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  transition: all 0.2s ease;
}
.dayun-card:hover {
  border-color: var(--gold);
  background: rgba(196, 165, 116, 0.08);
  transform: translateY(-2px);
}
.dayun-age {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}
.dayun-gz {
  font-size: 18px;
  font-family: var(--serif);
  color: #fff;
  margin: 2px 0;
}
.dayun-god {
  font-size: 11px;
  color: var(--muted);
}

/* ==========================================================
   Google OAuth, User Profile Badge & Gated App Styles
   ========================================================== */

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

.nav-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s ease;
}

.nav-user-badge:hover {
  border-color: var(--gold);
  background: rgba(196, 165, 116, 0.08);
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}

.nav-user-name {
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-nav-logout {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-nav-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-nav-login {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #05070c;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(196, 165, 116, 0.3);
}

.btn-nav-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(196, 165, 116, 0.5);
}

/* Landing Page Hero CTA & Google Login Box */
.landing-cta-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
}

.google-signin-wrapper {
  background: linear-gradient(145deg, rgba(18, 26, 42, 0.65) 0%, rgba(10, 15, 26, 0.82) 100%);
  border: 1px solid var(--glass-border-gold);
  border-radius: 24px;
  padding: 24px 28px;
  display: inline-flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-specular), 0 16px 48px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(196, 165, 116, 0.15);
}

.google-signin-title {
  font-size: 14px;
  color: var(--gold2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

/* Onboarding view */
.onboarding-card {
  max-width: 580px;
  margin: 0 auto;
  border: 1px solid var(--glass-border-gold);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.22), 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 35px rgba(196, 165, 116, 0.15);
  background: linear-gradient(180deg, rgba(18, 26, 42, 0.85), rgba(10, 15, 26, 0.94));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.onboarding-welcome {
  text-align: center;
  margin-bottom: 24px;
}

.onboarding-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin-bottom: 14px;
  box-shadow: 0 0 24px rgba(196, 165, 116, 0.45);
}

.user-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.user-chart-card {
  background: linear-gradient(145deg, rgba(22, 32, 52, 0.6) 0%, rgba(13, 19, 32, 0.75) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.user-chart-card:hover {
  border-color: var(--gold2);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22), 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(196, 165, 116, 0.2);
}

.user-chart-card.active-chart {
  border: 2px solid var(--gold);
  background: rgba(196, 165, 116, 0.12);
  box-shadow: 0 0 24px rgba(196, 165, 116, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

@media (max-width: 860px) {
  .user-nav-container {
    width: 100%;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    justify-content: space-between;
  }
}

/* === ASTROLOGY PILLAR GUIDES & HUB STYLES === */
.guide-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.guide-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.guide-breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.guide-breadcrumb a:hover {
  color: var(--gold2);
}

.guide-breadcrumb span.sep {
  opacity: 0.4;
}

.guide-hero {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.guide-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(196, 165, 116, 0.12);
  color: var(--gold2);
  border: 1px solid rgba(196, 165, 116, 0.3);
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 12px;
  flex-wrap: wrap;
}

.guide-title {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.22;
  margin: 0 0 16px;
  color: #fff;
  font-family: var(--serif);
}

.guide-lead {
  font-size: 18px;
  line-height: 1.68;
  color: var(--text-pure);
  margin: 0;
  font-weight: 400;
}

.guide-toc {
  background: linear-gradient(145deg, rgba(20, 28, 44, 0.7) 0%, rgba(12, 17, 28, 0.85) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 36px;
}

.guide-toc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold2);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 20px;
}

.guide-toc-list a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-toc-list a:hover {
  color: var(--gold2);
  transform: translateX(3px);
}

.guide-body {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--text-pure);
}

.guide-body h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 32px);
  color: var(--gold2);
  margin: 44px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 165, 116, 0.2);
  scroll-margin-top: 90px;
}

.guide-body h3 {
  font-size: 20px;
  color: #fff;
  margin: 28px 0 12px;
  scroll-margin-top: 90px;
}

.guide-body p {
  margin: 0 0 20px;
}

.guide-body ul, .guide-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.guide-body li {
  margin-bottom: 8px;
}

.guide-callout {
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
  border: 1px solid;
  backdrop-filter: blur(12px);
}

.guide-callout.gold {
  background: linear-gradient(145deg, rgba(38, 30, 18, 0.6) 0%, rgba(20, 16, 10, 0.75) 100%);
  border-color: rgba(196, 165, 116, 0.35);
  box-shadow: 0 4px 20px rgba(196, 165, 116, 0.1);
}

.guide-callout.blue {
  background: linear-gradient(145deg, rgba(16, 28, 48, 0.6) 0%, rgba(10, 18, 32, 0.75) 100%);
  border-color: rgba(80, 140, 220, 0.35);
}

.guide-callout-head {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-callout.gold .guide-callout-head { color: var(--gold2); }
.guide-callout.blue .guide-callout-head { color: #82b1ff; }

.guide-cta-box {
  background: radial-gradient(circle at 50% 0%, rgba(196, 165, 116, 0.22) 0%, rgba(18, 26, 42, 0.88) 100%);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 40px 0;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 28px rgba(196, 165, 116, 0.2);
}

.guide-cta-box h3 {
  font-family: var(--serif);
  font-size: 26px;
  margin: 0 0 10px;
  color: #fff;
}

.guide-cta-box p {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 580px;
  margin: 0 auto 24px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14.5px;
}

.guide-table th {
  background: rgba(196, 165, 116, 0.15);
  color: var(--gold2);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid rgba(196, 165, 116, 0.3);
}

.guide-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-pure);
  vertical-align: top;
}

.guide-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.guide-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.guide-card-mini {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}

.guide-card-mini:hover {
  border-color: var(--gold2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.guide-card-mini h4 {
  margin: 0 0 6px;
  color: var(--gold2);
  font-size: 16px;
}

.guide-card-mini p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

.guide-faq-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.guide-faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.guide-faq-q {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.guide-faq-q:hover {
  color: var(--gold2);
}

.guide-faq-a {
  padding: 0 20px 18px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
  padding-top: 12px;
}

/* Hub Grid */
.guides-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 28px 0 48px;
}

.guide-hub-card {
  background: linear-gradient(145deg, rgba(22, 32, 52, 0.6) 0%, rgba(13, 19, 32, 0.8) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.guide-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(196, 165, 116, 0.22);
}

.guide-hub-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.guide-hub-card h3 {
  font-size: 19px;
  color: #fff;
  margin: 0 0 8px;
  font-family: var(--sans);
  line-height: 1.35;
}

.guide-hub-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 18px;
  flex-grow: 1;
}

.guide-hub-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--gold2);
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

/* ==========================================================
   NatalKit editorial cosmic system
   Glass is reserved for navigation, actions and live surfaces.
   ========================================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

.sky {
  background:
    radial-gradient(900px 620px at 72% 3%, rgba(108, 88, 170, .15), transparent 65%),
    radial-gradient(780px 540px at 4% 46%, rgba(37, 79, 146, .13), transparent 62%),
    radial-gradient(520px 420px at 86% 84%, rgba(151, 114, 62, .08), transparent 70%),
    #05070c;
}

.top {
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(11, 15, 24, .67);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 18px 55px rgba(0,0,0,.32);
}

.brand { letter-spacing: .015em; }
.brand-logo { border-radius: 9px; }
main { max-width: 1180px; padding-top: 56px; }

/* Landing */
.page-landing main { padding-top: 24px; }
.landing-hero {
  position: relative;
  min-height: 680px;
  padding: 112px 7% 46px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 32px;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(9,13,22,.95) 0%, rgba(9,13,22,.82) 48%, rgba(18,20,35,.46) 100%),
    radial-gradient(circle at 82% 44%, rgba(132,104,190,.23), transparent 35%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 40px 90px rgba(0,0,0,.35);
}
.landing-hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -120px;
  top: -52px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 52px, rgba(218,205,255,.09) 53px 54px);
  mask-image: linear-gradient(to left, #000, transparent 88%);
}
.landing-hero-copy { position: relative; z-index: 2; max-width: 700px; }
.landing-hero .badge-kicker { margin-bottom: 28px; }
.kicker-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold2);
  box-shadow: 0 0 12px var(--gold2);
}
.landing-hero h1 {
  max-width: 690px;
  margin: 0 0 24px;
  font: 400 clamp(55px, 7.4vw, 88px)/.96 var(--serif);
  letter-spacing: -.035em;
  color: #fff;
  text-wrap: balance;
}
.landing-hero-copy > p {
  max-width: 590px;
  margin: 0;
  color: #bec6d5;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.65;
}
.hero-orbit {
  position: absolute;
  width: 400px; height: 400px; right: 5%; top: 100px;
  display: grid; place-items: center; opacity: .72;
}
.orbit-ring { position: absolute; border: 1px solid rgba(226,214,255,.22); border-radius: 50%; }
.orbit-one { width: 290px; height: 290px; transform: rotate(-18deg) scaleY(.42); }
.orbit-two { width: 380px; height: 380px; transform: rotate(32deg) scaleY(.3); }
.orbit-core {
  display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%;
  color: #f4e7c9; font-size: 27px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.26), rgba(126,94,172,.18) 40%, rgba(6,9,16,.82) 75%);
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 0 70px rgba(124,91,175,.34), inset 0 1px 1px rgba(255,255,255,.22);
}
.landing-cta-container { align-items: flex-start; flex-direction: row; flex-wrap: wrap; margin-top: 34px; }
.google-signin-wrapper { padding: 15px 17px; border-radius: 18px; gap: 9px; }
.google-signin-title { font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.hero-text-link { align-self: center; padding: 12px 4px; color: #c8cfdb; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.2); }
.hero-text-link:hover { border-color: var(--gold2); }
.hero-proof {
  position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 34px;
  display: flex; gap: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.09);
}
.hero-proof div { display: flex; flex-direction: column; gap: 2px; }
.hero-proof strong { color: #e9ecf2; font-size: 12px; font-weight: 500; letter-spacing: .025em; }
.hero-proof span { color: #747e90; font-size: 11px; }

.landing-section, .guides-showcase { margin: 128px auto; }
.section-heading, .guides-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-index { display: block; color: var(--gold); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.section-heading h2, .product-intro h2, .guides-heading h2 {
  margin: 0; font: 400 clamp(38px, 5vw, 58px)/1.02 var(--serif); color: #fff; letter-spacing: -.02em;
}
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.12); }
.process-grid article { padding: 28px 34px 20px 0; }
.process-grid article + article { padding-left: 34px; border-left: 1px solid rgba(255,255,255,.1); }
.process-no { color: var(--gold); font: italic 18px var(--serif); }
.process-grid h3 { margin: 44px 0 10px; color: #f5f6f8; font-size: 18px; font-weight: 500; }
.process-grid p { margin: 0; color: var(--muted); font-size: 14px; max-width: 285px; }

.product-section { display: grid; grid-template-columns: .78fr 1.45fr; gap: 72px; align-items: start; }
.product-intro { position: sticky; top: 120px; }
.product-intro > p { color: var(--muted); max-width: 360px; margin-top: 22px; }
.product-panels { display: grid; grid-template-columns: 1.18fr .82fr; gap: 16px; }
.product-panel {
  min-height: 460px; padding: 34px 28px; border-radius: 26px;
  background: rgba(12,17,27,.88); border: 1px solid rgba(255,255,255,.09);
}
.product-panel-primary {
  background: linear-gradient(155deg, rgba(29,31,52,.72), rgba(10,15,25,.78));
  backdrop-filter: blur(22px) saturate(150%); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 26px 60px rgba(0,0,0,.25);
}
.panel-mark { display: block; margin-bottom: 82px; color: rgba(228,208,168,.8); font: 400 48px var(--serif); }
.product-panel h3 { font: 400 28px var(--serif); color: #fff; }
.product-panel .feat li { padding: 13px 0; font-size: 13px; }

.guides-showcase { padding-top: 26px; }
.guides-heading { align-items: end; }
.guides-heading-copy { max-width: 390px; }
.guides-heading-copy p { color: var(--muted); margin: 0 0 14px; }
.guides-heading-copy a { font-size: 13px; }
.editorial-guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.editorial-guide {
  min-height: 320px; display: flex; flex-direction: column; padding: 25px; color: inherit;
  border: 1px solid rgba(255,255,255,.09); border-radius: 23px; background: rgba(12,17,27,.82);
  transition: transform .28s ease, border-color .28s ease, background .28s ease;
}
.editorial-guide:hover { color: inherit; transform: translateY(-5px); border-color: rgba(228,208,168,.35); background: rgba(17,23,36,.94); }
.editorial-guide.featured {
  grid-column: span 2; padding: 32px;
  background: linear-gradient(135deg, rgba(50,43,64,.62), rgba(13,20,32,.72));
  backdrop-filter: blur(22px) saturate(155%); box-shadow: inset 0 1px rgba(255,255,255,.13), 0 24px 60px rgba(0,0,0,.26);
}
.guide-mark { min-height: 68px; color: #e4d0a8; font: 400 31px var(--serif); letter-spacing: -.04em; }
.editorial-guide.featured .guide-mark { font-size: 48px; }
.guide-copy > span { color: var(--gold); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.guide-copy h3 { margin: 8px 0 10px; font: 400 28px var(--serif); color: #fff; }
.editorial-guide.featured h3 { font-size: 38px; }
.guide-copy p { color: var(--muted); font-size: 13.5px; line-height: 1.6; max-width: 450px; margin: 0; }
.guide-meta-line { display: flex; justify-content: space-between; margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); color: #7f8999; font-size: 11px; }

/* Guide hub and articles */
.guides-hub { max-width: 1040px; margin: 0 auto 50px; }
.guides-hub-header { max-width: 790px; padding: 42px 0 64px; }
.guides-hub-header h1 { margin: 0; font: 400 clamp(48px, 7vw, 76px)/1 var(--serif); letter-spacing: -.035em; color: #fff; }
.guides-hub-header h1 em { color: var(--gold2); font-weight: 400; }
.guides-hub-header p { max-width: 620px; color: var(--muted); font-size: 17px; margin: 24px 0 0; }
.guides-library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.library-card {
  min-height: 330px; display: flex; flex-direction: column; color: inherit; padding: 26px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 22px; background: #0c111b;
  transition: transform .25s ease, border-color .25s ease;
}
.library-card:hover { color: inherit; transform: translateY(-4px); border-color: rgba(228,208,168,.36); }
.library-featured { grid-column: span 2; background: linear-gradient(140deg, rgba(39,36,55,.78), rgba(12,17,27,.86)); backdrop-filter: blur(20px); }
.library-card-top { display: flex; justify-content: space-between; color: #7d8696; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.library-mark { margin: 46px 0 18px; color: var(--gold2); font: 38px var(--serif); }
.library-card h2 { margin: 0 0 10px; color: #fff; font: 400 28px var(--serif); }
.library-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.library-link { display: flex; justify-content: space-between; margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); color: var(--gold2); font-size: 12px; }

.guide-article-header {
  margin-bottom: 22px; padding: 54px 7% 48px; border-radius: 28px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(31,33,52,.75), rgba(11,16,26,.84));
  border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 28px 70px rgba(0,0,0,.24);
}
.guide-article-header::after { content: "☾"; position: absolute; right: 7%; top: 22px; color: rgba(228,208,168,.11); font: 150px var(--serif); }
.guide-article-label { display: flex; gap: 12px; margin-bottom: 24px; color: var(--gold2); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.guide-article-label span + span::before { content: "·"; margin-right: 12px; }
.guide-article-header h1 { position: relative; z-index: 1; max-width: 690px; margin: 0 0 20px; color: #fff; font: 400 clamp(38px, 5vw, 56px)/1.07 var(--serif); letter-spacing: -.025em; }
.guide-article-header > p { position: relative; z-index: 1; max-width: 680px; color: #bbc3d1; font-size: 17px; line-height: 1.68; }
.guide-byline { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.09); color: #7e8797; font-size: 11px; }
.guide-article-toc { margin: 0 0 24px; padding: 22px 26px; border-left: 2px solid var(--gold); background: #0b1019; }
.guide-toc-eyebrow { display: block; color: var(--gold); font-size: 10px; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 13px; }
.guide-toc-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 22px; }
.guide-toc-links a { color: #aeb6c5; font-size: 13px; }
.guide-toc-links a:hover { color: #fff; }

/* Reading surfaces deliberately avoid transparency and blur. */
.page-guide .card:not(.guide-hub-card) {
  background: #0b1018 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(255,255,255,.075) !important;
  box-shadow: none !important;
  border-radius: 16px;
}
.page-guide .card:not(.guide-hub-card):hover { transform: none; }
.page-guide .card p, .page-guide .card li { color: #c7ced9 !important; }
.page-guide .card > h2 { color: #f0dfbc !important; }
.page-guide .card strong { color: #f2f3f5; }

.guide-liquid-cta {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin: 30px 0;
  padding: 26px; border-radius: 22px; border: 1px solid rgba(228,208,168,.3);
  background: linear-gradient(135deg, rgba(42,37,52,.72), rgba(15,22,34,.74));
  backdrop-filter: blur(20px) saturate(150%); box-shadow: inset 0 1px rgba(255,255,255,.14), 0 20px 50px rgba(0,0,0,.25);
}
.guide-cta-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--gold2); border: 1px solid rgba(228,208,168,.3); }
.guide-cta-label { color: var(--gold); font-size: 9px; text-transform: uppercase; letter-spacing: .14em; }
.guide-liquid-cta h3 { margin: 3px 0 3px; color: #fff; font: 400 22px var(--serif); }
.guide-liquid-cta p { max-width: 530px; margin: 0; color: var(--muted); font-size: 12px; }
.guide-liquid-cta button { white-space: nowrap; }

.guide-faq { margin-top: 38px; padding: 30px 0; border-top: 1px solid rgba(255,255,255,.1); }
.guide-faq h3 { margin: 0 0 20px; color: #fff; font: 400 28px var(--serif); }
.guide-faq-row { border-bottom: 1px solid rgba(255,255,255,.09); }
.guide-faq-question { width: 100%; min-height: 0; display: flex; justify-content: space-between; text-align: left; padding: 18px 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #e9ebef; font-size: 14px; }
.guide-faq-question:hover { transform: none; background: none; color: var(--gold2); }
.guide-faq-answer { padding: 0 42px 20px 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

@media (max-width: 860px) {
  .top { width: calc(100% - 20px); margin-top: 8px; }
  .landing-hero { min-height: 700px; padding: 80px 34px 140px; }
  .hero-orbit { right: -150px; top: 150px; opacity: .38; }
  .hero-proof { left: 34px; right: 34px; gap: 22px; }
  .product-section { grid-template-columns: 1fr; gap: 34px; }
  .product-intro { position: static; }
  .editorial-guides, .guides-library-grid { grid-template-columns: 1fr 1fr; }
  .editorial-guide.featured, .library-featured { grid-column: span 2; }
  .guide-liquid-cta { grid-template-columns: auto 1fr; }
  .guide-liquid-cta button { grid-column: 2; justify-self: start; }
}

@media (max-width: 640px) {
  .page-landing main { padding: 12px 10px 60px; }
  .landing-hero { min-height: 720px; padding: 62px 22px 180px; border-radius: 24px; }
  .landing-hero h1 { font-size: clamp(43px, 13.5vw, 61px); }
  .landing-hero-copy > p { font-size: 16px; }
  .landing-cta-container { flex-direction: column; }
  .hero-proof { left: 22px; right: 22px; bottom: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .hero-proof div:last-child { grid-column: span 2; }
  .landing-section, .guides-showcase { margin: 88px auto; }
  .section-heading, .guides-heading { display: block; }
  .guides-heading-copy { margin-top: 22px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-grid article, .process-grid article + article { padding: 23px 0; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .process-grid h3 { margin-top: 18px; }
  .product-panels, .editorial-guides, .guides-library-grid { grid-template-columns: 1fr; }
  .product-panel { min-height: 0; }
  .panel-mark { margin-bottom: 50px; }
  .editorial-guide.featured, .library-featured { grid-column: auto; }
  .editorial-guide, .editorial-guide.featured { min-height: 300px; padding: 23px; }
  .guides-hub-header { padding: 28px 0 46px; }
  .guides-hub-header h1 { font-size: 45px; }
  .guide-article-header { padding: 35px 22px; border-radius: 22px; }
  .guide-article-header > p { font-size: 15px; }
  .guide-toc-links { grid-template-columns: 1fr; }
  .guide-liquid-cta { display: block; padding: 23px; }
  .guide-cta-mark { margin-bottom: 18px; }
  .guide-liquid-cta button { margin-top: 18px; width: 100%; white-space: normal; }
}

/* Responsive authenticated navigation */
@media (min-width: 1181px) {
  .top { width: min(1480px, calc(100% - 24px)); }
  .top nav { flex: 1; justify-content: flex-end; align-items: center; flex-wrap: nowrap; min-width: 0; }
  .top nav a { padding: 8px 10px; font-size: 11.5px; letter-spacing: .045em; white-space: nowrap; }
  .top .user-nav-container { flex: 0 0 auto; margin-left: 4px; }
  .top .nav-user-name { max-width: 92px; }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .top { width: calc(100% - 20px); padding: 9px 11px 9px 15px; }
  .top nav { flex: 1; justify-content: flex-end; align-items: center; flex-wrap: nowrap; min-width: 0; }
  .top nav a[data-r] {
    flex: 0 0 37px;
    width: 37px;
    height: 37px;
    justify-content: center;
    padding: 0;
    border-radius: 11px;
  }
  .top nav a[data-r] [data-i18n] { display: none; }
  .top .nav-icon { display: inline-flex; width: auto; font-size: 15px; }
  .top .user-nav-container { flex: 0 0 auto; margin-left: 5px; gap: 5px; }
  .top .nav-user-name { display: none; }
  .top .nav-user-badge { padding: 4px; }
  .top .btn-nav-logout { padding: 6px 8px; }
}

/* Auth gate for protected calculation tools */
.auth-required-card { max-width: 500px; padding: 38px 34px 30px; }
.auth-required-card .modal-icon { color: var(--gold2); font-size: 22px; }
.auth-required-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.auth-required-card h3 { max-width: 360px; margin: 0 auto 12px; font-size: 30px; line-height: 1.1; }
.auth-required-card p { max-width: 400px; margin: 0 auto 22px; }
.auth-required-google {
  min-height: 44px;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-required-card small {
  display: block;
  max-width: 390px;
  margin: 0 auto;
  padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

/* PWA update notice */
.pwa-update-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  width: min(440px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 13px;
  padding: 13px 13px 13px 15px;
  color: var(--text);
  background: rgba(15, 21, 33, .84);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 19px;
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 22px 60px rgba(0,0,0,.52);
  opacity: 0;
  transform: translateY(14px) scale(.98);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.pwa-update-toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.pwa-update-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(228,208,168,.32);
  border-radius: 50%;
  color: var(--gold2);
  background: rgba(196,165,116,.09);
  box-shadow: inset 0 1px rgba(255,255,255,.12), 0 0 20px rgba(196,165,116,.12);
}
.pwa-update-copy { min-width: 0; display: flex; flex-direction: column; }
.pwa-update-copy strong { color: #fff; font-size: 13.5px; font-weight: 500; }
.pwa-update-copy span { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-update-action {
  min-height: 36px;
  padding: 8px 15px;
  color: #080a0f;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  border-color: rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 600;
}
.pwa-update-dismiss {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 20px;
}
.pwa-update-dismiss:hover { transform: none; background: rgba(255,255,255,.06); }
.pwa-update-toast.is-applying .pwa-update-dismiss { pointer-events: none; opacity: .35; }

@media (max-width: 560px) {
  .pwa-update-toast {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    grid-template-columns: auto 1fr auto;
  }
  .pwa-update-copy span { white-space: normal; line-height: 1.35; }
  .pwa-update-action { grid-column: 2; justify-self: start; }
  .pwa-update-dismiss { grid-column: 3; grid-row: 1; }
}

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

