/* Suggestions (/suggestions/) and its admin page (/suggestions/manage.php).
   Loaded after site.css.

   Dark and gray only (the user, 2026-11-11: "a dark color theme, no
   gradients, just gray"): the home page's neutral near-black tokens, flat
   surfaces, no shadows or tints. Chosen and voted states invert to light gray
   instead of taking a color. The colors: up votes in the Moments blue (the
   user, the same day: "make the upvotes have a color"), the Moments icon in
   the header, and the functional ones (the success and error lines, the
   admin's Delete). */

.ideas-theme {
  --paper: #0f0f11;
  --surface: #18181b;
  --surface-2: #1f1f23;
  --surface-3: #2a2a2f;
  --ink: #f4f4f5;
  --ink-soft: #a8a8ae;
  --rule: rgba(255, 255, 255, 0.09);
  --rule-strong: rgba(255, 255, 255, 0.18);
  --focus: #e4e4e7;
  --vote: #4f86e8;                       /* the Moments blue */
  --vote-ink: #9dbcff;                   /* text and arrows on the dark */
  --vote-soft: rgba(79, 134, 232, 0.12);
  --vote-edge: rgba(79, 134, 232, 0.45);
  --ok: #8fd6b6;
  --err: #ff9a94;
  color-scheme: dark;
}
.ideas-theme .site-header { border-bottom: 1px solid var(--rule); }
.ideas-theme .skip { background: var(--ink); color: var(--paper); }
.ideas-theme :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.ideas { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 112px); }
.ideas h1, .ideas h2, .ideas h3 { font-family: var(--font-display); font-weight: 600; }

/* The header: the Moments lockup, what the board is for, how it works, and
   what each status means. */
.ideas-head { padding-bottom: clamp(32px, 5vw, 48px); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink-soft); text-decoration: none; }
.brand-icon { width: 52px; height: 52px; border-radius: 12px; }
.brand-type { height: 30px; width: auto; }
.brand-sep { width: 1px; height: 26px; background: var(--rule-strong); }
.brand-label { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand:hover .brand-label { color: var(--ink); }
@media (max-width: 420px) {
  .brand { gap: 10px; }
  .brand-icon { width: 42px; height: 42px; border-radius: 10px; }
  .brand-type { height: 24px; }
  .brand-sep { height: 20px; }
  .brand-label { font-size: 1.05rem; }
}
.ideas-head h1 { margin: 26px 0 0; max-width: 16ch; font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.ideas-head .lede { margin: 16px 0 0; color: var(--ink-soft); max-width: 60ch; font-size: clamp(1.06rem, 1rem + 0.3vw, 1.18rem); }

.how { list-style: none; margin: clamp(28px, 4vw, 40px) 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .how { grid-template-columns: repeat(2, 1fr); } }
.how li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--rule); }
.how .step { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; background: var(--surface-3); color: var(--ink); }
.how b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-top: 4px; }
.how span:not(.step) { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

.legend { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-soft); font-size: 0.92rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }

.ideas-grid { display: grid; gap: 28px; margin-top: clamp(32px, 5vw, 52px); align-items: start; }
@media (min-width: 900px) {
  .ideas-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; }
  .suggest-card { position: sticky; top: 24px; }
}

/* ---------- The form ---------- */

.suggest-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 24px; padding: clamp(20px, 3vw, 28px); }
.suggest-card h2 { margin: 0 0 18px; font-size: 1.35rem; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea, .manage input[type="text"], .manage input[type="password"], .manage textarea, .manage select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 10px 12px;
}
.field textarea, .manage textarea { resize: vertical; min-height: 7em; line-height: 1.5; }
.field input:focus-visible, .field textarea:focus-visible, .manage input:focus-visible, .manage textarea:focus-visible, .manage select:focus-visible { outline-offset: 0; border-color: var(--focus); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.count, .hint { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.count:empty { display: none; }
.hint a { color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send, .manage .btn {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
}
.send:disabled { opacity: 0.6; cursor: progress; }
.form-status { margin: 14px 0 0; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

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

.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.board-head h2 { margin: 0; font-size: 1.35rem; }
.sort { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); }
.sort button {
  font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  padding: 6px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-soft);
}
.sort button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }
.board-note { margin: 10px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.board-status { margin: 18px 0 0; color: var(--ink-soft); }
.board-status:empty { display: none; }

.idea-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.idea {
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start;
  padding: 16px 18px 16px 12px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--rule);
}
.idea h3 { margin: 2px 0 0; font-size: 1.12rem; line-height: 1.3; overflow-wrap: anywhere; }
.idea .body { margin: 6px 0 0; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.idea .meta { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.9rem; color: var(--ink-soft); }

/* Statuses in three steps of gray: outlined, filled, inverted. The words
   carry the meaning. */
.status { padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); border: 1px solid var(--rule-strong); }
.status.planned { color: var(--ink); background: var(--surface-3); border-color: var(--surface-3); }
.status.shipped { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.vote { display: grid; justify-items: center; gap: 2px; }
.vote button {
  width: 40px; height: 34px; display: grid; place-items: center; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--rule-strong); background: var(--surface-2); color: var(--ink-soft);
}
.vote button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.vote button:hover { color: var(--ink); }
/* Up votes are the one color on the board: the Moments blue, flat. */
.vote .up { color: var(--vote-ink); border-color: var(--vote-edge); background: var(--vote-soft); }
.vote .up:hover { color: #fff; border-color: var(--vote); }
.vote .up[aria-pressed="true"] { background: var(--vote); border-color: var(--vote); color: #fff; }
.vote .n { color: var(--vote-ink); }
.vote .down { height: 28px; border-color: transparent; background: transparent; }
.vote .down[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }
.vote .n { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.2; }
.vote button:disabled { cursor: progress; }

@media (prefers-contrast: more) {
  .ideas-theme { --rule: rgba(255, 255, 255, 0.4); --rule-strong: rgba(255, 255, 255, 0.6); --ink-soft: #d4d4d8; }
}

/* ---------- Admin (/suggestions/manage.php) ---------- */

.manage { padding-block: 32px 80px; }
.manage .wrap { max-width: 900px; }
.manage h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; margin: 0 0 6px; }
.manage h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 40px 0 12px; }
.manage .flash { padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--rule-strong); font-weight: 700; }
.manage .flash.err { color: var(--err); border-color: var(--err); }
.manage .card { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: 18px; margin-top: 12px; display: grid; gap: 10px; }
.manage .card form { display: grid; gap: 10px; }
.manage .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.manage .row > * { width: auto; }
.manage .card form.row { display: flex; }
.manage .btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.manage .btn.danger { background: #b3302d; border-color: #b3302d; color: #fff; }
.manage .note { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.manage .tally { font-family: var(--font-display); font-weight: 600; margin: 0; }
.manage .narrow { max-width: 420px; }
.manage label { font-weight: 700; display: grid; gap: 6px; }
.manage details summary { cursor: pointer; color: var(--ink-soft); }
.manage input.id { width: 90px; }
