/* Web dashboard styling. Hand-written, no build step — served by Plug.Static.
   Restrained, high data-ink: a single text column, one accent, real tables. */

:root {
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --accent: #1a1a1a;
  --max: 760px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  font-size: 15px;
}

a {
  color: var(--accent);
}

/* MARK: flash */

.flash {
  max-width: var(--max);
  margin: 12px auto 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
}

.flash--info {
  background: #f1f5f9;
  color: #334155;
}

.flash--error {
  background: #fef2f2;
  color: #991b1b;
}

/* MARK: top bar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  font-size: 17px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__email {
  color: var(--muted);
  font-size: 13px;
}

.topbar__logout {
  margin: 0;
}

.topbar__logout button {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* MARK: page shell */

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.page h2 {
  font-size: 22px;
  margin: 8px 0 4px;
}

.page h3 {
  font-size: 16px;
  margin: 28px 0 8px;
}

.subtle,
.empty {
  color: var(--muted);
}

.subtle {
  font-size: 13px;
  margin: 0 0 20px;
}

.empty {
  font-size: 14px;
}

.back {
  margin: 0 0 6px;
  font-size: 13px;
}

.back a {
  color: var(--muted);
  text-decoration: none;
}

.back a:hover {
  text-decoration: underline;
}

/* MARK: review index cards */

.cards {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 10px;
}

.card__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  border-color: #cbd1d9;
}

.card__date {
  font-weight: 500;
}

.card__stats {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* MARK: review body (rendered Markdown carries its own inline styles) */

.review {
  margin: 18px 0 8px;
}

/* MARK: raw collapsed timeline */

.raw {
  margin: 16px 0;
  font-size: 13px;
}

.raw summary {
  cursor: pointer;
  color: var(--muted);
}

.raw pre,
.timeline + .raw pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 10px 0 0;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* MARK: tables (timelines) */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th,
td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

td.nowrap,
th + th {
  white-space: nowrap;
}

.display-summary {
  display: grid;
  gap: 5px;
}

.display-summary__overview {
  margin-bottom: 2px;
}

.display-summary__row {
  display: grid;
  grid-template-columns: minmax(140px, max-content) minmax(0, 1fr);
  gap: 10px;
}

.display-summary__label {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

/* MARK: chunk facts */

.facts ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.facts li {
  margin: 3px 0;
}

/* MARK: auth pages */

.auth {
  max-width: 360px;
  margin: 14vh auto 0;
  padding: 0 20px;
  text-align: center;
}

.auth h1 {
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
}

.auth__lead {
  color: var(--muted);
  margin: 0 0 26px;
}

.auth__form {
  text-align: left;
}

.field {
  display: block;
  margin: 0 0 16px;
}

.field span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid #cbd1d9;
  border-radius: 6px;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth__form button {
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

.auth__alt {
  margin: 18px 0 0;
  font-size: 13px;
}

.auth__alt a {
  color: var(--muted);
}
