: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: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

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

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.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 {
  padding: 14px 24px;
  background: var(--surface);
}

.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);
}

.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: 0;
  width: min(640px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  color: var(--code);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

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

.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 80px 120px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  max-width: 720px;
}

.hero-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 20px;
  max-width: 560px;
  line-height: 1.45;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.support-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 120px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

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

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

.support-section p {
  margin: 0;
}

.support-section a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-section a:not(.btn):hover {
  color: var(--text);
}

.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-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-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;
}

.meta-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.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;
}

.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-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
}

.generate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.generate-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

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

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

.sidebar {
  width: 240px;
  flex-shrink: 0;
  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;
  display: flex;
  flex-direction: column;
}

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

.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;
  }
}

.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);
}

.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-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
}

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

.docs-lead {
  max-width: 720px;
  margin: 0;
  font-size: 15px;
}

.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: flex;
  justify-content: space-between;
  gap: 16px;
  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;
}

.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 120px;
  max-width: 960px;
}

@media (max-width: 900px) {
  .docs-public {
    padding: 32px 24px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 48px 24px;
  }

  .support-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

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

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

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

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

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

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

  .generate-params {
    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: min(70vh, 720px);
  overflow: 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-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;
  }
}
