/* Kem's List — calm, Tempo-like. Shared by the public site and the desk. */
:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --ink: #2b2b2b;
  --ink-soft: #555555;
  --muted: #8a8a8a;
  --line: #ececec;
  --hover: #efefef;
  --accent: #1d1df0;
  --accent-ink: #ffffff;
  --avatar: #e4e4e4;
  --warn: #b25b00;
  --danger: #c0352b;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1b;
    --surface: #232323;
    --ink: #e6e6e6;
    --ink-soft: #bdbdbd;
    --muted: #8d8d8d;
    --line: #2f2f2f;
    --hover: #2a2a2a;
    --accent: #8c8cff;
    --accent-ink: #15153a;
    --avatar: #3a3a3a;
    --warn: #e0a050;
    --danger: #ff7b70;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar (Tempo's quiet tab row) ---------- */
.top {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 16px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.brand { font-weight: 600; text-decoration: none; font-size: 15px; }
.top nav { display: flex; gap: 18px; font-size: 14px; }
.top nav a, .top nav button { color: var(--muted); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.top nav a:hover, .top nav button:hover, .top nav .on { color: var(--ink); }

/* ---------- list ---------- */
.list { max-width: 820px; margin: 0 auto; padding: 8px 16px 64px; }
.intro { color: var(--muted); margin: 6px 0 26px; font-size: 14px; }
.group { font-size: 13px; font-weight: 500; color: var(--muted); margin: 26px 0 6px; padding-left: 10px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 170px) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}
.row:hover, .row.is-active { background: var(--hover); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--avatar); color: var(--ink-soft);
  font-size: 12px; font-weight: 600;
  object-fit: cover;
}
.from { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject strong { font-weight: 500; }
.snippet { color: var(--muted); }
.row time, .row .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.lang { font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 8px; vertical-align: 1px; }
.badge { font-size: 11px; color: var(--warn); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }

.empty { text-align: center; padding: 120px 16px; color: var(--muted); }
.empty-title { color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* ---------- buttons (desk) ---------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 0;
  font-size: 15px;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.title { font-size: 26px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -0.01em; }
.byline { margin: 0; font-weight: 500; }
.meta { margin: 2px 0 24px; color: var(--muted); font-size: 13px; }
.excerpt { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 28px; }

/* On wider screens a long title truncates, but its language tag stays in view. */
@media (min-width: 641px) {
  a.row .subject:has(.lang) { display: flex; align-items: baseline; }
  a.row .subject:has(.lang) strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  a.row .subject .lang { flex: none; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "av subj subj" "av from when"; row-gap: 2px; }
  .from { text-align: left; font-size: 13px; }
  .avatar { grid-area: av; align-self: start; margin-top: 2px; }
  .from { grid-area: from; }
  .row time, .row .when { grid-area: when; }
  .subject { grid-area: subj; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .title { font-size: 22px; }
}

@media (prefers-reduced-motion: no-preference) {
  .row { transition: background-color 120ms ease; }
}
