/* servernight — static launch checklist
   No external assets. System monospace stack, inline SVG only. */

:root {
  --bg: #0c0a08;
  --bg-grad-a: #120f0a;
  --bg-grad-b: #0a0907;
  --panel: rgba(24, 20, 14, 0.72);
  --panel-solid: #18120c;
  --border: rgba(255, 176, 0, 0.16);
  --border-strong: rgba(255, 176, 0, 0.34);
  --rule: rgba(255, 220, 160, 0.08);

  --ink: #e9e1d2;
  --ink-dim: #a99e88;
  --ink-faint: #6b6253;

  --amber: #ffb000;
  --amber-soft: #d98a00;
  --green: #3fb950;
  --green-soft: #2ea043;
  --danger: #f85149;
  --danger-soft: #b3261e;

  --radius: 10px;
  --radius-sm: 6px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", "DejaVu Sans Mono", monospace;

  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --focus: 0 0 0 3px rgba(255, 176, 0, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mono);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 176, 0, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(63, 185, 80, 0.06), transparent 60%),
    linear-gradient(160deg, var(--bg-grad-a), var(--bg-grad-b));
  background-attachment: fixed;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px) 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* faint scanline grid for console feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 220, 160, 0.018) 0 1px, transparent 1px 3px);
  z-index: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--amber);
  color: #1a1300;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 5;
}
.skip-link:focus { left: 8px; }

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

/* ---------- header ---------- */
.app__header {
  padding: clamp(18px, 4vw, 26px) clamp(18px, 4vw, 26px) 20px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.05), transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}
.brand__rack { fill: none; stroke: var(--amber); stroke-width: 1.6; }
.brand__led { fill: var(--ink-faint); }
.brand__led--on { fill: var(--green); }

.brand__text h1 {
  margin: 0;
  font-size: clamp(18px, 5vw, 22px);
  letter-spacing: 0.02em;
  font-weight: 700;
  color: var(--ink);
}
.brand__accent { color: var(--amber); }
.brand__accent::before { content: "."; color: var(--amber); }
.bootline {
  margin: 2px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.status {
  flex: 1 1 180px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status__bar {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.status__bar::-webkit-progress-bar {
  background: rgba(0, 0, 0, 0.4);
}
.status__bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--green-soft), var(--green));
  border-radius: 999px;
  transition: width 0.25s ease;
}
.status__bar::-moz-progress-bar {
  background: linear-gradient(90deg, var(--green-soft), var(--green));
  border-radius: 999px;
}
.status__row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-dim);
}
.status__pct {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ---------- main ---------- */
.app__main {
  padding: clamp(16px, 4vw, 24px);
}

/* add form */
.add {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.add__field {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}
.add__label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden;
}
.add__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.add__input::placeholder { color: var(--ink-faint); }
.add__input:focus-visible {
  outline: none;
  border-color: var(--amber);
  box-shadow: var(--focus);
}
.add__btn {
  flex: none;
  height: 44px;
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a1300;
  background: linear-gradient(180deg, var(--amber), var(--amber-soft));
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.add__btn:hover { filter: brightness(1.06); }
.add__btn:active { transform: translateY(1px); }
.add__btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* list */
.list { margin-top: 20px; }
.list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.list__heading {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}
.list__clear {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.list__clear:hover { color: var(--danger); border-color: var(--danger-soft); background: rgba(248, 81, 73, 0.08); }
.list__clear:focus-visible { outline: none; box-shadow: var(--focus); }

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.06s ease;
  animation: slidein 0.18s ease;
}
@keyframes slidein {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.item:hover { border-color: var(--border-strong); background: rgba(255, 176, 0, 0.04); }

.item__check {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--ink-faint);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  position: relative;
  flex: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.item__check:hover { border-color: var(--amber); }
.item__check:focus-visible { outline: none; box-shadow: var(--focus); }
.item__check:checked {
  background: var(--green);
  border-color: var(--green);
}
.item__check:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #06140a;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(43deg);
}

.item__text {
  font-size: 14px;
  color: var(--ink);
  word-break: break-word;
  min-width: 0;
}
.item--done .item__text {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--green-soft);
  text-decoration-thickness: 1.5px;
}

.item__del {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.item__del:hover { color: var(--danger); border-color: var(--danger-soft); background: rgba(248, 81, 73, 0.1); }
.item__del:focus-visible { outline: none; box-shadow: var(--focus); }

/* empty state */
.empty {
  margin: 18px 0 4px;
  padding: 34px 18px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.empty__glyph {
  font-size: 22px;
  color: var(--amber-soft);
  letter-spacing: 0.1em;
}
.empty__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-dim);
}
.empty__hint {
  font-size: 12px;
  color: var(--ink-faint);
  max-width: 36ch;
}

/* footer */
.app__footer {
  padding: 14px clamp(18px, 4vw, 26px);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer__link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.footer__link:hover { text-decoration-color: var(--amber); }
.footer__link:focus-visible { outline: none; box-shadow: var(--focus); }

@media (max-width: 420px) {
  .add { flex-wrap: wrap; }
  .add__btn { width: 100%; }
}

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