/* ============================================================================
   AI Material on Books — shared styles.

   Design tokens are taken from danariely.com itself, not invented:
   Montserrat throughout, ink #282828, link blue #0071B8, CTA amber #FF9920,
   coral #EC5431, white ground, page headers as dark bands.
   No framework, no build step. Montserrat is loaded by the site's own theme;
   the stack below falls back gracefully if these pages are opened standalone.
   ============================================================================ */

:root {
  --ink:      #282828;
  --muted:    #6b727c;
  --ground:   #ffffff;
  --wash:     #f4f7fa;
  --card:     #ffffff;
  --line:     #e2e8ee;
  --line-2:   #cfdbe7;
  --navy:     #12243d;
  --navy-2:   #1b3557;
  --blue:     #0071b8;
  --amber:    #ff9920;
  --coral:    #ec5431;
  --on-navy:  #ffffff;
  --on-navy-m:#a8bcd4;
  --radius:   4px;
  --shadow:   0 12px 30px rgba(18,36,61,.10);
  --wrap:     1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.well { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

a { color: var(--blue); }

/* skip link, for keyboard users */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 12px 18px; z-index: 100;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- the dark band the site uses for page headers ---------- */

.band {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--on-navy);
  padding: 62px 0 58px;
  position: relative;
  overflow: hidden;
}
.band::after {
  content: ""; position: absolute; left: 28px; bottom: 0;
  width: 132px; height: 4px; background: var(--amber);
}
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 18px;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.band h1 {
  font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: .5px;
  line-height: 1.14; margin: 0 0 18px; max-width: 24ch; text-wrap: balance;
}
.band .lede {
  font-size: 17px; color: var(--on-navy-m); max-width: 62ch; margin: 0 0 30px;
  letter-spacing: .3px;
}
.band .lede:last-child { margin-bottom: 0; }

.tally { display: flex; flex-wrap: wrap; column-gap: 0; row-gap: 20px; align-items: stretch; }
.tally div {
  padding-right: 26px; margin-right: 26px;
  border-right: 1px solid rgba(255,255,255,.18); min-width: 92px;
}
.tally div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
@media (max-width: 640px) {
  .tally { display: grid; grid-template-columns: 1fr 1fr; }
  .tally div { border-right: 0; margin-right: 0; padding-right: 0; }
}
.tally .n {
  display: block; font-size: 27px; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--on-navy);
}
.tally .l {
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--on-navy-m);
}

/* ---------- hub ---------- */

.intro { padding: 52px 0 8px; }
.intro p { font-size: 17px; color: var(--muted); max-width: 66ch; margin: 0; letter-spacing: .3px; }

.books {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  padding: 34px 0 20px; list-style: none; margin: 0;
}
@media (max-width: 760px) { .books { grid-template-columns: 1fr; } }

/* the cover stands on the card the way a book stands on a shelf */
.bk {
  display: flex; flex-direction: row; gap: 20px; align-items: flex-start;
  padding: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.bk:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.bk:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.bk .cover { flex: 0 0 auto; }
.bk .cover img {
  display: block; height: 156px; width: auto; border-radius: 2px;
  box-shadow: 0 7px 18px rgba(18,36,61,.20), 0 1px 2px rgba(18,36,61,.16);
}
@media (max-width: 420px) { .bk { flex-direction: column; } .bk .cover img { height: 132px; } }
.bk .body { display: flex; flex-direction: column; flex: 1; min-width: 0; align-self: stretch; }
.bk .yr {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; margin: 0 0 6px;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.bk h2 {
  font-size: 16px; font-weight: 800; letter-spacing: .3px; margin: 0 0 5px;
  line-height: 1.3; text-wrap: balance;
}
.bk .sub {
  font-size: 12.5px; color: var(--muted); margin: 0 0 15px; flex: 1;
  letter-spacing: .2px; line-height: 1.5;
}
.bk .go {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); display: inline-flex; align-items: center; gap: 7px;
}
.bk .go svg { transition: transform .16s ease; }
.bk:hover .go svg { transform: translateX(3px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; border: 1px solid var(--line);
  color: var(--muted); background: var(--wash);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip b { color: var(--ink); font-weight: 800; }
.chip.infographic b { color: var(--blue); }
.chip.video b       { color: var(--coral); }
.chip.podcast b     { color: #b3700f; }
.chip.lecture b     { color: var(--muted); }

/* ---------- book page ---------- */

.crumb { padding: 26px 0 0; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; }
.crumb a { color: var(--blue); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb span { color: var(--muted); }

.typenav {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin: 30px 0 0; padding: 0; list-style: none;
}
.typenav a {
  display: block; padding: 12px 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.typenav a:hover, .typenav a:focus-visible { color: var(--ink); }
.typenav a.on { color: var(--ink); border-bottom-color: var(--amber); }
.typenav .n { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.sect { padding: 46px 0 0; scroll-margin-top: 20px; }
.sect > header { margin-bottom: 22px; }
.sect h2 {
  font-size: 21px; font-weight: 800; letter-spacing: .4px; margin: 0 0 6px;
  display: flex; align-items: center; gap: 12px;
}
.sect h2 .rule { flex: 1; height: 1px; background: var(--line); }
.sect .blurb { font-size: 14.5px; color: var(--muted); margin: 0; max-width: 64ch; letter-spacing: .2px; }

.items { display: grid; gap: 22px; }
.items.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .items.two { grid-template-columns: 1fr; } }

.item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.item .shot { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.item .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .shot iframe { width: 100%; height: 100%; border: 0; display: block; }
.item.infographic .shot { background: var(--wash); cursor: zoom-in; }
.item.infographic .shot img { object-fit: contain; }

/* click-to-load YouTube: a thumbnail until the visitor asks for the player,
   so a book page with seven pieces does not load seven iframes up front */
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10,18,28,.20); border: 0; cursor: pointer; padding: 0;
  transition: background .16s ease;
}
.play:hover { background: rgba(10,18,28,.34); }
.play:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.play span {
  width: 58px; height: 40px; border-radius: 6px; background: var(--coral);
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.play svg { display: block; }
.dur {
  position: absolute; right: 9px; bottom: 9px;
  background: rgba(10,18,28,.9); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 2px;
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

.item .body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.item h3 { font-size: 15px; font-weight: 800; letter-spacing: .25px; margin: 0; line-height: 1.35; text-wrap: balance; }
.item p { font-size: 13px; color: var(--muted); margin: 0; flex: 1; letter-spacing: .15px; line-height: 1.55; }
.item .acts { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 3px; }
.item .acts a {
  font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--blue); text-decoration: none;
}
.item .acts a:hover { text-decoration: underline; }
.item .acts .sep { color: var(--line-2); }

/* still to come — amber, never red: these are unfinished, not failed */
.item.planned { border-style: dashed; background: transparent; }
.item.planned .shot { background: var(--wash); display: grid; place-items: center; }
.item.planned .shot p {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); margin: 0; text-align: center; padding: 0 20px;
}

/* private uploads: listed, not embedded */
.plain { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plain li {
  display: flex; gap: 14px; align-items: baseline; justify-content: space-between;
  padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.plain .t { font-weight: 600; }
.plain .tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); white-space: nowrap;
}
.note {
  font-size: 13px; color: var(--muted); margin: 14px 0 0; letter-spacing: .2px;
  max-width: 64ch;
}

/* ---------- playlists + footer ---------- */

.plfoot {
  margin: 56px 0 0; padding: 22px 24px;
  background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.plfoot p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; min-width: 240px; letter-spacing: .2px; }
.plfoot p b { color: var(--ink); font-weight: 700; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block; background: var(--amber); color: #1b1205;
  font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 3px; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px currentColor; }
.btn.ghost:hover { background: rgba(0,113,184,.07); filter: none; }

.disc {
  font-size: 12.5px; color: var(--muted); letter-spacing: .2px;
  border-left: 3px solid var(--line); padding: 4px 0 4px 16px;
  margin: 40px 0 0; max-width: 70ch;
}
.stamp {
  font-size: 12px; color: var(--muted); letter-spacing: .2px;
  margin: 30px 0 0; padding: 18px 0 70px; border-top: 1px solid var(--line);
}

/* ---------- lightbox ---------- */

#lb {
  position: fixed; inset: 0; background: rgba(10,18,28,.94);
  display: none; align-items: center; justify-content: center;
  padding: 28px; z-index: 60; cursor: zoom-out;
}
#lb.on { display: flex; }
#lb img { max-width: 100%; max-height: 100%; border-radius: 3px; }
#lb .x {
  position: fixed; top: 16px; right: 22px; color: #fff; font-size: 30px;
  background: none; border: 0; cursor: pointer; line-height: 1; padding: 6px 10px;
}
#lb .x:focus-visible { outline: 2px solid var(--amber); }

.empty { color: var(--muted); font-size: 14px; padding: 6px 0 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .bk:hover { transform: none; }
}
