/* Down₂ — terminal desktop
   Layout: a phosphor-green CRT desktop with one fixed terminal. Icons on the left
   run "programs" in it; a tmux-style status line along its bottom switches them.
   Phones (and no JavaScript) get the same modules stacked down the page.
   One theme on purpose: it's a dark machine. */

:root {
  --void: #040705;          /* desk */
  --panel: #060D08;         /* terminal screen */
  --bar: #0B150E;           /* title bar */
  --fg: #C6F2D3;            /* body text: pale phosphor */
  --muted: #6F9C7E;         /* secondary text */
  --green: #5CFF8D;         /* phosphor accent */
  --green-deep: #1E7A43;
  --amber: #FF3B4E;         /* show alerts */
  --red: #FF6B5A;           /* errors, close */
  --cyan: #8FD3FF;          /* directories in ls */
  --line: rgba(92, 255, 141, .16);
  --glow: 0 0 8px rgba(92, 255, 141, .45);
  --display: "VT323", "IBM Plex Mono", ui-monospace, monospace;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--void);
  color: var(--fg);
  font: 14.5px/1.65 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
a:hover { color: var(--fg); }
input, select, textarea, button { font: inherit; color: inherit; }
:focus-visible { outline: 1px dashed var(--green); outline-offset: 3px; }
::selection { background: var(--green); color: var(--void); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--muted); }
.small { font-size: 13px; }
.ps1 { color: var(--green); }

/* the subscript 2, like H₂O */
sub { font-size: .48em; line-height: 0; position: relative; top: .32em; vertical-align: baseline; margin-left: .04em; }

/* ---------- menu bar ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 1001; background: #060C08; }
.menubar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1000;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 40px;
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
  background: rgba(6, 12, 8, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.menubar__left, .menubar__right, .menubar__menu { display: flex; align-items: center; }
.menubar__name {
  display: flex; align-items: baseline; gap: 8px;
  font: 26px/1 var(--display); letter-spacing: 1px; color: var(--green); text-decoration: none;
  text-shadow: var(--glow); padding: 6px 16px 6px 0;
}
.prompt { font-size: 20px; font-family: var(--display); color: var(--muted); text-shadow: none; }
.menubar__menu a { color: var(--fg); text-decoration: none; padding: 6px 10px; }
.menubar__menu a::before { content: "./"; color: var(--muted); }
.menubar__menu a:hover { background: var(--green); color: var(--void); }
.menubar__menu a:hover::before { color: var(--void); }
.menubar__right { gap: 18px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.menubar__booking { display: flex; align-items: center; gap: 8px; color: var(--green); text-decoration: none; padding: 6px 0; }
.dot { width: 7px; height: 7px; background: var(--green); box-shadow: var(--glow); animation: pulse 1.6s steps(2) infinite; }

/* ---------- the desk ---------- */
.desk { position: relative; overflow: hidden; padding-bottom: 28px; isolation: isolate; }
.desk::before { /* dot grid + green haze */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(30,122,67,.16), transparent 65%),
    radial-gradient(circle, rgba(92,255,141,.13) 1px, transparent 1.4px) 0 0 / 22px 22px;
}
.desk::after { /* CRT scanlines + vignette over everything, ignores clicks */
  content: ""; position: absolute; inset: 0; z-index: 2000; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}
.desk__rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .42; }
.desk__mark {
  position: absolute; right: 44px; bottom: 6px; margin: 0; z-index: -1;
  font: 210px/1 var(--display); letter-spacing: 4px;
  color: transparent; -webkit-text-stroke: 1px rgba(92,255,141,.16);
  pointer-events: none; user-select: none;
}

/* ---------- icons ---------- */
.icons {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
  padding: 20px 12px 4px;
}
.icon {
  position: relative;
  width: 88px; padding: 10px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none;
}
.icon svg { overflow: visible; transition: transform .15s ease, filter .15s ease; }
.icon:hover svg { transform: translateY(-2px); filter: drop-shadow(0 0 6px rgba(92,255,141,.7)); }
.i-line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.i-faint { stroke-opacity: .4; }
.i-fill { fill: rgba(92,255,141,.08); }
.i-blink { animation: blink 1.1s steps(2) infinite; }
.icon span { font-size: 12.5px; color: var(--fg); white-space: nowrap; padding: 0 6px; }
.icon.is-selected span { background: var(--green); color: var(--void); }
.icon.is-selected svg { filter: drop-shadow(0 0 8px rgba(92,255,141,.8)); }
.icon[data-open="alerts"] .i-line { stroke: var(--amber); }
.icon[data-open="alerts"] .i-fill { fill: rgba(255,59,78,.1); }
.icon[data-open="alerts"].is-selected span { background: var(--amber); }
.icon.is-minimized::after { content: ""; width: 6px; height: 6px; margin-top: -2px; background: var(--green); box-shadow: var(--glow); }

/* ---------- hint box, shown when the terminal is closed ---------- */
.note {
  display: none;
  position: absolute; right: 56px; top: 200px; z-index: 1; width: 220px;
  padding: 14px 16px 16px; background: rgba(255,59,78,.06);
  border: 1px dashed rgba(255,59,78,.55); color: var(--amber);
}
.note p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.note__k { background: var(--amber); color: var(--void); padding: 0 5px; margin-right: 6px; font-weight: 600; }
.note a { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--amber); text-underline-offset: 3px; }

/* ================= THE TERMINAL ================= */
.tty { position: relative; z-index: 3; }
.tty__bar, .tty__status { display: none; } /* desktop only */

/* modules: on phones each is its own little terminal card */
.mod {
  margin: 14px; padding: 18px 16px 20px;
  background: var(--panel); border: 1px solid var(--line);
  scroll-margin-top: 56px;
}
.mod p { margin: 0 0 10px; max-width: 66ch; }
.out > :last-child { margin-bottom: 0; }
.cmd { color: var(--fg); white-space: pre-wrap; word-break: break-word; }
.out .cmd { margin-top: 18px; }
.cmd__text { color: var(--fg); }
.cmd.is-typing::after { /* the cursor rides along while a command is typed */
  content: ""; display: inline-block; width: .6em; height: 1.1em; margin-left: 1px; vertical-align: -.2em;
  background: var(--green); box-shadow: var(--glow);
}
.caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--green); box-shadow: var(--glow); animation: blink 1s steps(2) infinite; }
.pend { visibility: hidden; }

.big {
  margin: 2px 0 0; font: clamp(64px, 16vw, 104px)/.88 var(--display); letter-spacing: 2px;
  color: var(--green); text-shadow: var(--glow), 0 0 30px rgba(92,255,141,.35);
}
.ls { display: flex; flex-wrap: wrap; gap: 2px 24px; margin: 0 0 6px; padding: 0; list-style: none; color: var(--cyan); }
.ok { color: var(--green); font-weight: 600; }
.log { font-variant-numeric: tabular-nums; margin-bottom: 2px !important; }
.ellipsis::after { content: "..."; display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; animation: dots 1.6s steps(4) infinite; }
.link { font-weight: 600; text-decoration: none; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--green); border-radius: 0;
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; background: none;
  transition: background .1s ease, color .1s ease;
}
.btn--solid { background: var(--green); color: var(--void); box-shadow: var(--glow); }
.btn--solid:hover { background: var(--fg); border-color: var(--fg); color: var(--void); }
.btn--line { color: var(--green); }
.btn--line:hover { background: rgba(92,255,141,.12); color: var(--green); }
.btn--amber { background: var(--amber); border-color: var(--amber); color: var(--void); box-shadow: 0 0 10px rgba(255,59,78,.4); }
.btn--amber:hover { background: #FF7482; }
.btn:disabled { opacity: .55; cursor: progress; }

/* photos */
.viewer { display: flex; flex-direction: column; border: 1px solid var(--line); }
.viewer__stage {
  position: relative; margin: 0; background: #020403; height: min(62vw, 340px);
  display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y;
}
.viewer__img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: saturate(.85) contrast(1.05); transition: opacity .2s ease; }
.viewer__img:not([src]) { display: none; }
.viewer__img.is-loading { opacity: 0; }
.viewer__empty { margin: 0 !important; text-align: center; line-height: 1.8; }
.viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 1px solid var(--line); cursor: pointer;
  background: rgba(4,7,5,.75); color: var(--green); font-weight: 600;
}
.viewer__nav:hover { background: var(--green); color: var(--void); }
.viewer__nav--prev { left: 10px; }
.viewer__nav--next { right: 10px; }
.viewer__caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px;
  background: linear-gradient(transparent, rgba(2,4,3,.85)); font-size: 13px; pointer-events: none;
}
.viewer__caption:empty { display: none; }
.filmstrip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--green-deep) transparent; }
.filmstrip:empty { display: none; }
.thumb { flex: none; width: 56px; height: 56px; padding: 0; border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--bar); opacity: .5; }
.thumb:hover { opacity: .85; }
.thumb.is-active { opacity: 1; border-color: var(--green); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* mixes */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; margin-right: 8px; }
.tracklist { border: 1px solid var(--line); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.tracklist__row { display: grid; grid-template-columns: 3ch minmax(0, 1fr) 6ch; gap: 12px; margin: 0 !important; max-width: none !important; padding: 7px 12px; }
.tracklist__row span:last-child { text-align: right; }
.tracklist__row--head { color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.tracklist__row.is-pending { color: var(--muted); }
.listen__player { display: block; width: 100%; height: 352px; border: 0; margin-bottom: 12px; }

/* booking: a CLI with flags */
.mail { display: flex; flex-direction: column; }
.mail__row {
  display: flex; align-items: center; gap: 12px; min-height: 40px;
  border-bottom: 1px dashed var(--line);
}
.mail__row:focus-within { border-bottom: 1px solid var(--green); }
.mail__label { width: 76px; flex: none; color: var(--green); font-size: 13.5px; }
.mail input, .mail select { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; color: var(--fg); }
.mail select option { background: var(--panel); }
input::placeholder, textarea::placeholder { color: #4E7A5D; }
.mail input:focus, .mail select:focus, .mail textarea:focus { outline: none; }
.mail input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) hue-rotate(80deg); }
.mail__split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.mail__split .mail__row .mail__label { width: auto; }
.mail__message { display: block; padding-top: 10px; }
.mail__message .mail__label { display: block; margin-bottom: 6px; }
.mail textarea {
  display: block; width: 100%; border: 1px solid var(--line); background: rgba(0,0,0,.25); resize: vertical;
  line-height: 1.6; padding: 8px 10px; color: var(--fg);
}
.mail textarea:focus { border-color: var(--green); }
.mail__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin: 12px 0 8px; }
.mail__status { flex: 1 1 220px; font-size: 13.5px; color: var(--muted); }
.mail__status:empty { flex-basis: 0; }
.mail__status.is-error { color: var(--red); }

/* show alerts: amber */
.mod--amber .ps1, .mod--amber .ok { color: var(--amber); }
.mod--amber .caret { background: var(--amber); }
.alerts { margin-top: 14px; }
.alerts__row { display: flex; gap: 10px; flex-wrap: wrap; }
.alerts__row input, .toast__row input {
  flex: 1 1 200px; min-width: 0; padding: 9px 12px; border: 1px solid rgba(255,59,78,.4);
  background: rgba(0,0,0,.3); color: var(--fg);
}
.alerts__row input:focus, .toast__row input:focus { outline: none; border-color: var(--amber); }
.alerts .mail__status { display: block; margin-top: 10px; }
.sent { margin-top: 6px; }

.mod--trash { display: none; }
.icon--trash { display: none; }

.footer { padding: 18px; text-align: center; font-size: 12.5px; color: var(--muted); background: var(--void); border-top: 1px solid var(--line); }

/* ================= DESKTOP: one terminal ================= */
.is-desktop body { overflow: hidden; }
.is-desktop .desk { height: calc(100vh - 41px); min-height: 600px; padding: 0; }
.is-desktop .footer { display: none; }
.is-desktop .icons { position: absolute; left: 22px; top: 22px; flex-direction: column; flex-wrap: nowrap; padding: 0; }
.is-desktop .icon { width: 96px; }
.is-desktop .icon--trash { display: flex; margin-top: 8px; }
.is-desktop .note { display: block; }
.is-desktop .tty.is-open ~ .note, .is-desktop .desk:has(.tty.is-open) .note { display: none; }

.is-desktop .tty {
  position: absolute; z-index: 10;
  left: 150px; right: 32px; top: 28px; bottom: 28px; margin: auto;
  width: min(780px, calc(100% - 182px)); height: min(620px, calc(100% - 56px));
  display: none; flex-direction: column;
  background: var(--panel); border: 1px solid rgba(92,255,141,.28);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 40px 90px -20px rgba(0,0,0,.95), 0 0 80px -20px rgba(92,255,141,.22);
  transform-origin: center;
}
.is-desktop .tty.is-open { display: flex; }
.is-desktop .tty.is-booting { animation: crt-on .32s cubic-bezier(.2,.7,.2,1); }
.is-desktop .tty.is-closing { animation: crt-off .26s ease-in forwards; pointer-events: none; }

.is-desktop .tty__bar {
  display: flex; align-items: center; gap: 10px; flex: none; height: 32px; padding: 0 10px;
  background: var(--bar); border-bottom: 1px solid var(--line); font-size: 12.5px; user-select: none;
}
.tty__btns { display: flex; gap: 2px; flex: none; }
.tty__btn { padding: 1px 4px; color: var(--muted); text-decoration: none; line-height: 1.4; }
.tty__btn:hover { background: var(--green); color: var(--void); }
.tty__btn--close:hover { background: var(--red); }
.tty__title { flex: 1; text-align: center; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tty__size { flex: none; width: 58px; text-align: right; color: var(--muted); }

.is-desktop .tty__screen {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 22px;
  background: radial-gradient(ellipse at 50% 30%, rgba(30,122,67,.12), transparent 70%), var(--panel);
  text-shadow: 0 0 1px rgba(198,242,211,.35);
  scrollbar-width: thin; scrollbar-color: var(--green-deep) transparent;
}
.is-desktop .mod { display: none; margin: 0; padding: 0; border: 0; background: none; }
.is-desktop .mod.is-active { display: block; }

.is-desktop .tty__status {
  display: flex; align-items: stretch; flex: none; height: 26px;
  background: var(--green-deep); color: #DFFFE9; font-size: 13px; user-select: none;
}
.tty__session { padding: 0 12px; display: flex; align-items: center; background: var(--green); color: var(--void); font-weight: 600; }
.tty__session sub { font-size: .6em; }
.tty__tabs { display: flex; flex: 1; }
.tty__tabs a { display: flex; align-items: center; padding: 0 10px; color: inherit; text-decoration: none; }
.tty__tabs a:hover { background: rgba(0,0,0,.25); }
.tty__tabs a.is-selected { background: var(--void); color: var(--green); }
.tty__tabs a.is-selected::after { content: "*"; }
.tty__clock { display: flex; align-items: center; padding: 0 12px; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.25); }

/* ================= PHONES ================= */
@media (max-width: 760px), (max-height: 539px) {
  .desk__mark { font-size: 120px; right: 16px; }
}
@media (max-width: 560px) {
  .icons { gap: 0; padding: 16px 4px 0; }
  .icon { width: 20%; }
  .icon span { font-size: 10.5px; padding: 0 3px; }
  .menubar__menu, .menubar__date { display: none; }
  .mod { margin: 12px; }
  .mail__split { grid-template-columns: 1fr; }
  .mail__split .mail__row .mail__label { width: 76px; }
}

/* ---------- corner notification ---------- */
.toast {
  position: fixed; z-index: 1900; right: 16px; top: 52px; width: 340px; max-width: calc(100vw - 32px);
  padding: 10px 14px 14px; color: var(--fg); background: rgba(8,16,11,.96);
  border: 1px solid rgba(255,59,78,.45); box-shadow: 0 18px 40px -12px rgba(0,0,0,.8), 0 0 30px -10px rgba(255,59,78,.3);
  animation: toast-in .3s ease-out;
}
.toast[hidden] { display: none; }
.toast.is-leaving { animation: toast-out .25s ease forwards; }
.toast__head { display: flex; align-items: center; font-size: 12.5px; margin-bottom: 6px; color: var(--amber); }
.toast__time { margin-left: 8px; color: var(--muted); flex: 1; }
.toast__x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 2px 4px; }
.toast__x:hover { background: var(--red); color: var(--void); }
.toast__title { margin: 0; font-weight: 600; color: var(--amber); }
.toast__text { margin: 2px 0 10px; font-size: 14px; }
.toast__row { display: flex; gap: 8px; }
.toast__row button { flex: none; padding: 8px 12px; border: 0; cursor: pointer; font-weight: 600; background: var(--amber); color: var(--void); }
.toast .mail__status { display: block; margin-top: 8px; }
.toast__done { margin: 4px 0 2px; font-weight: 600; color: var(--amber); }
@media (max-width: 760px), (max-height: 539px) {
  .toast { top: auto; bottom: max(12px, env(safe-area-inset-bottom, 0px)); right: 12px; left: 12px; width: auto; max-width: none; }
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes dots { to { width: 1.85em; } }
/* old CRT: a bright horizontal line snaps open into the picture, and collapses back to a dot */
@keyframes crt-on {
  0%   { opacity: 0; transform: scale(.6, .004); filter: brightness(4); }
  45%  { opacity: 1; transform: scale(1, .004); filter: brightness(4); }
  100% { transform: none; filter: none; }
}
@keyframes crt-off {
  0%   { transform: none; filter: none; opacity: 1; }
  55%  { transform: scale(1, .004); filter: brightness(4); opacity: 1; }
  100% { transform: scale(0, .004); filter: brightness(6); opacity: 0; }
}
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ================= CRT REFINEMENT ================= */
:root { --fg: #A8F7BE; --muted: #4FA26A; }
.desk::before { background: radial-gradient(ellipse at 55% 45%, rgba(30,122,67,.12), transparent 70%); }
.desk::after { background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.7) 100%); }
.desk__mark { display: none; }
.icon span { text-shadow: 0 0 6px rgba(92,255,141,.5); }
.menubar { font-size: 13px; }
.menubar__name sub { margin-left: 2px; }
.mail__label, .tracklist__row--head { letter-spacing: .02em; }
.tracklist__row--head { text-transform: none; }
.btn { font-weight: 400; font-size: 14.5px; padding: 6px 16px; }

/* the terminal is a curved, glowing tube */
.is-desktop .tty {
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(92,255,141,.35);
  background: #020503;
  box-shadow:
    0 0 0 6px #070C08, 0 0 0 7px rgba(92,255,141,.12),
    0 0 40px rgba(92,255,141,.18), 0 0 120px -10px rgba(92,255,141,.16),
    0 40px 100px -20px rgba(0,0,0,.95);
}
.is-desktop .tty__bar { background: rgba(10,22,14,.9); }
.is-desktop .tty__screen {
  padding: 18px 28px 22px;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, #0B1F12 0%, #061109 55%, #020503 100%);
  text-shadow: 0 0 4px rgba(92,255,141,.55), 0 0 1px rgba(168,247,190,.9), .6px 0 0 rgba(255,40,90,.10), -.6px 0 0 rgba(40,160,255,.10);
}
/* glass: scanlines, curvature shading, a slow refresh band, faint flicker */
.is-desktop .tty::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(to bottom, transparent 0%, rgba(168,247,190,.045) 48%, rgba(168,247,190,.07) 50%, transparent 54%) 0 0 / 100% 300% no-repeat,
    repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 110% 100% at 50% 50%, transparent 60%, rgba(0,0,0,.55) 100%);
  box-shadow: inset 0 0 50px rgba(0,0,0,.75), inset 0 0 6px rgba(92,255,141,.25);
  animation: roll 7s linear infinite, flicker 4s steps(1) infinite;
}
.big { font-size: clamp(72px, 16vw, 120px); text-shadow: 0 0 6px rgba(92,255,141,.8), 0 0 24px rgba(92,255,141,.5), 0 0 60px rgba(92,255,141,.25); }
.ps1 { text-shadow: 0 0 6px rgba(92,255,141,.6); }
.is-desktop .tty.is-booting { animation: crt-on .2s cubic-bezier(.2,.7,.2,1); }
.is-desktop .tty.is-closing { animation: crt-off .2s ease-in forwards; }
.tty__status { font-size: 13px; }
.tty__session sub { margin-left: 1px; }
@keyframes roll { from { background-position: 0 -100%, 0 0, 0 0; } to { background-position: 0 200%, 0 0, 0 0; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 41% { opacity: .9; } 42% { opacity: 1; } 77% { opacity: .94; } 78% { opacity: 1; } }
@media (max-width: 760px), (max-height: 539px) {
  .mod { border-radius: 12px; box-shadow: inset 0 0 30px rgba(0,0,0,.6), 0 0 24px rgba(92,255,141,.08); text-shadow: 0 0 4px rgba(92,255,141,.45); }
}
.icon span { background: rgba(4,7,5,.85); }
.icon.is-selected span { background: var(--green); }
.icon[data-open="alerts"].is-selected span { background: var(--amber); }
@media (max-width: 560px) { .icon span { font-size: 11.5px; } }

/* ================= REVIEW PASS ================= */

/* pixel font: no fake bold, no ligatures */
body { font-synthesis: none; font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; }
.link, .ok, .tty__session, .note__k, .note a, .toast__title, .toast__row button,
.viewer__nav, .toast__done, .toast__head b, .btn { font-weight: 400; }
input::placeholder, textarea::placeholder { color: #639A75; }

/* wordmarks: the subscript hugs the N */
.menubar__name { gap: 0; }
.menubar__name .prompt { margin-right: 10px; }
.big sub { font-size: .42em; top: .1em; }
.big + .dim { margin-top: 10px; }

/* one phosphor colour; amber stays the only accent */
.ls { color: var(--green); text-shadow: 0 0 6px rgba(92,255,141,.5); }
.req { font-style: normal; color: var(--amber); margin-left: 1px; }

/* terminal: fits its content, crisper glow, thicker tube bezel */
.is-desktop .tty {
  height: min(680px, calc(100% - 40px));
  box-shadow:
    0 0 0 12px #0A110C, 0 0 0 13px rgba(92,255,141,.14),
    0 0 40px rgba(92,255,141,.18), 0 0 120px -10px rgba(92,255,141,.16),
    0 40px 100px -20px rgba(0,0,0,.95);
}
.is-desktop .tty__screen {
  font-size: 15px; line-height: 1.65;
  text-shadow: 0 0 2px rgba(168,247,190,.35), 0 0 7px rgba(92,255,141,.28), .6px 0 rgba(255,40,90,.12), -.6px 0 rgba(40,160,255,.12);
}
.is-desktop .tty__screen .dim { text-shadow: 0 0 6px rgba(79,162,106,.25); }
.is-desktop .big { font-size: 96px; }
.is-desktop .out .cmd { margin-top: 14px; }
.is-desktop .mail textarea { height: 84px; }
.mod:focus { outline: none; }

/* glass: static scanlines + vignette + a faint reflection; the refresh band
   moves with transform (cheap) instead of background-position */
.is-desktop .tty::after {
  background:
    radial-gradient(ellipse 60% 30% at 28% 6%, rgba(255,255,255,.05), transparent 70%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 110% 100% at 50% 50%, transparent 60%, rgba(0,0,0,.55) 100%);
  animation: flicker 4s steps(1) infinite;
}
.is-desktop .tty::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34%; z-index: 5; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(168,247,190,.045) 48%, rgba(168,247,190,.07) 50%, transparent 54%);
  animation: roll 7s linear infinite; will-change: transform;
}
@keyframes roll { from { transform: translateY(-100%); } to { transform: translateY(300%); } }

/* title-bar buttons are real buttons now */
.tty__btn { border: 0; background: none; font: inherit; cursor: pointer; }
.tty__btn:focus-visible { outline-offset: -1px; }
.tty__tabs a:focus-visible { outline: none; background: var(--void); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

/* booking form: one input column, themed selects and date picker */
.mail__label, .mail__split .mail__row .mail__label { width: 9ch; }
.mail select, .mail input[type="date"] { -webkit-appearance: none; appearance: none; min-height: 40px; text-align: left; }
.mail select {
  padding-right: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%235CFF8D'/%3E%3C/svg%3E") no-repeat right 4px center;
}
.mail input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) sepia(1) saturate(4) hue-rotate(85deg); opacity: .7; }
.mail input[type="date"]::-webkit-date-and-time-value { text-align: left; }

/* empty photo viewer: a small dashed slot instead of a black hole */
.viewer__stage { background: rgba(0,0,0,.35); }
.viewer:has(.viewer__empty:not([hidden])) { border-style: dashed; }
.viewer:has(.viewer__empty:not([hidden])) .viewer__stage { height: 130px; background: transparent; }

/* icons: a dark backdrop so the rain never cuts through them */
.is-desktop .icons::before {
  content: ""; position: absolute; inset: -22px -24px -40px -22px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(4,7,5,.9), rgba(4,7,5,.6) 70%, transparent);
}
.desk__rain { opacity: .55; }

/* toast above the vignette, matching buttons */
.toast { z-index: 2100; }
.toast__row button { padding: 6px 14px; box-shadow: 0 0 10px rgba(255,59,78,.4); }

/* short laptops: everything reachable */
.is-desktop .desk { height: calc(100vh - 41px); height: calc(100dvh - 41px); min-height: 0; }
@media (max-height: 760px) {
  .is-desktop .icons { top: 12px; }
  .is-desktop .icon { padding: 4px; gap: 4px; }
  .is-desktop .icon svg { width: 34px; height: 34px; }
  .is-desktop .icon--trash { margin-top: 0; }
  .is-desktop .big { font-size: 80px; }
}

/* touch screens that get the desktop layout (tablets) */
@media (pointer: coarse) {
  .is-desktop .tty__status { height: 40px; }
  .is-desktop .tty__bar { height: 44px; }
  .tty__btn { padding: 8px 10px; }
  .note p { display: none; }
}

/* ---------- phones ---------- */
.mod { scroll-margin-top: 52px; }
.link, .small a { display: inline-block; padding: 10px 0; }
.menubar__booking, .menubar__name { min-height: 44px; }
@media (max-width: 760px), (max-height: 539px) {
  .menubar__menu, .menubar__date { display: none; }
  .desk::after { position: fixed; }
  .desk__rain { position: fixed; inset: 0; height: 100vh; height: 100lvh; opacity: .3; }
  .toast { background: #08100B; }
  .toast__text { display: none; }
  /* booking first: empty galleries go last */
  /* each card is a small CRT with its own title bar */
  .mod { position: relative; overflow: hidden; padding-top: 46px; }
  .mod::before {
    content: "down2@auvipho: " attr(data-path); position: absolute; inset: 0 0 auto; height: 32px; padding: 5px 14px;
    font-size: 12.5px; color: var(--muted); background: rgba(10,22,14,.95); border-bottom: 1px solid var(--line);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mod::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  }
}
@media (max-height: 539px) and (min-width: 761px) {
  .desk__rain { position: fixed; inset: 0; height: 100vh; opacity: .3; }
}
.footer a { color: var(--muted); }
.is-desktop .desk { height: calc(100vh - 45px); height: calc(100dvh - 45px); }

/* readable body type: a clean mono, with the pixel font kept for the logo and big headings */
.is-desktop .tty__screen { text-shadow: 0 0 6px rgba(92,255,141,.22); }
.is-desktop .tty__screen .dim { text-shadow: none; }
.btn, .ok, .link, .tty__session, .toast__title, .toast__row button { font-weight: 500; }
.ok { letter-spacing: .02em; }
.mod--amber .ok { font-family: var(--display); font-size: 26px; font-weight: 400; line-height: 1.1; margin-bottom: 6px; }
.icon span, .tty__tabs a { letter-spacing: .01em; }

/* ---------- alerts: yellow mast on the icon ---------- */
:root { --yellow: #FFD23F; }
.icon[data-open="alerts"] .i-line.i-mast { stroke: var(--yellow); }
.icon[data-open="alerts"] .i-fill.i-mast { fill: rgba(255,210,63,.25); }

/* ---------- alerts: the spinning 3D beacon ----------
   A red warning sign turning on its vertical axis like a coin; seven stacked
   layers give it thickness. After signing up it becomes a yellow smiley. */
.beacon {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 26px auto 0; padding-bottom: 6px; perspective: 520px; max-width: none !important;
}
.beacon__coin { position: relative; width: 92px; height: 92px; transform-style: preserve-3d; animation: spin-y 2.6s linear infinite; }
.beacon__face { position: absolute; inset: 0; transform-style: preserve-3d; }
.beacon__layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(var(--z)); }
.b-stroke { fill: none; stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.b-thick { stroke-width: 6; }
.beacon__warn .b-stroke { stroke: #7A0E1A; }
.beacon__warn .b-dot { fill: #7A0E1A; }
.beacon__warn .beacon__front .b-stroke { stroke: var(--amber); }
.beacon__warn .beacon__front .b-dot { fill: var(--amber); }
.beacon__warn .beacon__front { filter: drop-shadow(0 0 6px rgba(255,59,78,.8)) drop-shadow(0 0 18px rgba(255,59,78,.45)); }
.beacon__smile .b-stroke { stroke: #7A5E08; }
.beacon__smile .b-dot { fill: #7A5E08; }
.beacon__smile .beacon__front .b-stroke { stroke: var(--yellow); }
.beacon__smile .beacon__front .b-dot { fill: var(--yellow); }
.beacon__smile .beacon__front { filter: drop-shadow(0 0 6px rgba(255,210,63,.8)) drop-shadow(0 0 18px rgba(255,210,63,.45)); }
.beacon__smile, .beacon__ok { display: none; }
.beacon__label { margin: 0 !important; font: 30px/1 var(--display); letter-spacing: .14em; }
.beacon__alert { color: var(--amber); text-shadow: 0 0 8px rgba(255,59,78,.7); animation: blink 1.2s steps(2) infinite; }
.beacon__ok { color: var(--yellow); text-shadow: 0 0 8px rgba(255,210,63,.7); }
/* signed up: swap faces with a quick flip */
.beacon.is-happy .beacon__warn, .beacon.is-happy .beacon__alert { display: none; }
.beacon.is-happy .beacon__smile { display: block; }
.beacon.is-happy .beacon__ok { display: inline; }
.beacon.is-happy .beacon__coin { animation: flip-in .7s cubic-bezier(.2,.8,.2,1), spin-y 4s linear .7s infinite; }
@keyframes spin-y { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes flip-in { from { transform: rotateY(-540deg) scale(.6); } to { transform: rotateY(0deg) scale(1); } }
.is-desktop .tty__screen .beacon__label { text-shadow: inherit; }
.mod--amber .sent .ok { color: var(--yellow); text-shadow: 0 0 8px rgba(255,210,63,.5); }

/* ---------- alerts: the beacon fills the free space in the terminal ---------- */
.beacon__layer { transform: translateZ(calc(var(--z) * var(--depth, 1))); }
.is-desktop #alerts.is-active { display: flex; flex-direction: column; min-height: 100%; }
.is-desktop #alerts .out { flex: 1; display: flex; flex-direction: column; }
.is-desktop #alerts .beacon { flex: 1; justify-content: center; margin: 12px 0 0; padding-bottom: 4px; perspective: 900px; }
.is-desktop #alerts .beacon__coin {
  --depth: 2.6;
  width: clamp(120px, calc(100vh - 560px), 260px); height: clamp(120px, calc(100vh - 560px), 260px);
}
.is-desktop #alerts .beacon__label { font-size: clamp(32px, 5.2vh, 52px); letter-spacing: .2em; }
@media (max-width: 760px), (max-height: 539px) {
  .beacon__coin { --depth: 1.8; width: 170px; height: 170px; }
  .beacon__label { font-size: 40px; }
  .beacon { margin-top: 30px; padding-bottom: 14px; }
}
.beacon__alert { animation: pulse-label 1.4s ease-in-out infinite; }
@keyframes pulse-label { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.is-desktop #alerts .beacon__coin { --depth: 1.9; }


/* ================= COUNCIL ROUND 1 ================= */
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
.sent:focus, .toast__done:focus { outline: none; }

/* focus: one strong, consistent ring */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.icon:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.icon:hover span { background: rgba(92,255,141,.18); }
.icon.is-selected:hover span { background: var(--green); }
.icon[data-open="alerts"].is-selected:hover span { background: var(--amber); }

/* menubar: current page, readable subscript, never wraps on tablets */
.menubar__menu a[aria-current="page"] { color: var(--green); box-shadow: inset 0 -2px 0 var(--green); }
.menubar__name sub { font-size: .6em; }
@media (max-width: 1100px) {
  .menubar { flex-wrap: nowrap; }
  .menubar__date { display: none; }
  .menubar__menu a { padding: 6px 7px; }
  .menubar__menu a::before { content: none; }
  .menubar__name { padding-right: 10px; }
  .menubar__right { gap: 12px; }
}

/* terminal chrome sits above the glass so its controls stay legible */
.is-desktop .tty__bar, .is-desktop .tty__status { position: relative; z-index: 6; }
.is-desktop .tty::after { box-shadow: inset 0 0 36px rgba(0,0,0,.5), inset 0 0 6px rgba(92,255,141,.25); }
.tty__btn { color: var(--fg); min-height: 24px; min-width: 32px; padding: 2px 6px; }
.tty__size { color: var(--muted); }
.tty__tabs a:focus-visible { outline: none; background: rgba(0,0,0,.35); color: #fff; box-shadow: inset 0 -3px 0 var(--green); }
@media (prefers-reduced-motion: reduce) { .is-desktop .tty::before { display: none; } }
/* long modules on short screens: fade the bottom edge so it reads as scrollable */
.is-desktop .tty__screen { -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }

/* field outlines meet 3:1, invalid fields go red after interaction */
.mail__row { border-bottom-color: rgba(92,255,141,.4); }
.mail textarea { border-color: rgba(92,255,141,.4); }
.mail__row:focus-within { border-bottom: 2px solid var(--green); margin-bottom: -1px; background: rgba(92,255,141,.05); }
.mail__row:has(:user-invalid) { border-bottom: 1px solid var(--red); }
.mail textarea:user-invalid, .alerts__row input:user-invalid { border-color: var(--red); }
.alerts__row input, .toast__row input { border-color: rgba(255,59,78,.8); }
.alerts__row input:focus-visible, .toast__row input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mail > .dim:first-of-type { max-width: none; text-wrap: balance; }
.mail select:invalid { color: #639A75; }
.mail input, .mail select, .mail textarea, .alerts input { scroll-margin-top: 72px; }
/* themed date picker: green calendar icon, placeholder colour until a date is set */
.mail input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none; opacity: 1; cursor: pointer; color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%235CFF8D' stroke-width='1.5'%3E%3Crect x='1' y='2.5' width='12' height='10.5'/%3E%3Cpath d='M1 6h12M4 1v3M10 1v3'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.mail input[type="date"]:not(.has-value)::-webkit-datetime-edit { color: #639A75; }

/* red belongs to alerts only: tip box and required marks go green */
.note { background: rgba(4,7,5,.92); border-color: rgba(92,255,141,.45); color: var(--fg); }
.note__k { background: var(--green); }
.note a { color: var(--green); }
.req { color: var(--green); }

/* mailing list details */
.mod--amber .ps1 { text-shadow: 0 0 6px rgba(255,59,78,.5); }
.beacon__label { padding-left: .2em; }
.beacon__ok { letter-spacing: .08em; word-spacing: .15em; }

/* toast: bottom-right on desktop so it never covers the terminal */
.is-desktop .toast { top: auto; bottom: 24px; right: 24px; }
.toast__done { color: var(--yellow); text-shadow: 0 0 8px rgba(255,210,63,.5); }
.toast__x { min-width: 32px; min-height: 32px; }

.big + .dim { text-wrap: balance; }

/* short laptops: tighter form so send stays in view */
@media (max-height: 760px) {
  .is-desktop .mail textarea { height: 60px; }
  .is-desktop .mail__row { min-height: 34px; }
}

/* touch: 44px targets, 16px fields (no iOS zoom on focus) */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  .btn, .toast__row button { min-height: 44px; }
  .toast__x { min-width: 44px; min-height: 44px; }
  .is-desktop .tty__status { height: 44px; }
  .tty__btn { padding: 11px 12px; }
  .small a { padding: 12px 0; }
  .menubar__menu a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* phones (and landscape phones) */
@media (max-width: 760px), (max-height: 539px) {
  .icons svg { width: 34px; height: 34px; }
  .icons { padding-top: 10px; }
  .icon { padding: 6px 2px; gap: 5px; }
  .desk::after { background: radial-gradient(ellipse at center, transparent 65%, rgba(0,0,0,.5) 100%); }
  .mod::before { font-size: 13px; padding-top: 6px; }
  .menubar__booking { border: 1px solid var(--green); padding: 4px 10px; }
  .toast__text { display: block; }
}
@media (max-width: 560px) {
  .icon span { font-size: 12px; }
  .big { font-size: 64px; }
}

/* ================= COUNCIL ROUND 2 ================= */
/* toast placement: docked under the icon column whenever it fits (compact icons below 880px tall),
   top-right under the menubar otherwise; it never covers the tab bar or the icons */
@media (max-height: 879px) {
  .is-desktop .icons { top: 12px; }
  .is-desktop .icon { padding: 4px; gap: 4px; }
  .is-desktop .icon svg { width: 34px; height: 34px; }
  .is-desktop .icon--trash { margin-top: 0; }
}
@media (max-width: 1239px), (max-height: 699px) {
  .is-desktop .toast { top: calc(env(safe-area-inset-top, 0px) + 57px); bottom: auto; right: 16px; left: auto; }
}
@media (min-width: 1240px) and (min-height: 700px) {
  .is-desktop .toast { left: 16px; right: auto; top: auto; bottom: 16px; width: 252px; }
  .is-desktop .toast__text { display: none; }
  .is-desktop .toast__row { flex-wrap: wrap; }
  .is-desktop .toast__row input { flex-basis: 100%; }
  .is-desktop .toast__row button { flex: 1; }
}
.toast__text { text-wrap: balance; }
/* tabs never wrap */
.tty__tabs a { white-space: nowrap; }
@media (max-width: 860px) {
  .is-desktop .tty__clock { display: none; }
  .is-desktop .tty__tabs a { padding: 0 7px; }
}
/* the smallest phones keep a one-line menubar */
@media (max-width: 360px) {
  .menubar__booking { white-space: nowrap; padding: 4px 8px; }
  .menubar__name .prompt { display: none; }
}
@media (max-width: 360px) { .icon span { font-size: 11px; padding: 0 1px; } }
@media (max-width: 360px) { .toast__text { display: none; } }
@media (pointer: coarse) { .mail .small a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; } }
