:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --ink: #171717;
  --muted: #626262;
  --line: #e2e2e5;
  --paper: #ffffff;
  --green: #212121;
  --lime: #f1f1f1;
  --accent: #6b6b6b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #525252; outline-offset: 4px; }
[hidden] { display: none !important; }

.site-header { max-width: 1280px; margin: auto; height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 48px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 650; font-size: 21px; letter-spacing: -.6px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; background: #212121; color: #fff; border-radius: 11px; }
.brand-mark svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-label { font-size: 10px; color: #686868; border-left: 1px solid #d5d5d8; padding-left: 16px; margin-left: 9px; letter-spacing: 1.2px; font-weight: 500; }
.text-button { border: 0; background: none; color: #525252; font-size: 12px; padding: 10px 0; white-space: nowrap; }
.text-button:hover { color: #111; }
.text-button span { margin-left: 7px; font-size: 16px; }
main { max-width: 1140px; padding: 0 32px; margin: auto; }
.intro { padding: 54px 0 37px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; letter-spacing: 1.45px; color: #626262; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: #757575; border-radius: 50%; flex-shrink: 0; }
.intro h1 { font-size: 49px; line-height: 1.15; letter-spacing: -2px; font-weight: 550; margin: 17px 0 15px; }
.intro h1 span { color: #757575; }
.intro p { font-size: 14px; color: #626262; line-height: 1.7; margin: 0; }
.mobile-only { display: none; }

.calculator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.usage-card { padding: 28px 30px; min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h2 { font-size: 18px; letter-spacing: -.45px; font-weight: 600; margin: 0; }
.soft-badge { font-size: 10px; letter-spacing: .6px; color: #626262; border: 1px solid var(--line); padding: 6px 8px; border-radius: 5px; white-space: nowrap; }
.card-description { font-size: 12px; color: var(--muted); margin: 10px 0 26px; line-height: 1.6; }
.usage-card .card-description { margin-bottom: 16px; }
.token-field { margin: 0 0 21px; }
.token-field label { display: flex; flex-wrap: wrap; align-items: center; font-size: 12px; font-weight: 600; gap: 7px; margin-bottom: 9px; line-height: 1.5; }
.direction-icon, .direction-icon.output { font-size: 15px; color: #555; font-weight: 500; }
.field-hint { margin-left: auto; font-size: 10px; font-weight: 400; color: #666; white-space: nowrap; }
.input-wrap { display: flex; align-items: center; gap: 12px; border: 1px solid #d8d8dc; border-radius: 9px; background: #fff; padding: 0 15px; height: 59px; }
.input-wrap:focus-within { border-color: #777; box-shadow: 0 0 0 3px #e8e8eb; }
.input-wrap input { width: 100%; min-width: 0; outline: none; border: 0; background: none; font-size: 25px; letter-spacing: -.6px; color: #212121; font-variant-numeric: tabular-nums; }
.input-wrap span { flex: 0 0 auto; font-size: 11px; color: #626262; white-space: nowrap; }
.input-wrap select { flex: 0 0 98px; width: 98px; padding: 7px 0 7px 10px; border: 0; border-left: 1px solid #dedee1; background: transparent; color: #454545; font-size: 11px; cursor: pointer; }
.unit-note { font-size: 11px; line-height: 1.65; color: #626262; margin: 0 0 20px; }
.scope-note { font-size: 11px; line-height: 1.7; color: #626262; border-top: 1px solid var(--line); padding-top: 17px; margin: 0; }
.field-error { font-size: 11px; font-weight: 500; line-height: 1.5; color: #373737; margin: 7px 0 0; }
[aria-invalid="true"] { color: #171717 !important; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 5px; }

.result-card { border-radius: 16px; background: #212121; color: #fff; padding: 26px 30px 19px; overflow: hidden; position: relative; min-width: 0; }
.result-card [aria-invalid="true"] { color: #fff !important; }
.result-card button:focus-visible, .result-card input:focus-visible, .result-card select:focus-visible, .result-card summary:focus-visible { outline-color: #eee; }
.result-top { display: flex; align-items: center; justify-content: space-between; }
.result-top label { font-size: 10px; letter-spacing: 1.45px; color: #c7c7c7; font-weight: 500; }
.currency-badge { border: 1px solid #565656; color: #d6d6d6; font-size: 10px; padding: 5px 8px; border-radius: 5px; }
.select-wrap { margin-top: 8px; }
.select-wrap select { width: 100%; background: #212121; border: 0; border-bottom: 1px solid #515151; color: #fff; font-size: 18px; font-weight: 500; border-radius: 0; padding: 6px 20px 14px 0; cursor: pointer; outline-offset: 1px; color-scheme: dark; }
.select-wrap option, .select-wrap optgroup { background: #212121; color: #fff; }
.estimate { padding-top: 20px; }
.estimate-label { font-size: 12px; color: #c7c7c7; margin: 0 0 4px; }
.total-cost { font-size: 61px; line-height: 1.2; letter-spacing: -2.3px; font-weight: 400; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.request-summary { font-size: 11px; color: #c2c2c2; margin: 7px 0 21px; line-height: 1.6; }
.discount-summary { font-size: 11px; color: #f0f0f0; line-height: 1.6; margin: 7px 0 0; font-variant-numeric: tabular-nums; }
.cost-bar { height: 5px; display: flex; border-radius: 3px; overflow: hidden; background: #494949; gap: 2px; }
.cost-bar span { transition: width .2s; }
#input-bar { background: #f2f2f2; }
#output-bar { background: #909090; }
.breakdown { display: grid; grid-template-columns: 1fr 1fr; padding: 21px 0 12px; }
.breakdown > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.breakdown > div + div { border-left: 1px solid #4d4d4d; padding-left: 25px; }
.breakdown-label { font-size: 11px; color: #d0d0d0; display: flex; align-items: center; gap: 6px; }
.breakdown-label i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.legend-input { background: #f2f2f2; }
.legend-output { background: #909090; }
.breakdown strong { font-size: 21px; font-weight: 400; letter-spacing: -.4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rate-caption { font-size: 10px; color: #c0c0c0; line-height: 1.5; }
.rate-notice { font-size: 10px; line-height: 1.6; color: #c7c7c7; margin: 8px 0 12px; }
.custom-rates { border-top: 1px solid #4d4d4d; font-size: 11px; color: #d6d6d6; }
.custom-rates summary { padding: 14px 0 3px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.custom-rates summary:hover { color: #fff; }
.custom-rates summary::-webkit-details-marker { display: none; }
.custom-rates[open] summary span { transform: rotate(45deg); }
.custom-rate-fields { display: flex; gap: 12px; margin-top: 14px; }
.custom-rate-fields label { width: 50%; line-height: 1.5; }
.custom-rate-fields input { margin-top: 6px; width: 100%; border: 1px solid #707070; background: #303030; color: #fff; border-radius: 6px; padding: 9px; color-scheme: dark; }
.custom-rate-fields input::placeholder { color: #b8b8b8; opacity: 1; }
#custom-error { color: #fff; font-size: 11px; line-height: 1.6; }
.custom-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 13px 0 0; }
.custom-actions button { font-size: 11px; padding: 9px 12px; border: 1px solid #eee; background: #eee; color: #171717; border-radius: 6px; }
.custom-actions button:hover { background: #fff; border-color: #fff; }
.custom-actions button + button { border: 0; background: transparent; color: #d6d6d6; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.custom-actions button + button:hover { color: #fff; background: transparent; }

.discounts-card { margin-top: 24px; padding: 25px 30px 21px; }
.discounts-card .card-description { margin: 9px 0 21px; }
.reset-discounts { border: 0; background: transparent; color: #626262; padding: 7px 0 7px 10px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.reset-discounts:hover { color: #171717; }
.discount-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.discount-field { min-width: 0; }
.discount-field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.discount-field label span { color: #626262; font-size: 10px; font-weight: 400; }
.discount-input-wrap { display: flex; align-items: center; gap: 10px; border: 1px solid #d8d8dc; border-radius: 8px; height: 48px; padding: 0 14px; }
.discount-input-wrap:focus-within { border-color: #777; box-shadow: 0 0 0 3px #e8e8eb; }
.discount-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; color: #212121; font-size: 21px; font-variant-numeric: tabular-nums; }
.discount-input-wrap span { flex: 0 0 auto; color: #626262; font-size: 11px; }
.discount-policy { color: #626262; font-size: 10px; line-height: 1.7; margin: 16px 0 0; }
.comparison { margin-top: 36px; }
.comparison-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.comparison-heading h2 { font-size: 21px; letter-spacing: -.6px; }
.comparison-heading p { font-size: 12px; line-height: 1.6; color: #626262; margin: 8px 0 0; }
.comparison-count { font-size: 11px; color: #626262; white-space: nowrap; }
.table-card { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 16px 22px; gap: 12px; }
.filters { display: flex; gap: 4px; }
.filters button { border: 1px solid transparent; border-radius: 7px; background: none; font-size: 11px; color: #626262; padding: 8px 13px; white-space: nowrap; }
.filters button:hover { background: #f3f3f4; color: #171717; }
.filters button.active { background: #ededee; color: #171717; font-weight: 600; border-color: #dedee1; }
.sort-button { border: 0; border-radius: 6px; background: none; font-size: 11px; color: #626262; white-space: nowrap; padding: 8px; }
.sort-button:hover { background: #f3f3f4; color: #171717; }
.sort-button span { font-size: 14px; margin-right: 5px; }
.sort-button[aria-pressed="true"] { color: #171717; font-weight: 600; background: #ededee; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; min-width: 520px; table-layout: fixed; }
th:first-child { width: 46%; }
th { font-size: 10px; color: #626262; font-weight: 500; padding: 15px 25px; border-bottom: 1px solid var(--line); }
th span { font-size: 9px; color: #6b6b6b; }
th:not(:first-child), td:not(:first-child) { text-align: right; }
td { padding: 16px 25px; border-bottom: 1px solid #ededee; font-size: 12px; font-variant-numeric: tabular-nums; color: #575757; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.selected { background: #f1f1f3; }
tbody tr:hover { background: #f8f8f9; }
tbody tr.selected:hover { background: #eaeaed; }
.model-cell { display: flex; align-items: center; gap: 12px; }
.provider-mark { width: 29px; height: 29px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid #dedee1; border-radius: 8px; font-size: 16px; }
.provider-mark.anthropic, .provider-mark.openai, .provider-mark.google { background: #f6f6f7; color: #444; }
.provider-mark.anthropic { font-family: Georgia, serif; }
.provider-mark.openai { font-size: 18px; }
.provider-mark.google { font-size: 20px; }
.model-name { display: block; min-height: 24px; max-width: 100%; border: 0; background: none; color: #212121; font-size: 12px; font-weight: 600; padding: 0; text-align: left; line-height: 1.45; }
.model-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.model-name[aria-pressed="true"]::after { content: '\2713'; color: #454545; margin-left: 8px; }
.model-meta { font-size: 10px; margin-top: 4px; color: #666; line-height: 1.5; }
.model-note { color: #575757; }
.model-cost { font-weight: 600; color: #212121; font-size: 13px; }
.original-cost { display: block; margin-top: 5px; color: #666; font-size: 10px; font-weight: 400; }
#comparison-rows tr { cursor: pointer; }
.table-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 16px 25px; border-top: 1px solid var(--line); background: #fafafb; font-size: 10px; color: #626262; }
.table-footer .status-dot { width: 5px; height: 5px; }
.table-footer button { min-height: 24px; margin-left: auto; background: none; border: 0; padding: 4px 0; font-size: 10px; color: #525252; }
.table-footer button:hover { color: #111; text-decoration: underline; text-underline-offset: 3px; }
.pricing-note { font-size: 11px; color: #626262; line-height: 1.8; max-width: 850px; margin: 16px 0 0; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 24px 0 30px; margin-top: 36px; font-size: 10px; color: #626262; }
.site-footer button { min-height: 24px; padding: 3px 0 3px 12px; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; font-size: 10px; color: #525252; }
.site-footer button:hover { color: #111; }

dialog { border: 1px solid var(--line); border-radius: 17px; padding: 27px 30px; max-width: 540px; width: calc(100% - 32px); max-height: 85vh; box-shadow: 0 25px 80px #00000026; color: var(--ink); background: #fff; }
dialog::backdrop { background: #00000066; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-heading h2 { font-size: 22px; }
.dialog-heading button { background: none; border: 0; color: #626262; font-size: 27px; padding: 0 0 0 15px; }
.dialog-heading button:hover { color: #111; }
dialog p { font-size: 12px; color: #626262; line-height: 1.7; }
dialog h3 { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.source-links { margin: 20px 0; }
.source-links a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; margin: 8px 0; color: #212121; font-size: 14px; }
.source-links a:hover { background: #f6f6f7; border-color: #c9c9cf; }
.source-links small { display: block; font-size: 11px; color: #626262; margin-top: 4px; }
.source-notes p { font-size: 11px; margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.noscript { padding: 30px; color: #373737; text-align: center; }

@media (min-width: 1440px) {
  .intro { padding-top: 66px; }
  .site-header { max-width: 1336px; }
}
@media (max-width: 800px) {
  .site-header { height: 78px; padding: 0 28px; }
  .brand-label { display: none; }
  main { padding: 0 25px; }
  .intro { padding-top: 36px; }
  .intro h1 { font-size: 40px; }
  .calculator-grid { gap: 16px; }
  .usage-card, .result-card { padding-left: 22px; padding-right: 22px; }
  .discounts-card { padding-left: 22px; padding-right: 22px; }
  .discount-fields { gap: 14px; }
  .field-hint { font-size: 10px; }
  .token-field label { font-size: 11px; }
  .input-wrap { padding: 0 12px; gap: 8px; }
  .input-wrap span { font-size: 10px; }
  .total-cost { font-size: 49px; }
  th, td { padding-left: 20px; padding-right: 20px; }
  th:first-child { width: 43%; }
  .brand { font-size: 19px; }
}
@media (max-width: 620px) {
  .site-header { padding: 0 20px; height: 74px; }
  .brand { gap: 9px; font-size: 18px; }
  .brand-mark { height: 31px; width: 31px; border-radius: 9px; }
  .text-button { font-size: 11px; }
  main { padding: 0 20px; }
  .intro { padding: 34px 0 27px; }
  .intro h1 { font-size: 36px; letter-spacing: -1.5px; line-height: 1.2; margin: 15px 0 12px; }
  .intro p { font-size: 13px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.1px; }
  .mobile-only { display: block; }
  .calculator-grid { grid-template-columns: 1fr; gap: 16px; }
  .usage-card { padding: 25px 23px; }
  .result-card { padding: 23px 24px 17px; }
  .discounts-card { padding: 23px; margin-top: 16px; }
  .discount-fields { grid-template-columns: 1fr; gap: 18px; }
  .discounts-card .card-heading { align-items: baseline; }
  .discount-policy { font-size: 10px; }
  .card-description { margin-bottom: 22px; }
  .token-field label { font-size: 12px; }
  .input-wrap span { font-size: 11px; }
  .unit-note { font-size: 11px; }
  .total-cost { font-size: 55px; }
  .comparison { margin-top: 31px; }
  .comparison-heading h2 { font-size: 19px; }
  .comparison-heading p { font-size: 11px; line-height: 1.6; max-width: 270px; }
  .comparison-count { font-size: 10px; align-self: flex-start; padding-top: 5px; }
  .table-toolbar { padding: 12px 13px; flex-wrap: wrap; gap: 5px; }
  .filters button { font-size: 10px; padding: 8px 10px; }
  .sort-button { font-size: 10px; }
  table { min-width: 500px; }
  th:first-child { width: 44%; }
  th, td { padding: 14px 16px; }
  .model-cell { gap: 9px; }
  .model-name { font-size: 11px; }
  .table-footer { padding: 13px 16px; gap: 6px; font-size: 9px; }
  .table-footer button { font-size: 9px; }
  .pricing-note { font-size: 10px; }
  .site-footer { line-height: 1.8; flex-direction: column; gap: 5px; margin-top: 26px; padding-top: 20px; }
  .site-footer button { padding-left: 8px; }
  .footer-separator { display: none; }
  .table-footer > span:nth-last-of-type(1) { width: calc(100% - 76px); padding-left: 11px; }
  dialog { padding: 24px; }
}
@media (max-width: 380px) {
  .site-header { gap: 10px; }
  .brand { font-size: 17px; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .text-button { font-size: 10px; }
  .text-button span { margin-left: 3px; }
  .field-hint { flex-basis: 100%; margin-left: 22px; }
  .input-wrap { gap: 6px; }
  .input-wrap input { font-size: 23px; }
  .total-cost { font-size: 48px; }
  .comparison-heading h2 { font-size: 18px; }
  .filters { gap: 1px; }
  .filters button { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (max-width: 620px) {
  .breakdown.large-cost { grid-template-columns: 1fr; gap: 16px; }
  .breakdown.large-cost > div + div { border-left: 0; padding-left: 0; border-top: 1px solid #4d4d4d; padding-top: 16px; }
}
