:root {
  --paper: #fbfaf6;
  --ink: #252720;
  --rust: #963c23;
  --blue: #364c6b;
  --line: #c5c4b9;
  font: 100%/1.45 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { width: min(90%, 1450px); margin: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid #a73f22; outline-offset: 5px; }
header, header nav, .case-heading, footer { display: flex; align-items: center; }
body { max-width: 1080px; }
header { min-height: 76px; justify-content: space-between; border-bottom: 1px solid var(--line); }
h1 { font-family: inherit; font-size: 1.65rem; font-weight: 650; line-height: 1.1; letter-spacing: -.045em; }
header nav { gap: 10px; }
header nav a { padding: 9px 14px; font-weight: 600; text-decoration: none; }
header nav a:hover { text-decoration: underline; }
.primary { color: white; background: #294b40; border-radius: 6px; }
.primary:hover { color: white; background: #18382e; }
.case-heading { justify-content: space-between; gap: 16px; margin: clamp(22px, 5vh, 48px) 0 18px; }
.case-heading h2 { font-size: 1.55rem; letter-spacing: -.035em; }
.case-heading p, #relation { color: #545b52; font-size: .95rem; }
.case-heading a, footer { font-size: .875rem; }
.folio, dt { font-size: .8rem; }
.spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 31%); border: 1px solid var(--line); }
figure { background: #edf1ee; color: var(--blue); margin: 0; padding: 10px clamp(12px, 2vw, 30px) 12px; }
.tree { position: relative; height: clamp(240px, 21vw, 330px); }
.tree svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--blue); }
.tree path { vector-effect: non-scaling-stroke; stroke-width: 1.6; }
.tree button { position: absolute; top: var(--y); left: var(--x); transform: translate(-50%, -15px); display: grid; justify-items: center; gap: 4px; background: transparent; border: 0; padding: 0 2px; color: inherit; font: 500 1rem/1.2 Georgia, serif; cursor: pointer; }
.tree button::before, figcaption i { content: ''; width: 30px; height: 30px; background: #edf1ee; border: 2px solid var(--blue); }
.tree .woman::before { border-radius: 50%; }
.tree .diagnosed::before, figcaption i { background: repeating-linear-gradient(128deg,#edf1ee 0 3px,var(--blue) 3px 4.5px); }
.tree button[aria-pressed=true]::before, .tree button:hover::before { outline: 2px solid var(--rust); outline-offset: 4px; }
.tree button[aria-pressed=true] { color: var(--rust); font-weight: 700; }
.generation { position: absolute; left: 0; transform: translateY(-50%); font-size: .8rem; }
.first { top: 15%; } .second { top: 48%; } .third { top: 81%; }
figcaption { border-top: 1px solid #c6d2cc; padding-top: 9px; display: flex; align-items: center; gap: 8px; font-size: .8rem; }
figcaption i { width: 13px; height: 13px; border-width: 1px; }
.record { border-left: 1px solid var(--line); background: #f6f5ef; padding: clamp(19px, 2.2vw, 36px); }
.folio { padding-bottom: 9px; border-bottom: 1px solid #a79a81; }
.record h3 { font-size: 1.55rem; margin: 12px 0 2px; }

dt { color: #67573f; margin: 16px 0 2px; } dd { line-height: 1.3; }
footer { justify-content: space-between; margin: 20px 0; color: #545b52; }
@media (max-width: 680px) {
  body { width: 92%; }
  header { min-height: 64px; }
  header nav { gap: 0; }
  .case-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .spread { grid-template-columns: 1fr; }
  .record { border-left: 0; border-top: 1px solid var(--line); }
  .record dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; margin-top: 12px; }
  dt { margin: 0; }
  .tree button { font-size: .9rem; }
}

.wordmark { font-size: 1.65rem; font-weight: 650; letter-spacing: -.045em; text-decoration: none; }
.home-intro { padding: clamp(16px, 3vh, 32px) 0; border-bottom: 1px solid var(--line); }
.home-intro h1, .guide h1 { font-size: 1.5rem; }
.home-intro p, .guide-intro { margin-top: 6px; }
.home-intro nav { display: flex; flex-wrap: wrap; gap: 5px 22px; margin-top: 10px; font-size: .9rem; color: #294b40; }
.case-heading { margin-top: 16px; }
.case-heading h2 { font-size: 1.2rem; }
.guide-layout { padding: 14px 0 18px; border-bottom: 1px solid var(--line); }
.guide-nav { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-bottom: 18px; font-size: .9rem; }
.guide-nav a { padding: 6px 9px; text-decoration: none; }
.guide-nav a:hover { text-decoration: underline; }
.guide-nav [aria-current] { background: #e7eee8; color: #294b40; font-weight: 600; }
.guide-intro { max-width: 84ch; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin: 20px 0; }
.guide-step h2 { font-size: 1.08rem; }
.guide-step p { font-size: .95rem; line-height: 1.45; }
.guide-image { display: grid; position: relative; place-items: center; height: clamp(130px, 22vh, 210px); margin: 8px 0 12px; padding: 8px 8px 24px; border: 1px solid #ccd6cf; background: #eef2ed; cursor: zoom-in; border-radius: 5px; }
.guide-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.guide-image span { position: absolute; right: 8px; bottom: 3px; color: #294b40; font-size: .72rem; }
.guide-action { color: #294b40; font-weight: 600; }
#screenshot-view { width: max-content; max-width: 94vw; max-height: 94dvh; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
#screenshot-view::backdrop { background: rgb(20 33 25 / .7); }
#screenshot-view div { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 10px; max-width: 84vw; }
#screenshot-view button { padding: 6px 12px; cursor: pointer; }
#screenshot-view img { display: block; width: auto; height: auto; max-width: 100%; max-height: 76dvh; margin: auto; object-fit: contain; }
@media (min-width: 681px) and (max-height: 720px) {
  .tree { height: 210px; }
  header { min-height: 56px; }
  .home-intro { padding: 12px 0; }
}
@media (max-width: 680px) {
  .guide-steps { grid-template-columns: 1fr; }
  .guide-image { height: auto; }
  .guide-image img { max-height: 235px; }
  .guide-nav { border-bottom: 1px solid var(--line); padding-bottom: 10px; font-size: .9rem; }
}

/* The home page is a working example. The illustrated guides share the header. */
.walk-home { max-width: 1180px; color: #203c33; }
.walk-home header { border-bottom-color: #aeb9ad; }
.walk-home .wordmark { font: 600 1.85rem Georgia, serif; letter-spacing: -.07em; }
.walk-intro { padding: clamp(26px, 4vw, 54px) 0 25px; }
.walk-intro h1 { font-family: inherit; font-size: 1.65rem; font-weight: 650; letter-spacing: -.045em; }
.walk-intro p { max-width: 74ch; margin: 10px 0 0; color: #516358; }
.bench { display: grid; grid-template-columns: minmax(180px, 24%) minmax(0, 1fr); border: 1px solid #9daa9d; }
.steps { background: #203f34; padding: 26px 0; color: white; }
.steps p { font: 400 1.55rem Georgia, serif; margin: 0 18px 25px; }
.walk-home button, .walk-home select, .walk-home textarea { font: inherit; }
.steps button { display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; cursor: pointer; padding: 14px 18px; border: 0; background: transparent; color: white; }
.steps button span { font: .8rem monospace; }
.steps button[aria-current] { background: #d9e5bd; color: #263c2d; font-weight: 650; }
.steps button:disabled { color: #c2d1c6; cursor: default; }
.stage { padding: clamp(20px, 3.2vw, 46px); min-height: 360px; background: #fffefa; }
.stage h2 { font: 400 clamp(1.65rem, 2.5vw, 2.5rem)/1.1 Georgia, serif; letter-spacing: -.04em; margin: 0 0 9px; }
.stage label, .stage h2 + p { display: block; color: #4c6054; }
.walk-home #note { width: 100%; resize: vertical; min-height: 134px; padding: 12px 17px; margin: 16px 0 10px; border: 1px solid #babcab; border-left: 4px solid #a8b58e; border-radius: 0; background: repeating-linear-gradient(to bottom,#f9f7ee 0 31px,#dedfd2 31px 32px) 0 10px; font: 1.18rem/32px Georgia, serif; color: #26382b; }
.actions, .resources nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.actions { margin-top: 14px; }
.actions button, .actions a { display: inline-block; padding: 9px 15px; border: 1px solid #849485; border-radius: 4px; cursor: pointer; text-decoration: none; color: inherit; background: transparent; }
.walk-home .actions .primary { background: #294b40; border-color: #294b40; color: white; }
.actions span, .scope { font-size: .87rem; color: #506055; }
#noteError:not(:empty) { margin-top: 10px; color: #953b25; }
.plot-scroll { overflow: auto; max-height: 430px; background: #edf2eb; margin-top: 14px; }
#plot { position: relative; }
#plot svg { position: absolute; width: 100%; height: 100%; fill: none; stroke: #536f60; stroke-width: 1.5px; }
#plot button { position: absolute; display: grid; justify-items: center; gap: 4px; transform: translate(-50%, -10px); max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; color: #213c32; font-size: .9rem; cursor: pointer; padding: 0 4px; line-height: 1.2; }
#plot button::before { content: ''; width: 20px; height: 20px; box-sizing: border-box; background: #fffefa; border: 2px solid #385748; }
#plot [data-sex=F]::before { border-radius: 50%; }
#plot .affected::before { background: repeating-linear-gradient(130deg,#3a5f4e 0 2px,#eaf1e8 2px 5px); }
#plot [aria-pressed=true] { font-weight: 700; color: #843c21; text-decoration: underline; text-underline-offset: 2px; }
#personSummary { padding: 12px; background: #e3e9dc; display: flex; gap: 4px 15px; flex-wrap: wrap; }
#pending details, #flagPerson { margin-top: 14px; } #pending summary { cursor: pointer; }
#flagPerson { max-width: 100%; padding: 8px; }
#findings { margin-block: 15px; }
#findings > p { font-size: .92rem; color: #506055; }
#findings article { background: #f5f0df; border-left: 3px solid #9f8047; padding: 14px 16px; margin-top: 8px; }
#findings h3 { margin: 0 0 4px; font: 600 1.08rem Georgia, serif; }
.resources { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.resources h2 { font: 400 1.4rem Georgia, serif; }
.walk-home footer { flex-wrap: wrap; gap: 10px 20px; }
@media(max-width: 700px) {
  .bench { grid-template-columns: minmax(0,1fr); }
  .steps { display: flex; padding: 0; }
  .steps p { display: none; }
  .steps button { display: grid; align-content: start; flex: 1; padding: 10px; gap: 3px; font-size: .88rem; }
  .stage { padding: 18px 14px; min-height: 0; }
  .walk-intro { padding: 24px 0 18px; }
  .resources nav { row-gap: 6px; }
}

.home-overview { display: grid; grid-template-columns: 2fr 3fr; gap: 5%; align-items: center; padding: clamp(32px, 9vh, 88px) 0; border-bottom: 1px solid var(--line); }
.home-overview h1 { font-size: clamp(1.55rem, 2.6vw, 2rem); }
.home-overview p { margin: 12px 0 20px; max-width: 34ch; }
.home-overview nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.home-overview .primary { padding: 10px 14px; text-decoration: none; font-weight: 600; }
.guide-link { display: inline-block; margin-top: 18px; font-size: .9rem; }
.home-overview figure { background: #f7faf6; border: 1px solid var(--line); padding: 12px; }
.home-overview img { display: block; width: 100%; }
.home-overview figcaption { color: #506055; }
@media (max-width: 680px) {
  .home-overview { grid-template-columns: 1fr; gap: 24px; padding: 26px 0; }
}
@media (min-width: 701px) and (max-height: 760px) {
  .walk-intro { padding: 16px 0; }
  .resources { padding: 14px 0; }
}

.access { max-width: 24rem; margin: clamp(32px,8vh,80px) auto; }
.access form { display: grid; gap: 14px; margin: 20px 0 12px; }
.access label { display: block; }
.access input:not([type=checkbox]) { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.access button { border: 0; padding: 10px; cursor: pointer; font: inherit; font-weight: 600; }
.access small { color: #545b52; }
