:root {
  --ink: #16202c;
  --muted: #586579;
  --line: #dde3ea;
  --bg: #f7f9fc;
  --card: #ffffff;
  --accent: #2457d6;
  --accent-dark: #173fa4;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { width: min(100% - 2rem, 960px); margin-inline: auto; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin: 0.25rem 0 1rem; }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}
.brand {
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.site-header nav a:hover { color: var(--accent); }

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 2.5rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.lede { font-size: clamp(1.05rem, 2.5vw, 1.3rem); max-width: 46rem; color: #35445a; }
.disclaimer-inline { font-size: 0.88rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.button {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { background: transparent; color: var(--accent) !important; }
.button.secondary:hover { background: #eef3ff; }
.button.small { padding: 0.4rem 0.8rem; font-size: 0.9rem; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #9db8ff;
  outline-offset: 2px;
}

.section { padding-block: 2rem; border-top: 1px solid var(--line); }
.section-intro { max-width: 48rem; color: var(--muted); }
.link-list { padding-left: 1.25rem; }
.link-list li { margin-bottom: 0.6rem; }

.builder-grid, .calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 4vw, 1.75rem);
  margin-top: 1.5rem;
}
@media (min-width: 680px) {
  .builder-grid, .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-grid .full, .calc-grid .full { grid-column: 1 / -1; }
}
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #b9c3d1;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.hint { color: var(--muted); font-size: 0.86rem; margin: 0.3rem 0 0; }

.results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 820px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.result-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 0;
}
.output-text {
  background: #f1f5fb;
  border-radius: 8px;
  padding: 0.75rem;
  min-height: 5.5rem;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}
.cost-value { font-size: 1.6rem; font-weight: 750; color: var(--accent); margin: 0.5rem 0; }
.copied { font-size: 0.82rem; color: #197a4a; margin-left: 0.5rem; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 32rem; }
th, td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #f1f5fb; font-size: 0.9rem; }
tbody tr:last-child td { border-bottom: 0; }

details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
summary { cursor: pointer; font-weight: 650; }
details p { margin: 0.75rem 0 0; color: #35445a; }

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: 0.5rem; }
.callout { background: #eef3ff; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 1rem; margin: 1.5rem 0; }

.prompt-card { margin-bottom: 1rem; }
.prompt-card h3 { margin-bottom: 0.25rem; }
.meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.5rem; }
.prompt-text { background: #f1f5fb; border-radius: 8px; padding: 0.75rem; overflow-wrap: anywhere; }

.stats { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.25rem; }
.stat-value { font-size: 1.7rem; font-weight: 750; color: var(--accent); margin: 0; }
.category-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.category-nav a { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.9rem; text-decoration: none; }
.category-nav a:hover { border-color: var(--accent); background: #eef3ff; }

.site-footer { background: #101a27; color: #cbd5e1; margin-top: 3rem; padding: 1.5rem 0; }
.site-footer p { margin: 0 0 0.5rem; font-size: 0.9rem; }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: #e6edf7; }
.page-head { padding: 2.5rem 0 1rem; }
.page-head h1 { margin-bottom: 0.5rem; }
