/* AhmedOS 10 — platinum desktop, 1-bit icons, real windows */
:root {
  --plat: #dedbd4; --plat-2: #c9c5bc; --plat-3: #a9a59c; --ink: #111; --paper: #fff; --hi: #2f5bd3; --hi-2: #dfe7ff; --accent: #e0703e;
  --pix: "Pixelify Sans", ui-monospace, monospace; --sans: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --f-apps: #a07a32; --f-llm: #2d5f86; --f-agents: #6a4c9c; --f-safety: #b5532a; --f-learn: #4f7a32; --f-bio: #1f7a64; --f-vision: #9a7413; --f-sound: #9c3f6c;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased;
  background-color: #6f8fa8; background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.2px), radial-gradient(rgba(0,0,0,.12) 1px, transparent 1.2px); background-size: 4px 4px; background-position: 0 0, 2px 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
code, kbd { font-family: var(--mono); font-size: .92em; }

/* boot */
.boot { position: fixed; inset: 0; z-index: 100; background: var(--plat); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; transition: opacity .4s; font-family: var(--pix); }
.boot.is-done { opacity: 0; pointer-events: none; }
.boot__mac { width: 96px; height: 116px; background: var(--paper); border: 3px solid var(--ink); border-radius: 8px 8px 4px 4px; padding: 10px; box-shadow: 6px 6px 0 rgba(0,0,0,.2); }
.boot__screen { height: 66px; border: 3px solid var(--ink); border-radius: 4px; position: relative; background: #eaf0e8; }
.boot__screen i { position: absolute; background: var(--ink); }
.boot__screen .e1 { left: 18px; top: 16px; width: 5px; height: 12px; } .boot__screen .e2 { right: 18px; top: 16px; width: 5px; height: 12px; }
.boot__screen .m { left: 20px; right: 20px; top: 38px; height: 10px; background: none; border: 3px solid var(--ink); border-top: 0; border-radius: 0 0 16px 16px; }
.boot__name { font-size: 22px; }
.boot__bar { width: 220px; height: 14px; border: 2px solid var(--ink); background: var(--paper); }
.boot__bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, #555 6px 8px); transition: width 1.4s steps(14); }
.boot__sub { font-family: var(--mono); font-size: 12px; color: #555; }
.boot__skip { position: absolute; right: 18px; bottom: 18px; background: none; border: 1px solid #888; border-radius: 4px; padding: 4px 10px; font-family: var(--mono); font-size: 12px; }

/* menubar */
.menubar { position: fixed; top: 0; left: 0; right: 0; height: 30px; background: var(--paper); border-bottom: 2px solid var(--ink); display: flex; align-items: center; justify-content: space-between; z-index: 60; font-family: var(--pix); font-size: 15px; }
.menus { display: flex; height: 100%; }
.menu { position: relative; }
.menu > button { height: 28px; padding: 0 12px; border: 0; background: none; font-family: var(--pix); font-size: 15px; }
.menu > button.logo { font-size: 18px; }
.menu.is-open > button { background: var(--ink); color: var(--paper); }
.menu ul { position: absolute; left: 0; top: 28px; min-width: 230px; margin: 0; padding: 4px 0; list-style: none; background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.35); display: none; }
.menu.is-open ul { display: block; }
.menu li button { width: 100%; text-align: left; border: 0; background: none; padding: 5px 16px; font-family: var(--pix); font-size: 15px; display: flex; justify-content: space-between; gap: 18px; }
.menu li button:hover, .menu li button:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.menu li button span { color: #777; }
.menu li hr { border: 0; border-top: 1px dotted #999; margin: 4px 0; }
.menubar__r { display: flex; gap: 16px; padding-right: 14px; font-size: 14px; }
@media (max-width: 640px) { .menu.hide-sm { display: none; } .menubar__clock { display: none; } }

/* desktop + icons */
.desktop { position: fixed; inset: 30px 0 0 0; }
.icons { position: absolute; right: 16px; top: 16px; bottom: 16px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 92px); grid-auto-columns: 96px; gap: 6px 10px; direction: rtl; }
.icon { direction: ltr; width: 96px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; }
.icon__img { width: 48px; height: 48px; display: grid; place-items: center; font-size: 30px; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.25)); }
.icon__img svg { width: 48px; height: 48px; }
.icon__label { font-family: var(--pix); font-size: 13.5px; color: var(--paper); background: rgba(0,0,0,.35); padding: 1px 5px; border-radius: 2px; line-height: 1.3; text-align: center; max-width: 96px; overflow-wrap: anywhere; }
.icon.is-sel .icon__label { background: var(--ink); }
.icon.is-sel .icon__img { filter: brightness(.6) drop-shadow(1px 1px 0 rgba(0,0,0,.25)); }
.icon.is-new .icon__label::after { content: " ●"; color: #ffd36b; }
.icon.is-locked { opacity: .45; }
@media (max-width: 640px) { .icons { left: 10px; right: 10px; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-template-rows: none; grid-auto-rows: 92px; direction: ltr; bottom: auto; } .icon { width: auto; } }
.hello { position: absolute; left: 32px; bottom: 32px; color: var(--paper); font-family: var(--pix); text-shadow: 2px 2px 0 rgba(0,0,0,.3); max-width: 560px; pointer-events: none; }
.hello__name { font-size: clamp(36px, 6vw, 72px); line-height: 1; }
.hello__role { font-size: 18px; margin-top: 8px; }
.hello__tip { font-family: var(--sans); font-size: 14px; margin-top: 10px; opacity: .9; }
.hello__tip code { background: rgba(0,0,0,.3); padding: 0 4px; }
@media (max-width: 640px) { .hello { left: 16px; right: 16px; bottom: 16px; } .hello__role { font-size: 14px; } }

/* windows */
.win { position: absolute; background: var(--plat); border: 2px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,.4); display: flex; flex-direction: column; min-width: 280px; min-height: 160px; animation: zoomIn .18s steps(4); }
@keyframes zoomIn { from { transform: scale(.85); opacity: 0; } }
.win.is-front { box-shadow: 6px 6px 0 rgba(0,0,0,.45); }
.win__bar { height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 6px; border-bottom: 2px solid var(--ink); cursor: grab; user-select: none; touch-action: none; flex: none;
  background: repeating-linear-gradient(transparent 0 2px, var(--ink) 2px 3px) 0 7px / 100% 12px no-repeat, var(--plat); }
.win:not(.is-front) .win__bar { background: var(--plat); }
.win__title { margin: 0 auto; background: var(--plat); padding: 0 10px; font-family: var(--pix); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.win__btn { width: 16px; height: 16px; border: 2px solid var(--ink); background: var(--plat); padding: 0; flex: none; position: relative; }
.win__btn:active { background: var(--ink); }
.win__btn.zoom::after { content: ""; position: absolute; left: 2px; top: 2px; width: 6px; height: 6px; border: 1px solid var(--ink); }
.win__body { flex: 1; overflow: auto; background: var(--paper); margin: 0; position: relative; }
.win__resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--ink) 50% 58%, transparent 58% 70%, var(--ink) 70% 78%, transparent 78%); touch-action: none; }
.win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
@media (max-width: 640px) { .win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; } .win__resize { display: none; } }

/* window contents */
.pad { padding: 18px 20px 24px; font-size: 15.5px; line-height: 1.65; }
.pad h2 { font-family: var(--pix); font-weight: 400; font-size: 26px; margin: 0 0 8px; line-height: 1.15; }
.pad h3 { font-family: var(--pix); font-weight: 400; font-size: 19px; margin: 26px 0 6px; line-height: 1.25; }
.pad h3 small { display: block; color: var(--accent); font-size: 13px; }
.pad section.is-erratum { border-left: 4px solid var(--accent); padding-left: 12px; background: #fff6f0; }
.pad img { max-width: 100%; border: 2px solid var(--ink); margin: 8px 0; }
.pad figure { margin: 0; }
.pad a { color: var(--hi); }
.pad pre { background: #111; color: #e6e6e6; padding: 12px; overflow-x: auto; font-size: 13px; }
.pad code { background: #eee; padding: 0 3px; }
.k-lede { font-size: 17.5px; font-weight: 600; }
.finder { display: grid; grid-template-columns: 190px 1fr; height: 100%; }
.finder__side { border-right: 2px solid var(--ink); background: #f2f0eb; overflow-y: auto; font-family: var(--pix); font-size: 14.5px; padding: 6px 0; }
.finder__side button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; padding: 5px 12px; text-align: left; }
.finder__side button i { width: 12px; height: 10px; background: var(--c); border: 1px solid var(--ink); flex: none; }
.finder__side button.is-on { background: var(--ink); color: var(--paper); }
.finder__main { overflow: auto; }
.finder table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.finder th { position: sticky; top: 0; background: var(--plat); border-bottom: 2px solid var(--ink); text-align: left; font-family: var(--pix); font-weight: 400; font-size: 14px; padding: 4px 10px; }
.finder td { padding: 5px 10px; border-bottom: 1px dotted #bbb; white-space: nowrap; }
.finder td:first-child { white-space: normal; }
.finder tr.file { cursor: default; }
.finder tr.file:hover td { background: var(--hi-2); }
.finder tr.file.is-sel td { background: var(--hi); color: var(--paper); }
.finder .doc { display: inline-block; width: 12px; height: 15px; border: 1.5px solid var(--ink); margin-right: 8px; vertical-align: -2px; background: linear-gradient(225deg, transparent 4px, var(--paper) 4px); }
.finder__status { padding: 4px 12px; border-top: 2px solid var(--ink); font-family: var(--pix); font-size: 13px; background: var(--plat); position: sticky; bottom: 0; }
@media (max-width: 640px) { .finder { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .finder__side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 2px solid var(--ink); } .finder__side button { white-space: nowrap; width: auto; } .finder td.hide-sm, .finder th.hide-sm { display: none; } }
.term { background: #0d0d0d; color: #d6d6d6; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; height: 100%; display: flex; flex-direction: column; }
.term__out { flex: 1; overflow-y: auto; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.term__out a { color: #8ab4ff; cursor: pointer; }
.term__out .ok { color: #7fd69e; } .term__out .acc { color: #ff9a6b; } .term__out .dim { color: #888; }
.term__in { display: flex; gap: 8px; padding: 6px 12px 10px; }
.term__in span { color: #7fd69e; }
.term__in input { flex: 1; background: transparent; border: 0; outline: none; color: #fff; font: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { border: 2px solid var(--ink); padding: 10px; background: #fafafa; }
.stat b { display: block; font-family: var(--pix); font-size: 34px; line-height: 1; font-weight: 400; color: var(--accent); }
.stat span { font-size: 13px; }
.bars { margin-top: 18px; display: grid; gap: 10px; }
.bars div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.bars i { display: block; height: 14px; background: var(--ink); width: calc(var(--v) * 100%); transition: width 1s steps(10); }
.form { display: grid; gap: 8px; }
.form label { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; font-family: var(--pix); border-bottom: 1px solid #ccc; padding-bottom: 6px; }
.form input, .form textarea { border: 0; outline: none; font: inherit; font-family: var(--sans); font-size: 15px; background: transparent; padding: 4px 0; }
.form textarea { min-height: 180px; resize: vertical; border: 1px solid #ccc; padding: 8px; }
.form .row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.btn { border: 2px solid var(--ink); background: var(--paper); border-radius: 8px; padding: 6px 16px; font-family: var(--pix); font-size: 15px; box-shadow: inset -2px -2px 0 var(--plat-2); }
.btn:active { background: var(--ink); color: var(--paper); }
.btn--def { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.honeypot-field { position: absolute; left: -9999px; }
.pdf { width: 100%; height: calc(100% - 46px); border: 0; display: block; background: #888; }
.pdfbar { height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 2px solid var(--ink); background: var(--plat); font-family: var(--pix); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li { border-left: 3px solid var(--ink); padding: 0 0 16px 16px; position: relative; }
.timeline > li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 13px; height: 13px; background: var(--paper); border: 3px solid var(--ink); }
.timeline > li.now::before { background: var(--accent); }
.timeline b { font-family: var(--pix); font-weight: 400; font-size: 18px; }
.timeline .d { display: block; font-family: var(--mono); font-size: 12px; color: #666; }
.timeline ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.trashnote { font-family: var(--mono); font-size: 13.5px; background: #fffbe6; border: 1px dashed #aaa; padding: 14px; }
.trashnote s { color: #a00; }

/* notifications */
.notes { position: fixed; left: 50%; transform: translateX(-50%); top: 42px; z-index: 70; display: grid; gap: 8px; width: min(320px, calc(100% - 28px)); pointer-events: none; }
.note { background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.4); padding: 10px 12px; font-size: 14px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; animation: zoomIn .2s steps(4); pointer-events: auto; }
.note b { display: block; font-family: var(--pix); font-weight: 400; font-size: 15px; }
.note .ico { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* phones: no double-tap zoom or grey tap flash on controls */
button, a, [role="button"], [data-obj], [data-hot], .card, .knob { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* no-JS / crawler fallback */
.nojs { position: relative; z-index: 5; max-width: 760px; margin: 40px auto; padding: 24px; background: #fff; border: 2px solid #111; font-family: var(--sans); line-height: 1.5; }
.nojs li { margin: 4px 0; }
