@font-face { font-family: "TermArabic"; src: url(../os/static/media/IBMPlexSansArabic-Regular.7ab815b5661fbfaf3e01.ttf) format("truetype"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; font-display: block; }
/* FahadOS 98 — Windows 95 desktop with a 90s-web "Showcase" window */

@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-full.woff2) format("woff2"); font-weight: 100 900; font-display: block; }
@font-face { font-family: "Tinos"; src: url(fonts/tinos-400.woff2) format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Tinos"; src: url(fonts/tinos-700.woff2) format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Tinos"; src: url(fonts/tinos-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: block; }

:root {
  --desk: #008080;
  --navy: #000080;
  --face: #c0c0c0;
  --link: #0000ee;
  --visited: #551a8b;
  --accent: #ff6a1a;
  --display: "Fraunces", "Cooper Black", Georgia, serif;
  --serif: "Tinos", "Times New Roman", Times, serif;
  --ui: "DotGothic16", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--desk);
  font-family: var(--ui); font-size: 16px;
  -webkit-font-smoothing: none;
  user-select: none;
}
button, input, label, select, textarea { font-size: 16px; }

/* ---------- Boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 9999; background: #000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: opacity .5s ease;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot-logo { display: flex; align-items: center; gap: 18px; }
.boot-mark {
  width: 72px; height: 72px; display: grid; place-items: center;
  font: 900 52px/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144;
  color: #fff; background: var(--accent);
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.35);
}
.boot-title { font: 900 44px/1 var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; }
.boot-title span { color: var(--accent); }
.boot-sub { font: 700 18px var(--serif); color: #aaa; margin-top: 8px; letter-spacing: 1px; }
.boot-bar { width: 320px; height: 22px; border: 2px solid #777; padding: 3px; }
.boot-bar span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 18px); animation: boot 1s steps(14) forwards; }
@keyframes boot { to { width: 100%; } }
.boot-note { margin: 0; color: #888; font: 16px var(--serif); }

/* ---------- Desktop ---------- */
.desktop { position: fixed; inset: 0 0 44px 0; background: var(--desk); }
.icons { position: absolute; top: 16px; bottom: 12px; left: 16px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 78px); grid-auto-columns: 112px; gap: 2px 10px; align-content: start; }
button.icon, button.icon:active, button.icon:focus {
  width: 112px; min-width: 0; min-height: 0; height: auto; padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; box-shadow: none; outline: none; border: 1px dotted transparent;
  color: #fff; text-align: center; cursor: default;
}
.icon svg { width: 52px; height: 52px; image-rendering: pixelated; }
.icon span { padding: 1px 4px; font: 16px/1.2 Tahoma, Verdana, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.icon.selected span { background: var(--navy); outline: 1px dotted #ff0; }
.icon.selected svg { filter: brightness(.6) sepia(1) hue-rotate(190deg) saturate(4); }

/* ---------- Windows (Win95 chrome) ---------- */
.win { position: absolute; display: flex; flex-direction: column; min-width: 380px; min-height: 220px; }
.win .title-bar { background: var(--navy); padding: 4px 4px 4px 6px; cursor: move; }
.win:not(.active) .title-bar { background: #808080; }
.win:not(.active) .title-bar-text { color: #c0c0c0; }
.win .title-bar-text { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: bold; letter-spacing: .2px; }
.win .title-bar-text svg { width: 20px; height: 20px; flex: none; }
.title-bar-controls button { min-width: 22px; min-height: 20px; padding: 0; }
.title-bar-controls button + button { margin-left: 3px; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.win .window-body { flex: 1; margin: 4px; overflow: auto; display: flex; flex-direction: column; min-height: 0; }
.win .status-bar { margin: 0 3px 3px; }
.status-bar-field { font-size: 15px; padding: 3px 6px; white-space: nowrap; overflow: hidden; }
.sb-sm { flex: 0 0 34px; } .sb-md { flex: 0 0 160px; }
.win .resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }
.win[hidden] { display: none; }
button { min-width: 90px; min-height: 30px; padding: 0 16px; }

/* ---------- Showcase: a 90s website inside an IE-style window ---------- */
.win.ie .window-body { margin: 3px; background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; padding: 2px; }
.sc { flex: 1; min-height: 0; overflow: auto; background: #fff; color: #000; font-family: var(--serif); user-select: text; -webkit-font-smoothing: antialiased; }
.sc a { color: var(--link); font-weight: 700; text-decoration: underline; cursor: pointer; }
.sc a:visited { color: var(--visited); }
.sc h1, .sc h2, .sc h3 { margin: 0; }

/* Home */
.sc-home { display: flex; align-items: center; justify-content: center; }
.sc-hero { text-align: center; padding: 40px 24px; }
.sc-hero h1 {
  font: 900 150px/.92 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  letter-spacing: -3px; color: #000;
}
.sc-hero h2 { margin-top: 26px; font: 700 50px/1.1 var(--serif); letter-spacing: 2px; }
.sc-hnav { display: flex; justify-content: center; gap: 56px; margin-top: 110px; flex-wrap: wrap; }
.sc-hnav a { font: 700 32px var(--serif); letter-spacing: .5px; }

/* Inner pages */
.sc-inner { display: flex; }
.sc-side { flex: 0 0 330px; padding: 70px 24px 40px 48px; align-self: flex-start; }
.sc-side h1 { font: 900 64px/.95 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; letter-spacing: -1px; }
.sc-side h3 { margin-top: 18px; font: 700 34px var(--serif); letter-spacing: 1px; }
.sc-vnav { display: flex; flex-direction: column; gap: 34px; margin-top: 70px; }
.sc-vnav a { font: 700 28px var(--serif); position: relative; }
.sc-vnav a.cur::before { content: ""; position: absolute; left: -26px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border: 3px solid #000; border-radius: 50%; }
.sc-main { flex: 1; min-width: 0; padding: 70px 56px 60px 30px; }
.sc-title { font: 900 104px/.95 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; letter-spacing: -2px; }
.sc-sub { margin-top: 16px; font: 700 36px var(--serif); }
.sc-body { margin-top: 36px; font: 22px/1.55 var(--serif); }
.sc-body p { margin: 0 0 20px; }
.sc-h { margin: 44px 0 16px !important; font: 700 32px var(--serif); }
.sc-callout { margin: 30px 0; padding: 22px 26px; border: 4px solid #000; background: #ffffe0; text-align: center; }
.sc-callout p { margin: 0 0 8px; font-weight: 700; font-size: 24px; }
.sc-callout a { font-size: 24px; }
.sc-facts { border-collapse: collapse; font-size: 22px; }
.sc-facts td { padding: 6px 28px 6px 0; vertical-align: top; }
.sc-facts td:first-child { font-weight: 700; white-space: nowrap; }
.sc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sc-row span { font: 700 20px var(--serif); white-space: nowrap; }
.sc-job { margin-bottom: 26px; }
.sc-job h2 { font: 700 28px var(--serif); }
.sc-job h3 { font: 400 22px var(--serif); margin-top: 2px; }
.sc-job ul { margin: 10px 0 0; padding-left: 28px; }
.sc-job li { margin-bottom: 6px; }
.sc-project { padding: 26px 0; border-top: 3px double #000; }
.sc-project h2 { font: 900 44px/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.sc-meta { margin: 10px 0 12px !important; font-size: 20px; }
.sc-socials { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 34px; }
.sc a.sc-social {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; flex: 1 1 0; min-width: 0; text-decoration: none; color: #000;
  background: var(--face); box-shadow: inset -2px -2px #0a0a0a, inset 2px 2px #fff, inset -4px -4px grey, inset 4px 4px #dfdfdf;
}
.sc a.sc-social:active { box-shadow: inset -2px -2px #fff, inset 2px 2px #0a0a0a, inset -4px -4px #dfdfdf, inset 4px 4px grey; }
.sc-social b { font: 700 24px var(--serif); color: var(--link); text-decoration: underline; }
.sc-social span { font: 18px var(--serif); }
.sc-form { display: grid; gap: 18px; max-width: 640px; }
.sc-form label { display: grid; gap: 6px; font: 700 22px var(--serif); }
.sc-form .req { color: #c00; }
.sc-form input, .sc-form textarea { font: 20px var(--serif); padding: 8px 10px; height: auto; }
.sc-form textarea { min-height: 150px; resize: vertical; }
.sc-send { font: 700 20px var(--serif) !important; min-height: 40px !important; padding: 0 28px !important; }

/* ---------- Other apps ---------- */
.page { flex: 1; overflow: auto; background: #fff; color: #000; padding: 26px 30px; font: 19px/1.55 var(--serif); user-select: text; -webkit-font-smoothing: antialiased; }
.page h1 { font: 900 48px/1 var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; margin: 0 0 6px; }
.page h2 { font: 700 26px var(--serif); margin: 22px 0 8px; }
.page p { margin: 6px 0; }
.page a { color: var(--link); font-weight: 700; }
.muted { color: #333; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; margin-top: 10px; }
.facts dt { font-weight: 700; } .facts dd { margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.credits { text-align: center; }
.addr { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 16px; }
.addr input { flex: 1; font-size: 16px; padding: 5px 6px; height: auto; }
a.button-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 90px; min-height: 30px; padding: 0 16px;
  color: #000; text-decoration: none; background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}
a.button-link:active { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; }
.resume-frame { flex: 1; border: none; background: #808080; min-height: 0; }

/* Tetris */
.tetris { display: flex; gap: 12px; padding: 8px; background: var(--face); }
.tetris-board { position: relative; padding: 0; line-height: 0; }
.tetris-board canvas { display: block; outline: none; }
.tt-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(0,0,0,.6); color: #fff; line-height: 1.4; text-align: center; cursor: pointer; font-family: var(--serif); -webkit-font-smoothing: antialiased; }
.tt-overlay[hidden] { display: none; }
.tt-overlay b { font: 900 46px var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; color: var(--accent); }
.tt-overlay span { font-size: 19px; }
.tetris-side { width: 150px; display: flex; flex-direction: column; gap: 6px; }
.tetris-side fieldset { margin: 0; padding: 4px 8px 6px; }
.tetris-side legend { font-size: 14px; }
.tetris-side canvas { display: block; margin: 0 auto; }
.tt-num { font: bold 24px/1.2 "Courier New", monospace; text-align: right; color: #000; }
.tetris-side button { width: 100%; margin-top: 4px; }
.tt-help { margin: 6px 0 0; font: 15px/1.5 var(--serif); color: #000; -webkit-font-smoothing: antialiased; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 44px; z-index: 5000;
  display: flex; align-items: center; gap: 6px; padding: 4px;
  background: var(--face); box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff;
}
.start-btn { display: flex; align-items: center; gap: 6px; height: 34px; min-width: 96px !important; padding: 0 8px !important; font-size: 17px; }
.start-btn.active { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; }
.start-logo { width: 22px; height: 22px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 900 16px/1 var(--display); }
.task-buttons { flex: 1; display: flex; gap: 4px; overflow: hidden; }
.task-buttons button { flex: 0 1 220px; width: auto; min-width: 0 !important; height: 34px; text-align: left; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; font-size: 16px; }
.task-buttons button svg { width: 20px; height: 20px; flex: none; }
.task-buttons button span { overflow: hidden; text-overflow: ellipsis; }
.task-buttons button.active { font-weight: bold; box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; background: repeating-conic-gradient(#c0c0c0 0 25%, #fff 0 50%) 0 0 / 2px 2px; }
.tray { height: 34px; padding: 0 12px; display: flex; align-items: center; gap: 10px; font-size: 16px; }
.tray-speaker svg { width: 20px; height: 20px; display: block; }

/* ---------- Start menu ---------- */
.start-menu { position: fixed; left: 2px; bottom: 43px; z-index: 6000; display: flex; padding: 3px; width: 330px; }
.start-menu[hidden] { display: none; }
.start-side { width: 34px; background: #808080; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; }
.start-side span { writing-mode: vertical-rl; transform: rotate(180deg); color: #c0c0c0; font: 900 26px var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; }
.start-side b { color: #fff; }
.start-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.start-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; cursor: default; font-size: 17px; }
.start-list li svg { width: 32px; height: 32px; }
.start-list li:hover { background: var(--navy); color: #fff; }
.start-list hr { margin: 3px 2px; border: none; border-top: 1px solid grey; border-bottom: 1px solid #fff; }

/* Project sub-links under PROJECTS (side nav) */
.sc-subnav { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 0 24px; }
.sc-subnav a { font: 700 18px var(--serif) !important; letter-spacing: .3px; }
.sc-vnav { gap: 30px; }
.sc { position: relative; }

/* single-line icon labels so all icons fit one column */
button.icon, button.icon:active, button.icon:focus { gap: 4px; padding: 3px 2px; }
.icon svg { width: 50px; height: 50px; }
.icon span { white-space: nowrap; font-size: 15px; }

/* ---------- Touch & small screens (phones) ---------- */
.tt-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.tt-pad button { min-width: 0 !important; height: 40px; padding: 0 !important; font-size: 20px; }
@media (max-width: 760px) {
  html:not(.single) .icons { top: 10px; left: 8px; grid-template-rows: repeat(auto-fill, 84px); grid-auto-columns: 96px; }
  html:not(.single) button.icon, html:not(.single) button.icon:active, html:not(.single) button.icon:focus { width: 96px; }
  html:not(.single) .icon span { font-size: 13px; }
  html:not(.single) .win.max { height: 100% !important; }
  html:not(.single) .win .title-bar-text { font-size: 15px; }
  html:not(.single) .task-buttons button { flex-basis: 120px; font-size: 13px; }
  html:not(.single) .sc-home .sc-hero { padding: 24px 16px; }
  html:not(.single) .sc-hero h1 { font-size: 64px; letter-spacing: -1px; }
  html:not(.single) .sc-hero h2 { font-size: 22px; letter-spacing: 1px; margin-top: 14px; }
  html:not(.single) .sc-hnav { gap: 14px 22px; margin-top: 44px; }
  html:not(.single) .sc-hnav a { font-size: 20px; }
  html:not(.single) .sc-inner { flex-direction: column; }
  html:not(.single) .sc-side { flex: none; width: 100%; padding: 22px 20px 0; }
  html:not(.single) .sc-side h1 { font-size: 40px; }
  html:not(.single) .sc-side h3 { font-size: 20px; margin-top: 8px; }
  html:not(.single) .sc-vnav { flex-direction: row; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; }
  html:not(.single) .sc-vnav a { font-size: 18px; }
  html:not(.single) .sc-vnav a.cur::before { display: none; }
  html:not(.single) .sc-vnav a.cur { color: #000; }
  html:not(.single) .sc-subnav { display: none; }
  html:not(.single) .sc-main { padding: 22px 20px 40px; }
  html:not(.single) .sc-title { font-size: 56px; }
  html:not(.single) .sc-sub { font-size: 22px; margin-top: 8px; }
  html:not(.single) .sc-body { font-size: 17px; margin-top: 20px; }
  html:not(.single) .sc-h { font-size: 22px; margin: 28px 0 10px !important; }
  html:not(.single) .sc-callout { padding: 14px; }
  html:not(.single) .sc-callout p, html:not(.single) .sc-callout a { font-size: 18px; }
  html:not(.single) .sc-facts { font-size: 16px; }
  html:not(.single) .sc-facts td { padding-right: 14px; }
  html:not(.single) .sc-job h2 { font-size: 20px; }
  html:not(.single) .sc-job h3 { font-size: 16px; }
  html:not(.single) .sc-row { flex-wrap: wrap; }
  html:not(.single) .sc-row span { font-size: 15px; }
  html:not(.single) .sc-project h2 { font-size: 30px; }
  html:not(.single) .sc-socials { flex-direction: column; }
  html:not(.single) .sc a.sc-social { flex: none; }
  html:not(.single) .sc-form label { font-size: 17px; }
  html:not(.single) .sc-form input, html:not(.single) .sc-form textarea { font-size: 16px; }
  html:not(.single) .page { padding: 18px; font-size: 16px; }
  html:not(.single) .tetris { flex-direction: column; align-items: center; }
  html:not(.single) .tetris-board canvas { width: 220px; height: 440px; }
  html:not(.single) .tetris-side { width: 220px; }
  html:not(.single) .tetris-side .tt-help { display: none; }
  html:not(.single) .start-menu { width: 280px; }
  html:not(.single) .boot-title { font-size: 32px; }
}
@media (max-width: 760px) {
  html:not(.single) .tetris-side { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  html:not(.single) .tetris-side fieldset:first-child, html:not(.single) .tetris-side > button, html:not(.single) .tt-pad { grid-column: 1 / -1; }
}

/* ---------- Terminal ---------- */
.term { flex: 1; min-height: 0; overflow: auto; background: #000; color: #c0c0c0; padding: 10px 12px; cursor: text;
  font: 18px/1.4 "TermArabic", "Courier New", Courier, monospace; -webkit-font-smoothing: antialiased; user-select: text; }
.term-row { white-space: pre-wrap; word-break: break-word; min-height: 1.4em; }
.term-row b { color: #fff; }
.term a { color: #5ff; }
.term .dim { color: #888; }
.term .accent { color: #ff6a1a; }
.term .ok { color: #5f5; }
.term-line { display: flex; align-items: center; }
.term-prompt { color: #c0c0c0; white-space: pre; }
.term-in { flex: 1; background: transparent !important; border: none !important; box-shadow: none !important; outline: none;
  color: #fff; font: 18px "TermArabic", "Courier New", Courier, monospace !important; padding: 0 0 0 2px !important; height: auto !important; caret-color: #fff; }
@media (max-width: 760px) {
  html:not(.single) .win .title-bar-text { min-width: 0; overflow: hidden; }
  html:not(.single) .win .title-bar-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html:not(.single) .tetris { flex-direction: row; align-items: flex-start; justify-content: center; gap: 8px; padding: 6px; }
  html:not(.single) .tetris-board canvas { width: 170px; height: 340px; }
  html:not(.single) .tetris-side { width: 150px; display: flex; flex-direction: column; gap: 4px; }
  html:not(.single) .tetris-side fieldset { padding: 2px 6px 4px; }
  html:not(.single) .tetris-side legend { font-size: 12px; }
  html:not(.single) .tt-num { font-size: 18px; }
  html:not(.single) #tt-next { width: 90px; height: 68px; }
  html:not(.single) .tt-pad button { height: 44px; }
}

/* ---------- Message box ---------- */
.win.msg { min-width: 360px; max-width: 520px; min-height: 0; }
.msg-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 14px 8px; }
.msg-icon svg { width: 40px; height: 40px; }
.msg-row p { margin: 4px 0 0; font: 17px/1.45 var(--serif); -webkit-font-smoothing: antialiased; }
.msg-btns { display: flex; justify-content: center; padding: 8px 0 12px; }

/* ---------- Welcome ---------- */
.wl { width: 600px; padding: 14px 16px 10px; }
.wl-head { font: 900 40px/1 var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.5px; margin-bottom: 14px; }
.wl-head b { font-weight: 900; }
.wl-98 { color: var(--accent); margin-left: 8px; }
.wl-main { display: flex; gap: 14px; }
.wl-tipbox { flex: 1; background: #ffffe1; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; padding: 14px 16px; min-height: 170px; }
.wl-did { display: flex; align-items: center; gap: 10px; font: 700 20px var(--serif); margin-bottom: 10px; -webkit-font-smoothing: antialiased; }
.wl-did svg { width: 34px; height: 34px; }
.wl-tipbox p { margin: 0; font: 18px/1.5 var(--serif); -webkit-font-smoothing: antialiased; }
.wl-btns { display: flex; flex-direction: column; gap: 8px; width: 150px; }
.wl-btns button { width: 100%; }
.wl-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 15px; }
.wl-foot label { font-size: 15px; }

/* ---------- Recycle Bin ---------- */
.recycle-icon { position: absolute !important; right: 16px; bottom: 12px; }
.rb-bar { display: flex; gap: 8px; margin-bottom: 6px; }
.rb-panel { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.rb-table { width: 100%; font-size: 16px; }
.rb-table th { text-align: left; padding: 4px 8px; font-size: 15px; }
.rb-table td { padding: 5px 8px; white-space: nowrap; cursor: default; }
.win .window-body .status-bar { margin: 6px 0 0; }

/* ---------- Screensaver ---------- */
.saver { position: fixed; inset: 0; z-index: 9000; background: #000; cursor: none; }
.saver[hidden] { display: none; }
.saver canvas { position: absolute; inset: 0; }
.saver-logo { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 14px; color: #fff;
  font: 900 44px/1 var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; white-space: nowrap; will-change: transform; }
.saver-logo b { color: var(--accent); font-weight: 900; }
.saver-mark { width: 60px; height: 60px; display: grid; place-items: center; background: var(--accent); color: #fff;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.35); font-size: 42px; }
@media (max-width: 760px) {
  html:not(.single) .wl { width: auto; }
  html:not(.single) .wl-main { flex-direction: column; }
  html:not(.single) .wl-btns { width: auto; flex-direction: row; } }

/* 90s hit counter */
.sc-counter { margin-top: 56px; display: inline-flex; align-items: center; gap: 12px; font: 700 20px var(--serif); }
.sc-counter[hidden] { display: none; }
.sc-digits { display: inline-flex; gap: 2px; padding: 3px; background: #000; box-shadow: inset -1px -1px #fff, inset 1px 1px grey; }
.sc-digits i { font: bold 24px/1 "Courier New", monospace; font-style: normal; color: #39ff14; background: #111; padding: 4px 5px; text-shadow: 0 0 4px rgba(57,255,20,.7); }
@media (max-width: 760px) {
  html:not(.single) .sc-counter { margin-top: 30px; font-size: 16px; }
  html:not(.single) .sc-digits i { font-size: 18px; padding: 3px 4px; } }

/* ---------- Paint ---------- */
.pt { display: flex; flex-direction: column; background: var(--face); }
.pt-wrap { display: flex; gap: 6px; padding: 4px; }
.pt-tools { display: grid; grid-template-columns: repeat(2, 30px); grid-auto-rows: 30px; gap: 2px; align-content: start; }
.pt-tool, .pt-size { min-width: 0 !important; min-height: 0 !important; width: 30px; height: 30px; padding: 0 !important; display: grid; place-items: center; }
.pt-tool svg { width: 20px; height: 20px; }
.pt-tool.on, .pt-size.on { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; background: repeating-conic-gradient(#c0c0c0 0 25%, #fff 0 50%) 0 0 / 2px 2px; }
.pt-sizes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 30px); gap: 2px; margin-top: 8px; }
.pt-size span { display: block; background: #000; border-radius: 50%; }
.pt-canvas-wrap { position: relative; background: #808080; padding: 0; line-height: 0; overflow: auto; max-width: 100%; }
.pt-canvas-wrap canvas { display: block; }
#pt-overlay { position: absolute; left: 0; top: 0; cursor: crosshair; }
.pt-bottom { display: flex; align-items: center; gap: 10px; padding: 4px 6px 6px; }
.pt-current { position: relative; width: 40px; height: 40px; flex: none; box-shadow: inset -1px -1px #fff, inset 1px 1px grey; background: var(--face); }
.pt-current span { position: absolute; width: 20px; height: 20px; border: 1px solid #000; }
#pt-fg { left: 5px; top: 5px; z-index: 1; } #pt-bg { left: 15px; top: 15px; }
.pt-palette { display: grid; grid-template-columns: repeat(14, 22px); grid-auto-rows: 18px; gap: 1px; }
.pt-swatch { min-width: 0 !important; min-height: 0 !important; width: 22px; height: 18px; padding: 0 !important; box-shadow: inset -1px -1px #fff, inset 1px 1px grey !important; }
.pt-actions { margin-left: auto; display: flex; gap: 6px; }
.pt-actions button { min-width: 72px; padding: 0 10px; }
.pt .status-bar { margin: 0 4px 4px; }
.pt-xy { flex: 0 0 90px; }
.confetti { position: fixed; inset: 0; z-index: 9500; pointer-events: none; }
@media (max-width: 760px) {
  html:not(.single) .pt-wrap { flex-direction: column; }
  html:not(.single) .pt-tools { grid-template-columns: repeat(8, 30px); }
  html:not(.single) .pt-sizes { grid-column: auto; grid-template-columns: repeat(4, 30px); margin: 0; }
  html:not(.single) .pt-canvas-wrap { max-height: 50vh; overflow: hidden; }
  html:not(.single) .pt-canvas-wrap canvas { width: 100%; height: auto; }
  html:not(.single) .pt-bottom { flex-wrap: wrap; }
  html:not(.single) .pt-palette { grid-template-columns: repeat(14, 18px); }
  html:not(.single) .pt-swatch { width: 18px; }
}

/* =====================================================================
   Retro pass: pixel fonts for all UI chrome, CRT teal, Win95 outline
   drag/resize, dithered icon selection and a status-bar resize grip.
   ===================================================================== */
:root { --desk: #3a8e8f; }
.desktop { background: var(--desk); }

/* pixel UI font everywhere in the chrome (content pages keep their serif fonts) */
.icon span, .win .title-bar-text, .taskbar, .task-buttons button, .tray, .start-btn, .start-list li,
.status-bar-field, .rb-table, .wl-foot, .wl-foot label, .addr, .addr input, .tetris-side legend,
.pt-actions button, .msg-btns button, .wl-btns button, .rb-bar button, .btn-row button {
  font-family: "DotGothic16", Arial, sans-serif !important;
  -webkit-font-smoothing: none; -moz-osx-font-smoothing: grayscale;
}
.icon span { font-size: 16px !important; line-height: 1.15; letter-spacing: .2px; text-shadow: none; }
.win .title-bar-text { font-weight: bold; font-size: 16px; letter-spacing: .3px; }
.start-btn b { font-weight: bold; }
.task-buttons button, .tray, .start-list li { font-size: 16px; }
.status-bar-field { font-size: 14px; }

/* Win95 icon selection: navy label with dotted focus line, icon tinted navy */
.icon.selected span { background: #000080; color: #fff; outline: 1px dotted #fff; outline-offset: -1px; }
.icon.selected svg { filter: brightness(.55) sepia(1) hue-rotate(185deg) saturate(5) contrast(1.1); }

/* dithered move/resize outline */
.win-outline {
  position: fixed; z-index: 8500; pointer-events: none; box-sizing: border-box; padding: 4px;
  background: repeating-conic-gradient(#fff 0 25%, #000 0 50%) 0 0 / 4px 4px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  mix-blend-mode: difference;
}
.win-outline[hidden] { display: none; }
body.dragging, body.dragging * { cursor: move !important; }
body.resizing, body.resizing * { cursor: nwse-resize !important; }

/* resize grip in the bottom-right corner */
.win .resize {
  width: 16px; height: 16px; right: 4px; bottom: 4px;
  background: repeating-linear-gradient(135deg, transparent 0 2px, #fff 2px 3px, #808080 3px 4px, transparent 4px 5px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Showcase: pixel-font subtitles like a 90s homepage */
.sc-hero h2 { font: bold 44px/1.1 "DotGothic16", Arial, sans-serif; letter-spacing: 1px; -webkit-font-smoothing: none; margin-top: 30px; }
.sc-side h3 { font: bold 33px/1.1 "DotGothic16", Arial, sans-serif; letter-spacing: .5px; -webkit-font-smoothing: none; }
.sc-sub { font: bold 33px/1.15 "DotGothic16", Arial, sans-serif !important; -webkit-font-smoothing: none; }
.sc-counter { font: bold 22px "DotGothic16", Arial, sans-serif; -webkit-font-smoothing: none; }
@media (max-width: 760px) {
  html:not(.single) .sc-hero h2 { font-size: 22px; }
  html:not(.single) .sc-side h3, html:not(.single) .sc-sub { font-size: 22px !important; }
  html:not(.single) .icon span { font-size: 13px !important; }
}

/* ---------- single-app mode (an app hosted in a window of the main FahadOS) ---------- */
html.single, html.single body { background: #c0c0c0; overflow: hidden; }
html.single .boot, html.single .icons, html.single .taskbar, html.single .start-menu,
html.single .recycle-icon, html.single .win-outline { display: none !important; }
html.single .desktop { position: fixed; inset: 0; background: #c0c0c0; }
html.single .win {
  position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  margin: 0; padding: 0; border: 0; box-shadow: none; display: flex; flex-direction: column;
}
html.single .win > .title-bar, html.single .win > .resize, html.single .win > .status-bar { display: none; }
html.single .win > .window-body { flex: 1; margin: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: stretch; }
html.single .tetris { align-self: center; }
html.single .pt { align-self: center; }

/* ---------- Achievements ---------- */
.ach-toast { position: fixed; top: 12px; right: 12px; z-index: 9500; width: 300px; cursor: pointer; animation: ach-in .25s steps(5); }
.ach-toast .title-bar-text svg { width: 16px; height: 16px; }
.ach-toast-body { display: flex; gap: 10px; align-items: center; margin: 8px; }
.ach-toast-body > svg { width: 32px; height: 32px; flex-shrink: 0; }
.ach-toast-body b { font: 700 17px var(--serif); }
.ach-toast-body p { margin: 2px 0 0; font: 15px var(--serif); }
@keyframes ach-in { from { transform: translateY(-130%); } to { transform: none; } }
.ach { display: flex; flex-direction: column; height: 100%; padding: 12px; box-sizing: border-box; }
.ach-cert { background: #ffffe1; border: 1px solid #000; padding: 8px 10px; margin-bottom: 10px; }
.ach-cert p { margin: 0 0 6px; font: 15px var(--serif); }
.ach-cert-row { display: flex; gap: 6px; }
.ach-cert-row input { flex: 1; min-width: 0; }
.ach-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ach-head > svg { width: 48px; height: 48px; }
.ach-head h2 { margin: 0; font: 900 26px var(--display); }
.ach-head p { margin: 2px 0 0; font: 15px var(--serif); }
.ach-meter { height: 18px; background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; padding: 3px; margin-bottom: 10px; box-sizing: border-box; }
.ach-meter span { display: block; height: 100%; background: repeating-linear-gradient(90deg, #000080 0 12px, transparent 12px 14px); }
.ach-list { flex: 1; overflow-y: auto; background: #fff; padding: 4px; }
.ach-row { display: flex; gap: 12px; align-items: center; padding: 6px 8px; border-bottom: 1px dotted #c0c0c0; }
.ach-row > svg { width: 32px; height: 32px; flex-shrink: 0; }
.ach-row.locked { opacity: .5; }
.ach-row.locked > svg { filter: grayscale(1); width: 20px; height: 20px; margin: 0 6px; }
.ach-row b { font: 700 17px var(--serif); }
.ach-row p { margin: 1px 0 0; font: 15px var(--serif); }

/* ---------- White, the desk assistant (classes keep the ultra- prefix) ---------- */
.ultra { position: fixed; right: 16px; bottom: 50px; z-index: 8000; display: flex; flex-direction: column; align-items: flex-end; animation: ultra-in .3s steps(6); }
@keyframes ultra-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ultra-bubble { position: relative; width: 330px; background: #ffffe1; border: 1px solid #000; border-radius: 10px; padding: 12px 14px; margin: 0 30px 14px 0; box-shadow: 3px 3px 0 rgba(0,0,0,.35); font: 16px/1.4 var(--serif); }
.ultra-bubble::after { content: ""; position: absolute; right: 26px; bottom: -10px; width: 18px; height: 18px; background: #ffffe1; border-right: 1px solid #000; border-bottom: 1px solid #000; transform: rotate(45deg); }
.ultra-bubble p { margin: 0 12px 0 0; }
.ultra-x { position: absolute; top: 4px; right: 6px; min-width: 0 !important; min-height: 0 !important; padding: 0 4px !important; background: none !important; box-shadow: none !important; font-size: 18px; line-height: 1; }
.ultra-qs { display: flex; flex-direction: column; margin-top: 8px; }
.ultra-qs a { margin: 3px 0; font-size: 15px; color: #000080; }
.ultra-qs a:hover { color: var(--accent); }
.ultra-qt { font-weight: 700; margin-bottom: 6px !important; }
.ultra-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ultra-cup { cursor: pointer; }
.ultra-cup svg { width: 96px; height: 104px; display: block; }
.tray-speaker { cursor: pointer; }
.tray-speaker.muted { opacity: .45; }
.tray-speaker.muted::after { content: "×"; position: relative; left: -6px; top: 2px; color: #c00; font-weight: 700; }

@media (max-width: 760px) {
  /* above the taskbar, so it never covers a window's close button */
  html:not(.single) .ach-toast { left: 8px; right: 8px; width: auto; top: auto; bottom: 52px; }
  html:not(.single) .ultra { left: 8px; right: 8px; bottom: 48px; }
  html:not(.single) .ultra-bubble { width: auto; margin-right: 20px; align-self: stretch; }
  html:not(.single) .ultra-cup svg { width: 64px; height: 70px; }
}

/* ---------- Clock pop-up ---------- */
.ck-pop { position: fixed; right: 4px; bottom: 46px; width: 310px; z-index: 9200; }
.ck-pop .window-body { margin: 8px; }
.ck-time { margin: 0; font: 700 30px var(--serif); }
.ck-date { margin: 2px 0 10px; font-size: 14px; }
.ck-wx { margin: -4px 0 10px; font-size: 13px; }
.ck-wx span { font-family: serif; font-size: 15px; margin-right: 2px; }
.ck-cal { background: #fff; padding: 6px; }
.ck-month { background: #000080; color: #fff; text-align: center; font-size: 14px; padding: 2px; margin-bottom: 4px; }
.ck-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.ck-grid i { font-style: normal; font-size: 14px; line-height: 22px; }
.ck-grid i.dow { color: #000080; }
.ck-grid i.today { background: var(--accent); color: #fff; }
.ck-status { margin-top: 10px; background: #ffffe1; padding: 8px 10px; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.ck-status p { margin: 0; font: 16px/1.35 var(--serif); }
.ck-status .ck-small { margin-top: 6px; font-size: 14px; color: #444; }
@media (max-width: 760px) { html:not(.single) .ck-pop { left: 8px; right: 8px; width: auto; } }

/* the Start menu can be taller than a phone screen: let it scroll */
.start-menu { max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
.start-menu .start-list { overflow-y: auto; }

/* DotGothic16 has no bold; a fake bold smudges the pixels, so keep it crisp */
html { font-synthesis: none; }

.ultra-fizz rect { animation: ultra-fizz 2.4s steps(4) infinite; }
.ultra-fizz rect:nth-child(2) { animation-delay: .6s; }
.ultra-fizz rect:nth-child(3) { animation-delay: 1.2s; }
.ultra-fizz rect:nth-child(4) { animation-delay: 1.8s; }
@keyframes ultra-fizz { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }

/* Vintage CRT layers (see Crt in os.js). Each is its own fixed element so the blend reaches the page. */
.crt-layer { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; z-index: 2147483000; }
.crt-shadow { object-fit: fill; opacity: .5; }
.crt-add { mix-blend-mode: screen; mix-blend-mode: plus-lighter; }

/* ---------- Device Manager (skills) ---------- */
.dm { position: relative; display: flex; flex-direction: column; height: 100%; padding: 10px; box-sizing: border-box; gap: 8px; }
.dm-view { margin: 0; font-size: 16px; }
ul.tree-view.dm-tree { flex: 1; overflow: auto; font-size: 17px; line-height: 1.35; color: #000; }
ul.tree-view.dm-tree li { margin-top: 5px; }
ul.tree-view.dm-tree ul > li:before { top: 11px; }
.dm-tree summary, .dm-tree a { display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.dm-tree a { padding: 0 2px; }
.dm-tree a.sel { background: navy; color: #fff; }
.dmi { width: 20px; height: 20px; flex-shrink: 0; }
.dm-btns { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.dm-btns button { font-size: 15px; min-height: 30px; }
.dm-pt td { font-size: 16px; }
.dm-props { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); width: min(380px, 92%); z-index: 5; }
.dm-props .window-body { font-size: 16px; }
.dm-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 18px; }
.dm-ph .dmi { width: 32px; height: 32px; }
.dm-pt td { padding: 2px 8px 2px 0; white-space: normal; vertical-align: top; }
.dm-pt { background: none; margin-bottom: 10px; }
.dm-props fieldset p { margin: 4px 0; }
.dm-ok { display: flex; justify-content: flex-end; margin-top: 10px; }

/* ---------- Touch feedback on phones: respond on press, not on release ---------- */
@media (pointer: coarse) {
  html { -webkit-tap-highlight-color: transparent; }
  button, .start-list li, .icon, a { touch-action: manipulation; }
  button.icon:active svg { transform: scale(.92); filter: brightness(.85); }
  button.icon svg, .start-list li { transition: transform .08s ease-out, background-color .08s ease-out; }
  .start-list li:active { background: var(--navy); color: #fff; }
  .task-buttons button:active { transform: translateY(1px); }
  .title-bar { cursor: grab; }
}
@media (pointer: coarse) and (prefers-reduced-motion: reduce) {
  button.icon:active svg { transform: none; }
}
