.page-title, .hero, .band, .panel, .card, .api-card, .price-table, .tool-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.page-title {
  margin-bottom: 18px;
  padding: clamp(24px, 4vw, 34px) clamp(18px, 5vw, 44px);
  background: var(--panel);
}
.page-title h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.page-title p { max-width: 820px; margin: 12px 0 0; color: var(--muted); line-height: 1.75; font-size: clamp(15px, 2vw, 17px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 900;
}
.eyebrow .dot { display: none; }
.hero {
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 54px) clamp(18px, 5vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  overflow: hidden;
}
.hero h1, .hero h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(28px, 3.7vw, 44px);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.hero h1 span { color: var(--brand); }
.hero p { color: var(--muted); line-height: 1.85; font-size: clamp(15px, 1.7vw, 17px); }
.hero .btn { margin: 0 8px 8px 0; }
.band { position: relative; margin-top: 18px; padding: clamp(24px, 4vw, 34px) clamp(18px, 4vw, 44px); }
.band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 44px;
  right: 44px;
  height: 1px;
  background: var(--fade-h);
}
.section-title { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.section-title h2, .section-title h3 { margin: 0; }
.section-title p { margin: 6px 0 0; color: var(--muted); line-height: 1.65; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; }
.article-list { display: grid; gap: 12px; }
.cards, .directory, .stats-strip, .metric-row, .feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-row, .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .api-card, .panel, .tool-card { padding: 18px; }
.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}
.card-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(221, 236, 255, .95), rgba(255, 255, 255, .9));
  color: var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.card-icon .site-nav-ico {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}
body.dark-mode .card-icon {
  border-color: rgba(147, 197, 253, .24);
  background: linear-gradient(145deg, rgba(37, 99, 235, .22), rgba(15, 23, 42, .92));
}
.card p, .api-card p, .mini { color: var(--muted); line-height: 1.65; font-size: 13px; }
.tool-card h2 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.08; overflow-wrap: anywhere; }
.btn {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .2);
}
body.dark-mode .btn {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .34);
}
.btn.secondary, .btn.ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.tool-grid, .filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.filters { grid-template-columns: 1.4fr repeat(4, 1fr) auto; margin-bottom: 16px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 850; }
.field input, .field select, .field textarea, .filter-input {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { min-height: 90px; padding-top: 10px; }
.submit-message {
  display: none;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-weight: 850;
  line-height: 1.5;
}
.submit-message.is-visible { display: block; }
.submit-message.is-success {
  border-color: rgba(16, 185, 129, .24);
  background: rgba(236, 253, 245, .9);
  color: #047857;
}
.submit-message.is-error {
  border-color: rgba(220, 38, 38, .24);
  background: rgba(254, 242, 242, .94);
  color: #b91c1c;
}
.submit-message.is-info {
  border-color: rgba(37, 99, 235, .2);
  background: rgba(239, 246, 255, .9);
  color: var(--brand);
}
body.dark-mode .submit-message.is-success {
  background: rgba(6, 78, 59, .28);
  color: #a7f3d0;
}
body.dark-mode .submit-message.is-error {
  background: rgba(127, 29, 29, .28);
  color: #fecaca;
}
body.dark-mode .submit-message.is-info {
  background: rgba(37, 99, 235, .16);
  color: #93c5fd;
}
.calculator-shell { display: grid; gap: 16px; }
.mode-tabs {
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  border-radius: 18px;
  background: var(--surface-subtle);
}
.mode-tabs button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.mode-tabs button.is-active {
  color: var(--brand);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.calc-panel { display: none; }
.calc-panel.is-active { display: grid; gap: 16px; }
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
}
.text-calc-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .88fr);
  align-items: stretch;
}
.text-input-panel, .text-config-panel {
  padding: clamp(22px, 3vw, 32px);
}
.text-input-panel .calc-head {
  align-items: flex-start;
}
.text-input-panel .mini {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.75;
}
.calc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.calc-head h2 { margin: 0 0 4px; }
.counter {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.tool-grid.compact { grid-template-columns: 1fr; }
.text-config-panel .tool-grid.compact {
  gap: 22px;
}
.text-config-panel .field label {
  margin-bottom: 4px;
  font-size: 14px;
}
.text-config-panel .field select {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 17px;
}
.field input[readonly] {
  color: var(--brand-deep);
  background: var(--blue-soft);
  font-weight: 900;
  cursor: default;
}
.text-config-panel .field input[readonly] {
  min-height: 66px;
  padding: 0 22px;
  border-color: rgba(37, 99, 235, .18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(221, 236, 255, .95), rgba(255, 255, 255, .92));
  color: var(--brand);
  font-size: 28px;
}
body.dark-mode .text-config-panel .field input[readonly] {
  background: linear-gradient(145deg, rgba(37, 99, 235, .22), rgba(15, 23, 42, .92));
}
.text-estimator {
  min-height: clamp(320px, 38vw, 500px);
  width: 100%;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid rgba(37, 99, 235, .38);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.75;
  resize: vertical;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}
.template-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.template-row > span { flex: 0 0 100%; color: var(--muted); font-size: 13px; font-weight: 850; }
.template-row button {
  min-height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(145deg, var(--surface), var(--soft));
  color: var(--brand);
  font-weight: 850;
  cursor: pointer;
}
.template-row button span {
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  font-size: 12px;
  line-height: 1;
}
.stat-grid, .token-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.token-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.text-config-panel .stat-grid {
  margin-top: 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat-card {
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.text-config-panel .stat-card {
  min-height: 190px;
  padding: 20px 14px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}
.stat-card span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
}
.text-config-panel .stat-card span {
  width: 42px;
  height: 42px;
}
.stat-card strong {
  display: block;
  margin-top: 18px;
  font-size: 30px;
  line-height: 1;
}
.text-config-panel .stat-card strong {
  margin-top: 22px;
  font-size: clamp(28px, 3vw, 38px);
}
.text-config-panel .stat-card p {
  font-size: 14px;
}
.calc-note {
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.stat-card p { margin: 8px 0 0; color: var(--muted); font-weight: 850; }
.stat-card strong {
  overflow-wrap: anywhere;
}
.stat-blue { background: linear-gradient(145deg, rgba(239, 246, 255, .96), var(--surface)); }
.stat-green { background: linear-gradient(145deg, rgba(236, 253, 245, .92), var(--surface)); }
.stat-amber { background: linear-gradient(145deg, rgba(255, 247, 237, .92), var(--surface)); }
.stat-purple { background: linear-gradient(145deg, rgba(245, 243, 255, .92), var(--surface)); }
body.dark-mode .stat-blue,
body.dark-mode .stat-green,
body.dark-mode .stat-amber,
body.dark-mode .stat-purple {
  background: linear-gradient(145deg, rgba(37, 99, 235, .12), var(--surface));
}
.result-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--contrast);
  color: var(--contrast-ink);
}
.result-box strong { display: block; font-size: 34px; line-height: 1.1; }
.cost-overview .metric-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cost-overview .card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.cost-overview .card strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}
.cost-overview .result-box {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 18px;
  border: 1px solid rgba(147, 197, 253, .32);
  background: linear-gradient(145deg, #2563eb, #60a5fa);
  color: #fff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .22);
}
.cost-overview .result-box strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: clamp(34px, 5vw, 52px);
}
.cost-overview .result-box span:last-child {
  color: rgba(255, 255, 255, .82);
}
.composition-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-subtle);
}
.composition-row span { color: var(--muted); font-size: 13px; font-weight: 850; }
.composition-row strong { float: right; }
.composition-row i {
  margin-top: 12px;
  height: 8px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}
.composition-row em {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  transition: width .25s ease;
}
.composition-bars { display: grid; gap: 10px; }
.composition-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 70px minmax(180px, 1.4fr) 90px;
  align-items: center;
  gap: 12px;
}
.composition-row i { margin-top: 0; }
.composition-row small { color: var(--muted); font-weight: 850; text-align: right; }
.bar-green { background: linear-gradient(90deg, #22c55e, #86efac) !important; }
.bar-amber { background: linear-gradient(90deg, #f97316, #fdba74) !important; }
.bar-blue { background: linear-gradient(90deg, #2563eb, #60a5fa) !important; }
.hero .result-box {
  border: 1px solid rgba(147, 197, 253, .32);
  background: linear-gradient(145deg, #2563eb, #60a5fa);
  color: #fff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .26);
}
body.dark-mode .hero .result-box {
  border-color: rgba(147, 197, 253, .34);
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
}
.price-table { overflow: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td {
  padding: 14px;
  border-bottom: 1px solid transparent;
  border-image: var(--fade-h) 1;
  text-align: left;
  font-size: 13px;
}
th { color: var(--muted); background: var(--surface-subtle); font-size: 12px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.model-cell, .api-title, .cost-head { display: flex; align-items: center; gap: 10px; font-weight: 850; }
.api-title { flex-wrap: wrap; }
.api-title .tag { margin-left: 2px; }
.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 850;
}
.tag-green { color: var(--green); background: var(--green-soft); border-color: rgba(31, 138, 91, .18); }
.tag-red { color: var(--red); background: var(--red-soft); border-color: rgba(220, 38, 38, .2); }
.tag-blue { color: var(--brand-deep); background: var(--blue-soft); border-color: rgba(37, 99, 235, .26); }
.tag-amber { color: #92400e; background: var(--amber-soft); }
.cost-list { display: grid; gap: 10px; }
.cost-card {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, auto) minmax(210px, .72fr);
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.cost-card.is-current {
  border-color: rgba(37, 99, 235, .58);
  background: linear-gradient(145deg, rgba(221, 236, 255, .98), rgba(246, 250, 255, .94));
}
body.dark-mode .cost-card.is-current {
  border-color: rgba(147, 197, 253, .72);
  background: linear-gradient(145deg, rgba(37, 99, 235, .24), rgba(15, 23, 42, .96));
}
.cost-head p, .cost-meta p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cost-price { display: flex; align-items: end; justify-content: flex-end; gap: 6px; }
.cost-price strong { font-size: 28px; line-height: 1; }
.cost-price span { color: var(--muted); font-size: 12px; font-weight: 760; }
.cost-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.cost-meta { text-align: right; }
.card-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.card-links a {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.warning {
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: #78350f;
  line-height: 1.7;
  font-size: 13px;
}
body.dark-mode .warning { color: #fde68a; }
@media (max-width: 1080px) {
  .hero, .split, .calc-layout { grid-template-columns: 1fr; }
  .cards, .directory, .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-grid, .text-config-panel .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .cost-card { grid-template-columns: 1fr; }
  .cost-price, .cost-tags { justify-content: flex-start; }
  .cost-meta { text-align: left; }
}
@media (max-width: 720px) {
  .hero, .band, .page-title { border-radius: 22px; }
  .hero h1, .hero h2 { font-size: clamp(27px, 7.8vw, 36px); }
  .page-title h1 { font-size: clamp(30px, 9vw, 42px); }
  .hero p { font-size: 15px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .cards, .directory, .stats-strip, .metric-row, .feature-grid, .tool-grid, .filters, .stat-grid, .token-metrics { grid-template-columns: 1fr; }
  .text-config-panel .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-overview .metric-row, .cost-overview .result-box { grid-template-columns: 1fr; }
  .cost-overview .result-box strong { grid-row: auto; grid-column: auto; }
  .composition-row { grid-template-columns: 1fr 70px; }
  .composition-row i, .composition-row small { grid-column: 1 / -1; text-align: left; }
  .mode-tabs button { min-height: 44px; font-size: 15px; }
  .text-estimator { min-height: 280px; font-size: 15px; }
  .text-config-panel .stat-card { min-height: 140px; }
}
@media (max-width: 480px) {
  .hero, .band, .page-title { border-radius: 18px; }
  .hero h1, .hero h2 { font-size: clamp(26px, 7.4vw, 32px); }
  .page-title h1 { font-size: clamp(28px, 8.6vw, 36px); }
  .card, .api-card, .panel, .tool-card { padding: 16px; }
  .result-box strong { font-size: 28px; }
}

/* Token calculator v2 */
.token-calculator-v2 {
  display: grid;
  gap: 24px;
  padding: clamp(18px, 3vw, 28px);
  border-color: rgba(255, 255, 255, .72);
  border-radius: 28px;
  background: rgba(244, 248, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
body.dark-mode .token-calculator-v2 {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .82);
}
.token-calculator-v2 .mode-tabs {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  border: 1px solid rgba(74, 103, 139, .12);
  border-radius: 30px;
  background: linear-gradient(145deg, #edf4fc, #e6f0fb);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 26px rgba(59,104,159,.08);
}
body.dark-mode .token-calculator-v2 .mode-tabs {
  border-color: rgba(148, 163, 184, .22);
  background: linear-gradient(145deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .92));
}
.token-calculator-v2 .mode-tabs button {
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 900;
}
.token-calculator-v2 .mode-tabs button svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.token-calculator-v2 .mode-tabs button.is-active {
  color: var(--brand);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px rgba(59, 104, 159, .12), inset 0 1px 0 rgba(255,255,255,.92);
}
body.dark-mode .token-calculator-v2 .mode-tabs button.is-active {
  color: #bfdbfe;
  background: rgba(30, 41, 59, .96);
  box-shadow: 0 12px 28px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
}
.token-calculator-v2 .calc-panel { display: none; }
.token-calculator-v2 .calc-panel.is-active { display: grid; gap: 28px; }
.token-calculator-v2 .calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .95fr);
  gap: 24px;
  align-items: stretch;
}
.token-calculator-v2 .panel {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-soft);
}
body.dark-mode .token-calculator-v2 .panel,
body.dark-mode .token-calculator-v2 .card,
body.dark-mode .token-calculator-v2 textarea,
body.dark-mode .token-calculator-v2 select,
body.dark-mode .token-calculator-v2 input {
  border-color: rgba(148, 163, 184, .2);
  background: linear-gradient(145deg, rgba(18, 26, 43, .98), rgba(15, 23, 42, .95));
  color: #f8fafc;
}
body.dark-mode .token-calculator-v2 h2,
body.dark-mode .token-calculator-v2 h3,
body.dark-mode .token-calculator-v2 strong,
body.dark-mode .token-calculator-v2 .overview-label {
  color: #f8fafc;
}
body.dark-mode .token-calculator-v2 .mini,
body.dark-mode .token-calculator-v2 p,
body.dark-mode .token-calculator-v2 label,
body.dark-mode .token-calculator-v2 .calc-note,
body.dark-mode .token-calculator-v2 .output-help,
body.dark-mode .token-calculator-v2 .token-result-card h3,
body.dark-mode .token-calculator-v2 .token-result-card p {
  color: #cbd5e1;
}
body.dark-mode .token-calculator-v2 .btn,
body.dark-mode .token-calculator-v2 .icon-button {
  border-color: rgba(147, 197, 253, .22);
  background: rgba(30, 41, 59, .82);
  color: #bfdbfe;
}
.token-calculator-v2 .calc-head {
  margin-bottom: 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.token-calculator-v2 .calc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.token-calculator-v2 .calc-head h2,
.token-calculator-v2 h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); }
.token-calculator-v2 .mini { margin: 12px 0 0; font-size: 16px; line-height: 1.7; font-weight: 750; }
.token-calculator-v2 .counter {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--brand-deep);
  font-weight: 900;
  white-space: nowrap;
}
body.dark-mode .token-calculator-v2 .counter { color: #bfdbfe; }
.token-calculator-v2 .icon-button { gap: 8px; }
.token-calculator-v2 .icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.token-calculator-v2 .text-estimator {
  min-height: 300px;
  width: 100%;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid rgba(37, 99, 235, .42);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.8;
  resize: vertical;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .06);
}
body.dark-mode .token-calculator-v2 .text-estimator {
  border-color: rgba(147, 197, 253, .36);
  background: #0f172a;
}
.token-calculator-v2 .template-row {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}
.token-calculator-v2 .template-row > span {
  color: var(--muted);
  font-weight: 900;
  line-height: 1.2;
}
.token-calculator-v2 .template-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 138, 157, .26) transparent;
}
.token-calculator-v2 .template-scroll::-webkit-scrollbar { height: 4px; }
.token-calculator-v2 .template-scroll::-webkit-scrollbar-track { background: transparent; }
.token-calculator-v2 .template-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(124, 138, 157, .24); }
.token-calculator-v2 .template-row button {
  min-height: 48px;
  min-width: 0;
  flex: 0 0 auto;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #eef5ff);
  color: var(--brand);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
body.dark-mode .token-calculator-v2 .template-row button {
  background: linear-gradient(145deg, rgba(30,41,59,.96), rgba(15,23,42,.96));
  color: #bfdbfe;
}
body.dark-mode .token-calculator-v2 .template-row b {
  background: rgba(59, 130, 246, .18);
  color: #bfdbfe;
}
.token-calculator-v2 .template-row b {
  width: 32px;
  height: 32px;
  min-width: 32px;
  flex: 0 0 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--brand);
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
}
.token-calculator-v2 .model-field { display: grid; gap: 10px; }
.token-calculator-v2 .model-field label,
.token-calculator-v2 .field label { color: var(--muted); font-size: 15px; font-weight: 900; }
.token-calculator-v2 .field + .field { margin-top: 28px; }
.token-calculator-v2 .model-picker {
  position: relative;
  min-height: 72px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--surface), rgba(239, 246, 255, .9));
  box-shadow: var(--shadow-soft);
}
body.dark-mode .token-calculator-v2 .model-picker {
  border-color: rgba(147,197,253,.24);
  background: linear-gradient(145deg, rgba(18, 26, 43, .98), rgba(15, 23, 42, .92));
}
.token-calculator-v2 .model-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #fff, var(--blue-soft));
  color: var(--brand-deep);
  font-size: 16px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14), 0 10px 24px rgba(37, 99, 235, .1);
}
.token-calculator-v2 .model-logo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
body.dark-mode .token-calculator-v2 .model-logo {
  background: linear-gradient(145deg, rgba(30, 41, 59, .98), rgba(59, 130, 246, .18));
  color: #bfdbfe;
}
.token-calculator-v2 .model-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.token-calculator-v2 .model-arrow { color: var(--muted); font-size: 34px; font-weight: 500; line-height: 1; }
.token-calculator-v2 .model-picker select {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 100%;
  opacity: 0;
  cursor: pointer;
}
.token-calculator-v2 input,
.token-calculator-v2 select {
  min-height: 58px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
}
.token-calculator-v2 input[readonly] {
  min-height: 78px;
  border-color: rgba(37, 99, 235, .18);
  background: linear-gradient(145deg, rgba(221, 236, 255, .98), rgba(255,255,255,.95));
  color: var(--brand);
  font-size: 34px;
  font-weight: 900;
}
.token-calculator-v2 .output-help { margin: 12px 0 0; color: var(--muted); font-weight: 760; line-height: 1.6; }
.token-calculator-v2 .overview-section { display: grid; gap: 28px; }
.token-calculator-v2 .overview-section h2 small { color: var(--muted); font-size: 16px; font-weight: 800; }
.token-calculator-v2 .overview-block { display: grid; gap: 18px; }
.token-calculator-v2 .overview-block + .overview-block {
  padding-top: 28px;
  border-top: 1px solid transparent;
  border-image: var(--fade-h) 1;
}
.token-calculator-v2 .overview-label { margin: 0; color: var(--ink); font-size: 18px; font-weight: 950; }
.token-calculator-v2 .text-stat-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.token-calculator-v2 .text-stat-grid .stat-card {
  min-height: 168px;
  padding: 22px;
  display: grid;
  grid-template-columns: 56px minmax(0,1fr);
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  justify-items: stretch;
  align-content: stretch;
  text-align: left;
  border-radius: 18px;
}
.token-calculator-v2 .text-stat-grid .stat-card span {
  grid-column: 1;
  grid-row: 1;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(221,236,255,.92);
  color: var(--brand);
}
.token-calculator-v2 .text-stat-grid .stat-card span svg,
.token-calculator-v2 .token-input-item i svg,
.token-calculator-v2 .token-result-card i svg,
.token-calculator-v2 .icon-note svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.token-calculator-v2 .text-stat-grid .stat-card strong {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
}
.token-calculator-v2 .text-stat-grid .stat-card p {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  display: grid;
  align-content: center;
  line-height: 1.45;
}
.token-calculator-v2 .metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.token-calculator-v2 .metric-row .card {
  min-height: 116px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 10px;
  border-radius: 16px;
}
.token-calculator-v2 .metric-row .card strong { font-size: clamp(24px, 3vw, 34px); line-height: 1; }
.token-calculator-v2 .result-box {
  margin-top: 0;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #2563eb, #60a5fa);
  color: #fff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .22);
}
.token-calculator-v2 .result-box span:first-child { color: #fff; font-size: clamp(18px, 2vw, 24px); font-weight: 950; }
.token-calculator-v2 .result-box strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #fff;
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 950;
}
.token-calculator-v2 .result-box span:last-child { color: rgba(255,255,255,.86); }
.token-calculator-v2 .icon-note {
  margin-top: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.token-calculator-v2 .icon-note svg { flex: 0 0 20px; color: var(--brand); }
.token-calculator-v2 .token-calc-panel { gap: 24px; }
.token-calculator-v2 .token-input-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.token-calculator-v2 .token-input-item {
  min-height: 184px;
  padding: 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(246,250,255,.72));
  box-shadow: var(--shadow-soft);
}
body.dark-mode .token-calculator-v2 .token-input-item { background: #121a2b; }
.token-calculator-v2 .token-input-item i {
  grid-column: 1;
  grid-row: 1;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--brand);
}
.token-calculator-v2 .token-input-item div { grid-column: 2; grid-row: 1; min-width: 0; }
.token-calculator-v2 .token-input-item strong { display: block; color: var(--ink); font-size: 17px; line-height: 1.35; }
.token-calculator-v2 .token-input-item p { margin: 6px 0 0; color: var(--muted); font-weight: 760; line-height: 1.5; }
.token-calculator-v2 .token-input-item input { grid-column: 1 / -1; grid-row: 2; align-self: end; }
.token-calculator-v2 .stat-green i { color: #059669; background: rgba(16,185,129,.12); }
.token-calculator-v2 .stat-amber i { color: #ea580c; background: rgba(249,115,22,.12); }
.token-calculator-v2 .stat-blue i { color: var(--brand); background: var(--blue-soft); }
.token-calculator-v2 .stat-purple i { color: #7c3aed; background: rgba(124,58,237,.12); }
.token-calculator-v2 .token-error {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(220,38,38,.2);
  border-radius: 14px;
  background: rgba(254,242,242,.92);
  color: #dc2626;
  font-weight: 850;
}
.token-calculator-v2 .token-error.is-visible { display: block; }
.token-calculator-v2 .token-result-hero { margin-top: 24px; display: grid; }
.token-calculator-v2 .token-result-cards {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.token-calculator-v2 .token-result-card {
  min-height: 150px;
  padding: clamp(18px, 1.8vw, 24px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.token-calculator-v2 .token-result-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.token-calculator-v2 .token-result-card i {
  width: clamp(40px, 4vw, 48px);
  height: clamp(40px, 4vw, 48px);
  flex: 0 0 clamp(40px, 4vw, 48px);
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  color: var(--brand);
}
.token-calculator-v2 .token-result-card h3 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 22px);
  font-weight: 950;
  line-height: 1.25;
}
.token-calculator-v2 .token-result-card strong {
  align-self: end;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-size: clamp(24px, 2.8vw, 42px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
.token-calculator-v2 .token-result-card p { margin: 0; color: var(--muted); font-weight: 850; line-height: 1.4; }
.token-calculator-v2 .stat-green { background: linear-gradient(145deg, rgba(236,253,245,.96), rgba(255,255,255,.94)); }
.token-calculator-v2 .stat-amber { background: linear-gradient(145deg, rgba(255,247,237,.98), rgba(255,255,255,.94)); }
.token-calculator-v2 .stat-blue { background: linear-gradient(145deg, rgba(239,246,255,.98), rgba(255,255,255,.94)); }
.token-calculator-v2 .stat-purple { background: linear-gradient(145deg, rgba(245,243,255,.98), rgba(255,255,255,.94)); }
body.dark-mode .token-calculator-v2 .stat-green,
body.dark-mode .token-calculator-v2 .stat-amber,
body.dark-mode .token-calculator-v2 .stat-blue,
body.dark-mode .token-calculator-v2 .stat-purple {
  border-color: rgba(148,163,184,.2);
  background: linear-gradient(145deg, rgba(30,41,59,.92), rgba(15,23,42,.96));
}
body.dark-mode .token-calculator-v2 .token-result-card i,
body.dark-mode .token-calculator-v2 .text-stat-grid .stat-card span,
body.dark-mode .token-calculator-v2 .token-input-item i {
  background: rgba(59, 130, 246, .16);
}
body.dark-mode .token-calculator-v2 .result-box {
  background: linear-gradient(145deg, #1d4ed8, #2563eb 52%, #60a5fa);
  box-shadow: 0 20px 42px rgba(37, 99, 235, .22);
}
body.dark-mode .token-calculator-v2 .token-error {
  border-color: rgba(248, 113, 113, .34);
  background: rgba(127, 29, 29, .28);
  color: #fecaca;
}
.token-calculator-v2 .token-legacy-stats {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.token-calculator-v2 .composition-bars { margin-top: 24px; gap: 14px; }
.token-calculator-v2 .composition-row {
  min-height: 72px;
  padding: 18px 20px;
  gap: 14px;
}
.token-calculator-v2 .composition-row.is-hidden { display: none; }
.token-calculator-v2 .cost-list { margin-top: 20px; }

@media (max-width: 980px) {
  .token-calculator-v2 .token-result-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .token-calculator-v2 .calc-layout,
  .token-calculator-v2 .token-input-grid { grid-template-columns: 1fr; }
  .token-calculator-v2 .text-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .token-calculator-v2 .mode-tabs button { min-height: 54px; }
  .token-calculator-v2 .metric-row,
  .token-calculator-v2 .token-result-cards,
  .token-calculator-v2 .text-stat-grid { grid-template-columns: 1fr; }
  .token-calculator-v2 .result-box { grid-template-columns: 1fr; }
  .token-calculator-v2 .result-box strong { grid-row: auto; grid-column: auto; }
}

/* Lightweight interaction layer */
.card,
.stat,
.stat-card,
.metric,
.cost-card,
.token-result-card,
.token-input-item {
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease,
    background .22s ease;
}

.card:hover,
.stat:hover,
.stat-card:hover,
.metric:hover,
.cost-card:hover,
.token-result-card:hover,
.token-input-item:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, .22);
  box-shadow: 0 18px 42px rgba(59, 104, 159, .14);
}

.model-picker {
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease,
    background .22s ease;
}

.model-picker:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 18px 38px rgba(59, 104, 159, .16);
}

.model-picker:hover .model-arrow {
  transform: translateX(4px);
}

.model-picker:hover .model-logo {
  transform: scale(1.06);
}

.model-arrow,
.model-logo {
  transition: transform .22s ease;
}

.template-row button,
.template-row-button,
.mode-tabs button,
.theme-toggle,
.site-nav a,
.nav a,
.btn {
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease;
}

.template-row button:hover,
.template-row-button:hover,
.mode-tabs button:hover,
.theme-toggle:hover,
.site-nav a:hover,
.nav a:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(59, 104, 159, .12);
}

.template-row button:active,
.template-row-button:active,
.mode-tabs button:active,
.theme-toggle:active,
.site-nav a:active,
.nav a:active,
.btn:active {
  transform: translateY(0) scale(.98);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, .55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  background: rgba(15, 23, 42, .98);
  border-color: rgba(96, 165, 250, .62);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .14);
}

.composition-row {
  transition:
    transform .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.composition-row i {
  transition: height .2s ease;
}

.composition-row:hover {
  transform: translateY(-2px);
  background: rgba(237, 244, 252, .9);
  box-shadow: 0 12px 28px rgba(59, 104, 159, .08);
}

.composition-row:hover i {
  height: 10px;
}

body.dark-mode .card:hover,
body.dark-mode .stat:hover,
body.dark-mode .stat-card:hover,
body.dark-mode .metric:hover,
body.dark-mode .cost-card:hover,
body.dark-mode .token-result-card:hover,
body.dark-mode .token-input-item:hover,
body.dark-mode .model-picker:hover {
  border-color: rgba(96, 165, 250, .34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

body.dark-mode .composition-row:hover {
  background: rgba(30, 41, 59, .82);
}

.external-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.external-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.external-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(219, 234, 254, .52), transparent 34%),
    rgba(15, 23, 42, .32);
  backdrop-filter: blur(12px);
}

.external-modal__card {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(74, 103, 139, .16);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(246, 250, 255, .94));
  box-shadow: 0 26px 70px rgba(59, 104, 159, .22);
  color: var(--ink);
  transform: translateY(14px) scale(.98);
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    background .22s ease;
}

.external-modal.is-visible .external-modal__card {
  transform: translateY(0) scale(1);
}

.external-modal__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.external-modal__icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.external-modal__eyebrow {
  margin: 20px 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 950;
}

.external-modal h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.external-modal p {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.75;
}

.external-modal__domain {
  margin-top: 22px;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(237, 244, 252, .72);
}

.external-modal__domain span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.external-modal__domain strong {
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.external-modal__countdown {
  display: inline-flex;
  min-height: 34px;
  margin-top: 18px !important;
  padding: 8px 12px;
  align-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: var(--brand) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.external-modal__actions {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

body.dark-mode .external-modal__backdrop {
  background:
    radial-gradient(circle at 50% 24%, rgba(37, 99, 235, .28), transparent 34%),
    rgba(2, 6, 23, .62);
}

body.dark-mode .external-modal__card {
  border-color: rgba(148, 163, 184, .2);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .98), rgba(17, 24, 39, .96));
  box-shadow: 0 26px 72px rgba(0, 0, 0, .42);
}

body.dark-mode .external-modal__domain {
  background: rgba(30, 41, 59, .72);
}

body.dark-mode .external-modal__countdown {
  background: rgba(96, 165, 250, .16);
  color: #93c5fd !important;
}

@media (hover: none) {
  .card:hover,
  .stat:hover,
  .stat-card:hover,
  .metric:hover,
  .cost-card:hover,
  .token-result-card:hover,
  .token-input-item:hover,
  .model-picker:hover,
  .template-row button:hover,
  .template-row-button:hover,
  .mode-tabs button:hover,
  .theme-toggle:hover,
  .site-nav a:hover,
  .nav a:hover,
  .btn:hover,
  .composition-row:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  .external-modal { padding: 16px; }
  .external-modal__card { border-radius: 24px; }
  .external-modal__actions { display: grid; grid-template-columns: 1fr; }
  .external-modal__actions .btn { width: 100%; justify-content: center; }
}

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