/* AI Coding Plans — compact comparison tables */

:root {
  --bg: #fbfaf7;
  --panel: #ffffff;
  --ink: #081633;
  --ink-2: #24385e;
  --ink-3: #66758d;
  --line: #e1e7f0;
  --line-2: #cfd9e8;
  --accent: #1f4fd8;
  --good: #0f7a45;
  --good-bg: #eaf7ef;
  --warn: #9a6200;
  --warn-bg: #fff6df;
  --bad: #a33a3a;
  --bad-bg: #fff0f0;
  --muted-bg: #f2f5f9;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(219, 228, 255, 0.34), transparent 32rem),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 28rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.hero {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 8px;
}
.navlinks {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.navlinks a {
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.navlinks a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.hero__copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__brand img {
  width: clamp(22px, 2.2vw, 28px);
  height: clamp(22px, 2.2vw, 28px);
  border-radius: 6px;
  flex: 0 0 auto;
}
.hero__copy p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: clamp(13px, 1.2vw, 15px);
  letter-spacing: 0.01em;
}

/* Page and filters */
.page {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 48px;
}
.filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) repeat(5, minmax(118px, 0.9fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
}
.field select,
.field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #5e718f 50%),
    linear-gradient(135deg, #5e718f 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 17px,
    calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding: 0 34px 0 12px;
}
.field input { padding: 0 12px 0 38px; }
.field select:focus,
.field input:focus {
  border-color: #91a8d7;
  box-shadow: 0 0 0 4px rgba(31, 79, 216, 0.10);
}
.field--search { position: relative; }
.search-icon {
  position: absolute;
  left: 13px;
  bottom: 8px;
  color: #7890af;
  font-size: 18px;
  line-height: 1;
  z-index: 1;
}
.reset-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.reset-btn:hover {
  border-color: var(--line-2);
  color: var(--accent);
}
.results-line {
  margin: 10px 0 18px;
  color: var(--ink-3);
  font-size: 12px;
}
.results-line strong { color: var(--ink); }

/* Sections and tables */
.plans-list { display: grid; gap: 26px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: #0b3a78;
  letter-spacing: -0.02em;
}
.section-heading span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.plans-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  table-layout: fixed;
}
.plans-table th,
.plans-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.plans-table th:last-child,
.plans-table td:last-child { border-right: 0; }
.plans-table tr:last-child td { border-bottom: 0; }
.plans-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px;
  background: #f8fafc;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}
.plans-table tbody td {
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}
.plans-table tbody tr:hover td { background: #fff; }
.brand-col { width: 290px; }
.analysis-col { width: 180px; }
.privacy-col { width: 250px; }
.action-col { width: 72px; }

/* Provider */
.provider {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.provider-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  color: #fff;
  background: transparent;
  border: 0;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.04em;
}
.provider-logo img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 0;
  background: transparent;
}
.provider-logo__fallback {
  position: absolute;
  inset: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand, #111827);
  color: #fff;
}
.provider-logo img[hidden],
.provider-logo__fallback[hidden] {
  display: none !important;
}
.provider__body { min-width: 0; }
.provider__name {
  display: inline-block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.provider__meta {
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.35;
}
.provider__meta div + div { margin-top: 2px; }
.provider__meta b {
  color: var(--ink-2);
  font-weight: 800;
}

/* Artificial Analysis */
.analysis-cell {
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.35;
}
.analysis-score {
  display: grid;
  gap: 1px;
  margin-bottom: 7px;
}
.analysis-score strong {
  color: #0b3a78;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.analysis-score span {
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}
.analysis-score--missing strong { color: var(--ink-3); }
.analysis-model {
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}
.analysis-benchmark {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 10px;
}
.analysis-speed {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.analysis-speed span {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 800;
}

/* Plan tiers */
.tier + .tier {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.tier__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  line-height: 1.2;
}
.tier__line strong {
  font-size: 12px;
  font-weight: 850;
}
.tier__line span {
  flex-shrink: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}
.tier__notes {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.35;
}
.dash { color: var(--ink-3); }

/* Privacy */
.privacy-cell {
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.35;
}
.privacy {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.privacy-matrix {
  display: grid;
  gap: 4px;
}
.privacy-matrix div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.privacy-matrix span {
  color: var(--ink-3);
  font-size: 10px;
}
.policy-value {
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}
.privacy--good,
.policy-value--good { color: var(--good); background: var(--good-bg); }
.privacy--warn,
.policy-value--warn { color: var(--warn); background: var(--warn-bg); }
.privacy--bad,
.policy-value--bad { color: var(--bad); background: var(--bad-bg); }
.privacy--muted { color: var(--ink-3); background: var(--muted-bg); }
.policy-value {
  padding: 1px 6px;
  border-radius: 999px;
}
.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 850;
}
.policy-links a:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: rgba(29, 78, 216, 0.05);
}
.action-cell {
  text-align: center !important;
  vertical-align: middle !important;
}
.action-cell a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}
.action-cell a:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.empty {
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  color: var(--ink-3);
  background: rgba(255,255,255,0.5);
}

/* About */
.about {
  width: min(620px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 0 40px;
  font-size: 14px;
}
.about h2 {
  margin: 18px 0 8px;
  color: #0b3a78;
  font-size: 18px;
  letter-spacing: -0.025em;
}
.about p,
.about li { color: var(--ink-2); }
.about ul { margin: 12px 0; padding-left: 18px; }
.about code {
  background: var(--muted-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Footer */
.footer {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
}
.footer a { color: var(--accent); font-weight: 700; }

/* Responsive */
@media (max-width: 900px) {
  .filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field--search { grid-column: 1 / -1; }
  .reset-btn { width: 100%; }
}

@media (max-width: 760px) {
  .hero,
  .page,
  .footer,
  .about { width: min(100% - 28px, 1280px); }
  .navlinks { justify-content: flex-start; }
  .filter-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .footer { flex-direction: column; }
}
