/* Logos. A quiet page: one thing to think about at a time, large type for the word,
   colour only where it carries meaning (right, nearly, wrong; the four grades). */
:root {
  color-scheme: light;
  --bg: #F4F1EA; --surface: #FFFFFF; --sunk: #EAE6DC; --line: #DCD6C8;
  --fg: #1E1F23; --muted: #6A6658; --accent: #2F5D8A; --accent-ink: #FFFFFF; --accent-soft: #DCE6F0;
  --good: #2E7D4F; --good-soft: #DDEFE3; --near: #9A6A00; --near-soft: #F6EACB;
  --bad: #B3362C; --bad-soft: #F6DDD9; --mark: #FFF1B8;
  --g1: #B3362C; --g2: #9A6A00; --g3: #2E7D4F; --g4: #2F5D8A;
  --radius: 14px; --shadow: 0 1px 2px rgb(30 31 35 / .06), 0 6px 20px rgb(30 31 35 / .06);
  --f-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --f-word: ui-serif, Georgia, "Iowan Old Style", "Noto Serif", serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #16181D; --surface: #1F2228; --sunk: #2A2E36; --line: #343944;
    --fg: #E8E6E1; --muted: #A09C90; --accent: #8DB6E0; --accent-ink: #0E1A26; --accent-soft: #23344A;
    --good: #7CCB98; --good-soft: #1F3528; --near: #E6C266; --near-soft: #3A3018;
    --bad: #F08A7E; --bad-soft: #3D2421; --mark: #4A4220;
    --g1: #F08A7E; --g2: #E6C266; --g3: #7CCB98; --g4: #8DB6E0;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16181D; --surface: #1F2228; --sunk: #2A2E36; --line: #343944;
  --fg: #E8E6E1; --muted: #A09C90; --accent: #8DB6E0; --accent-ink: #0E1A26; --accent-soft: #23344A;
  --good: #7CCB98; --good-soft: #1F3528; --near: #E6C266; --near-soft: #3A3018;
  --bad: #F08A7E; --bad-soft: #3D2421; --mark: #4A4220;
  --g1: #F08A7E; --g2: #E6C266; --g3: #7CCB98; --g4: #8DB6E0;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--fg);
  font: 16px/1.5 var(--f-body); -webkit-tap-highlight-color: transparent;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top {
  display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto;
  padding: 14px 16px 6px;
}
.brand { border: 0; background: none; padding: 0; font: 700 20px/1 var(--f-word); letter-spacing: .01em; }
.crumb { flex: 1; color: var(--muted); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn .wave { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn[aria-pressed="false"] .wave { display: none; }
.icon-btn:hover { background: var(--sunk); }

main { max-width: 640px; margin: 0 auto; padding: 8px 16px 48px; }
main:focus, main:focus-visible { outline: none; }
.pad { padding: 16px; }
h1 { font: 600 26px/1.2 var(--f-word); margin: 18px 0 6px; }
h2 { font: 600 18px/1.3 var(--f-body); margin: 26px 0 10px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.wide { width: 100%; }
.btn kbd { font: 500 11px/1 var(--f-mono); opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 2px 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 0; min-width: 0; }

/* language cards on the home page */
.langs { display: grid; gap: 12px; margin-top: 14px; }
.lang {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: grid; gap: 10px;
}
.lang-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lang-name { font: 600 22px/1.2 var(--f-word); }
.lang-native { color: var(--muted); }
.badge { font: 700 12px/1 var(--f-body); letter-spacing: .04em; padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.stats b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }

/* the card being studied */
.stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px 18px; margin-top: 10px; display: grid; gap: 14px; min-height: 280px; align-content: start;
}
.tag { justify-self: start; font: 700 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tag.new { color: var(--accent); }
.word { font: 600 clamp(32px, 9vw, 44px)/1.15 var(--f-word); overflow-wrap: anywhere; }
.word-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.say { border: 1px solid var(--line); background: var(--bg); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.say svg { width: 18px; height: 18px; fill: currentColor; }
.ipa { font: 15px/1.4 var(--f-mono); color: var(--muted); }
.sentence { font: 21px/1.5 var(--f-word); overflow-wrap: anywhere; }
.sentence mark { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; }
.translation { color: var(--muted); font-size: 15px; }
.meaning { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.meaning ol { margin: 0; padding-left: 20px; }
.meaning li { margin: 2px 0; }
.meta { color: var(--muted); font-size: 14px; }
.also { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 15px; }
.blank-input {
  font: 600 21px/1.3 var(--f-word); border: 0; border-bottom: 2px solid var(--accent); background: var(--accent-soft);
  border-radius: 6px 6px 0 0; padding: 2px 6px; min-width: 5ch; max-width: 100%; color: var(--fg);
}
.blank-input:focus { outline: none; }
.keys { display: flex; gap: 6px; flex-wrap: wrap; }
.keys button { min-width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); font: 600 17px var(--f-word); }
.verdict { border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.verdict.correct, .verdict.case { background: var(--good-soft); color: var(--good); }
.verdict.accents, .verdict.form, .verdict.close { background: var(--near-soft); color: var(--near); }
.verdict.wrong, .verdict.empty { background: var(--bad-soft); color: var(--bad); }
.verdict .note { display: block; font-weight: 400; color: var(--fg); margin-top: 2px; }
.typed { text-decoration: line-through; opacity: .7; }

.controls { margin-top: 14px; display: grid; gap: 10px; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grade { min-height: 58px; flex-direction: column; gap: 2px; padding: 6px 4px; border-width: 1px; }
.grade small { font-weight: 400; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grade[data-r="1"] { border-color: color-mix(in srgb, var(--g1) 45%, var(--line)); }
.grade[data-r="2"] { border-color: color-mix(in srgb, var(--g2) 45%, var(--line)); }
.grade[data-r="3"] { border-color: color-mix(in srgb, var(--g3) 45%, var(--line)); }
.grade[data-r="4"] { border-color: color-mix(in srgb, var(--g4) 45%, var(--line)); }
.grade.suggested { outline: 2px solid var(--accent); outline-offset: 1px; }
.progress { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* placement */
.bar { height: 6px; background: var(--sunk); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.pl-word { font: 600 clamp(36px, 11vw, 54px)/1.1 var(--f-word); text-align: center; padding: 48px 0; overflow-wrap: anywhere; }
.bands { display: grid; gap: 8px; margin: 12px 0; }
.band { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.band .bar { height: 10px; }
.band span:last-child { text-align: right; color: var(--muted); }

/* dictionary */
.search { width: 100%; font-size: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.entries { display: grid; gap: 12px; margin-top: 14px; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.entry .word { font-size: 26px; }

.error { background: var(--bad-soft); color: var(--bad); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.center { text-align: center; }

@media (max-width: 420px) {
  .grades { grid-template-columns: repeat(2, 1fr); }
  .band { grid-template-columns: 92px 1fr 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- home: today's plan ---------- */
.lang-words { color: var(--muted); font-size: 14px; margin-left: auto; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  display: grid; gap: 4px; align-content: start; text-align: left; min-height: 104px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
}
.tile:hover { border-color: var(--muted); }
.tile.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-label { font: 700 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.tile-title { font: 600 16px/1.3 var(--f-word); }
.tile-sub { font-size: 13px; opacity: .75; }
.links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.links a, .foot a { color: var(--accent); text-decoration: none; }
.links a:hover, .foot a:hover { text-decoration: underline; }
.foot { margin-top: 24px; font-size: 14px; }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; justify-items: start; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
code { font: 13px var(--f-mono); background: var(--sunk); padding: 1px 5px; border-radius: 5px; }

/* ---------- lesson list ---------- */
.path { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.path-item {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none;
}
.path-item:hover { border-color: var(--muted); }
.path-item.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.path-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); font-weight: 700; font-size: 13px; }
.path-item.done .path-dot { background: var(--good-soft); color: var(--good); }
.path-item.next .path-dot { background: var(--accent); color: var(--accent-ink); }
.path-body { display: grid; gap: 2px; min-width: 0; }
.path-title { font-weight: 600; }
.path-sum { font-size: 14px; color: var(--muted); }
.path-next { font-size: 13px; font-weight: 700; color: var(--accent); }
.kind { display: inline-block; font: 700 10px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; padding: 4px 6px; border-radius: 6px; vertical-align: middle; background: var(--sunk); color: var(--muted); margin-left: 6px; }
.kind.sounds { background: var(--near-soft); color: var(--near); }
.kind.grammar { background: var(--accent-soft); color: var(--accent); }
.kind.usage { background: var(--good-soft); color: var(--good); }
.kind.gen { background: var(--sunk); color: var(--muted); border: 1px solid var(--line, currentColor); }

/* ---------- lesson player: a conversation ---------- */
.lesson-head { margin-top: 6px; }
.lesson-head h1 { margin-top: 8px; }
.lesson-head .kind { margin-left: 0; }
.chat { display: grid; gap: 14px; margin-top: 16px; }
.step { display: grid; gap: 10px; scroll-margin-top: 12px; }
.bubble { border-radius: 16px; padding: 12px 14px; max-width: 100%; position: relative; }
.bubble p { margin: 4px 0; }
.bubble.tutor { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; justify-self: start; box-shadow: var(--shadow); }
.bubble.tutor.right { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); background: var(--good-soft); }
.bubble.tutor.wrong { border-color: color-mix(in srgb, var(--near) 55%, var(--line)); background: var(--near-soft); }
.bubble.me { background: var(--accent); color: var(--accent-ink); justify-self: end; border-top-right-radius: 4px; max-width: 85%; white-space: pre-wrap; }
.bubble.wait { color: var(--muted); }
.bubble .who { position: absolute; top: -9px; right: 10px; font: 700 10px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--line); color: var(--muted); padding: 3px 6px; border-radius: 6px; }
.bubble mark, .rulebox mark, .ex-t mark, .cmp mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.examples { list-style: none; padding: 0; margin: 8px 0 2px; display: grid; gap: 8px; }
.ex { display: grid; gap: 1px; padding-left: 10px; border-left: 3px solid var(--line); }
.ex-line { display: flex; align-items: center; gap: 8px; }
.ex-t { font: 19px/1.4 var(--f-word); }
.ex-en { font-size: 14px; color: var(--muted); }
.ex .say { width: 30px; height: 30px; }
.choices { display: grid; gap: 8px; }
.btn.choice { justify-content: flex-start; text-align: left; font-weight: 500; gap: 10px; }
.btn.choice:disabled { opacity: .55; cursor: default; }
.btn.choice.picked-right { opacity: 1; border-color: var(--good); background: var(--good-soft); }
.btn.choice.picked-wrong { border-color: var(--near); text-decoration: line-through; }
.answer-form { display: grid; gap: 8px; }
.answer-form .row > input { flex: 1 1 auto; }
.answer-input, .ask-input, .rule-input {
  width: 100%; font-size: 18px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
}
.answer-input { font-family: var(--f-word); min-width: 0; }
.rule-input { font: 16px/1.5 var(--f-body); resize: vertical; }
.rulebox { background: var(--surface); border: 2px solid var(--accent); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.rulebox .tag { color: var(--accent); }
.compare { display: grid; gap: 8px; margin-top: 4px; }
.cmp { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 15px; }
.cmp-lang { font-weight: 700; color: var(--muted); font-size: 13px; padding-top: 2px; }
.step-next { margin-top: 2px; }
.ask-box { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 30%); margin-top: 18px; }
.ask-input { font-size: 15px; }
.drill { display: grid; gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.drill-q { font-size: 20px; }
.drill-n { font: 700 11px/1 var(--f-body); color: var(--muted); letter-spacing: .06em; }
.card-title { font: 600 22px/1.3 var(--f-word); }

/* ---------- texts and the reader ---------- */
.texts { display: grid; gap: 10px; margin-top: 12px; }
.text-item { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.text-item:hover { border-color: var(--muted); }
.text-item.read { opacity: .75; }
.text-title { font: 600 18px/1.3 var(--f-word); }
.text-meta { font-size: 13px; color: var(--muted); }
.text-cov { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.gen { display: grid; gap: 8px; }
.reading-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.legend { display: flex; gap: 12px; }
.legend .tok { cursor: default; }
.reading { font: 21px/1.75 var(--f-word); margin-top: 10px; }
.sent-row { margin: 0 0 6px; }
.tok { border-radius: 4px; cursor: pointer; padding: 0 1px; }
.tok.new { text-decoration: underline dotted color-mix(in srgb, var(--accent) 38%, transparent); text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.tok.learning { background: var(--mark); }
.tok.known, .tok.name, .tok.other { cursor: pointer; }
.tok:hover, .tok.active { background: var(--accent-soft); outline: 1px solid var(--accent); }
.sent-tools { display: inline-flex; gap: 3px; vertical-align: 3px; opacity: .55; }
.sent-row:hover .sent-tools, .sent-tools:focus-within { opacity: 1; }
.sent-tools .say { width: 24px; height: 24px; }
.sent-tools .say svg { width: 14px; height: 14px; }
.en-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 7px; font: 700 10px/1 var(--f-body); color: var(--muted); height: 24px; padding: 0 6px; }
.sent-en { display: block; font: 15px/1.4 var(--f-body); color: var(--muted); margin: 2px 0 8px; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(640px, 100%);
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgb(0 0 0 / .15); padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 10px; max-height: 70dvh; overflow-y: auto; z-index: 10;
}
.sheet .meaning { border-top: 0; padding-top: 0; }
.after { display: grid; gap: 14px; margin-top: 10px; }
.writing { display: grid; gap: 8px; margin-top: 8px; }
mark.err { background: var(--bad-soft); color: var(--bad); border-radius: 4px; padding: 0 2px; }
.err-qs { margin: 6px 0; padding-left: 22px; display: grid; gap: 6px; }
.linkish { border: 0; background: none; color: var(--accent); padding: 0; text-decoration: underline; font-size: 14px; }
.fix { font-weight: 600; color: var(--good); }
.corrected { background: var(--good-soft); border-radius: 12px; padding: 10px 12px; }

@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .lang-words { margin-left: 0; width: 100%; }
}

/* ---------- origins, reports, progress ---------- */
.origin { font-size: 14px; color: var(--muted); }
.origin i { color: var(--fg); font-style: italic; }
.origin-label { font: 700 10px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; margin-right: 8px; }
.report { margin-top: 4px; }
.report .row > input { flex: 1 1 auto; min-width: 0; font-size: 14px; padding: 8px 10px; }
.flags { padding-left: 18px; font-size: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.stat b { font: 600 24px/1.1 var(--f-word); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 140px; }
.day-col { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 4px; text-align: center; font-size: 11px; color: var(--muted); }
.day { display: flex; flex-direction: column-reverse; justify-content: flex-start; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.day i { display: block; }
.day .rv, .sw.rv { background: var(--accent); }
.day .nw, .sw.nw { background: var(--good); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
@media (max-width: 560px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.bar.busy > i { width: 35%; animation: busy 1.4s ease-in-out infinite alternate; }
@keyframes busy { from { margin-left: 0; } to { margin-left: 65%; } }

/* News: real articles in easy language, with their own audio when the source reads them aloud */
.news { margin-top: 28px; }
.listen { display: grid; gap: 6px; margin: 10px 0 14px; }
.listen audio { width: 100%; max-width: 520px; }
.level-head { margin-top: 22px; }
.level-fold { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.level-fold > summary { cursor: pointer; padding: 10px 2px; list-style: none; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.level-fold > summary::-webkit-details-marker { display: none; }
.level-fold > summary::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
.level-fold[open] > summary::before { transform: rotate(90deg); }
.level-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.level-name { font: 700 1.15rem/1.2 var(--f-head, inherit); }
.level-fold > .path, .level-fold > .texts { margin-bottom: 10px; }

/* ---------------------------------------------------------------- offline, login, devices */
.offline {
  max-width: 640px; margin: 0 auto 4px; padding: 8px 16px; font-size: 14px;
  background: var(--near-soft); color: var(--near); border-radius: 0 0 12px 12px;
}
.login { max-width: 400px; padding-top: 12vh; display: grid; gap: 14px; }
.login-title { display: flex; align-items: center; gap: 12px; font: 700 34px/1 var(--f-word); margin: 0 0 18px; }
.login-title img { border-radius: 10px; }
.btn.big { padding: 14px 18px; font-size: 17px; }
.login-status { min-height: 1.5em; margin: 0; color: var(--muted); }
.login-status.error { color: var(--bad); background: var(--bad-soft); border-radius: 12px; padding: 10px 12px; }
.login-first { border-top: 1px solid var(--line); padding-top: 14px; }
.login-first summary { cursor: pointer; color: var(--accent); }
.login-first form { display: grid; gap: 10px; margin-top: 10px; }
.code-input { font: 500 20px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.devices { margin-top: 8px; }
.device-list { list-style: none; padding: 0; margin: 8px 0 10px; display: grid; gap: 8px; }
.device {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.device .tag { margin-left: 8px; color: var(--accent); }
.btn.small { padding: 6px 10px; font-size: 14px; flex: none; }
/* Touch screens have no keyboard to press the hints on. */
@media (hover: none) and (pointer: coarse) { kbd { display: none; } }
