/* Load theme.css before this file. All styles are scoped to .ra-theme. */
.ra-theme { color: var(--ra-ink); background: var(--ra-canvas); font-family: var(--ra-font-ui); font-size: 16px; line-height: 1.6; }
.ra-theme, .ra-theme * { box-sizing: border-box; }
.ra-theme :where(button, input, textarea, select) { font: inherit; }
.ra-theme :where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--ra-focus); outline-offset: 4px; }
.ra-theme :where(a) { color: var(--ra-accent); text-underline-offset: 4px; }
.ra-theme ::selection { background: var(--ra-sage); color: var(--ra-ink); }
.ra-theme .ra-shell { max-width: 1280px; padding-inline: clamp(20px, 4vw, 64px); margin-inline: auto; }
.ra-theme .ra-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--ra-divider); padding-block: 12px; }
.ra-theme .ra-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ra-theme .ra-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--ra-muted); text-decoration: none; border-bottom: 2px solid transparent; }
.ra-theme .ra-nav a[aria-current="page"] { color: var(--ra-ink); border-color: var(--ra-accent); }
.ra-theme .ra-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 650; color: var(--ra-ink); text-decoration: none; white-space: nowrap; }
.ra-theme .ra-brand img { width: 36px; height: 36px; border-radius: 8px; }
.ra-theme .ra-header--app { background: var(--ra-dark); color: var(--ra-on-accent); border: 0; padding-inline: clamp(20px, 4vw, 64px); }
.ra-theme .ra-header--app .ra-brand, .ra-theme .ra-header--app .ra-nav a { color: var(--ra-on-accent); }
.ra-theme .ra-header--app .ra-nav a[aria-current="page"] { background: var(--ra-surface); color: var(--ra-accent); border-radius: 8px; border-color: transparent; }
.ra-theme .ra-header--app .ra-credit { background: var(--ra-surface); color: var(--ra-ink); border-radius: 8px; padding: 8px 12px; }
.ra-theme .ra-header--app :focus-visible { outline-color: white; }
.ra-theme .ra-hero { padding-block: clamp(48px, 8vw, 112px); display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 64px; }
.ra-theme .ra-kicker { color: var(--ra-muted); font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.ra-theme .ra-title { font-family: var(--ra-font-display); font-weight: 700; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.08; letter-spacing: -.035em; margin-block: 16px 24px; text-wrap: balance; }
.ra-theme .ra-page-title { font-family: var(--ra-font-display); font-weight: 700; font-size: clamp(30px, 3.5vw, 40px); line-height: 1.18; letter-spacing: -.025em; margin-block: 0 12px; }
.ra-theme .ra-lead { max-width: 48ch; font-size: 20px; color: var(--ra-muted); }
.ra-theme .ra-page-intro { padding-block: 48px 32px; }
.ra-theme .ra-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 20px; border: 1px solid transparent; border-radius: 8px; font-weight: 600; line-height: 1.4; cursor: pointer; text-decoration: none; transition: background 120ms var(--ra-ease), border-color 120ms var(--ra-ease); }
.ra-theme .ra-button--primary { background: var(--ra-accent); color: var(--ra-on-accent); }
.ra-theme .ra-button--primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--ra-accent-hover); }
.ra-theme .ra-button--secondary { background: var(--ra-surface); color: var(--ra-ink); border-color: var(--ra-control-border); }
.ra-theme .ra-button--quiet { background: transparent; color: var(--ra-ink); text-decoration: underline; text-underline-offset: 4px; }
.ra-theme .ra-button--danger { background: var(--ra-danger); color: white; }
.ra-theme .ra-button:disabled, .ra-theme .ra-button[aria-disabled="true"] { background: var(--ra-sage); color: var(--ra-muted); border-color: var(--ra-control-border); cursor: not-allowed; }
.ra-theme .ra-button--icon { min-width: 44px; min-height: 44px; padding: 10px; }
.ra-theme .ra-field { display: grid; gap: 8px; }
.ra-theme .ra-field label { font-size: 14px; font-weight: 600; }
.ra-theme .ra-input { width: 100%; min-height: 48px; padding: 12px 14px; color: var(--ra-ink); background: var(--ra-surface); border: 1px solid var(--ra-control-border); border-radius: 8px; }
.ra-theme .ra-input::placeholder { color: var(--ra-muted); opacity: 1; }
.ra-theme .ra-input[aria-invalid="true"] { border: 2px solid var(--ra-danger); }
.ra-theme .ra-helper { font-size: 14px; color: var(--ra-muted); margin: 0; }
.ra-theme .ra-error { color: var(--ra-danger); font-size: 14px; margin: 0; }
.ra-theme .ra-form { display: grid; gap: 24px; }
.ra-theme .ra-panel { border: 1px solid var(--ra-divider); border-radius: 12px; background: var(--ra-surface); box-shadow: var(--ra-shadow-panel); }
.ra-theme .ra-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 152px minmax(0, 1fr); align-items: stretch; }
.ra-theme .ra-editor { min-width: 0; display: flex; flex-direction: column; padding: 28px 32px; gap: 16px; }
.ra-theme .ra-editor-label { margin: 0; }
.ra-theme .ra-editor-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 44px; }
.ra-theme .ra-editor-meta { display: grid; align-content: center; gap: 1px; font-size: 14px; font-weight: 650; line-height: 1.15; color: var(--ra-ink); min-width: min(100%, max-content); }
.ra-theme .ra-editor-meta-note { font-size: 12px; font-weight: 550; color: var(--ra-muted); }
.ra-theme .ra-editor-actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ra-theme .ra-editor-clear { align-self: flex-start; }
.ra-theme .ra-input--compact { width: auto; min-width: 120px; min-height: 44px; height: 44px; padding: 0 12px; }
.ra-theme .ra-button--icon { width: 44px; min-width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 8px; }
.ra-theme .ra-button--icon img { width: 18px; height: 18px; display: block; }
.ra-theme .ra-source { width: 100%; flex: 1; min-height: 260px; resize: vertical; border: 0; background: transparent; color: var(--ra-ink); font-family: var(--ra-font-indic); font-size: 22px; line-height: 1.7; letter-spacing: normal; padding: 4px 0; }
.ra-theme .ra-source--specimen { font-size: clamp(28px, 3vw, 36px); line-height: 1.75; }
.ra-theme .ra-output { min-height: 260px; margin: 0; padding: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--ra-font-code); font-size: 22px; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; line-height: 1.65; letter-spacing: normal; text-transform: none; user-select: text; }
.ra-theme .ra-output.ra-output--indic { font-family: var(--ra-font-indic); font-variant-ligatures: normal; font-feature-settings: normal; }
.ra-theme .ra-output--specimen { font-size: clamp(28px, 3vw, 36px); }
.ra-theme .ra-encoding { color: var(--ra-accent); background: transparent; font: inherit; }
.ra-theme .ra-bridge { display: flex; flex-direction: column; align-items: center; gap: 20px; min-width: 0; }
.ra-theme .ra-bridge-rule { flex: 1 1 auto; width: 1px; min-height: 20px; background: var(--ra-divider); }
.ra-theme .ra-bridge-inner { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.ra-theme .ra-bridge-button { position: relative; min-width: 104px; min-height: 64px; border-radius: 12px; flex-direction: column; gap: 6px; font-size: 14px; padding-inline: 16px; }
.ra-theme .ra-bridge-mark { width: 22px; height: 22px; display: block; filter: brightness(0) invert(1); transform-origin: center; }
.ra-theme .ra-bridge-mark.is-spinning { animation: ra-mark-spin 0.24s linear infinite; }
@keyframes ra-mark-spin { to { transform: rotate(360deg); } }
.ra-theme .ra-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--ra-divider); font-size: 14px; }
.ra-theme .ra-credit { display: grid; gap: 6px; min-width: 200px; font-size: 14px; }
.ra-theme .ra-credit-value { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 650; }
.ra-theme .ra-credit-icon { flex-shrink: 0; }
.ra-theme .ra-credit progress { display: block; width: 100%; height: 6px; appearance: none; border: 0; border-radius: 4px; background: var(--ra-sage); color: var(--ra-success); accent-color: var(--ra-success); }
.ra-theme .ra-credit progress::-webkit-progress-bar { border-radius: 4px; background: var(--ra-sage); }
.ra-theme .ra-credit progress::-webkit-progress-value { border-radius: 4px; background: var(--ra-success); }
.ra-theme .ra-credit progress::-moz-progress-bar { border-radius: 4px; background: var(--ra-success); }
.ra-theme .ra-ledger { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--ra-divider); font-variant-numeric: tabular-nums; }
.ra-theme .ra-badge { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; background: var(--ra-sage); color: var(--ra-ink); }
.ra-theme .ra-notice { padding: 16px 20px; border-inline-start: 3px solid var(--ra-success); background: var(--ra-success-soft); color: var(--ra-success); border-radius: 0 8px 8px 0; font-size: 14px; }
.ra-theme .ra-notice--warning { color: var(--ra-warning); background: var(--ra-warning-soft); border-color: var(--ra-warning); }
.ra-theme .ra-notice--danger { color: var(--ra-danger); background: var(--ra-danger-soft); border-color: var(--ra-danger); }
.ra-theme .ra-admin { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: start; }
.ra-theme .ra-table-scroll { overflow-x: auto; border-block: 1px solid var(--ra-divider); }
.ra-theme .ra-table { width: 100%; border-collapse: collapse; text-align: start; font-size: 14px; }
.ra-theme .ra-table :where(th, td) { padding: 16px 12px; border-bottom: 1px solid var(--ra-divider); vertical-align: middle; }
.ra-theme .ra-table th { color: var(--ra-muted); font-weight: 550; }
.ra-theme .ra-table tr[data-selected="true"] { background: var(--ra-sage); }
.ra-theme .ra-table button { min-height: 44px; }
.ra-theme .ra-drawer { padding: 28px; border: 1px solid var(--ra-divider); border-radius: 12px; background: var(--ra-surface); display: grid; gap: 24px; }
.ra-theme .ra-tabs { display: flex; border-bottom: 1px solid var(--ra-divider); gap: 16px; }
.ra-theme .ra-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; min-height: 44px; color: var(--ra-muted); padding: 8px 4px; }
.ra-theme .ra-tabs button[aria-selected="true"] { color: var(--ra-ink); border-color: var(--ra-accent); }
.ra-theme .ra-auth { max-width: 440px; padding-block: 48px; margin-inline: auto; }
.ra-theme .ra-code { font-family: var(--ra-font-code); font-variant-ligatures: none; overflow-wrap: anywhere; text-transform: none; }
.ra-theme .ra-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1119px) {
  .ra-theme .ra-admin { grid-template-columns: minmax(0, 1fr); }
  .ra-theme .ra-hero { gap: 32px; }
  .ra-theme .ra-editor { padding: 24px; }
}
@media (max-width: 767px) {
  .ra-theme .ra-hero, .ra-theme .ra-workspace { grid-template-columns: minmax(0, 1fr); }
  .ra-theme .ra-page-intro { padding-block: 32px 24px; }
  .ra-theme .ra-title { font-size: 42px; }
  .ra-theme .ra-editor { padding: 20px; }
  .ra-theme .ra-source, .ra-theme .ra-output { min-height: 180px; }
  .ra-theme .ra-drawer { padding: 20px; }
  .ra-theme .ra-credit { min-width: 128px; }
  .ra-theme .ra-auth { padding-block: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .ra-theme *, .ra-theme *::before, .ra-theme *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .ra-theme .ra-button, .ra-theme .ra-panel, .ra-theme .ra-notice { border: 1px solid ButtonText; }
}
