@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #050606;
  --surface: #090c0d;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --surface-strong: #0f1415;
  --text: #f7faf3;
  --muted: #aab6b0;
  --dim: #718079;
  --line: rgba(226, 255, 244, 0.14);
  --line-strong: rgba(187, 255, 42, 0.56);
  --green: #bbff2a;
  --cyan: #38dff1;
  --amber: #ffbe4d;
  --coral: #ff6b5f;
  --violet: #c29bff;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.44);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(56, 223, 241, 0.06), transparent 360px),
    radial-gradient(circle at 12% 0, rgba(187, 255, 42, 0.08), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

button,
select {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.prices-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 10px max(14px, calc((100vw - 1180px) / 2));
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 34px;
  border: 1px solid var(--line-strong);
  background: rgba(187, 255, 42, 0.08);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 950;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy small,
.toolkit-menu summary,
.toolkit-menu nav a,
.tab-button,
.legend-chip,
.tier-cell em {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.toolkit-menu {
  position: relative;
  z-index: 50;
  display: grid;
  justify-items: end;
}

.toolkit-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.toolkit-menu summary::-webkit-details-marker {
  display: none;
}

.toolkit-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--green);
  transition: transform 160ms ease;
}

.toolkit-menu[open] summary,
.toolkit-menu summary:hover,
.toolkit-menu summary:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.toolkit-menu[open] summary::after {
  transform: rotate(180deg);
}

.toolkit-menu nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  gap: 2px;
  width: 306px;
  max-width: calc(100vw - 20px);
  border: 1px solid var(--line);
  padding: 8px;
  background: rgba(5, 6, 6, 0.98);
  box-shadow: var(--shadow);
}

.toolkit-menu nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  text-decoration: none;
}

.toolkit-menu nav a:hover,
.toolkit-menu nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

.prices-app,
.site-legal-footer {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.prices-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: clamp(36px, 8vw, 82px) 0 24px;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-copy h1 {
  max-width: 9ch;
  font-size: clamp(48px, 12vw, 112px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy p {
  max-width: 790px;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 21px);
}

.control-panel {
  border: 1px solid var(--line);
  background: rgba(9, 12, 13, 0.82);
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  gap: 14px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface-strong);
  color: var(--muted);
  cursor: pointer;
}

.tab-button:hover,
.tab-button:focus-visible,
.tab-button.is-active {
  border-color: var(--green);
  color: var(--text);
  outline: none;
}

.tab-button.is-active {
  background: rgba(187, 255, 42, 0.1);
  box-shadow: inset 0 -2px 0 rgba(187, 255, 42, 0.62);
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-chip {
  border: 1px solid var(--line);
  padding: 6px 8px;
  color: var(--muted);
  background: var(--surface-soft);
}

.currency-control,
.mobile-chart-controls {
  display: grid;
  gap: 6px;
}

.currency-control label,
.mobile-chart-controls label {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.currency-control select,
.mobile-chart-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 36px 0 12px;
  background: var(--surface-strong);
  color: var(--text);
}

.currency-control select:focus-visible,
.mobile-chart-controls select:focus-visible {
  border-color: var(--green);
  outline: none;
}

.legend-chip.is-low {
  border-color: rgba(187, 255, 42, 0.5);
  color: var(--green);
}

.legend-chip.is-even {
  border-color: rgba(56, 223, 241, 0.5);
  color: var(--cyan);
}

.legend-chip.is-high {
  border-color: rgba(255, 107, 95, 0.58);
  color: var(--coral);
}

.legend-chip.is-baseline {
  border-color: rgba(194, 155, 255, 0.58);
  color: var(--violet);
}

.table-section {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  font-size: clamp(26px, 5vw, 46px);
  line-height: 0.96;
  text-transform: uppercase;
}

.section-heading p {
  max-width: 760px;
  margin-top: 7px;
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow: visible;
  border: 1px solid var(--line);
  background: rgba(9, 12, 13, 0.84);
}

.mobile-chart-panel {
  display: none;
}

.mobile-section-chart {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(9, 12, 13, 0.82);
}

.mobile-chart-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.price-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.regional-table {
  table-layout: auto;
}

.price-table th,
.price-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 7px;
  text-align: center;
  vertical-align: middle;
}

.price-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #050606;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.price-table thead th span,
.price-table thead th small {
  display: block;
}

.price-table thead th small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 10px;
}

.price-table tbody tr:hover {
  background: rgba(187, 255, 42, 0.038);
}

.price-table tr:last-child th,
.price-table tr:last-child td {
  border-bottom: 0;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 178px;
}

.tier-cell {
  min-width: 0;
  max-width: none;
  text-align: center;
}

.item-detail-button {
  display: inline-grid;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.item-detail-button:hover,
.item-detail-button:focus-visible {
  color: var(--green);
  outline: none;
}

.item-detail-button:hover strong,
.item-detail-button:focus-visible strong {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.tier-cell strong,
.money-main,
.empty-cell strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.14;
}

.tier-cell span,
.empty-cell span {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.25;
}

.tier-cell em {
  display: inline-flex;
  margin-top: 8px;
  border: 1px solid var(--line);
  padding: 3px 6px;
  color: var(--green);
  font-style: normal;
  letter-spacing: 0.04em;
}

.difference-cell {
  position: relative;
  min-width: 0;
  border-left: 3px solid transparent;
}

.difference-cell.is-low {
  border-left-color: rgba(187, 255, 42, 0.78);
  background: linear-gradient(90deg, rgba(187, 255, 42, 0.11), rgba(187, 255, 42, 0.024));
}

.difference-cell.is-even {
  border-left-color: rgba(56, 223, 241, 0.72);
  background: linear-gradient(90deg, rgba(56, 223, 241, 0.105), rgba(56, 223, 241, 0.022));
}

.difference-cell.is-high {
  border-left-color: rgba(255, 107, 95, 0.88);
  background: linear-gradient(90deg, rgba(255, 107, 95, 0.13), rgba(255, 107, 95, 0.025));
}

.difference-cell.is-baseline {
  border-left-color: rgba(194, 155, 255, 0.74);
  background: linear-gradient(90deg, rgba(194, 155, 255, 0.11), rgba(194, 155, 255, 0.02));
}

.difference-cell.is-missing {
  border-left-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.018);
}

.money-cell {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.money-tooltip,
.empty-cell,
.insight-price {
  position: relative;
  cursor: help;
}

.money-tooltip {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.money-tooltip:hover,
.money-tooltip:focus-visible,
.empty-cell:hover,
.empty-cell:focus-visible,
.insight-price:hover,
.insight-price:focus-visible {
  outline: none;
}

.money-tooltip:hover .money-main,
.money-tooltip:focus-visible .money-main,
.empty-cell:hover strong,
.empty-cell:focus-visible strong,
.insight-price:hover,
.insight-price:focus-visible {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

.money-tooltip::after,
.empty-cell::after,
.insight-price::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 30;
  display: none;
  width: min(330px, 76vw);
  border: 1px solid rgba(187, 255, 42, 0.45);
  padding: 10px 11px;
  background: rgba(5, 6, 6, 0.98);
  color: var(--text);
  box-shadow: var(--shadow);
  content: attr(data-tooltip);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  transform: translateX(-50%);
  white-space: pre-line;
}

.money-tooltip:hover::after,
.money-tooltip:focus-visible::after,
.empty-cell:hover::after,
.empty-cell:focus-visible::after,
.insight-price:hover::after,
.insight-price:focus-visible::after {
  display: block;
}

.money-main {
  overflow-wrap: anywhere;
  font-size: clamp(12px, 1vw, 15px);
  white-space: normal;
}

.empty-cell strong {
  color: var(--dim);
}

.insight-table th,
.insight-table td {
  padding: 16px 14px;
}

.insight-table tbody tr {
  background:
    linear-gradient(90deg, rgba(187, 255, 42, 0.035), transparent 36%),
    rgba(9, 12, 13, 0.62);
}

.insight-tier {
  width: 34%;
}

.insight-tier .insight-price-list {
  margin-top: 10px;
}

.insight-price-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.insight-price {
  position: relative;
  display: inline-grid;
  align-content: center;
  min-width: 86px;
  min-height: 50px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  color: var(--text);
  font-weight: 850;
  line-height: 1.12;
}

.insight-price + .insight-price {
  margin-left: 18px;
}

.insight-price + .insight-price::before {
  position: absolute;
  top: 50%;
  left: -18px;
  width: 18px;
  height: 2px;
  background: rgba(226, 255, 244, 0.3);
  content: "";
}

.insight-price b {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
}

.insight-price strong {
  color: var(--text);
  font-size: 15px;
}

.insight-price.is-low {
  border-color: rgba(187, 255, 42, 0.5);
  background: rgba(187, 255, 42, 0.08);
}

.insight-price.is-even {
  border-color: rgba(56, 223, 241, 0.5);
  background: rgba(56, 223, 241, 0.08);
}

.insight-price.is-high {
  border-color: rgba(255, 107, 95, 0.5);
  background: rgba(255, 107, 95, 0.08);
}

.insight-price.is-baseline {
  border-color: rgba(194, 155, 255, 0.5);
  background: rgba(194, 155, 255, 0.08);
}

.insight-tax-cell,
.insight-difference-cell,
.insight-summary-cell {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.36;
}

.insight-difference-cell {
  color: var(--text);
  font-weight: 750;
}

.insight-mini-list,
.insight-signal-list {
  display: grid;
  gap: 6px;
}

.insight-mini,
.insight-signal {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.025);
}

.insight-mini b,
.insight-signal b,
.insight-mini em,
.insight-signal em {
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.insight-mini strong,
.insight-signal strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.12;
}

.insight-signal.is-low {
  border-color: rgba(187, 255, 42, 0.5);
  background: rgba(187, 255, 42, 0.08);
}

.insight-signal.is-even {
  border-color: rgba(56, 223, 241, 0.5);
  background: rgba(56, 223, 241, 0.08);
}

.insight-signal.is-high {
  border-color: rgba(255, 107, 95, 0.5);
  background: rgba(255, 107, 95, 0.08);
}

.insight-summary-cell {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.price-detail-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  border: 1px solid rgba(187, 255, 42, 0.34);
  padding: 0;
  overflow: hidden;
  background: rgba(5, 6, 6, 0.99);
  color: var(--text);
  box-shadow: var(--shadow);
}

.price-detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(6px);
}

.price-detail-shell {
  display: grid;
  gap: 12px;
  max-height: inherit;
  overflow: auto;
  padding: 18px 18px 16px;
}

.detail-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.detail-topline h2 {
  color: var(--text);
  font-size: clamp(26px, 4vw, 46px);
  line-height: 0.92;
  text-transform: uppercase;
}

.detail-close {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-close {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.detail-close:hover,
.detail-close:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.detail-chart {
  width: 100%;
  height: clamp(390px, 54vh, 520px);
  min-height: 360px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 13, 0.82);
}

.chart-fallback {
  color: var(--muted);
  font-size: 12px;
}

.site-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: center;
  padding: 30px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.site-legal-footer a {
  color: inherit;
  text-decoration: none;
}

.site-legal-footer a:hover,
.site-legal-footer a:focus-visible {
  color: var(--cyan);
  outline: none;
  text-decoration: underline;
}

@media (max-width: 760px) {
  #price-table-panel > .table-wrap {
    display: none;
  }

  #regional-check-section > .table-wrap {
    display: none;
  }

  .mobile-chart-panel {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    padding: 10px;
    background: rgba(9, 12, 13, 0.84);
  }

  .mobile-chart-controls select {
    min-height: 42px;
  }

  .mobile-section-chart {
    height: min(540px, calc(100vh - 250px));
    min-height: 430px;
  }

  .regional-mobile-section-chart {
    height: min(360px, calc(100vh - 330px));
    min-height: 300px;
  }

  .table-wrap {
    border: 0;
    background: transparent;
  }

  .price-table,
  .price-table thead,
  .price-table tbody,
  .price-table tr,
  .price-table th,
  .price-table td {
    display: block;
    width: 100%;
  }

  .price-table thead {
    display: none;
  }

  .price-table tbody {
    display: grid;
    gap: 12px;
  }

  .price-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    border: 1px solid var(--line);
    background: rgba(9, 12, 13, 0.84);
  }

  .price-table th,
  .price-table td {
    min-height: 64px;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child,
  .tier-cell,
  .insight-tier {
    width: 100%;
  }

  .tier-cell {
    grid-column: 1 / -1;
  }

  .difference-cell {
    display: grid;
    gap: 5px;
    align-content: center;
    justify-items: center;
  }

  .difference-cell::before,
  .regional-table td::before {
    display: block;
    color: var(--dim);
    content: attr(data-region);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .regional-table tbody tr {
    grid-template-columns: 1fr;
  }

  .regional-table td::before {
    content: attr(data-column);
  }

  .regional-table td {
    display: grid;
    gap: 8px;
    align-content: center;
    justify-items: center;
  }

  .insight-price-list {
    max-width: 330px;
  }

  .regional-table .insight-mini-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 340px;
  }

  .regional-table .insight-signal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 240px;
  }

  .regional-table .insight-mini,
  .regional-table .insight-signal {
    min-height: 58px;
    justify-content: center;
    padding: 6px;
  }

  .money-tooltip::after,
  .empty-cell::after,
  .insight-price::after {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(340px, calc(100vw - 28px));
    transform: translateX(-50%);
  }

  .price-detail-dialog {
    width: min(100vw - 16px, 720px);
    max-height: calc(100vh - 16px);
  }

  .price-detail-shell {
    gap: 10px;
    padding: 12px;
  }

  .detail-topline {
    align-items: start;
    gap: 10px;
  }

  .detail-close {
    flex: 0 0 auto;
  }

  .detail-chart {
    height: min(560px, calc(100vh - 138px));
    min-height: 460px;
  }
}

@media (max-width: 840px) {
  .prices-topbar {
    align-items: start;
  }

  .brand-copy strong {
    max-width: 178px;
  }

  .prices-hero,
  .control-panel,
  .tab-list {
    grid-template-columns: 1fr;
  }

  .prices-hero {
    align-items: start;
    gap: 16px;
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 15vw, 72px);
  }
}

@media (max-width: 520px) {
  .prices-topbar {
    min-height: 58px;
    padding-inline: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 32px;
  }

  .brand-copy small {
    display: none;
  }

  .toolkit-menu nav {
    width: min(306px, calc(100vw - 20px));
  }

  .prices-app,
  .site-legal-footer {
    width: min(100% - 20px, 1180px);
  }

  .control-panel {
    padding: 12px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 15vw, 64px);
  }

  .hero-copy p {
    font-size: 14px;
  }

  .tab-button {
    min-height: 40px;
  }

  .price-table th,
  .price-table td {
    padding: 10px;
  }
}
