/* Vals brand, from benchmark-fe: Uncut Sans, "gravy" neutrals, "vreen" accent. */
@font-face {
  font-family: "Uncut Sans";
  src: url("UncutSans-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-subtle: #fafaf9;
  --fg: #292623;
  --muted: #595654;
  --border: #dedbd8;
  --accent: #008566;
  --accent-soft: #ecfdf5;
  --button-bg: #292623;
  --button-fg: #ffffff;
  --error: #b42318;
  font-family: "Uncut Sans", system-ui, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a16;
    --bg-subtle: #292623;
    --fg: #fafaf9;
    --muted: #b2aca9;
    --border: #474543;
    --accent: #00bc7d;
    --accent-soft: #113c2f;
    --button-bg: #fafaf9;
    --button-fg: #1d1a16;
    --error: #ff8a80;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  accent-color: var(--accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px;
  color: var(--muted);
  font-size: 0.9em;
}

.brand img {
  display: block;
}

.brand .logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .brand .logo-light {
    display: none;
  }

  .brand .logo-dark {
    display: block;
  }
}

.brand span {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 64px;
}

h1 {
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 8px 0 24px;
}

h2 {
  font-size: 1.1em;
  font-weight: 600;
}

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

code {
  font-size: 0.9em;
}

.guides {
  margin: 12px 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.guides details {
  border-bottom: 1px solid var(--border);
}

.guides details:last-child {
  border-bottom: 0;
}

.guides summary {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
}

.guides summary::before {
  content: "▸";
  color: var(--muted);
}

.guides details[open] summary::before {
  content: "▾";
}

.guides .meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85em;
  font-weight: normal;
}

.guides ol,
.guides ul {
  margin: 0;
  padding: 0 12px 12px 44px;
}

.guides li {
  margin: 4px 0;
}

.hint {
  color: var(--muted);
  font-size: 0.9em;
}

.bonus {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9em;
  font-weight: 500;
}

button {
  margin-top: 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--button-fg);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

button.secondary {
  margin-top: 0;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.error {
  color: var(--error);
  font-weight: 600;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  padding: 20px 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragging,
.drop-zone:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-label {
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-weight: 500;
}

.file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.file-list .file {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.file-list .file:last-child {
  border-bottom: 0;
}

.file .icon::before {
  content: "…";
  color: var(--muted);
}

.file.ok .icon::before {
  content: "✓";
  color: var(--accent);
}

.file.failed .icon::before {
  content: "!";
  color: var(--error);
  font-weight: 700;
}

.file .text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.file .name {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.file .status {
  color: var(--muted);
  font-size: 0.9em;
}

.file.failed .status {
  color: var(--error);
}

.file.skipped .icon::before {
  content: "–";
  color: var(--muted);
}

.file .remove {
  padding: 4px 10px;
  font-size: 0.85em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

#chat-list {
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.month {
  border-bottom: 1px solid var(--border);
}

.month:last-child {
  border-bottom: 0;
}

.month summary {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  background: var(--bg-subtle);
}

.month summary::before {
  content: "▸";
  color: var(--muted);
}

.month[open] summary::before {
  content: "▾";
}

.month ul {
  list-style: none;
  margin: 0;
  padding: 0 0 4px 28px;
}

.month li {
  padding: 6px 12px 6px 0;
  border-top: 1px solid var(--border);
}

.month li label {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.month li .text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.month li .preview {
  color: var(--muted);
  font-size: 0.85em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#chat-list .meta {
  color: var(--muted);
  font-size: 0.85em;
  font-weight: normal;
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .month li label {
    flex-wrap: wrap;
  }

  .month li .meta {
    margin-left: 24px;
    white-space: normal;
  }
}

.how {
  padding-left: 20px;
}

.how li {
  margin: 6px 0;
}

.guide-link {
  display: inline-block;
  margin: 4px 0 16px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.guide-link::after {
  content: " ↗";
}

.guide-link:hover {
  background: var(--accent-soft);
}

.contact {
  max-width: 760px;
  margin: 32px auto;
  padding: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9em;
  text-align: center;
}

.search {
  margin: 0 0 12px;
}

.search label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95em;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.search-row button {
  margin-top: 0;
  white-space: nowrap;
}

.search .hint {
  margin: 6px 0 0;
}

/* Bigger tick boxes and whole-row targets: unticking should take one easy tap. */
#chat-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.month li label {
  cursor: pointer;
}

.month li:hover {
  background: var(--bg-subtle);
}
