/* Raising Lions Library: shared styles for /library and every Library piece */
:root {
  --navy: #13233A;
  --navy-deep: #0E1A2C;
  --navy-soft: #1E3350;
  --cream: #F6F2EA;
  --sand: #E8DFCF;
  --line: #E2D8C4;
  --white: #FFFFFF;
  --gold: #C49A45;
  --gold-light: #E0C27E;
  --gold-ink: #7A5A1E;
  --ink: #2B2A27;
  --ink-soft: #3D3B37;
  --muted: #5E5A52;
  --on-navy: #E9E2D3;
  --on-navy-muted: #CFC6B4;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 1200px;
  --narrow: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.65; }
img, video { max-width: 100%; display: block; }
a { color: var(--navy); }
a:hover { color: var(--gold-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--navy); margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }
.stack > * + * { margin-top: 22px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { background: var(--navy-soft); color: var(--cream); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--cream); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand span { font-family: var(--serif); font-size: 22px; color: var(--navy); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 15px; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { font-weight: 600; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.site-nav .btn { min-height: 44px; padding: 10px 22px; font-size: 15px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 48px; padding-bottom: 48px; font-size: 15px; }
.site-footer .brand img { width: 56px; height: 56px; }
.site-footer .brand span { color: var(--cream); font-size: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.site-footer a { color: var(--on-navy-muted); }
.site-footer a:hover { color: var(--cream); }

/* Library hub */
.lib-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; padding-top: 72px; padding-bottom: 40px; }
.lib-intro h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1; letter-spacing: -0.015em; }
.lib-intro p { margin-top: 16px; max-width: 34em; font-size: 20px; line-height: 1.5; color: var(--ink-soft); }
.lib-search { flex: 0 1 380px; display: flex; flex-direction: column; gap: 8px; }
.lib-search label { font-size: 14px; font-weight: 600; color: var(--navy); }
input[type="search"], input[type="email"] { font: inherit; font-size: 16px; min-height: 48px; padding: 12px 16px; border: 1px solid #A89A7C; background: var(--white); color: var(--ink); width: 100%; }

.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); background: var(--navy); color: var(--cream); text-decoration: none; }
.featured:hover { color: var(--cream); }
.featured-media { position: relative; background: var(--navy-soft); aspect-ratio: 16 / 10; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.featured-body .kicker { font-size: 14px; font-weight: 600; color: var(--gold-light); }
.featured-body .kicker span { margin-left: 12px; font-weight: 400; color: #A9A293; }
.featured-body h2 { color: var(--cream); font-size: clamp(32px, 3.4vw, 46px); line-height: 1.08; }
.featured-body p { font-size: 17px; color: #D9D2C3; }
.featured-body ul { margin: 0; padding-left: 20px; font-size: 16px; color: var(--on-navy); }
.featured-body li + li { margin-top: 6px; }
.featured-body .btn { align-self: flex-start; margin-top: 8px; }

.filters { border-top: 1px solid var(--line); padding-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.filter-row > span { min-width: 56px; font-size: 14px; font-weight: 600; color: var(--muted); }
.chip { font: inherit; font-size: 15px; min-height: 44px; padding: 8px 18px; border: 1px solid #CDBFA3; background: transparent; color: var(--navy); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--cream); font-weight: 600; }
.chip.topic { border: 0; border-radius: 22px; background: var(--sand); font-size: 14px; }
.chip.topic[aria-pressed="true"] { background: var(--gold); color: var(--navy); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 40px 28px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.card:hover h3 { color: var(--gold-ink); }
.card[hidden] { display: none; }
.cover { aspect-ratio: 3 / 2; overflow: hidden; display: flex; align-items: flex-end; padding: 28px; background: var(--sand); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.has-img { padding: 0; background: var(--navy); }
.cover q, .cover p { font-family: var(--serif); font-size: 27px; line-height: 1.22; color: var(--navy); quotes: "\201C" "\201D"; }
.cover.navy { background: var(--navy); }
.cover.navy q, .cover.navy p { color: var(--cream); }
.cover.gold { background: #EAD7AC; }
.meta { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.meta b { color: var(--gold-ink); }
.meta span { color: var(--muted); }
.card h3 { font-size: 26px; font-weight: 500; line-height: 1.18; }
.card p.blurb { font-size: 16px; color: var(--ink-soft); }
.card p.topics { font-size: 14px; color: var(--muted); }
.card audio { width: 100%; margin-top: 4px; }

.empty { padding: 48px 24px; background: var(--white); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty[hidden] { display: none; }
.empty p:first-child { font-family: var(--serif); font-size: 26px; color: var(--navy); }

.next-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; background: var(--sand); font-size: 16px; color: var(--navy); }

.newsletter { background: var(--navy); color: var(--cream); }
.newsletter .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.newsletter h2 { color: var(--cream); font-size: clamp(34px, 4vw, 52px); line-height: 1.08; }
.newsletter p { margin-top: 16px; font-size: 18px; color: #D9D2C3; }
.newsletter form { display: flex; flex-direction: column; gap: 12px; }
.newsletter label { font-size: 14px; font-weight: 600; }
.newsletter .row { display: flex; flex-wrap: wrap; gap: 12px; }
.newsletter .row input { flex: 1 1 240px; width: auto; border-color: #5E6B80; }
.newsletter small { font-size: 14px; color: #A9A293; }

/* Piece page */
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs span { margin: 0 10px; color: #8A8273; }
.piece-head { padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.piece-head h1 { max-width: 900px; font-size: clamp(44px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -0.015em; }
.piece-head .dek { max-width: 760px; font-size: 21px; line-height: 1.5; color: var(--ink-soft); }
.people { display: flex; flex-wrap: wrap; gap: 20px 36px; padding-top: 12px; }
.person { display: flex; align-items: center; gap: 14px; line-height: 1.35; }
.person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.person strong { display: block; font-size: 17px; color: var(--navy); }
.person span { font-size: 15px; color: var(--muted); }

.watch { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-bottom: 80px; }
.watch video { flex: 2 1 560px; min-width: 0; width: 100%; aspect-ratio: 16 / 9; background: var(--navy); }
.video-embed { flex: 2 1 560px; min-width: 0; width: 100%; position: relative; background: var(--navy); }
.video-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.video-poster { position:relative; display:flex; flex-direction:column; width:100%; border:0; padding:0; cursor:pointer; background:var(--navy); z-index:1; }
.video-poster img { width:100%; height:auto; aspect-ratio:16 / 9; object-fit:cover; }
.video-poster .btn { position:static; width:100%; min-height:48px; }
.video-embed.playing { aspect-ratio:16 / 9; }
.video-embed.playing .video-poster { display:none; }
.library-kit { min-width:0; }
.library-kit .formkit-form { background:transparent!important; border:0!important; padding:0!important; margin:0!important; max-width:none!important; }
.library-kit .formkit-fields { display:flex!important; flex-wrap:wrap!important; gap:12px!important; margin:0!important; }
.library-kit .formkit-field { flex:1 1 240px!important; margin:0!important; }
.library-kit .formkit-input { width:100%!important; border-radius:0!important; background:#fff!important; color:var(--ink)!important; padding:12px 16px!important; min-height:48px!important; font:16px/1.65 var(--sans)!important; }
.library-kit .formkit-submit { background:var(--gold)!important; color:var(--navy)!important; border:0!important; border-radius:0!important; min-height:48px!important; font:600 16px/1.65 var(--sans)!important; }
.library-kit .formkit-powered-by-convertkit-container,.library-kit .formkit-powered-by { display:none!important; }
.library-kit .formkit-alert-error { color:#7a1c1c!important; background:#fde8e6!important; border:1px solid #c0392b!important; font-size:15px!important; padding:10px 14px!important; }
.library-kit .formkit-alert-success { color:var(--cream)!important; background:transparent!important; }
.site-nav a,.site-footer nav a { display:inline-flex; align-items:center; min-height:44px; }
@media(max-width:640px) { .grid,.related .grid { grid-template-columns:minmax(0,1fr); } .watch { flex-direction:column; } .video-embed { flex:none; } .chapters { flex:auto; width:100%; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
.chapters { flex: 1 1 300px; }
.chapters h2 { font-size: 24px; font-weight: 500; margin-bottom: 12px; }
.chapters ol { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.chapters li { border-top: 1px solid var(--line); }
.chapters button { width: 100%; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 14px 0; min-height: 44px; background: none; border: 0; font: inherit; font-size: 16px; text-align: left; color: var(--navy); cursor: pointer; }
.chapters button:hover span:last-child { text-decoration: underline; }
.chapters button span:first-child { font-weight: 600; color: var(--gold-ink); }

.prose h2 { font-size: 38px; line-height: 1.12; scroll-margin-top: 24px; }
.prose h2:not(:first-child) { margin-top: 48px; }
.pull { margin: 8px 0; padding-left: 24px; border-left: 3px solid var(--gold); font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.35; color: var(--navy); }
.pull cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 15px; color: var(--muted); }

.layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; padding-top: 40px; }
.layer { padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; background: var(--white); }
.layer:nth-child(2) { background: var(--sand); }
.layer:nth-child(3) { background: var(--navy); color: var(--cream); }
.layer .n { font-size: 15px; font-weight: 600; color: var(--gold-ink); }
.layer:nth-child(3) .n { color: var(--gold-light); }
.layer h3 { font-size: 32px; font-weight: 500; }
.layer:nth-child(3) h3 { color: var(--cream); }
.layer .what { font-size: 17px; font-weight: 600; color: var(--navy); }
.layer:nth-child(3) .what { color: var(--cream); }
.layer p:last-child { font-size: 16px; color: var(--ink-soft); }
.layer:nth-child(3) p:last-child { color: #D9D2C3; }
.layers-line { padding: 36px 0 8px; text-align: center; font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); line-height: 1.3; color: var(--navy); }
.layers-line em { color: var(--gold-ink); }

.habits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; padding-top: 32px; }
.habit { background: var(--white); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.habit h3 { font-size: 24px; font-weight: 500; line-height: 1.2; }
.habit p { font-size: 16px; color: var(--ink-soft); }

.tomorrow { margin-top: 64px; background: var(--navy); color: var(--cream); padding: 48px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px; scroll-margin-top: 24px; }
.tomorrow h2 { color: var(--cream); font-size: 44px; line-height: 1.05; }
.tomorrow > div:first-child p { margin-top: 14px; font-size: 17px; color: #D9D2C3; }
.tomorrow .item { padding-top: 16px; border-top: 1px solid rgba(224, 194, 126, 0.45); display: flex; flex-direction: column; gap: 6px; }
.tomorrow .item + .item { margin-top: 24px; }
.tomorrow .label { font-size: 15px; font-weight: 600; color: var(--gold-light); }
.tomorrow .q { font-family: var(--serif); font-size: 24px; line-height: 1.3; }
.tomorrow .item p:not(.label):not(.q) { font-size: 17px; color: var(--on-navy); }

.resources { padding-top: 64px; }
.resources h2 { font-size: 34px; margin-bottom: 16px; }
.resources ul { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.resources li { border-top: 1px solid var(--line); }
.resources a { display: block; padding: 16px 0; text-decoration: none; }
.resources a strong { display: block; }
.resources a span { display: block; font-size: 16px; color: var(--muted); }

.members { margin-top: 72px; background: var(--sand); padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; align-items: center; }
.members h2 { font-size: 36px; line-height: 1.1; }
.members p { margin-top: 12px; font-size: 17px; color: var(--ink-soft); }
.members .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.members .cta span { font-size: 15px; color: var(--muted); }

.related { padding-top: 72px; padding-bottom: 96px; }
.related h2 { font-size: 34px; margin-bottom: 28px; }
.related .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.related .card h3 { font-size: 24px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .featured-body, .tomorrow, .members { padding: 28px 22px; }
  .prose h2 { font-size: 32px; }
  .pull { font-size: 24px; }
  .cover q, .cover p { font-size: 23px; }
}
