@font-face {
  font-family: "Fraunces";
  src: url("/media/fonts/bpc-question-display.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fffcf3;
  --ink: #253f38;
  --muted: #53635b;
  --teal: #14655b;
  --coral: #ae452e;
  --peach: #f9d9c8;
  --sun: #f8df7a;
  --leaf: #e6edd7;
  --display: "Fraunces", Georgia, serif;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--teal); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 5px;
}
::selection { color: var(--ink); background: var(--sun); }
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
p + p { margin-top: .9em; }
h1, h2, h3 { font-family: var(--display); font-weight: 540; font-variation-settings: "SOFT" 45, "WONK" 1; }
h1 { max-width: 18ch; font-size: clamp(2.6rem, 4.6vw, 4.25rem); line-height: 1.08; letter-spacing: -.045em; }
h1 em { color: var(--coral); font-style: normal; }
h2, [data-role="idea"] > h3, [data-role="notebook"] > h3 { font-size: clamp(1.65rem, 2.7vw, 2rem); line-height: 1.2; letter-spacing: -.025em; margin-bottom: .7em; max-width: 28ch; }
h3 { font-size: 1.4rem; line-height: 1.3; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .6em; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button, summary { -webkit-tap-highlight-color: transparent; }
textarea { display: block; width: 100%; min-height: 15rem; resize: vertical; padding: 1rem; line-height: 1.7; color: var(--ink); background: #fffef9; border: 2px solid #748d73; border-radius: 12px; }
textarea::placeholder { color: var(--muted); opacity: 1; }
label { display: block; font-weight: 600; margin: 1.4rem 0 .55rem; }
main { min-width: 0; }
main:focus { outline: none; }
img { display: block; max-width: 100%; height: auto; }

[data-role="skip-link"] { position: absolute; z-index: 20; left: 1rem; top: .5rem; background: var(--paper); border: 2px solid var(--teal); border-radius: 12px; padding: .65rem 1rem; transform: translateY(-150%); }
[data-role="skip-link"]:focus { transform: translateY(0); }
[data-role="masthead"] { display: flex; align-items: center; gap: 2rem; max-width: 1440px; margin: auto; padding: 1.7rem 3rem; }
[data-role="masthead"] > p { font-size: 1rem; color: var(--muted); margin-left: auto; }
[data-role="wordmark"] { display: inline-flex; align-items: center; gap: .7rem; font-family: var(--display); font-size: 1.3rem; font-weight: 600; line-height: 1.15; text-decoration: none; color: var(--ink); min-height: 56px; }
[data-role="sun-mark"] { position: relative; flex: 0 0 42px; width: 42px; height: 42px; background: var(--sun); border-radius: 50% 50% 15% 50%; transform: rotate(-25deg); }
[data-role="sun-mark"]::after { content: ""; width: 13px; height: 23px; position: absolute; left: 14px; top: 10px; background: var(--teal); border-radius: 80% 0 80% 0; transform: rotate(35deg); }
[data-role="notes-link"] { min-height: 48px; display: inline-flex; align-items: center; gap: 1.3rem; border: 1.5px solid var(--teal); border-radius: 30px; padding: .5rem 1.05rem; font-size: 1rem; text-decoration: none; white-space: nowrap; }
[data-role="notes-link"]:hover { background: var(--leaf); }
[data-role="page-layout"] { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: clamp(2rem, 4vw, 4.4rem); max-width: 1440px; margin: 1.65rem auto 5rem; padding: 0 3rem; align-items: start; }
[data-role="chapter-index"] { position: sticky; top: 1.5rem; align-self: start; font-size: 16px; }
[data-role="chapter-index"] > summary { cursor: pointer; min-height: 48px; align-items: center; justify-content: space-between; padding: .5rem .9rem; background: var(--leaf); border-radius: 18px; font-weight: 600; }
[data-role="chapter-index"] > summary > span { float: right; }
[data-role="chapter-index"] nav > p { color: var(--muted); line-height: 1.5; margin: .65rem 0 1.1rem; font-family: var(--display); font-size: 1.1rem; }
[data-role="chapter-index"] ol { list-style: none; padding: 0; }
[data-role="chapter-index"] li { margin: 0; }
[data-role="chapter-index"] a { display: flex; gap: .6rem; align-items: flex-start; padding: .62rem .5rem; border-radius: 15px; text-decoration: none; min-height: 68px; line-height: 1.35; color: var(--muted); }
[data-role="chapter-index"] a:hover { background: var(--leaf); }
[data-role="chapter-index"] a[aria-current="page"] { background: var(--peach); color: var(--ink); }
[data-role="chapter-index"] strong { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
[data-role="chapter-index"] a > span:last-child > span { display: block; margin-top: .15rem; font-size: 16px; }
[data-role="chapter-letter"] { display: grid; place-items: center; flex-shrink: 0; width: 24px; min-height: 30px; color: var(--teal); font-family: var(--display); font-size: 18px; font-weight: 500; }
[data-role="page-intro"] { padding: 1.5rem 0 2.6rem; position: relative; }
[data-role="chapter-name"] { color: var(--teal); font-size: 1rem; margin-bottom: 1.1rem; max-width: 40ch; }
[data-role="lead"] { font-size: 1.14rem; line-height: 1.6; max-width: 53ch; margin-top: 1.5rem; }
[data-role="reading-body"] { max-width: 66ch; }
[data-role="idea"] { padding: 2.25rem 0; }
[data-role="idea"] + [data-role="idea"],
[data-role="idea-group"] + [data-role="idea"],
[data-role="idea"] + [data-role="idea-group"] > [data-role="idea"]:first-child,
[data-role="idea-group"] + [data-role="idea-group"] > [data-role="idea"]:first-child { border-top: 2px solid #dce3cf; }
[data-role="claim-source"] { margin-bottom: 1rem; }
[data-role="claim-source"] + [data-role="claim-source"] { margin-top: 1.6rem; }
[data-role="source-link"] { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; width: fit-content; min-height: 44px; font-size: 16px; margin: .7rem 0 0; padding: .25rem .1rem; }
[data-role="source-link"] > span:first-child { color: var(--muted); text-decoration: none; }
[data-role="source-link"] > span:last-child { text-decoration: underline; text-underline-offset: .2em; }
[data-role="text-link"] { display: inline-flex; align-items: center; gap: .8rem; min-height: 48px; font-size: 1rem; margin-top: .75rem; padding: .3rem 0; }
[data-role="tool-link"] { display: flex; gap: 1rem; justify-content: space-between; min-height: 52px; padding: .65rem 1rem; margin: 1rem 0; background: var(--leaf); border-radius: 12px; }
[data-role="take-along"] { margin: 1.5rem 0; padding: 1.4rem 1.6rem 1.6rem; background: var(--sun); border-radius: 10px 35px 35px 35px; }
[data-role="take-along"] > p:first-child { font-size: 16px; color: var(--ink); margin-bottom: .6rem; }
[data-role="take-along"] blockquote { font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.4; letter-spacing: -.02em; }
[data-role="prompt-list"] { list-style: none; padding: 0; margin-top: .8rem; }
[data-role="prompt-list"] li { padding: 1.1rem 0; border-bottom: 2px solid #dce3cf; margin: 0; display: flex; gap: 1rem; align-items: center; }
[data-role="prompt-list"] p { flex: 1; }
[data-role="prompt-list"] button { flex: 0 0 auto; background: var(--leaf); color: var(--teal); border: 0; border-radius: 24px; min-height: 44px; padding: .4rem .8rem; font-size: 16px; }
[data-role="prompt-list"] button:hover { background: var(--sun); }
[data-role="note-feedback"] { font-size: 16px; color: var(--teal); margin-top: .7rem; }
[data-role="note-feedback"]:empty { display: none; }
[data-role="notebook"] { background: var(--leaf); border-radius: 34px 34px 12px 34px; padding: 2rem; margin: 1rem 0 1.5rem; }
[data-role="notes-actions"] { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
[data-role="notes-actions"] button { background: var(--teal); color: #fffef6; border: 2px solid var(--teal); border-radius: 26px; min-height: 48px; padding: .55rem 1rem; font-size: 16px; }
[data-role="notes-actions"] button:hover { background: var(--ink); }
[data-clear-notes] { background: transparent !important; color: var(--teal) !important; }
[data-clear-notes]:hover { background: var(--sun) !important; }
[data-notes-status] { font-size: 16px; min-height: 2rem; }
[data-role="urgent"] { padding: 1.7rem; background: var(--peach); border: 2px solid #c75d3f; border-radius: 24px; margin: 1rem 0; }
[data-role="page-turn"] { margin-top: 2rem; padding-top: 1.3rem; border-top: 2px solid #c2d1bd; }
[data-role="page-turn"] > p { font-size: 16px; color: var(--muted); }
[data-role="page-turn"] a { display: flex; gap: 1rem; align-items: center; justify-content: space-between; min-height: 66px; font-family: var(--display); font-size: 1.7rem; text-decoration: none; }
[data-role="page-turn"] a > span:last-child { display: grid; place-items: center; background: var(--sun); width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
[data-role="site-footer"] { max-width: 1332px; margin: 0 auto; padding: 2rem 0 2.5rem; border-top: 3px solid var(--coral); font-size: 16px; }
[data-role="site-footer"] > p { max-width: 70ch; }
[data-role="site-footer"] nav { display: flex; flex-wrap: wrap; gap: .4rem 2rem; margin-top: .8rem; }
[data-role="site-footer"] a { display: inline-flex; align-items: center; min-height: 48px; font-size: 16px; }

/* A single photographic opening, with a quiet paper shape while central media is pending. */
[data-page="welcome"] [data-role="page-intro"] { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .85fr); gap: 1.6rem; align-items: center; padding: .8rem 0 2.6rem; }
[data-page="welcome"] h1 { font-size: clamp(2.7rem, 4.5vw, 4rem); max-width: 11.5ch; }
[data-page="welcome"] h1 em { display: block; margin-top: .15em; }
[data-page="welcome"] [data-role="lead"] { font-size: 1.07rem; max-width: 39ch; }
[data-role="hero-links"] { margin-top: 1.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
[data-role="hero-links"] [data-role="text-link"] { margin: 0; }
[data-role="hero-links"] [data-role="text-link"]:first-child { color: #fffef6; background: var(--teal); border-radius: 30px; padding: .55rem 1.1rem; text-decoration: none; }
[data-role="hero-links"] [data-role="text-link"]:first-child:hover { background: var(--ink); }
[data-role="hero-photo"] { position: relative; align-self: stretch; min-height: 430px; max-height: 510px; background: var(--peach); border-radius: 47% 47% 30px 30px; margin: 1.2rem 0 0; overflow: hidden; }
[data-role="hero-photo"]::before { content: ""; position: absolute; width: 64%; aspect-ratio: 1; background: var(--sun); border-radius: 50%; left: 18%; top: 18%; }
[data-role="hero-photo"]::after { content: ""; position: absolute; width: 90px; height: 160px; background: #9cbfa0; border-radius: 90% 0 90% 0; right: 10%; top: 34%; transform: rotate(10deg); }
[data-role="hero-photo"] img { position: absolute; z-index: 1; width: 100%; height: 100%; object-fit: cover; color: var(--ink); font-size: 16px; }
[data-role="hero-photo"][data-image="pending"] img { visibility: hidden; }
[data-role="hero-photo"] figcaption { position: absolute; z-index: 2; bottom: 1rem; left: 1rem; right: 1rem; padding: .7rem 1rem; background: var(--paper); font-family: var(--display); font-size: 1.25rem; line-height: 1.3; border-radius: 18px; text-align: center; }
[data-page="welcome"] [data-role="reading-body"] { max-width: none; }
[data-page="welcome"] [data-role="idea"] { max-width: 66ch; }
[data-page="welcome"] [data-role="idea"]:first-child { background: var(--leaf); border-radius: 38px 38px 12px 38px; padding: 2rem 2.2rem; margin: 1rem 0 .7rem; max-width: 70ch; }
[data-page="welcome"] [data-role="page-turn"] { max-width: 66ch; }

@media (min-width: 1000px) {
  [data-role="chapter-index"][open] > summary { display: none; }
  [data-role="chapter-index"] nav { padding-top: 1rem; }
}
@media (max-width: 1390px) {
  [data-role="site-footer"] { margin-left: 3rem; margin-right: 3rem; }
}
@media (max-width: 1190px) and (min-width: 1000px) {
  [data-role="page-layout"] { grid-template-columns: 200px minmax(0, 1fr); gap: 2rem; padding: 0 2rem; }
  [data-page="welcome"] [data-role="page-intro"] { grid-template-columns: minmax(0, 1fr) 235px; gap: 1rem; }
  [data-page="welcome"] h1 { font-size: 2.9rem; }
}
@media (max-width: 999px) {
  [data-role="masthead"] { padding: 1.2rem 1.5rem; }
  [data-role="masthead"] > p { display: none; }
  [data-role="notes-link"] { margin-left: auto; }
  [data-role="page-layout"] { display: flex; flex-direction: column; gap: 1.4rem; padding: 0 1.5rem; margin-top: .4rem; }
  [data-role="chapter-index"] { position: static; width: 100%; }
  [data-role="chapter-index"] summary { font-size: 1rem; padding: .6rem 1rem; }
  [data-role="chapter-index"] nav { padding: .7rem .5rem; }
  [data-role="chapter-index"] nav > p { font-size: 1.15rem; }
  [data-role="chapter-index"] nav > p br { display: none; }
  [data-role="chapter-index"] ol { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
  [data-role="chapter-index"] a { padding: .8rem .5rem; }
  main { width: 100%; }
  [data-role="page-intro"] { padding: .6rem 0 1.5rem; }
  h1 { max-width: 16ch; font-size: clamp(2.7rem, 7.5vw, 4rem); }
  [data-page="welcome"] h1 { font-size: clamp(2.6rem, 6.2vw, 3.6rem); }
  [data-role="site-footer"] { margin-left: 1.5rem; margin-right: 1.5rem; }
}
@media (max-width: 620px) {
  :root { font-size: 18px; }
  [data-role="masthead"] { gap: .6rem; padding: 1rem 1.1rem 1.1rem; }
  [data-role="wordmark"] { font-size: 1.12rem; gap: .5rem; }
  [data-role="sun-mark"] { width: 35px; height: 35px; flex-basis: 35px; }
  [data-role="sun-mark"]::after { left: 11px; top: 8px; }
  [data-role="notes-link"] { font-size: 16px; gap: .5rem; padding: .45rem .8rem; }
  [data-role="page-layout"] { padding: 0 1.1rem; gap: 1.3rem; margin-bottom: 3rem; }
  [data-role="chapter-index"] ol { grid-template-columns: 1fr; }
  [data-role="chapter-name"] { font-size: 16px; line-height: 1.5; margin-bottom: .9rem; }
  h1 { font-size: 2.8rem; line-height: 1.08; max-width: 15ch; }
  h2, [data-role="idea"] > h3, [data-role="notebook"] > h3 { font-size: 1.75rem; }
  [data-role="lead"] { font-size: 1.08rem; margin-top: 1.2rem; }
  [data-role="idea"] { padding: 1.8rem 0; }
  [data-role="take-along"] { padding: 1.2rem 1.3rem 1.4rem; border-radius: 10px 28px 28px 28px; }
  [data-role="take-along"] blockquote { font-size: 1.38rem; }
  [data-role="prompt-list"] li { flex-direction: column; align-items: flex-start; gap: .6rem; }
  [data-role="prompt-list"] button { align-self: flex-start; }
  [data-role="notebook"] { padding: 1.2rem; margin-left: 0; margin-right: 0; border-radius: 26px; }
  [data-role="notes-actions"] { flex-direction: column; align-items: stretch; }
  [data-role="notes-actions"] button { padding: .7rem .8rem; }
  [data-role="urgent"] { padding: 1.25rem; }
  [data-role="page-turn"] a { font-size: 1.55rem; }
  [data-role="site-footer"] { margin-left: 1.1rem; margin-right: 1.1rem; padding-top: 1.5rem; }
  [data-role="site-footer"] nav { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; }
  [data-page="welcome"] [data-role="page-intro"] { grid-template-columns: 1fr; gap: 1.4rem; padding: 0 0 1rem; }
  [data-page="welcome"] h1 { font-size: 2.9rem; max-width: 12ch; }
  [data-page="welcome"] [data-role="lead"] { max-width: none; font-size: 1.06rem; }
  [data-role="hero-links"] { margin-top: 1rem; gap: .4rem; }
  [data-role="hero-photo"] { width: 100%; min-height: 0; height: 330px; border-radius: 45% 45% 24px 24px; margin: 0; }
  [data-role="hero-photo"] img { object-position: center 56%; }
  [data-page="welcome"] [data-role="idea"]:first-child { padding: 1.45rem; border-radius: 28px 28px 10px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  [data-role="masthead"], [data-role="chapter-index"], [data-role="site-footer"], [data-role="hero-photo"], [data-role="page-turn"], button { display: none !important; }
  [data-role="page-layout"] { display: block; padding: 0; margin: 0; }
  :root { font-size: 12pt; color: #111; background: #fff; }
  h1 { font-size: 30pt; }
  [data-role="idea"], [data-role="take-along"] { break-inside: avoid; }
}
