/* Inspired by oversfortheboys.com — clean white, Roboto, red accent */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
  --bg: #fefefe;
  --text: #000000;
  --heading: #252322;
  --muted: #666666;
  --border: #e8e8e8;
  --accent: #ff0000;
  --accent-hover: #e60000;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --pill: #333333;
  --green: #1a8f4a;
  --amber: #c98700;
  --radius: 10px;
  --pill-radius: 999px;
  --font: 'Roboto', system-ui, -apple-system, sans-serif;
  --max: 480px;
  --max-wide: 960px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

.page-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.brand {
  margin-bottom: 0.5rem;
}

.brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--heading);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.75rem 0 2rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: lowercase;
  text-align: left;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--pill-radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-block { display: block; width: 100%; }

.btn-ghost {
  background: var(--pill);
  color: #fff;
}

.btn-ghost:hover { background: #222; }

.btn-outline {
  background: transparent;
  color: var(--heading);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  color: var(--heading);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  text-align: left;
}

.form-card {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  text-align: left;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: lowercase;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  margin-bottom: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

.err {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: lowercase;
  margin-top: 0.75rem;
  display: none;
}

.footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--pill-radius);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-red {
  background: rgba(255, 0, 0, 0.1);
  color: var(--accent);
}

.badge-cat {
  background: var(--heading);
  color: #fff;
  text-transform: lowercase;
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.draft-id {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.2rem 0 0;
  font-weight: 400;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.75rem;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0 0 0.75rem;
}

.source-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  text-transform: lowercase;
}

.source-link:hover {
  text-decoration: underline;
}

.chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--pill-radius);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  text-transform: lowercase;
}

.draft-composer {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.composer-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  align-items: baseline;
}

.composer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--muted);
  min-width: 5rem;
  flex-shrink: 0;
}

.composer-value {
  color: var(--heading);
  font-weight: 700;
}

.composer-body {
  padding: 1rem 1.15rem 1.15rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--heading);
}

.composer-body p {
  margin: 0 0 0.75rem;
}

.composer-body p:last-child {
  margin-bottom: 0;
}

.draft-context {
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.draft-context p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.refine-panel {
  margin: 0.75rem 0;
  padding: 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.refine-panel textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.92rem;
  margin: 0.35rem 0 0.75rem;
  resize: vertical;
  min-height: 5rem;
}

.revision-status {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0.5rem 0;
}

.signal {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.signal.ok {
  border-left: 3px solid var(--heading);
}

.signal.warn {
  border-left: 3px solid var(--accent);
  background: #fffafa;
}

.signal strong {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin-right: 0.5rem;
  color: var(--muted);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.stat .val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
}

.stat .lbl {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: lowercase;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 700;
  text-transform: lowercase;
}

.meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-style: italic;
  text-transform: lowercase;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--heading);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  display: none;
  z-index: 10;
  font-size: 0.9rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: lowercase;
}

.topbar .sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.topbar-links a {
  margin-left: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: lowercase;
}

.grid { display: grid; gap: 1rem; }

section { margin-bottom: 2.5rem; }

h2.section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
  color: var(--heading);
}

.actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }

ul.log {
  font-size: 0.8rem;
  color: var(--muted);
  padding-left: 1.2rem;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.section-hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

.card-titles h3 { margin: 0; }

.action-type {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: lowercase;
  margin: 0.15rem 0 0;
}

.approach {
  font-size: 0.92rem;
  color: var(--heading);
  margin: 0.75rem 0;
  line-height: 1.45;
}

.draft-panel {
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.draft-preview {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  color: var(--heading);
}

.red-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.red-note strong { color: var(--accent); }

.approval-card .toggle-draft { margin-bottom: 0.25rem; }
