/* HyprStack site: one page per screen, each a Hyprland workspace of
   windows, sliding past a parallax backdrop. Colours are the Omarchy
   colors.toml names (theme.js sets them); HyprStack until it runs.
   Window chrome follows the OmaCraft site's. Dark only. */

@property --angle { syntax: "<angle>"; inherits: true; initial-value: 45deg; }

:root {
  color-scheme: dark;
  --background: #0c151a;
  --dark-background: #091014;
  --darker-background: #070c0e;
  --lighter-background: #1d2a30;
  --foreground: #d9eaee;
  --dark-foreground: #aebfc4;
  --muted: #64767d;
  --accent: #4aa3c9;
  --accent-2: #78ecf0;
  --grad-a: #266485;
  --grad-b: #78ecf0;
  --red: #e5534b; --green: #7fc79a; --yellow: #d7b65e; --blue: #3f95bd;
  --magenta: #a58bd6; --cyan: #78ecf0; --orange: #e0823d;
  --accent-ink: #070c0e;

  --gaps: 12px;
  --border: 2px;
  --rounding: 0px;
  --win-opacity: .86;
  --border-speed: 6s;
  --inactive: color-mix(in srgb, var(--muted) 45%, transparent);
  --bar-h: 34px;

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--darker-background);
  color: var(--foreground);
  font: 13px/1.6 var(--mono);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body.theming, body.theming * {
  transition: background-color .6s ease, color .6s ease, border-color .6s ease, fill .6s ease, stroke .6s ease !important;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); }
b, strong { color: var(--foreground); font-weight: 700; }
em { font-style: normal; color: var(--accent); }
code, kbd { font-family: var(--mono); }
kbd {
  display: inline-block; min-width: 1.7em; padding: 0 .45em; text-align: center;
  font-size: 11px; line-height: 1.7; color: var(--foreground);
  background: var(--lighter-background); border: 1px solid color-mix(in srgb, var(--muted) 60%, transparent);
  border-bottom-width: 2px;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── parallax backdrop ─────────────────────────────────── */
#parallax { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--darker-background); }
#px-wall { position: absolute; inset: 0; --wall-dim: .45; }
#px-wall .slot { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.04); transition: opacity 1.6s ease, transform 12s ease-out; }
#px-wall .slot.on { opacity: 1; transform: scale(1); }
#px-wall::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--darker-background) calc(var(--wall-dim) * 100%), transparent); }
body:not(.has-wall) #px-wall::after { display: none; }
@media (prefers-reduced-motion: reduce) { #px-wall .slot { transition: none; transform: none; } }
#px-far { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#px-mid { position: absolute; inset: 0; }
.px-ghost {
  position: absolute; right: 4vw; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
  pointer-events: none; will-change: transform;
}
.px-ghost .num {
  font: 800 min(42vh, 30vw)/.8 var(--mono); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 22%, transparent);
}
.px-ghost .word {
  font: 700 clamp(12px, 1.4vw, 18px)/1 var(--mono); letter-spacing: .6em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-2) 35%, transparent); margin-top: 2vh; margin-right: .2em;
}
#px-glow { position: absolute; inset: -20%; will-change: transform; }
#px-glow::before, #px-glow::after {
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(40px);
}
#px-glow::before { left: 0; top: 10%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%); }
#px-glow::after { right: 0; top: 55%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 65%); }

/* ── bar ───────────────────────────────────────────────── */
#bar {
  position: fixed; z-index: 40; left: 0; right: 0; top: 0; height: var(--bar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 0 8px;
  background: color-mix(in srgb, var(--dark-background) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  font-size: 12px; user-select: none;
}
#bar .lane { display: flex; align-items: center; gap: 6px; min-width: 0; }
#bar .lane.right { justify-content: flex-end; }
#bar .logo { width: 28px; height: 28px; border: 0; background: none; color: var(--accent); display: grid; place-items: center; padding: 0; }
#bar .logo svg { width: 20px; height: 20px; }
#bar .logo:hover { color: var(--foreground); }
#workspaces { display: flex; gap: 2px; position: relative; }
#workspaces button {
  position: relative; border: 0; background: none; height: 26px; padding: 0 10px;
  color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
#workspaces button .n { color: inherit; display: grid; place-items: center; }
#workspaces button .n svg { width: 15px; height: 15px; display: block; }
#workspaces button:hover { color: var(--foreground); background: color-mix(in srgb, var(--lighter-background) 70%, transparent); }
#workspaces button.on { color: var(--foreground); }
#workspaces button.on .n { color: var(--accent); }
#workspaces .ind {
  position: absolute; bottom: -4px; height: 2px; left: 0; width: 0;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  transition: left .45s cubic-bezier(.2, .9, .2, 1), width .45s cubic-bezier(.2, .9, .2, 1);
}
#clock { color: var(--dark-foreground); font-variant-numeric: tabular-nums; }
.pill {
  height: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--lighter-background) 70%, transparent); color: var(--dark-foreground); white-space: nowrap;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.pill:hover { color: var(--foreground); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.pill.icon svg { width: 15px; height: 15px; }
.pill .dot { width: 7px; height: 7px; background: var(--green); flex: none; }
.pill .sw { width: 12px; height: 12px; flex: none; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }
#help-btn { width: 24px; padding: 0; justify-content: center; font-weight: 700; }

/* ── pages ─────────────────────────────────────────────── */
#track { position: fixed; z-index: 1; left: 0; right: 0; top: var(--bar-h); bottom: 0; overflow: hidden; }
.page {
  position: absolute; inset: 0; padding: var(--gaps) calc(var(--gaps) + 34px) var(--gaps) var(--gaps);
  will-change: transform, opacity; visibility: hidden;
}
.page.near { visibility: visible; }
.tiles { position: relative; height: 100%; }
.tiles > .win { position: absolute; will-change: transform; }

/* ── windows ───────────────────────────────────────────── */
.win {
  position: relative; min-width: 0; min-height: 0;
  padding: var(--border); border-radius: var(--rounding);
  background: var(--inactive);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .38);
  display: flex; color: inherit; text-decoration: none;
}
.win.focus { background: linear-gradient(var(--angle), var(--grad-a), var(--grad-b)); }
body.border-loop .win.focus { animation: borderangle var(--border-speed) linear infinite; }
@keyframes borderangle { from { --angle: 0deg; } to { --angle: 360deg; } }
.win.closed { display: none; }
body.booting .page .win { opacity: 0; }
.win > .win-inner {
  flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--background) calc(var(--win-opacity) * 100%), transparent);
  backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
  overflow: hidden;
}
.win-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 12px; font-size: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  user-select: none;
}
.win-head .cls { color: var(--accent); font-weight: 700; white-space: nowrap; }
.win-head .sub { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-head .keys { flex: 0 1 auto; min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-head .x {
  flex: none; width: 22px; height: 22px; border: 0; background: none; color: var(--muted);
  display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.win-head .x:hover { color: var(--red); background: color-mix(in srgb, var(--red) 15%, transparent); }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 18px; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.win-body::-webkit-scrollbar { width: 6px; }
.win-body::-webkit-scrollbar-thumb { background: var(--muted); }

/* ── controls ──────────────────────────────────────────── */
.label { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.label output { color: var(--dark-foreground); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.hint { color: var(--muted); font-size: 12px; }
.field { display: block; margin: 0 0 14px; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.row.between { justify-content: space-between; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent); background: color-mix(in srgb, var(--lighter-background) 60%, transparent);
  color: var(--foreground); text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); color: var(--accent-ink); }
.chip {
  height: 26px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
  background: color-mix(in srgb, var(--lighter-background) 50%, transparent); color: var(--dark-foreground);
  display: inline-flex; align-items: center;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.chip.ghost { min-width: 92px; justify-content: center; color: var(--accent); cursor: default; }
.sel { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.sel.col { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
select, input:not([type=range]), textarea {
  width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
  background: color-mix(in srgb, var(--dark-background) 80%, transparent); color: var(--foreground); border-radius: 0;
}
.sel select { width: auto; max-width: 180px; height: 26px; padding: 0 6px; }
select option { background: var(--dark-background); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.5; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.switch {
  width: 38px; height: 20px; flex: none; border: 1px solid color-mix(in srgb, var(--muted) 60%, transparent);
  background: var(--dark-background); padding: 2px; display: flex;
}
.switch i { width: 14px; height: 14px; background: var(--muted); transition: transform .2s ease, background .2s ease; }
.switch[aria-checked="true"] { border-color: var(--accent); }
.switch[aria-checked="true"] i { transform: translateX(18px); background: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); color: var(--dark-foreground); }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; }
.ticks li { padding-left: 18px; position: relative; margin: 4px 0; }
.ticks li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.prose p { margin: 0 0 12px; max-width: 70ch; color: var(--dark-foreground); }
.h { font-size: 18px; line-height: 1.3; margin: 0 0 12px; color: var(--foreground); }

/* ── 1 · home ──────────────────────────────────────────── */
.banner-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; overflow: hidden; text-align: center; }
.banner-stage { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
#banner { display: block; cursor: pointer; image-rendering: auto; }
.tagline { margin: 0; max-width: 64ch; color: var(--dark-foreground); font-size: 14px; }
.banner-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.nav-tile .win-inner { transition: background-color .25s ease; }
.nav-tile .win-body { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 12px; padding: 14px 16px; }
.nav-tile b { font-size: 17px; }
.nav-tile span { grid-column: 1; color: var(--muted); font-size: 12px; }
.nav-tile .arrow { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 20px; color: var(--accent); transition: transform .3s cubic-bezier(.2, .9, .2, 1); }
.nav-tile:hover .arrow, .nav-tile:focus-visible .arrow { transform: translateY(4px); }
.nav-tile:hover .win-inner { background: color-mix(in srgb, var(--lighter-background) 90%, transparent); }
.scroll-hint {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); display: none;
}

/* ── 2 · profile ───────────────────────────────────────── */
.fetch { display: flex; flex-direction: column; gap: 16px; }
.fetch-art { position: relative; aspect-ratio: 1; max-height: 46%; align-self: center; width: auto; }
.fetch-art img { display: block; height: 100%; width: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.fetch-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); background: radial-gradient(circle at center, transparent 55%, color-mix(in srgb, var(--background) 70%, transparent)); }
.fetch-title { font-size: 16px; font-weight: 700; color: var(--accent); }
.fetch-title .at { color: var(--foreground); }
.fetch-title span:last-child { color: var(--accent-2); }
.fetch-rule { height: 1px; margin: 6px 0 8px; background: linear-gradient(90deg, var(--accent), transparent); }
.fetch-name { color: var(--foreground); margin-bottom: 6px; }
.fetch-name:empty { display: none; }
.fetch dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; }
.fetch dt { color: var(--accent); font-weight: 700; }
.fetch dd { margin: 0; color: var(--dark-foreground); }
.fetch-colors { display: flex; margin-top: 12px; }
.fetch-colors i { width: 22px; height: 12px; }
.skills { display: grid; gap: 14px; }
.skills .grp .label { margin-bottom: 6px; }
.skills .bar { height: 3px; background: color-mix(in srgb, var(--muted) 25%, transparent); margin: 2px 0 8px; overflow: hidden; }
.skills .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); transition: width 1.1s cubic-bezier(.2, .9, .2, 1); }
.page.seen .skills .bar i { width: var(--w); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.timeline li { position: relative; padding: 0 0 0 16px; border-left: 2px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 8px; height: 8px; background: var(--accent); }
.timeline .when { color: var(--accent-2); font-size: 11px; }
.timeline .what { color: var(--foreground); font-weight: 700; }
.timeline .note { color: var(--muted); font-size: 12px; }

/* ── 3 · vision ────────────────────────────────────────── */
.manifesto { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 28px clamp(18px, 4vw, 56px); overflow: hidden; }
.manifesto::before {
  content: ""; position: absolute; right: -6%; top: 50%; width: min(60%, 520px); aspect-ratio: 1; transform: translateY(-50%);
  background: url("../img/emblem.jpg") center / cover; opacity: .16; mask-image: radial-gradient(circle, black 30%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 68%); pointer-events: none;
}
.manifesto > * { position: relative; }
.kicker { color: var(--muted); margin: 0 0 10px; }
.manifesto h2 {
  margin: 0 0 16px; font-size: clamp(24px, 3.4vw, 50px); line-height: 1.08; letter-spacing: -.02em; max-width: 18ch;
  background: linear-gradient(100deg, var(--foreground) 40%, var(--accent) 70%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.manifesto p:last-child { margin: 0; max-width: 60ch; color: var(--dark-foreground); font-size: 14px; }
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; display: grid; gap: 14px; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; }
.principles li::before { content: counter(p, decimal-leading-zero); grid-row: 1 / 3; color: var(--accent); font-weight: 800; font-size: 15px; }
.principles b { font-size: 14px; }
.principles span { color: var(--dark-foreground); font-size: 12.5px; }
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; height: 100%; }
.roadmap .lane-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.roadmap .lane-col > .label { border-bottom: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); padding-bottom: 6px; }
.roadmap .lane-col[data-l="now"] > .label { color: var(--green); }
.roadmap .lane-col[data-l="next"] > .label { color: var(--yellow); }
.roadmap .lane-col[data-l="later"] > .label { color: var(--cyan); }
.roadmap .item { padding: 8px 10px; background: color-mix(in srgb, var(--lighter-background) 55%, transparent); border-left: 2px solid var(--accent); }
.roadmap .item b { display: block; }
.roadmap .item span { color: var(--muted); font-size: 12px; }

/* ── 4 · software ──────────────────────────────────────── */
.product { cursor: pointer; }
.product .win-body { display: flex; flex-direction: column; gap: 8px; padding: 0; overflow: hidden; }
.product .art { position: relative; flex: 1 1 40%; min-height: 70px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.product .art canvas { display: block; max-width: 92%; max-height: 88%; }
.logo { display: block; object-fit: contain; user-select: none;
  filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent)); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.logo.tint { background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent)));
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; aspect-ratio: 563 / 640; }
.product .p-logo { position: absolute; left: 50%; top: 54%; translate: -50% -50%; width: auto; height: 76%; max-width: 82%; }
.product .p-logo.tint { height: 64%; }
.product:hover .p-logo, .product:focus-within .p-logo { transform: scale(1.06); }
.d-hero { position: relative; }
.d-hero .d-logo { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: auto; height: 70%; max-width: 80%; }
.d-hero .d-logo.tint { height: 58%; }
.product .meta { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.product .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.product .name { font-size: 16px; font-weight: 800; }
.product .ver { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.product .blurb { margin: 0; color: var(--dark-foreground); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.status { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding: 0 6px; border: 1px solid currentColor; }
.status.stable { color: var(--green); } .status.beta { color: var(--cyan); } .status.alpha { color: var(--yellow); } .status.progress { color: var(--magenta); }
.product .more { color: var(--accent); font-size: 12px; margin-top: auto; }
.product:hover .win-inner { background: color-mix(in srgb, var(--lighter-background) 85%, transparent); }
.suite .win-body { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.suite pre { margin: 0; font-size: 11px; line-height: 1.35; color: var(--dark-foreground); overflow: hidden; }
.suite pre .a { color: var(--accent); } .suite pre .b { color: var(--accent-2); } .suite pre .m { color: var(--muted); }

/* product detail */
#detail-scrim { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--darker-background) 60%, transparent); backdrop-filter: blur(3px); }
#detail {
  position: fixed; z-index: 51; left: 50%; top: calc(50% + var(--bar-h) / 2); width: min(980px, calc(100vw - 32px)); height: min(620px, calc(100vh - var(--bar-h) - 32px));
  transform: translate(-50%, -50%); margin: 0;
}
#detail .win-inner { background: color-mix(in srgb, var(--background) 96%, transparent); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; }
.d-hero { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); min-height: 200px; }
.d-hero canvas { max-width: 92%; }
.d-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); }
.d-text p { margin: 0 0 14px; color: var(--dark-foreground); font-size: 14px; }

/* ── 5 · contact ───────────────────────────────────────── */
.term { background: color-mix(in srgb, var(--darker-background) 55%, transparent); }
.term-line { margin: 0 0 10px; }
.term-art { margin: 0 0 14px; }
.term-art canvas { display: block; max-width: 100%; }
.term-line .ps { color: var(--green); }
.term-line .pd { color: var(--blue); margin-left: 4px; }
.term-line .cmd { color: var(--foreground); }
.caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -2px; background: var(--foreground); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.links { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.links a { display: grid; grid-template-columns: 9ch 1fr; gap: 12px; text-decoration: none; color: var(--foreground); padding: 4px 6px; }
.links a:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.links a b { color: var(--accent); }
.links a span { color: var(--muted); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; color: var(--muted); }
.foot { row-gap: 6px; }
.foot > span:not([class]) { flex: 1 1 240px; min-width: 0; font-size: 12px; }
.copyline { margin: 0; flex-basis: 100%; font-size: 12px; color: var(--foreground); }
.copyline .cp { color: var(--muted); } .copyline .co { color: var(--accent-2); }
#c-status.ok { color: var(--green); } #c-status.err { color: var(--red); }

/* ── dots ──────────────────────────────────────────────── */
#dots { position: fixed; z-index: 30; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
#dots button { position: relative; width: 14px; height: 14px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
#dots button i { width: 6px; height: 6px; background: var(--muted); transition: transform .3s ease, background .3s ease; }
#dots button.on i { background: var(--accent); transform: scale(1.6) rotate(45deg); }
#dots button span {
  position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%); opacity: 0; pointer-events: none; white-space: nowrap;
  font-size: 11px; color: var(--foreground); background: var(--dark-background); padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  transition: opacity .2s ease, transform .2s ease;
}
#dots button:hover span, #dots button:focus-visible span { opacity: 1; transform: translate(0, -50%); }
#dots .rail { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); background: color-mix(in srgb, var(--muted) 30%, transparent); z-index: -1; }

/* ── floating windows ──────────────────────────────────── */
.floating { position: fixed; z-index: 45; right: 48px; top: calc(var(--bar-h) + 10px); width: min(380px, calc(100vw - 20px)); max-height: calc(100vh - var(--bar-h) - 20px); }
.floating .win-inner { background: color-mix(in srgb, var(--background) 96%, transparent); }
.curve { height: 46px; margin-top: 8px; border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); padding: 4px; }
.curve svg { width: 100%; height: 100%; display: block; overflow: visible; }
.curve .grid { stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.curve .curve { stroke: var(--accent); stroke-width: 2; fill: none; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.themes button {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: 11px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); background: transparent; color: var(--dark-foreground);
}
.themes button.on { border-color: var(--accent); color: var(--foreground); }
.themes button i { width: 14px; height: 14px; flex: none; }

#help { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: color-mix(in srgb, var(--darker-background) 65%, transparent); backdrop-filter: blur(3px); }
#help .win { width: min(520px, calc(100vw - 32px)); }
.keys-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; align-items: center; }
.keys-list dd { margin: 0; color: var(--dark-foreground); }

#edge-tab {
  position: fixed; z-index: 35; left: 0; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 8px; border: 0;
  background: linear-gradient(var(--angle), var(--accent), var(--accent-2)); color: var(--accent-ink); font-weight: 700; font-size: 12px;
  writing-mode: vertical-rl;
}
#edge-tab .tab-glyph { writing-mode: horizontal-tb; font-size: 15px; }
#toast {
  position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 8px 14px; background: var(--dark-background); border: 1px solid var(--accent); color: var(--foreground);
  transition: opacity .25s ease, transform .25s ease;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.burn-canvas { position: fixed; pointer-events: none; z-index: 60; }
.burn-piece { position: fixed; pointer-events: none; z-index: 59; overflow: hidden; will-change: transform, opacity; }

/* ── smaller screens: windows stack, each page scrolls inside itself ── */
body.stacked .page { overflow-y: auto; padding-bottom: 72px; }
body.stacked .tiles { height: auto; display: flex; flex-direction: column; gap: var(--gaps); }
body.stacked .tiles > .win { position: relative; flex: none; }
body.stacked .tiles.home { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.stacked .tiles.home [data-win="banner"] { grid-column: 1 / -1; min-height: max(320px, calc(100vh - var(--bar-h) - 220px)); }
body.stacked .tiles.software { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
body.stacked .tiles.software > .win { min-height: 300px; }
body.stacked .tiles.vision [data-win="manifesto"] { min-height: 340px; }
body.stacked .tiles.contact [data-win="links"] { min-height: 220px; }
body.stacked .win-body { overflow: visible; }
body.stacked .product .win-body { overflow: hidden; }
body.stacked .fetch { flex-direction: row; flex-wrap: wrap; }
body.stacked .fetch-art { max-height: none; width: min(220px, 100%); }
body.stacked .fetch-info { flex: 1 1 260px; }
body.stacked .scroll-hint { display: none; }
@media (max-width: 1100px) {
  #workspaces button .w { display: none; }
}
@media (max-width: 720px) {
  :root { --gaps: 10px; }
  .page { padding: var(--gaps) calc(var(--gaps) + 20px) 72px var(--gaps); }
  body.stacked .tiles.home { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; overflow: auto; }
  #detail { height: calc(100vh - var(--bar-h) - 24px); }
  #bar .lane.center { display: none; }
  #bar { grid-template-columns: 1fr auto; }
  #preset-chip, #theme-name { display: none; }
  #theme-chip { padding: 0 6px; }
  #workspaces button { padding: 0 7px; }
  #dots { right: 4px; }
  #dots button span { display: none; }
  .field.two { grid-template-columns: 1fr; }
  .floating { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  body.border-loop .win.focus { animation: none; }
  .logo { transition: none; }
}
