/* Nymeet — one family (IBM Plex Sans), a cool light base, teal accent, status stripes. */
:root {
  --page: #E9EEF0;
  --surface: #FFFFFF;
  --ink: #1B1F24;
  --ink-2: #5B6B7A;
  --line: #D3DADF;
  --accent: #0F6E6E;
  --accent-ink: #FFFFFF;
  --queued: #5B6B7A;
  --running: #1F5FBF;
  --paused: #B26A00;
  --submitted: #1E7F4F;
  --failed: #B3261E;
  --skipped: #8A8F95;
  --cancelled: #8A8F95;
  --radius: 6px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #171A1D;
    --surface: #22262B;
    --ink: #EEF1F3;
    --ink-2: #9AA6B2;
    --line: #353B42;
    --accent: #3FA9A9;
    --accent-ink: #0F1416;
    --running: #6EA3F5;
    --paused: #E0A24D;
    --submitted: #5CC08A;
    --failed: #F07A72;
  }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.top nav { margin-left: auto; display: flex; gap: 4px; }
.top nav a {
  text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: var(--radius);
  position: relative;
}
.top nav a[aria-current="page"] { color: var(--ink); background: var(--page); }
.badge {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 10px; background: var(--paused); color: #fff; font-size: 12px; line-height: 20px;
  text-align: center; vertical-align: 1px;
}
.badge:empty { display: none; }

main { max-width: 720px; margin: 0 auto; padding: 16px; }
h2 { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 24px 0 8px; }
h2:first-child { margin-top: 4px; }

/* The ledger: one row per application, status carried by the left stripe. */
.ledger { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ledger li { border-top: 1px solid var(--line); }
.ledger li:first-child { border-top: 0; }
.ledger a {
  display: grid; grid-template-columns: 6px 1fr auto; gap: 0 12px; align-items: center;
  padding: 12px 14px 12px 0; color: inherit; text-decoration: none;
}
.ledger a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.stripe { align-self: stretch; border-radius: 0 3px 3px 0; background: var(--queued); }
.stripe[data-status="running"] { background: var(--running); }
.stripe[data-status="paused"] { background: var(--paused); }
.stripe[data-status="submitted"] { background: var(--submitted); }
.stripe[data-status="failed"] { background: var(--failed); }
.stripe[data-status="skipped"], .stripe[data-status="cancelled"] { background: var(--skipped); }
.row-title { font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.row-sub { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.row-meta { text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.status { font-weight: 600; color: var(--queued); }
.status[data-status="running"] { color: var(--running); }
.status[data-status="paused"] { color: var(--paused); }
.status[data-status="submitted"] { color: var(--submitted); }
.status[data-status="failed"] { color: var(--failed); }

.empty { padding: 32px 16px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel + .panel { margin-top: 12px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
pre.letter { white-space: pre-wrap; margin: 0; font: inherit; line-height: 1.55; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none; font-weight: 600;
}
.btn.secondary { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; border-color: var(--failed); color: var(--failed); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; justify-content: center; }

label.field { display: block; margin: 12px 0; }
label.field > span { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: 14px; }
input[type="text"], input[type="password"], input[type="url"], textarea, select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--page);
}
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; min-height: 320px; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--ink-2); }
.timeline li[data-level="error"] .msg { color: var(--failed); }
.timeline li[data-level="warn"] .msg { color: var(--paused); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.shots img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.shots figcaption { font-size: 12px; color: var(--ink-2); }

.question { padding: 14px 16px; }
.question p { margin: 0 0 6px; }
.question .meta { color: var(--ink-2); font-size: 14px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.options .btn { padding: 7px 12px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: var(--radius);
  max-width: calc(100% - 32px); z-index: 3;
}
.toast[hidden] { display: none; }

/* Share result screen: one big verdict, nothing else competing. */
.verdict { text-align: center; padding: 48px 16px 24px; }
.verdict .word { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
.verdict .word[data-status="queued"] { color: var(--accent); }
.verdict .word[data-status="duplicate"] { color: var(--paused); }
.verdict .word[data-status="skipped"], .verdict .word[data-status="error"] { color: var(--failed); }
.verdict .detail { color: var(--ink-2); margin: 8px 0 0; }
.verdict .url { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; margin-top: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .verdict .word { animation: settle .35s ease-out; }
  @keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
