/* LLM Cost Frontier — standalone site styles. The dashboard was ported from
   catalystneuro.com, so the pfc- classes match what the dashboard JS builds;
   the tokens below replace the parent site's theme variables. */

:root {
  --navy: #101642;
  --ink-muted: #55607a;
  --ink-soft: #68718b;
  --line: #dfe6f1;
  --line-soft: #ecf1f8;
  --surface: #ffffff;
  --blue-600: #2a78d6;
  --blue-50: #e8f1fb;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  background: var(--surface);
}
a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
strong { color: var(--navy); }

.container { max-width: 58rem; margin: 0 auto; padding: 0 1.25rem; }

/* header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem 1.4rem; padding-top: 1rem; padding-bottom: 1rem; }
.site-title { font-weight: 700; font-size: 1.05rem; margin: 0; margin-right: auto; line-height: inherit; }
a.site-title, .site-title a { color: var(--navy); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: 0.88rem; }
.site-nav a { color: var(--ink-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 0.32rem; }
.site-nav svg { width: 13px; height: 13px; flex: none; }
.site-nav .nav-cn img { height: 18px; width: auto; display: block; opacity: 0.85; }
.site-nav .nav-cn:hover img { opacity: 1; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); }
.site-footer { border-top: 1px solid var(--line); margin-top: 3.5rem; }
.site-footer .container { padding-top: 1.2rem; padding-bottom: 2rem; font-size: 0.85rem; color: var(--ink-soft); }
.site-footer a { color: var(--ink-muted); }

.page-head { margin: 2.2rem 0 0.4rem; }
.page-head h1 { font-size: 2rem; margin: 0 0 0.4rem; }
.page-head .subtitle { color: var(--ink-muted); margin: 0; max-width: 42rem; }

.prose p { margin: 0 0 1rem; }
.prose li { margin-bottom: 0.55rem; }

/* dashboard */
.pfc-wrap h2 { font-size: 1.45rem; margin: 2.6rem 0 0.6rem; }
.pfc-intro { margin: 2.2rem 0 1rem; }
.pfc-tagline { font-size: 1.15rem; color: var(--navy); max-width: 40rem; line-height: 1.5; }
.pfc-lead { color: var(--ink-muted); font-size: 0.98rem; line-height: 1.6; margin-bottom: 1rem; }
.pfc-figure { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.1rem 0.9rem; margin: 2rem 0; }
.pfc-figure figcaption { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5; margin-top: 0.6rem; border-top: 1px solid var(--line-soft); padding-top: 0.6rem; }
.pfc-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.55rem; align-items: center; }
.pfc-lk { display: inline-flex; align-items: center; gap: 0.4rem; }
.pfc-swatch { width: 18px; height: 0; border-top: 2.5px solid; border-radius: 2px; display: inline-block; }
.pfc-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid; display: inline-block; }
.pfc-tooltip { position: absolute; pointer-events: none; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 3px 14px rgba(16,22,66,0.13); padding: 0.5rem 0.65rem; font-size: 0.78rem; line-height: 1.45; color: var(--ink-muted); max-width: 250px; display: none; }
.pfc-tt-name { font-weight: 600; color: var(--navy); font-size: 0.82rem; }
.pfc-tt-val { font-weight: 600; color: var(--navy); }
.pfc-tt-row { display: flex; align-items: center; gap: 0.45rem; }
.pfc-tt-key { width: 12px; border-top: 2.5px solid; border-radius: 2px; flex: none; display: inline-block; }
.pfc-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.4rem; }
.pfc-stage { font-size: 0.82rem; font-weight: 600; color: var(--navy); }
.pfc-btn { font: inherit; font-size: 0.78rem; padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--navy); cursor: pointer; min-width: 4.2rem; }
.pfc-btn:hover { border-color: var(--navy); }
.pfc-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.9rem; }
.pfc-tab { font: inherit; font-size: 0.8rem; padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-muted); cursor: pointer; }
.pfc-tab:hover { border-color: var(--navy); color: var(--navy); }
.pfc-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pfc-cap-wrap { margin-top: 0.4rem; margin-bottom: 2rem; }
.pfc-table-wrap { overflow-x: auto; margin-top: 1.6rem; }
.pfc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pfc-table th { text-align: left; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding: 0.5rem 0.8rem; white-space: nowrap; }
.pfc-table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.pfc-table .pfc-td-tier { white-space: nowrap; font-weight: 600; color: var(--navy); }
.pfc-table .pfc-td-num { white-space: nowrap; font-family: var(--font-mono); font-size: 0.85rem; text-align: right; }
.pfc-table th:nth-child(4), .pfc-table th:nth-child(5) { text-align: right; }
.pfc-cap-tablex th:nth-child(3), .pfc-cap-tablex th:nth-child(4) { text-align: right; }
.pfc-table .pfc-ev-top { white-space: nowrap; }
.pfc-table .pfc-ev-cost { font-family: var(--font-mono); font-weight: 600; color: var(--navy); }
.pfc-table .pfc-ev-model { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.15rem; }
.pfc-notes { margin-top: 2rem; }
.pfc-advances { border-top: 1px solid var(--line); }
.pfc-advances .pfc-adv-day { display: grid; grid-template-columns: 8rem 1fr; gap: 0.2rem 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); }
.pfc-advances .pfc-adv-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); padding-top: 0.2rem; }
.pfc-advances .pfc-adv-item { font-size: 0.92rem; }
.pfc-advances .pfc-adv-item + .pfc-adv-item { margin-top: 0.65rem; }
.pfc-advances .pfc-adv-head { font-weight: 600; color: var(--navy); }
.pfc-advances .pfc-adv-kind { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue-600); background: var(--blue-50); border-radius: 0.3rem; padding: 0.1rem 0.4rem; margin-left: 0.4rem; vertical-align: middle; }
.pfc-advances a.pfc-adv-card { float: right; background: none; padding-right: 0; margin-left: 0.8rem; text-decoration: underline; text-underline-offset: 2px; }
.pfc-advances a.pfc-adv-card:hover { color: var(--navy); }
.pfc-advances .pfc-adv-body { color: var(--ink-muted); font-size: 0.88rem; line-height: 1.5; }
.pfc-advances .pfc-adv-rec { color: var(--navy); font-weight: 500; }
.pfc-advances .pfc-adv-open { color: #1f7a3a; background: #e7f6ec; }
.pfc-advances .pfc-adv-variant { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--navy); }
.pfc-pager { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-top: 1.2rem; }
.pfc-adv-page { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); }
.pfc-pager button { font: inherit; font-size: 0.82rem; padding: 0.3rem 0.9rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--navy); cursor: pointer; }
.pfc-pager button:hover { border-color: var(--navy); }
.pfc-pager button[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }
@media (max-width: 600px) { .pfc-advances .pfc-adv-day { grid-template-columns: 1fr; } }
.pfc-side { display: flex; gap: 1.2rem; align-items: flex-start; }
.pfc-side-chart { flex: 1 1 auto; min-width: 0; }
.pfc-legend-side .pfc-legend-title { font-weight: 600; color: var(--navy); font-size: 0.82rem; margin-bottom: 0.1rem; }
.pfc-legend-side { flex: 0 0 9.5rem; flex-direction: column; align-items: flex-start; gap: 0.45rem; margin-top: 0.6rem; padding-left: 1rem; border-left: 1px solid var(--line-soft); }
.pfc-legend-side .pfc-legend-ver { font-size: 0.72rem; color: var(--ink-soft); border-top: 1px solid var(--line-soft); padding-top: 0.45rem; margin-top: 0.2rem; }
@media (max-width: 700px) { .pfc-side { flex-direction: column; } .pfc-side-chart { width: 100%; } .pfc-legend-side { flex-direction: row; flex-wrap: wrap; border-left: 0; padding-left: 0; flex-basis: auto; } }

/* era toggle */
.pfc-eranav { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0.2rem 0 0; }
.pfc-eranav[hidden] { display: none; }
.pfc-eranav button { font: inherit; font-size: 0.78rem; padding: 0.32rem 0.8rem; background: var(--surface); color: var(--ink-muted); border: 0; cursor: pointer; }
.pfc-eranav button + button { border-left: 1px solid var(--line); }
.pfc-eranav button:hover { color: var(--navy); }
.pfc-eranav button[aria-pressed="true"] { background: var(--blue-50); color: var(--navy); font-weight: 600; }

/* collapsed chart explainers */
.pfc-how summary { cursor: pointer; color: var(--ink-soft); font-size: 0.8rem; }
.pfc-how summary:hover { color: var(--navy); }
.pfc-how p { margin: 0.5rem 0 0; }

/* two-column charts on wide windows */
.pfc-cols { display: grid; grid-template-columns: 1fr; column-gap: 2.5rem; align-items: start; }
.pfc-cols section > h2:first-child { margin-top: 1.6rem; }
@media (min-width: 1480px) {
  main.pfc-wrap, .site-header .container, .site-footer .container { max-width: 102rem; }
  .pfc-cols { grid-template-columns: 1fr 1fr; }
}
