/* ==========================================================================
   Evil Penguin — retro desktop theme for Ghost
   1. Fonts  2. Tokens  3. Base  4. Menubar  5. Desktop & icons
   6. Windows  7. Skins  8. Reading view  9. Ghost cards  10. Boot / panic
   11. Mobile  12. Modal  13. Files  14. Mail  15. Me  16. Penguin eye  17. Plain (text only)
   ========================================================================== */

/* 1. Fonts — all bundled, OFL licensed */
@font-face { font-family: "Departure Mono"; src: url("../fonts/DepartureMono-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* 2. Tokens — dark is the base, light overrides */
:root {
    --bg: #0B0D0C;
    --ink: #F0EBDE;
    --win-bg: #121513;
    --dim: color-mix(in srgb, var(--ink) 60%, transparent);
    --line: color-mix(in srgb, var(--ink) 18%, transparent);
    --ok: #39FF88;
    --evil: #FF3B2F;
    --accent: var(--ghost-accent-color, var(--evil));
    --mono: var(--gh-font-heading, "Departure Mono"), ui-monospace, "SFMono-Regular", Menlo, monospace;
    --sans: var(--gh-font-body, "Atkinson Hyperlegible", system-ui, sans-serif);
    --serif: Charter, "Iowan Old Style", "Source Serif Pro", Georgia, serif;
    --read: var(--sans);
    --read-size: 1.0625rem;
    --bar-h: 30px;
    color-scheme: dark;
}
:root[data-scheme="Light"] { --bg: #E9E3D3; --ink: #0B0D0C; --win-bg: #FBF8F0; --ok: #0A8A43; color-scheme: light; }
@media (prefers-color-scheme: light) {
    :root[data-scheme="Auto"] { --bg: #E9E3D3; --ink: #0B0D0C; --win-bg: #FBF8F0; --ok: #0A8A43; color-scheme: light; }
}
:root[data-font="Serif"] { --read: var(--serif); }
:root[data-font="Mono"] { --read: var(--mono); }
:root[data-size="S"] { --read-size: 0.9375rem; }
:root[data-size="L"] { --read-size: 1.25rem; }

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.4 var(--mono);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
/* Ghost comments: an iframe whose color-scheme differs from the page gets an opaque white canvas (then dark-mode
   comments draw white text on white). Match the iframe's own document so it stays transparent. */
#ghost-comments-root iframe { color-scheme: light; }
.ep-px { image-rendering: pixelated; flex: none; }

/* 4. Menubar — <details> menus work without JS */
.ep-menubar {
    position: sticky; top: 0; z-index: 9000;
    height: var(--bar-h);
    display: flex; align-items: center; gap: 2px;
    padding: 0 8px;
    background: var(--win-bg);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
/* Modern skins: no rule under the menubar, just a soft shadow */
:is([data-skin="XP"], [data-skin="Vista"], [data-skin="Darwin"]) .ep-menubar { border-bottom: 0; box-shadow: 0 1px 6px rgb(0 0 0 / .25); }
.ep-menus { display: flex; }
.ep-menu { position: relative; }
.ep-menu > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    height: calc(var(--bar-h) - 6px); padding: 0 8px;
}
.ep-menu > summary::-webkit-details-marker { display: none; }
.ep-menu[open] > summary, .ep-menu > summary:hover { background: var(--ink); color: var(--win-bg); }
.ep-menu--brand .ep-px { width: 18px; height: auto; }
.ep-menu--brand .ep-logo { height: 18px; width: auto; max-width: 72px; object-fit: contain; }
.ep-menu__list {
    position: absolute; top: calc(100% + 3px); left: 0;
    min-width: 220px; padding: 4px;
    background: var(--win-bg);
    border: 1px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}
.ep-menu__list :is(a, button) {
    display: flex; justify-content: space-between; width: 100%;
    padding: 5px 10px; text-align: left; text-decoration: none;
}
.ep-menu__list :is(a, button):hover { background: var(--ink); color: var(--win-bg); }
.ep-menu__list ul { list-style: none; margin: 0; padding: 0; }
.ep-menu__list hr { border: 0; border-top: 1px dashed var(--line); margin: 4px 0; }
.ep-menu__note { margin: 4px 10px 8px; color: var(--dim); max-width: 32ch; }
kbd { font: inherit; color: var(--dim); }
.ep-path { margin-left: 8px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-tray { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.ep-tray__btn { display: grid; place-items: center; width: 26px; height: 24px; text-decoration: none; }
.ep-tray__btn:hover { background: var(--ink); color: var(--win-bg); }
.ep-clock { padding: 0 6px; font-variant-numeric: tabular-nums; }

/* 5. Desktop & icons */
.ep-desktop {
    position: relative;
    min-height: calc(100dvh - var(--bar-h));
    background: radial-gradient(var(--line) 1px, transparent 1.5px) 0 0 / 10px 10px, var(--bg);
}
/* Built-in wallpapers per skin (Retro = the dotted grid above). Each is two original SVGs from
   tools/wallpapers: the detailed static art, with a light "-fx" layer of moving parts on top.
   Only the active skin's files are downloaded. */
[data-skin="Linux"] .ep-desktop { background: url("../images/wallpapers/linux-light-fx.svg") 80% 50% / cover no-repeat, url("../images/wallpapers/linux-light.svg") 80% 50% / cover no-repeat, #E4D8AF; }
:root[data-skin="Linux"][data-scheme="Dark"] .ep-desktop { background: url("../images/wallpapers/linux-dark-fx.svg") 80% 50% / cover no-repeat, url("../images/wallpapers/linux-dark.svg") 80% 50% / cover no-repeat, #282828; }
@media (prefers-color-scheme: dark) {
    :root[data-skin="Linux"][data-scheme="Auto"] .ep-desktop { background: url("../images/wallpapers/linux-dark-fx.svg") 80% 50% / cover no-repeat, url("../images/wallpapers/linux-dark.svg") 80% 50% / cover no-repeat, #282828; }
}
/* XP layers, top to bottom: flag, birds, wind (sheen + tall swaying blades), land (transparent sky), drifting clouds, sky.
   Clouds pass behind the hill. */
[data-skin="XP"] .ep-desktop { background: url("../images/wallpapers/hills-flag.svg") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-fx.svg") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-wind.svg") 25% 50% / cover no-repeat, url("../images/wallpapers/hills.svg") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-clouds.svg") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-sky.svg") 25% 50% / cover no-repeat, #4E97EE; }
[data-skin="Vista"] .ep-desktop { background: url("../images/wallpapers/aurora.svg") 70% 50% / cover no-repeat, #0F6E73; }
[data-skin="Darwin"] .ep-desktop { background: url("../images/wallpapers/darwin.svg") center / cover no-repeat, #0E1230; }
/* Settings app -> Animations: Off. Each animated SVG is loaded as "#still", which stops it from inside. */
:root[data-motion="Off"][data-skin="XP"] .ep-desktop { background: url("../images/wallpapers/hills-flag.svg#still") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-fx.svg#still") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-wind.svg#still") 25% 50% / cover no-repeat, url("../images/wallpapers/hills.svg") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-clouds.svg#still") 25% 50% / cover no-repeat, url("../images/wallpapers/hills-sky.svg") 25% 50% / cover no-repeat, #4E97EE; }
:root[data-motion="Off"][data-skin="Linux"] .ep-desktop { background: url("../images/wallpapers/linux-light-fx.svg#still") 80% 50% / cover no-repeat, url("../images/wallpapers/linux-light.svg") 80% 50% / cover no-repeat, #E4D8AF; }
:root[data-motion="Off"][data-skin="Linux"][data-scheme="Dark"] .ep-desktop { background: url("../images/wallpapers/linux-dark-fx.svg#still") 80% 50% / cover no-repeat, url("../images/wallpapers/linux-dark.svg") 80% 50% / cover no-repeat, #282828; }
@media (prefers-color-scheme: dark) {
    :root[data-motion="Off"][data-skin="Linux"][data-scheme="Auto"] .ep-desktop { background: url("../images/wallpapers/linux-dark-fx.svg#still") 80% 50% / cover no-repeat, url("../images/wallpapers/linux-dark.svg") 80% 50% / cover no-repeat, #282828; }
}
:root[data-motion="Off"] *, :root[data-motion="Off"] *::before, :root[data-motion="Off"] *::after { animation: none !important; transition: none !important; }
/* Owner wallpapers from theme settings (inline --wp-* vars, absolute URLs): per skin, then "all" wins */
[data-skin="Retro"] .ep-desktop[style*="--wp-retro"] { background: var(--wp-retro) center / cover no-repeat, var(--bg) !important; }
[data-skin="Linux"] .ep-desktop[style*="--wp-linux"] { background: var(--wp-linux) center / cover no-repeat, var(--bg) !important; }
[data-skin="XP"] .ep-desktop[style*="--wp-xp"] { background: var(--wp-xp) center / cover no-repeat, var(--bg) !important; }
[data-skin="Vista"] .ep-desktop[style*="--wp-vista"] { background: var(--wp-vista) center / cover no-repeat, var(--bg) !important; }
[data-skin="Darwin"] .ep-desktop[style*="--wp-darwin"] { background: var(--wp-darwin) center / cover no-repeat, var(--bg) !important; }
:root .ep-desktop.ep-desktop[style*="--wp-all"] { background: var(--wp-all) center / cover no-repeat, var(--bg) !important; }
.ep-icons {
    display: grid; grid-template-columns: repeat(auto-fill, 92px);
    gap: 8px; padding: 16px;
}
.ep-icon {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 92px; padding: 8px 4px;
    text-align: center; text-decoration: none; font-size: 12px;
    color: var(--ink);
}
.ep-icon .ep-px { width: 48px; height: auto; max-height: 48px; color: var(--ink); }
.ep-icon__img { width: 48px; height: 48px; object-fit: cover; image-rendering: pixelated; border: 1px solid var(--ink); }
.ep-icon span {
    padding: 1px 4px; background: var(--bg);
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ep-icon:hover span, .ep-icon:focus-visible span { background: var(--ink); color: var(--bg); }

/* Icon sets per skin: pixel (.ep-px) for Retro/Linux, smooth (.ep-hd) for XP/Vista/Darwin */
.ep-hd { display: none; flex: none; width: 48px; height: 48px; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .35)); }
:is([data-skin="XP"], [data-skin="Vista"], [data-skin="Darwin"]) .ep-px:has(+ .ep-hd) { display: none; }
:is([data-skin="XP"], [data-skin="Vista"], [data-skin="Darwin"]) .ep-hd { display: block; }
:is([data-skin="XP"], [data-skin="Vista"], [data-skin="Darwin"]) .ep-icon__img { border: 0; border-radius: 6px; image-rendering: auto; box-shadow: 0 2px 4px rgb(0 0 0 / .4); }
:is([data-skin="XP"], [data-skin="Vista"], [data-skin="Darwin"]) .ep-icon span {
    background: none; color: #fff; text-shadow: 1px 1px 2px #000, 0 0 3px #000;
    font: 12px/1.3 system-ui, sans-serif; border-radius: 3px;
}
:root[data-skin="XP"] {
    --ico-user: #4C8BE0;
    --ico-folder: #F6D46A; --ico-folder-back: #E2B33F;
    --ico-paper: #FFFFFF; --ico-fold: #DCE6F4; --ico-edge: #7A8FB0; --ico-line: #6A8FCB;
    --ico-gear: #7C8DA6; --ico-accent: #3BA33B;
}
[data-skin="XP"] .ep-icon :is(span) { font-family: Tahoma, "Trebuchet MS", sans-serif; }
[data-skin="XP"] .ep-icon:is(:hover, :focus-visible) span { background: #316AC5; text-shadow: none; }
:root[data-skin="Vista"] {
    --ico-user: #3E9BD8;
    --ico-folder: #EFCB7C; --ico-folder-back: #CFA24C;
    --ico-paper: #F7FAFF; --ico-fold: #D5E2F2; --ico-edge: #8095B0; --ico-line: #4C7FC0;
    --ico-gear: #8A9AB0; --ico-accent: #2E9BD6;
}
[data-skin="Vista"] .ep-icon { border-radius: 4px; border: 1px solid transparent; }
[data-skin="Vista"] .ep-icon:is(:hover, :focus-visible) { background: linear-gradient(rgb(255 255 255 / .22), rgb(255 255 255 / .08)); border-color: rgb(255 255 255 / .35); }
[data-skin="Vista"] .ep-icon:is(:hover, :focus-visible) span { background: none; }
:root[data-skin="Darwin"] {
    --ico-user: #8E8E93;
    --ico-folder: #74BDF2; --ico-folder-back: #4E9FDF;
    --ico-paper: #FFFFFF; --ico-fold: #E6E6E6; --ico-edge: #A0A0A0; --ico-line: #B8B8B8;
    --ico-gear: #8E8E93; --ico-accent: #2F7CF6;
}
[data-skin="Darwin"] .ep-icon span { font-weight: 600; }
[data-skin="Darwin"] .ep-icon:is(:hover, :focus-visible) span { background: #2F6FE0; text-shadow: none; padding: 1px 6px; }
/* Linux: pixel icons in X11 / Motif colours */
[data-skin="Linux"] .ep-px:has(+ .ep-hd) { color: #000; --win-bg: #D7D2A8; --ok: #2F7D2F; }
[data-skin="Linux"] .ep-icon span { background: #000; color: #E8E8E8; font: 12px/1.3 "DejaVu Sans Mono", var(--mono); }
[data-skin="Linux"] .ep-icon:is(:hover, :focus-visible) span { background: #4C78A8; color: #fff; }

/* JS on: the desktop becomes a fixed screen, icons stack in a column on the left */
.js body { overflow: hidden; }
.js .ep-desktop { height: calc(100dvh - var(--bar-h)); overflow: hidden; }
.js .ep-icons {
    position: absolute; inset: 0 auto 0 0;
    grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 100px);
}
.ep-windows { padding: 16px; }
.js .ep-windows { position: absolute; inset: 0; padding: 0; pointer-events: none; }

/* 6. Windows — no JS: a centred document. JS: floating, draggable, CSS-resizable. */
.ep-window {
    display: flex; flex-direction: column;
    max-width: 780px; margin: 0 auto 24px;
    background: var(--win-bg); color: var(--ink);
    border: 1px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}
.js .ep-window {
    position: absolute; margin: 0; max-width: none; /* any size: resize, maximize or tile into all free space */
    width: min(760px, calc(100% - 140px)); height: min(80%, 760px);
    min-width: 300px; min-height: 180px;
    resize: both; overflow: hidden;
    pointer-events: auto;
}
.js .ep-window.is-max { inset: 0 !important; width: auto !important; height: auto !important; resize: none; }
.ep-window:not(.is-active) .ep-titlebar { opacity: .65; }
.ep-titlebar {
    flex: none; display: flex; align-items: center; gap: 8px;
    height: 26px; padding: 0 6px;
    border-bottom: 1px solid var(--ink);
    background: repeating-linear-gradient(var(--ink) 0 1px, transparent 1px 4px) 0 50% / 100% 13px no-repeat;
    user-select: none; touch-action: none;
}
.js .ep-titlebar { cursor: grab; }
.ep-titlebar__name { margin: 0 auto; padding: 0 8px; background: var(--win-bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-titlebar__name { display: inline-flex; align-items: center; gap: 6px; }
.ep-titlebar__name > [data-name] { overflow: hidden; text-overflow: ellipsis; }
.ep-titlebar__icon { display: inline-flex; flex: none; }
.ep-titlebar__icon :is(.ep-px, .ep-hd) { width: 16px; height: auto; max-height: 16px; filter: none; }
.ep-titlebar__controls { display: contents; }
.ep-ctl { flex: none; display: block; width: 14px; height: 14px; border: 1px solid var(--ink); background: var(--win-bg); }
.ep-ctl--close { order: -1; }
.ep-ctl--max::after { content: ""; display: block; margin: 3px; height: 6px; border: 1px solid var(--ink); }
.ep-window__body { flex: 1; overflow: auto; padding: 28px clamp(16px, 5%, 40px) 40px; overscroll-behavior: contain; }

/* 7. Skins — original homages, no vendor logos or wallpapers */
/* XP-like: blue gradient caption, beige frame */
[data-skin="XP"] :is(.ep-window:not(.ep-me), .ep-mini) { border: 3px solid #0831D9; border-top: 0; border-radius: 8px 8px 0 0; box-shadow: 0 8px 24px rgb(0 0 0 / .45); }
[data-skin="XP"] .ep-titlebar {
    height: 30px; border: 0; border-radius: 7px 7px 0 0; color: #fff;
    font: 700 13px/1 Tahoma, "Trebuchet MS", system-ui, sans-serif; text-shadow: 1px 1px #0F1089;
    background: linear-gradient(#0997FF, #0053EE 8%, #0050EE 40%, #0066FF 88%, #0066FF 93%, #005BFF 95%, #003DD7 96%, #003DD7);
}
[data-skin="XP"] .ep-titlebar__name { margin: 0 auto 0 0; background: none; padding: 0; }
[data-skin="XP"] .ep-ctl { order: 0; width: 21px; height: 21px; border: 1px solid #fff; border-radius: 3px; background: linear-gradient(#3C8CFF, #1E5DE6); }
[data-skin="XP"] .ep-ctl--close { order: 1; background: linear-gradient(#F08A6E, #D6431C); }
[data-skin="XP"] .ep-ctl--close::after { content: "✕"; display: grid; place-items: center; height: 100%; color: #fff; font: 700 12px/1 sans-serif; }
[data-skin="XP"] .ep-ctl--max::after { border: 2px solid #fff; border-top-width: 3px; margin: 4px; height: 9px; }

/* Vista-like: smoked glass frame */
[data-skin="Vista"] :is(.ep-window:not(.ep-me), .ep-mini) {
    border: 1px solid rgb(0 0 0 / .7); border-radius: 8px;
    padding: 0 7px 7px;
    background: linear-gradient(160deg, rgb(255 255 255 / .35), rgb(255 255 255 / 0) 40%), rgb(28 44 66 / .62);
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35), 0 10px 30px rgb(0 0 0 / .5);
}
[data-skin="Vista"] .ep-titlebar { height: 32px; border: 0; background: none; color: #fff; font: 13px/1 "Segoe UI", system-ui, sans-serif; text-shadow: 0 0 10px #fff; }
[data-skin="Vista"] .ep-titlebar__name { margin: 0 auto 0 0; background: none; }
[data-skin="Vista"] .ep-ctl { order: 0; width: 26px; height: 18px; border: 1px solid rgb(0 0 0 / .6); border-radius: 0 0 4px 4px; background: linear-gradient(rgb(255 255 255 / .5), rgb(255 255 255 / .1) 50%, rgb(0 0 0 / .2) 51%); }
[data-skin="Vista"] .ep-ctl--close { order: 1; width: 44px; background: linear-gradient(#E9A99C, #C8432F 50%, #B12A15 51%, #D3624C); }
[data-skin="Vista"] .ep-ctl--close::after { content: "✕"; display: grid; place-items: center; height: 100%; color: #fff; font: 700 11px/1 sans-serif; }
[data-skin="Vista"] .ep-ctl--max::after { border-color: #fff; margin: 3px 8px; height: 8px; }
[data-skin="Vista"] :is(.ep-window__body, .ep-mini__body) { border: 1px solid rgb(0 0 0 / .6); background: var(--win-bg); }

/* Linux: Motif/CDE-style bevels on the X11 checker root. Light and dark palettes. */
:root[data-skin="Linux"] {
    --lx-face: #D6D6D6; --lx-hi: #F2F2F2; --lx-lo: #6E6E6E; --lx-body: #E4E4E4;
    --lx-text: #111; --lx-dim: #444; --lx-line: #9A9A9A;
    --lx-title: #3A6EA5; --lx-title-hi: #8FB0D8; --lx-title-lo: #24406A;
    --lx-off: #8A8A8A; --lx-off-hi: #B8B8B8; --lx-off-lo: #555;
    --lx-btn: #C8C8C8; --lx-btn-hover: #E8E8E8; --lx-btn-down: #A8A8A8; --lx-scheme: light;
}
:root[data-skin="Linux"][data-scheme="Dark"] {
    --lx-face: #3A3D42; --lx-hi: #62676F; --lx-lo: #16181B; --lx-body: #25272B;
    --lx-text: #E4E4E4; --lx-dim: #A9ADB3; --lx-line: #4A4E55;
    --lx-title: #2B4E7A; --lx-title-hi: #5F86B8; --lx-title-lo: #12233A;
    --lx-off: #4A4D52; --lx-off-hi: #686C72; --lx-off-lo: #222;
    --lx-btn: #4A4E55; --lx-btn-hover: #5E636B; --lx-btn-down: #33363B; --lx-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root[data-skin="Linux"][data-scheme="Auto"] {
        --lx-face: #3A3D42; --lx-hi: #62676F; --lx-lo: #16181B; --lx-body: #25272B;
        --lx-text: #E4E4E4; --lx-dim: #A9ADB3; --lx-line: #4A4E55;
        --lx-title: #2B4E7A; --lx-title-hi: #5F86B8; --lx-title-lo: #12233A;
        --lx-off: #4A4D52; --lx-off-hi: #686C72; --lx-off-lo: #222;
        --lx-btn: #4A4E55; --lx-btn-hover: #5E636B; --lx-btn-down: #33363B; --lx-scheme: dark;
    }
}
[data-skin="Linux"] :is(.ep-window:not(.ep-me), .ep-mini) {
    --win-bg: var(--lx-face); --ink: var(--lx-text); --dim: var(--lx-dim); --line: var(--lx-line); --bg: var(--lx-face);
    color: var(--lx-text); background: var(--lx-face);
    border: 3px solid; border-color: var(--lx-hi) var(--lx-lo) var(--lx-lo) var(--lx-hi);
    padding: 2px; box-shadow: 2px 2px 0 #000; color-scheme: var(--lx-scheme);
}
[data-skin="Linux"] .ep-titlebar {
    height: 24px; margin-bottom: 2px; border: 2px solid; border-color: var(--lx-title-hi) var(--lx-title-lo) var(--lx-title-lo) var(--lx-title-hi);
    background: var(--lx-title); color: #fff; font: 700 12px/1 "DejaVu Sans", Helvetica, Arial, sans-serif;
}
[data-skin="Linux"] .ep-window:not(.is-active) .ep-titlebar { opacity: 1; background: var(--lx-off); border-color: var(--lx-off-hi) var(--lx-off-lo) var(--lx-off-lo) var(--lx-off-hi); }
[data-skin="Linux"] .ep-titlebar__name { background: none; }
[data-skin="Linux"] .ep-ctl { width: 16px; height: 16px; border: 2px solid; border-color: var(--lx-hi) var(--lx-lo) var(--lx-lo) var(--lx-hi); background: var(--lx-btn); }
[data-skin="Linux"] .ep-ctl--close::after { content: ""; display: block; margin: 4px; height: 4px; background: var(--lx-text); }
[data-skin="Linux"] .ep-ctl--max::after { margin: 2px; height: 8px; border: 1px solid var(--lx-text); }
[data-skin="Linux"] :is(.ep-window__body, .ep-mini__body) { border: 2px solid; border-color: var(--lx-lo) var(--lx-hi) var(--lx-hi) var(--lx-lo); background: var(--lx-body); }
[data-skin="Linux"] .ep-prose :is(h1, h2, h3, h4) { font-family: "DejaVu Sans", Helvetica, Arial, sans-serif; font-weight: 700; }

/* Darwin-like: pinstripe caption, traffic lights on the left */
[data-skin="Darwin"] :is(.ep-window:not(.ep-me), .ep-mini) { border: 1px solid rgb(0 0 0 / .35); border-radius: 8px; box-shadow: 0 18px 45px rgb(0 0 0 / .45); overflow: hidden; }
[data-skin="Darwin"] .ep-titlebar {
    height: 24px; border-bottom: 1px solid light-dark(#9A9A9A, #151515); color: light-dark(#222, #DDD);
    font: 13px/1 "Lucida Grande", "Helvetica Neue", system-ui, sans-serif;
    background: repeating-linear-gradient(light-dark(#EEE, #3A3A3C) 0 1px, light-dark(#E1E1E1, #343436) 1px 2px);
}
[data-skin="Darwin"] .ep-titlebar__name { background: none; }
[data-skin="Darwin"] .ep-titlebar__controls { display: flex; gap: 7px; order: -1; }
[data-skin="Darwin"] .ep-ctl { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .3); background: radial-gradient(circle at 50% 30%, #FFF8 0 25%, transparent 50%), #28C940; }
[data-skin="Darwin"] .ep-ctl--close { order: -1; background: radial-gradient(circle at 50% 30%, #FFF8 0 25%, transparent 50%), #FF5F57; }
[data-skin="Darwin"] .ep-ctl--max::after { display: none; }

/* Window controls: hover/press change only the button's background — the glyph stays crisp */
.ep-ctl { transition: background-color .12s, box-shadow .12s; }
.ep-ctl:hover { background: color-mix(in srgb, var(--ink) 18%, var(--win-bg)); }
.ep-ctl--close:hover { background: color-mix(in srgb, var(--evil) 45%, var(--win-bg)); }
.ep-ctl:active { background: color-mix(in srgb, var(--ink) 40%, var(--win-bg)); }
[data-skin="XP"] .ep-ctl:hover { background: linear-gradient(#6AAEFF, #3B78F2); }
[data-skin="XP"] .ep-ctl--close:hover { background: linear-gradient(#F9B8A3, #E86A44); }
[data-skin="XP"] .ep-ctl:active { background: linear-gradient(#1A4FC4, #2F6FE0); }
[data-skin="XP"] .ep-ctl--close:active { background: linear-gradient(#B8340F, #D4573A); }
[data-skin="Vista"] .ep-ctl:hover { background: linear-gradient(rgb(255 255 255 / .75), rgb(255 255 255 / .35) 50%, rgb(110 180 255 / .5) 51%); box-shadow: 0 0 8px rgb(140 200 255 / .8); }
[data-skin="Vista"] .ep-ctl--close:hover { background: linear-gradient(#F6C9BE, #E35E45 50%, #D63A1E 51%, #F59478); box-shadow: 0 0 12px #FF6A4D; }
[data-skin="Vista"] .ep-ctl:active { background: linear-gradient(rgb(255 255 255 / .3), rgb(0 0 0 / .25)); box-shadow: none; }
[data-skin="Vista"] .ep-ctl--close:active { background: linear-gradient(#B23A24, #8E2412 50%, #7A1A0A 51%, #A3402C); box-shadow: none; }
[data-skin="Darwin"] .ep-ctl:hover { background: radial-gradient(circle at 50% 30%, #FFF9 0 25%, transparent 50%), #4BDB60; }
[data-skin="Darwin"] .ep-ctl--close:hover { background: radial-gradient(circle at 50% 30%, #FFF9 0 25%, transparent 50%), #FF7E77; }
[data-skin="Darwin"] .ep-ctl:active { background: #1EA634; }
[data-skin="Darwin"] .ep-ctl--close:active { background: #D9443D; }
[data-skin="Linux"] .ep-ctl:hover { background: var(--lx-btn-hover); }
[data-skin="Linux"] .ep-ctl:active { background: var(--lx-btn-down); border-color: var(--lx-lo) var(--lx-hi) var(--lx-hi) var(--lx-lo); }

/* 8. Reading view — tuned by theme settings + visitor preferences */
.ep-prose { max-width: 68ch; margin: 0 auto; font: var(--read-size)/1.65 var(--read); }
.ep-prose :is(h1, h2, h3, h4) { font-family: var(--mono); font-weight: 400; line-height: 1.2; margin: 1.8em 0 .6em; }
.ep-prose h1 { font-size: 2em; margin-top: 0; }
.ep-prose h1:focus { outline: none; }
.ep-prose h2 { font-size: 1.4em; }
.ep-prose a { color: var(--accent); text-underline-offset: 3px; }
.ep-prose blockquote { margin: 1.5em 0; padding-left: 1em; border-left: 3px solid var(--accent); color: var(--dim); }
.ep-prose :is(code, pre, kbd) { font-family: var(--mono); font-size: .9em; }
.ep-prose :not(pre) > code { padding: .1em .35em; border: 1px solid var(--line); }
.ep-prose pre { padding: 1em; overflow-x: auto; background: var(--bg); border: 1px solid var(--line); }
.ep-prose hr { border: 0; border-top: 1px dashed var(--line); margin: 2.5em 0; }
.ep-prose figure { margin: 1.8em 0; }
.ep-prose figcaption { font: 12px/1.4 var(--mono); color: var(--dim); margin-top: .5em; text-align: center; }
.ep-meta { font: 12px/1.4 var(--mono); color: var(--dim); }
.ep-meta a { color: inherit; }
.ep-lede { font-size: 1.15em; color: var(--dim); }
.ep-ls { list-style: none; padding: 0; font-family: var(--mono); font-size: .9em; }
.ep-ls a { display: flex; justify-content: space-between; gap: 1em; padding: .45em 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: inherit; }
.ep-ls a:hover span { background: var(--ink); color: var(--win-bg); }
.ep-ls :is(time, small) { color: var(--dim); text-align: right; }
.ep-secondary ul { display: flex; flex-wrap: wrap; gap: 1em; list-style: none; padding: 0; font: 12px var(--mono); }
.pagination { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .85em; }
.ep-prefs fieldset { border: 1px solid var(--line); margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: .4em 1.2em; font: 13px var(--mono); }
.ep-btn { border: 1px solid var(--ink); padding: 6px 12px; font: 13px var(--mono); }
.ep-btn:hover { background: var(--ink); color: var(--win-bg); }

/* 9. Ghost cards — required width classes */
.kg-width-wide { width: min(100%, 960px); margin-inline: auto; }
.kg-width-full { width: 100%; }
.ep-prose .kg-width-wide, .ep-prose .kg-width-full { max-width: none; }
.kg-image { display: block; margin-inline: auto; }

/* 10. Boot / kernel panic */
.ep-boot { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: #000; color: var(--ok); font: 15px/1.7 var(--mono); cursor: pointer; }
.ep-boot.is-done { opacity: 0; transition: opacity .35s; }
.ep-boot__screen { width: min(560px, 90vw); }
.ep-boot__screen .ep-px { width: 48px; height: auto; margin-bottom: 12px; }
.ep-boot__screen .ep-logo { display: block; height: 48px; width: auto; max-width: 160px; object-fit: contain; margin-bottom: 12px; }
.ep-boot__screen p { margin: 0; opacity: 0; animation: ep-line 0s calc(var(--i, 0) * 160ms) forwards; }
.ep-ok { display: flex; gap: 1ch; }
.ep-ok::before { content: ""; order: 1; flex: 1; border-bottom: 2px dotted; margin-bottom: .45em; opacity: .5; }
.ep-ok::after { content: "OK"; order: 2; }
.ep-boot__skip { margin-top: 1.5em !important; color: color-mix(in srgb, var(--ok) 50%, transparent); }
.ep-caret { animation: ep-blink 1s steps(1) infinite; }
@keyframes ep-line { to { opacity: 1; } }
@keyframes ep-blink { 50% { opacity: 0; } }
.ep-panic { display: grid; place-items: center; min-height: 100dvh; background: #000; color: var(--evil); font: 15px/1.7 var(--mono); padding: 16px; }
.ep-panic a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 16. The Linux penguin's live eye (laid over the wallpaper by desktop.js). Colours match linux.py. */
/* --sore (0..1) is set by desktop.js: each poke adds ~11%, healing removes ~5% every 4 s, so it already changes gently */
.ep-torus { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.ep-eye { position: absolute; z-index: 0; --white: #F3ECD2; --ink: #141414; --sore: 0; }
:root[data-scheme="Dark"] .ep-eye { --white: #282828; --ink: #EADFB8; }
@media (prefers-color-scheme: dark) { :root[data-scheme="Auto"] .ep-eye { --white: #282828; --ink: #EADFB8; } }
.ep-eye i { position: absolute; display: block; border-radius: 50%; }
.ep-eye__ball { inset: 0; overflow: hidden; background: color-mix(in srgb, #D8584E calc(var(--sore) * 32%), var(--white)); }
.ep-eye__veins { inset: 0; opacity: calc(var(--sore) * .6);
    background: repeating-conic-gradient(from 8deg, transparent 0 17deg, rgb(196 34 30 / .55) 17deg 19deg);
    -webkit-mask: radial-gradient(circle, transparent 42%, #000 72%); mask: radial-gradient(circle, transparent 42%, #000 72%); }
.ep-eye__pupil { width: 46%; height: 46%; left: 27%; top: 27%; background: var(--ink); transition: transform .12s ease-out; }
.ep-eye__lid { inset: -12%; background: var(--ink); transform: scaleY(0); transform-origin: 50% 0; transition: transform .07s ease-in; }
.ep-eye.is-blink .ep-eye__lid { transform: scaleY(1); }
.ep-eye.is-hurt .ep-eye__lid { transform: scaleY(1); transition-duration: .03s; }
.ep-eye.is-hurt { animation: ep-flinch .3s; }
@keyframes ep-flinch { 25% { translate: .6px -.8px; } 60% { translate: -.4px .3px; } }
/* The dot eye: a patch of head colour hides the drawn dot, a live dot moves inside it, the lid is head-coloured
   with a thin lash line, and soreness darkens the dot towards red with a faint pink halo. */
/* the theme's own Linux art: a cream dot on a black head (light), a dark dot on a cream head (dark) */
.ep-eye--builtin { --eye: #F3ECD2; --skin: #141414; }
:root[data-scheme="Dark"] .ep-eye--builtin { --eye: #282828; --skin: #EADFB8; }
@media (prefers-color-scheme: dark) { :root[data-scheme="Auto"] .ep-eye--builtin { --eye: #282828; --skin: #EADFB8; } }
.ep-eye--dot .ep-eye__ball { background: var(--skin); }
.ep-eye--dot .ep-eye__pupil { width: 59%; height: 59%; left: 20.5%; top: 20.5%; background: color-mix(in srgb, #9C1A14 calc(var(--sore) * 55%), var(--eye)); }
.ep-eye--dot .ep-eye__veins { inset: 4%; background: radial-gradient(circle, rgb(214 84 70 / .6) 28%, transparent 70%); -webkit-mask: none; mask: none; opacity: calc(var(--sore) * .55); }
.ep-eye--dot .ep-eye__lid { inset: 2%; background: var(--skin); box-shadow: inset 0 -1.2px 0 var(--eye); }

/* 12. Modal windows (posts, Me): a native <dialog>; everything behind is inert and dimmed */
dialog.ep-modal {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: hidden;
}
dialog.ep-modal::backdrop { background: rgb(0 0 0 / .45); backdrop-filter: blur(5px) grayscale(.3); }
[data-skin="Retro"] dialog.ep-modal::backdrop { background: repeating-conic-gradient(rgb(0 0 0 / .6) 0 25%, rgb(0 0 0 / .2) 0 50%) 0 0 / 4px 4px; backdrop-filter: none; }
[data-skin="Linux"] dialog.ep-modal::backdrop { background: repeating-conic-gradient(rgb(0 0 0 / .55) 0 25%, rgb(0 0 0 / .3) 0 50%) 0 0 / 2px 2px; backdrop-filter: none; }
dialog.ep-modal:has(.ep-me)::backdrop { background: rgb(0 0 0 / .55); backdrop-filter: blur(14px) grayscale(.4); }
.ep-window.is-shaking { animation: ep-shake .4s; }
@keyframes ep-shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }

/* 13. Files app — one markup, dressed per skin */
.ep-window__body--flush { padding: 0; display: flex; }
.js .ep-window:has(.ep-files) { width: min(720px, calc(100% - 140px)); height: min(480px, 75%); }
.ep-files { display: flex; flex: 1; min-height: 0; font: 13px/1.3 var(--mono); }
.ep-files__side { flex: none; width: 150px; padding: 10px 8px; border-right: 1px solid var(--line); overflow: auto; background: color-mix(in srgb, var(--ink) 7%, var(--win-bg)); }
.ep-files__heading { margin: 0 0 6px; padding: 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.ep-files__side button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; text-align: left; }
.ep-files__side button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-files__side :is(.ep-px, .ep-hd), .ep-files__path :is(.ep-px, .ep-hd) { width: 18px; height: auto; filter: none; }
.ep-files__path > span { overflow: hidden; text-overflow: ellipsis; }
.ep-files__side button:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.ep-files__side button[aria-current="true"] { background: var(--sel, var(--ink)); color: var(--sel-ink, var(--win-bg)); }
.ep-files__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ep-files__bar { flex: none; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ep-files__path { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); background: var(--bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-files__pane { flex: 1; overflow: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, 96px); align-content: start; gap: 6px; }
.ep-files__status { flex: none; padding: 4px 10px; border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--dim); }
.ep-files .ep-icon { width: 96px; color: inherit; border: 0; }
.ep-files .ep-icon span { background: none; color: inherit; text-shadow: none; font: 12px/1.3 inherit; }
.ep-files .ep-icon:is(:hover, :focus-visible) { background: none; }
.ep-files .ep-icon:is(:hover, :focus-visible) span { background: var(--sel, var(--ink)); color: var(--sel-ink, var(--win-bg)); }
/* Skins below use light-dark(): each colour follows the active scheme (root color-scheme).
   In dark mode the sidebar sits a step lighter than the content pane, like the real systems. */
/* XP: blue task pane + beige address bar */
[data-skin="XP"] .ep-files { --sel: #316AC5; --sel-ink: #fff; font-family: Tahoma, "Trebuchet MS", sans-serif; }
[data-skin="XP"] .ep-files__side { background: linear-gradient(light-dark(#7BA2E7, #2C406A), light-dark(#6375D6, #1E2B4A)); color: light-dark(#fff, #DCE6F8); border: 0; }
[data-skin="XP"] .ep-files__heading { color: inherit; font-weight: 700; text-transform: none; letter-spacing: 0; }
[data-skin="XP"] .ep-files__side button { border-radius: 3px; }
[data-skin="XP"] .ep-files__side button[aria-current="true"] { background: rgb(255 255 255 / .28); color: #fff; }
[data-skin="XP"] :is(.ep-files__bar, .ep-files__status) { background: light-dark(#ECE9D8, #2B2A26); color: light-dark(#000, #E6E3D6); border-color: light-dark(#ACA899, #46443D); }
[data-skin="XP"] .ep-files__path { background: light-dark(#fff, #191917); border-color: light-dark(#7F9DB9, #4A6585); color: light-dark(#000, #EEE); }
/* Vista: soft blue navigation pane, glassy bars */
[data-skin="Vista"] .ep-files { --sel: light-dark(#CCE4FF, #264A75); --sel-ink: light-dark(#000, #fff); font-family: "Segoe UI", system-ui, sans-serif; }
[data-skin="Vista"] .ep-files__side { background: linear-gradient(light-dark(#EEF4FB, #1F2A3A), light-dark(#DCE7F5, #18212E)); color: light-dark(#1E395B, #C9DAF0); border-color: light-dark(#A9BCD6, #2F3C4F); }
[data-skin="Vista"] .ep-files__heading { color: light-dark(#4A6385, #8FA7C6); }
[data-skin="Vista"] .ep-files__side button { border-radius: 3px; border: 1px solid transparent; }
[data-skin="Vista"] .ep-files__side button[aria-current="true"] { border-color: light-dark(#84ACDD, #3D6EA8); background: linear-gradient(light-dark(#F1F7FE, #2C4769), light-dark(#CFE3FB, #223A5C)); color: light-dark(#000, #fff); }
[data-skin="Vista"] :is(.ep-files__bar, .ep-files__status) { background: linear-gradient(light-dark(#F7FAFE, #242E3B), light-dark(#E1EAF5, #1B232E)); color: light-dark(#1E395B, #C9DAF0); border-color: light-dark(#A9BCD6, #2F3C4F); }
[data-skin="Vista"] .ep-files__path { background: light-dark(#fff, #10151C); color: light-dark(#000, #E8EEF6); border-color: light-dark(#8EA4C1, #3A4A60); border-radius: 2px; }
/* Darwin: Finder sidebar, pinstripe toolbar, pill path */
[data-skin="Darwin"] .ep-files { --sel: #2F6FE0; --sel-ink: #fff; font-family: "Lucida Grande", "Helvetica Neue", system-ui, sans-serif; }
[data-skin="Darwin"] .ep-files__side { background: light-dark(#E3E8EE, #2B2E33); color: light-dark(#333, #D8D8DA); border-color: light-dark(#B5B5B5, #101010); }
[data-skin="Darwin"] .ep-files__heading { font-weight: 700; color: light-dark(#6E7A88, #8D939B); }
[data-skin="Darwin"] .ep-files__side button { border-radius: 5px; }
[data-skin="Darwin"] .ep-files__bar { background: repeating-linear-gradient(light-dark(#EEE, #3A3A3C) 0 1px, light-dark(#E3E3E3, #343436) 1px 2px); border-color: light-dark(#9A9A9A, #151515); }
[data-skin="Darwin"] .ep-files__path { justify-content: center; border-radius: 999px; background: light-dark(#fff, #1E1E1F); color: light-dark(#333, #DDD); border-color: light-dark(#A8A8A8, #4A4A4A); }
[data-skin="Darwin"] .ep-files__status { background: light-dark(#E8E8E8, #2A2A2C); color: light-dark(#555, #AAA); text-align: center; border-color: light-dark(#B5B5B5, #151515); }
/* Linux: Motif panes with bevels */
[data-skin="Linux"] .ep-files { --sel: var(--lx-title); --sel-ink: #fff; }
[data-skin="Linux"] .ep-files__side { background: var(--lx-face); border-right: 2px solid; border-color: var(--lx-lo); }
[data-skin="Linux"] .ep-files__side button { margin-bottom: 3px; border: 2px solid; border-color: var(--lx-hi) var(--lx-lo) var(--lx-lo) var(--lx-hi); background: var(--lx-btn); }
[data-skin="Linux"] .ep-files__side button[aria-current="true"] { border-color: var(--lx-lo) var(--lx-hi) var(--lx-hi) var(--lx-lo); background: var(--lx-btn-down); color: inherit; }
[data-skin="Linux"] :is(.ep-files__bar, .ep-files__status) { background: var(--lx-face); border-color: var(--lx-lo); }
[data-skin="Linux"] .ep-files__path { border: 2px solid; border-color: var(--lx-lo) var(--lx-hi) var(--lx-hi) var(--lx-lo); background: var(--lx-body); }

/* 14. Mail app */
.js .ep-window:has(.ep-mail) { width: min(560px, calc(100% - 140px)); height: min(520px, 80%); }
.js .ep-window:has(.ep-prefs) { width: min(520px, calc(100% - 140px)); height: min(600px, 85%); }
.ep-mail { display: flex; flex-direction: column; flex: 1; min-height: 0; font: 13px var(--mono); }
.ep-mail__row { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.ep-mail__row:focus-within { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ep-mail__row > span { flex: none; width: 92px; color: var(--dim); }
.ep-mail :is(input, textarea) { flex: 1; min-width: 0; padding: 4px 0; font: inherit; color: inherit; background: transparent; border: 0; outline: none; }
.ep-mail input[readonly] { color: var(--dim); }
.ep-mail__body { flex: 1; display: flex; padding: 12px 14px; min-height: 0; }
.ep-mail textarea { resize: none; font: var(--read-size)/1.6 var(--read); }
.ep-mail__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); }
.ep-mail__foot small { color: var(--dim); }
.ep-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 15. Me app — full-screen scroll story; timeline windows stack as sticky cards */
.js .ep-window.ep-me { inset: 0 !important; width: auto; height: auto; min-width: 0; resize: none; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.ep-me__close {
    position: absolute; top: 16px; left: 16px; z-index: 5;
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    background: var(--win-bg); color: var(--ink); border: 1px solid var(--line); text-decoration: none; font-size: 18px;
    transition: background-color .15s;
}
.ep-me__close:hover { background: color-mix(in srgb, var(--ink) 16%, var(--win-bg)); }
.ep-me__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 80px clamp(16px, 6vw, 96px) 40vh; }
.ep-me__hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 28px; align-items: start; max-width: 1200px; margin: 0 auto; }
.ep-mini { background: var(--win-bg); color: var(--ink); border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.ep-mini .ep-titlebar { cursor: default; }
.ep-mini__body { padding: 20px 24px; }
.ep-mini__body > img, .ep-me__portrait { display: block; width: 100%; max-height: 46vh; object-fit: contain; margin: 0 auto 16px; }
.ep-me__index { list-style: none; margin: 0; padding: 8px; }
.ep-me__index a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: inherit; text-decoration: none; font: 13px var(--mono); }
.ep-me__index a:hover { background: var(--sel, var(--ink)); color: var(--sel-ink, var(--win-bg)); }
.ep-me__index :is(.ep-px, .ep-hd) { width: 16px; height: auto; filter: none; }
.ep-me__banner {
    margin: 22vh 0 4vh; text-align: center; text-transform: uppercase; overflow-wrap: anywhere;
    font: clamp(48px, 13vw, 220px)/.9 var(--mono); color: transparent; opacity: .75;
    background: radial-gradient(var(--ink) 1.2px, transparent 1.7px) 0 0 / 6px 6px; -webkit-background-clip: text; background-clip: text;
}
.ep-me__hint { margin: 0 0 22vh; text-align: center; font: 12px var(--mono); color: var(--dim); }
.ep-me__timeline { max-width: 1100px; margin: 0 auto; }
.ep-me__entry {
    position: sticky; top: calc(24px + var(--i) * 30px);
    display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 380px); gap: 0 32px; align-items: start;
    margin-bottom: 60vh; padding-left: calc(var(--i) * 20px);
}
.ep-mini--side { margin-top: 140px; }
.js [data-reveal] { opacity: 0; translate: 0 70px; rotate: -1.5deg; transition: opacity .5s, translate .7s cubic-bezier(.2, .8, .2, 1), rotate .7s cubic-bezier(.2, .8, .2, 1); }
.js .ep-mini--side[data-reveal] { translate: 140px 0; rotate: 2deg; }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; rotate: 0deg; }

/* 11. Mobile — windows go full screen, menus collapse to the essentials */
@media (max-width: 720px) {
    .ep-menu--wide, .ep-path, .ep-clock { display: none; }
    .ep-menu > summary { padding: 0 6px; }
    .ep-menu--brand b { display: none; }
    .js .ep-icons { position: static; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, 84px); justify-content: center; overflow-y: auto; height: 100%; }
    .ep-icon { width: 84px; }
    .js .ep-window { inset: 0 !important; width: auto !important; height: auto !important; resize: none; min-width: 0; box-shadow: none; border-radius: 0; }
    .js .ep-titlebar { cursor: default; }
    .ep-files__side { width: 118px; padding: 10px 4px; }
    .ep-files__side button { gap: 6px; padding: 5px 4px; }   /* room for "projects" even with Linux's bevel */
    .ep-me__hero, .ep-me__entry { grid-template-columns: minmax(0, 1fr); }
    .ep-me__entry { padding-left: 0; top: calc(12px + var(--i) * 18px); }
    .ep-mini--side { margin-top: 16px; }
}

/* 17. Plain — text only. A notepad with tabs: every window is a tab, images become their alt text,
   nothing moves, links are always underlined. Built for screen readers, keyboards and zoom. */
.ep-skip { position: absolute; left: 8px; top: -100px; z-index: 10001; padding: 8px 12px; background: var(--ink); color: var(--win-bg); }
.ep-skip:focus { top: 8px; }
.ep-tabs, .ep-alt { display: none; }

:root[data-skin="Plain"] { --tab-h: 38px; }
[data-skin="Plain"] *, [data-skin="Plain"] *::before, [data-skin="Plain"] *::after { animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; }
/* Only the theme's own content: Ghost's Portal (subscribe) and Search popups are iframes and must stay visible */
[data-skin="Plain"] :is(.ep-menubar, .ep-desktop, dialog) :is(img, svg, picture, video, canvas, iframe) { display: none !important; }
[data-skin="Plain"] .ep-alt { display: block; margin: .5em 0; color: var(--dim); font-family: var(--mono); }
[data-skin="Plain"] :focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[data-skin="Plain"] a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
[data-skin="Plain"] .ep-menu--brand b { display: inline; }
:root[data-skin="Plain"] .ep-desktop.ep-desktop { background: var(--win-bg) !important; }

/* Tab strip */
.js[data-skin="Plain"] .ep-tabs { display: block; position: absolute; inset: 0 0 auto; z-index: 1; height: var(--tab-h); overflow: auto hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.ep-tabs ul { display: flex; height: 100%; margin: 0; padding: 0 0 0 4px; list-style: none; }
.ep-tab { display: flex; flex: none; max-width: 260px; border-right: 1px solid var(--line); font: 13px var(--mono); }
.ep-tab button { color: var(--dim); }
.ep-tab button:first-child { padding: 0 4px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-tab [data-close] { min-width: 32px; font-size: 16px; }
.ep-tab:has([aria-current]) { background: var(--win-bg); border-top: 2px solid var(--ink); margin-bottom: -1px; }
.ep-tab:has([aria-current]) button, .ep-tab button:hover { color: var(--ink); }
.ep-tab button:first-child:hover { text-decoration: underline; }

/* Windows: one full-size page at a time, no chrome */
.js[data-skin="Plain"] .ep-windows { inset: var(--tab-h) 0 0; }
.js[data-skin="Plain"] .ep-window { inset: 0 !important; width: auto !important; height: auto !important; min-width: 0; resize: none; border: 0; border-radius: 0; background: var(--win-bg); backdrop-filter: none; }
.js[data-skin="Plain"] .ep-window:not(.is-active) { display: none; }
[data-skin="Plain"] .ep-window > .ep-titlebar { display: none; }
[data-skin="Plain"] .ep-window__body { border: 0 !important; background: none !important; padding: 32px clamp(16px, 5%, 48px) 64px; }

/* With no tabs open: the desktop icons are a plain list of links */
.js[data-skin="Plain"] .ep-icons { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; overflow-y: auto; padding: calc(var(--tab-h) + 24px) clamp(16px, 5%, 48px); }
[data-skin="Plain"] .ep-icon { flex-direction: row; width: auto; padding: 6px 0; text-align: left; font: var(--read-size)/1.5 var(--read); }
[data-skin="Plain"] .ep-icon span { display: inline; padding: 0 !important; background: none !important; color: var(--ink) !important; font: inherit !important; text-decoration: underline; text-underline-offset: 3px; }

/* Me: the scroll story becomes one long document */
[data-skin="Plain"] :is(.ep-me__close, .ep-me__banner, .ep-me__hint) { display: none; }
[data-skin="Plain"] .ep-me__scroll { padding: 32px clamp(16px, 5%, 48px) 64px; }
[data-skin="Plain"] :is(.ep-me__hero, .ep-me__entry) { display: block; position: static; max-width: 68ch; margin: 0 auto 2em; padding: 0; }
[data-skin="Plain"] .ep-mini { margin: 0 0 1.5em; border: 0; background: none; }
[data-skin="Plain"] .ep-mini__body { padding: 0; }
[data-skin="Plain"] .ep-mini > .ep-titlebar { display: block; height: auto; padding: 0 0 .3em; margin-bottom: .8em; border: 0; border-bottom: 1px dashed var(--line); background: none; color: var(--dim); font: 13px var(--mono); }
[data-skin="Plain"] .ep-mini .ep-titlebar__name { margin: 0; padding: 0; background: none; }
[data-skin="Plain"] [data-reveal] { opacity: 1 !important; translate: none !important; rotate: none !important; }
