:root {
  --ink: #07111f;
  --ink-2: #0d1c2d;
  --ink-3: #14283d;
  --paper: #f5f7f2;
  --paper-2: #e9eee8;
  --white: #ffffff;
  --text: #172332;
  --muted: #607080;
  --line: #ccd6d0;
  --cyan: #17d5e7;
  --cyan-dark: #078996;
  --amber: #ffb429;
  --amber-soft: #fff0c7;
  --green: #9df5c5;
  --shadow: 0 22px 70px rgba(7, 17, 31, .12);
  --radius: 22px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; }
button, input, select { font: inherit; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, .brand, .button, .eyebrow, .section-kicker, th { font-family: "Arial Narrow", "Roboto Condensed", Inter, sans-serif; }
h1 { max-width: 900px; margin-bottom: 24px; font-size: clamp(3rem, 6.7vw, 6.9rem); line-height: .94; letter-spacing: -.064em; }
h2 { margin-bottom: 20px; font-size: clamp(2.25rem, 4vw, 4.35rem); line-height: 1; letter-spacing: -.045em; }
h3 { font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1.08; letter-spacing: -.035em; }
p { margin-bottom: 1.2em; }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.narrow { max-width: 820px; }
.section { padding: 112px 0; }
.section-tint { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-kicker, .eyebrow { margin-bottom: 14px; color: var(--cyan-dark); font-size: .78rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; background: var(--amber); color: var(--ink); font-weight: 800; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.reading-progress { position: fixed; z-index: 200; inset: 0 0 auto; height: 3px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(255,255,255,.13); background: rgba(7,17,31,.9); color: var(--white); backdrop-filter: blur(18px); }
.nav-wrap { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--white); font-size: 1.02rem; font-weight: 500; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 11px; }
.brand b { color: var(--amber); }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: .88rem; font-weight: 800; }
.site-nav a { text-decoration: none; }
.site-nav a:not(.nav-cta):hover { color: var(--cyan); }
.nav-cta { padding: 11px 15px; border: 1px solid var(--cyan); border-radius: 999px; color: var(--cyan); }
.nav-cta:hover { background: var(--cyan); color: var(--ink); }
.menu-button { display: none; border: 1px solid rgba(255,255,255,.4); border-radius: 9px; background: transparent; color: var(--white); padding: 8px 11px; }

.hero { position: relative; isolation: isolate; min-height: 790px; overflow: hidden; background: var(--ink); color: var(--white); }
.hero::after { position: absolute; z-index: -1; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, rgba(7,17,31,.92)); content: ""; }
.hero-art { position: absolute; z-index: -2; inset: 0; background-image: linear-gradient(90deg, rgba(7,17,31,1) 1%, rgba(7,17,31,.92) 31%, rgba(7,17,31,.2) 66%, rgba(7,17,31,.12)), url('/assets/images/ai-api-price-routing-hero.webp'); background-position: center, center; background-size: cover; }
.hero-grid { display: grid; min-height: 790px; align-items: center; padding-block: 72px 88px; }
.hero-copy { max-width: 780px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--green); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(157,245,197,.12); }
.hero-lede { max-width: 720px; color: #c7d2dc; font-size: clamp(1.03rem, 1.7vw, 1.28rem); line-height: 1.65; }
.hero-verdict { display: inline-flex; margin: 15px 0 26px; padding: 11px 18px 11px 11px; align-items: center; gap: 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 16px; background: rgba(7,17,31,.65); backdrop-filter: blur(12px); }
.hero-verdict img { width: 52px; height: 52px; border-radius: 12px; }
.hero-verdict span, .hero-verdict strong { display: block; }
.hero-verdict span { color: var(--amber); font-size: .73rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero-verdict strong { margin-top: 2px; font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.button { display: inline-flex; min-height: 52px; padding: 12px 20px; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 11px; font-size: .94rem; font-weight: 900; line-height: 1.2; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--amber); color: var(--ink); box-shadow: 0 9px 0 rgba(255,180,41,.16); }
.button-primary:hover { background: #ffc654; box-shadow: 0 12px 0 rgba(255,180,41,.12); }
.button-ghost { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.05); color: var(--white); }
.button-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.button-wide { width: 100%; }
.microcopy { margin: 18px 0 0; color: #8ea1b2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; letter-spacing: .02em; }

.byline-strip { border-bottom: 1px solid var(--line); background: var(--white); }
.byline-layout { display: grid; grid-template-columns: auto minmax(0,1.5fr) minmax(260px,.8fr); align-items: center; gap: 24px; padding-block: 30px; }
.author-avatar { width: 88px; height: 88px; border: 3px solid var(--ink); border-radius: 50%; object-fit: cover; box-shadow: 6px 6px 0 var(--amber); }
.byline-copy .eyebrow { margin: 0 0 2px; }
.byline-copy h2 { margin: 0 0 5px; font-size: 1.45rem; letter-spacing: -.02em; }
.byline-copy p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.author-links { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 9px; font-size: .82rem; font-weight: 800; }
.disclosure { padding-left: 24px; border-left: 1px solid var(--line); font-size: .8rem; line-height: 1.45; }
.disclosure strong { display: block; margin-bottom: 5px; color: #9b6410; text-transform: uppercase; letter-spacing: .09em; }
.disclosure p { margin: 0; color: var(--muted); }

.intro-section .standfirst { color: var(--ink); font-size: 1.28rem; line-height: 1.58; }
.intro-section p { font-size: 1.05rem; }
.note-card { margin-top: 36px; padding: 24px 26px; border: 1px solid #e0bd64; border-radius: 15px; background: var(--amber-soft); }
.note-card strong { font-size: 1.02rem; }
.note-card p { margin: 5px 0 0; font-size: .92rem; }

.section-heading { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); align-items: end; gap: 40px; margin-bottom: 42px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { margin: 0; color: var(--muted); font-size: .94rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; text-align: left; }
.comparison-table { min-width: 960px; }
.matrix-table { min-width: 860px; }
.decision-table { min-width: 1080px; }
th { padding: 16px 18px; background: var(--ink); color: #dce6ec; font-size: .73rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
td { padding: 18px; border-top: 1px solid var(--line); font-size: .89rem; vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: #f4f8f6; }
.winner-row { background: #f0fbf9; }
.winner-row td:first-child { box-shadow: inset 4px 0 0 var(--cyan-dark); }
.rank-badge { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 900; }
.winner-row .rank-badge { border-color: var(--cyan-dark); background: var(--cyan); color: var(--ink); }
.provider-cell, .pick { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.provider-cell img, .pick img { flex: 0 0 auto; border-radius: 8px; object-fit: contain; }
.pick:hover { color: var(--cyan-dark); text-decoration: underline; }
.pick-group { display: flex; flex-wrap: wrap; gap: 9px 14px; min-width: 170px; }
.pick-group .pick { gap: 7px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.provider-cell span, td > small { display: block; }
.provider-cell small, td small { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }
.table-note { margin: 15px 4px 0; color: var(--muted); font-size: .76rem; }
.matrix-table td:first-child { font-weight: 800; }
.pick { font-weight: 800; }

.calculator-section { padding: 88px 0; background: var(--ink); color: var(--white); }
.calculator-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: start; gap: 70px; }
.calculator-grid > div > p:last-child { color: #9cafbd; }
.calculator { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 28px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: var(--ink-2); box-shadow: 12px 12px 0 rgba(23,213,231,.09); }
.calculator label { color: #b6c6d2; font-size: .78rem; font-weight: 800; }
.calculator input, .calculator select { width: 100%; margin-top: 7px; padding: 13px; border: 1px solid #405266; border-radius: 9px; outline: none; background: var(--ink); color: var(--white); }
.calculator input:focus, .calculator select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(23,213,231,.12); }
.calculator label:nth-child(3), .calculator-result, .calculator .button { grid-column: 1 / -1; }
.calculator-result { padding: 18px; border-radius: 12px; background: #10273a; }
.calculator-result > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.calculator-result span { color: #aebfcb; font-size: .86rem; }
.calculator-result strong { color: var(--white); font-size: 1.2rem; }
.calculator-result p { margin: 10px 0 0; padding-top: 11px; border-top: 1px solid #365064; color: var(--green); font-size: .85rem; font-weight: 800; }

.ranking-section { background: #fbfcf9; }
.ranking-heading { margin-bottom: 28px; }
.provider-review { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 42px 0; border-top: 1px solid var(--line); }
.provider-review:last-child { border-bottom: 1px solid var(--line); }
.review-rank { color: #b0bcb7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 2rem; font-weight: 900; }
.review-main { max-width: 960px; }
.review-title { display: flex; align-items: center; gap: 18px; }
.review-title img { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; }
.review-title span { color: var(--cyan-dark); font-size: .73rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.review-title h3 { margin: 3px 0 0; }
.review-summary { max-width: 790px; margin: 20px 0 24px; color: #3f5060; font-size: 1.03rem; }
.featured-review { margin: 28px 0 34px; padding: 34px; border: 1px solid #85cfd5; border-radius: var(--radius); background: linear-gradient(140deg, #e7faf8, #fff8e7); box-shadow: var(--shadow); }
.featured-review .review-rank { color: var(--cyan-dark); }
.featured-review .review-title img { width: 64px; height: 64px; box-shadow: 0 8px 22px rgba(7,17,31,.12); }
.winner-label { color: #976000 !important; }
.review-details { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; margin: 26px 0; border: 1px solid #b8cec9; border-radius: 13px; background: #b8cec9; }
.review-details > div { padding: 18px; background: rgba(255,255,255,.72); }
.review-details span, .review-details strong, .review-details small { display: block; }
.review-details span { color: var(--muted); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.review-details strong { margin-top: 4px; font-size: .93rem; }
.review-details small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.pros-caveat { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.pros-caveat > div { padding: 20px; border-left: 3px solid var(--cyan-dark); background: #edf2ef; }
.pros-caveat > div:last-child { border-left-color: var(--amber); background: #fff7e4; }
.pros-caveat h4 { margin-bottom: 7px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.pros-caveat p, .pros-caveat ul { margin: 0; color: #4b5b68; font-size: .86rem; }
.pros-caveat ul { padding-left: 18px; }
.pros-caveat li + li { margin-top: 5px; }
.review-actions { display: flex; align-items: center; gap: 20px; }
.text-link { color: var(--cyan-dark); font-size: .87rem; font-weight: 900; }
.decision-table td:first-child { font-weight: 900; }

.methodology-section { background: #fbfcf9; }
.methodology-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.methodology-grid > div > p { color: #415160; }
.method-steps { margin: 0; padding: 0; list-style: none; }
.method-steps li { display: grid; grid-template-columns: 66px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.method-steps li:first-child { border-top: 1px solid var(--line); }
.method-steps li > span { color: var(--cyan-dark); font-family: ui-monospace, monospace; font-weight: 900; }
.method-steps strong { font-size: 1rem; }
.method-steps p { margin: 3px 0 0; color: var(--muted); font-size: .87rem; }

.verdict-section { padding: 100px 0; background: linear-gradient(135deg, var(--ink), #0d2b3d); color: var(--white); }
.verdict-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 70px; }
.verdict-grid > div:first-child p:not(.section-kicker) { max-width: 680px; color: #b6c4cf; }
.verdict-card { padding: 28px; border: 1px solid rgba(255,255,255,.17); border-radius: var(--radius); background: rgba(255,255,255,.07); box-shadow: 14px 14px 0 rgba(23,213,231,.08); }
.verdict-provider { display: flex; align-items: center; gap: 15px; }
.verdict-provider img { border-radius: 14px; }
.verdict-provider span, .verdict-provider strong { display: block; }
.verdict-provider span { color: var(--amber); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.verdict-provider strong { margin-top: 2px; font-size: 1.65rem; }
.verdict-card ul { margin: 23px 0; padding: 20px 0 20px 22px; border-block: 1px solid rgba(255,255,255,.14); color: #c8d3dc; font-size: .9rem; }

.faq-grid { display: grid; grid-template-columns: .62fr 1.38fr; align-items: start; gap: 70px; }
.faq-grid > div:first-child > p:last-child { color: var(--muted); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 20px 42px 20px 0; cursor: pointer; font-weight: 900; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 17px; right: 4px; color: var(--cyan-dark); content: "+"; font-size: 1.5rem; font-weight: 500; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 42px 18px 0; color: var(--muted); font-size: .92rem; }
.sources-section { padding-top: 60px; border-top: 1px solid var(--line); }
.sources-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; padding-left: 22px; }
.sources-list a { color: var(--cyan-dark); font-size: .9rem; font-weight: 800; }

.site-footer { padding: 48px 0; border-top: 1px solid rgba(255,255,255,.14); background: var(--ink); color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .9fr .65fr; gap: 50px; align-items: start; }
.footer-brand { margin-bottom: 14px; }
.footer-grid > div > p { margin: 0; color: #8fa0ae; font-size: .83rem; }
.footer-grid nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.footer-grid nav a { color: #bfccd5; font-size: .83rem; font-weight: 700; }
.footer-meta { text-align: right; }
.footer-meta p + p { margin-top: 5px !important; }

.cookie-notice { position: fixed; z-index: 150; right: 20px; bottom: 20px; width: min(390px, calc(100% - 40px)); padding: 18px; border: 1px solid #556777; border-radius: 14px; background: var(--ink-2); color: var(--white); box-shadow: 0 20px 70px rgba(0,0,0,.34); }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; color: #c6d1d9; font-size: .78rem; line-height: 1.5; }
.cookie-notice > div { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 12px; }
.cookie-notice a { color: var(--cyan); font-size: .78rem; }
.cookie-notice button { border: 0; border-radius: 8px; background: var(--amber); color: var(--ink); padding: 8px 13px; font-size: .78rem; font-weight: 900; cursor: pointer; }
.cookie-notice button.secondary { border: 1px solid #627688; background: transparent; color: #d9e3e9; }
.cookie-notice button.secondary:hover { border-color: var(--cyan); color: var(--cyan); }

/* Supporting pages */
.page-hero { padding: 90px 0 60px; background: var(--ink); color: var(--white); }
.page-hero h1 { max-width: 800px; margin-bottom: 16px; font-size: clamp(2.8rem, 6vw, 5.3rem); }
.page-hero p { max-width: 680px; color: #afbfcb; }
.legal-content { padding: 80px 0 110px; }
.legal-content h2 { margin-top: 48px; font-size: 2rem; }
.legal-content h3 { margin-top: 30px; font-size: 1.3rem; }
.legal-content p, .legal-content li { color: #435362; }
.legal-content a { color: var(--cyan-dark); }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.contact-card { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.contact-card h2 { margin: 0 0 10px; font-size: 1.35rem; }

@media (max-width: 900px) {
  .site-nav { position: absolute; inset: 76px 0 auto; display: none; padding: 20px; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 20px; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .menu-button { display: block; }
  .hero, .hero-grid { min-height: 720px; }
  .hero-art { background-image: linear-gradient(90deg, rgba(7,17,31,.96), rgba(7,17,31,.68)), url('/assets/images/ai-api-price-routing-hero.webp'); background-position: center, 62% center; }
  .byline-layout { grid-template-columns: auto 1fr; }
  .disclosure { grid-column: 1 / -1; padding: 20px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .section-heading, .calculator-grid, .methodology-grid, .verdict-grid, .faq-grid, .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .provider-review { grid-template-columns: 68px 1fr; }
  .featured-review { grid-template-columns: 48px 1fr; padding: 26px; }
  .review-details { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

@media (max-width: 640px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .section { padding: 78px 0; }
  h1 { font-size: clamp(2.75rem, 15vw, 4.6rem); }
  .hero, .hero-grid { min-height: 760px; }
  .hero-grid { padding-block: 52px 72px; }
  .hero-art { background-position: center, 68% center; opacity: .9; }
  .hero-verdict { align-items: flex-start; }
  .hero-actions .button { width: 100%; }
  .byline-layout { grid-template-columns: 66px 1fr; gap: 15px; }
  .author-avatar { width: 64px; height: 64px; box-shadow: 4px 4px 0 var(--amber); }
  .author-links { gap: 10px; }
  .calculator { grid-template-columns: 1fr; padding: 20px; }
  .calculator label, .calculator label:nth-child(3), .calculator-result, .calculator .button { grid-column: 1; }
  .provider-review, .featured-review { grid-template-columns: 1fr; gap: 8px; }
  .review-rank { font-size: 1.2rem; }
  .review-title { align-items: flex-start; }
  .review-title img { width: 48px; height: 48px; }
  .pros-caveat { grid-template-columns: 1fr; }
  .review-actions { align-items: stretch; flex-direction: column; }
  .review-actions .text-link { padding: 5px 0; }
  .sources-list, .footer-grid nav, .contact-cards { grid-template-columns: 1fr; }
  td, th { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
