:root { color-scheme: dark; --bg: #0e0e14; --fg: #f4f1ea; --muted: #b8b3c8; --border: #302b42; --accent: #b5a3f5; --sage: #a7d7b1; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 system-ui, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--sage); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sage); outline-offset: 5px; }
.masthead, main, footer { max-width: 1400px; margin: auto; padding-inline: 28px; }
.masthead { min-height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.brand > span:first-child { font-size: 34px; color: var(--sage); }
.divider { color: #6a627b; margin-inline: 8px; }
.masthead nav { display: flex; gap: 28px; color: var(--muted); }
.intro { padding: 24px 0 22px; }
.intro .eyebrow { margin-bottom: 8px; }
.eyebrow { color: var(--sage); font: 11px/1.5 ui-monospace, monospace; letter-spacing: .16em; margin: 0 0 14px; }
h1 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -.04em; margin: 0 0 10px; }
h1 span { color: var(--accent); }
.intro > p:last-child { color: var(--muted); margin: 0; }
.workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
aside { padding-top: 4px; }
.demo-nav { display: grid; gap: 8px; }
.demo-nav a { display: flex; align-items: center; gap: 12px; padding: 15px 12px; border: 1px solid var(--border); border-radius: 8px; }
.demo-nav a[aria-current] { background: #28213f; border-color: #8270bd; }
.demo-nav a > span:last-child { margin-left: auto; color: var(--accent); }
.demo-icon { font-size: 24px; color: var(--accent); }
.demo-nav strong { display: block; font-size: 14px; }
.demo-nav small { color: var(--muted); font-size: 11px; }
h2 { font-size: 16px; margin: 0; }
.instructions { margin-top: 28px; }
.instructions p { color: var(--muted); font-size: 13px; }
dl { margin: 20px 0; font-size: 12px; }
dl > div { display: flex; align-items: center; margin: 10px 0; gap: 12px; }
dt { min-width: 62px; } dd { margin: 0; color: var(--muted); }
kbd { font: 11px/1.5 ui-monospace, monospace; border: 1px solid #494153; border-radius: 4px; padding: 2px 5px; white-space: nowrap; }
.source-link { display: inline-block; color: var(--accent); font-size: 13px; margin-top: 12px; }
.demo-panel { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #1e1e1e; }
.toolbar { background: #191720; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; gap: 12px; border-bottom: 1px solid var(--border); }
.toolbar > div { display: flex; align-items: center; gap: 10px; }
.toolbar h2 { font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
button { color: var(--fg); border: 1px solid #4b425e; background: transparent; border-radius: 5px; padding: 7px 10px; font: inherit; font-size: 12px; cursor: pointer; }
button:hover { background: #30283f; }
.terminal-scroll { overflow-x: auto; }
#terminal { height: 460px; min-width: 640px; padding: 12px; }
.statusbar { display: flex; justify-content: space-between; gap: 16px; background: #191720; padding: 10px 18px; border-top: 1px solid var(--border); font: 11px/1.6 ui-monospace, monospace; color: var(--muted); }
.statusbar p { margin: 0; }
.statusbar > span { white-space: nowrap; }
.error, #status[data-state="error"] { color: #ffb4a7; }
.install { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); margin-top: 40px; padding-block: 30px; }
.install p { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.install code { max-width: 100%; border: 1px solid var(--border); padding: 12px 18px; color: var(--sage); border-radius: 6px; overflow-x: auto; font-size: 13px; }
footer { border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; padding-block: 22px; font-size: 11px; color: var(--muted); }
@media (max-width: 1000px) { .masthead, main, footer { padding-inline: 24px; } .workspace { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; } }
@media (max-width: 760px) { .masthead { min-height: 64px; } .brand { font-size: 13px; gap: 7px; } .divider { margin-inline: 0; } .masthead nav { gap: 14px; font-size: 12px; } .workspace { grid-template-columns: 1fr; } .demo-nav { grid-template-columns: 1fr 1fr; } .instructions { margin-top: 18px; } dl { display: flex; flex-wrap: wrap; gap: 0 20px; margin-block: 10px; } .source-link { margin: 0 0 8px; } .install, footer { flex-direction: column; align-items: flex-start; } .statusbar { flex-wrap: wrap; } .intro { padding-top: 20px; } }
@media (max-width: 420px) { .masthead, main, footer { padding-inline: 16px; } .brand > span:first-child { display: none; } .demo-nav a { padding: 12px 8px; gap: 8px; } .demo-nav a > span:last-child { display: none; } }

#controls { padding: 12px 18px; background: #191720; border-bottom: 1px solid var(--border); }
.booba-action { font-size: 12px; }
.booba-action--keyboard { margin-inline-start: auto; }
button:disabled { opacity: .4; cursor: default; }

select { color: var(--fg); background: #28213f; border: 1px solid #8270bd; border-radius: 5px; padding: 9px 12px; font: inherit; }
select:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
select:disabled { opacity: .5; }

/* Conversion pages use native form controls, independent of the terminal demos. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#converter { background: #191720; padding: 22px; }
#converter fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.converter-settings { display: flex; flex-wrap: wrap; align-items: end; gap: 18px; }
.converter-settings > div { display: grid; gap: 6px; }
.converter-settings label, .text-panel label { font-size: 13px; font-weight: 600; }
#custom-delimiters { grid-template-columns: auto minmax(36px, 90px) auto minmax(36px, 90px); align-items: center; }
.converter-settings input { min-width: 0; width: 100%; padding: 10px; color: var(--fg); background: #28213f; border: 1px solid #8270bd; border-radius: 5px; font: inherit; }
.converter-hint, .converter-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.converter-hint { margin: 18px 0; }
.converter-note { margin: 16px 0 0; }
.text-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.text-panel-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.text-panel-heading > div { display: flex; gap: 6px; }
.text-panel textarea { display: block; width: 100%; min-height: 300px; resize: vertical; padding: 16px; border: 1px solid #494153; border-radius: 8px; background: #101017; color: var(--fg); font: 16px/1.8 system-ui, sans-serif; }
#result-text { background: #17201c; border-color: #3f5b49; }
textarea:focus-visible, input:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
@media (max-width: 1100px) { .text-panels { grid-template-columns: 1fr; } .text-panel textarea { min-height: 200px; } }
@media (max-width: 420px) { #converter { padding: 14px; } #custom-delimiters { grid-template-columns: auto minmax(36px, 1fr); } }

.font-lab { padding: 24px; background: #191720; }
.font-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.font-heading .eyebrow { margin-bottom: 6px; }
.font-heading h2 { font-size: 22px; }
.font-settings { display: flex; flex-wrap: wrap; gap: 14px; }
.font-settings label { display: grid; gap: 6px; font-size: 12px; }
.font-settings select { font-size: 13px; max-width: 100%; }
.font-intro { color: var(--muted); font-size: 13px; margin: 18px 0; }
.emoji-specimens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.emoji-specimens button { display: grid; justify-items: center; align-content: start; gap: 10px; padding: 16px 8px; min-width: 0; background: #101017; }
.emoji-specimens button[aria-pressed="true"] { border-color: var(--sage); background: #17201c; }
.specimen-emoji, .specimen-glyph { font-family: var(--demo-emoji-font, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif); font-weight: 400; font-style: normal; }
.specimen-emoji { font-size: 32px; line-height: 1.5; }
.specimen-caption { font-size: 11px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.specimen-details { display: flex; align-items: center; gap: 22px; margin-top: 18px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; min-height: 108px; }
.specimen-glyph { font-size: 48px; line-height: 1.4; }
.specimen-details > div { min-width: 0; }
.specimen-details h3 { font-size: 16px; font-weight: 500; margin: 0 0 6px; }
.specimen-details code { font-size: 11px; color: var(--sage); overflow-wrap: anywhere; }
.font-note { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.font-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 420px) { .font-lab { padding: 16px; } .font-settings, .font-settings label { width: 100%; } .emoji-specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); } .specimen-details { gap: 14px; padding: 12px; } }
