/* Vanilla CSS. No Tailwind, no build step. */

:root {
  --ink: #14171c;
  --ink-soft: #5b6472;
  --line: #dfe3e9;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --accent: #1a5fd0;
  --ok: #17794a;
  --stop: #b3261e;
  --radius: 10px;
  --pad: 1rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.5;
}

main { max-width: 40rem; margin: 0 auto; padding: 2rem var(--pad) 4rem; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.muted { color: var(--ink-soft); font-size: .9rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 1rem 0 .25rem; }

input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
}

button {
  font: inherit;
  font-weight: 600;
  padding: .65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button.secondary { background: var(--bg); color: var(--ink); border-color: var(--line); }
button[disabled] { opacity: .5; cursor: not-allowed; }

.error { color: var(--stop); font-size: .9rem; margin-top: .5rem; }

/* --- video capture ------------------------------------------------------ */

.recorder video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  object-fit: cover;
}

.recorder .coach {
  font-size: .9rem;
  color: var(--ink-soft);
  margin: .75rem 0;
}

.recorder .timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.recorder .timer[data-recording="true"]::before {
  content: "";
  display: inline-block;
  width: .6em; height: .6em;
  margin-right: .4em;
  border-radius: 50%;
  background: var(--stop);
}

.steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps li {
  flex: 1; height: 4px; border-radius: 2px; background: var(--line);
}
.steps li[data-done="true"] { background: var(--accent); }

/* --- auth ---------------------------------------------------------------- */

body.auth-page { background: var(--bg-soft); }

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  max-width: none;
}

.auth-card {
  width: 100%;
  max-width: 24rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(20, 23, 28, .04), 0 8px 24px rgba(20, 23, 28, .06);
}

.wordmark {
  font-size: 1.35rem;
  letter-spacing: -.02em;
  margin: 0 0 .25rem;
}

.auth-sub { margin: 0 0 1.5rem; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

.btn-google:hover { background: var(--bg-soft); }

.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--ink-soft);
  font-size: .8rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

button.full { width: 100%; margin-top: 1.25rem; }

.hint { font-size: .8rem; color: var(--ink-soft); margin: .35rem 0 0; }

.notice {
  font-size: .9rem;
  color: var(--ok);
  background: #f2f9f5;
  border: 1px solid #cfe8db;
  border-radius: 8px;
  padding: .6rem .7rem;
  margin: 0 0 1rem;
}

.error:not(:empty) {
  background: #fdf3f2;
  border: 1px solid #f2d5d2;
  border-radius: 8px;
  padding: .6rem .7rem;
  margin: 0 0 1rem;
}

.auth-alt {
  font-size: .875rem;
  text-align: center;
  margin: .75rem 0 0;
  color: var(--ink-soft);
}
.auth-alt a { color: var(--accent); }

.auth-foot { margin-top: 1.5rem; font-size: .825rem; }

/* --- app shell ----------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.wordmark-sm {
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; font-size: .875rem; }

main.wide { max-width: 52rem; }

button.link, a.link {
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; font-size: .875rem;
  cursor: pointer; text-decoration: none;
}
button.link.ok { color: var(--ok); }
button.link.danger, .danger { color: var(--stop); }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.page-head h1 { margin: 0 0 .15rem; }
.page-head p { margin: 0; }

a.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: .95rem;
  padding: .65rem 1.1rem; border-radius: 8px; text-decoration: none;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em;
  padding: .2rem .5rem; border-radius: 5px;
  background: var(--bg-soft); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.badge-open { background: #eaf6ef; color: var(--ok); border-color: #cfe8db; }
.badge-closed { background: #f4f5f7; color: var(--ink-soft); }

/* --- role list ----------------------------------------------------------- */

.role-list { list-style: none; padding: 0; margin: 0; }
.role-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .6rem;
}
.role-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.role-title:hover { color: var(--accent); }
.role-meta { font-size: .85rem; margin: .2rem 0 0; }
.role-meta .ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95em;
}
.role-side { display: flex; align-items: center; gap: .9rem; white-space: nowrap; }
.card.empty { text-align: center; padding: 2.5rem 1.5rem; }

/* --- forms --------------------------------------------------------------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 40rem) { .grid-2 { grid-template-columns: 1fr; } }

.checkline {
  display: flex; align-items: flex-start; gap: .55rem;
  font-weight: 400; margin: .35rem 0;
}
.checkline input { margin-top: .2rem; flex: none; }

textarea { resize: vertical; }

.must-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.must-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: .6rem;
  background: var(--bg-soft);
}
.must-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.must-head select { width: auto; flex: 1; }
.must-row label:first-of-type { margin-top: .75rem; }

.actions {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin: 1.5rem 0 3rem;
}
.actions code { font-size: .85rem; }
