:root {
  --paper: #f4f0e8;
  --paper-soft: #faf8f3;
  --paper-deep: #eae4d8;
  --ink: #27251f;
  --ink-soft: #48443c;
  --muted: #777168;
  --line: rgba(49, 45, 38, 0.14);
  --line-strong: rgba(49, 45, 38, 0.24);
  --coral: #d97757;
  --coral-dark: #a84f36;
  --coral-soft: #f0d8ce;
  --green: #4f7669;
  --green-soft: #dce8e2;
  --card: rgba(255, 253, 248, 0.78);
  --shadow-sm: 0 12px 34px rgba(55, 48, 38, 0.07);
  --shadow-lg: 0 32px 90px rgba(55, 48, 38, 0.11);
  --serif: Georgia, "Times New Roman", "Noto Serif SC", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  z-index: -3;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  width: 620px;
  height: 620px;
  top: -250px;
  right: -180px;
  background: radial-gradient(circle, rgba(217, 119, 87, 0.16), rgba(217, 119, 87, 0) 68%);
}

.ambient-two {
  width: 500px;
  height: 500px;
  left: -220px;
  top: 640px;
  background: radial-gradient(circle, rgba(79, 118, 105, 0.12), rgba(79, 118, 105, 0) 70%);
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -4;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(39, 37, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 37, 31, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.site-header {
  width: min(1240px, calc(100% - 48px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-block;
}

.brand-mark span {
  position: absolute;
  left: 12px;
  top: 1px;
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: var(--coral);
  transform-origin: center;
}

.brand-mark span:nth-child(2) { transform: rotate(45deg); }
.brand-mark span:nth-child(3) { transform: rotate(90deg); }
.brand-mark span:nth-child(4) { transform: rotate(135deg); }

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.server-pill,
.live-badge,
.result-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.server-pill {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.56);
  font-size: 11px;
}

.server-pill i,
.live-badge i,
.result-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(79, 118, 105, 0.1);
}

.header-link {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.header-link:hover {
  color: var(--coral-dark);
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 98px 0 92px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.65fr);
  gap: 72px;
  align-items: end;
}

.eyebrow,
.mini-label {
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 22px;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 7.6vw, 96px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.064em;
}

.hero h1 span {
  display: block;
  color: var(--coral-dark);
  font-style: italic;
}

.lede {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.feature-row {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.feature-row > span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.5);
  font-size: 11px;
}

.feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-coral { background: var(--coral); }
.dot-green { background: var(--green); }
.dot-ink { background: var(--ink); }

.pricing-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.92), rgba(247, 242, 233, 0.7));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.pricing-card-head,
.workspace-head,
.section-heading,
.result-topbar,
.balance-card-head,
.token-card-head,
.token-card-foot,
.panel-label,
.effective-price,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pricing-card-head {
  align-items: flex-start;
  gap: 16px;
}

.pricing-card-head h2 {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.live-badge {
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 650;
}

.pricing-list {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.pricing-item {
  min-height: 78px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
}

.pricing-item > span {
  color: var(--ink-soft);
  font-size: 12px;
}

.pricing-item strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.pricing-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricing-item-accent strong {
  color: var(--coral-dark);
}

.pricing-footnote {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.pricing-footnote code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.workspace {
  margin-top: 108px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.workspace-head {
  gap: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.workspace-head > div,
.section-heading-main {
  display: flex;
  align-items: center;
  gap: 17px;
}

.section-index {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
}

.workspace-head h2,
.section-heading h2 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.privacy-note svg {
  width: 15px;
  height: 15px;
}

.query-form {
  padding-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr) auto;
  gap: 14px;
  align-items: end;
}

.query-main label,
.query-code label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
}

.query-input-wrap {
  position: relative;
}

.query-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  display: inline-flex;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.query-icon svg {
  width: 20px;
  height: 20px;
}

.query-input-wrap input,
.query-code input {
  width: 100%;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.query-input-wrap input {
  padding: 0 112px 0 52px;
}

.query-code input {
  padding: 0 16px;
}

.query-input-wrap input::placeholder,
.query-code input::placeholder {
  color: #aaa39a;
}

.query-input-wrap input:focus,
.query-code input:focus {
  border-color: var(--coral);
  background: #fffdf9;
  box-shadow: 0 0 0 5px rgba(217, 119, 87, 0.11);
}

.identifier-kind {
  position: absolute;
  right: 12px;
  top: 50%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transform: translateY(-50%);
  color: var(--muted);
  background: var(--paper-soft);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.identifier-kind.valid {
  color: var(--green);
  border-color: rgba(79, 118, 105, 0.22);
  background: var(--green-soft);
}

.identifier-kind.invalid {
  color: var(--coral-dark);
  border-color: rgba(168, 79, 54, 0.18);
  background: var(--coral-soft);
}

.field-hint {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.primary-button {
  min-width: 190px;
  height: 64px;
  padding: 0 10px 0 19px;
  border: 1px solid var(--ink);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--paper-soft);
  background: var(--ink);
  transition:
    transform 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.primary-button:hover {
  background: #3a372f;
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.58;
  transform: none;
}

.button-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.button-copy small {
  color: rgba(250, 248, 243, 0.58);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.button-copy strong {
  font-size: 13px;
}

.button-circle {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--paper-soft);
}

.button-circle svg {
  width: 19px;
  height: 19px;
}

.message {
  min-height: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  transition: margin 160ms ease;
}

.message:not(:empty) {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.56);
}

.message.error {
  color: var(--coral-dark);
  border-color: rgba(168, 79, 54, 0.18);
  background: rgba(240, 216, 206, 0.45);
}

.result-dashboard {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow-lg);
  animation: result-in 380ms ease both;
}

.result-topbar {
  padding: 4px 4px 20px;
}

.result-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--coral-dark);
  background: var(--coral-soft);
}

.account-avatar svg {
  width: 20px;
  height: 20px;
}

.result-identity p {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.result-identity span {
  color: var(--muted);
  font-size: 10px;
}

.result-status {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 650;
}

.balance-overview {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
}

.balance-hero-card,
.token-card {
  border: 1px solid var(--line);
  border-radius: 19px;
}

.balance-hero-card {
  min-height: 308px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  color: var(--paper-soft);
  background:
    radial-gradient(circle at 90% 10%, rgba(217, 119, 87, 0.3), transparent 45%),
    var(--ink);
}

.balance-card-head > span:first-child {
  color: rgba(250, 248, 243, 0.66);
  font-size: 11px;
}

.currency-tag {
  padding: 6px 8px;
  border: 1px solid rgba(250, 248, 243, 0.18);
  border-radius: 999px;
  color: rgba(250, 248, 243, 0.72);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.balance-hero-card > strong {
  margin-top: 62px;
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.06em;
}

.balance-hero-card > p {
  margin: 10px 0 0;
  color: rgba(250, 248, 243, 0.58);
  font-size: 12px;
}

.balance-card-bottom {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(250, 248, 243, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(250, 248, 243, 0.48);
  font-size: 9px;
}

.token-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.token-card {
  min-height: 308px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: var(--paper-soft);
}

.token-card-gpt {
  background:
    radial-gradient(circle at 95% 5%, rgba(79, 118, 105, 0.11), transparent 45%),
    var(--paper-soft);
}

.token-card-claude {
  background:
    radial-gradient(circle at 95% 5%, rgba(217, 119, 87, 0.12), transparent 45%),
    var(--paper-soft);
}

.model-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 17px;
}

.token-card-gpt .model-badge {
  color: var(--green);
  background: var(--green-soft);
}

.token-card-claude .model-badge {
  color: var(--coral-dark);
  background: var(--coral-soft);
}

.model-lockup strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
}

.model-lockup small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.price-chip {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.52);
  font-size: 9px;
}

.token-value {
  margin-top: 66px;
}

.token-value strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 51px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.token-value span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.token-card-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.mini-progress {
  width: 54px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-deep);
}

.mini-progress i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
}

.token-card-gpt .mini-progress i {
  background: var(--green);
}

.token-card-claude .mini-progress i {
  background: var(--coral);
}

.result-footnote {
  margin-top: 14px;
  padding: 12px 4px 2px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.result-footnote svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.calculator-section {
  margin-top: 116px;
}

.section-heading {
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading > p {
  max-width: 390px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: right;
}

.calculator-shell {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: var(--shadow-lg);
}

.calculator-toolbar {
  padding: 4px 4px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-deep);
}

.segment {
  min-width: 164px;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.segment svg {
  width: 15px;
  height: 15px;
}

.segment:hover {
  color: var(--ink);
}

.segment.active {
  color: var(--ink);
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(44, 39, 32, 0.08);
}

.model-switch {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.46);
}

.model-switch > span {
  padding: 0 9px 0 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.model-option {
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.model-option.active {
  color: var(--paper-soft);
  background: var(--ink);
}

.calculator-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
  align-items: stretch;
}

.calculator-panel {
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 19px;
}

.calculator-input-panel {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.7), rgba(247,242,233,0.52));
}

.calculator-output-panel {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 88% 10%, rgba(217, 119, 87, 0.17), transparent 44%),
    var(--paper-deep);
}

.panel-label > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
}

.panel-label small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.large-input-wrap {
  position: relative;
  margin-top: 57px;
  border-bottom: 1px solid var(--line-strong);
}

.large-input-wrap > span {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-54%);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 30px;
}

.large-input-wrap input {
  width: 100%;
  height: 82px;
  padding: 0 0 0 44px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 68px);
  letter-spacing: -0.055em;
  appearance: textfield;
}

.large-input-wrap input::-webkit-outer-spin-button,
.large-input-wrap input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.quick-values {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-values button {
  min-width: 52px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.5);
  font-size: 9px;
}

.quick-values button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fffdf9;
}

.conversion-arrow {
  display: grid;
  place-items: center;
}

.conversion-arrow span {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--coral-dark);
  background: var(--paper-soft);
  box-shadow: var(--shadow-sm);
}

.conversion-arrow svg {
  width: 18px;
  height: 18px;
}

.calculator-output-panel > strong {
  margin-top: 65px;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 70px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.calculator-output-panel > p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.effective-price {
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.effective-price span {
  color: var(--muted);
  font-size: 9px;
}

.effective-price strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
}

.formula-bar {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: rgba(255,255,255,0.4);
}

.formula-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: var(--coral-dark);
  background: var(--coral-soft);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
}

.formula-bar small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.formula-bar p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.explanation-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.explanation-grid article {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,253,248,0.46);
}

.explanation-grid article > span {
  color: var(--coral-dark);
  font-family: var(--serif);
  font-size: 12px;
}

.explanation-grid h3 {
  margin: 30px 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.explanation-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  align-items: flex-end;
  color: var(--muted);
  font-size: 9px;
}

.site-footer > div {
  max-width: 430px;
}

.footer-brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}

.site-footer p {
  margin: 7px 0 0;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .pricing-card {
    max-width: 620px;
  }

  .query-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .query-code {
    grid-column: 1;
  }

  .primary-button {
    grid-column: 2;
    grid-row: 1;
  }

  .balance-overview {
    grid-template-columns: 1fr;
  }

  .balance-hero-card {
    min-height: 260px;
  }

  .token-card {
    min-height: 280px;
  }

  .calculator-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .conversion-arrow {
    height: 44px;
  }

  .conversion-arrow span {
    transform: rotate(90deg);
  }
}

@media (max-width: 720px) {
  .site-header,
  .shell,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    min-height: 74px;
  }

  .server-pill,
  .header-link {
    display: none;
  }

  .shell {
    padding: 64px 0 66px;
  }

  .hero h1 {
    font-size: clamp(49px, 15vw, 68px);
  }

  .lede {
    font-size: 15px;
  }

  .pricing-card {
    padding: 20px;
  }

  .workspace {
    margin-top: 76px;
    padding: 18px;
    border-radius: 19px;
  }

  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-note {
    padding-left: 55px;
  }

  .query-form {
    grid-template-columns: 1fr;
  }

  .query-main,
  .query-code,
  .primary-button {
    grid-column: 1;
    grid-row: auto;
  }

  .primary-button {
    width: 100%;
  }

  .result-dashboard {
    padding: 14px;
    border-radius: 19px;
  }

  .result-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .token-summary {
    grid-template-columns: 1fr;
  }

  .balance-hero-card,
  .token-card {
    min-height: 245px;
    padding: 22px;
  }

  .balance-hero-card > strong,
  .token-value {
    margin-top: 44px;
  }

  .balance-card-bottom {
    flex-direction: column;
    gap: 5px;
  }

  .calculator-section {
    margin-top: 86px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > p {
    max-width: none;
    padding-left: 55px;
    text-align: left;
  }

  .calculator-shell {
    padding: 14px;
    border-radius: 19px;
  }

  .calculator-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segment {
    min-width: 0;
    padding: 0 8px;
    font-size: 9px;
  }

  .model-switch {
    justify-content: space-between;
  }

  .model-switch > span {
    margin-right: auto;
  }

  .calculator-panel {
    min-height: 250px;
    padding: 22px;
  }

  .large-input-wrap {
    margin-top: 38px;
  }

  .calculator-output-panel > strong {
    margin-top: 42px;
  }

  .explanation-grid {
    grid-template-columns: 1fr;
  }

  .explanation-grid article {
    min-height: 138px;
  }

  .explanation-grid h3 {
    margin-top: 22px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 430px) {
  .query-input-wrap input {
    padding-right: 88px;
    font-size: 13px;
  }

  .identifier-kind {
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .feature-row {
    gap: 8px;
  }

  .feature-row > span {
    font-size: 9px;
  }

  .token-value strong,
  .calculator-output-panel > strong {
    font-size: 38px;
  }
}

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