﻿:root {
  --black: #020000;
  --black-2: #090101;
  --panel: rgba(7, 0, 1, 0.94);
  --panel-2: rgba(16, 0, 2, 0.95);
  --yellow: #ff1a22;
  --cyan: #ff3a42;
  --magenta: #b40010;
  --red: #ff000c;
  --green: #ff555c;
  --text: #ffb8bc;
  --muted: #8b3035;
  --line: rgba(255, 0, 20, 0.44);
  --shadow: rgba(0, 0, 0, 0.78);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--red) rgba(255, 0, 18, 0.08);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.16) 0 5px, rgba(0, 0, 0, 0.55) 5px 10px),
    rgba(0, 0, 0, 0.72);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(0, 0, 0, 0.72);
  background: linear-gradient(180deg, var(--yellow), var(--red));
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-width: 320px;
  color: var(--text);
  font-family: "Bahnschrift", "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 0, 18, 0.25), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(255, 0, 18, 0.2), transparent 32%),
    radial-gradient(circle at 64% 78%, rgba(255, 0, 18, 0.14), transparent 26%),
    linear-gradient(135deg, #020304, #0c1015 48%, #030405);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.34;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(255, 0, 18, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(255, 49, 72, 0.08), transparent 35%, rgba(255, 0, 18, 0.08));
}

body::after {
  opacity: 0.36;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(255, 0, 18, 0.08) 7% 7.2%, transparent 7.2% 19%, rgba(255, 0, 18, 0.08) 19% 19.25%, transparent 19.25%),
    linear-gradient(0deg, transparent 0 11%, rgba(255, 0, 18, 0.08) 11% 11.25%, transparent 11.25% 47%, rgba(255, 0, 18, 0.08) 47% 47.2%, transparent 47.2%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 0, 18, 0.08);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

button:hover {
  color: #050506;
  border-color: var(--yellow);
  background: var(--yellow);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 0, 18, 0.48);
  outline-offset: 2px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.os-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  padding: 10px 10px 0;
}

.desktop {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 0, 18, 0.42);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 0, 18, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(255, 0, 18, 0.04), transparent 24%, rgba(255, 0, 18, 0.06)),
    rgba(0, 0, 0, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 0, 18, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.52);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.desktop::before {
  content: "LOCAL TERMINAL // PLACEHOLDER MODE";
  position: absolute;
  right: 16px;
  top: 12px;
  z-index: 0;
  color: rgba(255, 0, 18, 0.7);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.circuit-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.72;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 0, 18, 0.4) 8% 8.16%, transparent 8.16% 27%, rgba(255, 0, 18, 0.35) 27% 27.14%, transparent 27.14% 65%, rgba(255, 0, 18, 0.32) 65% 65.18%, transparent 65.18%),
    linear-gradient(0deg, transparent 0 14%, rgba(255, 0, 18, 0.28) 14% 14.16%, transparent 14.16% 38%, rgba(255, 0, 18, 0.24) 38% 38.2%, transparent 38.2% 82%, rgba(255, 49, 72, 0.3) 82% 82.18%, transparent 82.18%);
}

.circuit-field::before,
.circuit-field::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 0, 18, 0.28);
  box-shadow: 0 0 18px rgba(255, 0, 18, 0.18);
}

.circuit-field::before {
  left: 7%;
  top: 18%;
  width: 36%;
  height: 28%;
  clip-path: polygon(0 0, 72% 0, 72% 26%, 100% 26%, 100% 100%, 18% 100%, 18% 62%, 0 62%);
}

.circuit-field::after {
  right: 8%;
  bottom: 16%;
  width: 42%;
  height: 36%;
  clip-path: polygon(0 18%, 32% 18%, 32% 0, 100% 0, 100% 72%, 78% 72%, 78% 100%, 0 100%);
}

.desktop-icons {
  position: absolute;
  left: 18px;
  top: 42px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 86px);
  gap: 14px;
}

.desktop-icon {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 86px;
  min-height: 82px;
  padding: 8px 5px;
  color: var(--text);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 0, 18, 0.12), rgba(255, 0, 18, 0.08)),
    rgba(4, 6, 8, 0.76);
}

.desktop-icon svg {
  width: 1.8rem;
  height: 1.8rem;
  color: var(--yellow);
}

.desktop-icon span {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.window {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 0, 18, 0.52);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 0, 18, 0.08), transparent 30%, rgba(255, 0, 18, 0.08)),
    var(--panel);
  box-shadow:
    0 24px 58px var(--shadow),
    inset 0 0 0 1px rgba(255, 0, 18, 0.1);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition:
    left 220ms cubic-bezier(0.22, 1, 0.36, 1),
    top 220ms cubic-bezier(0.22, 1, 0.36, 1),
    width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 160ms ease;
}

.window.is-minimized {
  display: none;
}

.window.is-maximized {
  box-shadow: 0 0 0 1px var(--yellow), 0 30px 90px rgba(0, 0, 0, 0.72);
}

.desktop.is-interacting .window {
  transition: none;
}

.window-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px 8px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.95) 0 10px, rgba(0, 0, 0, 0.9) 10px 20px),
    var(--yellow);
  color: #030304;
}

.window-header:active {
  cursor: grabbing;
}

.window-header strong,
.window-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-header strong {
  font-size: 0.86rem;
  text-transform: uppercase;
}

.window-header small {
  color: rgba(3, 3, 4, 0.74);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.78);
  color: var(--cyan);
}

.window-controls {
  display: inline-flex;
  gap: 5px;
}

.window-control {
  display: grid;
  place-items: center;
  width: 30px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(0, 0, 0, 0.64);
  color: #030304;
  background: rgba(255, 0, 18, 0.16);
  font-weight: 900;
}

.window-control:hover {
  color: var(--yellow);
  background: #030304;
}

.window-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.window-resizer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 45%, var(--yellow) 45% 53%, transparent 53%),
    linear-gradient(135deg, transparent 0 66%, var(--cyan) 66% 74%, transparent 74%);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1.1fr);
  gap: 12px;
}

.id-card,
.danger-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div {
  border: 1px solid rgba(255, 0, 18, 0.24);
  background: rgba(0, 0, 0, 0.34);
}

.id-card {
  padding: 12px;
  border-color: rgba(255, 0, 18, 0.48);
}

.eyebrow,
.danger-card span,
.job-board span {
  margin: 0 0 0.35rem;
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.55rem;
  color: var(--cyan);
  font-size: 2rem;

/* Admin sleek editor styles */
body.no-crt #crtCanvas {
  display: none !important;
}

body.admin-sleek {
  background: #07070a;
  color: #e6eef6;
  --panel: #0b0b0f;
  --panel-2: #0b0b0f;
  --yellow: #7fffd4;
  --cyan: #9be7ff;
  --magenta: #9be7ff;
  --red: #ff6b6b;
  --green: #8affc1;
  --text: #e6eef6;
  --muted: #7b8a92;
  --line: rgba(255,255,255,0.06);
  --shadow: rgba(0,0,0,0.6);
}

body.admin-sleek .desktop {
  background: linear-gradient(180deg,#040405,#0b0b0f);
  border-color: rgba(255,255,255,0.04);
  box-shadow: none;
}

body.admin-sleek button {
  background: transparent;
  border-color: rgba(255,255,255,0.06);
  color: var(--text);
  transition: none;
}

body.admin-sleek button.is-active {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

/* Admin toolbar in terminal header */
.admin-toolbar {
  display: inline-block;
  margin-left: 12px;
}
.admin-toolbar .admin-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
.admin-toolbar button {
  padding: 6px 8px;
  font-size: 0.78rem;
  border-radius: 6px;
}

/* Make forms more comfortable in sleek mode */
body.admin-sleek input[type="text"],
body.admin-sleek textarea {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 10px;
  font-size: 0.98rem;
}

body.admin-sleek textarea { min-height: 120px; }
  line-height: 0.95;
  text-transform: uppercase;
}

p {
  margin-top: 0;
  color: rgba(244, 248, 255, 0.78);
  line-height: 1.45;
}

.profile-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.profile-list div {
  padding: 8px;
}

.profile-list dt {
  color: var(--magenta);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-list dd {
  margin: 0.12rem 0 0;
  color: var(--text);
}

.stat-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 9px;
}

.stat-matrix article {
  min-height: 110px;
  padding: 10px;
}

.stat-matrix span {
  display: block;
  color: var(--magenta);
  font-size: 0.7rem;
  font-weight: 900;
}

.stat-matrix strong {
  display: block;
  margin: 0.25rem 0;
  color: var(--yellow);
  font-size: 2rem;
  line-height: 1;
}

.stat-matrix em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-cloud span {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 0, 18, 0.28);
  color: var(--yellow);
  background: rgba(255, 0, 18, 0.08);
  font-size: 0.74rem;
  font-weight: 800;
}

.flow-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.2rem;
}

.flow-list li {
  padding: 0.55rem;
  border-left: 3px solid var(--cyan);
  background: rgba(255, 0, 18, 0.06);
  color: rgba(244, 248, 255, 0.82);
}

.flow-list strong {
  color: var(--yellow);
}

.danger-card {
  margin-top: 12px;
  padding: 12px;
  border-color: rgba(255, 49, 72, 0.7);
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.12) 0 8px, rgba(0, 0, 0, 0.12) 8px 16px),
    rgba(255, 49, 72, 0.12);
}

.net-grid,
.job-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.net-grid article,
.job-board article {
  padding: 10px;
}

.net-grid strong,
.job-board strong {
  display: block;
  color: var(--cyan);
  text-transform: uppercase;
}

.net-grid p,
.job-board p {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
}

.loadout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.loadout-table th,
.loadout-table td {
  padding: 0.52rem;
  border: 1px solid rgba(255, 0, 18, 0.2);
  text-align: left;
}

.loadout-table th {
  color: var(--yellow);
  background: rgba(255, 0, 18, 0.08);
  text-transform: uppercase;
}

.notes-grid {
  display: grid;
  gap: 12px;
}

.notes-grid label {
  display: grid;
  gap: 6px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

textarea,
input {
  width: 100%;
  border: 1px solid rgba(255, 0, 18, 0.32);
  color: var(--text);
  background: rgba(0, 0, 0, 0.46);
}

textarea {
  min-height: 120px;
  resize: vertical;
  padding: 0.75rem;
  line-height: 1.45;
}

input {
  min-height: 38px;
  padding: 0.45rem 0.65rem;
}

.rules-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.rules-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border-right: 1px solid rgba(255, 0, 18, 0.28);
  background: rgba(0, 0, 0, 0.22);
}

.rules-nav button {
  justify-content: start;
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  text-align: left;
}

.rules-nav button.is-active {
  color: #050506;
  background: var(--yellow);
}

.rules-content {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.rules-content h2 {
  margin: 0 0 0.55rem;
  color: var(--cyan);
  font-size: 1.35rem;
  text-transform: uppercase;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.rule-card {
  padding: 10px;
  border: 1px solid rgba(255, 0, 18, 0.24);
  background: rgba(255, 0, 18, 0.06);
}

.rule-card strong {
  color: var(--yellow);
  text-transform: uppercase;
}

.rule-card p {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
}

.taskbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 58px;
  padding: 7px 0;
}

.start-button {
  display: grid;
  grid-template-columns: 32px auto;
  align-items: center;
  gap: 8px;
  min-width: 174px;
  padding: 0.4rem 0.7rem;
  color: #050506;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.95) 0 9px, rgba(0, 0, 0, 0.92) 9px 18px),
    var(--yellow);
  border-color: var(--yellow);
  text-align: left;
}

.start-button:hover {
  color: var(--yellow);
  background: #050506;
}

.start-button strong,
.start-button small {
  display: block;
  line-height: 1;
}

.start-button strong {
  font-size: 0.88rem;
}

.start-button small {
  margin-top: 0.18rem;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.taskbar-items {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.taskbar-app {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 7px;
  min-width: 124px;
  max-width: 164px;
  padding: 0.35rem 0.55rem;
}

.taskbar-app.is-active {
  border-color: var(--yellow);
  background: rgba(255, 0, 18, 0.2);
}

.taskbar-app.is-minimized {
  opacity: 0.62;
}

.taskbar-app span {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.start-menu {
  position: fixed;
  left: 10px;
  bottom: 68px;
  z-index: 40;
  width: min(430px, calc(100vw - 20px));
  max-height: min(640px, calc(100vh - 88px));
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 0, 18, 0.62);
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(5, 5, 6, 0.98), rgba(20, 24, 28, 0.96)),
    var(--black);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.start-menu[hidden] {
  display: none;
}

.start-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 0, 18, 0.26);
  background: rgba(255, 0, 18, 0.06);
}

.start-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  background: rgba(255, 0, 18, 0.08);
}

.start-card strong,
.start-card span {
  display: block;
}

.start-card span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.start-search {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 0, 18, 0.34);
  background: rgba(0, 0, 0, 0.34);
}

.start-search svg {
  color: var(--yellow);
}

.start-actions,
.start-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.start-actions button {
  padding: 0 0.7rem;
}

.start-status span {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 0, 18, 0.24);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.74rem;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.start-grid button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 0.45rem;
  text-align: left;
}

.start-grid button[hidden],
.empty-result[hidden] {
  display: none;
}

.start-grid strong,
.start-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-grid small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.empty-result {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem;
  border: 1px dashed rgba(255, 0, 18, 0.34);
  color: var(--muted);
}

/* Dense mono terminal skin */
body {
  color: var(--text);
  font-family: "Consolas", "Lucida Console", "Bahnschrift", monospace;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 0, 18, 0.18), transparent 22%),
    radial-gradient(circle at 82% 82%, rgba(255, 0, 18, 0.11), transparent 28%),
    linear-gradient(135deg, #020000 0%, #080101 48%, #000 100%);
}

body::before {
  opacity: 0.42;
  background:
    repeating-linear-gradient(0deg, rgba(255, 0, 18, 0.08) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 0, 18, 0.045) 0 1px, transparent 1px 11px),
    linear-gradient(90deg, rgba(255, 0, 18, 0.12), transparent 38%, rgba(255, 0, 18, 0.08));
}

body::after {
  opacity: 0.56;
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(255, 0, 18, 0.28) 5% 5.12%, transparent 5.12% 18%, rgba(255, 0, 18, 0.22) 18% 18.16%, transparent 18.16% 42%, rgba(255, 0, 18, 0.2) 42% 42.12%, transparent 42.12%),
    linear-gradient(0deg, transparent 0 9%, rgba(255, 0, 18, 0.2) 9% 9.12%, transparent 9.12% 31%, rgba(255, 0, 18, 0.16) 31% 31.14%, transparent 31.14% 69%, rgba(255, 0, 18, 0.2) 69% 69.12%, transparent 69.12%);
}

button {
  min-height: 30px;
  border-color: rgba(255, 0, 18, 0.62);
  color: var(--text);
  background: rgba(255, 0, 18, 0.055);
  clip-path: polygon(0 6px, 6px 0, calc(100% - 18px) 0, calc(100% - 11px) 5px, 100% 5px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 12px 100%, 8px calc(100% - 4px), 0 calc(100% - 4px));
}

button:hover {
  color: #050000;
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 0, 18, 0.48);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline-color: rgba(255, 0, 18, 0.68);
}

svg {
  stroke-width: 1.65;
}

.os-shell {
  padding: 6px 6px 0;
}

.desktop {
  border-color: rgba(255, 0, 18, 0.58);
  background:
    linear-gradient(90deg, rgba(255, 0, 18, 0.08), transparent 8%, transparent 82%, rgba(255, 0, 18, 0.08)),
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.04) 0 1px, transparent 1px 13px),
    #020000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 0, 18, 0.2),
    inset 0 0 46px rgba(255, 0, 18, 0.08),
    0 22px 62px rgba(0, 0, 0, 0.82);
  clip-path: polygon(0 0, calc(100% - 26px) 0, calc(100% - 18px) 6px, 100% 6px, 100% calc(100% - 18px), calc(100% - 10px) 100%, 22px 100%, 16px calc(100% - 6px), 0 calc(100% - 6px));
}

.desktop::before {
  right: 10px;
  top: 8px;
  color: rgba(255, 0, 18, 0.78);
  font-size: 0.64rem;
  text-shadow: 0 0 10px rgba(255, 0, 18, 0.7);
}

.desktop::after {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 1px solid rgba(255, 0, 18, 0.16);
  clip-path: polygon(0 0, 31% 0, 31% 8px, 45% 8px, 45% 0, 100% 0, 100% 36%, calc(100% - 10px) 36%, calc(100% - 10px) 64%, 100% 64%, 100% 100%, 58% 100%, 58% calc(100% - 8px), 39% calc(100% - 8px), 39% 100%, 0 100%);
}

.circuit-field {
  opacity: 0.86;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(255, 0, 18, 0.46) 6% 6.08%, transparent 6.08% 17%, rgba(255, 0, 18, 0.34) 17% 17.08%, transparent 17.08% 33%, rgba(255, 0, 18, 0.3) 33% 33.08%, transparent 33.08% 72%, rgba(255, 0, 18, 0.4) 72% 72.1%, transparent 72.1%),
    linear-gradient(0deg, transparent 0 13%, rgba(255, 0, 18, 0.35) 13% 13.08%, transparent 13.08% 25%, rgba(255, 0, 18, 0.22) 25% 25.1%, transparent 25.1% 58%, rgba(255, 0, 18, 0.28) 58% 58.1%, transparent 58.1% 86%, rgba(255, 0, 18, 0.32) 86% 86.08%, transparent 86.08%);
}

.circuit-field::before,
.circuit-field::after {
  border-color: rgba(255, 0, 18, 0.42);
  box-shadow: 0 0 22px rgba(255, 0, 18, 0.24);
}

.circuit-field::before {
  left: 5%;
  top: 12%;
  width: 43%;
  height: 34%;
  clip-path: polygon(0 0, 18% 0, 22% 8%, 54% 8%, 58% 0, 86% 0, 86% 13%, 100% 13%, 100% 82%, 92% 82%, 92% 100%, 16% 100%, 16% 88%, 0 88%);
}

.circuit-field::after {
  right: 5%;
  bottom: 12%;
  width: 48%;
  height: 42%;
  clip-path: polygon(0 12%, 14% 12%, 18% 0, 72% 0, 76% 9%, 100% 9%, 100% 46%, 92% 46%, 92% 72%, 100% 72%, 100% 100%, 48% 100%, 44% 91%, 0 91%);
}

.desktop-icons {
  left: 12px;
  top: 30px;
  grid-template-columns: repeat(2, 64px);
  gap: 8px;
}

.desktop-icon {
  gap: 4px;
  width: 64px;
  min-height: 58px;
  padding: 5px 4px;
  border-color: rgba(255, 0, 18, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 0, 18, 0.14), transparent 52%),
    rgba(3, 0, 0, 0.78);
  clip-path: polygon(0 7px, 7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

.desktop-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--red);
}

.desktop-icon span {
  font-size: 0.58rem;
}

.window {
  min-width: 230px;
  min-height: 160px;
  border-color: rgba(255, 0, 18, 0.58);
  background:
    linear-gradient(90deg, rgba(255, 0, 18, 0.1), transparent 15%, transparent 82%, rgba(255, 0, 18, 0.08)),
    repeating-linear-gradient(0deg, rgba(255, 0, 18, 0.035) 0 1px, transparent 1px 7px),
    var(--panel);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.74),
    inset 0 0 0 1px rgba(255, 0, 18, 0.14),
    inset 0 0 28px rgba(255, 0, 18, 0.06);
  clip-path: polygon(0 10px, 10px 0, 34% 0, 38% 6px, 62% 6px, 66% 0, calc(100% - 11px) 0, 100% 11px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 20% 100%, 16% calc(100% - 6px), 0 calc(100% - 6px));
}

.window::before,
.window::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-color: rgba(255, 0, 18, 0.54);
}

.window::before {
  left: 8px;
  right: 8px;
  top: 4px;
  height: 5px;
  border-top: 1px solid;
  border-left: 1px solid;
  border-right: 1px solid;
  clip-path: polygon(0 0, 34% 0, 38% 100%, 62% 100%, 66% 0, 100% 0, 100% 100%, 0 100%);
}

.window::after {
  right: 7px;
  bottom: 7px;
  width: 54px;
  height: 10px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.window.is-maximized {
  box-shadow: 0 0 0 1px var(--red), 0 22px 70px rgba(0, 0, 0, 0.86);
}

.window-header {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 6px;
  min-height: 34px;
  padding: 3px 5px 3px 6px;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 0, 18, 0.44), rgba(255, 0, 18, 0.16) 22%, rgba(255, 0, 18, 0.06) 58%, rgba(255, 0, 18, 0.32)),
    #070000;
  border-bottom: 1px solid rgba(255, 0, 18, 0.48);
}

.window-header strong {
  color: #ff2932;
  font-size: 0.72rem;
  text-shadow: 0 0 8px rgba(255, 0, 18, 0.7);
}

.window-header small {
  color: rgba(255, 122, 128, 0.72);
  font-size: 0.55rem;
}

.app-mark {
  width: 24px;
  height: 24px;
  border-color: rgba(255, 0, 18, 0.72);
  color: var(--red);
  background: rgba(0, 0, 0, 0.84);
  clip-path: polygon(0 6px, 6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.app-mark svg {
  width: 0.95rem;
  height: 0.95rem;
}

.window-controls {
  gap: 3px;
}

.window-control {
  width: 24px;
  min-height: 22px;
  border-color: rgba(255, 0, 18, 0.68);
  color: var(--text);
  background: rgba(255, 0, 18, 0.08);
}

.window-control:hover {
  color: #050000;
  background: var(--red);
}

.window-body {
  padding: 8px;
  font-size: 0.82rem;
}

.window-resizer {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(255, 0, 18, 0.9) 45% 53%, transparent 53%),
    linear-gradient(135deg, transparent 0 66%, rgba(255, 0, 18, 0.55) 66% 74%, transparent 74%);
}

.profile-grid {
  grid-template-columns: minmax(120px, 0.9fr) minmax(140px, 1.1fr);
  gap: 7px;
}

.id-card,
.danger-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div,
.rule-card {
  border-color: rgba(255, 0, 18, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 0, 18, 0.08), transparent 62%),
    rgba(0, 0, 0, 0.38);
  clip-path: polygon(0 7px, 7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

.id-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div,
.rule-card {
  padding: 7px;
}

.eyebrow,
.danger-card span,
.job-board span,
.profile-list dt,
.stat-matrix span,
.tag-cloud span,
.notes-grid label,
.rule-card strong {
  color: #ff2932;
  font-size: 0.58rem;
  text-shadow: 0 0 8px rgba(255, 0, 18, 0.5);
}

h1 {
  color: #ff333b;
  font-size: 1.35rem;
  text-shadow: 0 0 12px rgba(255, 0, 18, 0.7);
}

p,
.profile-list dd,
.stat-matrix em,
.net-grid p,
.job-board p,
.rule-card p {
  color: rgba(255, 184, 188, 0.76);
}

.stat-matrix {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}

.stat-matrix article {
  min-height: 82px;
}

.stat-matrix strong {
  margin: 0.12rem 0;
  color: #ff333b;
  font-size: 1.45rem;
}

.tag-cloud {
  gap: 5px;
  margin-top: 8px;
}

.tag-cloud span {
  padding: 0.24rem 0.42rem;
  border-color: rgba(255, 0, 18, 0.36);
  background: rgba(255, 0, 18, 0.08);
}

.flow-list {
  gap: 6px;
  padding-left: 1rem;
}

.flow-list li {
  padding: 0.38rem;
  border-left-color: var(--red);
  background: rgba(255, 0, 18, 0.06);
}

.flow-list strong,
.net-grid strong,
.job-board strong,
.loadout-table th,
.rules-content h2 {
  color: #ff2932;
}

.danger-card {
  margin-top: 8px;
  padding: 8px;
  border-color: rgba(255, 0, 18, 0.7);
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.2) 0 7px, rgba(0, 0, 0, 0.2) 7px 14px),
    rgba(255, 0, 18, 0.08);
}

.net-grid,
.job-board {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 7px;
}

.loadout-table {
  font-size: 0.76rem;
}

.loadout-table th,
.loadout-table td {
  padding: 0.34rem;
  border-color: rgba(255, 0, 18, 0.24);
}

.loadout-table th {
  background: rgba(255, 0, 18, 0.09);
}

.notes-grid {
  gap: 8px;
}

textarea,
input {
  border-color: rgba(255, 0, 18, 0.42);
  color: var(--text);
  background: rgba(0, 0, 0, 0.58);
}

textarea {
  min-height: 84px;
  padding: 0.5rem;
}

input {
  min-height: 30px;
  padding: 0.35rem 0.48rem;
}

.rules-layout {
  grid-template-columns: 136px minmax(0, 1fr);
}

.rules-nav {
  gap: 3px;
  padding: 6px;
  border-right-color: rgba(255, 0, 18, 0.34);
}

.rules-nav button {
  min-height: 28px;
  padding: 0.32rem 0.4rem;
  font-size: 0.68rem;
}

.rules-nav button.is-active {
  color: #050000;
  background: var(--red);
}

.rules-content {
  padding: 8px;
}

.rules-content h2 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.rule-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.taskbar {
  min-height: 42px;
  gap: 5px;
  padding: 5px 0;
}

.start-button {
  grid-template-columns: 24px auto;
  min-width: 138px;
  min-height: 32px;
  padding: 0.25rem 0.48rem;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 0, 18, 0.5), rgba(255, 0, 18, 0.12)),
    #060000;
  border-color: rgba(255, 0, 18, 0.72);
}

.start-button:hover {
  color: #050000;
  background: var(--red);
}

.start-button strong {
  font-size: 0.72rem;
}

.start-button small {
  font-size: 0.54rem;
}

.taskbar-items {
  gap: 5px;
}

.taskbar-app {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 5px;
  min-width: 92px;
  max-width: 126px;
  min-height: 32px;
  padding: 0.22rem 0.38rem;
}

.taskbar-app span {
  font-size: 0.6rem;
}

.taskbar-app.is-active {
  border-color: var(--red);
  background: rgba(255, 0, 18, 0.18);
}

.start-menu {
  bottom: 50px;
  width: min(360px, calc(100vw - 14px));
  padding: 8px;
  border-color: rgba(255, 0, 18, 0.66);
  background:
    linear-gradient(145deg, rgba(8, 0, 1, 0.98), rgba(0, 0, 0, 0.96)),
    var(--black);
  clip-path: polygon(0 10px, 10px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 12px calc(100% - 6px), 0 calc(100% - 6px));
}

.start-card {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding: 7px;
  border-color: rgba(255, 0, 18, 0.32);
}

.start-avatar {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 0, 18, 0.7);
  color: var(--red);
  background: rgba(255, 0, 18, 0.08);
}

.start-card span {
  font-size: 0.7rem;
}

.start-search {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  margin-top: 7px;
  padding: 5px;
  border-color: rgba(255, 0, 18, 0.34);
}

.start-search svg {
  color: var(--red);
}

.start-actions,
.start-status {
  gap: 5px;
  margin-top: 7px;
}

.start-actions button {
  min-height: 28px;
  padding: 0 0.5rem;
  font-size: 0.7rem;
}

.start-status span {
  padding: 0.24rem 0.4rem;
  border-color: rgba(255, 0, 18, 0.28);
  font-size: 0.64rem;
}

.start-grid {
  gap: 6px;
  margin-top: 8px;
}

.start-grid button {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 6px;
  min-height: 46px;
  padding: 0.32rem;
}

.start-grid small {
  font-size: 0.58rem;
}

.empty-result {
  padding: 0.5rem;
  border-color: rgba(255, 0, 18, 0.34);
}

/* Polygon-safe edges: regular borders/outlines leak rectangular pixels around clip-path corners. */
button,
.desktop,
.desktop-icon,
.window,
.app-mark,
.id-card,
.danger-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div,
.rule-card,
.start-button,
.taskbar-app,
.start-menu,
.start-card,
.start-avatar,
.start-search,
.start-status span,
.start-grid button,
.empty-result {
  border: 0 !important;
  outline: 0;
  box-shadow: none;
}

button,
.desktop-icon,
.app-mark,
.id-card,
.danger-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div,
.rule-card,
.start-button,
.taskbar-app,
.start-menu,
.start-card,
.start-avatar,
.start-search,
.start-status span,
.start-grid button,
.empty-result {
  filter:
    drop-shadow(0 0 0.75px rgba(255, 0, 18, 0.92))
    drop-shadow(0 0 5px rgba(255, 0, 18, 0.12));
}

.desktop,
.window {
  filter:
    drop-shadow(0 0 0.85px rgba(255, 0, 18, 0.9))
    drop-shadow(0 0 12px rgba(255, 0, 18, 0.12))
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.72));
}

button:hover,
.desktop-icon:hover,
.taskbar-app:hover,
.start-grid button:hover {
  box-shadow: none;
  filter:
    drop-shadow(0 0 1px rgba(255, 0, 18, 1))
    drop-shadow(0 0 12px rgba(255, 0, 18, 0.42));
}

button:focus-visible {
  outline: 0;
  box-shadow: none;
  filter:
    drop-shadow(0 0 1px rgba(255, 0, 18, 1))
    drop-shadow(0 0 16px rgba(255, 0, 18, 0.52));
}

input:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 0, 18, 0.82), 0 0 14px rgba(255, 0, 18, 0.35);
}

.desktop-icon:focus-visible,
.taskbar-app:focus-visible,
.start-button:focus-visible,
.start-grid button:focus-visible,
.window-control:focus-visible {
  box-shadow: none;
  filter:
    drop-shadow(0 0 1px rgba(255, 0, 18, 1))
    drop-shadow(0 0 16px rgba(255, 0, 18, 0.52));
}

.window.is-maximized {
  box-shadow: none;
  filter:
    drop-shadow(0 0 1px rgba(255, 0, 18, 1))
    drop-shadow(0 0 18px rgba(255, 0, 18, 0.22))
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.78));
}

/* Real clipped outlines: the border is a pseudo-layer using the parent polygon. */
button,
.desktop-icon,
.window,
.app-mark,
.id-card,
.danger-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div,
.rule-card,
.start-button,
.taskbar-app,
.start-menu,
.start-card,
.start-avatar,
.start-search,
.start-status span,
.start-grid button,
.empty-result {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  filter: none;
  --clip-edge: rgba(255, 0, 18, 0.88);
  --clip-edge-hot: rgba(255, 55, 64, 0.96);
  --clip-fill-a: rgba(255, 0, 18, 0.13);
  --clip-fill-b: rgba(5, 0, 0, 0.94);
}

button::before,
.desktop-icon::before,
.window::before,
.app-mark::before,
.id-card::before,
.danger-card::before,
.net-grid article::before,
.job-board article::before,
.stat-matrix article::before,
.profile-list div::before,
.rule-card::before,
.start-button::before,
.taskbar-app::before,
.start-menu::before,
.start-card::before,
.start-avatar::before,
.start-search::before,
.start-status span::before,
.start-grid button::before,
.empty-result::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, var(--clip-fill-a), var(--clip-fill-b)) padding-box,
    linear-gradient(135deg, var(--clip-edge-hot), var(--clip-edge), rgba(255, 0, 18, 0.42)) border-box;
  clip-path: inherit;
}

button:hover,
.desktop-icon:hover,
.taskbar-app:hover,
.start-grid button:hover,
button:focus-visible,
.desktop-icon:focus-visible,
.taskbar-app:focus-visible,
.start-button:focus-visible,
.start-grid button:focus-visible,
.window-control:focus-visible {
  filter: none;
  --clip-edge: rgba(255, 0, 18, 1);
  --clip-edge-hot: rgba(255, 92, 98, 1);
  --clip-fill-a: rgba(255, 0, 18, 0.24);
}

.window {
  --clip-fill-a: rgba(255, 0, 18, 0.1);
  --clip-fill-b: rgba(7, 0, 1, 0.96);
}

.window::before {
  inset: 0;
  height: auto;
  border: 1px solid transparent;
  border-right: 1px solid transparent;
  border-left: 1px solid transparent;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  clip-path: inherit;
}

.window::after {
  z-index: 2;
}

.window > * {
  position: relative;
  z-index: 1;
}

.window.is-maximized {
  filter: none;
  --clip-edge: rgba(255, 0, 18, 1);
  --clip-edge-hot: rgba(255, 92, 98, 1);
}

.desktop {
  border: 1px solid transparent !important;
  background:
    linear-gradient(90deg, rgba(255, 0, 18, 0.08), transparent 8%, transparent 82%, rgba(255, 0, 18, 0.08)) padding-box,
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.04) 0 1px, transparent 1px 13px) padding-box,
    linear-gradient(#020000, #020000) padding-box,
    linear-gradient(135deg, rgba(255, 80, 86, 0.96), rgba(255, 0, 18, 0.58)) border-box;
  filter: none;
}

/* Final CRT terminal pass: transparent bodies, diagonal hatch fills, warning telemetry. */
body {
  background: #020000;
}

body::before {
  z-index: 90;
  opacity: 0.3;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(255, 0, 18, 0.09) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 50%, transparent 0 58%, rgba(255, 0, 18, 0.11) 100%);
}

body::after {
  z-index: 91;
  opacity: 0.34;
  mix-blend-mode: screen;
  background:
    linear-gradient(rgba(255, 0, 18, 0.04) 50%, rgba(0, 0, 0, 0.16) 50%),
    linear-gradient(90deg, rgba(255, 0, 18, 0.09), transparent 18%, rgba(255, 0, 18, 0.05) 52%, transparent 84%);
  background-size: 100% 4px, 9px 100%;
}

.desktop {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.085) 0 2px, transparent 2px 10px) padding-box,
    linear-gradient(rgba(8, 0, 1, 0.62), rgba(8, 0, 1, 0.62)) padding-box,
    linear-gradient(135deg, rgba(255, 78, 84, 0.95), rgba(255, 0, 18, 0.55), rgba(80, 0, 8, 0.65)) border-box;
}

.desktop::before {
  content: "GENERIC TERMINAL // PLACEHOLDER CONTENT";
  color: rgba(255, 88, 94, 0.84);
}

.desktop::after {
  border: 0;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 0, 18, 0.28) 18% 18.3%, transparent 18.3% 43%, rgba(255, 0, 18, 0.22) 43% 43.25%, transparent 43.25%),
    linear-gradient(0deg, transparent 0 23%, rgba(255, 0, 18, 0.24) 23% 23.3%, transparent 23.3% 76%, rgba(255, 0, 18, 0.2) 76% 76.25%, transparent 76.25%);
}

button::before,
.desktop-icon::before,
.window::before,
.app-mark::before,
.id-card::before,
.danger-card::before,
.net-grid article::before,
.job-board article::before,
.stat-matrix article::before,
.profile-list div::before,
.rule-card::before,
.start-button::before,
.taskbar-app::before,
.start-menu::before,
.start-card::before,
.start-avatar::before,
.start-search::before,
.start-status span::before,
.start-grid button::before,
.empty-result::before {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.12) 0 2px, transparent 2px 8px) padding-box,
    linear-gradient(rgba(8, 0, 1, 0.72), rgba(8, 0, 1, 0.72)) padding-box,
    linear-gradient(135deg, rgba(255, 84, 90, 0.98), rgba(255, 0, 18, 0.68), rgba(90, 0, 8, 0.7)) border-box;
}

.window-header {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.22) 0 5px, rgba(0, 0, 0, 0.22) 5px 10px),
    rgba(8, 0, 1, 0.86);
}

.window-body {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 18, 0.055) 0 2px, transparent 2px 9px),
    rgba(0, 0, 0, 0.18);
}

.desktop-icons::before {
  content: "LOCAL APPS";
  grid-column: 1 / -1;
  color: rgba(255, 86, 92, 0.78);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0;
}

.window::after {
  content: "WARN // UNAUTH DISPLAY";
  right: 8px;
  bottom: 7px;
  width: auto;
  height: auto;
  border: 0;
  color: rgba(255, 70, 78, 0.58);
  font-size: 0.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-window::after {
  content: "RULESET // TABLE OVERRIDE";
}

.notes-grid::before,
.net-grid::before,
.job-board::before,
.stat-matrix::before {
  content: "DIAGNOSTIC LAYER ACTIVE";
  grid-column: 1 / -1;
  color: rgba(255, 75, 82, 0.62);
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.danger-card::after {
  content: " ! ";
  float: right;
  color: rgba(255, 0, 18, 0.9);
  font-weight: 900;
}

.taskbar::before {
  content: "LOCAL LINK READY // PLACEHOLDER STATUS";
  position: absolute;
  right: 4px;
  top: -13px;
  color: rgba(255, 65, 72, 0.55);
  font-size: 0.52rem;
  font-weight: 900;
  pointer-events: none;
}

/* Hardware CRT pass: SVG framebuffer distortion plus a real animated canvas mask. */
.crt-filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.crt-canvas {
  position: fixed;
  inset: 0;
  z-index: 120;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.66;
  mix-blend-mode: screen;
  image-rendering: pixelated;
}

/* High-contrast hologram terminal pass. */
:root {
  --black: #000;
  --black-2: #030000;
  --panel: rgba(3, 0, 0, 0.94);
  --panel-2: rgba(7, 0, 1, 0.96);
  --yellow: #ff2c35;
  --cyan: #ff4b52;
  --magenta: #8b000a;
  --red: #ff0018;
  --green: #ff6b70;
  --text: #ffd7da;
  --muted: #a83b42;
  --line: rgba(255, 0, 24, 0.76);
  --shadow: rgba(0, 0, 0, 0.92);
}

body {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 0, 24, 0.08), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.035) 0 1px, transparent 1px 18px),
    #000;
}

body::before {
  opacity: 0.18;
}

body::after {
  opacity: 0.2;
}

.os-shell {
  filter: url("#crt-aberration") contrast(1.18) brightness(0.84) saturate(1.18);
  text-shadow: 0 0 8px rgba(255, 0, 24, 0.54), 0 0 18px rgba(255, 0, 24, 0.18);
}

.desktop {
  border: 0 !important;
  background:
    linear-gradient(90deg, rgba(255, 0, 24, 0.07), transparent 10%, transparent 88%, rgba(255, 0, 24, 0.08)) padding-box,
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.1) 0 2px, transparent 2px 11px) padding-box,
    linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.78)) padding-box;
  box-shadow:
    inset 0 0 0 3px rgba(255, 0, 24, 0.9),
    inset 0 0 0 6px rgba(255, 0, 24, 0.18),
    inset 0 0 60px rgba(255, 0, 24, 0.18),
    0 0 28px rgba(255, 0, 24, 0.22),
    0 28px 90px rgba(0, 0, 0, 0.94);
  filter: drop-shadow(0 0 7px rgba(255, 0, 24, 0.34));
}

.desktop::before {
  color: rgba(255, 87, 93, 0.92);
  text-shadow: 0 0 8px rgba(255, 0, 24, 0.76);
}

button,
.desktop-icon,
.window,
.app-mark,
.id-card,
.danger-card,
.net-grid article,
.job-board article,
.stat-matrix article,
.profile-list div,
.rule-card,
.start-button,
.taskbar-app,
.start-menu,
.start-card,
.start-avatar,
.start-search,
.start-status span,
.start-grid button,
.empty-result {
  --clip-edge: rgba(255, 0, 24, 1);
  --clip-edge-hot: rgba(255, 118, 123, 1);
  --clip-fill-a: rgba(255, 0, 24, 0.08);
  --clip-fill-b: rgba(0, 0, 0, 0.95);
  color: var(--text);
  filter:
    drop-shadow(0 0 1.5px rgba(255, 0, 24, 0.95))
    drop-shadow(0 0 12px rgba(255, 0, 24, 0.22));
}

button::before,
.desktop-icon::before,
.window::before,
.app-mark::before,
.id-card::before,
.danger-card::before,
.net-grid article::before,
.job-board article::before,
.stat-matrix article::before,
.profile-list div::before,
.rule-card::before,
.start-button::before,
.taskbar-app::before,
.start-menu::before,
.start-card::before,
.start-avatar::before,
.start-search::before,
.start-status span::before,
.start-grid button::before,
.empty-result::before {
  border-width: 2px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.11) 0 2px, transparent 2px 9px) padding-box,
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)) padding-box,
    linear-gradient(135deg, rgba(255, 127, 132, 1), rgba(255, 0, 24, 0.96), rgba(110, 0, 10, 0.88)) border-box;
}

.window::before,
.start-menu::before,
.desktop-icon::before {
  border-width: 3px;
}

.window {
  background: rgba(0, 0, 0, 0.72);
  box-shadow:
    inset 0 0 28px rgba(255, 0, 24, 0.1),
    0 0 0 1px rgba(255, 0, 24, 0.08),
    0 18px 80px rgba(0, 0, 0, 0.94);
}

.window-header {
  background:
    linear-gradient(90deg, rgba(255, 0, 24, 0.34), rgba(30, 0, 3, 0.88) 38%, rgba(255, 0, 24, 0.26)),
    repeating-linear-gradient(135deg, rgba(255, 72, 78, 0.28) 0 5px, rgba(0, 0, 0, 0.38) 5px 10px),
    #070000;
  color: #fff2f3;
  box-shadow:
    inset 0 -2px 0 rgba(255, 0, 24, 0.82),
    0 0 18px rgba(255, 0, 24, 0.22);
}

.window-header small {
  color: rgba(255, 178, 181, 0.78);
}

.window-body,
.rules-content,
textarea,
input {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.055) 0 2px, transparent 2px 10px),
    rgba(0, 0, 0, 0.62);
  color: var(--text);
}

textarea,
input {
  border: 2px solid rgba(255, 0, 24, 0.7);
  box-shadow: inset 0 0 18px rgba(255, 0, 24, 0.12), 0 0 12px rgba(255, 0, 24, 0.1);
}

.taskbar,
.start-menu {
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.1) 0 2px, transparent 2px 12px),
    rgba(0, 0, 0, 0.9);
  box-shadow:
    inset 0 0 0 2px rgba(255, 0, 24, 0.28),
    0 0 24px rgba(255, 0, 24, 0.18),
    0 20px 70px rgba(0, 0, 0, 0.94);
}

.taskbar-app.is-active,
.start-grid button:hover,
.desktop-icon:hover,
button:hover {
  --clip-fill-a: rgba(255, 0, 24, 0.24);
  color: #fff7f8;
  text-shadow: 0 0 9px rgba(255, 0, 24, 0.95), 0 0 26px rgba(255, 0, 24, 0.38);
}

.app-mark svg,
.desktop-icon svg,
.taskbar-app svg,
.start-button svg,
.start-grid button svg {
  filter:
    drop-shadow(0 0 4px rgba(255, 0, 24, 0.88))
    drop-shadow(0 0 12px rgba(255, 0, 24, 0.38));
}

.window[data-app="profile"] .window-body {
  align-content: start;
  padding: 7px;
}

.window[data-app="profile"] .profile-grid {
  grid-template-columns: minmax(132px, 0.88fr) minmax(152px, 1.12fr);
  gap: 7px;
}

.window[data-app="profile"] .id-card,
.window[data-app="profile"] .profile-list div {
  padding: 6px;
}

.window[data-app="profile"] h1 {
  margin-bottom: 0.35rem;
  font-size: 1.18rem;
}

.window[data-app="profile"] .profile-list {
  gap: 6px;
}

body::before {
  opacity: var(--crt-scanline-opacity, 0.18);
}

body::after {
  opacity: calc(var(--crt-scanline-opacity, 0.18) + 0.02);
}

.os-shell {
  filter:
    url("#crt-aberration")
    hue-rotate(var(--crt-hue, 0deg))
    contrast(var(--crt-shell-contrast, 1.18))
    brightness(var(--crt-shell-brightness, 0.84))
    saturate(1.18);
}

.crt-canvas {
  opacity: var(--crt-canvas-opacity, 0.66);
  filter: hue-rotate(var(--crt-hue, 0deg)) saturate(1.16);
}

.theme-panel {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 9px;
  color: var(--text);
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.theme-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid transparent;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.1) 0 2px, transparent 2px 10px) padding-box,
    linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.82)) padding-box,
    linear-gradient(135deg, var(--cyan), var(--red), rgba(80, 0, 8, 0.9)) border-box;
  clip-path: inherit;
}

.theme-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  text-transform: uppercase;
}

.theme-panel header strong {
  color: var(--cyan);
  font-size: 0.68rem;
  text-shadow: 0 0 10px rgba(255, 0, 24, var(--crt-glow-alpha, 0.76));
}

.theme-panel header small {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 900;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.theme-swatch {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 5px;
  font-size: 0.5rem;
  text-align: left;
  text-transform: uppercase;
}

.theme-swatch span {
  width: 10px;
  height: 10px;
  background: hsl(var(--swatch-hue) 100% 50%);
  box-shadow:
    0 0 8px hsl(var(--swatch-hue) 100% 50%),
    0 0 16px hsl(var(--swatch-hue) 100% 50% / 0.36);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.theme-swatch strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-swatch.is-active {
  color: #fff;
  --clip-fill-a: rgba(255, 0, 24, 0.28);
}

.theme-panel label {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-panel input[type="range"] {
  width: 100%;
  height: 16px;
  padding: 0;
  border: 0;
  accent-color: var(--red);
  background: transparent;
  box-shadow: none;
}

.theme-panel input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0 5px, transparent 5px 10px),
    linear-gradient(90deg, rgba(255, 0, 24, 0.22), var(--red));
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.theme-panel input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 16px;
  margin-top: -5px;
  border: 1px solid #000;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--red);
  clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 78%);
  -webkit-appearance: none;
}

.theme-panel input[type="range"]::-moz-range-track {
  height: 6px;
  background: linear-gradient(90deg, rgba(255, 0, 24, 0.22), var(--red));
}

.theme-panel input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 16px;
  border: 1px solid #000;
  border-radius: 0;
  background: var(--cyan);
}

.window > .window-resizer {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: 26px;
  height: 26px;
  cursor: nwse-resize;
  touch-action: none;
  pointer-events: auto;
  background:
    linear-gradient(135deg, transparent 0 48%, var(--cyan) 48% 54%, transparent 54%),
    linear-gradient(135deg, transparent 0 62%, var(--red) 62% 68%, transparent 68%),
    linear-gradient(135deg, transparent 0 76%, rgba(255, 255, 255, 0.7) 76% 80%, transparent 80%);
  filter:
    drop-shadow(0 0 4px var(--red))
    drop-shadow(0 0 12px rgba(255, 0, 24, 0.32));
}

.window.is-maximized > .window-resizer,
.window.is-minimized > .window-resizer {
  display: none;
}

@media (max-width: 820px) {
  .os-shell {
    padding: 5px 5px 0;
  }

  .desktop-icons {
    grid-template-columns: 64px;
  }

  .profile-grid,
  .rules-layout {
    grid-template-columns: 1fr;
  }

  .rules-nav {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 0, 18, 0.28);
  }

  .taskbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .start-button {
    grid-template-columns: 24px;
    min-width: 38px;
    width: 38px;
    padding: 0.28rem;
  }

  .start-button span:last-child {
    display: none;
  }

  .taskbar-app {
    min-width: 78px;
  }

  .start-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* Terminal-only interaction layer. */
.os-shell {
  grid-template-rows: minmax(0, 1fr);
  padding: clamp(10px, 2.4vw, 28px);
}

.desktop {
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.2vw, 30px);
}

.desktop::before {
  content: "";
}

.desktop-icons,
.window,
.taskbar,
.start-menu {
  display: none !important;
}

.terminal-console {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, calc(100vw - 34px));
  height: min(740px, calc(100vh - 54px));
  overflow: hidden;
  color: var(--text);
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.08) 0 2px, transparent 2px 12px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(9, 0, 1, 0.96));
  box-shadow:
    inset 0 0 0 2px rgba(255, 0, 24, 0.74),
    inset 0 0 46px rgba(255, 0, 24, 0.14),
    0 0 30px rgba(255, 0, 24, 0.24),
    0 28px 90px rgba(0, 0, 0, 0.9);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}

.terminal-console::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: -1;
  border: 1px solid rgba(255, 0, 24, 0.22);
  pointer-events: none;
  clip-path: polygon(0 0, 38% 0, 38% 8px, 58% 8px, 58% 0, 100% 0, 100% 42%, calc(100% - 10px) 42%, calc(100% - 10px) 68%, 100% 68%, 100% 100%, 62% 100%, 62% calc(100% - 8px), 42% calc(100% - 8px), 42% 100%, 0 100%);
}

.program-window-layer {
  position: absolute;
  inset: 0;
  z-index: 14;
  overflow: hidden;
  pointer-events: none;
}

.program-window {
  display: flex !important;
  left: 9px;
  top: 9px;
  z-index: 20;
  max-width: calc(100% - 18px);
  max-height: calc(100% - 18px);
  pointer-events: auto;
  will-change: left, top, width, height;
}

.program-window.is-active {
  --clip-edge: rgba(255, 0, 18, 1);
  --clip-edge-hot: rgba(255, 92, 98, 1);
}

.program-window.is-moving,
.program-window.is-resizing {
  user-select: none;
}

.program-window .window-header {
  touch-action: none;
}

.program-window-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.program-subpage {
  min-height: 0;
  overflow: auto;
  isolation: isolate;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 13px 17px 11px;
  border-bottom: 1px solid rgba(255, 0, 24, 0.56);
  background:
    linear-gradient(90deg, rgba(255, 0, 24, 0.22), rgba(0, 0, 0, 0.34) 44%, rgba(255, 0, 24, 0.14)),
    rgba(0, 0, 0, 0.5);
}

.terminal-header > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.terminal-header strong,
.terminal-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.terminal-header strong {
  color: #fff;
  font-size: 0.86rem;
}

.terminal-header small,
.terminal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-led {
  width: 13px;
  height: 13px;
  background: var(--red);
  box-shadow:
    0 0 7px var(--red),
    0 0 18px rgba(255, 0, 24, 0.72);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.terminal-output {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  scroll-behavior: smooth;
}

.terminal-entry {
  margin: 0 0 13px;
}

.terminal-entry:last-child {
  margin-bottom: 0;
}

.terminal-command-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
  color: var(--cyan);
}

.terminal-command-line span,
.terminal-prompt {
  color: var(--red);
  font-weight: 900;
  text-shadow: 0 0 9px rgba(255, 0, 24, 0.78);
  white-space: nowrap;
}

.terminal-command-line code,
.terminal-row code,
.terminal-entry code {
  color: #fff;
  font-family: inherit;
}

.terminal-command-line code {
  overflow-wrap: anywhere;
}

.terminal-boot pre,
.terminal-pre {
  margin: 0;
  white-space: pre-wrap;
}

.terminal-boot p,
.terminal-entry > p {
  margin: 0;
}

.terminal-card {
  position: relative;
  padding: 14px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.08) 0 2px, transparent 2px 10px),
    rgba(0, 0, 0, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(255, 0, 24, 0.42),
    inset 0 0 28px rgba(255, 0, 24, 0.08);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
}

.terminal-card-header {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.terminal-card-header span {
  color: var(--red);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-card-header h2,
.terminal-card-header p {
  margin: 0;
}

.terminal-card-header h2 {
  color: #fff;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.terminal-card-header p {
  color: var(--muted);
  font-size: 0.76rem;
}

.terminal-table {
  display: grid;
  gap: 1px;
}

.terminal-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 0, 24, 0.18);
}

.terminal-row:first-child {
  border-top: 0;
}

.terminal-row span {
  color: rgba(255, 230, 232, 0.76);
  line-height: 1.4;
}

.terminal-error {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 24, 0.82);
}

.terminal-program {
  display: grid;
  gap: 12px;
}

.program-boot-sequence {
  display: grid;
  gap: 10px;
  margin-bottom: 13px;
  padding: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 0, 24, 0.08) 0 1px, transparent 1px 12px),
    rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.32);
}

.program-ascii-title {
  margin: 0;
  overflow-x: auto;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: pre;
}

.program-loading-stack {
  display: grid;
  gap: 7px;
}

.program-loading-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.32fr) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.program-loading-row i {
  position: relative;
  display: block;
  height: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.34);
}

.program-loading-row i::before {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: var(--load-target, 84%);
  background:
    repeating-linear-gradient(90deg, var(--red) 0 8px, var(--complement) 8px 12px);
  box-shadow: 0 0 14px var(--complement-dim);
  transform-origin: left center;
  animation: program-load 820ms steps(12, end) both;
  animation-delay: var(--load-delay, 0ms);
}

.html-program-page {
  display: grid;
  gap: 12px;
}

.html-program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.html-program-panel {
  padding: 11px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.26);
}

.html-program-panel h3,
.html-program-panel p {
  margin: 0;
}

.html-program-panel h3 {
  color: #fff;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.html-program-panel p {
  margin-top: 0.4rem;
  color: rgba(244, 248, 255, 0.76);
}

@keyframes program-load {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.terminal-hero {
  display: grid;
  gap: 7px;
  padding: 13px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.07) 0 2px, transparent 2px 10px),
    rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.32);
}

.terminal-hero p,
.terminal-hero h3,
.terminal-hero span {
  margin: 0;
}

.terminal-hero p {
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-hero h3 {
  color: #fff;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.terminal-hero span {
  color: rgba(255, 230, 232, 0.76);
  line-height: 1.45;
}

.terminal-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
  margin: 0;
}

.terminal-detail-list div,
.terminal-stat-grid article,
.terminal-card-grid article {
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.26);
}

.terminal-detail-list dt,
.terminal-stat-grid span {
  color: var(--red);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-detail-list dd {
  margin: 0.2rem 0 0;
  color: var(--text);
}

.terminal-stat-grid,
.terminal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.terminal-stat-grid strong {
  display: block;
  margin: 0.24rem 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.terminal-stat-grid em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.terminal-card-grid strong {
  display: block;
  color: #fff;
  text-transform: uppercase;
}

.terminal-card-grid p {
  margin: 0.36rem 0 0;
  color: rgba(255, 230, 232, 0.76);
  font-size: 0.84rem;
}

.terminal-flow-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.2rem;
}

.terminal-flow-list li {
  padding: 0.62rem;
  border-left: 3px solid var(--red);
  background: rgba(255, 0, 24, 0.06);
  color: rgba(255, 230, 232, 0.8);
}

.terminal-flow-list strong {
  color: #fff;
}

.terminal-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.terminal-tag-list span {
  padding: 0.35rem 0.55rem;
  background: rgba(255, 0, 24, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.28);
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 800;
}

.terminal-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.terminal-data-table th,
.terminal-data-table td {
  padding: 0.56rem;
  border: 1px solid rgba(255, 0, 24, 0.24);
  text-align: left;
}

.terminal-data-table th {
  color: #fff;
  background: rgba(255, 0, 24, 0.1);
  text-transform: uppercase;
}

.markdown-page {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.markdown-page h3,
.markdown-page h4,
.markdown-page h5,
.markdown-page h6,
.markdown-page p,
.markdown-page ul,
.markdown-page ol {
  margin: 0;
}

.markdown-page h3,
.markdown-page h4,
.markdown-page h5,
.markdown-page h6 {
  color: #fff;
  text-transform: uppercase;
}

.markdown-page p,
.markdown-page li {
  color: rgba(255, 230, 232, 0.78);
  line-height: 1.45;
}

.markdown-page ul,
.markdown-page ol {
  display: grid;
  gap: 6px;
  padding-left: 1.25rem;
}

.folder-cascade {
  margin: 0 0 12px;
  padding: 10px;
  overflow: auto;
  color: rgba(255, 230, 232, 0.74);
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.05) 0 2px, transparent 2px 8px),
    rgba(0, 0, 0, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.28);
  line-height: 1.45;
}

.folder-cascade::first-line {
  color: #fff;
}

.access-denied-card {
  --clip-edge: rgba(255, 0, 24, 1);
}

.aberration-card {
  --aberration-panel: rgba(0, 0, 0, 0.66);
  --aberration-line: rgba(255, 0, 24, 0.34);
}

.aberration-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.aberration-builder label {
  display: grid;
  gap: 7px;
  align-content: start;
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.aberration-builder input,
.aberration-builder textarea {
  min-height: 38px;
  padding: 0.6rem;
  border: 1px solid rgba(255, 0, 24, 0.5);
  color: var(--text);
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.04) 0 2px, transparent 2px 8px),
    rgba(0, 0, 0, 0.56);
  box-shadow: inset 0 0 14px rgba(255, 0, 24, 0.1);
}

.aberration-builder input[type="file"] {
  padding: 0.45rem;
  color: rgba(255, 230, 232, 0.72);
}

.aberration-builder textarea {
  resize: vertical;
}

.aberration-builder button,
.aberration-builder-wide {
  grid-column: 1 / -1;
}

.aberration-record {
  display: grid;
  gap: 14px;
}

.aberration-record-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1.2fr);
  align-items: stretch;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--aberration-line);
}

.aberration-title-block {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.aberration-title-block span {
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.aberration-title-block h2,
.aberration-title-block p {
  margin: 0;
}

.aberration-title-block h2 {
  color: #fff;
  font-size: 1.38rem;
  text-transform: uppercase;
}

.aberration-title-block p {
  color: var(--muted);
}

.aberration-media-frame {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255, 0, 24, 0.09) 0 2px, transparent 2px 11px),
    var(--aberration-panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 0, 24, 0.44),
    inset 0 0 34px rgba(255, 0, 24, 0.1);
}

.aberration-media-frame[data-media-role="main"] {
  min-height: 180px;
}

.aberration-media-frame:focus,
.aberration-media-frame:focus-within,
.aberration-visual:focus {
  outline: 0;
  box-shadow:
    inset 0 0 0 2px var(--complement),
    0 0 22px var(--complement-dim);
}

.aberration-media-frame[data-media-role="main"]:focus-within,
.aberration-media-frame[data-media-role="main"]:focus {
  grid-column: 1 / -1;
  min-height: 320px;
}

.aberration-media-frame figcaption {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.aberration-media-frame.is-empty {
  min-height: 190px;
  place-items: center;
}

.aberration-media-placeholder {
  color: rgba(255, 230, 232, 0.32);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0;
}

.aberration-visual {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #000;
  filter:
    grayscale(1)
    sepia(1)
    saturate(4.4)
    hue-rotate(var(--crt-hue, 0deg))
    contrast(1.55)
    brightness(0.86);
  image-rendering: pixelated;
}

.aberration-media-frame.is-visual::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 7px, transparent 7px 14px),
    radial-gradient(circle at 50% 50%, transparent 0 56%, rgba(255, 0, 24, 0.24) 100%);
}

.aberration-audio-ui {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 0 0 1px var(--complement-dim),
    inset 0 0 18px rgba(0, 0, 0, 0.24);
}

.aberration-audio-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.aberration-audio-icon {
  width: 46px;
  min-width: 46px;
  min-height: 34px;
  padding: 0;
  overflow: hidden;
  color: var(--complement);
  --clip-edge: var(--complement);
  --clip-edge-hot: var(--complement);
  --clip-fill-a: transparent;
  --clip-fill-b: rgba(0, 0, 0, 0.24);
  font-size: 0.58rem;
  text-overflow: clip;
  white-space: nowrap;
}

.aberration-waveform-box {
  min-height: 90px;
  padding: 7px;
  overflow: hidden;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px var(--complement-dim),
    inset 0 0 22px rgba(0, 0, 0, 0.22);
}

.aberration-waveform {
  display: block;
  width: 100%;
  height: 84px;
  background: transparent;
  image-rendering: pixelated;
}

.aberration-audio-ui audio {
  display: none;
}

.aberration-audio-seek {
  width: 100%;
  height: 16px;
  padding: 0;
  border: 0;
  accent-color: var(--complement);
  background: transparent;
  box-shadow: none;
}

.aberration-audio-menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  color: var(--complement);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px var(--complement-dim);
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
}

.aberration-audio-menu[hidden] {
  display: none;
}

.aberration-audio-menu span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aberration-audio-seek::-webkit-slider-runnable-track {
  height: 5px;
  background: linear-gradient(90deg, var(--complement-dim), var(--complement));
}

.aberration-audio-seek::-webkit-slider-thumb {
  width: 12px;
  height: 16px;
  margin-top: -5px;
  background: var(--complement);
  box-shadow: 0 0 12px var(--complement);
  -webkit-appearance: none;
}

.aberration-audio-seek::-moz-range-track {
  height: 5px;
  background: linear-gradient(90deg, var(--complement-dim), var(--complement));
}

.aberration-audio-seek::-moz-range-thumb {
  width: 12px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: var(--complement);
}

.aberration-media-frame.is-file a {
  color: #fff;
  overflow-wrap: anywhere;
}

.aberration-media-frame.is-audio {
  background: transparent;
  box-shadow: none;
}

.aberration-section {
  display: grid;
  gap: 10px;
  padding: 13px;
  background: var(--aberration-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.24);
}

.aberration-section p {
  margin: 0;
  color: rgba(255, 230, 232, 0.78);
}

.aberration-separation-cells,
.aberration-grid,
.aberration-auxiliary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.aberration-separation-cells article,
.aberration-grid article {
  padding: 10px;
  background: var(--aberration-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.3);
}

.aberration-separation-cells strong,
.aberration-grid strong {
  color: #fff;
  text-transform: uppercase;
}

.aberration-separation-cells p,
.aberration-grid p {
  margin: 0.35rem 0 0;
  color: rgba(255, 230, 232, 0.72);
  font-size: 0.84rem;
}

.aberration-timeline {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1fr);
  gap: 10px;
}

.aberration-timeline-track {
  display: grid;
  align-content: start;
  gap: 6px;
}

.aberration-timeline-track button {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-height: 44px;
  padding: 0.48rem 0.6rem;
  text-align: left;
}

.aberration-timeline-track button.is-active {
  color: #fff;
  --clip-fill-a: rgba(255, 0, 24, 0.26);
}

.aberration-timeline-track span,
.aberration-timeline-panels span {
  color: var(--red);
  font-size: 0.58rem;
  font-weight: 900;
}

.aberration-timeline-track strong {
  font-size: 0.74rem;
  text-transform: uppercase;
}

.aberration-timeline-panels article {
  min-height: 100%;
  padding: 12px;
  background: var(--aberration-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.28);
}

.aberration-timeline-panels h3,
.aberration-timeline-panels p {
  margin: 0;
}

.aberration-timeline-panels h3 {
  margin-top: 0.25rem;
  color: #fff;
  text-transform: uppercase;
}

.aberration-timeline-panels p {
  margin-top: 0.45rem;
  color: rgba(255, 230, 232, 0.76);
}

.aberration-expandable {
  display: grid;
  gap: 8px;
}

.aberration-expandable details {
  padding: 10px;
  background: var(--aberration-panel);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 24, 0.26);
}

.aberration-expandable summary {
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.aberration-expandable p {
  margin: 0.55rem 0 0;
  color: rgba(255, 230, 232, 0.76);
}

.terminal-program .profile-grid {
  grid-template-columns: minmax(180px, 0.82fr) minmax(220px, 1.18fr);
}

.terminal-program .stat-matrix,
.terminal-program .net-grid,
.terminal-program .job-board,
.terminal-card .rule-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.terminal-program .id-card,
.terminal-program .danger-card,
.terminal-program .net-grid article,
.terminal-program .job-board article,
.terminal-program .stat-matrix article,
.terminal-program .profile-list div,
.terminal-card .rule-card {
  background: rgba(0, 0, 0, 0.4) !important;
}

.terminal-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.terminal-notes-grid label {
  display: grid;
  gap: 7px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.terminal-notes-grid textarea {
  min-height: 190px;
  resize: vertical;
}

.terminal-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 17px 14px;
  border-top: 1px solid rgba(255, 0, 24, 0.5);
  background: rgba(0, 0, 0, 0.52);
}

.terminal-form input {
  min-height: 34px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  caret-color: var(--red);
}

.terminal-form input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.terminal-history {
  margin: 0;
  padding-left: 1.4rem;
}

.terminal-history li {
  margin: 0.28rem 0;
}

@media (max-width: 760px) {
  .os-shell {
    padding: 7px;
  }

  .desktop {
    padding: 8px;
  }

  .terminal-console {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
  }

  .terminal-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .terminal-output {
    padding: 13px;
  }

  .terminal-table .terminal-row,
  .terminal-row,
  .terminal-program .profile-grid,
  .aberration-record-header,
  .terminal-detail-list,
  .terminal-stat-grid,
  .terminal-card-grid,
  .aberration-builder,
  .aberration-timeline,
  .aberration-separation-cells,
  .aberration-grid,
  .aberration-auxiliary,
  .terminal-notes-grid {
    grid-template-columns: 1fr;
  }

  .terminal-form {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

