/* ---------- screens: boot, welcome, turn off ---------- */
.screen { position: absolute; inset: 0; z-index: 100; }
.word { font: 700 46px/1 "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -1px; white-space: nowrap; }
.word span { margin-left: 3px; color: var(--boot-accent); font-size: 0.56em; font-style: italic; vertical-align: super; }
.edition { font: italic 15px/1 "Trebuchet MS", Tahoma, sans-serif; color: var(--boot-dim); }

/* The boot screen wears the Switchback Labs brand (the site-rebrand spec's "Where it applies"): the mark on Graphite,
   Besley and Overpass Mono from the same self-hosted files as the front page, a ramp for a progress bar, and the
   credit line. Every skin boots on the same Graphite, so it reads the same on all of them. The log-on screen and the
   desktop keep their retro look. */
@font-face { font-family: "Besley"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/Besley-700-1ec966cb.woff2") format("woff2"); }
@font-face { font-family: "Besley"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/Besley-400-italic-b3663e10.woff2") format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/OverpassMono-600-08d009b7.woff2") format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/OverpassMono-700-17222411.woff2") format("woff2"); }
#boot { --boot-fg: #F4EFE6; --boot-dim: #A89C88; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1F1D1A; color: var(--boot-fg); cursor: pointer; }
.boot-c { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-inline: 16px; text-align: center; }
.boot-logo { width: 86px; height: 86px; margin-bottom: 6px; }
#boot .word { font: 700 46px/1 "Besley", Georgia, serif; letter-spacing: -0.01em; }
#boot .word span { margin-left: 0.22em; color: inherit; font-size: 1em; font-weight: 400; font-style: italic; vertical-align: baseline; }
#boot .edition { font: 700 14px/1 "Overpass Mono", ui-monospace, monospace; letter-spacing: 0.14em; color: #C6D05A; }
/* A ramp, low on the left and high on the right like the mark's, filling with Lichen while the OS loads. */
.boot-bar { position: relative; width: 170px; height: 22px; margin-top: 40px; background: #5C564D; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.boot-bar i { position: absolute; inset: 0; background: #C6D05A; transform-origin: left; animation: boot-ramp 2.4s ease-out infinite; }
@keyframes boot-ramp { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .boot-bar i { animation: none; transform: scaleX(0.6); } }
.boot-foot { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: 18px; display: flex; justify-content: space-between; gap: 12px; margin: 0; font: 12px/1.3 Tahoma, sans-serif; color: var(--boot-dim); }
#welcome { display: grid; grid-template-rows: 78px minmax(0, 1fr) 78px; background: var(--wel-band); color: var(--wel-fg); font-family: var(--ui-font); }
.wel-band { position: relative; background: var(--wel-band); }
.wel-top::after, .wel-bot::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; }
.wel-top::after { bottom: 0; background: var(--wel-line-top); }
.wel-bot::before { top: 0; background: var(--wel-line-bot); }
.wel-mid { display: flex; align-items: center; justify-content: center; gap: 40px; padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--wel-mid); overflow: auto; }
.wel-left { flex: 1; max-width: 380px; display: flex; flex-direction: column; align-items: flex-end; gap: 18px; text-align: right; }
.wel-logo { display: flex; align-items: center; gap: 12px; }
.wel-logo .ico { width: 62px; height: 62px; }
.wel-logo .word { font-size: 38px; }
.wel-logo .edition { display: block; margin-top: 6px; color: inherit; opacity: 0.8; }
.wel-left p { margin: 0; font-size: 19px; }
.wel-div { align-self: stretch; width: 2px; margin: 30px 0; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.7), transparent); }
.wel-right { flex: 1; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.wel-user { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px; background: none; border: 0; border-radius: 8px; color: inherit; text-align: left; }
.wel-user:hover, .wel-user:focus-visible { background: rgba(255, 255, 255, 0.14); outline: none; }
.wel-pic { width: 62px; height: 62px; flex: none; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.wel-pic .ico { width: 100%; height: 100%; }
.wel-user b { display: block; font-size: 20px; }
.wel-user small { opacity: 0.85; }
.wel-pass { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 0 84px; }
.wel-pass .field { width: 180px; }
.wel-go { width: 28px; height: 28px; padding: 0; background: none; border: 0; }
.wel-go svg { width: 100%; height: 100%; }
.wel-hint { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; }
.wel-out { margin-left: 84px; }
.wel-out:empty { display: none; }
.wel-bot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wel-off { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: none; border: 0; border-radius: 4px; color: inherit; font-size: 15px; }
.wel-off:hover { background: rgba(255, 255, 255, 0.12); }
.wel-off .ico { width: 30px; height: 30px; }
.wel-bot p { max-width: 380px; margin: 0; font-size: 13px; text-align: right; opacity: 0.85; }
#turnoff { position: absolute; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(0, 0, 0, 0.25); }
.to-dlg { width: min(340px, calc(100% - 32px)); overflow: hidden; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.to-dlg header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--wel-band); color: var(--wel-fg); font-size: 16px; }
.to-dlg header .ico { width: 28px; height: 28px; }
.to-btns { display: flex; justify-content: space-around; padding: 22px 10px; background: var(--to-mid); color: var(--to-fg); }
.to-btns button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; background: none; border: 0; border-radius: 6px; color: inherit; font-size: var(--small-size); }
.to-btns button:hover .ico { filter: brightness(1.15); }
.to-btns .ico { width: 42px; height: 42px; }
.to-dlg footer { display: flex; justify-content: flex-end; padding: 8px 12px; background: var(--wel-band); }
#os.dim #desktop, #os.dim #taskbar { filter: grayscale(1) brightness(0.7); transition: filter 1s; }
#off { display: grid; place-content: center; gap: 10px; padding: 24px; background: #000000; color: var(--shut-fg); font: 700 22px/1.4 "Trebuchet MS", Tahoma, sans-serif; text-align: center; cursor: pointer; }
#off p { margin: 0; }
#off small { font: 400 13px/1.4 Tahoma, sans-serif; color: var(--boot-dim); }
#off.shutting { background: var(--wel-mid); color: var(--wel-fg); cursor: progress; }
#standby { display: grid; place-items: center; background: #000000; color: #5a5a5a; font: 14px/1.4 Tahoma, sans-serif; cursor: pointer; }

/* screen saver and the crash */
/* Pointer trails: ghost arrows over everything on the desktop, never in the way of a click. */
#trails { position: absolute; inset: 0; z-index: 97; pointer-events: none; }
#trails svg { position: absolute; left: 0; top: 0; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.25)); }
#saver { z-index: 120; overflow: hidden; background: #000000; cursor: none; }
#saver canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.saver-logo { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; color: #ffffff; font: 700 30px/1 "Trebuchet MS", Tahoma, sans-serif; white-space: nowrap; will-change: transform; }
.saver-logo .ico { width: 58px; height: 58px; }
.saver-logo em { margin-left: 3px; font-size: 0.6em; vertical-align: super; }
.saver-corner { position: absolute; left: 50%; top: 50%; color: #ffffff; font: 700 30px/1 "Trebuchet MS", Tahoma, sans-serif; opacity: 0; transform: translate(-50%, -50%); }
.saver-corner.show { animation: pop 1.4s ease-out; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
#bsod { z-index: 130; display: grid; place-content: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: #0000aa; color: #ffffff; font: 16px/1.5 "Lucida Console", "Courier New", monospace; cursor: default; }
#bsod > div { max-width: 640px; }
#bsod h2 { width: max-content; margin: 0 auto 22px; padding: 0 8px; background: #aaaaaa; color: #0000aa; font: inherit; font-weight: 700; }
#bsod p { margin: 0 0 16px; }
.bs-cont { text-align: center; }
.bs-cont::after { content: "_"; animation: blink 1s steps(2) infinite; }

/* a little CRT for The Matrix */
[data-skin="matrix"] #os::after { content: ""; position: absolute; inset: 0; z-index: 96; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px); }
.wel-plain { align-self: flex-start; margin: 6px 0 0 8px; color: inherit; font-size: 13px; opacity: 0.85; }
.wel-plain:hover { opacity: 1; }
