/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === BASE === */
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* === LAYOUT === */
.wrapper {
  max-width: 780px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

/* === HEADER === */
.header {
  background: #4b112c;
  padding: 36px 48px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.header::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.header-logo { margin-bottom: 20px; display: block; }
.header-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #54b9b3;
  margin-bottom: 10px;
}
.header h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  max-width: 520px;
}
.header h1.snippet-title {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 12px;
  max-width: 560px;
}
.header .date {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
}
.header .intro {
  margin-top: 14px;
  font-size: 15px;
  color: rgba(255,255,255,0.82);
  max-width: 540px;
  line-height: 1.6;
}
.header-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.header-back:hover { color: rgba(255,255,255,0.9); }
.header-back::before { content: "←"; }
.header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.header-meta .date { font-size: 13px; color: rgba(255,255,255,0.6); }
.header-meta .meta-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
}

/* === META BAR === */
.issue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 48px;
  background: #f7f7f7;
  border-bottom: 1px solid #e6e6e6;
}
.issue-meta .count { font-size: 13px; color: #595a5c; }
.issue-meta .count strong { color: #e5173f; }
.issue-meta--center { justify-content: center; }
.subscribe-cta { font-size: 13px; font-weight: 600; color: #288983; text-decoration: none; white-space: nowrap; }
.subscribe-cta:hover { text-decoration: underline; }

/* === CONTENT === */
.content { padding: 0 48px 48px; }
.content--archive { padding: 32px 48px 48px; }
.content--snippet { padding: 40px 48px 48px; }

/* === ARCHIVE === */
.week-block { margin-bottom: 22px; }
.week-block:last-child { margin-bottom: 0; }
.week-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6e6e6;
  margin-bottom: 4px;
}
.week-date {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #595a5c;
  flex-shrink: 0;
}
.week-nav { display: flex; gap: 8px; align-items: center; }
.week-nav-sep { color: #c8c8c8; font-size: 10px; }
.week-nav-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #288983;
}
.week-nav-link:hover { text-decoration: underline; }
.week-nav-link:focus-visible,
.feat-list a:focus-visible { text-decoration: underline; outline-offset: 2px; }
.archive-empty { text-align: center; color: #595a5c; font-size: 14px; }
.feat-list { list-style: none; padding: 0; margin: 0; }
.feat-list li { padding: 2px 0; }
.feat-list a {
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  color: #595a5c;
}
.feat-list a:hover { text-decoration: underline; }

/* === STORIES === */
.story { padding: 28px 0; border-bottom: 1px solid #e6e6e6; }
.story:last-child { border-bottom: none; }
.tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 4px;
  background: #f2f2f2;
  color: #595a5c;
}
.story h2 { font-size: 18px; font-weight: 700; color: #e5173f; margin-bottom: 10px; line-height: 1.3; }
.story p { font-size: 14.5px; color: #374151; line-height: 1.7; }
.clip-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: #e8f6f5;
  color: #288983 !important;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 4px;
  text-decoration: none;
}
.clip-link:hover { background: #d4efed; }
.clip-icon {
  display: inline-block;
  width: 0; height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #288983;
  flex-shrink: 0;
}
.learn-more { color: #288983; font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.learn-more:hover { text-decoration: underline; }

/* === ARCHIVE CTA === */
.archive-cta {
  padding: 16px 48px;
  text-align: center;
  border-top: 1px solid #e6e6e6;
}
.archive-cta a {
  font-size: 13px;
  font-weight: 600;
  color: #288983;
  text-decoration: none;
}
.archive-cta a:hover { text-decoration: underline; }

/* === SNIPPET === */
.video-section { margin-bottom: 40px; }
.video-section h2,
.transcript-section h2,
.description-section h2,
.screenshot-section h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #4b112c;
  margin-bottom: 16px;
}
.video-wrap {
  position: relative;
  background: #0d0d0d;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.14);
  aspect-ratio: 16 / 9;
}
.video-wrap video { display: block; width: 100%; height: 100%; object-fit: contain; max-height: 440px; }
/* Clip player: custom controls so the timeline spans only the clip */
.clip-player { position: relative; width: 100%; height: 100%; background: #0d0d0d; }
.clip-player:fullscreen { display: flex; flex-direction: column; }
.clip-player video { height: calc(100% - 44px); cursor: pointer; }
.clip-player:fullscreen video { height: auto; flex: 1; max-height: none; }
.clip-controls {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #1a1a1a; color: #fff;
}
.clip-player:fullscreen .clip-controls { position: static; }
.clip-btn {
  background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 6px; min-width: 30px; border-radius: 4px;
}
.clip-btn:hover { background: rgba(255,255,255,0.15); }
.clip-btn:focus-visible, .clip-seek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.clip-speed {
  background: #2b2b2b; color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 4px;
  font: inherit; font-size: 12px; padding: 3px 4px; cursor: pointer;
}
.clip-speed:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.clip-time { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.clip-seek {
  flex: 1; min-width: 0; height: 4px; cursor: pointer; -webkit-appearance: none; appearance: none;
  border-radius: 2px; outline-offset: 4px;
  background: linear-gradient(to right, #d9304a var(--progress, 0%), rgba(255,255,255,0.3) var(--progress, 0%));
}
.clip-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.clip-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.transcript-section h2 { margin-bottom: 20px; }
.transcript-card {
  background: #f9f9fb;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 20px;
}
.transcript-speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e6e6e6;
}
.screenshot-section img,
.screenshot-section .screenshot-placeholder {
  display: block; width: 100%; aspect-ratio: 1600 / 1080; /* matches the API crop (1600x1080 of the 1920x1080 frame); reserves space so the page does not jump */
  border-radius: 8px 8px 0 0; max-width: 100%; object-fit: contain;
}
.screenshot-section .screenshot-placeholder {
  background: linear-gradient(100deg, #e9eaee 30%, #f7f8fa 50%, #e9eaee 70%);
  background-size: 200% 100%;
  animation: screenshot-shimmer 1.4s ease-in-out infinite;
}
@keyframes screenshot-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .screenshot-section .screenshot-placeholder { animation: none; }
}
.screenshot-section .screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-block-end: 20px;
}
.screenshot-section figure {
  margin-block-end: 20px;
  border-radius: 0 0 8px 8px;
  background: #f9f9fb;
  border: 1px solid #e6e6e6;
}
.screenshot-section .screenshot-zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in;
}
.screenshot-section .screenshot-zoom:disabled { cursor: default; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 12px; right: 16px;
  border: 0; background: none; color: #fff;
  font-size: 36px; line-height: 1; cursor: pointer;
}
.screenshot-section figcaption { font-size: 12px; color: #555; padding: 6px 12px; }
.speaker-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #4b112c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.speaker-info .name { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.speaker-info .time { font-size: 12px; color: #888; font-variant-numeric: tabular-nums; }
.transcript-body { font-size: 14px; color: #374151; line-height: 1.8; }
.transcript-body p { margin-bottom: 14px; }
.transcript-body p:last-child { margin-bottom: 0; }
.description {
  margin-block-end: 40px;
  color: #444;
  font-size: 14px;
  line-height: 1.6;
  background: #f9f9fb;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 20px;
  border-left: 3.2px solid;
}

/* === FOOTER === */
.footer { background: #4b112c; padding: 28px 48px; text-align: center; }
.footer-logo { display: block; margin-left: auto; margin-right: auto; }
.footer p { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.6; }
.footer .brand { font-weight: 700; color: #fff; }
.footer-link { display: block; font-size: 12px; color: rgba(255,255,255,0.5); text-decoration: underline; margin-top: 6px; }
.footer-link:hover { color: rgba(255,255,255,0.8); }
.footer-link:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px; }

/* === RESPONSIVE === */
@media (max-width: 720px) {
  .wrapper { margin: 0; border-radius: 0; box-shadow: none; }
  .header,
  .content,
  .content--archive,
  .content--snippet,
  .footer,
  .issue-meta { padding-left: 24px; padding-right: 24px; }
  .transcript-card { padding: 20px; }
  .week-row { flex-wrap: wrap; gap: 6px 20px; }
}

@keyframes spin { to { transform: rotate(360deg); } }

.archive-more { padding-top: 24px; }
.archive-more-btn {
  font: inherit;
  font-size: 14px;
  padding: 10px 24px;
  border: 1px solid #595a5c;
  border-radius: 4px;
  background: none;
  color: inherit;
  cursor: pointer;
}
.archive-more-btn:hover:not(:disabled) { text-decoration: underline; }
.archive-more-btn:disabled { opacity: 0.6; cursor: default; }

/* === MANAGE (owner controls) === */
.manage-bar { display: flex; flex-wrap: wrap; gap: 12px; padding: 20px 48px 0; }
.manage-btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 10px 20px;
  border-radius: 4px; border: 2px solid transparent; background: none; cursor: pointer;
}
.manage-btn:disabled { opacity: 0.6; cursor: default; }
.manage-btn:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.manage-btn--primary { background: #e5173f; border-color: #e5173f; color: #fff; }
.manage-btn--primary:hover:not(:disabled) { background: #c8133a; border-color: #c8133a; }
.manage-btn--outline { border-color: #e5173f; color: #e5173f; }
.manage-btn--outline:hover:not(:disabled) { background: #f7f7f7; }
.manage-btn--muted { border-color: #595a5c; color: #595a5c; }
.manage-btn--muted:hover:not(:disabled) { background: #f7f7f7; }
.manage-panel {
  margin: 20px 48px 0; padding: 20px 24px; background: #f7f7f7;
  border: 1px solid #e6e6e6; border-radius: 8px; color: #111;
}
.manage-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.manage-field label { font-size: 13px; font-weight: 600; color: #111; }
.manage-field input[type="text"], .manage-field input[type="date"] {
  font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #595a5c;
  border-radius: 4px; background: #fff; color: #111;
}
.manage-field input:focus-visible { outline: 2px solid #111; outline-offset: 1px; }
.manage-progress { height: 8px; background: #e6e6e6; border-radius: 4px; overflow: hidden; }
.manage-progress-bar { height: 100%; background: #e5173f; transition: width 0.2s; }
.manage-actions { display: flex; gap: 12px; }
.manage-help { margin-top: 12px; font-size: 13px; color: #595a5c; }
.manage-error { font-size: 13px; color: #e5173f; font-weight: 600; margin-bottom: 8px; }
.manage-warning {
  font-size: 13px; color: #111; background: #fff; border: 2px solid #e5173f;
  border-radius: 4px; padding: 8px 12px; margin-bottom: 16px;
}
.manage-meeting-title { flex: 1; font-size: 14px; color: #111; }
.manage-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.manage-badge--ready { background: #54b9b3; color: #111; }
.manage-badge--waiting { background: #e6e6e6; color: #595a5c; }
@media (max-width: 720px) {
  .manage-bar { padding-left: 24px; padding-right: 24px; }
  .manage-panel { margin-left: 24px; margin-right: 24px; }
}

.archive-end {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e6e6e6;
  color: #595a5c;
  font-size: 14px;
}
