:root {
  --orange: #f26522;
  --orange-dark: #d14e12;
  --black: #1a1a1a;
  --grey: #6b6b6b;
  --bg: #faf8f5;
  --card: #ffffff;
  --border: #e6e1da;
  --radius: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--black);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Header — sticky */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--black);
  color: #fff;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: #fff;
  flex-shrink: 0;
}
.brand h1 { font-size: 1.2rem; line-height: 1.1; }
.brand p { font-size: 0.82rem; color: #bbb; }
.header-search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
  min-width: 180px;
}
.header-search .search-box {
  width: 100%;
  padding: 0.55rem 0.9rem 0.55rem 2.1rem;
  font-size: 0.93rem;
  border: 1px solid #333;
  border-radius: 99px;
  background: #242424 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 0.7rem 50% no-repeat;
  color: #fff;
}
.header-search .search-box::placeholder { color: #888; }
.header-search .search-box:focus { outline: 2px solid var(--orange); border-color: var(--orange); background-color: #2a2a2a; }
.members-note {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 99px;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hero / stats strip */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
.hero-text h2 { font-size: 0.95rem; color: var(--grey); font-weight: 600; }
.hero-text p { font-size: 0.85rem; color: var(--grey); margin-top: 0.15rem; }
.hero-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.35rem; line-height: 1; color: var(--orange-dark); }
.stat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey); font-weight: 600; }

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
}

/* Chips + results meta */
.chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.chip {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.9rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--orange); color: var(--orange-dark); }
.chip.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.results-meta {
  font-size: 0.82rem;
  color: var(--grey);
  margin-bottom: 1.1rem;
}

/* Year sections */
.year-section { margin-bottom: 1.75rem; }
.year-heading {
  font-size: 1.15rem;
  color: var(--black);
  border-left: 4px solid var(--orange);
  padding-left: 0.6rem;
  margin-bottom: 0.85rem;
}
.year-heading small { font-weight: 400; color: var(--grey); font-size: 0.85rem; margin-left: 0.4rem; }

/* Talk cards */
.talk-list { display: grid; gap: 0.75rem; }
.talk-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.talk-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  transform: translateY(-1px);
  border-left-color: var(--orange-dark);
}
.month-badge {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.month-badge.muted { background: #e9e1d8; color: var(--grey); border: 1px solid var(--border); }
.month-badge .abbr { font-size: 1rem; font-weight: 800; letter-spacing: 0.04em; }
.month-badge .yr { font-size: 0.7rem; font-weight: 700; opacity: 0.9; margin-top: 1px; }
.talk-card .info { min-width: 0; }
.talk-card h3 {
  font-size: 0.98rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.talk-card .presenter {
  font-size: 0.82rem;
  color: var(--grey);
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.right-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.play-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fde8dd;
  color: var(--orange-dark);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}
.play-pill.muted { background: #eee; color: #999; }
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  white-space: nowrap;
}
.badge.audio { background: #fde8dd; color: var(--orange-dark); }
.badge.none { background: #f0ece6; color: #998; }

/* Talk detail */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--orange-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.back-link:hover { text-decoration: underline; }
.talk-detail h2 { font-size: 1.45rem; line-height: 1.25; margin-bottom: 0.35rem; }
.talk-detail .meta { color: var(--grey); font-size: 0.9rem; margin-bottom: 1.15rem; }
.talk-detail .meta strong { color: var(--black); }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.15rem;
  border: 1px solid #222;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  gap: 0.6rem;
  padding: 1.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(242,101,34,0.12), transparent 55%),
    #111;
}
.video-placeholder .watermark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.9;
  border: 2px solid rgba(255,255,255,0.12);
}
.video-placeholder .title { color: #ddd; font-weight: 700; font-size: 0.95rem; }
.video-placeholder .sub { color: #888; font-size: 0.82rem; max-width: 36ch; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.58rem 1rem;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: var(--card); color: var(--black); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--orange); color: var(--orange-dark); }
.btn-ghost { background: transparent; color: var(--grey); border-color: var(--border); }
.btn-ghost:hover { color: var(--black); border-color: var(--black); }

.audio-player { margin-bottom: 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; }
.audio-player h4 { margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--grey); letter-spacing: 0.02em; text-transform: uppercase; font-weight: 700; }
.audio-player audio { width: 100%; }
.audio-player .hint { font-size: 0.78rem; color: var(--grey); margin-top: 0.4rem; }

.talk-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.talk-nav a {
  flex: 1;
  max-width: 48%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.talk-nav a:hover { border-color: var(--orange); }
.talk-nav .label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey); }
.talk-nav .nav-title { font-size: 0.88rem; font-weight: 600; margin-top: 0.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.talk-nav .next { text-align: right; }
.talk-nav a.disabled { opacity: 0.4; pointer-events: none; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--grey); }
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--black);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 50;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.site-footer {
  background: var(--black);
  color: #888;
  text-align: center;
  padding: 1rem;
  font-size: 0.82rem;
  margin-top: auto;
}

@media (max-width: 700px) {
  .site-header { padding: 0.75rem 1rem; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .members-note { font-size: 0.7rem; padding: 0.25rem 0.55rem; }
  .brand h1 { font-size: 1.05rem; }
  .logo { width: 46px; height: 46px; }
  .hero { padding: 0.85rem 1rem; }
  main { padding: 1rem; }
  .talk-card { grid-template-columns: 58px 1fr auto; padding: 0.75rem 0.85rem; }
  .month-badge { width: 54px; height: 54px; border-radius: 9px; }
  .month-badge .abbr { font-size: 0.9rem; }
  .talk-card h3 { font-size: 0.92rem; }
  .talk-detail h2 { font-size: 1.2rem; }
  .talk-nav { flex-direction: column; }
  .talk-nav a { max-width: 100%; }
  .talk-nav .next { text-align: left; }
}
