:root {
  --ink-900: #0e1b16;
  --ink-700: #253b34;
  --ink-500: #4d645c;
  --bg: #f4f6f2;
  --panel: #ffffff;
  --line: #d8e1da;
  --emerald: #178f61;
  --emerald-2: #0f6f4b;
  --mint: #6fd6af;
  --gold: #b9933f;
  --violet: #4c1ccf;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 14px 34px rgba(20, 43, 35, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
}

body {
  font-family: "Inter", "Manrope", "Segoe UI", sans-serif;
  color: var(--ink-900);
  background: radial-gradient(circle at 14% 4%, rgba(111, 214, 175, 0.2), transparent 26%),
    radial-gradient(circle at 90% 0%, rgba(185, 147, 63, 0.12), transparent 30%),
    var(--bg);
  line-height: 1.55;
  width: 100vw;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.wrap { width: min(1160px, calc(100% - 2.2rem)); margin: 0 auto; }

.index-page .wrap {
  width: min(1260px, calc(100% - 2.4rem));
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(244, 246, 242, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 44px;
  height: 44px;
  display: block;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05em;
  color: var(--ink-900);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink-700);
  padding: 0.4rem 0.56rem;
  border-radius: 8px;
  font-size: 0.94rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink-900);
  background: rgba(23, 143, 97, 0.11);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.68rem 1.05rem;
  font-weight: 700;
  font-size: 0.92rem;
  transition: 180ms ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, var(--emerald), var(--emerald-2));
  box-shadow: 0 8px 24px rgba(16, 121, 83, 0.24);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-secondary {
  color: var(--emerald-2);
  border-color: rgba(23, 143, 97, 0.3);
  background: rgba(23, 143, 97, 0.08);
}

main { padding: 2.2rem 0 3.4rem; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
  align-items: stretch;
}

.hero-card,
.hero-side,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card { padding: 2rem; }
.panel { padding: 1.3rem; }

.about-intro {
  padding: 1.1rem 1.2rem 1rem;
}

.about-intro h1 {
  margin: 0.45rem 0 0.7rem;
}

.about-intro .lead {
  margin: 0 0 0.7rem;
  max-width: 52ch;
}

.about-intro .lead:last-of-type {
  margin-bottom: 0;
}

.kicker {
  margin: 0;
  color: var(--emerald-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }

h1 {
  margin: 0.75rem 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-family: "Source Serif 4", Georgia, serif;
}

.live-line {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 700;
  color: var(--ink-700);
  margin: 0;
}

.live-text { color: var(--emerald); min-width: 8ch; display: inline-block; }

.lead {
  margin: 1rem 0 1.2rem;
  color: var(--ink-500);
  max-width: 58ch;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.62rem; }

.trust-inline {
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-700);
  font-size: 0.9rem;
}

.trust-inline .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
}

.trust-inline::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--line);
  display: inline-block;
}

.hero-side {
  padding: 1.3rem;
  display: grid;
  gap: 0.55rem;
  background: linear-gradient(165deg, #f8fbf8, #ebf4ef);
}

.hero-side .badge {
  align-self: flex-start;
  padding: 0.35rem 0.7rem;
}

.hero-side-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--emerald-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.gold-text {
  color: var(--gold);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.stat {
  padding: 0.8rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.stat strong { display: block; font-size: 1.25rem; }

.stat-wide {
  grid-column: 1 / -1;
}

.trust-strip {
  margin-top: 1rem;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(23, 143, 97, 0.12), rgba(23, 143, 97, 0.04));
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.trust-item {
  text-align: center;
  padding: 0.6rem 0.4rem;
}

.trust-item strong {
  display: block;
  color: var(--emerald-2);
}

.trust-item span {
  color: var(--ink-500);
  font-size: 0.9rem;
}
.stack { display: grid; gap: 1rem; margin-top: 1rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 0.8rem;
}

.section-head p,
.muted { color: var(--ink-500); margin: 0; }

.grid-3,
.grid-2,
.grid-4 { display: grid; gap: 0.9rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.grid-2 > *,
.grid-3 > *,
.grid-4 > * {
  min-width: 0;
}

.card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  overflow-wrap: anywhere;
}

.card h3 { margin: 0 0 0.45rem; font-size: 1.08rem; }

.founder-panel {
  padding: 1.1rem 1.2rem;
}

.founder-head {
  margin-bottom: 0.65rem;
}

.founder-head .kicker {
  margin-bottom: 0.2rem;
}

.founder-head h2 {
  margin: 0;
  font-size: 2rem;
}

.founder-role {
  margin: 0.2rem 0 0;
  color: var(--ink-500);
  font-size: 1rem;
  font-weight: 600;
}

.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 0.9rem;
  align-items: start;
}

.founder-copy p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.98rem;
  line-height: 1.55;
}

.founder-copy p + p {
  margin-top: 0.6rem;
}

.founder-photo {
  display: flex;
  justify-content: flex-end;
}

.founder-photo img {
  width: 100%;
  max-width: 290px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem;
}

.pill {
  border: 1px solid rgba(23, 143, 97, 0.25);
  background: rgba(23, 143, 97, 0.08);
  color: var(--emerald-2);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.founder-tagline {
  margin-top: 0.45rem;
  color: var(--ink-700);
  font-weight: 600;
}

@media (max-width: 900px) {
  .founder-grid { grid-template-columns: 1fr; }
  .founder-photo { justify-content: flex-start; }
  .founder-photo img { max-width: 240px; }
}
.card p { margin: 0; color: var(--ink-500); }

.steps { counter-reset: s; }
.steps .card { position: relative; padding-top: 2rem; }
.steps .card::before {
  counter-increment: s;
  content: "0" counter(s);
  position: absolute;
  top: 0.76rem;
  left: 0.9rem;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.pricing-card {
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
  display: flex;
  flex-direction: column;
}

.price {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.85rem;
  margin: 0.3rem 0;
  min-height: 3.2rem;
}

.price-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.15;
  min-height: 3.2rem;
}

.badge {
  display: inline-flex;
  border: 1px solid rgba(23, 143, 97, 0.25);
  background: rgba(23, 143, 97, 0.09);
  color: var(--emerald-2);
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 700;
}

ul.clean { margin: 0.6rem 0 0; padding-left: 1rem; color: var(--ink-500); }
ul.clean li { margin: 0.3rem 0; }

.cta-band {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(23,143,97,0.3);
  background: linear-gradient(140deg, rgba(23, 143, 97, 0.11), rgba(111, 214, 175, 0.11));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wealth-panel {
  overflow: hidden;
  padding: 1.45rem;
}

.wealth-head {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 1rem;
}

.wealth-head p {
  font-size: 0.82rem;
}

.wealth-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.wealth-controls {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.wealth-controls input[type="range"] {
  width: 100%;
  margin: 0.28rem 0 0.18rem;
  accent-color: var(--emerald);
}

.wealth-controls select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-900);
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.18rem;
}

#sipBlock,
#stepUpBlock {
  margin-bottom: 0.35rem;
}

.wealth-value {
  margin-bottom: 0.8rem;
  color: var(--ink-700);
  font-weight: 700;
}

.wealth-help {
  margin-top: -0.1rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-500);
}

.wealth-controls label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wealth-controls #expectedCagr,
.wealth-controls #investmentYears {
  margin-top: 0.14rem;
}

.wealth-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.wealth-chart {
  width: 100%;
  min-height: 240px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(23, 143, 97, 0.07), rgba(23, 143, 97, 0.01)),
    #fff;
}

.wealth-grid-line {
  stroke: rgba(37, 59, 52, 0.18);
  stroke-width: 1;
}

.wealth-axis-label {
  fill: var(--ink-500);
  font-size: 10px;
}

.wealth-line {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wealth-area {
  fill: rgba(23, 143, 97, 0.14);
}

.wealth-invested-line {
  fill: none;
  stroke: rgba(77, 100, 92, 0.85);
  stroke-width: 2.2;
  stroke-dasharray: 6 5;
}

.wealth-legend {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--ink-500);
  font-size: 0.84rem;
}

.wealth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-line {
  width: 24px;
  height: 3px;
  border-radius: 4px;
  display: inline-block;
}

.legend-corpus {
  background: var(--emerald);
}

.legend-invested {
  background: rgba(77, 100, 92, 0.85);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th, td {
  text-align: left;
  padding: 0.62rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

th { color: var(--emerald-2); }

.tools-hero {
  padding: 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 0.9rem;
}

.controls {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

label { font-size: 0.84rem; color: var(--ink-500); display: block; margin-bottom: 0.3rem; }

select,
button {
  font: inherit;
}

select,
.tool-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-900);
  padding: 0.55rem 0.7rem;
}

.tool-btn { cursor: pointer; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.metric {
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.metric strong {
  display: block;
  font-size: 1.48rem;
  margin-top: 0.4rem;
}

.scoreline {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.scoreline .big {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  font-family: "Source Serif 4", Georgia, serif;
  margin: 0.45rem 0;
}

.venn {
  margin: 0 auto;
  width: 260px;
  height: 128px;
  position: relative;
  --v: 0.2;
}

.venn span {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  top: 8px;
}

.venn .a {
  left: calc(50% - 110px + (28px * var(--v)));
  background: rgba(23, 143, 97, 0.74);
}

.venn .b {
  right: calc(50% - 110px + (28px * var(--v)));
  background: rgba(76, 28, 207, 0.46);
}

.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.45rem; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  font-size: 0.82rem;
  background: #f8faf8;
}

.pill.low { background: rgba(111,214,175,0.2); border-color: rgba(23,143,97,0.3); }
.pill.mid { background: rgba(185,147,63,0.17); border-color: rgba(185,147,63,0.35); }
.pill.high { background: rgba(76,28,207,0.14); border-color: rgba(76,28,207,0.3); }

.matrix td { text-align: center; font-weight: 700; color: #fff; }

footer {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0 2rem;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .hero,
  .grid-3,
  .grid-4,
  .wealth-grid,
  .wealth-summary,
  .controls,
  .metric-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.72rem 0;
  }
  .nav-links {
    display: flex;
    width: 100%;
    gap: 0.3rem;
  }
  .nav-links a {
    font-size: 0.86rem;
    padding: 0.32rem 0.46rem;
  }
  .panel {
    padding: 1rem;
  }
  .wealth-panel {
    padding: 1rem;
  }
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }
  table {
    min-width: 0;
  }
  th,
  td {
    white-space: normal;
  }
}

/* Mobile optimization layer (added for phone alignment) */
@media (max-width: 980px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  main {
    padding: 1.2rem 0 2rem;
  }

  .wrap,
  .index-page .wrap {
    width: min(100%, calc(100% - 1rem));
  }

  .nav {
    gap: 0.55rem;
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }

  .nav-links a {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .nav .btn {
    width: 100%;
  }

  h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.55rem);
  }

  .hero-card,
  .hero-side,
  .panel,
  .founder-panel,
  .wealth-panel {
    padding: 0.9rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .cta-row,
  .cta-band {
    gap: 0.5rem;
  }

  .cta-row .btn,
  .cta-band .btn {
    width: 100%;
  }

  .hero-side-title {
    font-size: 1.02rem;
    letter-spacing: 0.01em;
  }

  .founder-grid {
    gap: 0.65rem;
  }

  .founder-photo img {
    max-width: 220px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 560px;
  }

  th,
  td {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .brand-mark,
  .brand-mark svg {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 0.98em;
  }

  .btn {
    min-height: 40px;
    padding: 0.58rem 0.9rem;
    font-size: 0.88rem;
  }

  .kicker {
    font-size: 0.72rem;
    letter-spacing: 0.07em;
  }

  .lead {
    font-size: 1rem;
    margin: 0.75rem 0 1rem;
  }

  .founder-head h2 {
    font-size: 1.72rem;
  }

  .wealth-chart {
    min-height: 210px;
  }

  .venn {
    width: 220px;
    height: 114px;
  }

  .venn span {
    width: 96px;
    height: 96px;
  }
}
