@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(/static/fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(/static/fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/static/fonts/poppins-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(/static/fonts/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(/static/fonts/manrope-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(/static/fonts/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url(/static/fonts/manrope-latin-700-normal.woff2) format("woff2"); }

:root {
  --ink: #1d284b;
  --ink-2: #3b4565;
  --slate: #66708a;
  --rule: #e2e6ee;
  --rule-2: #eef1f6;
  --page: #f4f6f9;
  --card: #ffffff;
  --brand: #1a5ba6;
  --brand-soft: #ecf2fa;
  --teal: #34ada1;
  --spark: #f08038;
  --good: #1f8a5b;
  --bad: #c0392b;
  --self: #1d93c9;
  --material: #d4880a;
  --social: #9147ef;
  --spiritual: #14a37a;
  --fa-1: #4f9fd8;
  --fa-2: #0f9688;
  --fa-3: #c8102e;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { font-family: "Poppins", "Manrope", sans-serif; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.25; }
h1 { font-size: 26px; letter-spacing: -0.01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 var(--space-3); }
small, .muted { color: var(--slate); }
code { font-size: 13px; background: var(--rule-2); padding: 1px 5px; border-radius: 4px; }

/* Shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--card) 239px, var(--rule) 239px, var(--rule) 240px, var(--page) 240px); }
.side {
  background: var(--card);
  padding: var(--space-5) 0 var(--space-4);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.side .logo { display: block; padding: 0 var(--space-5) var(--space-5); }
.side .logo img { height: 40px; width: auto; display: block; }
.side .product { padding: 0 var(--space-5); margin: calc(-1 * var(--space-3)) 0 var(--space-5); font-size: 12px; color: var(--slate); font-weight: 600; letter-spacing: 0.02em; }
.nav-group { padding: var(--space-2) 0; }
.nav-group > span { display: block; padding: 0 var(--space-5) var(--space-2); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8a93a8; }
.nav-group a {
  display: block; padding: 6px var(--space-5) 6px calc(var(--space-5) - 3px);
  border-left: 3px solid transparent; color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav-group a:hover { background: var(--rule-2); text-decoration: none; }
.nav-group a.on { border-left-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 700; }
.side .who { margin-top: auto; padding: var(--space-4) var(--space-5) 0; border-top: 1px solid var(--rule); font-size: 13px; color: var(--slate); }
.side .who form { margin: var(--space-2) 0 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }

.main { padding: var(--space-6) var(--space-6) var(--space-7); max-width: 1480px; width: 100%; }
.section-head h2, .section-head h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.compare-col table td:first-child { min-width: 0; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-5); flex-wrap: wrap; }
.page-head p { margin: var(--space-2) 0 0; color: var(--slate); max-width: 760px; }
.program-pick { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--slate); }

/* Cards and sections */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-5); }
.section { margin-top: var(--space-6); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--slate); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.grid-2.split { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }

/* Metric tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-4) var(--space-4) var(--space-3); }
.tile .label { font-size: 13px; color: var(--slate); font-weight: 600; }
.tile .value { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 26px; line-height: 1.2; margin: 6px 0 4px; }
.tile .n { font-size: 12px; color: var(--slate); }
.tile.key { border-top: 3px solid var(--brand); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
th { font-size: 12px; font-weight: 700; color: var(--slate); background: #fafbfd; position: sticky; top: 0; line-height: 1.3; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
th:first-child, td:first-child { min-width: 190px; }
td .sub { display: block; font-size: 12px; color: var(--slate); }
tr.total td { font-weight: 700; background: #fafbfd; border-top: 1px solid var(--rule); }
tr.group td { background: var(--brand-soft); font-weight: 700; font-size: 13px; }
.pair { display: inline-flex; flex-direction: column; align-items: flex-end; white-space: nowrap; line-height: 1.3; }
.pair b { font-weight: 600; }
.pair i { font-style: normal; color: var(--slate); font-size: 12px; }
table.stack .pair { align-items: flex-start; }

/* Status markers: text, not dots */
.status { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.status.active { color: var(--good); }
.status.paused, .status.archived { color: var(--slate); }
.status.proposed { color: var(--brand); }
.status.accepted { color: var(--good); }
.status.rejected { color: var(--bad); }
.status.done { color: var(--ink); }
.flag-mi { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--teal); padding: 1px 6px; border-radius: 4px; letter-spacing: 0.03em; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: var(--space-1); }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid #cfd5df; border-radius: 8px; padding: 8px var(--space-3); background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(26, 91, 166, 0.25); border-color: var(--brand); }
select {
  appearance: none; -webkit-appearance: none;
  padding-inline-end: calc(var(--space-3) * 2 + 0.7rem);
  background-repeat: no-repeat; background-position: right var(--space-3) center; background-size: 0.7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2366708a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.field { margin-bottom: var(--space-4); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-5); }
.form-grid .wide { grid-column: 1 / -1; }
.btn {
  display: inline-block; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 8px var(--space-4); border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
}
.btn:hover { text-decoration: none; background: #111a36; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #cfd5df; }
.btn.secondary:hover { background: var(--rule-2); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; }
.filters { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; margin-bottom: var(--space-4); }
.filters .field { margin: 0; min-width: 150px; }
.notice { border: 1px solid var(--rule); border-left: 3px solid var(--brand); background: #fff; padding: var(--space-3) var(--space-4); border-radius: 8px; font-size: 14px; }
.notice.warn { border-left-color: var(--spark); }
.notice.bad { border-left-color: var(--bad); }
.empty { padding: var(--space-6); text-align: center; color: var(--slate); background: var(--card); border: 1px dashed #cfd5df; border-radius: var(--radius); }
.empty h3 { color: var(--ink); margin-bottom: var(--space-2); }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: "Manrope", sans-serif; font-size: 11px; fill: var(--slate); }
.legend { display: flex; gap: var(--space-4); font-size: 12px; color: var(--slate); flex-wrap: wrap; margin-top: var(--space-2); }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--c); }

/* Journey */
.stages { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.stages li { position: relative; padding: 26px 6px 0; font-size: 12px; line-height: 1.35; color: var(--slate); text-align: center; }
.stages li::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--rule); }
.stages li::after { content: ""; position: absolute; top: 4px; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #c3cad6; }
.stages li.done::before, .stages li.in_progress::before { background: var(--brand); }
.stages li.done::after { background: var(--brand); border-color: var(--brand); }
.stages li.in_progress::after { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(26, 91, 166, 0.18); }
.stages li.done, .stages li.in_progress { color: var(--ink); font-weight: 600; }
.stages li .when { display: block; font-weight: 400; color: var(--slate); font-size: 11px; margin-top: 2px; }

.segment { margin-top: var(--space-6); }
.segment-head { display: flex; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-4); flex-wrap: wrap; }
.segment-head .tag { font-size: 12px; font-weight: 700; color: #fff; background: var(--spark); padding: 3px 12px; border-radius: 999px; letter-spacing: 0.03em; text-transform: uppercase; }
.fa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.fa { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.fa-top { padding: var(--space-4); color: #fff; }
.fa-top h3 { color: #fff; font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.fa-top p { font-size: 12.5px; margin: 0; opacity: 0.95; }
.fa:nth-child(1) .fa-top { background: var(--fa-1); }
.fa:nth-child(2) .fa-top { background: var(--fa-2); }
.fa:nth-child(3) .fa-top { background: var(--fa-3); }
.fa-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-bottom: 2px; }
.ad { border-top: 1px solid var(--rule-2); padding-top: var(--space-3); display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-3); }
.ad img, .ad .noimg { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; background: var(--rule-2); display: block; }
.ad-detail { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.ad-hero img, .ad-hero .noimg { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: var(--rule-2); }
.ad-hero .noimg { display: flex; align-items: center; justify-content: center; color: var(--slate); font-size: 12px; }
.ad .noimg { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--slate); text-align: center; }
.ad .name { font-size: 12px; color: var(--slate); word-break: break-word; }
.ad .copy { font-size: 13px; margin: 4px 0; }
.ad .mini { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ad .mini b { font-weight: 700; }
.lineage { font-size: 12px; color: var(--slate); margin-top: 4px; }

/* Motivation */
.domains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.domain { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--c); border-radius: var(--radius); padding: var(--space-4); display: flex; flex-direction: column; }
.domain-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.domain-head .badge { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; font-size: 11px; align-items: center; justify-content: center; margin-right: 8px; }
.domain-head h3 { display: flex; align-items: center; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.index { text-align: right; }
.index .v { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 22px; line-height: 1; }
.index small { display: block; font-size: 11px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; gap: var(--space-2); align-items: center; font-size: 13px; margin: 5px 0; }
.bar { height: 8px; background: var(--rule-2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--c); }
.bar-row .v { text-align: right; font-size: 12px; color: var(--ink-2); }
.lean { font-size: 12.5px; margin-top: var(--space-3); padding: var(--space-3); background: #f7f8fb; border-radius: 6px; }
.share { margin-top: auto; padding-top: var(--space-3); font-weight: 700; font-size: 13px; text-align: center; color: var(--ink); }
.share .pct { display: block; background: var(--c); color: #fff; border-radius: 6px; padding: 6px; }
.energies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.energy { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-4); border-left: 4px solid var(--c); }
.energy .ma { font-family: "Poppins", sans-serif; font-size: 24px; font-weight: 600; }

/* Lineage compare */
.compare-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); }
.compare-col { border: 1px solid var(--rule); border-radius: 8px; padding: var(--space-3); background: #fff; }
.compare-col.after { border-style: dashed; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--space-5); background: var(--page); }
.login .card { max-width: 420px; width: 100%; padding: var(--space-6); text-align: center; }
.login img { height: 48px; margin: 0 auto var(--space-5); display: block; }
.login h1 { font-size: 21px; margin-bottom: var(--space-2); }
.login p { color: var(--slate); }
.gbtn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #cfd5df; border-radius: 8px; padding: 10px 18px; font-weight: 700; color: var(--ink); background: #fff; margin-top: var(--space-4); }
.gbtn:hover { background: var(--rule-2); text-decoration: none; }

@media (max-width: 1180px) {
  .tiles.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4, .domains, .energies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fa-grid { grid-template-columns: minmax(0, 1fr); }
  .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--space-4); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--page); }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); background: var(--card); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
  .topbar img { height: 30px; display: block; }
  .topbar details { position: relative; }
  .topbar summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 14px; padding: 6px 12px; border: 1px solid #cfd5df; border-radius: 8px; }
  .topbar summary::-webkit-details-marker { display: none; }
  .topbar .menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-2) 0; box-shadow: 0 12px 32px rgba(29, 40, 75, 0.14); max-height: 80vh; overflow-y: auto; }
  .main { padding: var(--space-5) var(--space-4) var(--space-6); }
  h1 { font-size: 22px; }
  .grid-2, .grid-2.split, .grid-3, .grid-4, .form-grid, .compare-row { grid-template-columns: minmax(0, 1fr); }
  .domains, .energies { grid-template-columns: minmax(0, 1fr); }
  .tiles, .tiles.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .chart text { font-size: 19px; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .field { min-width: 0; }
  .filters .btn { text-align: center; }
  th:first-child, td:first-child { min-width: 150px; }
  .tile .value { font-size: 22px; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-detail { grid-template-columns: minmax(0, 1fr); }
  .ad-hero { max-width: 240px; }
  /* Text-heavy tables become stacked cards on a phone. */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
  table.stack td { border: 0; padding: 3px 0; min-width: 0; text-align: left; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); }
  table.stack td.num { text-align: left; }
  table.stack td:empty { display: none; }
  .table-wrap table:not(.stack) td:first-child, .table-wrap table:not(.stack) th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--rule-2); }
  .table-wrap table:not(.stack) th:first-child { background: #fafbfd; z-index: 2; }
}
