:root { color-scheme: light; --paper: #fff; --ink: #000; --keycap: #eee; --muted: #777; --line: 20px; --dot: 2px; --stroke: 2px; }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; --paper: #000; --ink: #fff; --keycap: #111; --muted: #888; } }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--paper); color: var(--ink); }
body, button, input, textarea, select, kbd { font: 400 12px/var(--line) sans-serif; }
body { overflow: hidden; }
[hidden] { display: none !important; }
button, input, textarea, select, a, dialog { color: var(--ink); background: var(--paper); border: 0; border-radius: 0; padding: 0; margin: 0; text-decoration: none; box-shadow: none; }
button, a { cursor: pointer; }
button:hover, a:hover { color: var(--ink); }
button:focus-visible, a:focus-visible { outline: none; }
input:focus, textarea:focus, #viewport:focus { outline: none; }
::selection { color: var(--ink); background: transparent; }
p { margin: 0 0 var(--line); }
#app { width: min(600px, calc(100% - 96px)); margin: auto; height: 100%; position: relative; }
#home { height: 100%; display: flex; flex-direction: column; text-align: center; }
.home-content { flex: 1; min-height: 0; overflow-y: auto; padding: 60px 0 20px; scrollbar-width: none; }
.introduction { margin: 0 0 60px; text-wrap: balance; }
#shortcuts { text-wrap: balance; line-height: var(--line); }
.command-name { position: relative; width: 12px; height: var(--line); margin: 0 3px; font-style: normal; vertical-align: top; }
.command-name[aria-expanded="true"]::after { content: ''; position: absolute; width: var(--dot); height: var(--dot); background: var(--ink); border-radius: 50%; left: calc((100% - var(--dot)) / 2); bottom: calc(100% + 6px); }
#setting-details { padding-top: 60px; }
.bindings { display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
#bindings { max-width: 100%; overflow-x: auto; min-height: var(--line); justify-content: safe center; }
.bindings > * { flex-shrink: 0; }
.binding { display: inline-flex; align-items: center; height: var(--line); }
/* Keep every setting row on the editor's 20px line grid. */
[data-slot="kbd"], .keycap { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; height: 18px; min-width: 18px; padding: 0 4px; margin: 1px 0; border-radius: 3px; background: var(--keycap); color: var(--muted); white-space: nowrap; flex-shrink: 0; }
[data-slot="kbd"] { pointer-events: none; user-select: none; }
.keycap:hover { background: var(--keycap); color: var(--muted); }
#setting-info { margin: 60px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: balance; }
#visit-setting { margin-top: 60px; }
#visit-urls { display: block; width: 100%; text-align: center; }
#voice-subscription { text-decoration: underline; }
#editor { height: 100%; }
#viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
#lines { position: absolute; left: 0; right: 0; }
.text-line { position: relative; min-height: var(--line); line-height: var(--line); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.text-line.code, .text-line.code textarea { font-family: monospace; }
.text-line.current-line::before { content: ''; position: absolute; left: calc(-6px - var(--dot)); top: calc(var(--current-offset, 0px) + (var(--line) - var(--dot)) / 2); width: var(--dot); height: var(--dot); background: var(--ink); border-radius: 50%; }
#editor.voice-active .text-line.current-line::before { width: 7px; height: 7px; left: -10.5px; top: calc(var(--current-offset, 0px) + (var(--line) - 7px) / 2); }
.text-line.current-line.line-selected::before { display: none; }
.text-line.line-selected::after { content: ''; position: absolute; left: calc(-6px - (var(--dot) + var(--stroke)) / 2); top: 0; bottom: 0; width: var(--stroke); background: var(--ink); }
.text-line mark { background: transparent; color: var(--ink); text-decoration: underline; text-decoration-thickness: var(--stroke); text-underline-offset: 4px; text-decoration-skip-ink: none; }
.text-line.input-line > .line-text { color: transparent; }
.line-input { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; line-height: var(--line); caret-color: var(--ink); }
.input-selection { position: absolute; inset: 0; pointer-events: none; color: transparent; white-space: pre-wrap; overflow-wrap: anywhere; }
.input-selection mark { color: transparent; text-decoration-color: var(--ink); }
#cursor { position: absolute; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--ink); pointer-events: none; }
#ancestors { overflow: hidden; }
#ancestors:not(:empty) { margin-bottom: var(--line); }
.ancestor-title { height: var(--line); white-space: nowrap; overflow: hidden; }
#search-form { position: absolute; left: 0; right: 0; height: var(--line); display: flex; z-index: 2; }
#query { flex: 1; min-width: 0; }
#subscription { padding: 60px 0; height: 100%; overflow: auto; }
#subscription > a, #plan-actions > button { display: block; margin: var(--line) 0; }
.plan-row { line-height: var(--line); }
#unsupported { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
dialog { max-width: min(600px, calc(100% - 48px)); margin: auto; padding: 20px; }
dialog button { display: block; margin-top: var(--line); }
dialog::backdrop { background: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) { #app { width: calc(100% - 48px); } #unsupported { white-space: normal; width: calc(100% - 48px); text-align: center; } }

.shortcut-tooltip { position: fixed; transform: translate(-50%, -100%); padding: 0 6px; background: var(--paper); color: var(--ink); white-space: nowrap; pointer-events: none; z-index: 10; }
#setting-info.multiline { text-align: justify; text-align-last: justify; }
