/* ───────────────────────── tokens ───────────────────────── */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "JetBrains Mono", monospace;

  --menubar-h: 30px;
  --dock-size: 54px;
  --radius-win: 16px;
  --radius-sm: 8px;

  --win: rgba(248, 248, 250, 0.84);
  --win-solid: #fbfbfd;
  --sidebar: rgba(232, 232, 237, 0.62);
  --titlebar: rgba(250, 250, 252, 0.72);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --sep: rgba(0, 0, 0, 0.09);
  --fill: rgba(0, 0, 0, 0.045);
  --fill-2: rgba(0, 0, 0, 0.08);
  --accent: #0a6cff;
  --accent-soft: rgba(10, 108, 255, 0.12);
  --sel: #0a6cff;
  --menu: rgba(244, 244, 247, 0.8);
  --card: #ffffff;
  --paper: #ffffff;
  --sticky: #fff3a6;
  --sticky-ink: #4a3d00;
  --good: #1f9d55;
  --ring: inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
  --shadow-win: 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 34px 80px -12px rgba(0, 0, 0, 0.42), 0 12px 28px -10px rgba(0, 0, 0, 0.26);
  --shadow-win-off: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 18px 44px -12px rgba(0, 0, 0, 0.28);
  --shadow-pop: 0 0 0 0.5px rgba(0, 0, 0, 0.16), 0 18px 50px -8px rgba(0, 0, 0, 0.35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --win: rgba(34, 34, 38, 0.84);
    --win-solid: #1e1e21;
    --sidebar: rgba(255, 255, 255, 0.045);
    --titlebar: rgba(36, 36, 40, 0.72);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;
    --sep: rgba(255, 255, 255, 0.09);
    --fill: rgba(255, 255, 255, 0.06);
    --fill-2: rgba(255, 255, 255, 0.1);
    --accent: #3b8cff;
    --accent-soft: rgba(59, 140, 255, 0.18);
    --menu: rgba(40, 40, 44, 0.78);
    --card: rgba(255, 255, 255, 0.05);
    --paper: #fdfdfd;
    --sticky: #f5e27a;
    --ring: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
    --shadow-win: 0 0 0 0.5px rgba(0, 0, 0, 0.6), 0 34px 80px -12px rgba(0, 0, 0, 0.7), 0 12px 28px -10px rgba(0, 0, 0, 0.5);
    --shadow-win-off: 0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 18px 44px -12px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 0 0 0.5px rgba(0, 0, 0, 0.6), 0 18px 50px -8px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --win: rgba(34, 34, 38, 0.84);
  --win-solid: #1e1e21;
  --sidebar: rgba(255, 255, 255, 0.045);
  --titlebar: rgba(36, 36, 40, 0.72);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --sep: rgba(255, 255, 255, 0.09);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-2: rgba(255, 255, 255, 0.1);
  --accent: #3b8cff;
  --accent-soft: rgba(59, 140, 255, 0.18);
  --menu: rgba(40, 40, 44, 0.78);
  --card: rgba(255, 255, 255, 0.05);
  --paper: #fdfdfd;
  --sticky: #f5e27a;
  --ring: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
  --shadow-win: 0 0 0 0.5px rgba(0, 0, 0, 0.6), 0 34px 80px -12px rgba(0, 0, 0, 0.7), 0 12px 28px -10px rgba(0, 0, 0, 0.5);
  --shadow-win-off: 0 0 0 0.5px rgba(0, 0, 0, 0.5), 0 18px 44px -12px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 0 0 0.5px rgba(0, 0, 0, 0.6), 0 18px 50px -8px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ───────────────────────── base ───────────────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 13px/1.4 var(--font);
  color: var(--text);
  background: #0c0b1d;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.selectable, .selectable * { -webkit-user-select: text; user-select: text; }

/* ───────────────────────── wallpaper ───────────────────────── */
#wallpaper { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
#wallpaper svg { position: absolute; inset: -4%; width: 108%; height: 108%; }
#wallpaper .layer { transform-origin: 50% 50%; animation: drift 38s ease-in-out infinite alternate; }
#wallpaper .layer:nth-child(2n) { animation-duration: 46s; animation-direction: alternate-reverse; }
#wallpaper .layer:nth-child(3n) { animation-duration: 54s; }
@keyframes drift { from { transform: translate3d(-1.5%, 0, 0) scale(1.02); } to { transform: translate3d(1.5%, -1%, 0) scale(1.05); } }
#wallpaper::after {
  content: ""; position: absolute; inset: 0; opacity: 0.18; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body[data-wall="dusk"] { --w0: #0e0b2a; --w1: #2b1c6b; --w2: #7a2f9b; --w3: #e3566b; --w4: #ffb36b; --w5: #ffd9a8; }
body[data-wall="tide"] { --w0: #031524; --w1: #073b5c; --w2: #0f6f8f; --w3: #2fb5b3; --w4: #9be3c9; --w5: #e6fff4; }
body[data-wall="graphite"] { --w0: #0b0b0d; --w1: #1a1b20; --w2: #2c2e36; --w3: #4b4f5c; --w4: #8b90a0; --w5: #d7dae3; }
body[data-wall="bloom"] { --w0: #1c0716; --w1: #4a0f3a; --w2: #a3245e; --w3: #ff6f61; --w4: #ffc15e; --w5: #fff1c9; }

/* ───────────────────────── lock screen ───────────────────────── */
#lock {
  position: fixed; inset: 0; z-index: 9000; color: #fff;
  display: grid; grid-template-rows: 1fr auto; justify-items: center;
  backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
  background: rgba(10, 8, 30, 0.18);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), backdrop-filter 0.9s ease;
}
#lock.out { opacity: 0; transform: scale(1.06); pointer-events: none; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
#lock[hidden] { display: none; }
.lock-clock { align-self: start; margin-top: 9vh; text-align: center; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.lock-date { font: 600 22px/1 var(--font-display); letter-spacing: 0.01em; opacity: 0.92; }
.lock-time { font: 700 clamp(88px, 13vw, 150px)/1 var(--font-display); letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.72)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lock-user { display: grid; justify-items: center; gap: 12px; margin-bottom: 11vh; }
.avatar {
  --s: 76px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center;
  font: 600 calc(var(--s) * 0.36)/1 var(--font-display); letter-spacing: -0.02em; color: #fff;
  background: radial-gradient(120% 120% at 20% 10%, #ffcf8a 0%, #ff7a6b 38%, #8e4bd8 75%, #3a2b8f 100%);
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lock-name { font: 600 17px/1.2 var(--font-display); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3); }
.lock-field {
  display: flex; align-items: center; gap: 6px; width: 250px; height: 34px; padding: 0 4px 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.lock-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: #fff; font: 13px var(--font); outline: none; }
.lock-field input::placeholder { color: rgba(255, 255, 255, 0.72); }
.lock-go { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.28); transition: background 0.2s, transform 0.2s; cursor: pointer; }
.lock-go:hover { background: rgba(255, 255, 255, 0.45); transform: scale(1.05); }
.lock-go svg { width: 14px; height: 14px; }
.lock-go.spin svg { display: none; }
.lock-go.spin::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lock-hint { font-size: 12px; opacity: 0.8; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); }
.lock-hint kbd { font: 11px var(--font); padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); }
.lock-mobile-hint { display: none; }

/* ───────────────────────── menubar ───────────────────────── */
#menubar {
  position: fixed; inset: 0 0 auto 0; height: var(--menubar-h); z-index: 5000;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
  color: #fff; text-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.08));
  backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
  transform: translateY(-100%); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.in #menubar { transform: none; }
.mb-left, .mb-right { display: flex; align-items: center; gap: 2px; height: 100%; }
.mb-item { height: 22px; padding: 0 9px; border-radius: 6px; display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.mb-item:hover, .mb-item.open { background: rgba(255, 255, 255, 0.2); }
.mb-item.app { font-weight: 700; }
.mb-logo svg { width: 16px; height: 16px; }
.mb-icon svg { width: 16px; height: 16px; opacity: 0.95; }
.mb-emoji { font-size: 13px; line-height: 1; }
.mb-clock { font-variant-numeric: tabular-nums; }
.mb-status { display: none; }

/* dropdown menus */
.menu {
  position: fixed; z-index: 6000; min-width: 230px; padding: 5px; border-radius: 12px; color: var(--text);
  background: var(--menu); box-shadow: var(--shadow-pop), var(--ring);
  backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
  animation: menuIn 0.14s ease-out;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 6px; text-align: left; font-size: 13px; }
.menu button .k { margin-left: auto; color: var(--text-2); font-size: 12px; padding-left: 18px; }
.menu button .chk { width: 12px; font-size: 11px; }
.menu button:hover:not([disabled]) { background: var(--sel); color: #fff; }
.menu button:hover:not([disabled]) .k { color: rgba(255, 255, 255, 0.8); }
.menu button[disabled] { opacity: 0.4; }
.menu hr { border: 0; height: 1px; background: var(--sep); margin: 5px 10px; }
.menu .label { padding: 4px 10px 2px; font-size: 11px; font-weight: 600; color: var(--text-2); }

/* ───────────────────────── desktop + icons ───────────────────────── */
#desktop { position: fixed; inset: var(--menubar-h) 0 0 0; z-index: 1; opacity: 0; transition: opacity 0.8s ease; }
body.in #desktop { opacity: 1; }
#icons { position: absolute; top: 14px; right: 14px; bottom: 96px; display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; align-items: center; gap: 6px; }
.dicon { width: 92px; padding: 6px 2px; display: grid; justify-items: center; gap: 4px; border-radius: 8px; color: #fff; text-align: center; }
.dicon .glyph { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 10px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3)); }
.dicon .glyph svg { width: 60px; height: 60px; }
.dicon .name { font-size: 12px; font-weight: 500; line-height: 1.25; padding: 1px 5px; border-radius: 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.dicon.sel .glyph { background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.dicon.sel .name { background: var(--sel); text-shadow: none; }
#icons .icon-break { flex-basis: 100%; width: 0; }
#marquee { position: absolute; border: 1px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.12); pointer-events: none; z-index: 2; }

/* ───────────────────────── dock ───────────────────────── */
#dock-wrap { position: fixed; left: 0; right: 0; bottom: 6px; z-index: 4000; display: flex; justify-content: center; pointer-events: none; transform: translateY(130%); transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s; }
body.in #dock-wrap { transform: none; }
#dock {
  pointer-events: auto; display: flex; align-items: flex-end; gap: 6px; padding: 5px 7px 20px; height: calc(var(--dock-size) + 26px);
  border-radius: 22px; background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.45), 0 10px 40px -10px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
}
.dock-item { --s: 1; position: relative; width: calc(var(--dock-size) * var(--s)); height: calc(var(--dock-size) * var(--s)); flex: none; display: grid; place-items: end center; margin-bottom: 1px; }
#dock.settle .dock-item { transition: width 0.22s ease, height 0.22s ease; }
.dock-item .app-icon { width: 100%; height: 100%; }
.dock-item .tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 7px; white-space: nowrap;
  font-size: 12.5px; color: var(--text); background: var(--menu); box-shadow: var(--shadow-pop), var(--ring);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); opacity: 0; pointer-events: none; transition: opacity 0.12s;
}
.dock-item:hover .tip { opacity: 1; }
.dock-item .lbl { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); font: 500 9.5px/11px var(--font); letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); white-space: nowrap; pointer-events: none; }
.dock-item:has(.lbl):hover .tip { opacity: 0; }
.dock-item .dot { position: absolute; top: calc(100% + 15px); width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); opacity: 0; }
.dock-item.running .dot { opacity: 1; }
.dock-item.bounce { animation: bounce 0.62s cubic-bezier(0.3, 0, 0.4, 1) 2; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-22px); } }
.dock-item.attention { animation: attention 0.8s cubic-bezier(0.3, 0, 0.4, 1) 3; }
@keyframes attention { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-26px); } 60% { transform: translateY(-26px); } }
.dock-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font: 700 12px/1 var(--font); color: #fff; background: #ff3b30; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 1.5px rgba(255, 255, 255, 0.85); animation: badgeIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4); z-index: 1; }
@keyframes badgeIn { from { transform: scale(0); } }
.dock-sep { width: 1px; align-self: stretch; margin: 6px 4px; background: rgba(255, 255, 255, 0.35); }
.dock-thumb .app-icon { border-radius: 10px; background: var(--win-solid) center/cover no-repeat; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }
.dock-thumb .badge { position: absolute; right: -2px; bottom: -2px; width: 45%; height: 45%; }

/* app icons (squircles) */
.app-icon { position: relative; display: block; border-radius: 23%; overflow: hidden; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25), inset 0 0 0 0.5px rgba(255, 255, 255, 0.35); }
.app-icon svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.app-icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 46%); pointer-events: none; }

/* ───────────────────────── windows ───────────────────────── */
#windows { position: absolute; inset: 0; pointer-events: none; }
#windows > .win { pointer-events: auto; }
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 180px;
  border-radius: var(--radius-win); background: var(--win); box-shadow: var(--shadow-win-off), var(--ring);
  backdrop-filter: blur(50px) saturate(1.8); -webkit-backdrop-filter: blur(50px) saturate(1.8);
  overflow: hidden; color: var(--text); contain: layout;
}
.win.flying { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--win-solid); will-change: transform, opacity; transform-origin: 50% 50%; }
.win.flying * { pointer-events: none; }
.win.is-focused { box-shadow: var(--shadow-win), var(--ring); }
.win.solid { background: var(--win-solid); }
.win.zoomed { border-radius: 12px; }
.win[hidden] { display: none; }
.titlebar {
  position: relative; flex: none; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  z-index: 3;
}
.titlebar::before { content: ""; position: absolute; inset: 0 0 0 var(--sbw, 0px); background: var(--titlebar); border-bottom: 0.5px solid var(--sep); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); z-index: -1; transition: opacity 0.2s; }
.win.has-sidebar .titlebar { position: absolute; inset: 0 0 auto 0; }
.win.has-sidebar .titlebar::before { opacity: 0; }
.win.has-sidebar.scrolled .titlebar::before { opacity: 1; }
.win.bare .titlebar { position: absolute; inset: 0 0 auto 0; }
.win.bare .titlebar::before { display: none; }
.lights { display: flex; gap: 8px; flex: none; }
.light { width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18); }
.light svg { width: 8px; height: 8px; opacity: 0; color: rgba(0, 0, 0, 0.6); }
.lights:hover .light svg { opacity: 1; }
.win.is-focused .light.close { background: #ff5f57; }
.win.is-focused .light.min { background: #febc2e; }
.win.is-focused .light.zoom { background: #28c840; }
.win:not(.is-focused) .light { background: var(--fill-2); }
.win:not(.is-focused) .lights:hover .light.close { background: #ff5f57; }
.win:not(.is-focused) .lights:hover .light.min { background: #febc2e; }
.win:not(.is-focused) .lights:hover .light.zoom { background: #28c840; }
.light[disabled] { opacity: 0.4; }
.tb-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; transition: opacity 0.2s; }
.win:not(.is-focused) .tb-title { color: var(--text-2); }
/* lights block = 14px pad + 52px lights + 10px gap = 76px; put the title 20px past the sidebar edge */
.win.has-sidebar .tb-title { margin-left: calc(var(--sbw) - 76px + 20px); }
.tb-sub { color: var(--text-2); font-weight: 400; margin-left: 6px; }
.tb-spacer { flex: 1; }
.tb-actions { display: flex; gap: 4px; align-items: center; }
.tb-btn { white-space: nowrap; height: 28px; min-width: 30px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.tb-btn:hover { background: var(--fill); color: var(--text); }
.tb-btn svg { width: 16px; height: 16px; }
.tb-btn.primary { background: var(--accent); color: #fff; padding: 0 12px; }
.tb-btn.primary:hover { filter: brightness(1.08); background: var(--accent); color: #fff; }
.tb-btn[disabled] { opacity: 0.35; pointer-events: none; }
.win-body { position: relative; flex: 1; min-height: 0; display: flex; }
.win-body > * { min-width: 0; }
.scroll { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
.resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 5; }
.win .edge-r { position: absolute; top: 20px; bottom: 18px; right: 0; width: 6px; cursor: ew-resize; z-index: 5; }
.win .edge-b { position: absolute; left: 20px; right: 18px; bottom: 0; height: 6px; cursor: ns-resize; z-index: 5; }
.win-done { display: none; }
.win.dragging { transition: none !important; }
.win.dragging, .win.dragging * { cursor: default; }
body.busy iframe { pointer-events: none; }

/* sidebar */
.sidebar {
  flex: none; width: var(--sbw, 210px); padding: 54px 10px 12px; display: flex; flex-direction: column; gap: 1px;
  background: var(--sidebar); border-right: 0.5px solid var(--sep); overflow: auto;
}
.sb-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 12px 8px 4px; }
.sb-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px; font-size: 13px; text-align: left; width: 100%; color: var(--text); }
.sb-item svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.sb-item .count { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.sb-item:hover { background: var(--fill); }
.sb-item.on { background: var(--fill-2); font-weight: 600; }
.main { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }
.main > .scroll { flex: 1; padding-top: 48px; }
.win.has-sidebar .main { background: var(--win-solid); }
.win.has-sidebar:not(.scrolled) .tb-title { opacity: 0; }

/* ───────────────────────── Work (finder) ───────────────────────── */
.finder-head { display: flex; align-items: center; gap: 10px; padding: 14px 22px 4px; }
.finder-head h2 { margin: 0; font: 700 22px/1.2 var(--font-display); letter-spacing: -0.01em; }
.finder-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--fill); }
.seg button { width: 30px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: var(--win-solid); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.search { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--fill); color: var(--text-2); width: 180px; }
.search svg { width: 13px; height: 13px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: 13px var(--font); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; padding: 14px 22px 26px; }
.card { display: flex; flex-direction: column; text-align: left; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep), 0 1px 2px rgba(0, 0, 0, 0.05); overflow: hidden; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s; cursor: pointer; }
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 0.5px var(--sep), 0 14px 30px -12px rgba(0, 0, 0, 0.3); }
.card .cover { aspect-ratio: 202 / 158; background: var(--fill); position: relative; overflow: hidden; }
.card .cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .cover-media { transform: scale(1.04); }
.card .cover .chip { z-index: 1; }
.card .cover .chip { position: absolute; left: 10px; bottom: 10px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.chip small { font-weight: 500; opacity: 0.8; font-size: 11px; }
.card .meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.card .co { font-size: 11.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; text-transform: uppercase; }
.card .ttl { font: 600 14.5px/1.3 var(--font-display); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.list { padding: 8px 14px 20px; }
.row { display: grid; grid-template-columns: 44px 150px 1fr 120px; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.row:nth-child(even) { background: var(--fill); }
.row:hover { background: var(--accent-soft); }
.row .th { width: 44px; height: 30px; border-radius: 5px; background: var(--fill) center/cover; }
.row .c1 { font-weight: 600; }
.row .c2 { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .c3 { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.row.head { background: none !important; color: var(--text-3); font-size: 11px; font-weight: 600; cursor: default; }
.statusbar { flex: none; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--text-2); border-top: 0.5px solid var(--sep); }
.arch-head { margin: 10px 22px 0; padding-top: 18px; border-top: 0.5px solid var(--sep); scroll-margin-top: 56px; }
.arch-head h3 { margin: 0; font: 700 17px/1.2 var(--font-display); }
.arch-head p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.arch .egg-th { display: grid; place-items: center; background: var(--fill); }
.arch .egg-th svg { width: 58%; height: 78%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)); }
.arch [data-egg]:hover .egg-th svg { animation: wiggle 0.5s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

/* easter eggs */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9500; pointer-events: none; }
.achievement {
  position: fixed; top: calc(var(--menubar-h) + 10px); left: 50%; z-index: 9600; display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px;
  border-radius: 999px; color: #fff; background: rgba(28, 28, 32, 0.82); box-shadow: 0 18px 50px -10px rgba(0, 0, 0, 0.55), inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
  transform: translateX(-50%); animation: achIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.achievement.out { animation: achOut 0.45s ease-in forwards; }
@keyframes achIn { from { transform: translate(-50%, -140%) scale(0.9); opacity: 0; } }
@keyframes achOut { to { transform: translate(-50%, -140%) scale(0.95); opacity: 0; } }
.achievement .trophy { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #5a3b00; background: radial-gradient(circle at 35% 30%, #fff1a8, #ffc933 55%, #e59a00); box-shadow: 0 0 0 3px rgba(255, 201, 51, 0.25), 0 0 24px rgba(255, 201, 51, 0.55); animation: trophyShine 1.2s ease-out; }
.achievement .trophy svg { width: 22px; height: 22px; }
@keyframes trophyShine { 0% { transform: rotate(-20deg) scale(0.6); } 60% { transform: rotate(8deg) scale(1.1); } 100% { transform: none; } }
.ach-txt small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #ffd45e; }
.ach-txt b { display: block; font: 700 15px/1.25 var(--font-display); }

.arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 14px 22px 26px; }
.arch button { text-align: left; display: grid; gap: 6px; cursor: pointer; }
.arch .th { aspect-ratio: 202 / 158; border-radius: 10px; background: var(--fill) center/cover; box-shadow: 0 0 0 0.5px var(--sep); transition: transform 0.2s; }
.arch button:hover .th { transform: scale(1.03); }
.arch .n { font-weight: 600; font-size: 12.5px; }
.arch .d { color: var(--text-2); font-size: 12px; }
.empty { padding: 40px; text-align: center; color: var(--text-2); }

/* ───────────────────────── Case study reader ───────────────────────── */
.toc-head { padding: 4px 8px 10px; }
.toc-co { font: 700 15px/1.2 var(--font-display); }
.toc-role { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.toc a { display: block; padding: 5px 8px; border-radius: 7px; color: var(--text); font-size: 13px; }
.toc a.sub { padding-left: 20px; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc a:hover { background: var(--fill); }
.toc a.on { background: var(--fill-2); font-weight: 600; color: var(--text); }
.toc-foot { margin-top: auto; padding-top: 12px; display: grid; gap: 6px; }
.toc-foot .mini { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 9px; text-align: left; font-size: 12px; cursor: pointer; }
.toc-foot .mini:hover { background: var(--fill); }
.toc-foot .mini .th { width: 34px; height: 26px; border-radius: 5px; background: var(--fill) center/cover; flex: none; }
.toc-foot .mini span { color: var(--text-2); display: block; font-size: 11px; }

.doc { max-width: 760px; margin: 0 auto; padding: 8px 40px 70px; -webkit-user-select: text; user-select: text; }
.doc-hero { display: block; width: calc(100% - 48px); margin: 8px 24px 0; border-radius: 14px; overflow: hidden; aspect-ratio: 21 / 9; background: var(--fill) center/cover no-repeat; box-shadow: 0 0 0 0.5px var(--sep); cursor: zoom-in; }
.eyebrow { margin-top: 30px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.doc h1 { font: 700 34px/1.12 var(--font-display); letter-spacing: -0.022em; margin: 10px 0 14px; text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.5; color: var(--text-2); margin: 0 0 16px; text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--sep); box-shadow: 0 0 0 0.5px var(--sep); margin-bottom: 40px; }
.stat { background: var(--win-solid); padding: 16px 18px; }
.stat b { display: block; font: 700 28px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 4px; color: var(--text-2); font-size: 12.5px; }
.doc section { padding-top: 8px; margin-bottom: 38px; scroll-margin-top: 60px; }
.doc h2 { font: 700 13px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
.doc p, .doc li { font-size: 16px; line-height: 1.62; }
.doc p { margin: 0 0 12px; text-wrap: pretty; }
.decision { position: relative; padding: 20px 22px 18px; margin-bottom: 14px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep); scroll-margin-top: 60px; transition: box-shadow 0.4s; }
.decision.flash { box-shadow: 0 0 0 2px var(--accent), 0 0 0 8px var(--accent-soft); }
.decision .num { font: 700 12px/1 var(--mono); color: var(--accent); }
.decision h3 { font: 700 20px/1.25 var(--font-display); letter-spacing: -0.01em; margin: 8px 0 14px; }
.decision dl { display: grid; grid-template-columns: 112px 1fr; gap: 10px 16px; margin: 0; }
.decision dt { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding-top: 4px; }
.decision dd { margin: 0; font-size: 15px; line-height: 1.58; }
.decision dd.call { font-weight: 500; }
.decision dd.cost { color: var(--text-2); }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 26px; font-size: 15px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%230a6cff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/12px no-repeat; }
.gallery { columns: 2 260px; column-gap: 12px; }
.gallery button { display: block; width: 100%; margin: 0 0 12px; break-inside: avoid; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 0.5px var(--sep); cursor: zoom-in; background: var(--fill); }
.gallery img { width: 100%; height: auto; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gallery button:hover img { transform: scale(1.02); }
.more-btn { display: block; margin: 4px auto 0; padding: 7px 14px; border-radius: 999px; background: var(--fill); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.more-btn:hover { background: var(--fill-2); }
.impact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.impact li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--good) 9%, transparent); font-size: 15px; line-height: 1.5; }
.impact li::before { content: "↗"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--good); margin-top: 1px; }
.pull { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font: 500 21px/1.45 var(--font-display); letter-spacing: -0.01em; text-wrap: pretty; }
.nextq { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--fill); color: var(--text-2); font-size: 14.5px; }
.nextq b { color: var(--text); }
.embeds { display: grid; gap: 12px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; box-shadow: 0 0 0 0.5px var(--sep); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .load { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: #fff; cursor: pointer; background: radial-gradient(80% 80% at 50% 40%, #2a2a33, #0d0d10); }
.embed .load .pb { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); transition: transform 0.2s; }
.embed .load:hover .pb { transform: scale(1.08); }
.embed .load svg { width: 22px; height: 22px; margin-left: 3px; }
.embed .load span { font-size: 13px; font-weight: 600; opacity: 0.9; }
.nextcase { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; width: 100%; text-align: left; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep); cursor: pointer; transition: transform 0.25s; }
.nextcase:hover { transform: translateY(-2px); }
.nextcase .th { aspect-ratio: 16 / 10; border-radius: 10px; background: var(--fill) center/cover; }
.nextcase small { color: var(--text-2); font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.nextcase b { display: block; font: 600 16px/1.3 var(--font-display); margin-top: 4px; }
.cta-strip { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); }
.cta-strip p { margin: 0; font-size: 14.5px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; background: var(--fill-2); color: var(--text); transition: filter 0.15s, transform 0.15s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn svg { width: 15px; height: 15px; }

.arch-scroll { flex: 1; }
.arch-hero { display: block; width: calc(100% - 48px); margin: 18px 24px 0; aspect-ratio: 16 / 7; border-radius: 14px; background: var(--fill) center / cover no-repeat; box-shadow: 0 0 0 0.5px var(--sep); cursor: zoom-in; }
.arch-doc h1 { font-size: 30px; }
.arch-doc h2 { margin-top: 6px; }
.arch-doc .impact { margin-bottom: 20px; }
.arch-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; margin: 4px 0 30px; border-radius: 12px; overflow: hidden; background: var(--sep); box-shadow: 0 0 0 0.5px var(--sep); }
.arch-facts span { background: var(--win-solid); padding: 11px 14px; font-size: 11.5px; color: var(--text-3); }
.arch-facts b { display: block; margin-bottom: 2px; font: 600 14px/1.25 var(--font-display); color: var(--text); }
.arch-walk { margin-top: 34px !important; }
.arch-sec { margin: 0 0 30px; padding: 0 !important; }
.arch-sec h3 { margin: 0 0 6px; font: 700 18px/1.3 var(--font-display); letter-spacing: -0.01em; }
.arch-sec p { color: var(--text-2); }
.arch-shot { display: block; width: 100%; padding: 0; border-radius: 12px; overflow: hidden; background: var(--fill); box-shadow: 0 0 0 0.5px var(--sep); cursor: zoom-in; }
.arch-shot img { width: 100%; height: auto; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.arch-shot:hover img { transform: scale(1.015); }
.arch-shot.lead { margin-top: 12px; }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; align-items: start; }
.arch-grid.one { grid-template-columns: 1fr; }
.arch-next { margin-top: 26px; }
.arch-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 40px; text-align: center; }

/* ───────────────────────── Welcome + sticky + about-this ───────────────────────── */
.welcome { padding: 50px 28px 24px; display: grid; gap: 14px; }
.welcome .top { display: flex; align-items: center; gap: 14px; }
.welcome .avatar { --s: 56px; }
.welcome h1 { margin: 0; font: 700 24px/1.15 var(--font-display); letter-spacing: -0.02em; }
.welcome .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.welcome p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.welcome .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.welcome .tip { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 0.5px solid var(--sep); }
.welcome .tip svg { width: 14px; height: 14px; flex: none; }
.welcome .btn svg { width: 15px; height: 15px; }
kbd.k { font: 600 11px var(--font); padding: 2px 6px; border-radius: 5px; background: var(--fill-2); color: var(--text); }
.win.sticky { background: var(--sticky); color: var(--sticky-ink); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 22px 44px -16px rgba(0, 0, 0, 0.45); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 6px; }
.win.sticky .titlebar { height: 26px; padding: 0 8px; }
.win.sticky .titlebar::before { background: rgba(0, 0, 0, 0.05); border: 0; backdrop-filter: none; }
.win.sticky .light { width: 10px; height: 10px; }
.win.sticky .tb-title { font-size: 11px; color: rgba(74, 61, 0, 0.7) !important; }
.sticky-body { padding: 12px 16px 16px; }
.sticky-body h3 { margin: 0 0 10px; font: 700 17px/1.2 var(--font-display); }
.receipt { display: grid; grid-template-columns: 104px 1fr; gap: 10px; width: 100%; text-align: left; padding: 7px 6px; border-radius: 6px; cursor: pointer; align-items: baseline; }
.receipt:hover { background: rgba(0, 0, 0, 0.06); }
.receipt b { white-space: nowrap; font: 800 15.5px/1.1 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.receipt span { font-size: 12.5px; line-height: 1.35; }
.sticky-foot { margin-top: 8px; font-size: 11.5px; opacity: 0.7; }
.aboutthis { padding: 44px 26px 22px; text-align: center; display: grid; justify-items: center; gap: 4px; }
.aboutthis .avatar { --s: 110px; margin-bottom: 10px; }
.aboutthis h2 { margin: 0; font: 700 22px/1.2 var(--font-display); }
.aboutthis .ver { color: var(--text-2); font-size: 12px; margin-bottom: 14px; }
.specs { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; text-align: left; font-size: 12.5px; margin-bottom: 16px; }
.specs dt { font-weight: 600; text-align: right; }
.specs dd { margin: 0; color: var(--text-2); }
.aboutthis .legal { font-size: 10.5px; color: var(--text-3); margin-top: 12px; }

/* ───────────────────────── Notes (about) ───────────────────────── */
.notes .sidebar { background: var(--sidebar); }
.note-item { display: grid; gap: 1px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.note-item b { font-size: 13px; }
.note-item span { font-size: 12px; color: var(--text-2); }
.note-item.on { background: #f5c43a; color: #3a2d00; }
.note-item.on span { color: rgba(58, 45, 0, 0.75); }
.note { max-width: 640px; margin: 0 auto; padding: 18px 38px 50px; -webkit-user-select: text; user-select: text; }
.note .when { text-align: center; font-size: 11.5px; color: var(--text-3); margin-bottom: 18px; }
.note h1 { font: 700 28px/1.15 var(--font-display); letter-spacing: -0.02em; margin: 0 0 16px; }
.note h3 { font: 700 17px/1.3 var(--font-display); margin: 26px 0 8px; }
.note p, .note li { font-size: 15.5px; line-height: 1.65; }
.note blockquote { margin: 0 0 18px; font: 500 20px/1.45 var(--font-display); padding-left: 16px; border-left: 3px solid #f5c43a; }
.lead-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 22px; }
.lead-card { margin: 0; border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep), 0 6px 18px -10px rgba(0, 0, 0, 0.35); }
.lead-card img { width: 100%; aspect-ratio: 330 / 141; object-fit: cover; background: #fff; }
.lead-card figcaption { padding: 12px 14px 14px; }
.lead-card small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.lead-card b { display: block; margin: 3px 0 8px; font: 600 16px/1.2 var(--font-display); }
.lead-card ul { margin: 0; padding-left: 16px; }
.note .lead-card li { font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.note .pics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 18px 0; }
.note .pics button { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--fill) center/cover; cursor: zoom-in; }

/* ───────────────────────── Résumé (preview) ───────────────────────── */
.preview { flex: 1; background: color-mix(in srgb, var(--text) 12%, var(--win-solid)); padding: 26px; }
.page { max-width: 720px; margin: 0 auto; background: var(--paper); color: #1d1d1f; border-radius: 3px; box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.1); padding: 48px 54px; -webkit-user-select: text; user-select: text; }
.page h1 { margin: 0; font: 700 30px/1.1 var(--font-display); letter-spacing: -0.02em; }
.page .r-title { font-size: 14px; color: #555; margin: 6px 0 4px; }
.page .r-links { font-size: 12.5px; color: #555; margin-bottom: 22px; }
.page .r-links a { color: #0a5fd6; }
.page h4 { font: 700 11px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: #888; margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.page p { font-size: 13.5px; line-height: 1.6; margin: 0 0 8px; }
.r-job { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 7px 0; font-size: 13px; line-height: 1.5; }
.r-job b { font-weight: 700; }
.r-job .rr { color: #666; font-size: 12px; }

/* ───────────────────────── Mail compose ───────────────────────── */
.compose { flex: 1; display: flex; flex-direction: column; }
.fld { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 18px; border-bottom: 0.5px solid var(--sep); font-size: 13px; }
.fld > label { color: var(--text-2); width: 60px; flex: none; }
.fld input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: 13px var(--font); }
.to-chip { padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12.5px; }
.subj-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px; border-bottom: 0.5px solid var(--sep); }
.subj-chips button { padding: 4px 11px; border-radius: 999px; background: var(--fill); font-size: 12.5px; cursor: pointer; }
.subj-chips button.on { background: var(--accent); color: #fff; }
.compose textarea { flex: 1; min-height: 160px; resize: none; border: 0; outline: none; padding: 16px 18px; background: none; color: var(--text); font: 14.5px/1.6 var(--font); }
.compose-wrap { flex: 1; min-height: 0; display: flex; }
.compose .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fld.bad, textarea.bad { box-shadow: inset 3px 0 0 #ff453a; }
.compose-status { font-size: 12px; color: var(--text-2); }
.compose-status.err { color: #ff453a; font-weight: 600; }
.compose-status a { font-weight: 600; }
.sent { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; padding: 30px; text-align: center; animation: menuIn 0.35s ease-out; }
.sent-plane { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--good); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--good) 60%, transparent); }
.sent-plane svg { width: 28px; height: 28px; }
.sent h2 { margin: 6px 0 0; font: 700 24px/1.2 var(--font-display); }
.sent p { margin: 0; max-width: 360px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.sent-actions { display: flex; gap: 8px; margin-top: 8px; }
.compose-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 0.5px solid var(--sep); flex-wrap: wrap; }
.compose-foot .links { display: flex; gap: 4px; margin-right: auto; }

/* ───────────────────────── Films ───────────────────────── */
.win.films { --win: rgba(18, 18, 20, 0.92); --win-solid: #121214; --text: #f5f5f7; --text-2: #a1a1a6; --sep: rgba(255, 255, 255, 0.1); --fill: rgba(255, 255, 255, 0.07); --fill-2: rgba(255, 255, 255, 0.12); --titlebar: rgba(18, 18, 20, 0.7); --sidebar: rgba(255, 255, 255, 0.04); color-scheme: dark; }
.films-main { flex: 1; padding: 18px 22px 24px; }
.films-main > * { margin-bottom: 18px; }
.films-intro { max-width: 900px; margin: 0 auto; font-size: 14.5px; line-height: 1.6; color: var(--text-2); -webkit-user-select: text; user-select: text; }
.film-hl { max-width: 900px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.film-hl div { padding: 12px 14px; border-radius: 12px; background: var(--fill); }
.film-hl b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.film-hl span { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
/* reel carousel: centre card plays, neighbours peek */
.films-main > .reel { position: relative; margin: 0 -22px 12px; }
.reel-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 0 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.reel-track::-webkit-scrollbar { display: none; }
.reel-track::before, .reel-track::after { content: ""; flex: 0 0 calc((100% - min(680px, 72%)) / 2 - 18px); }
.reel-card {
  position: relative; flex: 0 0 min(680px, 72%); aspect-ratio: 16 / 9; scroll-snap-align: center; border-radius: 14px; overflow: hidden; background: #000;
  transform: scale(0.84); opacity: 0.4; filter: saturate(0.6);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s, filter 0.45s, box-shadow 0.45s;
}
.reel-card.near { opacity: 0.6; }
.reel-card.on { transform: none; opacity: 1; filter: none; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
.reel-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-hit { position: absolute; inset: 0; width: 100%; cursor: pointer; }
.reel-poster { position: absolute; inset: 0; background: #111 center / cover no-repeat; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reel-card.on .reel-hit:hover .reel-poster { transform: scale(1.03); }
.reel-hit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.65)); }
.reel-play { position: absolute; left: 50%; top: 50%; z-index: 1; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.3s; }
.reel-play svg { width: 24px; height: 24px; margin-left: 3px; }
.reel-card.on .reel-play { opacity: 1; transform: none; }
.reel-card.on .reel-hit:hover .reel-play { transform: scale(1.08); background: rgba(255, 255, 255, 0.28); }
.reel-meta { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; display: flex; align-items: baseline; gap: 10px; color: #fff; font-size: 12.5px; text-align: left; }
.reel-meta b { font: 600 14px var(--font-display); }
.reel-meta span { opacity: 0.75; font-variant-numeric: tabular-nums; }
.reel-nav { position: absolute; top: calc(50% - 20px); z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(40, 40, 44, 0.7); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.25); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); cursor: pointer; transition: opacity 0.2s, transform 0.2s; }
.reel-nav:hover { transform: scale(1.06); }
.reel-nav[disabled] { opacity: 0; pointer-events: none; }
.reel-nav.prev { left: 22px; }
.reel-nav.next { right: 22px; }
.reel-nav svg { width: 18px; height: 18px; }
.reel-dots { display: flex; justify-content: center; gap: 7px; }
.reel-dots button { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); cursor: pointer; transition: width 0.3s, background 0.3s; }
.reel-dots button[aria-selected="true"] { width: 20px; background: #fff; }

/* ───────────────────────── Process ───────────────────────── */
.process { flex: 1; display: grid; grid-template-columns: 280px 1fr; min-height: 0; }
.process .left { padding: 18px; display: grid; gap: 10px; align-content: start; border-right: 0.5px solid var(--sep); overflow: auto; -webkit-user-select: text; user-select: text; }
.pcard { padding: 12px 14px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep); }
.pcard b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.pcard span { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.process .right { position: relative; background: #1e1e1e; }
.process .right .embed { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }

/* ───────────────────────── Terminal ───────────────────────── */
.win.term { --win: rgba(22, 22, 24, 0.9); --titlebar: rgba(40, 40, 44, 0.8); --text: #e8e8ea; --text-2: #9a9aa0; --sep: rgba(255, 255, 255, 0.08); --fill: rgba(255, 255, 255, 0.08); --fill-2: rgba(255, 255, 255, 0.12); color-scheme: dark; }
.term-body { flex: 1; padding: 10px 14px 14px; font: 12.5px/1.55 var(--mono); color: #e8e8ea; -webkit-user-select: text; user-select: text; cursor: text; }
.term-body .out { white-space: pre-wrap; word-break: break-word; }
.term-body .p { color: #7ee787; }
.term-body .d { color: #79c0ff; }
.term-body .m { color: #9a9aa0; }
.term-line { display: flex; gap: 8px; }
.cmd-paste { display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 2px 0 4px; vertical-align: -3px; border-radius: 5px; color: #9a9aa0; background: rgba(255, 255, 255, 0.08); cursor: pointer; transition: background 0.15s, color 0.15s; }
.cmd-paste:hover { color: #fff; background: rgba(255, 255, 255, 0.18); }
.cmd-paste svg { width: 11px; height: 11px; }
.cmd-paste.done { color: #0d1117; background: #7ee787; }
.term-line input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: inherit; font: inherit; caret-color: #7ee787; }

/* ───────────────────────── Ask Cam (Claude-style) ───────────────────────── */
.win.ask-w { --ask-bg: #faf9f5; --ask-ink: #1f1e1d; --ask-soft: #6b6a66; --ask-line: rgba(31, 30, 29, 0.12); --ask-card: #ffffff; --ask-user: #f0eee6; --ask-clay: #c9643f; --win-solid: var(--ask-bg); --titlebar: rgba(250, 249, 245, 0.8); --text: var(--ask-ink); --text-2: var(--ask-soft); --sep: var(--ask-line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .win.ask-w { --ask-bg: #262624; --ask-ink: #f1efe8; --ask-soft: #a8a69e; --ask-line: rgba(255, 255, 255, 0.1); --ask-card: #30302e; --ask-user: #141413; --titlebar: rgba(38, 38, 36, 0.8); } }
:root[data-theme="dark"] .win.ask-w { --ask-bg: #262624; --ask-ink: #f1efe8; --ask-soft: #a8a69e; --ask-line: rgba(255, 255, 255, 0.1); --ask-card: #30302e; --ask-user: #141413; --titlebar: rgba(38, 38, 36, 0.8); }
.ask { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ask-bg); color: var(--ask-ink); }
.ask-scroll { flex: 1; min-height: 0; padding: 0 24px; }
.ask-empty { max-width: 640px; margin: 0 auto; padding: 12vh 0 20px; text-align: center; }
.ask.chatting .ask-empty { display: none; }
.ask-hello { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ask-hello h1 { margin: 0; font: 400 34px/1.2 "Tiempos Headline", "Copernicus", Georgia, "Times New Roman", serif; letter-spacing: -0.01em; }
.ask-spark { display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--ask-clay); }
.ask-spark svg { width: 30px; height: 30px; stroke-width: 2; }
.ask-empty p { margin: 12px 0 22px; color: var(--ask-soft); font-size: 15px; }
.ask-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ask-chips button { padding: 8px 14px; border-radius: 10px; font-size: 13px; color: var(--ask-ink); background: var(--ask-card); box-shadow: inset 0 0 0 1px var(--ask-line); cursor: pointer; transition: background 0.15s; }
.ask-chips button:hover { background: var(--ask-user); }
.ask-chips.inline { justify-content: flex-start; margin-top: 12px; font-family: var(--font); }
.ask-thread { max-width: 680px; margin: 0 auto; padding: 22px 0 10px; display: grid; gap: 22px; }
.ask-msg.user { display: flex; justify-content: flex-end; }
.ask-user { max-width: 80%; padding: 10px 14px; border-radius: 16px; background: var(--ask-user); font-size: 15px; line-height: 1.5; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.ask-msg.assistant { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.ask-avatar { width: 28px; height: 28px; display: grid; place-items: center; color: var(--ask-clay); }
.ask-avatar svg { width: 22px; height: 22px; stroke-width: 2; }
.ask-msg.pending .ask-avatar svg { animation: askPulse 1.2s ease-in-out infinite; }
@keyframes askPulse { 50% { transform: rotate(45deg) scale(0.8); opacity: 0.6; } }
.ask-text { font: 16px/1.65 "Tiempos Text", Georgia, "Times New Roman", serif; -webkit-user-select: text; user-select: text; min-height: 28px; }
.ask-text p { margin: 0 0 10px; }
.ask-text ul, .ask-text ol { margin: 0 0 10px; padding-left: 22px; }
.ask-text li { margin: 3px 0; }
.ask-text b { font-weight: 700; }
.ask-text a { color: var(--ask-clay); text-decoration: underline; }
.ask-caret { display: inline-block; width: 8px; height: 16px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--ask-clay); animation: askBlink 1s steps(2) infinite; }
@keyframes askBlink { 50% { opacity: 0; } }
.ask-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-family: var(--font); }
.ask-act { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ask-ink); background: var(--ask-card); box-shadow: inset 0 0 0 1px var(--ask-line); cursor: pointer; transition: background 0.15s; }
.ask-act span { color: var(--ask-clay); }
.ask-act:hover { background: var(--ask-user); }
.ask-file { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 440px; padding: 10px 12px; border-radius: 14px; background: var(--ask-card); box-shadow: inset 0 0 0 1px var(--ask-line), 0 6px 18px -12px rgba(0, 0, 0, 0.3); }
.ask-file svg { width: 34px; height: 40px; flex: none; }
.ask-file-name { flex: 1; min-width: 0; display: grid; }
.ask-file-name b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-file-name small { font-size: 12px; color: var(--ask-soft); }
.ask-file button { padding: 6px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1px var(--ask-line); }
.ask-file button:hover { background: var(--ask-user); }
.ask-file button[data-act="resume"] { color: #fff; background: var(--ask-clay); box-shadow: none; }
.ask-err { color: #c0392b; font-family: var(--font); font-size: 14px; }
.ask-composer { max-width: 680px; width: calc(100% - 48px); margin: 0 auto 8px; padding: 12px 12px 10px 16px; border-radius: 18px; background: var(--ask-card); box-shadow: 0 0 0 1px var(--ask-line), 0 6px 24px -12px rgba(0, 0, 0, 0.25); }
.ask-composer textarea { display: block; width: 100%; resize: none; border: 0; outline: none; background: none; color: var(--ask-ink); font: 15.5px/1.5 var(--font); max-height: 160px; }
.ask-composer textarea::placeholder { color: var(--ask-soft); }
.ask-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--ask-soft); }
.ask-left { margin-right: auto; }
.ask-left.low { color: var(--ask-clay); font-weight: 600; }
.ask-send { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--ask-clay); cursor: pointer; transition: opacity 0.15s, transform 0.15s; }
.ask-send svg { width: 16px; height: 16px; }
.ask-send[disabled] { opacity: 0.35; cursor: default; }
.ask-send:not([disabled]):hover { transform: scale(1.05); }
.ask-foot { padding: 0 16px 12px; text-align: center; font-size: 11.5px; color: var(--ask-soft); }
.ask-limit { font-family: var(--font); padding: 16px; border-radius: 16px; background: var(--ask-card); box-shadow: 0 0 0 1px var(--ask-line); display: grid; gap: 8px; }
.ask-limit > b { font-size: 16px; }
.ask-limit p { margin: 0 0 4px; font-size: 13.5px; color: var(--ask-soft); }
.ask-limit button { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--ask-line); cursor: pointer; transition: background 0.15s; }
.ask-limit button:hover { background: var(--ask-user); }
.ask-limit button span { font-weight: 600; font-size: 14px; }
.ask-limit button small { font-size: 12.5px; color: var(--ask-soft); }
.ask-limit button.pro { box-shadow: inset 0 0 0 1.5px var(--ask-clay); }
.ask-limit em { font-style: normal; font-size: 10.5px; font-weight: 700; margin-left: 6px; padding: 1px 6px; border-radius: 6px; color: #fff; background: var(--ask-clay); vertical-align: 1px; }

/* ───────────────────────── Side projects (phone) ───────────────────────── */
.side-icon { background-size: cover; }
.side-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dicon .glyph .desk-app { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.3); }
.phone-w .win-body { background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--accent) 10%, var(--win-solid)), var(--win-solid)); }
.phone-stage { flex: 1; min-height: 0; display: flex; gap: 26px; padding: 14px 26px 18px; align-items: stretch; }
.phone-fit { flex: 1; min-width: 0; display: grid; place-items: center; }
.phone { --k: 1; width: calc(414px * var(--k)); height: calc(868px * var(--k)); position: relative; flex: none; }
.phone::before { content: ""; position: absolute; inset: 0; border-radius: calc(64px * var(--k)); background: linear-gradient(145deg, #3a3a3e, #121214 45%, #2a2a2e); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6), inset 0 0 0 calc(2px * var(--k)) #5a5a60; }
.phone-screen { position: absolute; left: 12px; top: 12px; width: 390px; height: 844px; border-radius: 52px; overflow: hidden; background: var(--app-bg); transform: scale(var(--k)); transform-origin: -12px -12px; }
.phone-status { position: absolute; inset: 0 0 auto 0; height: 47px; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 4px 28px 0 44px; color: var(--app-fg); background: var(--app-bg); font: 600 16px var(--font-display); }
.ps-island { position: absolute; left: 50%; top: 11px; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; }
.ps-icons { display: flex; align-items: center; gap: 5px; }
.ps-icons svg { width: 17px; height: 12px; }
.phone-app { position: absolute; left: 0; top: 47px; width: 390px; height: 797px; border: 0; background: var(--app-bg); }
.phone-home { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: color-mix(in srgb, var(--app-fg) 70%, transparent); z-index: 3; pointer-events: none; }
.phone-splash { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 18px; background: var(--app-bg); color: var(--app-fg); transition: opacity 0.45s ease, transform 0.45s ease; }
.phone-splash.gone { opacity: 0; transform: scale(1.04); pointer-events: none; }
.splash-icon { width: 104px; height: 104px; border-radius: 24px; animation: splashIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.45); }
@keyframes splashIn { from { transform: scale(0.4); opacity: 0; } }
.splash-name { font: 700 22px var(--font-display); letter-spacing: -0.01em; animation: splashIn 0.7s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both; }
.splash-bar { width: 120px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--app-fg) 18%, transparent); overflow: hidden; }
.splash-bar i { display: block; width: 8%; height: 100%; border-radius: 2px; background: var(--app-fg); transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.phone-info { flex: 0 0 280px; align-self: center; display: grid; gap: 14px; }
.pi-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.pi-head { display: flex; gap: 12px; align-items: center; }
.pi-head .app-icon { width: 56px; height: 56px; flex: none; }
.pi-head h2 { margin: 0; font: 700 24px/1.1 var(--font-display); letter-spacing: -0.02em; }
.pi-head p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.pi-blurb { margin: 0; font-size: 14px; line-height: 1.55; }
.pi-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.pi-stack span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.pi-note { font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--good) 10%, transparent); color: var(--text); }
.pi-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.phone-w.narrow .phone-info { display: none; }
.home-label { margin: 22px 4px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); text-transform: uppercase; }

/* ───────────────────────── Reviews ───────────────────────── */
.reviews { flex: 1; padding: 26px 26px 30px; }
.rv-head { max-width: 760px; margin: 0 auto 18px; text-align: center; }
.rv-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-card .rv-av { width: 40px; height: 40px; }
.rv-faces { display: flex; justify-content: center; margin-bottom: 14px; }
.rv-av { --h: 210; position: relative; overflow: hidden; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 12.5px var(--font-display); color: #fff; background: linear-gradient(145deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 62% 42%)); box-shadow: 0 0 0 2px var(--win-solid); }
.rv-faces .rv-av { margin-left: -8px; }
.rv-faces .rv-av:first-child { margin-left: 0; }
.rv-faces .rv-av.more { background: #0a66c2; font-size: 11.5px; }
.rv-head h2 { margin: 0; font: 700 26px/1.2 var(--font-display); letter-spacing: -0.02em; }
.rv-big { color: #0a66c2; }
:root[data-theme="dark"] .rv-big { color: #4d9cf0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rv-big { color: #4d9cf0; } }
.rv-head p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; }
.rv-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 20px; }
.rv-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--fill); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rv-filters button span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.rv-filters button[aria-selected="true"] { background: #0a66c2; color: #fff; }
.rv-filters button[aria-selected="true"] span { color: rgba(255, 255, 255, 0.75); }
.rv-grid { display: flex; gap: 14px; align-items: flex-start; max-width: 1100px; margin: 0 auto; }
.rv-col { flex: 1; min-width: 0; }
.rv-card { margin: 0 0 14px; padding: 18px 18px 14px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep), 0 1px 2px rgba(0, 0, 0, 0.04); -webkit-user-select: text; user-select: text; }
.rv-quote { position: relative; margin: 0 0 16px; font-size: 14px; line-height: 1.6; }
.rv-quote::before { content: "“"; display: block; height: 22px; margin-bottom: 2px; font: 700 40px/1 Georgia, serif; color: #0a66c2; opacity: 0.35; }
.rv-quote mark { background: color-mix(in srgb, #0a66c2 14%, transparent); color: inherit; font-weight: 600; padding: 0 2px; border-radius: 3px; }
.rv-card footer { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 0.5px solid var(--sep); }
.rv-card .rv-av { box-shadow: none; }
.rv-who { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rv-name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.rv-name:hover { color: #0a66c2; text-decoration: underline; }
.rv-hl, .rv-rel { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-rel { color: var(--text-3); }
.rv-li { flex: none; width: 24px; height: 24px; transition: transform 0.15s; }
.rv-li:hover { transform: scale(1.1); }
.rv-li .app-icon { width: 24px; height: 24px; border-radius: 6px; box-shadow: none; }
.rv-li .app-icon::after { display: none; }
.rv-foot { text-align: center; margin-top: 10px; }

/* ───────────────────────── Trash ───────────────────────── */
.trash-head { padding: 18px 22px 10px; }
.trash-head h2 { margin: 0; font: 700 20px/1.2 var(--font-display); }
.trash-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.trash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 8px 22px 26px; }
.tcard { display: flex; flex-direction: column; text-align: left; border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 0.5px var(--sep), 0 1px 2px rgba(0, 0, 0, 0.05); cursor: default; outline: none; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s; }
.tcard:hover, .tcard:focus-visible { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 0 0 0.5px var(--sep), 0 16px 30px -14px rgba(0, 0, 0, 0.35); }
.tcard-img { position: relative; aspect-ratio: 16 / 10; background: var(--fill); overflow: hidden; }
.tcard-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(0.95); transition: filter 0.3s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tcard:hover .tcard-img img, .tcard:focus-visible .tcard-img img { filter: blur(3px) brightness(0.55); transform: scale(1.06); }
.tcard-lesson { position: absolute; inset: 0; display: grid; align-content: center; gap: 6px; padding: 16px 18px; color: #fff; font: 600 15px/1.4 var(--font-display); opacity: 0; transform: translateY(8px); transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); pointer-events: none; }
.tcard-lesson small { font: 700 10.5px var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: #ffd45e; }
.tcard:hover .tcard-lesson, .tcard:focus-visible .tcard-lesson { opacity: 1; transform: none; }
.tcard:hover .tcard-file, .tcard:focus-visible .tcard-file { opacity: 0; }
.tcard-file { transition: opacity 0.2s; }
/* no hover on touch screens: show the lesson under the card instead */
@media (hover: none) {
  .tcard-lesson { position: static; opacity: 1; transform: none; padding: 0; color: var(--text); font-size: 13.5px; }
  .tcard-img { display: flex; flex-direction: column; aspect-ratio: auto; }
  .tcard-img img { aspect-ratio: 16 / 10; }
  .tcard-img .tcard-lesson { order: 2; padding: 12px 14px 0; }
}
.tcard-file { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 4px 10px 4px 6px; border-radius: 8px; color: #fff; background: rgba(20, 20, 24, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tcard-file svg { width: 16px; height: 19px; flex: none; }
.tcard-file b { font: 600 11.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: line-through; text-decoration-color: rgba(255, 90, 80, 0.9); text-decoration-thickness: 2px; }
.tcard-body { display: grid; gap: 6px; padding: 12px 14px 14px; }
.tcard-what { font: 600 14px/1.35 var(--font-display); }
.tcard-why { font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.tcard-go { margin-top: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.trash-list { padding: 4px 12px 20px; }
.trow { display: grid; grid-template-columns: 30px minmax(0, 1.1fr) minmax(0, 1.5fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.trow:nth-child(even) { background: var(--fill); }
.trow:hover { background: var(--accent-soft); }
.trow svg { width: 26px; height: 30px; }
.trow .f { font-weight: 600; font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .w { color: var(--text-2); font-size: 12.5px; }
.trow .go { color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ───────────────────────── overlays ───────────────────────── */
#notifs { position: fixed; top: calc(var(--menubar-h) + 10px); right: 12px; z-index: 7000; display: grid; gap: 10px; width: 356px; max-width: calc(100vw - 24px); }
.notif {
  display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px 14px; border-radius: 18px; text-align: left; color: var(--text);
  background: var(--menu); box-shadow: var(--shadow-pop), var(--ring); backdrop-filter: blur(40px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8);
  animation: notifIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15); cursor: pointer; position: relative;
}
.notif.out { animation: notifOut 0.35s ease forwards; }
@keyframes notifIn { from { transform: translateX(110%); opacity: 0; } }
@keyframes notifOut { to { transform: translateX(110%); opacity: 0; } }
.notif .app-icon { width: 38px; height: 38px; }
.notif .nh { display: flex; gap: 8px; align-items: baseline; }
.notif .nh b { font-size: 13px; }
.notif .nh span { margin-left: auto; font-size: 11.5px; color: var(--text-2); }
.notif p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.notif .nact { display: flex; gap: 6px; margin-top: 8px; }
.notif .nact button { padding: 4px 12px; border-radius: 999px; background: var(--fill-2); font-weight: 600; font-size: 12px; cursor: pointer; }
.notif .nact button.primary { background: var(--accent); color: #fff; }
.notif .x { position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--menu); box-shadow: var(--shadow-pop); display: grid; place-items: center; opacity: 0; transition: opacity 0.15s; }
.notif:hover .x { opacity: 1; }
.notif .x svg { width: 8px; height: 8px; }

#spotlight { position: fixed; inset: 0; z-index: 8000; display: grid; justify-items: center; align-items: start; padding-top: 18vh; background: rgba(0, 0, 0, 0.12); }
#spotlight[hidden] { display: none; }
.spot { width: min(660px, calc(100vw - 32px)); border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--win-solid) 88%, transparent); box-shadow: var(--shadow-pop), var(--ring), 0 40px 100px -20px rgba(0, 0, 0, 0.5); backdrop-filter: blur(50px) saturate(1.9); -webkit-backdrop-filter: blur(50px) saturate(1.9); animation: spotIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes spotIn { from { transform: scale(0.96); opacity: 0; } }
.spot-in { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 20px; }
.spot-in svg { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.spot-in input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font: 400 22px var(--font-display); }
.spot-res { max-height: 50vh; overflow: auto; border-top: 0.5px solid var(--sep); padding: 6px; }
.spot-res:empty { display: none; }
.spot-group { font-size: 11px; font-weight: 700; color: var(--text-3); padding: 8px 12px 4px; }
.spot-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 7px 12px; border-radius: 10px; cursor: pointer; }
.spot-item .app-icon, .spot-item .th { width: 30px; height: 30px; flex: none; }
.spot-item .th { border-radius: 7px; background: var(--fill) center/cover; }
.spot-item b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-item span { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-item > div { min-width: 0; }
.spot-item.on { background: var(--sel); color: #fff; }
.spot-item.on span { color: rgba(255, 255, 255, 0.8); }

#quicklook { position: fixed; inset: 0; z-index: 8500; display: grid; place-items: center; background: rgba(0, 0, 0, 0); transition: background 0.3s; }
#quicklook[hidden] { display: none; }
#quicklook.on { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ql-frame { position: relative; max-width: 92vw; max-height: 86vh; border-radius: 14px; overflow: hidden; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8); background: #111; }
.ql-frame img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.ql-bar { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; padding: 5px 6px 5px 14px; border-radius: 999px; color: #fff; background: rgba(40, 40, 44, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); font-size: 12.5px; opacity: 0; transition: opacity 0.3s; }
#quicklook.on .ql-bar { opacity: 1; }
.ql-bar button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.ql-bar button:hover { background: rgba(255, 255, 255, 0.15); }
.ql-bar svg { width: 14px; height: 14px; }

/* ───────────────────────── mobile: iOS home screen ───────────────────────── */
#home { display: none; }
@media (max-width: 760px) {
  :root { --menubar-h: 44px; }
  body { overflow: hidden; }
  #menubar { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 22px; }
  .mb-left .mb-item:not(.mb-clock-m), .mb-right > :not(.mb-status) { display: none; }
  .mb-status { display: flex; gap: 6px; align-items: center; margin-left: auto; }
  .mb-status svg { width: 17px; height: 17px; }
  .mb-clock-m { display: flex !important; font: 600 16px var(--font-display); padding: 0; }
  #icons { display: none; }
  #home { display: block; position: absolute; inset: 0 0 110px; overflow: auto; padding: 8px 20px 20px; }
  .widget { border-radius: 24px; padding: 16px 18px; color: var(--text); background: var(--menu); backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6); box-shadow: var(--ring); margin-bottom: 18px; }
  .widget.sticky-w { background: var(--sticky); color: var(--sticky-ink); }
  .widget h3 { margin: 0 0 6px; font: 700 18px/1.2 var(--font-display); }
  .widget p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
  .widget .avatar { --s: 44px; }
  .widget .top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
  .homegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; margin-top: 4px; }
  .happ { display: grid; justify-items: center; gap: 6px; color: #fff; font-size: 11.5px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
  .happ .app-icon { width: 62px; height: 62px; }
  #dock { --dock-size: 58px; gap: 16px; padding: 12px 16px; border-radius: 32px; height: auto; }
  #dock-wrap { bottom: 12px; }
  .dock-item { width: var(--dock-size) !important; height: var(--dock-size) !important; }
  .dock-item .tip, .dock-item .lbl, .dock-sep, .dock-thumb, .dock-item.nomobile { display: none; }
  .dock-item .dot { display: none; }
  .win { position: fixed !important; left: 0 !important; top: 48px !important; width: 100vw !important; height: calc(100% - 48px) !important; max-height: none !important; border-radius: 16px 16px 0 0; z-index: 4500 !important; background: var(--win-solid); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35) !important; }
  body.has-win #dock-wrap { transform: translateY(150%); }
  body.has-win #home { filter: blur(6px); transform: scale(0.96); opacity: 0.6; }
  #home { transition: filter 0.4s, transform 0.4s, opacity 0.4s; }
  .tb-actions [data-a="prev"], .tb-actions [data-a="next"], .tb-actions [data-a="link"], .tb-sub { display: none; }
  .win:not(.is-focused) { visibility: hidden; }
  .win .lights, .resize, .edge-r, .edge-b { display: none; }
  .win-done { display: inline-flex; color: var(--accent); font-weight: 600; font-size: 15px; padding: 0 4px; }
  .titlebar { height: 52px; }
  .titlebar::before { opacity: 1 !important; left: 0 !important; }
  .win.has-sidebar:not(.scrolled) .tb-title { opacity: 1; }
  .win.has-sidebar .tb-title { margin-left: 0; }
  .sidebar { display: none; }
  .main > .scroll { padding-top: 52px; }
  .win.sticky, .win.welcome-w { display: none; }
  .doc { padding: 6px 20px 60px; }
  .doc-hero { margin: 8px 12px 0; aspect-ratio: 16 / 10; }
  .doc h1 { font-size: 27px; }
  .lede { font-size: 16.5px; }
  .decision { padding: 16px; }
  .decision dl { grid-template-columns: 1fr; gap: 2px; }
  .decision dd { margin-bottom: 10px; }
  .grid { grid-template-columns: 1fr; padding: 10px 16px 30px; }
  .finder-head { padding: 12px 16px 4px; flex-wrap: wrap; }
  .search { width: 100%; order: 3; }
  .row { grid-template-columns: 44px 1fr 80px; }
  .row .c2 { display: none; }
  .process { grid-template-columns: 1fr; grid-template-rows: auto 60vh; overflow: auto; }
  .preview { padding: 10px; }
  .page { padding: 28px 22px; }
  .r-job { grid-template-columns: 1fr; gap: 2px; }
  .trow { grid-template-columns: 26px 1fr; }
  .trow .w { grid-column: 2; }
  .trow .go { grid-column: 2; }
  #notifs { left: 8px; right: 8px; width: auto; top: 50px; }
  .lock-clock { margin-top: 12vh; }
  .lock-time { font-size: 92px; }
  .lock-hint { display: none; }
  .lock-mobile-hint { display: block; font-size: 13px; opacity: 0.85; }
  .ql-frame img { max-width: 100vw; }
  .phone-stage { padding: 0; }
  .phone-fit { display: block; position: relative; }
  .phone { position: absolute; inset: 0; width: auto !important; height: auto !important; }
  .phone::before, .phone-status, .phone-home { display: none; }
  .phone-screen { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; transform: none; }
  .phone-app { top: 0; width: 100%; height: 100%; }
  .phone-info, .phone-w .tb-actions .tb-btn[data-a="reset"] { display: none; }
}

/* ───────────────────────── motion + print ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
@media print {
  body { overflow: visible; background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .page { box-shadow: none; padding: 0; max-width: none; }
}
#print-root { display: none; }
