/* Call for Clips – one stylesheet, no inline styles (CSP). Colors follow docs/mockups. */

@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/Inter-Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("/fonts/Inter-ExtraBold.woff2") format("woff2"); }

:root {
  --primary: #161E29;
  --accent: #00C8D2;
  --text: #4A5462;
  --ink: #161E29;
  --body: #2B3440;
  --bg: #F5F7F9;
  --card: #FFFFFF;
  --line: #DDE3EA;
  --field: #C3CBD5;
  --teal: #007A82;
  --teal-dark: #005A60;
  --teal-bg: #E8F9FA;
  --teal-line: #A8E3E7;
  --teal-ink: #0B4F54;
  --warn-bg: #FFF7E6;
  --warn-line: #F0D48A;
  --warn-ink: #5C4300;
  --progress-bg: #FFF1D6;
  --progress-ink: #6B4A00;
  --ok-bg: #E3F4EA;
  --ok-ink: #1F5E3A;
  --error-bg: #FDEEEE;
  --error-line: #F0B4B4;
  --error-ink: #8A1F1F;
  --again: #B3541E;
  --admin: #2B1F3A;
  --admin-soft: #D9C8F0;
  --hero-muted: #C9D1DB;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #E9EDF1;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { margin: 0; color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- page frame ---------- */

.page {
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.hero {
  background: var(--primary);
  color: #FFFFFF;
  padding: 24px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero.admin { background: var(--admin); }
.hero h1 { font-size: 26px; font-weight: 800; line-height: 1.2; }
.hero .lead { font-size: 14px; color: var(--hero-muted); }
.hero a { color: #FFFFFF; }
.hero .back { font-size: 14px; font-weight: 600; text-decoration: none; }
.hero .back:hover { text-decoration: underline; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--hero-muted); text-transform: uppercase; }
.hero.admin .kicker { color: var(--admin-soft); }

.chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip svg { width: 12px; height: 12px; }

.deadline { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--hero-muted); }
.deadline strong { color: #FFFFFF; }

.content { padding: 20px; display: flex; flex-direction: column; gap: 16px; flex: 1; }

.footer {
  margin-top: auto;
  padding: 16px 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

/* ---------- cards and text ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--body);
}
.card h2, .card .title { font-size: 15px; font-weight: 700; color: var(--ink); }
.small { font-size: 12px; color: var(--text); }
.muted { color: var(--text); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.legal-html h2, .legal-html h3 { margin: 12px 0 4px; font-size: 16px; color: var(--ink); }
.legal-html p, .legal-html ul, .legal-html ol { margin: 0 0 8px; }
.legal-html ul, .legal-html ol { padding-left: 20px; }
details.card summary { cursor: pointer; font-weight: 700; color: var(--ink); }

/* ---------- notices ---------- */

.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--teal-bg);
  border: 1px solid var(--teal-line);
  color: var(--teal-ink);
}
.notice strong { font-weight: 700; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.notice.error { background: var(--error-bg); border-color: var(--error-line); color: var(--error-ink); }
.notice.ok { background: var(--ok-bg); border-color: #A9D8BA; color: var(--ok-ink); }
.organizer-notice { display: block; }
.organizer-notice > :first-child { margin-top: 0; }
.organizer-notice > :last-child { margin-bottom: 0; }

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

form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="date"], input:not([type]), select, textarea {
  min-height: 46px;
  border: 1px solid var(--field);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: #FFFFFF;
  color: var(--ink);
  width: 100%;
}
textarea { min-height: 160px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; resize: vertical; }
input[readonly] { background: var(--bg); }
.hint { font-size: 12px; color: var(--text); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--body); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--teal); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.inline { display: flex; gap: 8px; }
.inline select { width: 130px; flex-shrink: 0; }
.inline input { flex: 1; min-width: 0; }

/* ---------- buttons ---------- */

.btn {
  min-height: 50px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #FFFFFF;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { color: #FFFFFF; filter: brightness(1.15); }
.btn:disabled { background: #9AA6B4; cursor: not-allowed; filter: none; }
.btn.secondary { background: #FFFFFF; color: var(--ink); border: 1px solid var(--primary); }
.btn.secondary:hover { color: var(--ink); background: var(--bg); }
.btn.teal { background: var(--teal); }
.btn.danger { background: #FFFFFF; color: var(--error-ink); border: 1px solid var(--error-line); }
.btn.danger:hover { color: var(--error-ink); background: var(--error-bg); }
.btn.small { min-height: 38px; font-size: 14px; padding: 6px 12px; border-radius: 10px; }
.btn.block { width: 100%; }
.admin-page .btn:not(.secondary):not(.danger):not(:disabled) { background: var(--admin); }
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; cursor: pointer; font-size: 14px;
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .btn { flex: 1; min-width: 90px; }

/* ---------- status pills ---------- */

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: #DDE3EA;
  color: var(--body);
}
.pill.action { background: var(--teal); color: #FFFFFF; }
.pill.progress { background: var(--progress-bg); color: var(--progress-ink); }
.pill.again { background: var(--again); color: #FFFFFF; }
.pill.done { background: var(--ok-ink); color: #FFFFFF; }
.pill.approved { background: var(--ok-bg); color: var(--ok-ink); }
.pill.answer { background: #FFFFFF; color: var(--teal); border: 1px solid var(--teal); }
.pill.closed { background: #EEF1F4; color: var(--text); }
.pill.badge { background: #E8F9FA; color: var(--teal-ink); letter-spacing: 0.03em; }

/* ---------- question list ---------- */

.qlist { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qhead { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--text); border-bottom: 1px solid var(--line); }
.qrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  align-items: start;
}
.qrow:last-child { border-bottom: 0; }
a.qrow:hover { background: #FAFBFC; color: var(--ink); }
.qrow .qtext { display: flex; gap: 8px; font-size: 14px; font-weight: 600; }
.qrow .qnum { color: var(--teal); font-weight: 800; flex-shrink: 0; }
.qrow .qstatus { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; max-width: 170px; }
.qrow .qnext { font-size: 12px; color: var(--text); }
.qrow.disabled { opacity: 0.6; }

/* ---------- name card preview ---------- */

.namecard {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.namecard .nc-name { font-size: 17px; font-weight: 800; color: var(--ink); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.namecard .nc-tagline { font-size: 14px; color: var(--text); }
.namecard .nc-link { font-size: 14px; color: var(--teal); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.platform { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 4px; color: #FFFFFF; font-size: 10px; font-weight: 800; background: #4A5462; }
.platform.linkedin { background: #0A66C2; }
.platform.x { background: #000000; }
.platform.bluesky { background: #1185FE; }
.platform.github { background: #24292F; }

/* ---------- link box / QR ---------- */

.linkbox { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.linkbox img.qr { width: 200px; height: 200px; background: #FFFFFF; border-radius: 8px; border: 1px solid var(--line); padding: 6px; }
.linkbox .bigtext { font-size: 13px; color: var(--text); }
.linkbox .stack { width: 100%; }

/* ---------- upload / progress ---------- */

.filepick {
  border: 2px dashed var(--field);
  border-radius: var(--radius);
  padding: 18px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  text-align: center;
}
.filepick strong { color: var(--ink); }
.filepick:hover { border-color: var(--teal); }
.filepick input { font-size: 14px; }
progress { width: 100%; height: 14px; accent-color: var(--teal); }
.list-check { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 10px; align-items: flex-start; }
.step .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--field); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #FFFFFF; }
.step.done .dot { background: var(--ok-ink); border-color: var(--ok-ink); }
.step.now .dot { border-color: var(--teal); border-width: 3px; }
.step .what { font-weight: 700; color: var(--ink); font-size: 14px; }
.step .detail { font-size: 12px; color: var(--text); }

/* ---------- video and transcript ---------- */

video.player { width: 100%; max-height: 70vh; background: #000000; border-radius: var(--radius); aspect-ratio: 9 / 16; }
.words { display: flex; flex-wrap: wrap; gap: 4px; line-height: 1.2; }
.word {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 4px 4px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}
.word:hover { background: var(--bg); border-color: var(--line); }
.word.corrected { background: var(--teal-bg); border-color: var(--teal-line); }
.word.mine { background: #FFF1D6; border-color: var(--warn-line); }
.word.off { text-decoration: line-through; color: var(--text); background: transparent; border-style: dashed; border-color: var(--line); }
.word:disabled { cursor: default; }
.hidden-word { text-decoration: line-through; color: var(--text); }
.word:disabled:hover { background: transparent; border-color: transparent; }

.stills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stills img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: #EEF1F4; border: 1px solid var(--line); }
.stills figure { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text); text-align: center; }

/* ---------- dialogs ---------- */

dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  color: var(--ink);
}
dialog::backdrop { background: rgba(22, 30, 41, 0.55); }
.dlg { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg h2 { font-size: 18px; font-weight: 800; }

/* ---------- admin ---------- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a, .tabs button {
  border: 1px solid var(--line); background: #FFFFFF; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
}
.tabs [aria-current="page"], .tabs [aria-pressed="true"] { background: var(--admin); color: #FFFFFF; border-color: var(--admin); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 11px; letter-spacing: 0.05em; color: var(--text); text-transform: uppercase; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--text); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.flag-bad { color: var(--error-ink); font-weight: 700; }

/* ---------- stats ---------- */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.tile .num { font-size: 26px; font-weight: 800; color: var(--ink); }
.tile .lbl { font-size: 12px; color: var(--text); }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #EEF1F4; }
.bar span { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--sw, #9AA6B4); }
.sw-processing { --sw: #F0B44C; }
.sw-speaker { --sw: #007A82; }
.sw-approved { --sw: #00C8D2; }
.sw-accepted { --sw: #1F5E3A; }
.sw-withdrawn { --sw: #9AA6B4; }
.sw-rejected { --sw: #B3541E; }
.lines { display: flex; flex-direction: column; }
.lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.lines > div:last-child { border-bottom: 0; }
.lines > div > span:last-child { white-space: nowrap; }

@media (min-width: 600px) {
  body { padding: 24px 0; }
  .page { min-height: calc(100vh - 48px); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(22, 30, 41, 0.08); }
}

/* Share kit */
.share-kit .share-image { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.share-kit textarea { width: 100%; font: inherit; font-size: 14px; line-height: 1.4; padding: 10px; border: 1px solid var(--field); border-radius: 8px; resize: vertical; box-sizing: border-box; }
