/* This Week in AI, by Vizuara. One look: cream paper, warm brown ink, pink yarn, mustard, teal. */

@font-face { font-family: "Lilita One"; src: url(fonts/LilitaOne-Regular.ttf) format("truetype"); font-display: block; }
@font-face { font-family: Fredoka; src: url(fonts/Fredoka.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #2a1810;
  --ink-2: #6a4a38;
  --paper: #fbf0d6;
  --paper-2: #f4dfae;
  --cream: #fff6e2;
  --pink: #ff4fae;
  --pink-pale: #ffe1f1;
  --mustard: #f2b93b;
  --teal: #1f8f86;
  --teal-ink: #156c65;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --text: Fredoka, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: 24px;
  --shadow: 6px 7px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .29 0 0 0 0 .2 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(1100px 620px at 50% -80px, #fff9ea 0, rgba(255, 249, 234, 0) 100%);
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */

.top { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 6px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
.brand img { width: 34px; height: 34px; }
.top-nav { display: flex; gap: 26px; }
.top-link { font-weight: 600; font-size: 16px; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--pink); }

/* ---------- hero ---------- */

.hero { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 104px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: center; }

.tag { display: inline-block; margin: 0 0 20px; padding: 7px 18px 8px; border-radius: 30px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 14px; letter-spacing: .24em; text-transform: uppercase; }
.tag b { color: var(--pink); font-weight: 700; }

.title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(64px, 8.2vw, 116px); line-height: .96; letter-spacing: .012em; text-transform: uppercase; }
.title span { position: relative; z-index: 0; display: block; width: max-content; max-width: 100%; filter: drop-shadow(0 .07em 0 rgba(42, 24, 16, .55)); }
.title span::before { content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1; color: var(--ink); -webkit-text-stroke: .19em var(--ink); }
.title .a { color: var(--cream); }
.title .b { color: var(--pink); margin-top: .04em; }

.by { display: inline-flex; align-items: center; gap: 10px; margin: 20px 0 0 4px; padding: 3px 20px 6px 14px; font-family: var(--display); font-size: clamp(22px, 2.5vw, 32px); line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; background: var(--mustard); border: 3px solid var(--ink); border-radius: 14px 12px 16px 12px; box-shadow: 5px 6px 0 var(--ink); transform: rotate(-2deg); }
.by img { width: 28px; height: 28px; }

.line { margin: 26px 0 12px; max-width: 16em; text-wrap: balance; font-size: clamp(22px, 2.3vw, 30px); font-weight: 600; line-height: 1.22; }
.intro { margin: 0 0 10px; max-width: 34em; font-size: 19px; color: #452c1e; }

.btn { display: inline-block; margin-top: 16px; padding: 12px 24px 14px; font-family: var(--display); font-size: 22px; letter-spacing: .02em; text-decoration: none; color: var(--ink); background: var(--pink); border: 3px solid var(--ink); border-radius: 18px 14px 18px 15px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 9px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 3px 4px 0 var(--ink); }
.btn-small { margin-top: 0; font-size: 19px; padding: 9px 20px 11px; background: var(--mustard); box-shadow: 5px 6px 0 #000; }

.hero-pic { position: relative; z-index: 1; margin: 0; justify-self: center; width: min(100%, 420px); transform: rotate(2deg); }
.hero-pic .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream); border: 4px solid var(--ink); border-radius: 28px 22px 30px 20px; box-shadow: 11px 13px 0 var(--ink); }
.hero-pic .frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.bubble { position: absolute; left: -46px; top: 30px; padding: 8px 22px 12px; font-family: var(--display); font-size: clamp(24px, 2.5vw, 32px); line-height: 1.1; background: var(--cream); border: 4px solid var(--ink); border-radius: 28px 26px 26px 8px; box-shadow: 5px 6px 0 var(--ink); transform: rotate(-7deg); }
.bubble::after { content: ""; position: absolute; right: 26px; bottom: -15px; width: 22px; height: 22px; background: var(--cream); border-right: 4px solid var(--ink); border-bottom: 4px solid var(--ink); transform: rotate(38deg) skew(12deg); }

.yarn { position: absolute; border-radius: 50%; border: 4px solid var(--ink); background:
    repeating-radial-gradient(circle at 30% 28%, transparent 0 7px, rgba(42, 24, 16, .16) 7px 9px),
    radial-gradient(circle at 35% 30%, #ff9fd3, var(--pink) 58%, #d93a90); }
.hero-pic .y1 { width: 92px; height: 92px; left: -40px; bottom: -34px; }
.hero-pic .y2 { width: 50px; height: 50px; left: 46px; bottom: -44px; }

.thread { position: absolute; z-index: 0; left: var(--gutter); right: var(--gutter); bottom: 0; width: calc(100% - 2 * var(--gutter)); height: 100px; overflow: visible; pointer-events: none; }
.thread path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.thread .t-ink { stroke: var(--ink); stroke-width: 8; }
.thread .t-pink { stroke: var(--pink); stroke-width: 4; }
.thread.narrow { display: none; }

/* ---------- weeks ---------- */

.weeks { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 0 calc(var(--gutter) + 62px); scroll-margin-top: 20px; }
.weeks::before { content: ""; position: absolute; left: calc(var(--gutter) + 10px); top: -6px; bottom: 40px; width: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='80' viewBox='0 0 24 80'%3E%3Cpath d='M12 0C22 20 2 60 12 80' fill='none' stroke='%232a1810' stroke-width='8'/%3E%3Cpath d='M12 0C22 20 2 60 12 80' fill='none' stroke='%23ff4fae' stroke-width='4'/%3E%3C/svg%3E") repeat-y; }
.weeks::after { content: ""; position: absolute; left: calc(var(--gutter) + 6px); bottom: 22px; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 35% 30%, #ff9fd3, var(--pink) 58%, #d93a90); }
.loading { margin: 0; padding: 30px 0 60px; font-weight: 500; color: var(--ink-2); }

.week { position: relative; padding: 4px 0 70px; scroll-margin-top: 16px; }
.week-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 22px; }
.week-head .yarn { left: -65px; top: 2px; width: 50px; height: 50px; }
.week-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 4.6vw, 58px); line-height: 1; text-transform: uppercase; letter-spacing: .01em;
 }
.week-head h2 span, .beats h2 span { padding: 0 8px 0 2px; background: linear-gradient(transparent 62%, var(--mustard) 62% 90%, transparent 90%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.beats h2 span { background-image: linear-gradient(transparent 62%, #8fd8d1 62% 90%, transparent 90%); }
.week-dates { margin: 0; padding: 4px 14px 5px; font-weight: 600; font-size: 16px; background: var(--cream); border: 3px solid var(--ink); border-radius: 30px; }
.week-count { margin: 0; font-weight: 500; font-size: 16px; color: var(--ink-2); }

.board { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 24px; align-items: start; }

.picker { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 12px; }
.picker-label { margin: 0 0 2px; font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.pick { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 2px 12px; align-items: center; width: 100%; padding: 8px 12px 8px 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px 14px 18px 15px; box-shadow: 4px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s, background-color .12s; }
.pick img { grid-row: 1 / span 2; width: 62px; height: 62px; object-fit: cover; object-position: 50% 40%; border: 2px solid var(--ink); border-radius: 12px; display: block; }
.pick-title { align-self: end; font-weight: 600; font-size: 17px; line-height: 1.2; }
.pick-meta { align-self: start; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.pick:hover { transform: translate(-1px, -1px); box-shadow: 5px 6px 0 var(--ink); }
.pick.is-on { background: var(--mustard); transform: translate(-2px, -2px); box-shadow: 6px 7px 0 var(--ink); }
.pick.is-on .pick-meta { color: var(--ink); }
.pick.is-wip img { filter: grayscale(.55) sepia(.25); }

.stage { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; align-items: start; padding: 26px; background: var(--cream); border: 3px solid var(--ink); border-radius: 30px 24px 28px 22px; box-shadow: 8px 9px 0 var(--ink); }

/* the player */
.screen { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--ink); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 6px 7px 0 var(--pink), 6px 7px 0 3px var(--ink); }
.screen video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--ink); }
.play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; padding: 0; font: inherit; color: var(--cream); cursor: pointer; border: 0; background: linear-gradient(rgba(42, 24, 16, 0) 55%, rgba(42, 24, 16, .5)); }
.play-disc { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--pink); border: 4px solid var(--ink); box-shadow: 5px 6px 0 var(--ink); transition: transform .12s; }
.play-disc svg { width: 38px; height: 38px; margin-left: 6px; fill: var(--cream); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.play:hover .play-disc { transform: scale(1.07) rotate(-4deg); }
.play-len { position: absolute; left: 12px; bottom: 12px; padding: 3px 12px 4px; font-weight: 600; font-size: 14px; background: rgba(42, 24, 16, .86); border-radius: 30px; }
.screen.is-playing .play { display: none; }

/* an episode that is not finished: a pinned picture, plainly not a player */
.pinned { position: relative; margin: 6px 6px 0; padding: 12px 12px 14px; background: #fffdf6; border: 3px dashed var(--ink-2); border-radius: 10px; transform: rotate(-2deg); }
.pinned img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 38%; filter: grayscale(.6) sepia(.3) contrast(.92); opacity: .82; border-radius: 4px; }
.pinned .tape { position: absolute; left: 50%; top: -15px; width: 108px; height: 28px; margin-left: -54px; background: rgba(242, 185, 59, .85); border: 2px solid rgba(42, 24, 16, .45); transform: rotate(3deg); }
.pinned .stamp { position: absolute; left: 50%; top: 44%; padding: 4px 16px 7px; font-family: var(--display); font-size: 24px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: var(--mustard); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 4px 5px 0 var(--ink); transform: translate(-50%, -50%) rotate(-8deg); }
.pinned figcaption { margin-top: 10px; text-align: center; font-weight: 500; font-size: 16px; color: var(--ink-2); }

/* the words beside it */
.notes { min-width: 0; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 2px 0 12px; }
.added { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.status { display: inline-block; padding: 3px 13px 4px; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); background: var(--teal-ink); border: 2px solid var(--ink); border-radius: 30px; }
.status.wip { color: var(--ink); background: var(--paper-2); }
.ep-title { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.1vw, 42px); line-height: 1.04; }
.ep-sum { margin: 0 0 18px; font-size: 19px; font-weight: 500; line-height: 1.45; }
.learn { margin: 0 0 18px; padding: 1px 0 2px 14px; border-left: 5px solid var(--teal); }
.learn h4 { margin: 0 0 3px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); }
.learn p { margin: 0; font-size: 17px; }
.says { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 4px 16px; align-items: center; margin: 0 0 16px; }
.says img { grid-row: 1 / span 2; width: 60px; height: 60px; object-fit: cover; object-position: 50% 30%; border: 3px solid var(--ink); border-radius: 50%; }
.says blockquote { position: relative; margin: 0; padding: 9px 14px 10px; font-weight: 600; font-size: 17px; line-height: 1.35; background: var(--pink-pale); border: 3px solid var(--ink); border-radius: 18px 16px 18px 6px; }
.says blockquote::before { content: ""; position: absolute; left: -10px; bottom: 12px; width: 14px; height: 14px; background: var(--pink-pale); border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.says figcaption { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.sources { font-size: 15px; }
.sources summary { display: inline-block; cursor: pointer; font-weight: 600; text-decoration: underline; text-decoration-color: var(--mustard); text-decoration-thickness: 3px; text-underline-offset: 4px; list-style: none; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary::after { content: " +"; font-weight: 700; }
.sources[open] summary::after { content: " \2212"; }
.sources ul { margin: 10px 0 0; padding: 0 0 0 18px; }
.sources li { margin: 0 0 6px; line-height: 1.4; }
.sources a { text-decoration-color: var(--teal); text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- how every episode goes ---------- */

.beats { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter) 90px; scroll-margin-top: 16px; }
.beats h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.12; text-transform: uppercase; }
.beats-intro { margin: 0 0 30px; font-size: 19px; }
.beat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.beat { position: relative; margin: 0; padding: 12px 12px 16px; background: var(--cream); border: 3px solid var(--ink); border-radius: 20px 16px 20px 15px; box-shadow: var(--shadow); transform: rotate(-1.3deg); }
.beat:nth-child(even) { transform: rotate(1.2deg) translateY(10px); }
.beat img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 50%; border: 2px solid var(--ink); border-radius: 12px; }
.beat img.p-door { object-position: 50% 30%; }
.beat img.p-face { object-position: 50% 30%; }
.beat img.p-chair { object-position: 50% 58%; }
.beat .n { position: absolute; left: -14px; top: -16px; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; font-family: var(--display); font-size: 24px; color: var(--ink); background: var(--pink); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 4px 0 var(--ink); }
.beat figcaption { margin-top: 12px; font-size: 16px; line-height: 1.4; }
.beat figcaption b { display: block; margin-bottom: 3px; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; }

/* ---------- footer ---------- */

footer { background: var(--ink); color: var(--cream); }
.foot { max-width: var(--wrap); margin: 0 auto; padding: 40px var(--gutter) 44px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 36px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.foot-brand img { width: 52px; height: 52px; }
.foot-mid { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; justify-self: center; max-width: 560px; }
.foot-mid img { width: 64px; height: 64px; object-fit: cover; object-position: 46% 42%; border: 3px solid var(--cream); border-radius: 50%; }
.foot-mid p { margin: 0; font-size: 15px; line-height: 1.45; color: #e9d8bb; }
.foot-mid b { display: block; margin-bottom: 2px; font-size: 17px; font-weight: 600; color: var(--cream); }

/* ---------- narrower screens ---------- */

@media (max-width: 1080px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .picker { grid-column: 1; grid-row: 1; flex-direction: row; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 12px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .picker-label { display: none; }
  .pick { flex: 0 0 136px; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px 8px 9px; scroll-snap-align: start; align-content: start; }
  .pick img { grid-row: auto; width: 100%; height: 84px; margin-bottom: 7px; }
  .pick-title { font-size: 15px; }
  .pick-meta { font-size: 13px; margin-top: 2px; }
  .stage { grid-row: 2; }
}

@media (max-width: 860px) {
  :root { --gutter: 18px; }
  body { font-size: 17px; }
  .top-link { font-size: 15px; }
  .top-link.wide { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 14px var(--gutter) 80px; }
  .hero-text { display: contents; }
  .tag { justify-self: start; margin-bottom: 16px; font-size: 12px; }
  .title { font-size: min(15.4vw, 104px); }
  .by { justify-self: start; margin-top: 18px; }
  .line { margin-top: 24px; }
  .hero-pic { order: 1; width: min(78%, 380px); margin: 24px auto 42px; }
  .bubble { left: -22px; top: 18px; }
  .intro { order: 2; font-size: 18px; }
  .btn { order: 3; justify-self: start; }
  .thread.wide { display: none; }
  .thread.narrow { display: block; left: 0; right: 0; width: 100%; height: 62px; overflow: hidden; }
  .thread .t-ink { stroke-width: 7; }
  .thread .t-pink { stroke-width: 3.5; }

  .weeks { padding-left: var(--gutter); }
  .weeks::before, .weeks::after { display: none; }
  .week { padding-bottom: 54px; }
  .week-head { gap: 6px 12px; margin-bottom: 16px; }
  .week-head .yarn { position: static; width: 38px; height: 38px; border-width: 3px; }
  .week-head h2 { margin-right: 40px; }
  .week-dates, .week-count { font-size: 15px; }

  .stage { grid-template-columns: 270px minmax(0, 1fr); gap: 22px; padding: 18px 18px 22px; }

  .beats { padding-bottom: 64px; }
  .beat-row { display: flex; gap: 18px; margin: 0 calc(-1 * var(--gutter)); padding: 18px calc(var(--gutter) + 12px) 26px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .beat { flex: 0 0 236px; scroll-snap-align: center; }
  .beat:nth-child(even) { transform: rotate(1.2deg); }

  .foot { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 34px var(--gutter) 40px; justify-items: start; }
  .foot-mid { justify-self: start; }
}

@media (max-width: 640px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px 16px 20px; }
  .screen { width: min(100%, 360px); margin: 0 auto; }
  .pinned { width: min(92%, 320px); margin: 12px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
