:root {
  --bg: #e8f0ee;
  --panel: #f7fbfa;
  --ink: #1b2f31;
  --muted: #556b6f;
  --line: #c5d3d2;
  --accent: #2f8f69;
  --accent-cta: #73d8ab;
  --accent-ink: #0c2b21;
  --accent-soft: #d9ede5;
  --list-tone: var(--accent);
  --list-tone-soft: var(--accent-soft);
  --list-tone-border: #8fc9b1;
  --warn: #9e3f3f;
}

html.night-dark {
  --bg: #0f1718;
  --panel: #172225;
  --ink: #e1ece9;
  --muted: #9eb1ac;
  --line: #2d3a3c;
  --accent: #59c495;
  --accent-cta: #59c495;
  --accent-ink: #062118;
  --accent-soft: #243c35;
  --list-tone: var(--accent);
  --list-tone-soft: #264139;
  --list-tone-border: #59c495;
  --warn: #f28787;
}

html[data-list-tone="blue"] {
  --list-tone: #3f82d6;
  --list-tone-soft: #d8e8fb;
  --list-tone-border: #7aa9e5;
}

html.night-dark[data-list-tone="blue"] {
  --list-tone: #6ca8f0;
  --list-tone-soft: #1d2d44;
  --list-tone-border: #6ca8f0;
}

html[data-list-tone="red"] {
  --list-tone: #c85e5e;
  --list-tone-soft: #f7e0e0;
  --list-tone-border: #e3a3a3;
}

html.night-dark[data-list-tone="red"] {
  --list-tone: #e18181;
  --list-tone-soft: #3a2323;
  --list-tone-border: #e18181;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 15% 10%, #f4fbf8 0%, var(--bg) 55%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
html.night-dark body {
  background: radial-gradient(circle at 15% 10%, #1b2c2f 0%, var(--bg) 55%);
}
.page {
  width: min(1440px, 97vw);
  margin: 24px auto 40px;
}
main.page { flex: 1 0 auto; }
.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(247, 251, 250, 0.94), rgba(232, 240, 238, 0.72));
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.chrome-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: clamp(12px, 2.5vw, 28px);
  padding-right: clamp(12px, 2.5vw, 28px);
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pro-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.footer-grid a {
  color: var(--muted);
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--ink);
}
.chrome-cta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(247, 251, 250, 0.7);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 16px;
  padding-bottom: 20px;
}
.footer-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--muted);
}
.footer-grid > div {
  display: grid;
  gap: 6px;
  align-content: start;
}
.hero {
  background: linear-gradient(145deg, #f7fbfa, #e6f0ed);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
html.night-dark .hero {
  background: linear-gradient(145deg, #1c2a2c, #162224);
}
.hero-copy {
  display: grid;
  gap: 8px;
  max-width: 880px;
}
.hero-method {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.hero-method li {
  margin: 0 0 4px;
}
.hero-tabs {
  margin-top: 6px;
}
html.night-dark .site-header,
html.night-dark .site-footer {
  background: rgba(20, 29, 31, 0.88);
}
html.night-dark input[type="search"] {
  background: #121d20;
  color: var(--ink);
  border-color: #354547;
}
html.night-dark .ghost {
  background: #1a272a;
  color: var(--ink);
  border-color: #3b4e51;
}
.hero.compact { align-items: center; }
.kicker { margin: 0; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; font-size: 12px; }
h1 { margin: 6px 0 4px; font-size: clamp(24px, 4vw, 36px); }
.tone-text { color: var(--list-tone); }
.muted { color: var(--muted); margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
}
.summary-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
}
.price-chart-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
}
.price-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.price-chart-head h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.price-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  background: var(--list-tone-soft);
  color: var(--list-tone);
}
.price-chart {
  width: 100%;
  height: auto;
  display: block;
  background: linear-gradient(180deg, rgba(60, 120, 100, 0.03), rgba(60, 120, 100, 0));
  border-radius: 8px;
}
.chart-axis-label {
  font-size: 11px;
  fill: var(--muted);
}
.summary-wrap h2 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.summary-wrap h3 {
  margin: 10px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.summary-wrap ul {
  margin: 0;
  padding-left: 18px;
}
.summary-wrap li {
  margin: 0 0 4px;
}
.small { font-size: 12px; }
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 10px;
}
.stat .label { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stat .value { font-weight: 700; }

.controls {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
input[type="search"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.tab.active {
  background: var(--list-tone-soft);
  border-color: var(--list-tone-border);
  color: var(--list-tone);
}
html.night-dark .tab {
  background: #1a272a;
  color: #e9f5f1;
  border-color: #3b4e51;
}
html.night-dark .tab.active {
  background: var(--list-tone-soft);
  color: #f2fffa;
  border-color: var(--list-tone-border);
}

.table-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  max-height: 68vh;
  background: var(--panel);
  position: relative;
}
.table-wrap.blur-gated {
  max-height: none;
  overflow-y: visible;
}
.faq-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px;
}
.faq-wrap h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.faq-list details {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.faq-list details:first-child {
  border-top: 0;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}
.faq-list p {
  margin: 8px 0 0;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 10px;
  border-bottom: 1px solid #edf0eb;
  text-align: left;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #eff6f4;
  cursor: pointer;
}
html.night-dark th {
  background: #223337;
  color: #eef8f5;
  border-bottom-color: #3b4e51;
}
tr:hover td { background: #fbfffc; }
html.night-dark tr:hover td { background: #1f2f31; }
.clickable td.ticker-cell .cell-inner { color: var(--list-tone); font-weight: 700; }
.row-locked {
  position: relative;
}
.row-locked:hover td {
  background: transparent;
}
html.night-dark .row-locked:hover td {
  background: transparent;
}
.row-locked .cell-inner {
  filter: blur(4px);
  opacity: 0.82;
  user-select: none;
  pointer-events: none;
}
.row-locked td {
  cursor: not-allowed;
}
.blur-gate-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
}
.blur-gate-dialog {
  pointer-events: auto;
  width: min(420px, calc(100% - 24px));
  border: 1px solid var(--line);
  background: rgba(247, 251, 250, 0.95);
  color: var(--ink);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 16px 38px rgba(16, 33, 34, 0.18);
}
.blur-gate-dialog h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.blur-gate-dialog p {
  margin: 0 0 12px;
  color: var(--muted);
}
html.night-dark .blur-gate-dialog {
  background: rgba(23, 34, 37, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}
.error {
  margin-top: 12px;
  color: var(--warn);
  font-weight: 600;
}
.ghost {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}
.button {
  border: 0;
  border-radius: 10px;
  background: var(--accent-cta);
  color: var(--accent-ink);
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.button.ghost {
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
}
.sparkline {
  display: block;
  width: 120px;
  height: 28px;
}
.favorite-col {
  position: sticky;
  right: 0;
  background: var(--panel);
  z-index: 2;
}
th.favorite-col {
  z-index: 3;
}
.favorite-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.favorite-btn.on {
  color: #d2a321;
  border-color: #d2a321;
  background: #fff7d6;
}
.favorite-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.score-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}
.score-pill.elite {
  background: #4dd792;
  color: #05311f;
  border-color: #2cb978;
}
.score-pill.strong {
  background: #88dfa8;
  color: #083224;
  border-color: #62c58a;
}
.score-pill.ok {
  background: #f2d47f;
  color: #3d2c00;
  border-color: #ddbf68;
}
.score-pill.weak {
  background: #f5ad7e;
  color: #46210c;
  border-color: #e08e56;
}
.score-pill.poor {
  background: #ec8f8f;
  color: #431515;
  border-color: #d87070;
}
.score-pill.score-growth.elite {
  background: #7fb3f5;
  color: #0c2c57;
  border-color: #5f99e6;
}
.score-pill.score-growth.strong {
  background: #a3c7f7;
  color: #123867;
  border-color: #7fb3f5;
}
.score-pill.score-growth.ok {
  background: #c4daf8;
  color: #1a4573;
  border-color: #9ec0eb;
}
.score-pill.score-growth.weak {
  background: #d9e7fb;
  color: #265181;
  border-color: #b8d2f3;
}
.score-pill.score-growth.poor {
  background: #ebf3ff;
  color: #365d8e;
  border-color: #cfe0f7;
}

@media (max-width: 760px) {
  .page { margin-top: 12px; }
  .hero { flex-direction: column; }
  .hero-method { font-size: 13px; }
  .chrome-wrap { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
