:root {
  color-scheme: dark;
  --bg: #050807;
  --panel: #09110e;
  --panel-2: #0e1c17;
  --line: #1f4638;
  --text: #d9ffe9;
  --muted: #7bb996;
  --hot: #43ff9b;
  --warn: #ffd166;
  --bad: #ff5c7a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background:
    linear-gradient(rgba(67, 255, 155, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, #10261d 0, transparent 36%),
    var(--bg);
  background-size: 100% 4px, auto, auto;
}

.so-body {
  color: #232629;
  font-family: Arial, Helvetica, sans-serif;
  background: #f1f2f3;
}

a {
  color: inherit;
}

.so-topbar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 max(18px, calc((100vw - 1160px) / 2));
  border-top: 3px solid #f48225;
  border-bottom: 1px solid #d6d9dc;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.so-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  color: #232629;
}

.so-logo {
  color: #f48225;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
}

.so-search {
  width: min(620px, 100%);
  padding: 9px 12px;
  border: 1px solid #babfc4;
  border-radius: 3px;
  color: #6a737c;
  background: #ffffff;
  font-size: 14px;
}

.so-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding: 28px 0 44px;
}

.question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d6d9dc;
}

.question-head h1 {
  margin: 0;
  color: #232629;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.25;
  text-shadow: none;
}

.ask-button {
  min-width: max-content;
  padding: 10px 12px;
  border: 1px solid #0074cc;
  border-radius: 3px;
  color: #ffffff;
  background: #0a95ff;
  text-decoration: none;
  font-size: 13px;
}

.question-meta {
  margin-top: 10px;
  color: #6a737c;
  font-size: 13px;
}

.so-post {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  padding: 0 0 24px;
  border-bottom: 1px solid #d6d9dc;
}

.votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #6a737c;
}

.votes button {
  width: 34px;
  height: 30px;
  border: 0;
  color: #6a737c;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.votes strong {
  color: #3b4045;
  font-size: 21px;
  font-weight: 400;
}

.post-body {
  color: #232629;
  font-size: 15px;
  line-height: 1.55;
}

.post-body p {
  margin: 0 0 15px;
}

.so-code {
  margin: 18px 0;
  padding: 16px;
  overflow: auto;
  border-radius: 3px;
  color: #e7ffe9;
  background: #101820;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.so-code code,
.side-card code {
  color: inherit;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  padding: 5px 7px;
  border-radius: 3px;
  color: #39739d;
  background: #e1ecf4;
  font-size: 12px;
}

.answers {
  margin-left: 70px;
  padding-top: 10px;
}

.answers h2 {
  margin: 0 0 10px;
  color: #232629;
  font-size: 20px;
  font-weight: 400;
}

.answers p {
  margin: 0;
  color: #6a737c;
}

.so-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
}

.side-card {
  padding: 14px;
  border: 1px solid #d6d9dc;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.warning-card {
  border-color: #f1d097;
  background: #fbf3d5;
}

.side-card h2 {
  margin: 0 0 12px;
  color: #3b4045;
  font-size: 15px;
  font-weight: 600;
}

.side-card a,
.side-card p {
  display: block;
  margin: 8px 0 0;
  color: #3b4045;
  font-size: 13px;
  text-decoration: none;
}

.side-card a:hover {
  color: #0074cc;
}

.admin-page {
  width: min(760px, calc(100% - 32px));
  min-height: calc(100vh - 52px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 44px 0;
}

.admin-card {
  width: 100%;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #d6d9dc;
  border-left: 5px solid #d0393e;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-label {
  margin: 0 0 10px;
  color: #6a737c;
  font-size: 13px;
  text-transform: uppercase;
}

.admin-card h1 {
  margin: 0;
  color: #232629;
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 400;
  line-height: 1.08;
  text-shadow: none;
}

.admin-copy {
  max-width: 560px;
  margin: 18px 0 0;
  color: #3b4045;
  font-size: 16px;
  line-height: 1.55;
}

.admin-hint {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid #f1d097;
  border-radius: 3px;
  background: #fbf3d5;
}

.admin-hint span {
  display: block;
  margin-bottom: 8px;
  color: #6a737c;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-hint code {
  color: #232629;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.terminal {
  width: 100%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), #050a08);
  box-shadow: 0 0 0 1px #07130f, 0 24px 80px rgba(0, 0, 0, 0.48);
}

.terminal-small {
  max-width: 760px;
}

.bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #07100d;
}

.bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bad);
}

.bar span:nth-child(2) {
  background: var(--warn);
}

.bar span:nth-child(3) {
  background: var(--hot);
}

.bar strong {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.screen {
  padding: clamp(24px, 5vw, 56px);
}

.kicker {
  margin: 0 0 12px;
  color: var(--hot);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.kicker::before {
  content: "[boot] ";
  color: var(--warn);
}

h1 {
  margin: 0;
  font-size: clamp(42px, 9vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(67, 255, 155, 0.34);
}

.error-code {
  color: var(--bad);
  text-shadow: 0 0 22px rgba(255, 92, 122, 0.32);
}

.lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.65;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.tile {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  text-decoration: none;
}

.tile:hover,
.tile:focus {
  border-color: var(--hot);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(67, 255, 155, 0.3);
}

.label {
  display: block;
  margin-bottom: 18px;
  color: var(--warn);
  font-size: 12px;
  text-transform: uppercase;
}

code {
  color: var(--text);
  overflow-wrap: anywhere;
}

.so-body code {
  color: inherit;
}

.so-code code {
  color: #e7ffe9;
}

.prompt {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 3px solid var(--hot);
  background: #050806;
  color: var(--muted);
}

.prompt span {
  color: var(--hot);
}

.error-box {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid rgba(255, 92, 122, 0.55);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 92, 122, 0.08) 0,
      rgba(255, 92, 122, 0.08) 8px,
      transparent 8px,
      transparent 16px
    ),
    #090606;
}

.error-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.error-box code {
  display: block;
  margin-top: 18px;
  color: var(--warn);
}

.status-line {
  margin-bottom: 8px !important;
  color: var(--bad) !important;
  text-transform: uppercase;
}

.config {
  max-height: 62vh;
  margin: 28px 0 0;
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #030604;
  color: var(--text);
  line-height: 1.55;
}

.back {
  margin: 18px 0 0;
  color: var(--hot);
}

@media (max-width: 720px) {
  .so-topbar {
    gap: 12px;
    padding: 0 12px;
  }

  .so-brand strong {
    display: none;
  }

  .so-page {
    width: min(100% - 20px, 1160px);
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .question-head {
    display: block;
  }

  .ask-button {
    display: inline-block;
    margin-top: 14px;
  }

  .so-post {
    grid-template-columns: 1fr;
  }

  .votes {
    flex-direction: row;
    justify-content: flex-start;
  }

  .answers {
    margin-left: 0;
  }

  .shell {
    width: min(100% - 20px, 1040px);
    padding: 10px 0;
  }

  .screen {
    padding: 24px 18px;
  }

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