/* /private — cinematic dark, two view modes (poetic ⇄ operator).
   Self-contained: fonts + palette + UI; no main /styles.css link. */

@font-face {
  font-family: 'Cinzel'; font-weight: 400 600; font-display: swap;
  src: url('/fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-weight: 400 600; font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-deep:    #06080b;
  --surface:    rgba(220, 230, 245, 0.04);
  --surface-hi: rgba(220, 230, 245, 0.08);
  --border:     rgba(220, 230, 245, 0.10);
  --text:       #e8eef5;
  --text-dim:   #9aa3b0;
  --text-faint: #5f6773;
  --accent:     #5fb4c4;
  --accent-warm:#e36a4d;
  --ok:         #6acf6a;
  --bad:        #e35e4d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100vh; }
body {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(95, 180, 196, 0.06) 0%, transparent 60%),
    var(--bg-deep);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  padding: 28px 32px 60px;
  -webkit-font-smoothing: antialiased;
}

/* ───── HEADER ─────────────────────────────────────────── */
.head { display: flex; align-items: center; gap: 24px; max-width: 960px; margin: 0 auto 32px; }
.head h1 {
  font-family: 'Cinzel', serif; font-weight: 500; font-size: 22px;
  letter-spacing: 0.42em; text-indent: 0.42em; text-transform: lowercase;
}
.head .back {
  font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 0.32em;
  color: var(--text-faint); text-decoration: none; transition: color 220ms;
}
.head .back:hover { color: var(--accent); }

.mode-toggle { margin-left: auto; display: flex; gap: 0; }
.mode-btn {
  font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 0.18em;
  text-transform: lowercase;
  background: transparent; border: 1px solid var(--border); color: var(--text-faint);
  padding: 8px 14px; cursor: pointer; transition: all 200ms;
}
.mode-btn:first-child { border-radius: 4px 0 0 4px; }
.mode-btn:last-child  { border-radius: 0 4px 4px 0; margin-left: -1px; }
.mode-btn:hover:not(.active) { color: var(--text); }
.mode-btn.active {
  color: var(--text); border-color: var(--accent);
  background: rgba(95, 180, 196, 0.10);
}

/* ───── VIEWS ──────────────────────────────────────────── */
.view { max-width: 960px; margin: 0 auto; }
.view[hidden] { display: none; }

/* ───── POETIC ─────────────────────────────────────────── */
.section { margin-bottom: 44px; }
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  padding: 0 4px 8px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.section-num   { font-family: 'Cinzel', serif; font-size: 12px; color: var(--accent-warm); letter-spacing: 0.12em; min-width: 18px; }
.section-title { font-family: 'Cinzel', serif; font-size: 22px; letter-spacing: 0.18em; text-transform: lowercase; }
.section-kicker { font-family: 'Cinzel', serif; font-size: 11px; color: var(--text-faint); font-style: italic; margin-left: auto; }

.cards { display: flex; flex-direction: column; gap: 8px; }
.card {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 14px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: var(--text);
  transition: background 200ms, border-color 200ms;
}
a.card:hover { background: var(--surface-hi); border-color: rgba(95, 180, 196, 0.4); }
.card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-title { font-family: 'Cinzel', serif; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-url   { font-family: ui-monospace, 'SF Mono', monospace; font-size: 11.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-note  { font-size: 12px; color: rgba(220, 232, 245, 0.78); font-style: italic; line-height: 1.4; }
.card-meta  { font-size: 11px; color: var(--text-dim); }

/* ───── STATUS DOT + BADGES ───────────────────────────── */
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint); flex-shrink: 0;
}
.dot.running { background: var(--ok); box-shadow: 0 0 6px rgba(106, 207, 106, 0.5); }
.dot.down    { background: var(--bad); box-shadow: 0 0 6px rgba(227, 94, 77, 0.5); }
.dot.unknown { background: var(--text-faint); }

.b {
  display: inline-block;
  font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 0.24em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
  border: 1px solid var(--border); color: var(--text-dim);
}
.b--in-progress { color: #b8c4ff; border-color: rgba(184, 196, 255, 0.5); }
.b--shipped     { color: var(--ok); border-color: rgba(106, 207, 106, 0.5); }
.b--paused      { color: var(--text-faint); }
.b--parked      { color: var(--text-faint); opacity: 0.65; }
.b--idea        { color: var(--accent-warm); border-color: rgba(227, 106, 77, 0.5); }
.b--cf-access,
.b--tailscale   { color: var(--accent); border-color: rgba(95, 180, 196, 0.5); }
.b--lan-only    { color: #ffd86c; border-color: rgba(255, 216, 108, 0.5); }

/* ───── OPERATOR — filters + table ────────────────────── */
.filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-search, .filters select {
  font-family: inherit; font-size: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 7px 10px; border-radius: 4px;
}
.filter-search { min-width: 180px; }
.filter-search:focus, .filters select:focus { outline: none; border-color: var(--accent); }
.filter-count { font-size: 11px; color: var(--text-dim); margin-left: auto; font-family: ui-monospace, monospace; }

.operator-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.operator-table th, .operator-table td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.operator-table th {
  font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-faint);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.operator-table th:hover { color: var(--accent); }
.operator-table th[aria-sort="ascending"]::after  { content: ' ▴'; }
.operator-table th[aria-sort="descending"]::after { content: ' ▾'; }
.operator-table td { font-family: ui-monospace, 'SF Mono', monospace; color: var(--text); word-break: break-word; }
.operator-table td.col-name { font-family: 'Inter', sans-serif; font-weight: 500; }
.operator-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.operator-table a { color: var(--accent); text-decoration: none; }
.operator-table a:hover { text-decoration: underline; }

/* ───── STATUS MESSAGE + FOOTER ───────────────────────── */
.status-msg {
  max-width: 960px; margin: 24px auto; min-height: 1em;
  font-size: 12px; color: var(--text-faint); text-align: center;
}

footer {
  margin: 60px 0 0; text-align: center;
  font-family: 'Cinzel', serif; font-size: 10px;
  color: var(--text-faint); letter-spacing: 0.42em;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  body { padding: 16px 16px 60px; }
  .head { flex-wrap: wrap; }
  .mode-toggle { margin-left: 0; width: 100%; }
  .operator-table { font-size: 11px; }
  .operator-table th, .operator-table td { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
