:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --border: #e2e8f0;
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-soft: #ccfbf1;
  --primary-ink: #115e59;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --accent-ink: #92400e;
  --danger-soft: #fee2e2;
  --danger-ink: #991b1b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --max-w: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--ink-muted);
}

.nav-links a[aria-current="page"] {
  color: var(--primary-hover);
  font-weight: 700;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.segmented {
  display: inline-flex;
  background: var(--surface-muted);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.75rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin: 0 0 1.4rem;
  color: var(--ink-muted);
  max-width: 66ch;
  font-size: 1.02rem;
}

/* Roaming comparison strip */
.roaming-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
}

.roaming-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.roaming-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.roaming-value {
  font-size: 1.15rem;
  font-weight: 800;
}

.roaming-value.is-bad {
  color: var(--danger-ink);
}

.roaming-value.is-good {
  color: var(--primary-hover);
}

/* Main Workspace */
main {
  flex: 1;
  padding: 1.75rem 0 3rem;
}

/* Destination Pills */
.dest-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.dest-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dest-pill:hover {
  border-color: var(--primary);
}

.dest-pill[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* AI Verdict Card */
.verdict-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.verdict-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-hover);
}

.verdict-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.verdict-text {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink);
}

/* Filters */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.chip-toggle[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.sort-wrap select {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.7rem;
}

/* Comparison Table */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

table.plans-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.93rem;
}

.plans-table th {
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.plans-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.plans-table tbody tr:last-child td {
  border-bottom: 0;
}

.plans-table tbody tr:hover {
  background: #f8fafc;
}

.provider-name {
  font-weight: 800;
  color: var(--ink);
}

.plan-sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.price-main {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.price-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-good {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.badge-warn {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.badge-muted {
  background: var(--surface-muted);
  color: var(--ink-muted);
}

.badge-no {
  background: var(--danger-soft);
  color: var(--danger-ink);
}

.btn-cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-align: center;
  transition: background 0.15s ease;
}

.btn-cta:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-cta.is-disabled {
  background: var(--surface-muted);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-muted);
}

/* Guide Cards */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.guide-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
}

.guide-card p,
.guide-card li {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.guide-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

/* Prose pages (About, Privacy, Contact) */
.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
  max-width: 780px;
}

.prose-card h1 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

.prose-card h2 {
  margin-top: 1.6rem;
  font-size: 1.15rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.disclosure {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0;
}

.rate-info {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

/* Mobile Responsive Table -> Cards */
@media (max-width: 768px) {
  .plans-table thead {
    display: none;
  }

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

  .plans-table tr {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .plans-table td {
    border: 0;
    padding: 0.3rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .plans-table td::before {
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase;
  }

  .plans-table td.td-cta {
    padding-top: 0.65rem;
  }

  .plans-table td.td-cta::before {
    content: none;
  }

  .btn-cta {
    width: 100%;
  }
}
