/* MANDA OS shell, slice 1a. The Midnight look, taken from the design preview (docs/manda-laptop/designs/live/template.html in ams-sitchboard): navy to near-black, gold only as thin
   lines and the one primary button, glass panels. Onyx and Ivory are a later slice; the tokens below are the only place a look's colours are written.
   No outside font (the page's policy has none): the system's own fonts stand in for the preview's. Cost on a Chromebook (spec_manda_laptop_stage0_002, section 5): one slow
   gradient behind everything (transform only), no live particle field, and blur on at most two panels at a time, never over the moving orb, never more than 12 px. */
:root {
  color-scheme: dark;
  --bg0: #030814; --bg1: #081330; --bg2: #12264F; --ink: #FFFFFF; --dim: #A3B1D0; --acct: #E6CC96; --line: rgba(160, 190, 255, .18);
  --glass: rgba(13, 26, 58, .62); --glass-hi: rgba(255, 255, 255, .1); --blue: #4FC3FF; --none: #6B7896;
  --s1: #F6E7C1; --s2: #C8A96E; --s3: #9E7A3A; --goldline: rgba(232, 201, 138, .55); --orbit: rgba(150, 190, 255, .3); --link: rgba(232, 201, 138, .5);
  --a1: rgba(42, 107, 255, .36); --a2: rgba(79, 195, 255, .2); --a3: rgba(200, 169, 110, .1); --vg: rgba(0, 2, 10, .62);
  --keybg: rgba(255, 255, 255, .035); --keyline: rgba(170, 195, 255, .28); --keyhit: rgba(232, 201, 138, .18); --dotline: rgba(232, 201, 138, .7); --doton1: #F6E7C1; --doton2: #C8A96E; --dotglow: rgba(200, 169, 110, .75);
  --tile1: #2F55A0; --tile2: #101F45; --tileink: #F6E7C1; --tileline: rgba(232, 201, 138, .55); --edge1: rgba(232, 201, 138, .75); --edge2: rgba(79, 195, 255, .28); --edge3: rgba(255, 255, 255, .07);
  --amst1: #F5A66C; --amst2: #DD6326; --amsink: #14181B; --amsline: rgba(255, 255, 255, .3);
  --btnbg: linear-gradient(180deg, #F6E7C1, #C8A96E); --btnink: #0B1226; --halo: rgba(79, 195, 255, .3); --bad: #FF9C8F;
  --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .75, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg0); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4; background: radial-gradient(115% 95% at 50% 38%, var(--bg2) 0, var(--bg1) 48%, var(--bg0) 100%) fixed; overflow-x: hidden; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.defs .g1 { stop-color: var(--s1); } .defs .g2 { stop-color: var(--s2); } .defs .g3 { stop-color: var(--s3); }
.noscript { margin: 24px; color: var(--ink); }
button, a { font-family: inherit; }
:is(button, a, input):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* the slow gradient behind everything: three soft blobs that drift (transform only, so it costs the graphics chip almost nothing) */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; width: 76vmax; height: 76vmax; left: -16vmax; top: -36vmax; background: radial-gradient(closest-side, var(--a1), transparent 72%); animation: dr1 23s ease-in-out infinite alternate; will-change: transform; }
.aurora i:nth-child(2) { left: 46vmax; top: 2vmax; background: radial-gradient(closest-side, var(--a2), transparent 72%); animation-name: dr2; animation-duration: 29s; }
.aurora i:nth-child(3) { width: 54vmax; height: 54vmax; left: 22vmax; top: 24vmax; background: radial-gradient(closest-side, var(--a3), transparent 72%); animation-name: dr3; animation-duration: 19s; }
@keyframes dr1 { to { transform: translate(16vmax, 11vmax) scale(1.16); } }
@keyframes dr2 { to { transform: translate(-18vmax, -9vmax) scale(1.1); } }
@keyframes dr3 { to { transform: translate(9vmax, -7vmax) scale(1.22); } }

/* glass: a translucent panel with a fine gold-to-blue edge. The panels that blur the picture behind them are marked .blur (at most two on a screen). */
.glass { background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--glass-hi); }
.blur { -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); }

/* the wordmark: the M mark is the first letter, so it reads MANDA OS with one M */
.word { --ls: .5em; display: inline-flex; align-items: baseline; gap: .35em; font-weight: 300; font-size: 20px; letter-spacing: var(--ls); white-space: nowrap; }
.word b { font-weight: 600; }
.word .mk { flex: none; align-self: baseline; height: .73em; width: .886em; margin-right: calc(var(--ls) - .35em); overflow: visible; }
.word.sm { font-size: 14px; } .word.biz { font-size: clamp(20px, 2.2vw, 30px); }
.eyebrow { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--acct); }
.msg { min-height: 20px; margin: 10px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-align: center; color: var(--bad); }

/* ═══ sign-in ═══ */
#gate { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); align-items: center; gap: clamp(24px, 5vw, 80px); padding: clamp(20px, 5vw, 80px); }
.g-left { min-width: 0; }
.clock { display: flex; align-items: baseline; gap: .16em; margin: .1em 0 0 -.04em; font-weight: 200; font-size: clamp(64px, 12.5vw, 200px); line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.clock small { font-size: clamp(14px, 1.7vw, 26px); font-weight: 300; letter-spacing: .22em; color: var(--dim); }
.greet { margin: .5em 0 0; font-weight: 300; font-size: clamp(22px, 2.6vw, 38px); }
.rule { display: block; width: 90px; height: 1px; margin-top: 26px; background: linear-gradient(90deg, var(--acct), transparent); }
.panel { position: relative; padding: 28px 28px 22px; border-radius: 28px; background: var(--glass); border: 1px solid transparent;
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); box-shadow: 0 24px 60px rgba(8, 15, 34, .42), inset 0 1px 0 var(--glass-hi); }
/* the fine gold-to-blue edge is its own layer (it sits on the border only, so it is never behind a word) */
.panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(145deg, var(--edge1), var(--edge2) 36%, var(--edge3) 66%, var(--edge1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.panel .who { display: flex; justify-content: center; margin-bottom: 8px; }
.p-title { margin: 14px 0 18px; text-align: center; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
.kept { margin: 16px 0 0; text-align: center; font-size: 12px; letter-spacing: .04em; color: var(--dim); }
/* the shared pad, dressed: its own file sets sizes and colours from these variables, so the rules here are one step more specific (it adds its stylesheet after this one) */
html body #gate .mpin { --mpin-ink: var(--ink); --mpin-dot: var(--doton1); --mpin-line: var(--keyline); --mpin-key: var(--keybg); --mpin-key-on: var(--keyhit); max-width: 290px; }
html body #gate .mpin-dots { gap: 22px; margin: 0 0 22px; }
html body #gate .mpin-dots i { width: 14px; height: 14px; border: 1px solid var(--dotline); }
html body #gate .mpin-dots i.on { background: linear-gradient(180deg, var(--doton1), var(--doton2)); border-color: transparent; box-shadow: 0 0 14px var(--dotglow); }
html body #gate .mpin-keys { gap: 14px 18px; }
html body #gate .mpin-k { aspect-ratio: 1; min-height: 0; width: 100%; padding: 0; border-radius: 50%; border: 1px solid var(--keyline); background: var(--keybg); color: var(--ink); font: 300 26px/1 var(--font); transition: transform .16s ease, background .25s, border-color .25s, box-shadow .25s; }
html body #gate .mpin-k:hover { border-color: var(--blue); }
html body #gate .mpin-k:active { transform: scale(.92); background: var(--keyhit); border-color: var(--doton1); box-shadow: 0 0 18px var(--dotglow); }
html body #gate .mpin-k:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ═══ the desk ═══ */
#app { position: relative; z-index: 2; }
.desk { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; padding: 12px clamp(12px, 2vw, 28px) 10px; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px 6px 18px; border-radius: 28px; -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); }
.tb-l { display: flex; align-items: center; }
.tb-c { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tb-r { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--acct); border: 1px solid var(--goldline); border-radius: 99px; padding: 5px 12px; white-space: nowrap; }
.tbtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--keybg); color: var(--ink); cursor: pointer; transition: border-color .2s; }
.tbtn:hover { border-color: var(--blue); }
.tbtn svg, .dk svg, .hn .tag svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tbtn svg { width: 20px; height: 20px; }

.d-grid { min-height: 0; display: grid; grid-template-columns: minmax(250px, 34%) minmax(0, 1fr); align-items: center; gap: clamp(8px, 2vw, 32px); }
.d-left { min-width: 0; padding: 0 0 0 clamp(8px, 2.2vw, 40px); }
.d-biz { margin: 10px 0 18px; }
.biz-name { font-weight: 600; font-size: clamp(20px, 2.2vw, 30px); }
.d-h { margin: 0 0 18px; font-weight: 300; font-size: clamp(32px, 3.9vw, 58px); line-height: 1.08; letter-spacing: -.01em; }
.d-h em { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.14em; color: var(--s1); padding-right: .12em; }
.wait { display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 14px 16px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--glass-hi); }
.wait .pulse { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--none); }
.wait.on .pulse { background: var(--s2); box-shadow: 0 0 10px var(--s2); }
.wait div { flex: 1; min-width: 0; } .wait b { font-weight: 400; font-size: 17px; }
.gbtn { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 99px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--btnink); background: var(--btnbg); box-shadow: 0 6px 20px rgba(8, 15, 34, .3); }
.gbtn:hover { filter: brightness(1.06); }

/* the team round Zora: one box that scales, everything in it placed by percentages (the script gives each head a left and top) */
.d-orbit { min-width: 0; min-height: 0; display: grid; place-items: center; }
.orbit { position: relative; container-type: inline-size; width: min(100%, calc((100dvh - 300px) * 1.3), 720px); aspect-ratio: 13 / 10; }
.orbits { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbits .o1 { fill: none; stroke: var(--orbit); stroke-width: 1; stroke-dasharray: 3 7; vector-effect: non-scaling-stroke; }
.orbits .lk { stroke: var(--link); stroke-width: 1; opacity: .55; vector-effect: non-scaling-stroke; }
.zora { position: absolute; left: 50%; top: 50%; width: clamp(110px, 27cqw, 230px); aspect-ratio: 1; transform: translate(-50%, -50%); display: block; border-radius: 50%; z-index: 2; text-decoration: none; }
a.zora { cursor: pointer; }
.zora .halo { position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(closest-side, var(--halo), transparent 72%); opacity: .45; animation: halo 3.4s ease-in-out infinite; }
.zora canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@keyframes halo { 0%, 100% { opacity: .25; transform: scale(.94); } 50% { opacity: .8; transform: scale(1.06); } }
.desk[data-mood="needs"] .zora .halo, .zora canvas[data-mood="needs"] ~ .halo { opacity: .6; }
.hn { position: absolute; z-index: 3; width: clamp(64px, 15cqw, 104px); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0; color: var(--ink); text-decoration: none; }
.hn .ph { position: relative; width: clamp(40px, 9.4cqw, 66px); aspect-ratio: 1; border-radius: 50%; padding: 2px; display: grid; place-items: center; background: linear-gradient(140deg, #9DBBFF, #2A4A8A); box-shadow: 0 8px 18px rgba(8, 15, 34, .45); }
.hn.call .ph { background: linear-gradient(140deg, #F6E7C1, #C8A96E 55%, #9E7A3A); }
.hn .ph img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hn .ini { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 30% 25%, var(--bg2), var(--bg0)); color: var(--ink); font-weight: 300; font-size: clamp(13px, 2.6cqw, 18px); letter-spacing: .08em; }
.hn .tag { position: absolute; right: -4%; top: -4%; width: 38%; max-width: 24px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #F6E7C1, #C8A96E); color: #0B1226; box-shadow: 0 3px 8px rgba(8, 15, 34, .45); }
.hn .tag svg { width: 56%; height: 56%; stroke-width: 2.4; }
.hn .lb { text-align: center; line-height: 1.15; }
.hn .lb b { display: block; font-weight: 400; font-size: 13px; letter-spacing: .02em; }
.hn .lb small { display: block; margin-top: 1px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.hn.up { flex-direction: column-reverse; }
a.hn:hover .ph { box-shadow: 0 8px 22px rgba(8, 15, 34, .55), 0 0 0 3px rgba(232, 201, 138, .35); }

/* the dock of suites */
.dock { justify-self: center; max-width: 100%; display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: center; gap: 12px 18px; padding: 26px 18px 10px; border-radius: 26px; -webkit-backdrop-filter: blur(12px) saturate(1.35); backdrop-filter: blur(12px) saturate(1.35); box-shadow: 0 16px 40px rgba(8, 15, 34, .35), inset 0 1px 0 var(--glass-hi); }
.dk-group { position: relative; min-width: 0; }
.dk-cap { position: absolute; left: 4px; top: -20px; font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.dk-row { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.dk-div { align-self: stretch; width: 1px; margin: -8px 0 2px; background: var(--line); }
.dk { position: relative; width: 94px; min-height: 76px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 2px 0; color: var(--ink); text-decoration: none; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.dk:hover { transform: translateY(-4px) scale(1.06); }
.dk .tile { position: relative; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(160deg, var(--tile1), var(--tile2)); border: 1px solid var(--tileline); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px rgba(8, 15, 34, .35); color: var(--tileink); }
.dk.apart .tile { background: linear-gradient(160deg, var(--amst1), var(--amst2)); border-color: var(--amsline); color: var(--amsink); }
.dk svg { width: 24px; height: 24px; }
.dk .nm { max-width: 100%; font-size: 12px; line-height: 1.15; color: var(--dim); text-align: center; overflow-wrap: anywhere; }
.dk .so { max-width: 100%; margin-top: -2px; font-size: 10.5px; line-height: 1.1; color: var(--dim); text-align: center; white-space: nowrap; }
.build { margin: 0; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* a plain message on its own: opening the desk, a failure with a way forward */
.card { max-width: 440px; margin: 22vh auto 0; padding: 26px 28px; border-radius: 24px; text-align: center; }
.card-text { margin: 0 0 4px; font-size: 17px; font-weight: 300; }
.card-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.btn { min-height: 44px; padding: 0 22px; border-radius: 99px; border: 1px solid var(--keyline); background: var(--keybg); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.btn.pri { border-color: transparent; background: var(--btnbg); color: var(--btnink); }

/* ═══ a phone, or a narrow window ═══ */
@media (max-width: 760px) {
  #gate { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 22px; padding: 22px 16px; }
  .clock { font-size: clamp(56px, 20vw, 110px); }
  .panel { padding: 22px 20px 18px; border-radius: 24px; }
  .rule { margin-top: 14px; }
  .desk { gap: 10px; padding: 10px 12px 14px; grid-template-rows: auto auto auto auto; }
  .topbar { grid-template-columns: minmax(0, 1fr); padding: 4px 8px 4px 14px; }
  .tb-l, .tb-c { display: none; }
  .tb-r { justify-content: space-between; }
  .chip { font-size: 10px; padding: 4px 9px; }
  .d-grid { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 4px; }
  .d-left { padding: 8px 4px 0; }
  .d-h { font-size: clamp(30px, 9vw, 44px); margin-bottom: 14px; }
  .d-biz { margin: 6px 0 12px; }
  .wait { max-width: none; }
  .orbit { width: 100%; aspect-ratio: 1 / 1; }
  .hn { width: 60px; } .hn .ph { width: clamp(38px, 11.5cqw, 52px); }
  .hn .lb small { display: none; }
  .dock { width: 100%; justify-content: flex-start; padding: 14px 12px 12px; gap: 14px; }
  .dk-cap { position: static; display: block; margin: 0 0 10px 2px; }
  .dk-div { display: none; }
  .dk-group { width: 100%; } .dk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
  .dk { width: auto; min-height: 84px; } .dk .so { font-size: 10px; }
}
@media (max-width: 380px) { .dk-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .card { margin-top: 14vh; padding: 22px 18px; } }
@media (max-height: 600px) and (min-width: 761px) { .orbit { width: min(100%, 520px); } .desk { gap: 8px; } }

/* "reduce motion" in the device's settings: nothing drifts, pulses or slides (the orb sees the same setting and becomes a still glow) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
