/* "Cinema": the iOS app's look. Colours from ios/Summaries/Theme.swift. */
:root {
  --bg: #000;
  --card: #1c1c1c; /* Color(white: 0.11) */
  --raised: #333; /* Color(white: 0.2) */
  --text: #fff;
  --text-2: #9e9e9e; /* Theme.secondaryText, white 0.62 */
  --body: #d9d9d9; /* white 0.85 */
  --accent: #ffcc4d; /* Theme.accent (1.0, 0.80, 0.30) */
  --progress: #ff3b30;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: linear-gradient(#000 60%, rgba(0, 0, 0, 0));
}
.brand {
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--accent);
  font-size: 18px;
}
.search {
  flex: 1;
  max-width: 520px;
  margin-left: auto;
}
.search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}
.search input:focus {
  outline: 2px solid var(--accent);
}

main {
  padding: 0 0 48px;
}
.muted {
  color: var(--text-2);
}
.empty {
  padding: 40px 24px;
  color: var(--text-2);
}

/* Home */
.hero {
  position: relative;
  margin: 0 24px 28px;
  aspect-ratio: 16 / 7;
  max-height: 520px;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}
.hero .art {
  position: absolute;
  inset: 0;
}
.hero .hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}
.eventline {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent);
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  margin: 6px 0;
}

.section h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 24px 12px;
}
.row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 14px;
  overflow-x: auto;
  padding: 0 24px 6px;
  scrollbar-width: thin;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 0 24px;
}

.card {
  display: block;
}
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
}
.thumb .art {
  position: absolute;
  inset: 0;
}
.art {
  background-size: cover;
  background-position: center;
}
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tint);
  opacity: 0.38;
}
.thumb .title-layer {
  position: absolute;
  inset: 0;
  padding: 12px;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(rgba(0, 0, 0, 0.75), transparent 55%);
  z-index: 1;
}
.thumb .dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
}
.tick {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--progress);
}
.card .meta {
  padding: 8px 2px 0;
  font-size: 13px;
  color: var(--text-2);
}

/* Talk page */
.talk {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.player {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.player video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #000;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.speed {
  display: inline-flex;
  background: var(--card);
  border-radius: 10px;
  padding: 3px;
}
.speed button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-2);
}
.speed button[aria-pressed="true"] {
  background: var(--accent);
  color: #000;
}
.btn {
  border: 0;
  background: var(--raised);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
}
.btn.primary {
  background: #fff;
  color: #000;
}
.btn[aria-pressed="true"] {
  background: var(--accent);
  color: #000;
}
.talk h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0 10px;
}
.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
}
.initials {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.cols {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  margin-top: 20px;
}
@media (max-width: 860px) {
  .cols {
    grid-template-columns: 1fr;
  }
}
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.saved-card {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.saved-card .big {
  font-size: 28px;
  font-weight: 700;
}
.saved-card s {
  color: var(--text-2);
  font-weight: 600;
}
.caveat {
  font-style: italic;
  color: var(--text-2);
  font-size: 13px;
}
.points {
  list-style: none;
  padding: 0;
  margin: 0;
}
.points li {
  display: flex;
  gap: 10px;
  margin: 8px 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.4;
}
.points li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
}
.chapters,
.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.chapters li button,
.note .time {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}
.chapters li button {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid var(--raised);
}
.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text-2);
  font-size: 14px;
}
.chapters li.current button,
.chapters li.current .mono {
  color: var(--accent);
}
.note {
  padding: 10px 0;
  border-bottom: 1px solid var(--raised);
}
.note .time {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}
.note .text {
  white-space: pre-wrap;
  margin: 4px 0;
  color: var(--body);
}
.note .actions {
  display: flex;
  gap: 12px;
}
.note .actions button {
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  padding: 0;
}
.note-form {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.note-form .at {
  display: flex;
  gap: 8px;
  align-items: center;
}
.note-form input,
.note-form textarea {
  font: inherit;
  color: var(--text);
  background: #000;
  border: 1px solid var(--raised);
  border-radius: 8px;
  padding: 8px 10px;
}
.note-form input {
  width: 90px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.note-form textarea {
  min-height: 70px;
  resize: vertical;
}
.result-note {
  display: block;
  padding: 12px 24px;
  border-bottom: 1px solid var(--card);
}
.error {
  color: #ff6b6b;
}

/* Sign-in */
.signout button {
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  padding: 8px 4px;
}
.signout button:hover {
  color: var(--text);
}
.auth {
  max-width: 380px;
  margin: 12vh auto 0;
  padding: 0 24px;
}
.auth .brand {
  display: block;
  margin-bottom: 28px;
}
.auth h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
}
.auth-form {
  display: grid;
  gap: 10px;
}
.auth-form[hidden] {
  display: none;
}
.auth-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 8px;
}
.auth-form input {
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--raised);
  border-radius: 10px;
  padding: 12px 14px;
}
.auth-form input#code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 26px;
  letter-spacing: 6px;
}
.auth-form input:focus {
  outline: 2px solid var(--accent);
}
.auth-form .btn {
  margin-top: 6px;
  padding: 13px 16px;
}
.linkish {
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  text-decoration: underline;
  justify-self: start;
  padding: 0;
}
