/* ============================================================
   Coaching App — Design tokens
   Palette: study-room feel — ink navy + warm parchment + a single
   focused amber accent for actions, deep teal for progress/success.
   Type: a serif (Lora) for headings — bookish, academic register —
   paired with a plain sans (Inter) for UI/body so the interface
   itself stays quiet and legible.
   ============================================================ */

:root {
  --ink: #12151f;
  --ink-soft: #1c2030;
  --parchment: #f7f4ec;
  --parchment-dim: #ece7d9;
  --line: #33384a;
  --amber-solid: #d69b2c;
  --teal: #2f8f7a;
  --danger: #c1543d;
  --text-on-ink: #eae6d9;
  --text-muted: #9a9fb0;

  --font-head: "Lora", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 10px;
  --shadow: 0 1px 0 rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text-on-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text-on-ink);
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }

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

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.topbar .brand {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
}

.topbar nav a {
  color: var(--text-muted);
  margin-left: 20px;
  font-size: 0.9rem;
}
.topbar nav a:hover { color: var(--text-on-ink); }

.card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}

.card h3 { margin-bottom: 4px; }

.btn {
  display: inline-block;
  background: var(--amber-solid);
  color: #1a1300;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-on-ink);
  border: 1px solid var(--line);
}

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

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-on-ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--amber-solid);
  outline-offset: 1px;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.auth-card .kicker {
  font-family: var(--font-head);
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.error-box {
  background: rgba(193, 84, 61, 0.15);
  border: 1px solid var(--danger);
  color: #f3b8ab;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.error-box.show { display: block; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(47, 143, 122, 0.18);
  color: var(--teal);
  border: 1px solid var(--teal);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar > div {
  height: 100%;
  background: var(--teal);
}

video { width: 100%; border-radius: var(--radius); background: #000; }

.switch-link { text-align: center; margin-top: 18px; font-size: 0.88rem; color: var(--text-muted); }
