@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Fraunces:opsz,wght@9..144,400..700&display=swap");

:root {
  color-scheme: light;
  --ink: #21191e;
  --paper: #fff8f1;
  --pink: #f5c8da;
  --soft-pink: #fae4ed;
  --yellow: #f3e899;
  --muted: #584851;
  --rule: #b59ba8;
  --body-font: "DM Sans", Arial, sans-serif;
  --title-font: "Fraunces", Georgia, serif;
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; padding-bottom: 130px; }
main, header, footer, section, article, aside { min-width: 0; }
a { color: inherit; text-underline-offset: 0.22em; }
a, button, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
button, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
p { margin: 0 0 1.1rem; }
h1, h2, h3, .preview-title { text-wrap: balance; line-height: 1.12; }
h1, h2, .entry-title, .preview-title { font-family: var(--title-font); font-weight: 500; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.8rem, 5.9vw, 5.25rem); margin: 0 0 1.5rem; max-width: 15ch; }
h2, .entry-title, .preview-title { font-size: clamp(1.75rem, 3vw, 2.6rem); margin: 0 0 1.35rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 0.8rem; font-weight: 650; }
li { font-size: 1rem; }
img { display: block; width: 100%; height: auto; color: var(--ink); font-size: 18px; line-height: 1.65; }
figure { margin: 0; }
button { border: 2px solid var(--ink); background: var(--ink); color: var(--paper); min-height: 52px; padding: 10px 22px; border-radius: 999px; cursor: pointer; font-size: 18px; font-weight: 600; }
button:hover { background: #43323d; }
button:disabled { cursor: default; opacity: 1; background: var(--soft-pink); color: var(--muted); border-color: var(--muted); }
textarea { display: block; width: 100%; max-width: 100%; min-height: 170px; resize: vertical; border: 2px solid var(--ink); border-radius: 12px; padding: 16px; background: #fffdfb; font-size: 18px; line-height: 1.6; }
textarea:disabled { background: var(--paper); }
label { display: block; font-size: 18px; font-weight: 650; margin-bottom: 4px; }
::selection { background: var(--yellow); color: var(--ink); }
[id] { scroll-margin-top: 24px; scroll-margin-bottom: 130px; }

.skip-link { position: absolute; top: -100px; left: 20px; min-height: 48px; padding: 12px 18px; border-radius: 8px; background: var(--ink); color: var(--paper); z-index: 10; font-size: 18px; }
.skip-link:focus { top: 12px; }
.masthead { max-width: 1248px; margin: auto; padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--rule); }
.journal-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 48px; font-size: 20px; font-weight: 650; letter-spacing: -0.025em; text-decoration: none; }
.journal-name span { font-family: var(--title-font); font-style: italic; font-weight: 500; }
.masthead-label { margin: 0; font-size: 16px; color: var(--muted); }
.eyebrow { font-size: 16px; font-weight: 650; line-height: 1.5; margin-bottom: 14px; }
.date-line { font-size: 16px; line-height: 1.5; color: var(--muted); margin-bottom: 20px; }
.welcome { max-width: 1248px; margin: auto; padding: 56px 32px 72px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); align-items: start; gap: 62px; }
.welcome h1 { max-width: 12ch; }
.welcome-intro { max-width: 49ch; margin-bottom: 24px; font-size: 20px; line-height: 1.6; }
.welcome .journal-photo { padding-top: 8px; }
.welcome .photo-frame { border-radius: 160px 160px 28px 28px; min-height: 550px; background: var(--pink); }
.welcome .photo-frame img { aspect-ratio: 896 / 1152; object-fit: cover; }
.journal-photo figcaption { font-size: 16px; color: var(--muted); line-height: 1.6; margin-top: 12px; max-width: 58ch; }
.photo-frame { overflow: hidden; background: var(--soft-pink); border-radius: 24px; }
.primary-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 56px; max-width: 100%; padding: 12px 24px; background: var(--ink); color: var(--paper); text-decoration: none; border: 2px solid var(--ink); border-radius: 999px; font-size: 18px; font-weight: 600; line-height: 1.5; }
.primary-link:hover { background: #43323d; }
.text-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; max-width: 100%; font-size: 18px; line-height: 1.5; padding: 8px 0; font-weight: 600; }

.orientation-answer { background: var(--pink); padding: 20px 32px 42px; }
.entry-section { display: grid; grid-template-columns: minmax(0, 176px) minmax(0, 68ch); column-gap: 60px; max-width: 1010px; margin: 0 auto; padding: 48px 0; align-items: start; }
.entry-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.entry-copy p { overflow-wrap: break-word; }
.margin-terms { grid-column: 1; grid-row: 1; min-width: 0; margin-top: 7px; padding: 16px 0 0; border-top: 2px solid var(--ink); }
.margin-terms dl { margin: 0; }
.margin-terms dt { font-size: 16px; font-weight: 700; line-height: 1.45; margin: 0 0 8px; overflow-wrap: anywhere; }
.margin-terms dd { font-size: 16px; line-height: 1.6; margin: 0 0 28px; color: var(--muted); }
.margin-terms dd:last-child { margin-bottom: 0; }
.claim-pair { margin: 0 0 24px; }
.claim-pair p { margin-bottom: 2px; }
.source-link { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; max-width: 100%; font-size: 16px; line-height: 1.5; padding: 8px 0; font-weight: 500; }
.source-link:hover { text-decoration-thickness: 2px; }
.source-link span { flex: 0 0 auto; }

.journal-index { max-width: 1248px; padding: 72px 32px 60px; margin: auto; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); column-gap: 72px; }
.index-intro h2 { max-width: 11ch; font-size: clamp(2.3rem, 3.8vw, 3.5rem); }
.index-intro p { max-width: 28ch; }
.journal-row { border-top: 1px solid var(--rule); padding: 20px 0; }
.journal-row:last-child { border-bottom: 1px solid var(--rule); }
.journal-row .date-line { margin-bottom: 7px; }
.journal-link { display: flex; justify-content: space-between; align-items: center; gap: 22px; min-height: 100px; font-size: 18px; text-decoration: none; padding: 5px 0 8px; }
.row-topic { display: block; color: var(--muted); font-size: 16px; line-height: 1.6; margin-bottom: 4px; }
.row-title { display: block; font-family: var(--title-font); font-size: 28px; font-weight: 400; letter-spacing: -0.025em; line-height: 1.25; margin: 0 0 10px; text-wrap: wrap; }
.row-summary { display: block; font-size: 18px; line-height: 1.6; max-width: 58ch; }
.row-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px; height: 48px; border-radius: 50%; background: var(--soft-pink); font-size: 28px; }
.journal-link:hover .row-title { text-decoration: underline; text-underline-offset: 0.2em; }
.home-next { margin: 0 auto 70px; padding: 44px; background: var(--yellow); border-radius: 28px; max-width: 1020px; }
.home-next p { max-width: 62ch; }

.journal-entry { max-width: 1248px; margin: auto; padding: 58px 32px 0; }
.entry-heading { max-width: 1010px; margin: auto; padding-left: 236px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.entry-heading h1 { max-width: 15ch; font-size: clamp(2.8rem, 5.2vw, 4.7rem); }
.entry-intro { font-size: 20px; line-height: 1.65; max-width: 58ch; margin-bottom: 12px; }
.journal-entry .entry-section + .entry-section,
.journal-entry .entry-group + .entry-section,
.journal-entry .entry-section + .entry-group > .entry-section:first-child { border-top: 1px solid var(--rule); }
.journal-entry > .journal-photo { max-width: 774px; margin: 8px auto 44px; padding-left: 0; }
.journal-entry > .journal-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.next-answer { max-width: 1010px; margin: 0 auto 56px; padding: 36px 36px 32px 236px; background: var(--soft-pink); border-radius: 24px; }
.next-answer .preview-title { font-size: 2rem; }
.next-answer p { max-width: 62ch; }

.question-pad { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 58px; max-width: 1100px; margin: 0 auto 64px; padding: 42px; background: var(--pink); border-radius: 28px; }
.pad-intro h2 { max-width: 10ch; font-size: 2.8rem; }
.pad-intro p { max-width: 38ch; }
.pad-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.quiet-button { background: transparent; color: var(--ink); }
.quiet-button:hover { background: var(--paper); }
.note-help, .note-status { font-size: 16px; line-height: 1.6; margin-bottom: 14px; }
.note-status { margin: 16px 0 0; min-height: 26px; }
.note-help { color: var(--muted); }

.site-footer { max-width: 1248px; margin: auto; border-top: 1px solid var(--rule); padding: 30px 32px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 50px; }
.site-footer p { font-size: 18px; max-width: 60ch; margin: 0; }
.footer-links { display: flex; flex-direction: column; align-items: start; gap: 4px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 0; font-size: 16px; line-height: 1.5; }
.bottom-dock { position: fixed; z-index: 5; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(580px, calc(100% - 24px)); padding: 6px; gap: 2px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: 0 5px 0 #21191e1a; }
.bottom-dock a { display: flex; justify-content: center; align-items: center; min-height: 56px; min-width: 44px; padding: 10px 8px; font-size: 16px; font-weight: 500; line-height: 1.25; text-decoration: none; border-radius: 999px; }
.bottom-dock a:hover, .bottom-dock a[aria-current="page"] { background: var(--pink); color: var(--ink); }
.bottom-dock a:focus-visible { outline-color: var(--yellow); outline-offset: -3px; }

@media (max-width: 1000px) {
  .welcome { gap: 32px; }
  .welcome .photo-frame { min-height: 380px; }
  .entry-section { grid-template-columns: minmax(0, 155px) minmax(0, 1fr); gap: 34px; }
  .entry-heading { padding-left: 189px; }
  .next-answer { padding-left: 189px; }
  .question-pad { margin-left: 32px; margin-right: 32px; gap: 32px; padding: 32px; }
  .journal-index { gap: 38px; }
  .home-next { margin-left: 32px; margin-right: 32px; }
}

@media (max-width: 700px) {
  body { padding-bottom: 125px; }
  .masthead { padding: 16px 20px; gap: 10px; display: block; }
  .journal-name { min-height: 44px; }
  .masthead-label { margin: 2px 0 0; }
  .welcome { display: block; padding: 34px 20px 42px; }
  .welcome h1 { font-size: clamp(2.55rem, 11.5vw, 3.5rem); max-width: 13ch; }
  .welcome-intro { font-size: 18px; }
  .welcome .journal-photo { margin-top: 32px; }
  .welcome .photo-frame { min-height: 0; border-radius: 96px 96px 22px 22px; }
  .welcome .photo-frame img { aspect-ratio: 1; object-position: center 55%; }
  .primary-link { gap: 18px; padding: 12px 20px; font-size: 18px; }
  .orientation-answer { padding: 0 20px 10px; }
  .entry-section { display: flex; flex-direction: column; gap: 0; padding: 34px 0; }
  .entry-copy { width: 100%; }
  .margin-terms { order: -1; margin: 0 0 24px; padding: 14px 18px; border-top: 0; border-left: 3px solid var(--ink); background: var(--soft-pink); width: 100%; }
  .margin-terms dt { margin-bottom: 4px; }
  .margin-terms dd { margin-bottom: 16px; }
  .orientation-answer .margin-terms { background: var(--paper); }
  .entry-copy .entry-title { font-size: 1.95rem; }
  .journal-index { display: block; padding: 48px 20px; }
  .index-intro { margin-bottom: 30px; }
  .index-intro h2 { max-width: 14ch; font-size: 2.55rem; }
  .index-intro p { max-width: 36ch; }
  .journal-row { padding: 18px 0; }
  .journal-link { gap: 15px; }
  .row-title { font-size: 26px; }
  .row-arrow { flex-basis: 44px; height: 44px; }
  .home-next { margin: 0 20px 40px; padding: 28px 22px; border-radius: 20px; }
  .home-next h2 { font-size: 2rem; }
  .journal-entry { padding: 36px 20px 0; }
  .entry-heading { padding: 0 0 24px; }
  .entry-heading h1 { font-size: 2.75rem; max-width: 14ch; }
  .entry-intro { font-size: 18px; }
  .journal-entry > .journal-photo { margin-bottom: 32px; }
  .next-answer { padding: 26px 22px; margin-bottom: 36px; border-radius: 20px; }
  .question-pad { display: block; margin: 0 20px 40px; padding: 28px 22px; border-radius: 20px; }
  .pad-intro h2 { font-size: 2.35rem; max-width: 14ch; }
  .pad-intro { margin-bottom: 26px; }
  .pad-actions { gap: 10px; }
  .pad-actions button { width: 100%; }
  .site-footer { padding: 26px 20px 12px; grid-template-columns: 1fr; gap: 18px; }
  .site-footer p { font-size: 18px; }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 10px 24px; }
  .bottom-dock { border-radius: 26px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .bottom-dock a { padding: 10px 3px; border-radius: 18px; }
  .date-line { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; animation: none; transition: none; }
}

@media print {
  body { padding-bottom: 0; background: white; }
  .bottom-dock, .skip-link, .question-pad, .journal-photo { display: none; }
  .entry-heading, .next-answer { padding-left: 0; }
  .entry-section { display: block; break-inside: avoid; }
  .margin-terms { margin-bottom: 20px; }
  .site-footer { display: block; }
  a { color: black; }
}
