:root {
  --bg0: #0b1210;
  --bg1: #12201a;
  --panel: rgba(18, 32, 26, 0.88);
  --line: rgba(168, 214, 186, 0.18);
  --ink: #e8f3ec;
  --muted: #9bb5a6;
  --accent: #6fd3a0;
  --accent2: #c8f26a;
  --danger: #ff7a7a;
  --ok: #6fd3a0;
  --warn: #f0c674;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg0);
  line-height: 1.5;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(111, 211, 160, 0.22), transparent 60%),
    radial-gradient(700px 480px at 90% 10%, rgba(200, 242, 106, 0.12), transparent 55%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #0a100e);
}

.top {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand em { font-style: normal; color: var(--accent); }
.mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 8px 24px rgba(111,211,160,0.25);
}
nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
nav a, .linkish {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
nav a:hover, .linkish:hover { color: var(--ink); }

main { max-width: 980px; margin: 0 auto; padding: 28px 20px 64px; }
.hero { margin: 18px 0 28px; max-width: 720px; }
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
h2 { margin: 0 0 8px; font-size: 1.2rem; }
.lede { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 54ch; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4fbf86);
  color: #062016;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); }

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 18px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.panel-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.meter {
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--muted);
  text-align: right;
}
.meter strong { display: block; color: var(--ink); font-weight: 500; }

.drop {
  border: 1.5px dashed rgba(111, 211, 160, 0.45);
  border-radius: 16px;
  min-height: 180px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(8, 14, 12, 0.45);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop:hover, .drop:focus-visible, .drop.drag {
  border-color: var(--accent2);
  background: rgba(111, 211, 160, 0.08);
  outline: none;
}
.drop-inner { text-align: center; padding: 24px; }
.drop .icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent), rgba(111, 211, 160, 0.2);
  position: relative;
}
.drop .icon::before {
  content: "";
  position: absolute;
  inset: 12px 14px 10px;
  border: 2px solid var(--accent);
  border-top: 0;
  border-radius: 0 0 6px 6px;
}
.drop .icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 2px;
  height: 14px;
  background: var(--accent2);
  transform: translateX(-50%);
}
.drop p { margin: 0 0 6px; }
.hint { color: var(--muted); font-family: var(--mono); font-size: 0.75rem !important; }

.jobs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.jobs li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.22);
}
.jobs .name { font-weight: 600; font-size: 0.95rem; }
.jobs .meta { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }
.jobs .state { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.jobs .state.err { color: var(--danger); }
.bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(12, 20, 16, 0.55);
}
.grid h3 { margin: 0 0 8px; font-size: 1rem; }
.grid p { margin: 0; color: var(--muted); font-size: 0.92rem; }
code, em.hl { color: var(--accent2); font-style: normal; }
code { font-family: var(--mono); font-size: 0.85em; }

.foot {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

/* auth */
.auth-card { max-width: 440px; margin: 40px auto; }
.field { margin: 14px 0; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111,211,160,0.15);
}
.note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-size: 0.92rem;
  display: none;
}
.note.show { display: block; }
.note strong { color: var(--ink); }

/* library */
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search {
  flex: 1;
  min-width: 180px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th, .table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.table tr:hover td { background: rgba(111,211,160,0.04); }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.ok { color: var(--ok); border-color: rgba(111,211,160,0.35); }
.badge.exp { color: var(--warn); border-color: rgba(240,198,116,0.35); }
.badge.gone { color: var(--danger); border-color: rgba(255,122,122,0.35); }
.row-actions { display: flex; gap: 8px; }
.row-actions button, .row-actions a {
  font: inherit;
  font-size: 0.8rem;
  color: var(--accent2);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.empty {
  text-align: center;
  padding: 36px 12px;
  color: var(--muted);
}

.prose { color: var(--muted); max-width: 68ch; }
.prose p { margin: 0 0 12px; }
.prose h2 { color: var(--ink); margin: 22px 0 8px; font-size: 1.05rem; }
.prose ul { margin: 0 0 12px; padding-left: 1.2rem; }

.trust {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.trust div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.18);
}
.trust strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.trust span { color: var(--muted); font-size: 0.82rem; }

.feed {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.feed-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.feed-row:first-child { border-top: 0; }
.feed-row span { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }

.price {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.price article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(12, 20, 16, 0.55);
}
.price .amt { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; margin: 8px 0; }
.price ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 800px) {
  .grid, .trust, .price { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; }
  .table .hide-sm { display: none; }
}

body[data-product="drive"] {
  --accent: #7eb6ff;
  --accent2: #b7f0ff;
  --bg0: #0a0f16;
  --bg1: #121a28;
  --panel: rgba(16, 24, 38, 0.88);
  --line: rgba(126, 182, 255, 0.18);
  --muted: #9aa8bf;
}
body[data-product="drive"] .bg {
  background:
    radial-gradient(900px 500px at 18% -8%, rgba(126, 182, 255, 0.2), transparent 60%),
    radial-gradient(700px 480px at 92% 8%, rgba(183, 240, 255, 0.1), transparent 55%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #080c12);
}
body[data-product="drive"] .btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a8fd6);
  color: #041018;
}

/* live ops strip */
.ops {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin: 0 0 22px;
}
.ops-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.22);
}
.ops-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(111, 211, 160, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
}
body[data-product="drive"] .live-pill {
  border-color: rgba(126, 182, 255, 0.35);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(111, 211, 160, 0.55);
}
.pulse.beat {
  animation: pulseBeat 0.7s ease-out;
}
@keyframes pulseBeat {
  0% { box-shadow: 0 0 0 0 rgba(111, 211, 160, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(111, 211, 160, 0); }
}
.ops-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.ops-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.ops-grid strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.ops-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-family: var(--mono);
}
.spark {
  width: 100%;
  height: 36px;
  color: var(--accent);
  display: block;
  margin-top: 8px;
}
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px 0;
}
.feed-head h2 {
  margin: 0;
  font-size: 0.95rem;
}
.feed-head span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.feed .feed-row:first-of-type {
  animation: rowIn 0.35s ease;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 800px) {
  .ops { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: 1fr; }
}
