/* JetBrains Mono, self-hosted (variable font, 300–700) so the site loads where Google is blocked */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/jetbrains-mono-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/jetbrains-mono-greek.woff2') format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/jetbrains-mono-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg:        #0b0b1a;
  --bg-soft:   #13132a;
  --fg:        #c0caf5;
  --dim:       #565f89;
  --purple:    #bb9af7;
  --pink:      #f7768e;
  --magenta:   #ff79c6;
  --cyan:      #7dcfff;
  --blue:      #7aa2f7;
  --green:     #9ece6a;
  --yellow:    #e0af68;
  --glow:      0 0 6px rgba(var(--purple-rgb),0.55), 0 0 14px rgba(var(--pink-rgb),0.25);
  --purple-rgb: 187,154,247; --pink-rgb: 247,118,142; --cyan-rgb: 125,207,255; --magenta-rgb: 255,121,198;
  --green-rgb: 158,206,106; --yellow-rgb: 224,175,104; --blue-rgb: 122,162,247;
  /* the windows — crypt, mail, vault, adventure — dress themselves from these, so `theme`
     reaches them too instead of leaving them in the default purple */
  --win-bg:    rgba(9,7,20,0.97);      /* the body of a window   */
  --win-bar-a: #1a1036;                /* its title bar, left    */
  --win-bar-b: #241443;                /*            …and right  */
  --win-foot:  rgba(10,8,22,0.7);      /* status line and footer */
  --win-sunk:  rgba(0,0,0,0.25);       /* text areas set into it */
}
/* themes: `theme amber|green|ice|default` */
:root[data-theme="amber"] {
  --bg: #100b04; --bg-soft: #1a1208; --fg: #ffcf8a; --dim: #8a6a35;
  --purple: #ffb000; --pink: #ff6a3d; --magenta: #ff9e2c; --cyan: #ffd27f; --blue: #ffc25c; --green: #ffb000; --yellow: #ffe0a3;
  --purple-rgb: 255,176,0; --pink-rgb: 255,106,61; --cyan-rgb: 255,210,127; --magenta-rgb: 255,158,44;
  --green-rgb: 255,176,0; --yellow-rgb: 255,224,163; --blue-rgb: 255,194,92;
  --win-bg: rgba(16,11,4,0.97); --win-bar-a: #2a1a06; --win-bar-b: #3a2408; --win-foot: rgba(26,18,8,0.8); --win-sunk: rgba(0,0,0,0.3);
  --glow: 0 0 6px rgba(255,176,0,0.55), 0 0 14px rgba(255,106,61,0.25);
}
:root[data-theme="green"] {
  --bg: #030d05; --bg-soft: #071a0b; --fg: #9dffb0; --dim: #3f8a4f;
  --purple: #33ff66; --pink: #d6ffdc; --magenta: #7dffa0; --cyan: #b8ffc8; --blue: #5cff8a; --green: #33ff66; --yellow: #e6ffb3;
  --purple-rgb: 51,255,102; --pink-rgb: 214,255,220; --cyan-rgb: 184,255,200; --magenta-rgb: 125,255,160;
  --green-rgb: 51,255,102; --yellow-rgb: 230,255,179; --blue-rgb: 92,255,138;
  --win-bg: rgba(3,13,5,0.97); --win-bar-a: #06200c; --win-bar-b: #0a2f12; --win-foot: rgba(7,26,11,0.8); --win-sunk: rgba(0,0,0,0.3);
  --glow: 0 0 6px rgba(51,255,102,0.55), 0 0 14px rgba(51,255,102,0.25);
}
:root[data-theme="ice"] {
  --bg: #070b16; --bg-soft: #0d1526; --fg: #dbe7ff; --dim: #5b6b8f;
  --purple: #9ecbff; --pink: #ff8fa3; --magenta: #c4b5ff; --cyan: #e0f4ff; --blue: #7fb2ff; --green: #a6f0d8; --yellow: #ffe9a6;
  --purple-rgb: 158,203,255; --pink-rgb: 255,143,163; --cyan-rgb: 224,244,255; --magenta-rgb: 196,181,255;
  --green-rgb: 166,240,216; --yellow-rgb: 255,233,166; --blue-rgb: 127,178,255;
  --win-bg: rgba(7,11,22,0.97); --win-bar-a: #101a33; --win-bar-b: #162446; --win-foot: rgba(13,21,38,0.8); --win-sunk: rgba(0,0,0,0.28);
  --glow: 0 0 6px rgba(158,203,255,0.55), 0 0 14px rgba(196,181,255,0.25);
}
:root[data-theme="amber"] body { background: radial-gradient(ellipse at 20% 0%, #2a1a06 0%, #100b04 55%, #060300 100%); }
:root[data-theme="green"] body { background: radial-gradient(ellipse at 20% 0%, #0a2a10 0%, #030d05 55%, #010402 100%); }
:root[data-theme="ice"]   body { background: radial-gradient(ellipse at 20% 0%, #14203d 0%, #070b16 55%, #03050c 100%); }
:root[data-theme="amber"] .terminal, :root[data-theme="green"] .terminal, :root[data-theme="ice"] .terminal { background: rgba(var(--purple-rgb),0.04); }
:root[data-theme="amber"] .titlebar { background: linear-gradient(90deg, #2a1a06 0%, #3a2408 100%); }
:root[data-theme="green"] .titlebar { background: linear-gradient(90deg, #06200c 0%, #0a2f12 100%); }
:root[data-theme="ice"]   .titlebar { background: linear-gradient(90deg, #101a33 0%, #162446 100%); }

/* crt on|off: scanlines + flicker + bloom, or nothing */
body.crt-off::before { display: none; }
body.crt-on .terminal { animation: crt-flicker 7s infinite; }
body.crt-on .screen { text-shadow: 0 0 1.5px rgba(var(--purple-rgb),0.45); }
body.crt-on::after { background:
    radial-gradient(circle at 85% 15%, rgba(var(--pink-rgb),0.08), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(var(--cyan-rgb),0.08), transparent 40%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%); }
@keyframes crt-flicker { 0%, 100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: 0.94; } 94% { opacity: 1; } 97% { opacity: 0.97; } 98% { opacity: 1; } }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: radial-gradient(ellipse at 20% 0%, #1a1040 0%, #0b0b1a 55%, #05050f 100%);
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  padding: 24px;
  position: relative;
  transition: padding .28s ease;
}
/* green dot: terminal fills the window */
body.max { padding: 0; }
body.max .terminal {
  max-width: 100vw; height: 100vh;
  border-radius: 0; border-width: 0; box-shadow: none;
}
button.dot { border: 0; padding: 0; margin: 0; font: inherit; vertical-align: middle; cursor: pointer; }
button.dot:hover { transform: scale(1.18); }
button.dot:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }

body::before {
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0px,
    rgba(255,255,255,0.015) 1px,
    transparent 2px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
}

body::after {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(var(--pink-rgb),0.08), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(var(--cyan-rgb),0.08), transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.terminal {
  position: relative;
  z-index: 3;
  max-width: 1000px;
  margin: 0 auto;
  height: calc(100vh - 48px);
  background: rgba(13, 13, 32, 0.82);
  border: 1px solid rgba(var(--purple-rgb),0.35);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(var(--pink-rgb),0.12),
    0 20px 60px rgba(0,0,0,0.6),
    0 0 40px rgba(var(--purple-rgb),0.15);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-width .28s ease, height .28s ease, border-radius .28s ease, box-shadow .28s ease;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #1a1036 0%, #221441 100%);
  border-bottom: 1px solid rgba(var(--purple-rgb),0.25);
  color: var(--dim);
  font-size: 12px;
  user-select: none;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ff5f57; box-shadow: 0 0 6px #ff5f57; }
.dot.y { background: #febc2e; box-shadow: 0 0 6px #febc2e; }
.dot.g { background: #28c840; box-shadow: 0 0 6px #28c840; }
.titlebar .title {
  flex: 1;
  text-align: center;
  color: var(--cyan);
  letter-spacing: 1px;
}

.announcement {
  padding: 6px 14px;
  background: rgba(var(--magenta-rgb),0.12);
  border-bottom: 1px solid rgba(var(--magenta-rgb),0.3);
  color: var(--magenta);
  font-size: 12px;
  text-align: center;
  letter-spacing: 1px;
}
.announcement.hidden { display: none; }

.nav {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(10,10,24,0.6);
  border-bottom: 1px solid rgba(var(--purple-rgb),0.15);
  font-size: 13px;
  overflow-x: auto;
}
.nav-item {
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--dim);
  cursor: pointer;
  transition: all 0.12s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-item:hover { color: var(--cyan); }
.nav-item.active {
  color: var(--magenta);
  border-color: rgba(var(--magenta-rgb),0.45);
  background: rgba(var(--magenta-rgb),0.08);
  text-shadow: var(--glow);
}
.nav .sep { color: var(--dim); padding: 4px 2px; }
.nav .admin-label {
  color: var(--pink);
  font-size: 11px;
  letter-spacing: 2px;
  padding: 4px 6px;
  align-self: center;
  text-transform: uppercase;
}

.banner {
  padding: 14px 10px 10px;
  background: linear-gradient(180deg, rgba(20,10,40,0.6), rgba(10,10,24,0.4));
  border-bottom: 1px solid rgba(var(--purple-rgb),0.2);
  text-align: center;
  overflow: hidden;
  flex-shrink: 0;
}
.banner-art {
  display: inline-block;
  margin: 0;
  white-space: pre;
  color: var(--purple);
  text-shadow:
    0 0 8px rgba(var(--purple-rgb),0.65),
    0 0 18px rgba(var(--pink-rgb),0.35),
    0 0 30px rgba(var(--cyan-rgb),0.15);
  line-height: 1.0;
  font-weight: 700;
  font-size: clamp(4px, 1.17vw, 13px);
  letter-spacing: 0;
  animation: banner-pulse 4s ease-in-out infinite;
}
@keyframes banner-pulse {
  0%, 100% { filter: brightness(1);   }
  50%      { filter: brightness(1.15); }
}
.banner-tag {
  margin-top: 6px;
  color: var(--cyan);
  letter-spacing: 6px;
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.85;
}
@media (max-width: 640px) {
  .banner-art { font-size: clamp(3px, 2.4vw, 10px); }
  .banner-tag { letter-spacing: 3px; font-size: 9px; }
}

.section-art {
  white-space: pre;
  color: var(--purple);
  text-shadow:
    0 0 8px rgba(var(--purple-rgb),0.65),
    0 0 18px rgba(var(--pink-rgb),0.35);
  line-height: 1.0;
  font-weight: 700;
  font-size: clamp(3px, 0.85vw, 9px);
  margin: 18px 0 8px;
  overflow-x: auto;
}
@media (max-width: 640px) {
  .section-art { font-size: clamp(2px, 1.8vw, 7px); }
}

/* the mark above the home page (Logo.txt): the same glow as the headings, a little larger,
   and in the red the house is named for */
.logo-art {
  white-space: pre;
  color: var(--pink);
  text-shadow:
    0 0 8px rgba(var(--pink-rgb),0.6),
    0 0 20px rgba(var(--magenta-rgb),0.3);
  line-height: 1.0;
  font-size: clamp(5px, 0.75vw, 9px);
  margin: 10px 0 4px;
  overflow-x: auto;
}
@media (max-width: 640px) {
  .logo-art { font-size: clamp(4px, 2.2vw, 8px); }
}

.screen {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--purple) transparent;
}
.screen::-webkit-scrollbar { width: 8px; }
.screen::-webkit-scrollbar-thumb {
  background: rgba(var(--purple-rgb),0.35);
  border-radius: 4px;
}

.line { white-space: pre-wrap; word-break: break-word; }
.prompt-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.prompt { white-space: nowrap; }
.prompt .user   { color: var(--green); }
.prompt .user.admin { color: var(--pink); text-shadow: 0 0 6px rgba(var(--pink-rgb),0.6); }
.prompt .sep    { color: var(--dim); }
.prompt .host   { color: var(--blue); }
.prompt .path   { color: var(--purple); }
.prompt .sym    { color: var(--pink); margin-left: 2px; }
.prompt .label  { color: var(--cyan); }
.prompt .field  { color: var(--pink); }
.prompt .hint-inline { color: var(--dim); }

.cmd { color: var(--cyan); }
.out { color: var(--fg); margin-bottom: 8px; }
.err { color: var(--pink); }
.ok  { color: var(--green); }
.hint { color: var(--dim); }
.accent { color: var(--magenta); }
.alert-box {
  margin: 8px 0; padding: 8px 10px; border-radius: 4px;
  border-left: 3px solid var(--dim); background: rgba(var(--purple-rgb),0.05);
}
.alert-box.alert-info     { border-left-color: var(--cyan); }
.alert-box.alert-warn     { border-left-color: var(--yellow); background: rgba(var(--yellow-rgb),0.06); }
.alert-box.alert-critical { border-left-color: var(--pink);   background: rgba(var(--pink-rgb),0.08); }
.alert-head  { font-size: 11px; letter-spacing: 0.08em; color: var(--dim); }
.alert-box.alert-warn     .alert-head { color: var(--yellow); }
.alert-box.alert-critical .alert-head { color: var(--pink); }
.alert-title { margin: 3px 0; color: var(--fg); }
.alert-body  { color: var(--dim); margin-bottom: 4px; }

.research-list div { margin-bottom: 6px; }
.research-head { margin: 4px 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(var(--purple-rgb),0.25); }
.research-entry { margin-bottom: 10px; }
.research-kind {
  display: inline-block; min-width: 62px; padding: 0 5px; margin-right: 4px;
  border: 1px solid rgba(var(--cyan-rgb),0.35); border-radius: 3px;
  background: rgba(var(--cyan-rgb),0.07); color: var(--cyan); font-size: 11px;
}
.research-body {
  margin: 4px 0 0 4px; padding: 6px 8px;
  border-left: 2px solid rgba(var(--purple-rgb),0.3);
  background: var(--win-sunk); border-radius: 0 3px 3px 0; color: var(--fg);
}

/* athena — the agent on the Mac Studio. She gets her own colour so her voice
   is never mistaken for the terminal's own output. */
.athena-name {
  color: var(--magenta);
  text-shadow: 0 0 6px rgba(var(--magenta-rgb),0.4);
}
.athena-reply {
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 2px solid rgba(var(--magenta-rgb),0.35);
  white-space: normal;
}
.athena-wait { margin-bottom: 8px; }
.athena-banner {
  margin: 4px 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--magenta-rgb),0.25);
  border-radius: 4px;
  background: rgba(var(--magenta-rgb),0.05);
}
/* a message she wants to send: deliberately loud, because saying yes to it
   puts words in front of a real person under your name */
.athena-approve {
  margin: 6px 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--yellow-rgb),0.45);
  border-radius: 4px;
  background: rgba(var(--yellow-rgb),0.06);
}
.athena-approve-head {
  color: var(--yellow);
  margin-bottom: 6px;
}
.athena-approve-body {
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--win-sunk);
  border-radius: 3px;
  color: var(--fg);
}

.key {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid rgba(var(--purple-rgb),0.4);
  border-radius: 3px;
  background: rgba(var(--purple-rgb),0.08);
  color: var(--cyan);
  font-size: 12px;
}

.page h2 {
  font-size: 14px;
  margin: 14px 0 6px;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.page h2::before { content: "# "; color: var(--dim); }

.page .listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}
.card {
  border: 1px solid rgba(var(--cyan-rgb),0.25);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(var(--cyan-rgb),0.04);
  transition: all 0.15s ease;
}
.card:hover {
  border-color: rgba(var(--magenta-rgb),0.6);
  background: rgba(var(--magenta-rgb),0.06);
  transform: translateY(-1px);
}
.card .name { color: var(--cyan); font-weight: 500; }
.card .role { color: var(--purple); font-size: 12px; margin-top: 3px; }
.card .desc { color: var(--dim); font-size: 12px; margin-top: 3px; }
.card .meta { color: var(--dim); font-size: 11px; margin-top: 6px; }
.card a { color: var(--magenta); }

.post {
  border-left: 2px solid rgba(var(--purple-rgb),0.45);
  padding: 4px 0 6px 14px;
  margin: 12px 0 18px;
}
.post .title { color: var(--cyan); font-weight: 600; font-size: 15px; }
.post .meta { color: var(--dim); font-size: 11px; margin: 2px 0 8px; letter-spacing: 1px; text-transform: uppercase; }
.post .body p { margin: 0 0 8px; }
.post .id { color: var(--pink); font-size: 11px; margin-left: 6px; opacity: 0.7; }

a { color: var(--magenta); text-decoration: none; border-bottom: 1px dashed rgba(var(--magenta-rgb),0.4); }
a:hover { color: var(--cyan); border-color: var(--cyan); }

.ls-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 2px 0 10px;
}
.ls-dir { color: var(--cyan); display: inline-flex; align-items: center; gap: 6px; }
/* folder glyph drawn in the title purple (emoji can't be recoloured) */
.ls-dir::before {
  content: "";
  flex: none; width: 1.1em; height: 0.9em;
  background: var(--purple);
  -webkit-mask: var(--folder-mask) center / contain no-repeat; mask: var(--folder-mask) center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(var(--purple-rgb),0.65));
}
:root {
  --folder-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M1 2.5A1.5 1.5 0 0 1 2.5 1h6.2c.4 0 .8.16 1.06.44L11.5 3.2h10A1.5 1.5 0 0 1 23 4.7v12.8a1.5 1.5 0 0 1-1.5 1.5h-19A1.5 1.5 0 0 1 1 17.5z'/%3E%3C/svg%3E");
  --locked-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath fill-rule='evenodd' d='M1 2.5A1.5 1.5 0 0 1 2.5 1h6.2c.4 0 .8.16 1.06.44L11.5 3.2h10A1.5 1.5 0 0 1 23 4.7v12.8a1.5 1.5 0 0 1-1.5 1.5h-19A1.5 1.5 0 0 1 1 17.5z M9 9.6h6v5H9z M10.2 9.4V8.4a1.8 1.8 0 0 1 3.6 0v1h-1.1v-1a.7.7 0 0 0-1.4 0v1z'/%3E%3C/svg%3E");
}

/* admin-only directories show up locked for guests */
.ls-dir.locked { color: var(--dim); }
.ls-dir.locked::before {
  background: var(--pink);
  -webkit-mask-image: var(--locked-mask); mask-image: var(--locked-mask);
  filter: drop-shadow(0 0 4px rgba(var(--pink-rgb),0.55));
}
.ls-dir .tag { color: var(--pink); font-size: 11px; opacity: 0.85; margin-left: 4px; }

/* news categories as folders with the name underneath */
.folders { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 6px 0 16px; }
.folder {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 76px; padding: 6px 4px; border-radius: 6px;
  color: var(--cyan); font-size: 12px; cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}
.folder::before {
  content: ""; width: 36px; height: 30px;
  background: var(--purple);
  -webkit-mask: var(--folder-mask) center / contain no-repeat; mask: var(--folder-mask) center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(var(--purple-rgb),0.55));
}
.folder:hover { color: var(--magenta); transform: translateY(-2px); }
.folder.active { color: var(--purple); }
.folder.active::before { filter: drop-shadow(0 0 9px rgba(var(--purple-rgb),0.95)); }
.post .cat { color: var(--purple); }

/* encrypted applications */
:root { --lock-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Cpath fill-rule='evenodd' d='M4 10V7a6 6 0 0 1 12 0v3h1.5A1.5 1.5 0 0 1 19 11.5v10a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 21.5v-10A1.5 1.5 0 0 1 2.5 10zm2.5 0h7V7a3.5 3.5 0 0 0-7 0z'/%3E%3C/svg%3E"); }
.lock { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--pink); font-size: 11px; font-weight: 400; vertical-align: middle; }
.lock::before { content: ""; width: 9px; height: 11px; background: var(--pink);
  -webkit-mask: var(--lock-mask) center / contain no-repeat; mask: var(--lock-mask) center / contain no-repeat; }
.card.locked { border-color: rgba(var(--pink-rgb),0.35); background: rgba(var(--pink-rgb),0.03); }
.actions { color: var(--dim); font-size: 12px; margin: 2px 0 10px; }
.actions .act { color: var(--pink); cursor: pointer; border-bottom: none; margin-right: 12px; }
.actions .act:hover, .post .act:hover { color: var(--cyan); }
.post .act { color: var(--pink); font-size: 11px; margin-left: 8px; cursor: pointer; border-bottom: none; }

/* lock screen: opaque, nothing shows through */
.lockscreen { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.lock-box { text-align: center; color: var(--dim); font-size: 13px; }
.lock-title { color: var(--magenta); font-size: 18px; letter-spacing: 3px; margin-bottom: 10px; text-shadow: var(--glow); }
.lock-input { display: block; margin: 14px auto 8px; width: 260px; background: transparent; border: none; border-bottom: 1px solid rgba(var(--purple-rgb),0.5);
  outline: none; color: var(--fg); font: inherit; font-size: 15px; text-align: center; caret-color: var(--magenta); }
.lock-input.masked { -webkit-text-security: disc; }
.lock-msg { color: var(--pink); min-height: 18px; }
.lock-out { color: var(--cyan); cursor: pointer; border-bottom: 1px dashed rgba(var(--cyan-rgb),0.5); }

/* evasive login column */
.evasive {
  position: fixed; top: 50%; transform: translateY(-50%);
  left: max(6px, calc(50% - 500px - 34px));
  display: flex; flex-direction: column; align-items: center;
  color: var(--dim); opacity: 0.38; font-size: 10px; line-height: 1.45; letter-spacing: 1px;
  user-select: none; pointer-events: none; z-index: 3;
}
.evasive .wrap { opacity: 0.45; font-style: italic; }
.evasive i { height: 6px; }
.evasive b { margin-top: 6px; color: var(--magenta); font-weight: 500; font-size: 11px; opacity: 0.9; }
@media (max-width: 1080px) { .evasive { left: 4px; } }

/* calendar listing */
.ev { margin: 2px 0; }
.ev-desc { color: var(--fg); opacity: 0.85; margin: 1px 0 6px 40px; font-size: 13px; line-height: 1.45; }
.ev-past { opacity: 0.55; }

/* fun & utility command output */
.hl { background: rgba(var(--purple-rgb),0.28); color: var(--fg); border-radius: 2px; }
.post .draft { color: var(--yellow); font-size: 11px; margin-left: 6px; }
.card .act { color: var(--pink); margin-left: 10px; cursor: pointer; border-bottom: none; }
.card .act:hover { color: var(--cyan); }
.todo-done { text-decoration: line-through; color: var(--dim); }
.neofetch { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.neofetch pre { margin: 0; color: var(--purple); text-shadow: var(--glow); font-size: 5px; line-height: 1; white-space: pre; }
.neofetch .kv .k { min-width: 110px; }
.swatches { margin-top: 8px; }
.swatches span { display: inline-block; width: 22px; height: 12px; margin-right: 3px; border-radius: 2px; }
.tree, .post-screen, .sl-track, .say { margin: 0 0 8px; white-space: pre; color: var(--fg); line-height: 1.25; }
.post-screen { color: var(--dim); }
.sl-track { overflow: hidden; }
.sl-train { display: inline-block; margin-left: 100%; color: var(--purple); animation: sl-run 3.4s linear forwards; }
@keyframes sl-run { to { transform: translateX(calc(-100% - 100vw)); } }
.matrix-canvas { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.qr { display: inline-block; background: #fff; color: #000; padding: 8px 12px; margin: 4px 0 8px;
      font-size: 8px; line-height: 1.2; letter-spacing: 0; white-space: pre; border-radius: 3px; }
.qr-hint { color: var(--dim); font-size: 12px; }

.kv { color: var(--dim); }
.kv .k { color: var(--cyan); display: inline-block; min-width: 160px; }
.kv .v { color: var(--fg); }

.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 14px;
  border-top: 1px solid rgba(var(--purple-rgb),0.15);
  background: rgba(10,10,24,0.5);
}
/* a long prompt (edit fields, the adventure wizard) must never squeeze the input away on a phone */
.input-wrap .prompt { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.input-field {
  position: relative;
  flex: 1 0 45%;
  min-width: 120px;
  display: flex;
  align-items: center;
  height: 1.4em;
}
/* login password step: mask characters without becoming a password field,
   so browsers never learn this as a login box and stop offering saved passwords */
#cmd-input.masked { -webkit-text-security: disc; }
#cmd-input {
  position: relative;
  z-index: 1;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  caret-color: transparent;
  padding: 0;
}
#cmd-measure {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
  left: 0; top: 0;
}
.cursor {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.55em;
  height: 1.05em;
  background: var(--magenta);
  transform: translate(0, -50%);
  pointer-events: none;
  z-index: 0;
  box-shadow: 0 0 6px var(--magenta), 0 0 14px rgba(var(--magenta-rgb),0.4);
  mix-blend-mode: difference;
  animation: blink 1.05s steps(1) infinite;
  transition: transform 0.03s linear;
}
.cursor.unfocused {
  background: transparent;
  border: 1px solid var(--magenta);
  box-shadow: none;
  animation: none;
}
@keyframes blink { 50% { opacity: 0; } }

/* Multi-line modal editor */
.modal {
  position: fixed; inset: 0;
  background: rgba(5,5,15,0.72);
  backdrop-filter: blur(6px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.hidden { display: none; }
.modal-box {
  width: min(820px, 96vw);
  max-height: 86vh;
  background: rgba(13,13,32,0.97);
  border: 1px solid rgba(var(--magenta-rgb),0.45);
  border-radius: 10px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.7),
    0 0 60px rgba(var(--pink-rgb),0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #251440 0%, #2d1650 100%);
  border-bottom: 1px solid rgba(var(--magenta-rgb),0.35);
  color: var(--dim);
  font-size: 12px;
}
.modal-title {
  flex: 1;
  text-align: center;
  color: var(--magenta);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(var(--magenta-rgb),0.45);
}
.modal-hint {
  padding: 8px 20px;
  background: rgba(10,10,24,0.6);
  color: var(--dim);
  font-size: 12px;
  border-bottom: 1px solid rgba(var(--purple-rgb),0.15);
}
.modal-hint .key { margin: 0 2px; }
#modal-text {
  flex: 1;
  min-height: 280px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  padding: 18px 22px;
  resize: none;
  caret-color: var(--magenta);
}
#modal-text::placeholder { color: var(--dim); }

/* Typewriter reveal. The remainder is taken out of the layout rather than merely hidden, so a
   block grows as it is typed instead of appearing full size and filling in. tw-hold keeps a
   whole element — a post, a card, a heading — off the screen until the typing reaches its
   first character, so the page draws itself top to bottom rather than appearing all at once. */
.tw-rest { display: none; }
.tw-hold { display: none; }
.tw-cursor {
  display: inline-block; width: 0.55em; height: 1em; vertical-align: -0.15em;
  margin-left: 1px; background: var(--magenta); box-shadow: 0 0 6px var(--magenta);
}

/* ambient audio dock (bottom-right); the YouTube player itself is kept off-screen */
.audio-dock {
  position: fixed; right: 18px; bottom: 14px; z-index: 10;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  font-size: 12px; user-select: none;
}
.audio-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(13, 13, 32, 0.92);
  border: 1px solid rgba(var(--purple-rgb),0.35);
  border-radius: 8px;
  color: var(--purple);
  font: inherit; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 18px rgba(var(--purple-rgb),0.12);
  backdrop-filter: blur(6px);
}
.audio-tab:hover { color: var(--cyan); border-color: rgba(var(--cyan-rgb),0.5); }
.audio-tab .caret { color: var(--dim); }
.audio-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.audio-eq i { display: block; width: 3px; height: 4px; background: var(--dim); border-radius: 1px; }
.audio-dock.playing .audio-eq i { background: var(--green); animation: audio-eq 0.9s ease-in-out infinite; }
.audio-dock.playing .audio-eq i:nth-child(2) { animation-delay: 0.15s; }
.audio-dock.playing .audio-eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes audio-eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.audio-panel {
  width: 250px; max-width: calc(100vw - 36px);
  padding: 10px 12px;
  background: rgba(13, 13, 32, 0.94);
  border: 1px solid rgba(var(--purple-rgb),0.35);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55), 0 0 24px rgba(var(--purple-rgb),0.12);
  backdrop-filter: blur(6px);
}
.audio-panel .audio-head { color: var(--dim); margin-bottom: 4px; }
.audio-panel .audio-head::before { content: "# "; }
.audio-panel .audio-title {
  color: var(--fg); margin-bottom: 10px; line-height: 1.4;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.audio-controls { display: flex; align-items: center; gap: 10px; }
.audio-btn {
  padding: 5px 12px;
  background: rgba(var(--purple-rgb),0.12);
  border: 1px solid rgba(var(--purple-rgb),0.45);
  border-radius: 6px;
  color: var(--cyan); font: inherit; cursor: pointer;
}
.audio-btn:hover { background: rgba(var(--purple-rgb),0.22); }
.audio-btn:disabled { color: var(--dim); cursor: default; }
.audio-state { color: var(--dim); }
.audio-source { color: var(--dim); margin-top: 8px; }
.audio-source a { color: var(--dim); }
/* keep the player in the DOM (playback needs it) but out of sight */
.yt-audio-host {
  position: fixed; right: 0; bottom: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; overflow: hidden;
}
.yt-audio-host iframe { width: 1px; height: 1px; border: 0; }

@media (max-width: 640px) {
  body { padding: 8px; font-size: 13px; }
  body.max { padding: 0; }
  .audio-dock { right: 10px; bottom: 10px; }
  .terminal { height: calc(100vh - 16px); }
  body.max .terminal { height: 100vh; }
  .kv .k { min-width: 110px; }
}
/* ============================================================
   THE LAYOUT
   The screen is the whole window: no frame, no title bar, no directory links. The mark sits in
   the top left with its line under it, the caret rests on the floor, and everything between is
   room for the output. Kept as one block so it reads as a single decision and can be lifted out
   in one piece.
   ============================================================ */
body { padding: 0; }
.terminal {
  max-width: 100vw; width: 100vw; height: 100vh;
  border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none;
  background: transparent;                     /* the page's own gradient shows through */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  transition: none;
}
.titlebar { display: none; }                   /* the dots live on the windows now, not the page */
.nav { display: none; }                        /* you type where you are going, or use the arrows */

.banner {
  grid-column: 1; grid-row: 1 / span 2;
  align-self: start;
  text-align: left; background: none; border-bottom: 0;
  padding: 16px 26px 10px 24px;
}
.banner-art { font-size: clamp(3px, 0.52vw, 7px); }
.banner-tag { margin-top: 7px; letter-spacing: 5px; font-size: 9px; opacity: 0.75; }
.announcement {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  background: none; border: 0; text-align: right; padding: 0 26px 0 0;
}

.screen {
  grid-column: 1 / -1; grid-row: 3; min-height: 0;
  padding: 14px 26px 10px;
  border-top: 1px solid rgba(var(--purple-rgb),0.16);
  margin-top: 10px;
}
/* prose stays readable on a wide monitor; art, tables and cards still take the whole width */
.screen p, .post .body { max-width: 94ch; }
.page .listing { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.input-wrap {
  grid-column: 1 / -1; grid-row: 4;
  background: rgba(10,10,24,0.55);
  border-top: 1px solid rgba(var(--purple-rgb),0.22);
  padding: 12px 26px 14px;
}

/* the audio pill takes the corner the directory links used to. column-reverse drops its panel
   below the tab, and the caret is turned over to match: the script flips one glyph between open
   and shut, so rotating it keeps both states pointing the right way. */
.audio-dock { top: 16px; bottom: auto; flex-direction: column-reverse; }
.audio-tab .caret { display: inline-block; transform: rotate(180deg); }

@media (max-width: 760px) {
  .terminal { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
  .banner { grid-column: 1; grid-row: 1; padding: 12px 14px 6px; }
  .banner-art { font-size: clamp(3px, 2.2vw, 9px); }
  .announcement { grid-column: 1; grid-row: 3; text-align: left; padding: 0 14px 4px; }
  .screen { grid-row: 4; padding: 10px 14px 8px; margin-top: 6px; }
  .input-wrap { grid-row: 5; padding: 10px 14px 12px; }
  .audio-dock { top: 10px; }
}

/* past conversations with Athena (`athena chats`): the application cards, in her colour */
.chat-card { cursor: pointer; border-color: rgba(var(--magenta-rgb),0.25); background: rgba(var(--magenta-rgb),0.03); }
.chat-card .name { color: var(--fg); }
.chat-card .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-card .id { color: var(--dim); }
.chat-card.current { border-color: rgba(var(--magenta-rgb),0.6); box-shadow: 0 0 10px rgba(var(--magenta-rgb),0.15); }
/* a reopened conversation, replayed: set apart from what is said next */
.chat-replay {
  margin: 6px 0 10px; padding: 6px 0 2px 12px;
  border-left: 1px dashed rgba(var(--magenta-rgb),0.35);
}
.chat-replay > .hint:first-child { margin-bottom: 6px; }

/* ============================================================
   THE PHONE MENU (orb.js)
   Below 760px the input line gives way to the orb. body.orb-mode is set by the
   script, so a phone without it keeps the plain input; body.typing brings the
   line back while something needs typing, with the orb shrunk to its end.
   It sits above the audio pill (10) and under the rain (15), the editor (20),
   the windows (40) and the lock screen (60), so none of those are covered.
   ============================================================ */
.orb, .orb-panel { display: none; }
body.orb-mode .orb { display: block; }
body.orb-mode .orb-panel:not([hidden]) { display: block; }
body.orb-mode:not(.typing) .input-wrap { display: none; }
body.orb-mode:not(.typing) .screen { padding-bottom: 92px; }   /* the last line clears the orb */
body.orb-mode.typing .input-wrap { padding-right: 64px; }        /* room for the orb at the end */

.orb {
  position: fixed; z-index: 12;
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; margin-left: -29px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 22%),
    radial-gradient(circle at 50% 55%, rgba(var(--magenta-rgb),0.95) 0%, rgba(var(--pink-rgb),0.85) 38%, rgba(var(--purple-rgb),0.55) 70%, rgba(var(--purple-rgb),0.12) 100%);
  box-shadow:
    0 0 16px rgba(var(--magenta-rgb),0.55),
    0 0 40px rgba(var(--pink-rgb),0.28),
    inset 0 -8px 16px rgba(0,0,0,0.35);
  animation: orb-breathe 3.4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease;
}
.orb-core {
  position: absolute; inset: 24%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 0 10px rgba(255,255,255,0.25) inset;
}
.orb:active { transform: scale(0.92); }
.orb:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
body.orb-open .orb { animation: none; transform: scale(0.9); }
body.orb-mode.typing .orb {
  left: auto; right: 12px; margin-left: 0;
  bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  width: 40px; height: 40px;
}
@keyframes orb-breathe {
  0%, 100% { box-shadow: 0 0 14px rgba(var(--magenta-rgb),0.5), 0 0 34px rgba(var(--pink-rgb),0.22), inset 0 -8px 16px rgba(0,0,0,0.35); }
  50%      { box-shadow: 0 0 22px rgba(var(--magenta-rgb),0.7), 0 0 56px rgba(var(--pink-rgb),0.36), inset 0 -8px 16px rgba(0,0,0,0.35); }
}
@media (prefers-reduced-motion: reduce) { .orb { animation: none; transition: none; } }

.orb-panel {
  position: fixed; z-index: 13;
  left: 12px; right: 12px; bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  max-height: min(72vh, 620px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 12px;
  background: linear-gradient(var(--win-bg), var(--win-bg)), var(--bg);   /* solid: nothing reads through it */
  border: 1px solid rgba(var(--magenta-rgb),0.35);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 26px rgba(var(--magenta-rgb),0.14);
  font-size: 13px;
}
body.orb-mode.typing .orb-panel { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
.orb-head { color: var(--dim); font-size: 10px; letter-spacing: 3px; text-transform: uppercase; margin: 0 2px 8px; }
.orb-sections, .orb-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.orb-topics { margin-top: 8px; }
.orb-topics[hidden], .orb-list[hidden] { display: none; }
.orb-chip {
  font: inherit; color: var(--cyan); cursor: pointer;
  min-height: 40px; padding: 8px 11px;
  background: rgba(var(--cyan-rgb),0.05);
  border: 1px solid rgba(var(--cyan-rgb),0.3); border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.orb-chip.active { color: var(--magenta); border-color: rgba(var(--magenta-rgb),0.6); background: rgba(var(--magenta-rgb),0.08); }
.orb-row {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  margin-top: 10px; min-height: 44px; padding: 10px 12px;
  font: inherit; color: var(--fg); cursor: pointer; text-align: left;
  background: rgba(var(--purple-rgb),0.06);
  border: 1px solid rgba(var(--purple-rgb),0.3); border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.orb-row .orb-caret { color: var(--dim); transition: transform 0.15s ease; }
.orb-cmds.active { border-color: rgba(var(--magenta-rgb),0.5); color: var(--magenta); }
.orb-cmds.active .orb-caret { transform: rotate(180deg); }
.orb-chip:focus-visible, .orb-row:focus-visible, .orb-list .cmd:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* the help text for one topic, with every command a tap target */
.orb-list {
  margin-top: 8px; padding: 6px 10px 8px;
  border-left: 2px solid rgba(var(--purple-rgb),0.35);
  background: var(--win-sunk); border-radius: 0 4px 4px 0;
  color: var(--dim); line-height: 1.5;
}
.orb-list > div { padding: 3px 0; }
.orb-list .hint { color: var(--dim); }
.orb-list > .hint, .orb-list > div:first-child { color: var(--pink); }
.orb-list .cmd[role="button"] {
  display: inline-block; padding: 4px 2px; cursor: pointer;
  border-bottom: 1px dashed rgba(var(--cyan-rgb),0.5);
}
.orb-list .cmd.inert { color: var(--dim); }
.chat-card.private .name { color: var(--pink); }
