:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --ink: #0d0d0d;
  --body: #4a4a45;
  --muted: #77736c;
  --panel: #ffffff;
  --panel-soft: #efefeb;
  --line: #deded8;
  --line-strong: #cfcfc7;
  --accent: #0d0d0d;
  --accent-ink: #ffffff;
  --success: #10a37f;
  --warning: #b7791f;
  --error: #c64545;
  --font-ui: "OpenAI Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "OpenAI Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-card: 16px;
  --radius-input: 10px;
  --radius-button: 999px;
  --shadow: none;
}

body.theme-claude {
  color-scheme: light;
  --bg: #faf9f5;
  --ink: #141413;
  --body: #3d3d3a;
  --muted: #6c6a64;
  --panel: #efe9de;
  --panel-soft: #f5f0e8;
  --line: #e6dfd8;
  --line-strong: #d7cbbb;
  --accent: #cc785c;
  --accent-ink: #ffffff;
  --font-display: "Tiempos Headline", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --radius-card: 14px;
  --radius-input: 8px;
  --radius-button: 8px;
}

body.theme-xai {
  color-scheme: dark;
  --bg: #0a0a0a;
  --ink: #ffffff;
  --body: #dadbdf;
  --muted: #7d8187;
  --panel: #191919;
  --panel-soft: #111111;
  --line: #2a2d31;
  --line-strong: rgba(255, 255, 255, 0.25);
  --accent: #ffffff;
  --accent-ink: #0a0a0a;
  --font-display: "Universal Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-card: 8px;
  --radius-input: 8px;
  --radius-button: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  text-rendering: geometricPrecision;
  transition:
    background-color 260ms ease,
    color 260ms ease;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  width: fit-content;
  min-height: 46px;
  padding: 5px 12px 5px 6px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 55%, transparent);
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1;
}

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

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

.product-nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background: var(--panel-soft);
}

.nav-item {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  transition:
    background-color 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

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

.nav-item.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.nav-icon {
  width: 15px;
  height: 15px;
  color: currentColor;
  object-fit: contain;
}

.nav-item.is-active .nav-icon {
  filter: brightness(0) invert(1);
}

body.theme-xai .nav-icon {
  filter: brightness(0) invert(1) opacity(0.72);
}

body.theme-xai .nav-item.is-active .nav-icon {
  filter: none;
}

body.theme-xai .nav-item.is-active {
  border: 1px solid var(--line-strong);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
}

.language-switch {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  position: relative;
  min-height: 42px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 86%, transparent), color-mix(in srgb, var(--panel-soft) 90%, transparent));
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-globe {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12px;
}

.language-trigger {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  min-width: 150px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background:
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, var(--panel)));
  color: var(--accent-ink);
  font: inherit;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  padding: 0 13px;
}

.language-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.82;
  transform: translateY(-2px) rotate(45deg);
}

.language-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 4px;
  width: 272px;
  max-height: min(430px, calc(100vh - 96px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.10);
}

.language-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.language-option:hover,
.language-option.is-active {
  border-color: var(--line);
  background: var(--panel-soft);
}

.language-flag {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 14px;
}

.language-option-main {
  display: grid;
  gap: 2px;
}

.language-option-main strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-option-main small,
.language-short {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-short {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

body.theme-xai .language-menu {
  box-shadow: none;
}

body.theme-xai .language-option.is-active,
body.theme-xai .language-option:hover {
  background: #0f0f0f;
}

.icon-button,
.plain-button,
.helper-button,
.redeem-form button[type="submit"],
.support-card button,
.mini-query-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-button);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 520;
  text-decoration: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.icon-button {
  gap: 8px;
  padding: 0 14px;
  white-space: nowrap;
}

.icon-button.secondary,
.plain-button,
.helper-button.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.icon-button svg,
.guide-links svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.theme-xai .icon-button,
body.theme-xai .helper-button,
body.theme-xai .redeem-form button[type="submit"],
body.theme-xai .support-card button {
  background: transparent;
  color: var(--ink);
}

.icon-button:hover,
.plain-button:hover,
.helper-button:hover,
.redeem-form button[type="submit"]:hover,
.support-card button:hover,
.mini-query-card button:hover,
.guide-links a:hover {
  transform: translateY(-1px);
}

.workspace {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.workspace.is-switching {
  animation: pageSwap 280ms ease both;
}

@keyframes pageSwap {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-stage {
  display: grid;
  gap: 28px;
}

.product-stage-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.product-heading {
  max-width: 760px;
}

.product-identity {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.product-logo-shell {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 86%, transparent), var(--panel-soft));
}

.product-logo {
  width: 23px;
  height: 23px;
  color: var(--ink);
  object-fit: contain;
}

body.theme-claude .product-logo-shell {
  border-radius: 12px;
  background: #fff8ef;
}

body.theme-xai .product-logo-shell {
  border-color: var(--line-strong);
  background: #050505;
}

body.theme-xai .product-logo {
  filter: brightness(0) invert(1);
}

.stage-actions {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 4px;
}

.kicker,
.section-label,
.route-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

body.theme-xai .kicker,
body.theme-xai .section-label,
body.theme-xai .route-label {
  letter-spacing: 0.12em;
}

.heading-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 7.8vw, 88px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

body.theme-claude h1 {
  font-weight: 400;
  letter-spacing: -0.035em;
}

body.theme-xai h1 {
  font-weight: 400;
  letter-spacing: -0.055em;
}

.product-heading p:not(.kicker) {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 76%, transparent), var(--panel-soft));
  color: var(--body);
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.theme-xai .stock-badge {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--body);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.redeem-card,
.guide-card,
.support-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.redeem-card {
  min-height: 560px;
  padding: 28px;
}

.guide-card {
  padding: 28px;
}

.card-head,
.support-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.card-head {
  margin-bottom: 22px;
}

h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 520;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

body.theme-claude h2,
body.theme-xai h2 {
  font-weight: 400;
}

.route-label {
  max-width: 190px;
  overflow: hidden;
  padding-top: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.segmented button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--body);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.segmented button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

body.theme-xai .segmented button.is-active {
  background: transparent;
  color: var(--ink);
}

.inventory-panel {
  display: grid;
  gap: 11px;
  margin: 2px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 74%, transparent), var(--panel));
}

.inventory-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.inventory-head div {
  display: grid;
  gap: 2px;
}

.inventory-head span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.inventory-head small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inventory-refresh {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--body);
  font-size: 12px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.inventory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.inventory-item:only-child {
  grid-column: 1 / -1;
}

.inventory-item span,
.inventory-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-item span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.inventory-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.inventory-item strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 560;
  letter-spacing: -0.04em;
}

.inventory-item.has-display-label strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

.inventory-item.is-selected {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.inventory-item.is-empty {
  opacity: 0.62;
}

.inventory-item.is-unknown strong {
  color: var(--muted);
}

.inventory-item:hover {
  transform: translateY(-1px);
}

body.theme-xai .inventory-panel,
body.theme-xai .inventory-refresh,
body.theme-xai .inventory-item {
  background: transparent;
}

body.theme-xai .inventory-item.is-selected {
  background: #0f0f0f;
}

.redeem-form,
.support-card {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.support-card label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 560;
}

.field small,
.helper {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.split-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.inline-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  outline: 0;
  background: var(--bg);
  color: var(--ink);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

input {
  height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 116px;
  padding: 13px;
  resize: vertical;
}

#query-cdk {
  min-height: 86px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

body.theme-xai input:focus,
body.theme-xai textarea:focus {
  box-shadow: none;
}

.helper-button {
  min-width: 92px;
  padding: 0 14px;
}

.redeem-form button[type="submit"] {
  height: 48px;
  margin-top: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}

.plan-benefits {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-soft);
  color: var(--body);
  font-size: 13px;
  line-height: 1.5;
}

.plan-benefits span::before {
  margin-right: 7px;
  content: "·";
}

.gpt-plan-picker {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
}

.gpt-plan-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.gpt-plan-head legend {
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
}

.gpt-plan-head p,
#gpt-plan-caption {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.gpt-plan-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.gpt-plan-tab {
  display: grid;
  flex: 1;
  gap: 1px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.gpt-plan-tab span {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.gpt-plan-tab small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.gpt-plan-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.gpt-plan-tab.is-active small {
  color: color-mix(in srgb, var(--accent-ink) 74%, transparent);
}

.consent-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-soft);
  cursor: pointer;
}

.consent-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent);
}

.consent-row span,
.consent-row strong,
.consent-row small {
  display: block;
}

.consent-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
}

.consent-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.guide-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--body);
  font-size: 14px;
  line-height: 1.58;
  counter-increment: steps;
}

.guide-list li::before {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 12px;
  content: counter(steps);
}

body.theme-claude .guide-list li::before {
  border-radius: 8px;
}

body.theme-xai .guide-list li::before {
  border-color: var(--line-strong);
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.guide-note,
.mini-query-card {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-soft);
}

.guide-note-title {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
}

.guide-note-list {
  display: grid;
  gap: 7px;
}

.guide-note-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-note-list span::before {
  margin-right: 7px;
  content: "·";
}

.mini-query-card {
  display: grid;
  gap: 10px;
  background: transparent;
}

.mini-query-card h3 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.mini-query-card label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
}

.mini-query-card button {
  min-height: 40px;
}

.guide-links a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.guide-links a.is-featured {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.guide-links a.is-featured span {
  font-weight: 620;
}

.code-block {
  overflow: auto;
  min-height: 46px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.code-block.is-ok {
  color: var(--ink);
}

.code-block.is-error {
  border-color: color-mix(in srgb, var(--error) 55%, var(--line));
  color: var(--error);
}

.session-card {
  padding: 0;
  border: 0;
  background: transparent;
  white-space: normal;
}

.session-summary-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--line));
  border-radius: var(--radius-input);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--success) 8%, var(--panel)), var(--panel));
  color: var(--ink);
  font-family: var(--font-ui);
}

.session-summary-head div {
  display: grid;
  gap: 2px;
}

.session-summary-head small {
  color: var(--muted);
  font-size: 12px;
}

.session-check {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 10%, transparent);
  color: var(--success);
  font-size: 15px;
  font-weight: 700;
}

.session-card.is-error .session-summary-head,
.session-card.is-error .session-check {
  border-color: color-mix(in srgb, var(--error) 45%, var(--line));
}

.session-card.is-error .session-summary-head {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--error) 8%, var(--panel)), var(--panel));
}

.session-card.is-error .session-check {
  background: color-mix(in srgb, var(--error) 10%, transparent);
  color: var(--error);
}

.session-summary-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-soft);
  font-family: var(--font-ui);
}

.session-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.session-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.session-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
  overflow-wrap: anywhere;
}

.session-value-mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.session-pill {
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 12%, var(--panel-soft));
  color: var(--success) !important;
  text-transform: uppercase;
}

.copy-value {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 560;
}

.support-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
  animation: supportIn 220ms ease both;
}

@keyframes supportIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.support-card {
  padding-top: 4px;
}

.support-card button {
  height: 42px;
  padding: 0 16px;
}

.plain-button {
  min-height: 34px;
  padding: 0 12px;
}

.result,
.utility-result {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-soft);
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}

.result.success,
.utility-result.success {
  border-color: color-mix(in srgb, var(--success) 50%, var(--line));
}

.result.error,
.utility-result.error {
  border-color: color-mix(in srgb, var(--error) 55%, var(--line));
  color: var(--error);
}

.result.pending,
.utility-result.pending {
  border-color: color-mix(in srgb, var(--warning) 50%, var(--line));
}

.is-hidden,
.utility-result:empty {
  display: none !important;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  width: 108px;
  color: var(--muted);
  font-weight: 520;
}

.batch-table {
  min-width: 860px;
}

.utility-result {
  overflow-x: auto;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--panel-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.code-block code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: pre;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    height: auto;
    padding: 14px 0;
  }

  .product-nav,
  .top-actions {
    justify-self: stretch;
  }

  .top-actions .icon-button {
    width: 100%;
  }

  .language-switch {
    width: 100%;
    justify-content: space-between;
  }

  .language-trigger {
    min-width: 172px;
  }

  .language-menu {
    width: 100%;
  }

  .product-nav {
    overflow-x: auto;
  }

  .nav-item {
    flex: 1;
    min-width: 100px;
  }

  .workspace {
    padding-top: 24px;
  }

  .product-stage-top,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .stage-actions {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .redeem-card {
    min-height: auto;
  }

  .gpt-plan-tabs {
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
  }

  .gpt-plan-tab {
    border-radius: 14px;
  }

  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar,
  .workspace {
    width: min(100% - 20px, 1120px);
  }

  h1 {
    font-size: 46px;
  }

  .redeem-card,
  .guide-card,
  .support-panel {
    padding: 18px;
  }

  .split-field,
  .inline-row {
    grid-template-columns: 1fr;
  }

  .inline-row {
    display: grid;
  }

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

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

  .session-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .copy-value {
    width: 100%;
  }
}
