/*
 * Press Console — one stylesheet, no framework.
 *
 * The look is Jose's ~/Plan review pages: near-black, monospace, one accent per
 * meaning. Review is reading work, so the page gets out of the way and the post
 * text is the only thing with contrast.
 */

:root {
  --bg: #0a0c11;
  --panel: #11141c;
  --sunk: #0d0f16;
  --line: #1c2030;
  --line-bright: #2a3048;
  --text: #d8dae8;
  --dim: #6b7288;
  --dimmer: #4a5065;
  --accent: #9945ff;
  --go: #14f195;
  --warn: #ffaa44;
  --stop: #ff5c6c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.65;
  padding: 0 24px 64px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 19px; font-weight: 700; color: #fff; margin: 18px 0 4px; }
h2 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--go); margin: 30px 0 10px; }
h3 { font-size: 12px; font-weight: 600; color: var(--text); margin: 0 0 6px; }

p { margin-bottom: 10px; }

.wrap { max-width: 860px; margin: 0 auto; }
.wrap-wide { max-width: 1200px; margin: 0 auto; }

.subtitle { font-size: 11px; color: var(--dim); margin-bottom: 20px; }

/* --- nav ----------------------------------------------------------------- */

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav .brand { color: #fff; font-weight: 700; letter-spacing: 2px; text-decoration: none; }
.nav a { color: var(--dim); }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .spacer { flex: 1; }

/* --- flashes ------------------------------------------------------------- */

.flash { border-radius: 6px; padding: 9px 12px; font-size: 12px; margin: 14px 0; }
.flash.notice { background: #14f1951a; border: 1px solid #14f19544; color: var(--go); }
.flash.alert { background: #ff5c6c1a; border: 1px solid #ff5c6c55; color: var(--stop); }

/* --- X preview card ------------------------------------------------------ */

.x-card {
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.x-identity { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }

.x-avatar {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #14f195);
  color: #0a0c11;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.x-name { color: #fff; font-weight: 700; font-size: 12px; }
.x-handle { color: var(--dim); font-size: 12px; }
.x-body { white-space: pre-wrap; font-size: 13px; line-height: 1.75; color: #e6e8f2; }
.x-image { margin-top: 10px; }
.x-image img { max-width: 100%; max-height: 340px; border: 1px solid var(--line-bright); border-radius: 10px; display: block; }

/* A thread reads top to bottom as one column, the way X stacks it. The rule down
   the left is the connector between a tweet and the reply carrying the next. */
.x-thread { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--line-bright); padding-left: 12px; }
.x-position { margin-left: auto; font-size: 10px; letter-spacing: 1.5px; color: var(--dim); }

.x-card.reply { margin-top: 8px; margin-left: 18px; border-left: 2px solid var(--accent); }
.x-card.reply .x-handle::after { content: " · replying to itself"; color: var(--dimmer); }

/* --- queue --------------------------------------------------------------- */

.queue-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.queue-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.queue-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

.meta { font-size: 11px; color: var(--dim); }
.meta + .meta::before { content: "·"; margin-right: 8px; color: var(--dimmer); }

.pill {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: var(--dim);
}
.pill.draft { color: var(--dim); }
.pill.approved { color: var(--go); border-color: #14f19544; }
.pill.scheduled { color: var(--warn); border-color: #ffaa4444; }
.pill.published { color: var(--accent); border-color: #9945ff55; }
.pill.rejected { color: var(--stop); border-color: #ff5c6c44; }
.pill.kind { color: var(--dimmer); }

/* --- controls ------------------------------------------------------------ */

button, .btn, input[type="submit"] {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid var(--line-bright);
  background: #171b26;
  color: var(--text);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover, .btn:hover { background: #1d2231; text-decoration: none; }
button.go { background: var(--go); border-color: var(--go); color: #05230f; }
button.go:hover { background: #0fd484; }
button.primary, input[type="submit"].primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, input[type="submit"].primary:hover { background: #7d35d4; }
button.quiet { background: transparent; color: var(--dim); }
button.danger { background: transparent; border-color: #ff5c6c44; color: var(--stop); }
button.copied { background: var(--go); border-color: var(--go); color: #05230f; }
/* The clipboard can refuse — a denied permission, an unfocused page. Silence
   would read as a copy that worked. */
button.copy-failed { background: transparent; border-color: #ff5c6c44; color: var(--stop); }

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="datetime-local"], input[type="file"] {
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  background: var(--sunk);
  color: var(--text);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.7;
}
textarea:focus, input:focus { outline: none; border-color: var(--accent); }

label { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); margin: 14px 0 5px; }

.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input[type="url"], .inline-form input[type="datetime-local"] { width: auto; min-width: 210px; font-size: 12px; padding: 6px 10px; }

/* --- panels -------------------------------------------------------------- */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.note { background: #9945ff12; border: 1px solid #9945ff33; border-radius: 6px; padding: 9px 12px; font-size: 11px; color: #b9a6dd; }
.empty { color: var(--dimmer); font-size: 12px; padding: 10px 0; }

/* --- images -------------------------------------------------------------- */

.image-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.image-tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px; width: 168px; }
.image-tile.selected { border-color: var(--go); }
.image-tile img { width: 100%; height: 108px; object-fit: cover; border-radius: 5px; background: #05060a; display: block; }
.image-tile .filename { font-size: 10px; color: var(--dim); margin: 6px 0; word-break: break-all; }
.image-tile .tile-actions { display: flex; gap: 6px; }

/* The forty seconds a paint takes. This pulse is the only thing on the page
   saying the job is still out there, so it stops only when the broadcast
   replaces the region. */
.generating { color: var(--warn); font-size: 12px; padding: 10px 0; animation: generating-pulse 1.5s ease-in-out infinite; }
.image-failed { color: var(--stop); font-size: 12px; padding: 10px 0; }

@keyframes generating-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .generating { animation: none; } }

/* --- board --------------------------------------------------------------- */

.board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.board-day { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 130px; }
.board-day.today { border-color: var(--accent); }
.board-day h3 { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.board-card { background: var(--sunk); border: 1px solid var(--line-bright); border-radius: 6px; padding: 8px; margin-bottom: 8px; font-size: 11px; }
.board-card .at { color: var(--warn); font-size: 10px; }
.board-card .snippet {
  color: var(--dim);
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }

/* --- export -------------------------------------------------------------- */

.export-block { position: relative; margin-bottom: 18px; }
.export-text {
  background: var(--sunk);
  border: 1px solid var(--line-bright);
  border-left: 3px solid var(--go);
  border-radius: 0 8px 8px 0;
  padding: 16px 18px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
}
.export-block.reply .export-text { border-left-color: var(--accent); }
.export-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.export-head .label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }

/* --- candidates ---------------------------------------------------------- */

.candidate { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.candidate .text { white-space: pre-wrap; color: var(--text); margin: 6px 0 10px; font-size: 12px; }
.candidate .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.candidate.done { opacity: 0.55; }

/* --- gate ---------------------------------------------------------------- */

.pill.pass { color: var(--go); border-color: #14f19544; }
.pill.fail { color: var(--stop); border-color: #ff5c6c44; }
.pill.pending { color: var(--warn); border-color: #ffaa4444; }

.gate-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

.gate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gate-stat { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.gate-stat.met { border-color: #14f19544; }
.gate-stat strong { display: block; font-size: 22px; color: #fff; line-height: 1.3; }
.gate-stat span { display: block; font-size: 11px; color: var(--dim); }
.gate-stat .caveat { color: var(--dimmer); margin-top: 6px; }

.gate-labels { list-style: none; margin-top: 14px; font-size: 11px; color: var(--warn); }
.gate-labels li { padding: 3px 0 3px 12px; border-left: 2px solid #ffaa4444; margin-bottom: 4px; }

@media (max-width: 700px) { .gate-grid { grid-template-columns: 1fr; } }

/* --- login --------------------------------------------------------------- */

/* The one page with no nav: a single centered card. Sole admin, so no reset
   link — just email, password, sign in. */
.login { min-height: 82vh; display: flex; align-items: center; justify-content: center; }

.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 26px 30px;
}

.login-brand { color: #fff; font-weight: 700; letter-spacing: 2px; font-size: 15px; }
.login-sub { color: var(--dim); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin: 2px 0 8px; }
.login-submit { width: 100%; margin-top: 20px; padding: 10px; font-size: 12px; }

/* --- tables (spend, inherited) ------------------------------------------- */

table { border-collapse: collapse; width: 100%; font-size: 12px; margin-bottom: 18px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 600; font-size: 11px; }
