/* =====================================================================
   A+ Core2 Under the Hood labs — style.

   WCAG AAA is a medical accommodation here: body text 7:1, large text
   4.5:1, measured on PAINTED PIXELS by verify/contrast.mjs in both
   themes and with dyslexia text on. Royal palette only (green, purple,
   blue, red, silver, yellow). Colour is never the only signal: every
   state also says itself in words, and a ruled-out option is marked by
   colour, an inset rule and the words.

   The ground is flat on purpose: a gradient makes an element's contrast
   depend on where it happens to sit.
   ===================================================================== */
:root {
  --ground: #121622; --panel: #1b2130; --panel-2: #242c3f; --sunk: #0e121c;
  --line: #3b4660; --line-hi: #6a7a99;
  --ink: #eef1f8; --dim: #c3cbda;
  --accent: #9cc0ff; --on-accent: #0b1638;
  --gold: #ffe27a; --ok: #8ee8a8; --ok-bg: #0f2418; --ok-line: #4f9a68;
  --bad: #ffc2bd; --bad-bg: #2a1215; --bad-line: #b8635a; --bad-rule: #e0645a;
  --hint-bg: #1d1a10; --hint-line: #a08a4c;
  --silver: #c8ced6;
}
:root[data-theme="light"] {
  --ground: #f3f5fa; --panel: #ffffff; --panel-2: #e9edf4; --sunk: #e3e8f1;
  --line: #c4ccda; --line-hi: #6f7c92;
  --ink: #121826; --dim: #3b4455;
  --accent: #0b3a82; --on-accent: #ffffff;
  --gold: #5c4a00; --ok: #0f5c2b; --ok-bg: #eaf7ee; --ok-line: #4f8062;
  --bad: #8e2018; --bad-bg: #fcefed; --bad-line: #b8635a; --bad-rule: #a8433a;
  --hint-bg: #fdf6e3; --hint-line: #8a7340;
  --silver: #3b4455;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 96rem; margin: 0 auto; padding: 0 1rem 3rem; }
header.top { padding: 1.5rem 0 0.5rem; }
h1 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-wrap: balance; }
.lede { margin: 0.4rem 0 0.6rem; color: var(--dim); max-width: 60rem; }
.lede strong { color: var(--ink); }
h2 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.6rem; }
.setting { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.75rem; }
.setting input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.setting label { font-weight: 700; cursor: pointer; }
.setting-note { color: var(--dim); font-size: 0.9rem; flex-basis: 100%; margin: 0; }
.btn { font: inherit; font-weight: 600; min-height: 44px; padding: 0.45rem 0.95rem; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-hi); border-radius: 8px; cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:focus-visible, .mc:focus-visible, .opt:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.secondary { background: transparent; }
.btn:disabled { cursor: default; color: var(--dim); background: var(--panel); border: 2px dashed var(--line-hi); }

.workspace { display: grid; grid-template-columns: minmax(20rem, 5fr) minmax(0, 8fr); gap: 1rem; margin-top: 1rem; align-items: start; }
@media (max-width: 70rem) { .workspace { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 1rem; margin: 0 0 0.8rem; }
.panel h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.panel p { margin: 0.35rem 0; }
.office { border-radius: 8px; overflow: hidden; background: #cdd6d8; min-height: 60px; }
.sub-h { font-size: 1rem; margin: 0.6rem 0 0.35rem; }
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.4rem; }
.mc { font: inherit; text-align: left; display: grid; gap: 0.05rem; padding: 0.45rem 0.6rem; min-height: 44px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-hi); border-radius: 8px; cursor: pointer; }
.mc span { font-size: 0.86rem; color: var(--dim); }
.mc.on { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.mc .mc-tag { color: var(--gold); font-weight: 700; }
.ticket { border-left: 4px solid var(--accent); }
.tk-meta { color: var(--dim); font-size: 0.92rem; }
.tk-brief { max-width: 70ch; }
.tk-stage { font-weight: 700; }
.tk-count { color: var(--dim); font-size: 0.92rem; }
.tk-say { background: var(--sunk); border: 1px solid var(--line-hi); border-radius: 8px; padding: 0.45rem 0.7rem; }
.tk-revert { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: center; margin-top: 0.6rem; }
.creds { border-left: 4px solid var(--silver); }
.ins-answer { margin-top: 0.6rem; padding: 0.45rem 0.7rem; border-left: 4px solid var(--gold); background: var(--sunk); }
.guide { margin: 0.7rem 0 0; padding: 0.65rem 0.85rem; background: var(--hint-bg); border: 1px solid var(--hint-line); border-radius: 8px; }
.guide h4 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--gold); }
.guide .principle { font-weight: 600; }
.narrow { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.35rem; }
.narrow li { display: grid; gap: 0.1rem; padding: 0.4rem 0.65rem; border-radius: 8px; }
.narrow .alive { border: 1px solid var(--accent); box-shadow: inset 5px 0 0 var(--accent); background: var(--panel); }
.narrow .struck, .opt.out { color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-line); box-shadow: inset 5px 0 0 var(--bad-rule); }
.narrow .struck .narrow-label, .opt.out .opt-label { text-decoration: line-through; text-decoration-thickness: 2px; }
.opt-mark { font-weight: 800; font-size: 0.9rem; }
.opt-why { font-size: 0.94rem; color: var(--ink); }
.main { min-width: 0; }
.screen-h { font-size: 1.1rem; }
footer.bot { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--dim); }
footer.bot p { max-width: 75ch; margin: 0.3rem 0; }

/* The PIN dialog */
.pin-ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.62); }
.pin-box { width: min(28rem, 100%); background: var(--panel); color: var(--ink); border: 1px solid var(--line-hi); border-radius: 10px; padding: 1.1rem; }
.pin-box h2 { margin: 0 0 0.4rem; }
.pin-box label { display: block; font-weight: 600; margin-top: 0.6rem; }
.pin-box input { width: 100%; min-height: 44px; font: inherit; padding: 0.4rem 0.6rem; background: var(--sunk); color: var(--ink); border: 1px solid var(--line-hi); border-radius: 6px; }
.pin-err { color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-line); box-shadow: inset 5px 0 0 var(--bad-rule); border-radius: 6px; padding: 0.35rem 0.6rem; }
.pin-acts { display: flex; gap: 0.5rem; margin-top: 0.8rem; }

/* =====================================================================
   THE PC'S SCREEN — Windows 11 as a PC would show it, in its own fixed
   neutral colours in both site themes (it is a device, not the page),
   royal blue for selection. Every pair below clears 7:1.
   ===================================================================== */
.screen-wrap { background: #16181d; border-radius: 14px; padding: 10px; }
.screen { position: relative; min-height: min(46rem, 88vh); border-radius: 6px; overflow: hidden; background: #0b1f4a; color: #111827; display: flex; flex-direction: column; font: 15px/1.45 "Segoe UI", -apple-system, Roboto, Arial, sans-serif; }
.screen.off { background: #000; align-items: center; justify-content: center; gap: 1rem; }
.screen-off { color: #e5e7eb; padding: 0 2rem; text-align: center; }
.screen.bsod { background: #0b3a82; color: #fff; }
.bsod-body { padding: 2rem; max-width: 40rem; } .bsod-body p { margin: 0 0 1rem; } .bsod-face { font-size: 4rem !important; line-height: 1; } .bsod-code { font-weight: 700; }
.bsod-btn { background: #fff; color: #0b3a82; }
.sign-bar { background: #0b1f4a; color: #e8f0ff; font-size: 0.88rem; padding: 0.3rem 0.7rem; border-bottom: 1px solid #3a5a9a; }
.desk-area { flex: 1; padding: 0.6rem; display: grid; align-content: start; gap: 0.6rem; }
.desk-area.no-shell { background: #000; }
.noshell-note, .boot-note { margin: 0; padding: 0.5rem 0.8rem; background: #111827; color: #f3f4f6; border: 1px solid #6b7280; border-radius: 6px; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.icons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.icon-btn { font: inherit; width: 7.5rem; min-height: 5.2rem; padding: 0.5rem; background: #ffffff; color: #111827; border: 2px solid #8fb4ff; border-radius: 8px; cursor: pointer; font-weight: 600; }
.w-btn { font: inherit; min-height: 36px; padding: 0.3rem 0.8rem; background: #f3f4f6; color: #111827; border: 1px solid #6b7280; border-radius: 5px; cursor: pointer; }
.w-btn:hover:not(:disabled) { background: #e5e7eb; }
.w-btn.primary { background: #0b3a82; color: #fff; border-color: #0b3a82; }
.w-btn.primary:hover:not(:disabled) { background: #082c63; border-color: #082c63; }
.w-btn.small { min-height: 30px; padding: 0.1rem 0.6rem; font-size: 0.9rem; }
.w-btn:disabled { background: #fff; color: #374151; border: 2px dashed #6b7280; cursor: default; }
.w-btn:focus-visible, .th-btn:focus-visible, .tm-row:focus-visible, .ev-row:focus-visible, .key-btn:focus-visible, .icon-btn:focus-visible, .tb-start:focus-visible, .tb-app:focus-visible, .fx-dir:focus-visible, .fx-f:focus-visible { outline: 3px solid #ffd426; outline-offset: 1px; }
.win { background: #fff; color: #111827; border: 1px solid #6b7280; border-radius: 8px; overflow: hidden; }
.win.active { box-shadow: 0 0 0 2px #0b3a82; }
.win-bar { display: flex; align-items: center; gap: 0.6rem; background: #f3f4f6; padding: 0.3rem 0.5rem 0.3rem 0.8rem; border-bottom: 1px solid #d1d5db; }
.win-title { margin: 0; font-size: 0.95rem; font-weight: 600; flex: 1; }
.win-body { max-height: min(40rem, 76vh); overflow: auto; }
.prog { padding: 1.2rem; } .prog h4 { margin: 0 0 0.4rem; }
.con { background: #0c0c0c; color: #f2f2f2; font: 14.5px/1.45 Consolas, "Cascadia Mono", ui-monospace, monospace; }
.con-out { margin: 0; padding: 0.6rem 0.7rem 0; white-space: pre-wrap; word-break: break-word; max-height: 22rem; overflow: auto; font: inherit; }
.con-cmd { color: #fff; font-weight: 700; }
.con-row { display: flex; align-items: center; padding: 0.2rem 0.7rem 0.6rem; }
.con-prompt { white-space: pre; }
.con-in { flex: 1; min-width: 6rem; background: #0c0c0c; color: #fff; border: 0; border-bottom: 2px solid #9ca3af; font: inherit; padding: 0.15rem 0.25rem; }
.con-in:focus { outline: 2px solid #ffd426; outline-offset: 1px; }
.con-why { margin: 0; padding: 0.5rem 0.8rem; background: #0b1f4a; color: #e8f0ff; border-top: 2px solid #8fb4ff; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.95rem; }
.con-why strong { color: #fde68a; }
.tm-tools, .ev-nav, .fx-bar, .hd-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.5rem 0.7rem; border-bottom: 1px solid #e5e7eb; }
.tm-h, .ev-h { margin: 0 auto 0 0; font-size: 1rem; font-weight: 700; }
.tm-flash { margin: 0; padding: 0.4rem 0.8rem; background: #eef2ff; color: #1e1b4b; border-bottom: 1px solid #c7d2fe; }
.tm-scroll, .ev-scroll { max-height: 15rem; overflow: auto; }
.tm-table, .ev-table, .hd-q { border-collapse: collapse; width: 100%; font-size: 14px; }
.tm-table th, .ev-table th, .hd-q th { position: sticky; top: 0; background: #f9fafb; color: #1f2937; text-align: left; padding: 0.35rem 0.6rem; border-bottom: 1px solid #d1d5db; }
.tm-table th { padding: 0; }
.th-btn { font: inherit; font-weight: 600; background: transparent; border: 0; color: #1f2937; padding: 0.4rem 0.6rem; width: 100%; text-align: left; cursor: pointer; min-height: 36px; }
.tm-table th[aria-sort="descending"] .th-btn, .tm-table th[aria-sort="ascending"] .th-btn { color: #0b3a82; text-decoration: underline; }
.tm-table td, .ev-table td, .hd-q td { padding: 0.3rem 0.6rem; border-bottom: 1px solid #e5e7eb; }
.tm-row, .ev-row { cursor: pointer; }
.tm-row:hover td, .ev-row:hover td { background: #f3f4f6; }
.tm-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-row.sel td, .ev-row.sel td { background: #0b3a82 !important; color: #fff; }
.ev-row.lvl-err td:first-child { color: #7f1d1d; font-weight: 700; }
.ev-row.lvl-warn td:first-child { color: #5c3d00; font-weight: 700; }
.ev-row.sel.lvl-err td:first-child, .ev-row.sel.lvl-warn td:first-child { color: #fff; }
.ev-count { margin: 0; padding: 0.3rem 0.7rem; font-size: 0.9rem; }
.tm-info, .ev-detail { padding: 0.6rem 0.8rem; background: #eef2ff; color: #1e1b4b; border-top: 1px solid #c7d2fe; }
.tm-info h4, .ev-detail h4 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.tm-info p, .ev-detail p { margin: 0; }
.tm-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.8rem; margin: 0; }
.tm-info dt { font-weight: 700; } .tm-info dd { margin: 0; word-break: break-all; }
.set, .sc { padding: 0.6rem 0.8rem; }
.set-h { margin: 0.2rem 0 0.4rem; font-size: 1rem; }
.sc-note { margin: 0 0 0.5rem; font-size: 0.92rem; color: #374151; }
.set-list { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.35rem; }
.set-item { display: flex; gap: 0.6rem; justify-content: space-between; align-items: center; padding: 0.45rem 0.6rem; border: 1px solid #d1d5db; border-radius: 6px; }
.set-name { display: grid; } .set-name span { font-size: 0.88rem; color: #374151; }
.fx-lab { font-weight: 600; } .fx-addr { flex: 1; min-width: 12rem; }
.fx-list { list-style: none; margin: 0; padding: 0.4rem 0.7rem; display: grid; gap: 0.2rem; }
.fx-dir, .fx-f { font: inherit; text-align: left; width: 100%; min-height: 34px; padding: 0.25rem 0.5rem; background: #fff; color: #111827; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.fx-dir:hover, .fx-f:hover { border-color: #9ca3af; }
.fx-file.sel .fx-f { background: #0b3a82; color: #fff; }
.fx-acts { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; padding: 0.5rem 0.7rem; border-top: 1px solid #e5e7eb; }
.fx-drive { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; padding: 0.45rem 0.7rem; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.taskbar { display: flex; gap: 0.35rem; align-items: center; background: #f3f4f6; border-top: 1px solid #9ca3af; padding: 0.3rem 0.5rem; }
.tb-mid { flex: 1; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; justify-content: center; min-width: 0; }
.taskbar.w10 .tb-mid { justify-content: flex-start; }
/* Windows 11: centred on the whole bar, the clock at the right */
.taskbar:not(.w10) { display: grid; grid-template-columns: 1fr minmax(0, max-content) 1fr; }
.taskbar:not(.w10) > .tb-mid { grid-column: 2; }
.taskbar:not(.w10) > .tb-clock { grid-column: 3; justify-self: end; }
.tb-start { font: inherit; font-weight: 700; min-height: 38px; padding: 0 0.9rem; background: #0b3a82; color: #fff; border: 0; border-radius: 5px; cursor: pointer; }
.tb-app { font: inherit; min-height: 38px; padding: 0 0.7rem; background: #fff; color: #111827; border: 1px solid #9ca3af; border-radius: 5px; cursor: pointer; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-app.on { border-bottom: 3px solid #0b3a82; font-weight: 700; }
.tb-clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.startmenu.w10 { left: 0.5rem; transform: none; }
.startmenu { position: absolute; left: 50%; transform: translateX(-50%); bottom: 3.3rem; width: min(30rem, calc(100% - 1rem)); max-height: calc(100% - 4rem); overflow: auto; background: #fff; color: #111827; border: 1px solid #6b7280; border-radius: 8px; padding: 0.7rem; z-index: 4; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.sm-h { margin: 0 0 0.4rem; font-size: 1rem; }
.sm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.sm-app { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: space-between; padding: 0.35rem 0.4rem; border: 1px solid #e5e7eb; border-radius: 6px; }
.sm-name { font-weight: 600; } .sm-acts { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.sm-foot { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center; margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid #e5e7eb; }
.sm-power { display: flex; gap: 0.35rem; }
.w-veil { position: absolute; inset: 0; background: rgba(0,0,0,.62); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 6; }
.w-dialog { background: #fff; color: #111827; border: 1px solid #6b7280; border-radius: 8px; padding: 0.9rem 1rem; width: min(32rem, 100%); max-height: 100%; overflow: auto; }
.w-dialog.run { position: absolute; left: 0.5rem; bottom: 3.3rem; z-index: 5; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.w-dialog p { margin: 0.35rem 0; }
.w-dialog label { display: block; font-weight: 600; margin: 0.5rem 0 0.2rem; }
.dlg-h { margin: 0 0 0.4rem; font-size: 1.05rem; }
.dlg-row { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; margin-top: 0.8rem; }
.dlg-err { color: #7f1d1d; background: #fdecea; border: 1px solid #b91c1c; box-shadow: inset 5px 0 0 #b91c1c; border-radius: 6px; padding: 0.3rem 0.6rem; font-weight: 600; }
.dlg-error { border-left: 5px solid #b91c1c; padding-left: 0.6rem; }
.uac-q { font-weight: 700; font-size: 1.05rem; }
.w-dialog.uac, .w-dialog.uac-creds { border-top: 6px solid #0b3a82; }
.w-input { font: inherit; width: 100%; min-height: 36px; padding: 0.25rem 0.5rem; border: 1px solid #6b7280; border-radius: 5px; background: #fff; color: #111827; }
.w-input:focus { outline: 3px solid #0b3a82; outline-offset: 0; }
.screen-keys { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; padding: 0.5rem 0.2rem 0; color: #e5e7eb; }
.keys-label { font-weight: 700; }
.key-btn { font: inherit; font-size: 0.9rem; min-height: 36px; padding: 0.2rem 0.7rem; background: #2c3547; color: #eef1f8; border: 1px solid #7c8899; border-bottom-width: 3px; border-radius: 6px; cursor: pointer; }
/* the Help Desk app */
.hd { padding: 0.6rem 0.8rem; }
.hd-cur { border: 1px solid #9ca3af; border-left: 5px solid #0b3a82; border-radius: 6px; padding: 0.5rem 0.7rem; margin-bottom: 0.6rem; }
.hd-cur h4 { margin: 0 0 0.3rem; }
.hd-cur p { margin: 0.2rem 0; }
.hd-acts { border: 0; padding: 0.4rem 0; }
.hd-say { background: #eef2ff; color: #1e1b4b; border: 1px solid #c7d2fe; border-radius: 6px; padding: 0.35rem 0.6rem; }
.hd-qh { margin: 0.4rem 0; }
.hd-scroll { max-height: 22rem; overflow: auto; border: 1px solid #e5e7eb; border-radius: 6px; }
.hd-q tr.cur td { background: #eef2ff; color: #111827; }
.hd-close { margin-top: 0.5rem; }
.hd-q1 { font-weight: 700; }
.hd-close .options { display: grid; gap: 0.4rem; margin: 0.4rem 0; }
.hd-close .opt { font: inherit; text-align: left; display: grid; gap: 0.1rem; padding: 0.5rem 0.7rem; min-height: 44px; background: #f9fafb; color: #111827; border: 1px solid #6b7280; border-radius: 6px; cursor: pointer; }
.hd-close .opt.out { color: #7f1d1d; background: #fdecea; border-color: #b91c1c; box-shadow: inset 5px 0 0 #b91c1c; cursor: default; }
.hd-close .opt.out .opt-why { color: #111827; }
.hd-close .opt.right { color: #14532d; background: #eaf7ee; border-color: #15803d; box-shadow: inset 5px 0 0 #15803d; }
.hd-close .guide { background: #fdf6e3; border-color: #8a7340; color: #111827; }
.hd-close .guide h4 { color: #5c4a00; }
.hd-notel { display: block; font-weight: 600; margin: 0.6rem 0 0.2rem; }
.hd-note { min-height: 6rem; }
.hd-done { margin: 0 0 0.8rem; padding: 0.6rem 0.8rem; background: #eef6ee; color: #14532d; border: 1px solid #15803d; border-left: 6px solid #15803d; border-radius: 6px; }
.hd-done p { margin: 0.2rem 0 0; color: #111827; }

/* dyslexia-friendly text: spacing does most of the work; nothing is downloaded */
:root[data-reading="dyslexia"] body { font-family: "OpenDyslexic", "Atkinson Hyperlegible", "Lexend Deca", Verdana, Tahoma, "DejaVu Sans", Arial, sans-serif; letter-spacing: 0.05em; word-spacing: 0.16em; line-height: 1.85; }
:root[data-reading="dyslexia"] p, :root[data-reading="dyslexia"] li { max-width: 60ch; }
:root[data-reading="dyslexia"] em, :root[data-reading="dyslexia"] i { font-style: normal; font-weight: 700; }
:root[data-reading="dyslexia"] * { text-align: left; }
:root[data-reading="dyslexia"] .screen { letter-spacing: 0.04em; word-spacing: 0.12em; }
:root[data-reading="dyslexia"] .con { letter-spacing: 0.02em; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --------------------------------------------------------------- Mail */
.mx { --mx-bg: #ffffff; --mx-bg2: #f3f4f6; --mx-ink: #111827; --mx-muted: #374151; --mx-line: #8a93a4; --mx-sel: #dbe7ff; --mx-link: #0b3a82;
  display: grid; grid-template-columns: minmax(9rem, 11rem) minmax(12rem, 18rem) minmax(0, 1fr); min-height: 26rem; background: var(--mx-bg); color: var(--mx-ink); font: inherit; }
.mx-nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.6rem; background: var(--mx-bg2); border-right: 1px solid var(--mx-line); }
.mx-who { margin: 0 0 0.4rem; font-weight: 700; font-size: 0.9rem; word-break: break-all; }
.mx-f, .mx-it, .mx-b { font: inherit; color: var(--mx-ink); background: transparent; border: 1px solid transparent; border-radius: 5px; cursor: pointer; text-align: left; }
.mx-f { padding: 0.45rem 0.55rem; min-height: 36px; }
.mx-f.on { background: var(--mx-sel); border-color: var(--mx-line); font-weight: 700; }
.mx-list { overflow: auto; border-right: 1px solid var(--mx-line); max-height: 34rem; }
.mx-it { display: grid; width: 100%; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--mx-line); border-radius: 0; gap: 0.1rem; }
.mx-it.sel { background: var(--mx-sel); }
.mx-subj { font-size: 0.92rem; } .mx-date { font-size: 0.82rem; color: var(--mx-muted); }
.mx-read { padding: 0.6rem 0.9rem; overflow: auto; max-height: 34rem; display: grid; align-content: start; gap: 0.45rem; }
.mx-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mx-b { padding: 0.3rem 0.65rem; min-height: 36px; border-color: var(--mx-line); background: var(--mx-bg2); }
.mx-b:hover, .mx-f:hover:not(.on) { background: var(--mx-sel); }
.mx-h { margin: 0.2rem 0; font-size: 1.12rem; }
.mx-kv, .mx-p { margin: 0; overflow-wrap: anywhere; }
.mx-p { min-height: 1.1em; }
.mx-head { display: grid; gap: 0.1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--mx-line); }
.mx-body { display: grid; gap: 0.15rem; }
.mx-sep { margin: 0.6rem 0 0.2rem; color: var(--mx-muted); font-weight: 700; }
.mx-link { color: var(--mx-link); text-decoration: underline; font-weight: 600; }
.mx-att { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.5rem; padding: 0.4rem 0.6rem; border: 1px solid var(--mx-line); border-radius: 6px; background: var(--mx-bg2); }
.mx-attn { font-weight: 700; overflow-wrap: anywhere; }
.mx-hdrs { padding: 0.5rem 0.7rem; border: 1px solid var(--mx-line); border-radius: 6px; background: var(--mx-bg2); font: 0.88rem/1.45 Consolas, "Cascadia Mono", ui-monospace, monospace; }
.mx-hl { margin: 0; overflow-wrap: anywhere; } .mx-note { margin: 0 0 0.4rem; font-family: "Segoe UI", Arial, sans-serif; }
.mx-status { margin: 0; padding: 0.45rem 0.6rem; border: 2px solid #7f1d1d; border-radius: 6px; background: #fde8e8; color: #7f1d1d; font-weight: 600; }
.mx-flag { margin: 0; padding: 0.45rem 0.6rem; border: 1px solid #6b5200; border-left-width: 6px; border-radius: 6px; background: #fff8db; color: #3f2f00; font-weight: 600; }
.mx-empty { color: var(--mx-muted); padding: 0.8rem; margin: 0; }
.mx-linkbar { margin: 0; padding: 0.35rem 0.7rem; border-top: 1px solid var(--mx-line); background: var(--mx-bg2); color: var(--mx-ink); font: 0.9rem/1.4 Consolas, "Cascadia Mono", ui-monospace, monospace; overflow-wrap: anywhere; }
@media (max-width: 900px) { .mx { grid-template-columns: 1fr; } .mx-nav { flex-direction: row; flex-wrap: wrap; } .mx-list, .mx-read { max-height: none; } }
/* inside a PC's screen, Mail is a window among others: shorter, so the
   PC's own taskbar stays in view */
.screen .mx { min-height: 0; }
.screen .mx-list, .screen .mx-read { max-height: min(22rem, 48vh); }
/* The link line keeps one height whatever it says: if it grew when a long
   address wrapped, the pane above would shrink, the link would slide out
   from under the pointer, and the two would flicker back and forth. */
.mx-linkbar { height: 5.2em; overflow: auto; flex: 0 0 auto; }

/* Properties › Previous Versions, File History, System Restore */
.doc-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.9rem; margin: 0.5rem 0; }
.doc-dl dt { font-weight: 700; } .doc-dl dd { margin: 0; }
.sr-list { list-style: none; margin: 0.5rem 0; padding: 0; display: grid; gap: 0.3rem; }
.sr-list .w-btn { width: 100%; text-align: left; }
.fh-state { font-size: 1.1rem; font-weight: 700; margin: 0.4rem 0; }
.fh-msg { margin: 0.6rem 0; padding: 0.45rem 0.6rem; border-left: 5px solid #0b3a82; background: #eef3fb; color: #111827; }
.props .ev-nav, .filehist .ev-nav { padding-left: 0; padding-right: 0; }
.filehist select.w-input { display: block; min-width: 16rem; }
.fh-warn { margin: 0.5rem 0; padding: 0.5rem 0.65rem; border: 2px solid #7a5c00; border-left-width: 6px; background: #fff8db; color: #3b2f00; font-weight: 600; }
.fh-nav { align-items: center; justify-content: space-between; }
.fh-nav .fh-state { margin: 0; font-size: 1rem; }

/* ---------------- installing an OS: firmware, Windows Setup, first run (install.js) */
.screen.inst { background: #0b1f4a; }
.fw { flex: 1; background: #0b1f4a; color: #f1f5f9; padding: 1.2rem 1.4rem; font: 15px/1.5 Consolas, "Cascadia Mono", ui-monospace, monospace; display: grid; align-content: start; gap: 0.55rem; }
.fw p { margin: 0; }
.fw-brand { color: #ffe27a; font-weight: 700; }
.fw-keys { color: #ffffff; font-weight: 700; border-top: 1px solid #8fa3c7; padding-top: 0.5rem; }
.fw-h { margin: 0.3rem 0 0; font-size: 1.05rem; color: #ffffff; }
.fw-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.fw-row label { min-width: 15rem; }
.fw-btn { font: inherit; min-height: 40px; padding: 0.3rem 0.8rem; background: #1e3a8a; color: #ffffff; border: 2px solid #c8ced6; border-radius: 4px; cursor: pointer; text-align: left; }
.fw-btn:hover:not(:disabled) { background: #1e40af; }
.fw-btn.wide { width: 100%; }
.fw-btn.small { min-height: 34px; padding: 0.1rem 0.6rem; }
.fw-btn:disabled { background: #0b1f4a; color: #e2e8f0; border: 2px dashed #c8ced6; cursor: default; }
.fw-btn:focus-visible, .fw-sel:focus-visible { outline: 3px solid #ffe27a; outline-offset: 2px; }
.fw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.fw-list li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.fw-list li > span { min-width: 18rem; }
.fw-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0; }
.fw-dl dt { color: #e2e8f0; } .fw-dl dd { margin: 0; color: #ffffff; }
.fw-sel { font: inherit; min-height: 36px; background: #ffffff; color: #111827; border: 2px solid #c8ced6; border-radius: 4px; padding: 0.1rem 0.4rem; }
.wsetup, .oobe { flex: 1; display: grid; place-items: center; padding: 1rem; }
.wsetup { background: #2e1065; }
.oobe { background: #e8edf8; }
.ws-box, .oobe-box { width: min(36rem, 100%); background: #ffffff; color: #111827; border: 1px solid #6b7280; border-radius: 8px; padding: 1rem 1.2rem; display: grid; gap: 0.55rem; }
.ws-box p, .oobe-box p { margin: 0; }
.ws-box label, .oobe-box label { font-weight: 600; }
.ws-brand { font-weight: 700; color: #2e1065; }
.ws-h { margin: 0; font-size: 1.2rem; }
.ws-kv { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; } .ws-kv span { min-width: 13rem; color: #374151; }
.ws-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; } .ws-row.left { justify-content: flex-start; }
.ws-radios { display: grid; gap: 0.35rem; }
.ws-radio { font: inherit; text-align: left; min-height: 40px; padding: 0.35rem 0.7rem; background: #ffffff; color: #111827; border: 1px solid #6b7280; border-radius: 6px; cursor: pointer; }
.ws-radio.on { border: 2px solid #0b3a82; box-shadow: inset 6px 0 0 #0b3a82; background: #e6edfb; font-weight: 700; }
.ws-check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 600; } .ws-check input { width: 20px; height: 20px; margin-top: 0.15rem; accent-color: #0b3a82; }
.ws-note { color: #374151; }
.ws-table { width: 100%; border-collapse: collapse; } .ws-table th, .ws-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid #d1d5db; }
.ws-part { cursor: pointer; } .ws-part:hover { background: #f3f4f6; }
.ws-part.sel { background: #e6edfb; box-shadow: inset 6px 0 0 #0b3a82; font-weight: 700; }
.ws-radio:focus-visible, .ws-part:focus-visible, .oobe-link:focus-visible, .ws-box .w-btn:focus-visible, .oobe-box .w-btn:focus-visible, .ws-box .w-input:focus-visible, .oobe-box .w-input:focus-visible, .ws-check input:focus-visible { outline: 3px solid #4c1d95; outline-offset: 2px; }
.ins-err { margin: 0; color: #7f1d1d; background: #fdecea; border: 1px solid #b91c1c; box-shadow: inset 5px 0 0 #b91c1c; border-radius: 6px; padding: 0.35rem 0.6rem 0.35rem 0.8rem; font-weight: 600; }
.oobe-big { font-size: 1.6rem; font-weight: 700; }
.oobe-opts { display: grid; justify-items: start; gap: 0.3rem; }
.oobe-link { font: inherit; cursor: pointer; color: #0b3a82; font-weight: 700; text-decoration: underline; min-height: 36px; background: none; border: 0; padding: 0; }
.cn-member { border: 1px solid #6b7280; border-radius: 6px; margin: 0.5rem 0; padding: 0.4rem 0.7rem 0.6rem; display: grid; gap: 0.3rem; }
.cn-member legend { font-weight: 600; padding: 0 0.3rem; }
.cn-opt { display: flex; align-items: center; gap: 0.4rem; } .cn-opt label { margin: 0 !important; } .cn-opt input { width: 18px; height: 18px; accent-color: #0b3a82; }
.cn-member .w-input:disabled { background: #f3f4f6; color: #374151; border-style: dashed; }
/* PC Health Check and Windows 11 Setup inside Windows */
.hc-sum { font-weight: 700; padding: 0.35rem 0.6rem; border-radius: 6px; }
.hc-sum.hc-ok { color: #14532d; background: #ecfdf3; border: 1px solid #15803d; box-shadow: inset 5px 0 0 #15803d; }
.hc-sum.hc-bad { color: #7f1d1d; background: #fdecea; border: 1px solid #b91c1c; box-shadow: inset 5px 0 0 #b91c1c; }
.hc-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.hc-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.5rem; padding: 0.3rem 0.5rem; border-radius: 6px; border: 1px solid #d1d5db; }
.hc-row.hc-ok .hc-mark { color: #14532d; font-weight: 700; }
.hc-row.hc-bad { background: #fdecea; border-color: #b91c1c; box-shadow: inset 5px 0 0 #b91c1c; color: #7f1d1d; } .hc-row.hc-bad .hc-mark { font-weight: 700; }
.w11s .ws-radios { margin: 0.3rem 0; }
/* Disk Management */
.dm-row { cursor: pointer; } .dm-row.sel { background: #e6edfb; box-shadow: inset 6px 0 0 #0b3a82; font-weight: 700; }
.dm-row:focus-visible { outline: 3px solid #4c1d95; outline-offset: -3px; }
.dm-disk { margin: 0.5rem 0 0.2rem; font-weight: 600; }
.dm-strip { display: flex; gap: 2px; min-height: 3rem; border: 1px solid #6b7280; border-radius: 6px; overflow: hidden; }
.dm-seg { display: flex; align-items: center; padding: 0.2rem 0.4rem; font-size: 0.85rem; background: #dbeafe; color: #111827; border-top: 6px solid #1e3a8a; min-width: 0; } .dm-seg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-seg.dm-unalloc { background: #f3f4f6; border-top-color: #111827; } .dm-seg.dm-linux { background: #ede9fe; border-top-color: #4c1d95; } .dm-seg.dm-data { background: #dcfce7; border-top-color: #14532d; }
/* GRUB and Ubuntu */
.grubm { flex: 1; background: #000000; color: #e5e7eb; padding: 1.4rem 1.6rem; font: 15px/1.5 Consolas, "Cascadia Mono", ui-monospace, monospace; display: grid; align-content: start; gap: 0.6rem; }
.grub-h { margin: 0; text-align: center; color: #ffffff; }
.grub-list { list-style: none; margin: 0; padding: 0.4rem; border: 1px solid #c8ced6; display: grid; gap: 0.35rem; }
/* each row keeps its own line height, so dyslexia spacing can't spill one
   row's text onto the next; only the selected row is inverted, as in GRUB */
.grub-btn { font: inherit; line-height: 1.4; width: 100%; text-align: left; min-height: 40px; padding: 0.35rem 0.6rem; background: #000000; color: #ffffff; border: 1px solid transparent; cursor: pointer; }
.grub-btn.first { background: #ffffff; color: #000000; }
.grub-btn:hover:not(.first) { border-color: #ffffff; }
.grub-btn:focus-visible { outline: 3px solid #ffe27a; outline-offset: 1px; }
.grub-foot { margin: 0; color: #e5e7eb; }
.ubuntu, .ubd { flex: 1; display: grid; place-items: center; padding: 1rem; background: #2b0b3f; }
.ubd { place-items: stretch; align-content: start; gap: 0.6rem; padding: 0 0 0.8rem; }
.ub-box { width: min(36rem, 100%); background: #ffffff; color: #111827; border: 1px solid #6b7280; border-radius: 10px; padding: 1rem 1.2rem; display: grid; gap: 0.55rem; justify-self: center; }
.ub-box p { margin: 0; } .ub-box label { font-weight: 600; }
.ub-brand { font-weight: 700; color: #4c1d95; }
.ub-box .w-btn:focus-visible, .ub-box .w-input:focus-visible, .ub-box .fw-sel:focus-visible { outline: 3px solid #4c1d95; outline-offset: 2px; }
.ub-box .fw-sel { border-color: #6b7280; }
.ubd-bar { display: flex; justify-content: space-between; background: #000000; color: #ffffff; padding: 0.3rem 0.8rem; font-weight: 600; }
.ub-term { margin: 0 0.8rem; background: #0c0c0c; color: #f2f2f2; border: 1px solid #6b7280; border-radius: 8px; font: 14.5px/1.45 "Ubuntu Mono", Consolas, ui-monospace, monospace; }
.ub-term-h { margin: 0; padding: 0.3rem 0.7rem; background: #2d2d2d; color: #ffffff; border-radius: 8px 8px 0 0; }
.ub-term-out { margin: 0; padding: 0.5rem 0.7rem 0; white-space: pre-wrap; word-break: break-word; max-height: 20rem; overflow: auto; font: inherit; }
.ub-prompt { white-space: pre; color: #bbf7d0; font-weight: 700; }
.ub-in { flex: 1; font: inherit; background: #0c0c0c; color: #ffffff; border: 0; outline: none; min-height: 30px; }
.ub-in:focus-visible { outline: 3px solid #ffe27a; }
.ubd > .ws-row { padding: 0 0.8rem; }
/* the Mac's screen (macui.js) */
.macs { min-height: 30rem; border-radius: 10px; padding: 1rem; display: grid; place-items: center; background: linear-gradient(135deg, #1e3a8a 0%, #3b1d72 60%, #14532d 100%); color: #111827; font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.macs.off { background: #050505; }
.mac-dark { color: #e5e7eb; margin: 0; text-align: center; max-width: 30rem; }
.mac-win { width: min(34rem, 100%); background: #f3f4f6; color: #111827; border: 1px solid #6b7280; border-radius: 12px; padding: 1rem 1.2rem; display: grid; gap: 0.55rem; }
.mac-win p { margin: 0; } .mac-win label { font-weight: 600; }
.mac-title { font-weight: 700; font-size: 1.15rem; }
.mac-sub { color: #374151; font-weight: 600; }
.mac-icons { display: flex; gap: 1rem; justify-content: center; }
.mac-icon { font: inherit; font-weight: 700; min-width: 8rem; min-height: 6rem; background: #ffffff; color: #111827; border: 1px solid #6b7280; border-radius: 12px; cursor: pointer; }
.mac-list { display: grid; gap: 0.4rem; }
.mac-item { font: inherit; text-align: left; min-height: 44px; padding: 0.4rem 0.8rem; background: #ffffff; color: #111827; border: 1px solid #6b7280; border-radius: 8px; cursor: pointer; }
.mac-item.on { background: #e6edfb; box-shadow: inset 6px 0 0 #0b3a82; font-weight: 700; border: 2px solid #0b3a82; }
.mac-du { display: grid; gap: 0.35rem; }
.mac-sheet { display: grid; gap: 0.45rem; border-top: 1px solid #6b7280; padding-top: 0.6rem; }
.mac-hello { font-size: 3rem; font-weight: 300; text-align: center; }
.mac-icon:focus-visible, .mac-item:focus-visible, .mac-win .w-btn:focus-visible, .mac-win .w-input:focus-visible, .mac-win .fw-sel:focus-visible, .mac-win .ws-radio:focus-visible { outline: 3px solid #4c1d95; outline-offset: 2px; }
/* Windows Update (FS2, FS3) */
.wu .wu-h { margin: 0.8rem 0 0.3rem; font-size: 1rem; }
.wu .wu-card { margin: 0.7rem 0; padding: 0.55rem 0.7rem; border: 1px solid #9ca3af; border-radius: 6px; background: #f8fafc; color: #111827; }
.wu .wu-card p { margin: 0.3rem 0 0.5rem; }
.wu .ev-table td { vertical-align: middle; }
