:root {
  --bg: #0a0d14;
  --surface: #11151f;
  --surface-2: #171c28;
  --surface-3: #1e2432;
  --border: #262d3d;
  --text: #f4f7fb;
  --text-secondary: #a3adc2;
  --muted: #6a7590;
  --accent: #4f7cff;
  --code: #3fd0d8;
  --success: #35c473;
  --warning: #f5b044;
  --danger: #f0544a;
  --font-display: "Geist", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

#app {
  min-height: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("grain.png");
  background-repeat: repeat;
  background-size: 128px 128px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.page.app-shell {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.marketing-topbar,
.app-topbar,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 48px;
  border-bottom: 1px solid var(--border);
}

.app-topbar {
  flex-shrink: 0;
  padding: 14px 24px;
  background: var(--surface);
}

.marketing-topbar {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg);
}

.marketing-menu {
  display: none;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
}

.brand-sm {
  font-size: 13px;
}

.topbar-actions,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
}

.nav-link:hover {
  color: var(--text);
}

.email-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-chip:hover {
  color: var(--text);
}

.account-menu {
  position: relative;
}

.account-menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
}

.account-menu[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  min-width: 176px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.account-menu-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.account-menu-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 8px;
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: #1b2740;
  color: var(--accent);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.code-block {
  margin: 16px 0;
  width: min(680px, 100%);
  background: #0c1017;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
  min-height: 38px;
  user-select: none;
}

.code-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.code-tab {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.code-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.code-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.code-block-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.code-copy-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.code-copy-btn .copy-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.code-copy-btn .check-icon {
  display: none;
  width: 14px;
  height: 14px;
  stroke: #10b981;
}

.code-copy-btn.copy-ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.code-copy-btn.copy-ok .copy-icon {
  display: none;
}

.code-copy-btn.copy-ok .check-icon {
  display: inline-block;
}

.code-tab-content {
  display: block;
}

.code-tab-content[hidden] {
  display: none !important;
}

.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
  background: transparent;
  border: none;
  border-radius: 0;
  white-space: pre;
}

.code-block pre code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  background: transparent;
  padding: 0;
  border: none;
  color: inherit;
}

/* Syntax highlighting tokens */
.hl-cmd {
  color: #38bdf8;
  font-weight: 600;
}

.hl-flag {
  color: #c084fc;
}

.hl-var {
  color: #f472b6;
  font-weight: 500;
}

.hl-str {
  color: #34d399;
}

.hl-url {
  color: #67e8f9;
}

.hl-key {
  color: #7dd3fc;
}

.hl-num {
  color: #fbbf24;
}

.hl-kw {
  color: #f87171;
  font-weight: 600;
}

.hl-punct {
  color: #94a3b8;
}

.hl-comment {
  color: #64748b;
  font-style: italic;
}

.marketing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chrome-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.landing {
  flex: 1;
  width: min(920px, calc(100% - 96px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.landing-static {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  line-height: 1.5;
}

.landing-static h1 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  margin: 0;
}

.landing-static h2 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 12px 0 0;
}

.landing-static p,
.landing-static li {
  color: var(--text-secondary);
}

.landing-static a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-static code {
  font-family: var(--font-mono);
  color: var(--code);
  font-size: 13px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  padding: 18vh 0 16vh;
}

.landing-motion .hero > * {
  animation: landing-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-motion .hero > *:nth-child(1) { animation-delay: 0.04s; }
.landing-motion .hero > *:nth-child(2) { animation-delay: 0.12s; }
.landing-motion .hero > *:nth-child(3) { animation-delay: 0.22s; }
.landing-motion .hero > *:nth-child(4) { animation-delay: 0.32s; }
.landing-motion .hero > *:nth-child(5) { animation-delay: 0.42s; }
.landing-motion .hero > *:nth-child(6) { animation-delay: 0.52s; }
.landing-motion .hero > *:nth-child(7) { animation-delay: 0.64s; }

@keyframes landing-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.22em;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.hero-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 28em;
  line-height: 1.55;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero .btn-cta {
  animation:
    landing-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both,
    cta-guide 5.5s ease-in-out 1.8s infinite;
}

@keyframes cta-guide {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 124, 255, 0);
  }
  40% {
    box-shadow: 0 0 0 7px rgba(79, 124, 255, 0.16);
  }
}

.hero .btn-primary {
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hero .btn-primary:hover {
  transform: translateY(-1px);
}

.hero .btn-ghost {
  border: none;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  position: relative;
}

.hero .btn-ghost::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.hero .btn-ghost:hover::after {
  transform: scaleX(1);
}

.hero-aside {
  margin: -12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero .code-block {
  width: 100%;
  max-width: none;
  margin-top: 24px;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.6s ease;
}

.landing-motion .hero .code-block {
  animation:
    landing-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both,
    code-wake 1.4s ease 1.1s both;
}

@keyframes code-wake {
  from {
    border-left-color: var(--border);
  }
  to {
    border-left-color: var(--accent);
  }
}

.hero-stat {
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-stat-value {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 400;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-stat-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.facts-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  padding: 0 0 14vh;
}

.fact {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.fact-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.fact-body {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.landing-section {
  padding: 14vh 0;
  border-top: 1px solid var(--border);
}

.landing-title {
  margin: 0 0 64px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-lead {
  margin: -40px 0 56px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.landing-more {
  margin: 48px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.landing-more .link,
.api-section .link,
.landing-quiet-link,
.support-section a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.landing-more .link:hover,
.api-section .link:hover,
.landing-quiet-link:hover,
.support-section a:hover {
  border-bottom-color: var(--text);
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.how-step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 32px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.how-step:first-child {
  border-top: none;
  padding-top: 0;
}

.landing-nudge {
  margin: 56px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.landing-nudge .link {
  color: var(--text);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.landing-nudge .link:hover {
  color: var(--accent);
}

.how-n {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding-top: 6px;
  transition: color 0.25s ease;
}

.how-step:hover .how-n {
  color: var(--accent);
}

.how-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.how-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 36em;
}

.api-dl {
  margin: 0;
}

.api-row {
  display: grid;
  grid-template-columns: minmax(200px, 0.46fr) minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.api-row:first-child {
  border-top: none;
  padding-top: 0;
}

.api-row dt {
  margin: 0;
  color: var(--code);
  font-size: 13px;
  word-break: break-word;
}

.api-row dd {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.philosophy-grid {
  display: flex;
  flex-direction: column;
}

.philosophy-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  align-items: baseline;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.philosophy-card:first-child {
  border-top: none;
  padding-top: 0;
}

.philosophy-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.philosophy-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
  max-width: 34em;
}

.support-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 14vh 0 18vh;
  border-top: 1px solid var(--border);
}

.support-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
}

.support-section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.support-section p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
}

.landing-quiet-link {
  margin-top: 8px;
  font-size: 14px;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 48px;
  color: var(--muted);
  font-size: 13px;
}

.auth-shell,
.onboard-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 24px;
}

.auth-card,
.onboard-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.onboard-card {
  width: min(640px, 100%);
  padding: 36px;
  gap: 24px;
}

.auth-card h1,
.onboard-card h1,
.onboard-card h2,
.panel h1,
.legal h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

.auth-card h1 {
  font-size: 28px;
}

.onboard-card h1 {
  font-size: 24px;
}

.muted {
  color: var(--text-secondary);
}

.tiny {
  font-size: 12px;
}

.mono {
  font-family: var(--font-mono);
}

.code {
  color: var(--code);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.field input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
}

.field input:disabled {
  color: var(--text-secondary);
  opacity: 1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-terms-copy {
  flex: 1;
  min-width: 0;
}

.auth-terms a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-terms input {
  margin-top: 2px;
  flex-shrink: 0;
}

.pw-meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -8px;
}

.pw-meter-bars {
  display: flex;
  gap: 4px;
}

.pw-meter-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}

.pw-meter-1 .pw-meter-bar.is-on {
  background: var(--danger);
}

.pw-meter-2 .pw-meter-bar.is-on {
  background: var(--warning);
}

.pw-meter-3 .pw-meter-bar.is-on {
  background: #8fd14f;
}

.pw-meter-4 .pw-meter-bar.is-on {
  background: var(--success);
}

.pw-meter-label,
.pw-mismatch {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.pw-mismatch {
  margin-top: -8px;
  color: var(--danger);
}

.auth-divider {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.link {
  color: var(--accent);
  font-size: 13px;
}

.form-status {
  margin: 0;
  color: var(--warning);
  font-size: 13px;
}

.form-status-ok {
  color: var(--success);
}

.callout {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.callout-warn {
  background: #2a2418;
  border: 1px solid var(--warning);
  color: var(--warning);
}

.callout-error {
  background: #2a1414;
  border: 1px solid var(--danger);
  color: #ff9b9b;
}

.callout-info {
  background: #0f1c2e;
  border: 1px solid var(--accent);
  color: #8bb7f0;
}

.callout-ok {
  background: #122818;
  border: 1px solid var(--success);
  color: var(--success);
  font-family: var(--font-mono);
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  max-width: 100%;
}

.key-secret-display {
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.key-row .copy-secret-btn {
  flex-shrink: 0;
  align-self: flex-start;
}

.key-row-pending {
  justify-content: flex-start;
}

.key-value {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.btn.copy-ok {
  color: var(--success);
}

.btn.copy-fail {
  color: var(--warning);
}

.snippet-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}

.snippet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
}

.snippet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.snippet-tab {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.snippet-tab.is-active {
  background: #1b2740;
  color: var(--accent);
  border-color: #2c3d66;
}

.snippet-block .code-block {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.step-pills {
  display: flex;
  gap: 8px;
}

.step-pill {
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
}

.step-pill.is-done {
  background: var(--accent);
}

.onboard-wide {
  width: min(720px, 100%);
}

.credit-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.credit-amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
}

.credit-subline {
  font-size: 15px;
  color: var(--text-secondary);
}

.onboard-checklist {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.onboard-checklist li {
  margin: 6px 0;
}

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

.dict-onboard-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dict-onboard-card h2 {
  margin: 0;
  font-size: 14px;
}

.onboard-preview h2 {
  margin: 0;
  font-size: 15px;
}

.wallet-chip {
  margin-top: 8px;
  color: var(--success);
  font-size: 14px;
}

.generate-json {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-shell {
  flex-direction: row;
  height: 100%;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  align-self: stretch;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: block;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.sidebar-link.is-active {
  background: #1b2740;
  color: var(--accent);
  font-weight: 600;
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-content {
  flex: 1;
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.menu-toggle,
.sidebar-backdrop {
  display: none;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.menu-toggle-bars {
  position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-bars::before {
  top: -5px;
}

.menu-toggle-bars::after {
  top: 5px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel.narrow {
  max-width: 560px;
}

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

.panel h1 {
  font-size: 20px;
}

.key-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.key-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.key-name {
  font-weight: 600;
}

.danger-text {
  color: var(--danger);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card h2,
.h-sm {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.usage-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.usage-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usage-count {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}

.usage-balance-pending {
  display: inline-flex;
  align-items: center;
  min-height: 1.15em;
}

.spinner {
  width: 1.15em;
  height: 1.15em;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    opacity: 0.65;
  }

  .landing-motion .hero > *,
  .landing-motion .hero .code-block,
  .hero .btn-cta {
    animation: none;
    opacity: 1;
    transform: none;
    box-shadow: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.progress-track {
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--warning);
  border-radius: 999px;
}

.usage-two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.usage-row {
  display: flex;
  justify-content: space-between;
}

.ok {
  color: var(--success);
  white-space: pre-line;
  font-size: 11px;
  margin: 0;
}

.upgrade-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
}

.refill-card h2 {
  margin: 0 0 4px;
}

.refill-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.refill-amount {
  flex: 1;
  min-width: 180px;
  margin: 0;
}

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

.refill-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-family: var(--font-mono);
  pointer-events: none;
}

.refill-input-wrap input {
  width: 100%;
  padding-left: 28px;
}

.usage-history-card h2 {
  margin: 0 0 4px;
}

.usage-history-pending {
  display: flex;
  align-items: center;
  min-height: 2.5em;
}

.usage-txn-wrap {
  overflow: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.usage-txn {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.usage-txn th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.usage-txn td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.usage-txn tbody tr:last-child td {
  border-bottom: 0;
}

.usage-txn .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.usage-txn-status-paid {
  color: var(--success);
}

.admin-user-row {
  cursor: pointer;
}

.admin-user-row:hover td {
  background: var(--surface-2);
}

.admin-user-row.is-selected td {
  background: var(--surface-3);
}

.usage-pill {
  background: #1b2740;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.usage-pill.warn {
  color: var(--warning);
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  width: 100%;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 24px;
}

.docs-nav-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 8px 0 4px;
}

.docs-nav-sub {
  margin-top: 16px;
}

.docs-nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
}

.docs-nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.docs-nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
}

.docs-content {
  min-width: 0;
}

.docs-welcome-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid #2c3d66;
  background: #141c2e;
}

.docs-welcome-banner-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-welcome-banner-body p {
  margin: 0;
}

.docs-welcome-dismiss {
  flex-shrink: 0;
}

.docs-list,
.docs-steps {
  margin: 0;
  padding-left: 1.25rem;
}

.docs-list li + li,
.docs-steps li + li {
  margin-top: 8px;
}

.docs-philosophy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-philosophy h3 {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.docs-philosophy h3:first-child {
  margin-top: 0;
}

.docs-section-title {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.docs-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.docs-api-page .docs-lead {
  max-width: none;
}

.docs-endpoint-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.docs-endpoint-path {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.docs-spec-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-spec-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.docs-kind-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}

.docs-kind-block h3 {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.docs-kind-block:first-child h3 {
  margin-top: 0;
}

.docs-spec-intro {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 72ch;
}

.docs-spec-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.docs-spec-row {
  display: grid;
  grid-template-columns: minmax(200px, 34%) 1fr;
  gap: 24px;
  padding: 14px 18px;
  align-items: start;
  border-top: 1px solid var(--border);
}

.docs-spec-row:first-child {
  border-top: none;
}

.docs-spec-name {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

.docs-spec-desc {
  font-size: 14px;
  line-height: 1.55;
}

.docs-spec-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.docs-examples {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-example-label {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.docs-example-label:first-child {
  margin-top: 0;
}

.docs-page h1.mono {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.docs-lead {
  max-width: 68ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.method-pill {
  align-self: flex-start;
  background: var(--success);
  color: var(--bg);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.param-row {
  display: grid;
  grid-template-columns: minmax(200px, 34%) 1fr;
  gap: 24px;
  padding: 6px 0;
}

.legal {
  max-width: 720px;
  padding: 80px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal ul {
  margin: 0 0 8px;
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: 6px;
}

.legal-subsection {
  margin-top: 12px;
}

.legal-subsection h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--surface-2);
  font-weight: 600;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.danger-zone {
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-zone h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--danger);
}

.danger-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.callout-danger {
  background: #2a1414;
  border: 1px solid var(--danger);
  color: var(--text);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
}

.btn-link:hover {
  color: var(--text);
}

.docs-public {
  padding: 48px clamp(24px, 5vw, 80px);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .docs-nav-heading {
    width: 100%;
  }

  .docs-public {
    padding: 32px 24px;
  }

  .docs-spec-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 900px) {
  .landing {
    width: calc(100% - 48px);
  }

  .hero {
    padding: 12vh 0 10vh;
    gap: 28px;
  }

  .hero-title {
    max-width: none;
  }

  .facts-strip {
    gap: 28px 40px;
    padding-bottom: 10vh;
  }

  .landing-section {
    padding: 10vh 0;
  }

  .how-step,
  .philosophy-card,
  .api-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .how-n {
    padding-top: 0;
  }

  .support-section {
    padding: 10vh 0 12vh;
  }

  .marketing-topbar,
  .page-footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .marketing-nav-inline {
    display: none !important;
  }

  .marketing-menu {
    display: block;
  }

  .marketing-menu[open] .marketing-nav-drawer {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 21;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .marketing-menu[open] .topbar-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  .marketing-menu[open] .topbar-actions .nav-link,
  .marketing-menu[open] .topbar-actions .btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .marketing-menu[open] .account-menu {
    width: 100%;
  }

  .marketing-menu[open] .account-menu-toggle {
    max-width: none;
    width: 100%;
    padding: 12px 14px;
  }

  .app-shell {
    flex-direction: row;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
    width: min(280px, 86vw);
    border-right: 1px solid var(--border);
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(6, 8, 14, 0.55);
    cursor: pointer;
  }

  .usage-two-col {
    grid-template-columns: 1fr;
  }

  .upgrade-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dict-onboard-grid {
    grid-template-columns: 1fr;
  }
}

.dict-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1280px;
}

.dict-lead {
  margin: 6px 0 0;
  max-width: 62ch;
}

.dict-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dict-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.dict-tab.is-active {
  background: #1b2740;
  color: var(--accent);
  border-color: #2c3d66;
}

.dict-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.dict-tab.is-active .dict-tab-count {
  color: var(--code);
}

.dict-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}

.dict-list-pane,
.dict-edit-pane {
  min-width: 0;
}

.dict-search {
  width: 100%;
  margin-bottom: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
}

.dict-entry-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 280px);
  min-height: 320px;
  overflow-y: auto;
}

.dict-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: inherit;
}

.dict-entry:hover {
  background: #1b2740;
}

.dict-entry.is-active {
  background: #1b2740;
  border-color: #2c3d66;
}

.dict-entry-name {
  font-weight: 600;
  font-size: 14px;
}

.dict-entry-summary {
  color: var(--muted);
  font-size: 12px;
}

.dict-editor,
.dict-empty {
  min-height: 280px;
}

.dict-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dict-sub {
  margin: 4px 0 0;
}

.dict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dict-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.dict-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dict-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.dict-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dict-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dict-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.dict-chip.is-active {
  background: #1b2740;
  color: var(--accent);
  border-color: #2c3d66;
}

.dict-tuple-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dict-col-name {
  width: 140px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

.dict-table-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dict-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dict-row-filter {
  flex: 1;
  min-width: 160px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
}

.dict-table-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dict-paste {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.dict-paste-input {
  width: 100%;
  min-height: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.dict-grid-wrap {
  overflow: auto;
  max-height: min(52vh, 480px);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.dict-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dict-grid th {
  position: sticky;
  top: 0;
  background: var(--surface);
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dict-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  letter-spacing: inherit;
  cursor: pointer;
}

.dict-sort:hover {
  color: var(--text);
}

.dict-sort::after {
  content: "↕";
  font-size: 10px;
  opacity: 0.35;
}

.dict-grid th[aria-sort="ascending"] .dict-sort::after {
  content: "↑";
  opacity: 1;
  color: var(--accent);
}

.dict-grid th[aria-sort="descending"] .dict-sort::after {
  content: "↓";
  opacity: 1;
  color: var(--accent);
}

.dict-grid td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dict-grid th.dict-check,
.dict-grid td.dict-check {
  width: 36px;
  text-align: center;
  padding-left: 10px;
  padding-right: 4px;
}

.dict-grid input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
}

.dict-grid input,
.dict-grid select {
  width: 100%;
  min-width: 72px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
}

.dict-card-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.dict-row-actions {
  width: 1%;
  white-space: nowrap;
}

.dict-icon-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
}

.dict-icon-btn:hover {
  color: var(--danger);
}

.dict-template-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dict-template-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dict-template-row input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.dict-source {
  width: 100%;
  min-height: 180px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.dict-advanced {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
}

.dict-advanced summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.dict-advanced[open] summary {
  margin-bottom: 8px;
}

.dict-json {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--code);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.dict-sample {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dict-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dict-preview-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dict-rows {
  max-height: 140px;
  overflow: auto;
  color: var(--text-secondary);
}

.dict-status-ok {
  color: var(--success);
  margin: 0;
}

.dict-status-err {
  color: var(--danger);
  margin: 0;
  white-space: pre-wrap;
  max-width: 56rem;
}

@media (max-width: 900px) {
  .dict-layout {
    grid-template-columns: 1fr;
  }

  .dict-editor-head {
    flex-direction: column;
  }

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