:root {
  --desktop-bg: #11100d;
  --desktop-bg-2: #0b0a08;
  --window-frame: #d8c6ae;
  --window-frame-top: #e7d7c0;
  --window-line: #b89f7a;
  --window-shadow: rgba(0, 0, 0, 0.34);
  --app-bg: #ede0cc;
  --app-sidebar: #e4d3bd;
  --app-toolbar: #e7d7c0;
  --app-paper: #faf2e5;
  --app-paper-2: #f4e7d4;
  --text-primary: #34281e;
  --text-secondary: #665648;
  --text-muted: #8a7662;
  --brass: #9a7a42;
  --line-soft: #d5c3aa;
  --line-mid: #bca486;
  --line-strong: #8f7554;
  --taskbar-bg: rgba(33, 27, 21, 0.92);
  --taskbar-text: #e7dccb;
  --taskbar-height: 46px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--text-primary);
  background: #0a0908;
}
button, input { font: inherit; }
a { color: inherit; }

.desktop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #1a1612;
}
.desktop__wallpaper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, #251f18 0%, #1a1612 60%, #110f0c 100%);
}
.desktop__wallpaper::before { display: none; }
.desktop__glow { display: none; }

/* FOD Propaganda Wallpaper — IT-deployed corporate motivation */
.desktop__poster {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  color: rgba(225, 205, 165, 0.65);
  font-family: 'IBM Plex Sans', sans-serif;
  user-select: none;
  max-width: 720px;
  padding: 60px 80px;
  border: 1px solid rgba(225, 205, 165, 0.1);
  text-shadow: 0 0 30px rgba(200, 170, 100, 0.15), 0 0 60px rgba(200, 170, 100, 0.06);
  filter: drop-shadow(0 0 40px rgba(200, 170, 100, 0.08));
}
.desktop__poster-seal {
  font-size: 56px;
  letter-spacing: 0.35em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: rgba(225, 205, 165, 0.5);
  text-shadow: 0 0 40px rgba(200, 170, 100, 0.25), 0 0 80px rgba(200, 170, 100, 0.1);
}
.desktop__poster-rule {
  width: 200px;
  height: 1px;
  background: rgba(225, 205, 165, 0.25);
  margin: 20px auto;
  border: none;
  box-shadow: 0 0 12px rgba(200, 170, 100, 0.15);
}
.desktop__poster-slogan {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  margin-bottom: 12px;
  color: rgba(225, 205, 165, 0.7);
  text-shadow: 0 0 20px rgba(200, 170, 100, 0.2), 0 0 50px rgba(200, 170, 100, 0.08);
}
.desktop__poster-sub {
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(225, 205, 165, 0.35);
  font-family: 'IBM Plex Mono', monospace;
  text-shadow: 0 0 15px rgba(200, 170, 100, 0.1);
}
.desktop__poster-footer {
  margin-top: 28px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(225, 205, 165, 0.18);
  font-family: 'IBM Plex Mono', monospace;
}

/* Mobile — unauthorized device block */
.mobile-block {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f0e0b;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  color: rgba(225, 205, 165, 0.7);
  overflow: hidden;
}
.mobile-block__static {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(225, 205, 165, 0.03) 2px, rgba(225, 205, 165, 0.03) 4px);
  pointer-events: none;
  animation: power-short 6s ease-in-out infinite;
}
.mobile-block__static::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(225, 205, 165, 0.06);
  animation: hard-flicker 8s step-end infinite;
}
@keyframes power-short {
  0%, 100% { opacity: 0.3; }
  14% { opacity: 0.3; }
  15% { opacity: 1; }
  16% { opacity: 0; }
  17% { opacity: 0.8; }
  18% { opacity: 0.1; }
  19% { opacity: 0.9; }
  20% { opacity: 0.3; }
  70% { opacity: 0.3; }
  71% { opacity: 0.7; }
  72% { opacity: 0; }
  73% { opacity: 0.3; }
}
@keyframes hard-flicker {
  0%, 100% { opacity: 0; }
  42% { opacity: 0; }
  42.5% { opacity: 1; background: rgba(225, 205, 165, 0.12); }
  43% { opacity: 0; }
  43.3% { opacity: 1; background: rgba(225, 205, 165, 0.08); }
  43.5% { opacity: 0; }
  78% { opacity: 0; }
  78.2% { opacity: 1; background: rgba(225, 205, 165, 0.1); }
  78.5% { opacity: 0; }
}
.mobile-block__seal {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(225, 205, 165, 0.5);
  text-shadow: 0 0 30px rgba(200, 170, 100, 0.2);
  margin-bottom: 24px;
  font-family: 'IBM Plex Sans', sans-serif;
  position: relative;
  z-index: 1;
}
.mobile-block__message {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 2;
  max-width: 320px;
  position: relative;
  z-index: 1;
}
.mobile-block__warning {
  margin-top: 32px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(225, 205, 165, 0.25);
  position: relative;
  z-index: 1;
}
.mobile-block__glitch {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(199, 212, 74, 0.35);
  font-family: 'IBM Plex Mono', monospace;
  animation: neon-flicker 12s step-end infinite;
  text-shadow: 0 0 8px rgba(199, 212, 74, 0.3), 0 0 20px rgba(199, 212, 74, 0.1);
  z-index: 1;
}
@keyframes neon-flicker {
  0%    { opacity: 0; }
  8%    { opacity: 0; }
  9%    { opacity: 0.9; }
  9.5%  { opacity: 0.2; }
  10%   { opacity: 0.85; }
  10.3% { opacity: 0.1; }
  10.6% { opacity: 0.95; }
  22%   { opacity: 0.95; }
  22.5% { opacity: 0.3; }
  23%   { opacity: 0.8; }
  28%   { opacity: 0.8; }
  28.2% { opacity: 0; }
  45%   { opacity: 0; }
  46%   { opacity: 0.7; }
  46.3% { opacity: 0.15; }
  46.8% { opacity: 0.9; }
  47.2% { opacity: 0.4; }
  47.5% { opacity: 0.85; }
  58%   { opacity: 0.85; }
  58.5% { opacity: 0.2; }
  59%   { opacity: 0.75; }
  65%   { opacity: 0.75; }
  65.3% { opacity: 0; }
  80%   { opacity: 0; }
  81%   { opacity: 0.6; }
  81.5% { opacity: 0.1; }
  82%   { opacity: 0.8; }
  90%   { opacity: 0.8; }
  90.3% { opacity: 0.15; }
  90.8% { opacity: 0.7; }
  95%   { opacity: 0.7; }
  95.2% { opacity: 0; }
  100%  { opacity: 0; }
}

.mobile-block__glitch--stf {
  bottom: 8%;
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(199, 212, 74, 0.6);
  text-shadow: 0 0 12px rgba(199, 212, 74, 0.4), 0 0 30px rgba(199, 212, 74, 0.15);
  animation: neon-flicker-alt 18s step-end infinite;
}
@keyframes neon-flicker-alt {
  0%    { opacity: 0; }
  30%   { opacity: 0; }
  31%   { opacity: 0.5; }
  31.4% { opacity: 0.1; }
  31.8% { opacity: 0.6; }
  32.1% { opacity: 0; }
  32.5% { opacity: 0.7; }
  42%   { opacity: 0.7; }
  42.3% { opacity: 0.15; }
  42.8% { opacity: 0.55; }
  50%   { opacity: 0.55; }
  50.2% { opacity: 0; }
  72%   { opacity: 0; }
  73%   { opacity: 0.4; }
  73.3% { opacity: 0.08; }
  73.8% { opacity: 0.65; }
  82%   { opacity: 0.65; }
  82.4% { opacity: 0; }
  100%  { opacity: 0; }
}

@media (max-width: 768px) {
  .mobile-block { display: flex; }
  .desktop { display: none; }
}

.desktop__icons {
  position: absolute;
  top: 18px;
  left: 18px;
  width: min(280px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: repeat(2, 92px);
  gap: 16px 12px;
  z-index: 2;
}
.desktop-icon {
  width: 84px;
  min-height: 88px;
  padding: 6px 4px;
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d8cfbf;
  cursor: pointer;
  text-decoration: none;
}
.desktop-icon:hover { background: rgba(255,255,255,0.06); }
.desktop-icon.is-selected { background: rgba(255,255,255,0.12); }
.desktop-icon__glyph {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  font-size: 20px;
}
.desktop-icon__label {
  font: 500 11px/1.25 'IBM Plex Sans', sans-serif;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: var(--taskbar-bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 300;
  backdrop-filter: blur(10px);
}
.start-btn,
.taskbar-app {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: var(--taskbar-text);
  cursor: pointer;
}
.start-btn:hover,
.taskbar-app:hover { background: rgba(255,255,255,0.10); }
.start-btn[aria-expanded='true'] { background: rgba(255,255,255,0.14); }
.start-btn__seal,
.brand-card__seal {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--brass);
  display: grid;
  place-items: center;
  background: #f4e8d6;
  font: 700 10px 'IBM Plex Mono', monospace;
  color: #70572a;
}
.taskbar__apps {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.taskbar__apps::-webkit-scrollbar { display: none; }
.taskbar-app {
  min-width: 140px;
  justify-content: space-between;
}
.taskbar-app.is-active { background: rgba(255,255,255,0.16); }
.taskbar-app.is-minimized { opacity: 0.74; }
.taskbar-app__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.taskbar__tray {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--taskbar-text);
  font: 500 11px 'IBM Plex Mono', monospace;
}
.taskbar__clock { min-width: 84px; text-align: right; }

.start-menu {
  position: absolute;
  left: 10px;
  bottom: calc(var(--taskbar-height) + 8px);
  width: 280px;
  max-height: min(70vh, 560px);
  overflow: auto;
  background: #f4e8d7;
  border: 1px solid var(--line-mid);
  border-radius: 14px;
  box-shadow: 0 22px 40px rgba(0,0,0,0.28);
  padding: 10px;
  z-index: 320;
}
.start-menu.is-hidden { display: none; }
.start-menu__title {
  font: 700 12px 'IBM Plex Mono', monospace;
  color: #624e3a;
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}
.start-menu__section-label {
  padding: 4px 6px 6px;
  color: #7b664f;
  font: 700 10px/1.2 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.start-menu__list { display: grid; gap: 4px; }
.start-menu__divider { border-top: 1px solid var(--line-soft); margin: 8px 0; }
.start-menu button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: transparent;
  color: #3e3227;
  cursor: pointer;
}
.start-menu button:hover { background: #eadbc6; }

.toast-stack {
  position: absolute;
  right: 14px;
  bottom: calc(var(--taskbar-height) + 12px);
  display: grid;
  gap: 10px;
  z-index: 330;
}
.menu-toast {
  min-width: 240px;
  max-width: 320px;
  background: #f6ead9;
  color: #3c3025;
  border: 1px solid var(--line-mid);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 16px 28px rgba(0,0,0,0.20);
}
.menu-toast.is-exit { opacity: 0; transform: translateY(8px); transition: opacity 0.22s ease, transform 0.22s ease; }

.session-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 340;
  background: rgba(8,7,6,0.45);
}
.session-overlay.is-hidden { display: none; }
.session-overlay__panel {
  min-width: 280px;
  padding: 22px 26px;
  border: 1px solid #6d5838;
  border-radius: 12px;
  background: #1d1712;
  color: #f1e4d0;
  box-shadow: 0 30px 50px rgba(0,0,0,0.4);
}
.session-overlay__title {
  margin-bottom: 8px;
  font: 700 18px/1.1 'IBM Plex Mono', monospace;
}

.fod-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
}
.fod-menubar {
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #e8d8c1;
  border-bottom: 1px solid var(--line-soft);
}
.menu-group { position: relative; }
.menu-item {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px 8px;
  color: #493b2e;
  cursor: pointer;
}
.menu-item:hover,
.menu-item.is-open { background: #f5ebdb; }
.menu-dropdown {
  position: absolute;
  top: 32px;
  left: 0;
  min-width: 190px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line-mid);
  border-radius: 8px;
  background: #fbf3e7;
  box-shadow: 0 18px 32px rgba(0,0,0,0.18);
  z-index: 30;
}
.menu-dropdown.is-open { display: block; }
.menu-dropdown button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  color: #3e3227;
}
.menu-dropdown button:hover { background: #efe2cc; }
.menu-dropdown hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 6px 0;
}

.fod-toolbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  background: var(--app-toolbar);
  border-bottom: 1px solid var(--line-soft);
}
.fod-toolbar__left,
.fod-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tool-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-mid);
  border-radius: 8px;
  background: #f9efe0;
  color: #59483a;
  cursor: pointer;
}
.tool-btn:disabled {
  opacity: 0.42;
  cursor: default;
}
.address-bar {
  min-width: 320px;
  max-width: 720px;
  height: 30px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-mid);
  border-radius: 8px;
  background: #fff7ec;
  color: #6b5948;
  font: 500 12px 'IBM Plex Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-mid);
  background: #f7efe1;
  font: 600 11px 'IBM Plex Mono', monospace;
}
.state-pill--live::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #c7d44a;
}

.fod-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
}
.fod-layout.is-sidebar-hidden { grid-template-columns: 1fr; }
.explorer-sidebar {
  overflow: auto;
  padding: 12px;
  background: var(--app-sidebar);
  border-right: 1px solid var(--line-soft);
}
.fod-layout.is-sidebar-hidden .explorer-sidebar { display: none; }
.brand-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-mid);
  border-radius: 10px;
  background: #f3e6d1;
}
.brand-card__title { font: 700 13px/1.2 'IBM Plex Sans', sans-serif; }
.brand-card__sub { font: 500 11px/1.2 'IBM Plex Mono', monospace; color: #8a7662; }
.sidebar-section { margin-top: 14px; }
.sidebar-section__label,
.panel-title,
.eyebrow {
  margin-bottom: 8px;
  color: #7a634d;
  font: 700 11px/1.2 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.notice-list { display: grid; gap: 8px; }
.notice-list__item {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f7ecdd;
  font-size: 12px;
  color: #5c4d41;
}

.tree,
.tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tree li { margin: 2px 0; }
.tree__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px;
  align-items: start;
}
.tree__children {
  display: none;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px solid var(--line-soft);
}
.tree__children.is-open { display: block; }
.tree__toggle,
.tree__link {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3e3227;
  font: 500 13px/1.25 'IBM Plex Sans', sans-serif;
  text-align: left;
  cursor: pointer;
}
.tree__toggle {
  width: 24px;
  padding: 7px 0;
  text-align: center;
}
.tree__toggle .tree__caret {
  display: inline-block;
  transition: transform 0.18s ease;
}
.tree__toggle[aria-expanded='true'] .tree__caret { transform: rotate(90deg); }
.tree__link {
  width: 100%;
  display: block;
  padding: 7px 8px;
  text-decoration: none;
}
.tree__toggle:hover,
.tree__link:hover,
.tree__link[aria-current='page'] { background: #f7eddd; }

/* Personal folders (FP's local files — not official FOD departments) */
.sidebar-section--personal {
  margin-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(160, 138, 108, 0.30);
  margin-bottom: 4px;
}
.sidebar-section__label--personal {
  color: #8a7662;
  font-size: 10px;
  opacity: 0.8;
  letter-spacing: 0.1em;
}
.tree--personal > li > .tree__row > .tree__link {
  color: #6b5a47;
  font-style: italic;
  font-size: 12.5px;
}
.tree--personal > li > .tree__row > .tree__toggle {
  color: #8a7662;
}
.tree--personal .tree__children .tree__link {
  color: #6b5a47;
  font-size: 12px;
}
.tree--personal .tree__link:hover,
.tree--personal .tree__link[aria-current='page'] {
  background: rgba(240, 228, 210, 0.6);
}

.content-pane {
  overflow: auto;
  padding: 18px 22px 34px;
  background: var(--app-paper);
}
.content-shell { max-width: 1040px; }
.breadcrumbs {
  color: #7a6652;
  font: 500 12px/1.35 'IBM Plex Mono', monospace;
}
.breadcrumbs a { text-decoration: none; color: #6a5849; }
.sep { opacity: 0.55; }
.document-surface__header,
.meta-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--app-paper-2);
}
.meta-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.meta-k {
  display: block;
  color: #856f59;
  font: 600 11px/1.2 'IBM Plex Mono', monospace;
}
.meta-v {
  display: block;
  font: 500 14px/1.35 'IBM Plex Sans', sans-serif;
}
.document-surface {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--app-paper);
}
.lede {
  max-width: 72ch;
  color: var(--text-secondary);
  font-size: 18px;
}
h1 {
  margin: 6px 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}
p {
  max-width: 74ch;
  font-size: 17px;
  line-height: 1.68;
}
.link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line-mid);
  border-radius: 8px;
  background: #fbf2e6;
  color: #4e4338;
  text-decoration: none;
}
.statusbar {
  height: 28px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  background: #ebddc8;
  color: #6c5d4f;
  font: 500 11px 'IBM Plex Mono', monospace;
}

.local-window {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f6efdf;
}
.local-window__header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #efe3cf;
}
.local-window__title {
  font: 700 12px/1.2 'IBM Plex Mono', monospace;
  color: #6d583f;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.local-window__body {
  flex: 1;
  overflow: auto;
  padding: 18px;
}
.local-window__body p:first-child { margin-top: 0; }
.local-window__body pre {
  margin: 0;
  white-space: pre-wrap;
  font: 500 13px/1.6 'IBM Plex Mono', monospace;
  color: #3c3025;
}
.placeholder-filelist {
  display: grid;
  gap: 8px;
}
.placeholder-filelist__item {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbf2e4;
  font: 500 13px/1.4 'IBM Plex Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM WINDOW MANAGER — replaces WinBox
   ═══════════════════════════════════════════════════════════ */
.desktop-window {
  position: fixed;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: var(--window-frame);
  box-shadow: 0 24px 60px rgba(0,0,0,0.34);
  transition: box-shadow 0.15s ease;
}
.desktop-window.is-maximized {
  border-radius: 0;
  box-shadow: none;
}

/* Titlebar */
.desktop-window__titlebar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  background: linear-gradient(180deg, var(--window-frame-top), var(--window-frame));
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}
.is-maximized .desktop-window__titlebar { cursor: default; }

.desktop-window__title {
  font: 700 13px/40px 'IBM Plex Sans', sans-serif;
  color: #43352a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.desktop-window__controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.wc-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-mid);
  border-radius: 7px;
  background: rgba(255,255,255,0.25);
  color: #5a4a3a;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.wc-btn:hover { background: rgba(255,255,255,0.45); }
.wc-close:hover { background: #d44; color: #fff; border-color: #b33; }

/* Body */
.desktop-window__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--app-bg);
}

/* Resize handles */
.desktop-window__resize {
  position: absolute;
  z-index: 5;
}
.desktop-window__resize--n  { top: -4px;   left: 10px;  right: 10px; height: 8px; cursor: n-resize; }
.desktop-window__resize--s  { bottom: -4px;left: 10px;  right: 10px; height: 8px; cursor: s-resize; }
.desktop-window__resize--e  { right: -4px; top: 10px;   bottom: 10px;width: 8px;  cursor: e-resize; }
.desktop-window__resize--w  { left: -4px;  top: 10px;   bottom: 10px;width: 8px;  cursor: w-resize; }
.desktop-window__resize--ne { top: -4px;   right: -4px; width: 14px; height: 14px;cursor: ne-resize; }
.desktop-window__resize--nw { top: -4px;   left: -4px;  width: 14px; height: 14px;cursor: nw-resize; }
.desktop-window__resize--se { bottom: -4px;right: -4px; width: 14px; height: 14px;cursor: se-resize; }
.desktop-window__resize--sw { bottom: -4px;left: -4px;  width: 14px; height: 14px;cursor: sw-resize; }

.is-maximized .desktop-window__resize { display: none; }

/* Prevent text selection and iframe pointer capture during drag/resize */
body.is-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
body.is-dragging iframe { pointer-events: none; }
body.is-dragging .desktop-window__titlebar { cursor: grabbing; }

/* Toast entrance animation */
.menu-toast {
  animation: toast-in 0.2s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Session overlay transition */
.session-overlay {
  animation: overlay-in 0.3s ease-out;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Markdown content rendering ──────────────────────────────
   Styles rendered markdown (.md-content) to match the institutional
   FOD terminal aesthetic. IBM Plex fonts, warm palette, proper spacing. */
.md-content {
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--text-primary);
  line-height: 1.68;
  max-width: 74ch;
}
.md-content h1 {
  font: 700 clamp(24px, 2.5vw, 36px)/1.15 'IBM Plex Sans', sans-serif;
  margin: 0 0 16px;
  color: var(--text-primary);
}
.md-content h2 {
  font: 700 18px/1.25 'IBM Plex Sans', sans-serif;
  margin: 28px 0 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 6px;
}
.md-content h3 {
  font: 700 15px/1.3 'IBM Plex Mono', monospace;
  margin: 22px 0 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.md-content p {
  margin: 0 0 14px;
  font-size: 16px;
}
.md-content strong { color: var(--text-primary); }
.md-content em { color: var(--text-secondary); }
.md-content blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--brass);
  background: var(--app-paper-2);
  border-radius: 0 10px 10px 0;
  color: var(--text-secondary);
  font-style: italic;
}
.md-content blockquote p { margin-bottom: 8px; }
.md-content blockquote p:last-child { margin-bottom: 0; }
.md-content pre {
  margin: 16px 0;
  padding: 14px 16px;
  background: #1d1712;
  color: #e7dccb;
  border-radius: 10px;
  overflow-x: auto;
  font: 500 13px/1.6 'IBM Plex Mono', monospace;
}
.md-content code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9em;
  background: rgba(0,0,0,0.06);
  padding: 2px 5px;
  border-radius: 4px;
}
.md-content pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}
.md-content ul, .md-content ol {
  margin: 12px 0;
  padding-left: 24px;
}
.md-content li { margin-bottom: 6px; font-size: 16px; }
.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.md-content thead th {
  text-align: left;
  padding: 10px 12px;
  background: var(--app-toolbar);
  border-bottom: 2px solid var(--line-mid);
  font: 700 12px/1.2 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.md-content tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.md-content tbody tr:hover { background: rgba(0,0,0,0.02); }
.md-content hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 24px 0;
}
.md-content a {
  color: var(--brass);
  text-decoration: underline;
  text-decoration-color: rgba(154, 122, 66, 0.3);
}
.md-content a:hover { text-decoration-color: var(--brass); }
.md-content sup { font-size: 0.75em; }
.md-content sup a { text-decoration: none; color: var(--brass); }

@media (max-width: 980px) {
  .desktop__icons { display: none; }
  .taskbar { grid-template-columns: auto 1fr auto; }
  .fod-layout { grid-template-columns: 1fr; }
  .explorer-sidebar,
  .fod-layout.is-sidebar-hidden .explorer-sidebar { display: none; }
  .fod-toolbar__right { display: none; }
  .address-bar { min-width: 0; width: 100%; }
  .start-menu { width: calc(100vw - 20px); }
}

/* File row small text — display below the link */
.file-row .title small {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #8a7662);
  margin-top: 2px;
}

/* Footer spacing */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted, #8a7662);
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 16px;
}
