:root {
  --bg: #050612;
  --panel: #101326;
  --panel-2: #151936;
  --ink: #f7f5ff;
  --text: #e7e2ff;
  --muted: #aaa4c8;
  --faint: #746e95;
  --line: rgba(213, 198, 255, 0.16);
  --line-strong: rgba(213, 198, 255, 0.30);
  --violet: #b99cff;
  --cyan: #76d7ff;
  --green: #72f0b4;
  --amber: #f4c96b;
  --danger: #ff8fbe;
  --shadow: rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(880px 520px at 10% 4%, rgba(185, 156, 255, 0.14), transparent 62%),
    radial-gradient(740px 460px at 92% 12%, rgba(118, 215, 255, 0.08), transparent 62%),
    linear-gradient(180deg, #050612 0%, #080a1c 54%, #050612 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 18, 0.84);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  object-fit: contain;
  background: #02030b;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.nav a:hover,
.nav .primary-link {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.hero {
  padding: 54px 0 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: end;
}

.eyebrow {
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, p { margin: 0; }

h1 {
  max-width: 860px;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(40px, 6vw, 76px);
  line-height: .95;
  font-weight: 900;
}

h2 {
  margin-top: 5px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  font-weight: 900;
}

.lead {
  max-width: 790px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
.mini-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: rgba(185, 156, 255, 0.62);
  background: linear-gradient(135deg, rgba(185, 156, 255, 0.24), rgba(118, 215, 255, 0.14));
}

.button.ghost,
.mini-button {
  color: var(--muted);
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.mini-button.danger {
  border-color: rgba(255, 143, 190, 0.34);
  color: var(--danger);
}

input[type="file"] { display: none; }

.kernel-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 19, 38, 0.76);
  box-shadow: 0 22px 58px var(--shadow);
}

.kernel-card { padding: 22px; }

.kernel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.kernel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kernel-head strong {
  color: var(--green);
  font-size: 46px;
  line-height: .9;
}

.meter {
  height: 10px;
  margin: 20px 0;
  border: 1px solid rgba(114, 240, 180, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--green));
}

.kernel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kernel-grid div {
  border: 1px solid rgba(213, 198, 255, 0.12);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.kernel-grid b {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.kernel-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid,
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 0;
}

.split {
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr);
  padding-bottom: 72px;
}

.panel { padding: 22px; }

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid rgba(213, 198, 255, 0.18);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(5, 6, 18, 0.48);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

form .button {
  margin-top: 16px;
}

.warning {
  margin-top: 16px;
  border: 1px solid rgba(244, 201, 107, 0.22);
  border-radius: 10px;
  padding: 13px 14px;
  color: #f5dfaa;
  background: rgba(244, 201, 107, 0.06);
  font-size: 13px;
}

.command-box,
.recovery-box {
  min-height: 190px;
  margin: 14px 0 0;
  border: 1px solid rgba(213, 198, 255, 0.12);
  border-radius: 10px;
  padding: 14px;
  color: #dcd7ff;
  background: rgba(5, 6, 18, 0.54);
  white-space: pre-wrap;
  overflow: auto;
}

.recovery-box {
  min-height: 540px;
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
}

.entry {
  border: 1px solid rgba(213, 198, 255, 0.12);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.entry-type {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.entry-time {
  color: var(--faint);
  font-size: 12px;
}

.entry strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}

.entry p,
.entry small {
  color: var(--muted);
}

.empty {
  border: 1px dashed rgba(213, 198, 255, 0.18);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .grid,
  .split,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1240px); }
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .panel-head { flex-direction: column; }
}
