/* ============================================================
   chitransh-saxena // personal mainframe
   blood-red terminal console — Syne + Spline Sans Mono
   ============================================================ */

:root {
  /* palette — blood on black */
  --bg:          #0a0708;
  --bg-2:        #110b0d;
  --surface:     #150c0f;
  --surface-2:   #1c1014;
  --ink:         #f6ece9;   /* bright bone */
  --ink-soft:    #ddccc9;   /* bright soft */
  --ink-dim:     #9c8884;   /* muted, red undertone */
  --blood:       #e0102f;   /* primary blood red */
  --blood-bright:#ff2f47;   /* glow / hover */
  --blood-deep:  #5c0a14;   /* deep borders */
  --hairline:    #2c171a;
  --ok:          #3fcf8e;
  --glow-rgb:    224, 16, 47;
  --on-blood:    #fff;

  --display: "Syne", "Arial Black", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;

  --rail-w: 212px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* amber phosphor theme */
[data-theme="amber"] {
  --bg: #0b0803;
  --bg-2: #120d04;
  --surface: #140f05;
  --surface-2: #1b1408;
  --ink: #fdeccb;
  --ink-soft: #e7cfa3;
  --ink-dim: #a48d5f;
  --blood: #ffb000;
  --blood-bright: #ffd35c;
  --blood-deep: #4d3300;
  --hairline: #33270f;
  --glow-rgb: 255, 176, 0;
  --on-blood: #1a1200;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
em { font-style: italic; color: var(--ink); }
::selection { background: var(--blood); color: #120406; }
.dim { color: var(--ink-dim); }
.block { display: block; }
.hot { color: var(--blood-bright); }
.ok { color: var(--ok); }
.mono-acc { color: var(--blood-bright); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- atmosphere ---------- */
.scanlines, .grain, .vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.scanlines {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  opacity: .5; mix-blend-mode: overlay;
}
.grain {
  inset: -50%; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(var(--glow-rgb),.10), transparent 55%),
    radial-gradient(100% 100% at 50% 120%, rgba(0,0,0,.6), transparent 60%);
}

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-content: center; gap: 1.4rem; padding: 2rem;
  transition: opacity .4s var(--ease);
}
.boot.done { opacity: 0; pointer-events: none; }
.boot__log { font-family: var(--mono); font-size: clamp(.8rem, 2.6vw, 1rem); color: var(--ink-soft); line-height: 2; }
.boot__log span { display: block; opacity: 0; transform: translateX(-6px); animation: bootline .35s var(--ease) forwards; }
.boot__log span:nth-child(1){ animation-delay:.05s } .boot__log span:nth-child(2){ animation-delay:.18s }
.boot__log span:nth-child(3){ animation-delay:.31s } .boot__log span:nth-child(4){ animation-delay:.44s }
.boot__log span:nth-child(5){ animation-delay:.57s } .boot__log span:nth-child(6){ animation-delay:.78s }
.boot__log b { color: var(--blood-bright); font-weight: 700; } .boot__log em { color: var(--ok); font-style: normal; }
.boot__ready { color: var(--blood-bright) !important; }
@keyframes bootline { to { opacity: 1; transform: none; } }
.boot__bar { width: min(320px, 70vw); height: 3px; background: var(--hairline); border-radius: 2px; overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 0; background: var(--blood); box-shadow: 0 0 10px var(--blood); animation: bootfill .9s var(--ease) .15s forwards; }
@keyframes bootfill { to { width: 100%; } }

/* ---------- app shell ---------- */
.app {
  position: relative; z-index: 2;
  height: 100dvh; display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; transition: opacity .5s var(--ease);
}
.app.up { opacity: 1; }

/* title bar */
.titlebar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem .9rem; border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  font-size: .82rem;
}
.titlebar__left { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.titlebar__home { padding: 0; background: none; transition: opacity .2s; }
.titlebar__home:hover .titlebar__path b { color: var(--blood-bright); }
.titlebar__home:hover .dots i:first-child { box-shadow: 0 0 14px var(--blood); }
.dots { display: flex; gap: .4rem; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--hairline); }
.dots i:first-child { background: var(--blood); box-shadow: 0 0 8px var(--blood); }
.titlebar__path { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar__path b { color: var(--ink); font-weight: 600; }
.titlebar__right { display: flex; align-items: center; gap: .55rem; }
.clock { color: var(--ink-dim); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
@media (max-width: 560px) { .clock { display: none; } }

.kbd {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: var(--ink-dim);
  border: 1px solid var(--hairline); border-radius: 7px; padding: .28rem .5rem; transition: border-color .2s, color .2s;
}
.kbd:hover { border-color: var(--blood); color: var(--blood-bright); }
.kbd kbd { background: var(--bg-2); border: 1px solid var(--hairline); border-radius: 4px; padding: 0 .28rem; font: inherit; font-size: .72rem; }
.kbd--link { color: var(--ink-soft); }

/* workspace */
.workspace { display: flex; min-height: 0; }

/* nav rail */
.rail {
  width: var(--rail-w); flex-shrink: 0; border-right: 1px solid var(--hairline);
  background: var(--bg-2); padding: 1rem .7rem; display: flex; flex-direction: column; gap: .25rem;
}
.rail__cap { font-size: .68rem; color: var(--ink-dim); padding: 0 .6rem .6rem; letter-spacing: .08em; }
.rail__item {
  display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left;
  padding: .6rem .65rem; border-radius: 8px; color: var(--ink-dim);
  border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s;
}
.rail__item:hover { color: var(--ink); background: var(--surface); }
.rail__k { font-size: .72rem; opacity: .7; }
.rail__l { font-size: .86rem; }
.rail__item.active {
  color: var(--ink); background: linear-gradient(90deg, rgba(var(--glow-rgb),.16), transparent);
  border-color: var(--blood-deep);
}
.rail__item.active .rail__k { color: var(--blood-bright); opacity: 1; }
.rail__item.active::before {
  content: ""; width: 3px; height: 1.1em; background: var(--blood); border-radius: 2px;
  box-shadow: 0 0 8px var(--blood); margin-left: -.65rem; margin-right: -.05rem;
}
.rail__foot { margin-top: auto; padding: .7rem .65rem 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: .4rem; font-size: .72rem; color: var(--ink-dim); }
.live { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-soft); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 2s var(--ease) infinite; }

/* screen */
.screen { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.screen__bar {
  display: flex; align-items: center; gap: 1rem; padding: .55rem .95rem;
  border-bottom: 1px solid var(--hairline); background: var(--bg); font-size: .8rem;
}
.histnav { display: flex; gap: .3rem; }
.hbtn {
  width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 6px;
  border: 1px solid var(--hairline); color: var(--ink-soft); font-size: 1.1rem; line-height: 1; transition: all .18s;
}
.hbtn:hover:not(:disabled) { border-color: var(--blood); color: var(--blood-bright); }
.hbtn:disabled { opacity: .3; cursor: default; }
.crumb { color: var(--ink-dim); }
.crumb b { color: var(--ink); font-weight: 500; }
.crumb .sep { color: var(--blood); margin: 0 .15rem; }
.screen__idx { margin-left: auto; color: var(--blood-bright); font-variant-numeric: tabular-nums; }

.screen__body { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(1.2rem, 3.5vw, 2.6rem); }
.screen__body::-webkit-scrollbar { width: 10px; }
.screen__body::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 6px; border: 3px solid var(--bg); }
.screen__body { scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }

/* views */
.view { display: none; max-width: 1180px; }
.view.active { display: block; animation: viewin .4s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kick { font-size: .76rem; color: var(--blood-bright); letter-spacing: .04em; margin-bottom: 1.2rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 8px; font-size: .85rem; transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s; }
.btn--blood { background: var(--blood); color: var(--on-blood); font-weight: 500; }
.btn--blood:hover { background: var(--blood-bright); transform: translateY(-2px); box-shadow: 0 12px 28px -12px var(--blood); }
.btn--ghost { border: 1px solid var(--hairline); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--blood); color: var(--blood-bright); }

/* ---------- WHOAMI ---------- */
.who { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; max-width: 1000px; padding: clamp(.5rem, 3vh, 2rem) 0; }
@media (max-width: 900px) { .who { grid-template-columns: 1fr; align-items: start; } }
.who__name {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: .92; letter-spacing: -.03em; color: var(--ink); margin: .3rem 0 1rem;
}
.who__name span { color: var(--blood); -webkit-text-stroke: 0; }
.who__role { font-size: .95rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.who__bio { color: var(--ink-soft); max-width: 42ch; margin-bottom: 1.8rem; }
.who__cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.who__panels { display: flex; flex-direction: column; gap: 1.4rem; }

.kv { width: 100%; border: 1px solid var(--hairline); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--surface); }
.kv th, .kv td { text-align: left; padding: .6rem .9rem; font-weight: 400; font-size: .84rem; border-bottom: 1px solid var(--hairline); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }
.kv th { color: var(--ink-dim); width: 6.5rem; border-right: 1px solid var(--hairline); }
.kv td { color: var(--ink); }
.kv .hot { color: var(--blood-bright); }

.telemetry { border: 1px solid var(--hairline); border-radius: 10px; padding: 1rem 1.1rem; background: var(--surface); }
.tele { display: grid; grid-template-columns: 9rem 1fr auto; align-items: center; gap: .8rem; padding: .4rem 0; font-size: .8rem; }
.tele__l { color: var(--ink-dim); }
.tele__bar { height: 7px; background: var(--bg); border: 1px solid var(--hairline); border-radius: 4px; overflow: hidden; }
.tele__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blood-deep), var(--blood)); box-shadow: 0 0 8px var(--blood); transition: width 1s var(--ease); }
.tele__v { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
.tele__v b { color: var(--blood-bright); }

/* live stats grid */
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 9px; overflow: hidden; margin-top: .3rem; }
.stat { background: var(--surface); padding: .9rem 1rem; }
.stat__v { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat__l { display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: var(--ink-dim); margin-top: .4rem; }
.livedot { width: 6px; height: 6px; border-radius: 50%; background: var(--blood); box-shadow: 0 0 8px var(--blood); animation: blink 1.6s var(--ease) infinite; }
.tele-foot { font-size: .68rem; margin-top: .75rem; }

/* ---------- tables: ledger + matrix + links ---------- */
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ledger thead th, .matrix thead th {
  text-align: left; font-weight: 500; color: var(--ink-dim); font-size: .72rem; letter-spacing: .06em;
  padding: .55rem .8rem; border-bottom: 1px solid var(--blood-deep); text-transform: uppercase;
}
.ledger { border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.lrow { border-bottom: 1px solid var(--hairline); transition: background .15s; }
.lrow td { padding: .85rem .8rem; vertical-align: middle; }
.lrow b { color: var(--ink); font-weight: 600; }
.lrow:hover { background: var(--surface); }
.lrow:focus-visible { outline: none; background: var(--surface-2); }
.lrow.open { background: linear-gradient(90deg, rgba(var(--glow-rgb),.12), transparent); }
.sig { color: var(--blood-bright); font-size: .8rem; }
.chev { text-align: right; color: var(--ink-dim); transition: transform .25s var(--ease), color .2s; }
.lrow.open .chev { transform: rotate(90deg); color: var(--blood-bright); }
.ldetail { display: none; }
.ldetail.show { display: table-row; }
.ldetail td { padding: 0; background: var(--bg-2); border-bottom: 1px solid var(--hairline); }
.ldetail__in { padding: 1rem 1.3rem 1.3rem; animation: viewin .3s var(--ease); }
.ldetail__sub { color: var(--blood-bright); font-size: .82rem; margin-bottom: .7rem; }
.ldetail ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.ldetail li { position: relative; padding-left: 1.2rem; color: var(--ink-soft); }
.ldetail li::before { content: "▹"; position: absolute; left: 0; color: var(--blood); }
.ldetail b { color: var(--ink); }
.award { color: var(--blood-bright); }
.tagrow { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tagrow span { font-size: .72rem; color: var(--ink-soft); border: 1px solid var(--hairline); padding: .2rem .55rem; border-radius: 5px; }
.edu { margin-top: 1.2rem; font-size: .8rem; }

.matrix { border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.matrix tbody tr { border-bottom: 1px solid var(--hairline); transition: background .15s; }
.matrix tbody tr:last-child { border-bottom: none; }
.matrix tbody tr:hover { background: var(--surface); }
.matrix td { padding: .8rem; vertical-align: middle; }
.matrix td:nth-child(2) { color: var(--ink); white-space: nowrap; font-weight: 500; }
.num-c { text-align: right; color: var(--blood-bright); width: 3rem; font-variant-numeric: tabular-nums; }
.cells { display: flex; flex-wrap: wrap; gap: .4rem; }
.cells span { font-size: .74rem; color: var(--ink-soft); border: 1px solid var(--hairline); background: var(--bg); padding: .22rem .55rem; border-radius: 5px; transition: border-color .15s, color .15s, transform .15s; }
.cells span:hover { border-color: var(--blood); color: var(--blood-bright); transform: translateY(-1px); }

.prow td { padding: .9rem .8rem; vertical-align: top; }
.prow b { color: var(--ink); }
.proj-name { color: var(--ink); transition: color .18s; }
.proj-name span { color: var(--blood-bright); font-size: .85em; }
.proj-name:hover { color: var(--blood-bright); }
.proj-name:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pending { font-size: .68rem; color: var(--blood-bright); border: 1px solid var(--blood-deep); padding: .15rem .45rem; border-radius: 4px; letter-spacing: .08em; }
.live-tag { font-size: .68rem; color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); padding: .15rem .45rem; border-radius: 4px; letter-spacing: .08em; white-space: nowrap; }
.lnk a { color: var(--ink-soft); margin-right: .8rem; border-bottom: 1px solid var(--hairline); }
.lnk a:hover { color: var(--blood-bright); }
.lnk a[aria-disabled="true"] { color: var(--ink-dim); pointer-events: none; border-bottom: none; }

/* ---------- BUILD ---------- */
.build { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; min-height: 100%; }
@media (max-width: 900px) { .build { grid-template-columns: 1fr; } }
.build__h { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.02; letter-spacing: -.02em; color: var(--ink); margin: .2rem 0 1.1rem; }
.build__copy p { color: var(--ink-soft); max-width: 46ch; }
.build__list { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin: 1.2rem 0; }
.build__list li { padding-left: 1.3rem; position: relative; color: var(--ink-soft); }
.build__list li::before { content: "$"; position: absolute; left: 0; color: var(--blood-bright); }
.build__meta { font-size: .78rem; color: var(--ink-dim) !important; border-left: 2px solid var(--blood); padding-left: .8rem; }
.build__viz { display: flex; flex-direction: column; gap: 1.1rem; }

.pipeline { border: 1px solid var(--hairline); border-radius: 12px; padding: 1rem; background: var(--surface); position: relative; overflow: hidden; }
.pipeline::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 20%, rgba(var(--glow-rgb),.1), transparent 55%); }
.pipeline figcaption { font-size: .7rem; color: var(--ink-dim); margin-bottom: .3rem; position: relative; }
.pipeline svg { width: 100%; height: auto; display: block; }
.pn rect { fill: var(--bg); stroke: var(--hairline); stroke-width: 1.5; }
.pn text { font-family: var(--mono); font-size: 13px; fill: var(--ink-soft); text-anchor: middle; }
.pn--db rect { stroke: var(--ink-dim); } .pn--db text { fill: var(--ink); }
.pn--out rect { stroke: var(--blood); } .pn--out text { fill: var(--blood-bright); }
.packet { fill: var(--blood-bright); filter: drop-shadow(0 0 6px var(--blood)); }

.term { background: #070506; border: 1px solid var(--hairline); border-radius: 11px; overflow: hidden; }
.term__bar { display: flex; align-items: center; gap: .45rem; padding: .6rem .9rem; background: var(--bg-2); border-bottom: 1px solid var(--hairline); font-size: .7rem; color: var(--ink-dim); }
.term__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline); }
.term__bar span:first-child { background: var(--blood); }
.term__bar b { margin-left: auto; font-weight: 400; }
.term__body { font-size: .78rem; line-height: 1.85; padding: 1rem 1.1rem; color: var(--ink-soft); white-space: pre-wrap; }
.c-p { color: var(--ok); } .c-c { color: var(--blood-bright); } .c-f { color: var(--ink); } .c-ok { color: var(--ok); } .c-dim { color: var(--ink-dim); }
.c-cur { color: var(--blood-bright); animation: blink 1.1s step-end infinite; }

/* ---------- CONTACT ---------- */
.contact { max-width: 720px; }
.contact__h { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); margin: .2rem 0 1.6rem; }
.contact__h span { color: var(--blood); }
.contact__mail { display: inline-flex; align-items: center; gap: .8rem; font-size: clamp(1rem, 3vw, 1.5rem); color: var(--ink); border: 1px solid var(--hairline); padding: .7rem 1.1rem; border-radius: 9px; transition: border-color .2s, color .2s; }
.contact__mail:hover { border-color: var(--blood); color: var(--blood-bright); }
.contact__mail .copy { font-size: .72rem; color: var(--ink-dim); }
.links { margin-top: 2rem; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.links td { padding: .7rem .9rem; border-bottom: 1px solid var(--hairline); }
.links tr:last-child td { border-bottom: none; }
.links td:nth-child(2) { color: var(--ink-dim); width: 8rem; }
.links a { color: var(--ink); border-bottom: 1px solid var(--blood-deep); }
.links a:hover { color: var(--blood-bright); }

/* ---------- status bar ---------- */
.statusbar {
  display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem;
  border-top: 1px solid var(--hairline); background: var(--bg-2); font-size: .72rem; color: var(--ink-dim);
  overflow: hidden;
}
.sb { white-space: nowrap; }
.sb--blood { background: var(--blood); color: var(--on-blood); padding: .15rem .55rem; border-radius: 4px; display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
.sb--blood .blink { width: 6px; height: 6px; border-radius: 50%; background: var(--on-blood); animation: blink 1.4s step-end infinite; }
.sb--grow { flex: 1; }
.sb.hint { color: var(--ink-dim); }
.sb.hint kbd { background: var(--surface); border: 1px solid var(--hairline); border-radius: 3px; padding: 0 .3rem; color: var(--ink-soft); }
@media (max-width: 760px) { .sb.hint { display: none; } .sb.hint:last-child { display: inline; } }

@keyframes blink { 50% { opacity: .25; } }

/* ---------- command palette ---------- */
.cmdk { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 13vh 1rem 1rem; background: rgba(5,3,4,.66); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.cmdk[data-open="true"] { display: flex; animation: cmdkin .15s var(--ease); }
@keyframes cmdkin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cmdk__panel { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--blood-deep); border-radius: 12px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(var(--glow-rgb),.08); }
.cmdk__input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--hairline); color: var(--ink); font-family: var(--mono); font-size: 1rem; padding: 1rem 1.2rem; outline: none; }
.cmdk__input::placeholder { color: var(--ink-dim); }
.cmdk__list { list-style: none; max-height: 52vh; overflow-y: auto; padding: .45rem; }
.cmdk__item { display: flex; align-items: center; gap: .8rem; padding: .65rem .85rem; border-radius: 8px; cursor: pointer; color: var(--ink-soft); }
.cmdk__item .ico { color: var(--blood-bright); width: 1.3em; text-align: center; font-size: .8rem; }
.cmdk__item .meta { margin-left: auto; font-size: .7rem; color: var(--ink-dim); }
.cmdk__item[aria-selected="true"] { background: var(--bg-2); color: var(--ink); box-shadow: inset 2px 0 0 var(--blood); }
.cmdk__empty { padding: 1.2rem; text-align: center; color: var(--ink-dim); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 4rem; left: 50%; z-index: 110; transform: translateX(-50%) translateY(16px); opacity: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--blood-deep); color: var(--ink); padding: .6rem 1.1rem; border-radius: 999px; font-size: .8rem; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: var(--blood-bright); }

:focus-visible { outline: 2px solid var(--blood); outline-offset: 2px; border-radius: 3px; }

/* ---------- responsive: rail → top tabs ---------- */
@media (max-width: 820px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .workspace { flex-direction: column; }
  .rail {
    width: 100%; flex-direction: row; gap: .4rem; overflow-x: auto; padding: .6rem .7rem;
    border-right: none; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 10;
    background: var(--bg-2);
  }
  .rail__cap, .rail__foot { display: none; }
  .rail__item { flex-shrink: 0; padding: .5rem .8rem; }
  .rail__item.active::before { display: none; }
  .rail__l { font-size: .8rem; }
  .screen__body { overflow: visible; }
  .who, .build { min-height: 0; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .boot { display: none; }
  .packet { display: none; }
}
