/* Base rules follow semantic elements; the navigation, notes and collage are BEM islands. */
:root {
  color-scheme: light;
  --ink: #21162f;
  --paper: #f6f0e6;
  --sheet: #fffaf1;
  --yellow: #f9df68;
  --plum: #432c58;
  --muted: #5d5265;
  --rule: #c9bfaf;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-bottom: 7rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 18px/1.65 var(--sans); overflow-wrap: break-word; }
h1, h2, h3, p, ul, dl { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; }
h1 { font: 700 clamp(2.75rem, 5.3vw, 5.5rem)/1.02 var(--display); letter-spacing: -.025em; margin-bottom: .45em; max-width: 17ch; }
h2 { font: 600 clamp(1.65rem, 2.3vw, 2.1rem)/1.18 var(--display); letter-spacing: -.012em; margin-bottom: .65em; }
h3 { font-size: 1.125rem; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }
ul { padding-left: 1.3rem; }
li { margin-bottom: .5rem; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .15em; }
button, input { font: inherit; }
button { cursor: pointer; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
[hidden] { display: none !important; }
dt { font-weight: 700; }
dd { margin: .25rem 0 1rem; }
main:focus { outline: none; }
.skip-link { position: fixed; z-index: 20; top: .8rem; left: .8rem; min-height: 44px; padding: .6rem 1rem; background: var(--yellow); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.mast { color: var(--sheet); background: var(--ink); padding: 1.5rem max(1.25rem, calc((100vw - 1240px) / 2)) 3.5rem; }
.mast__identity { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 3rem; }
.mast__identity a { display: inline-flex; align-items: center; gap: 1.6rem; min-height: 44px; font-weight: 700; text-decoration: none; }
.mast__identity > span { font-size: 1rem; color: #dfd2e7; }
.mast__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.mast--home .mast__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; }
.mast__eyebrow { color: var(--yellow); font-size: 1rem; font-weight: 600; margin-bottom: 1.15rem; }
.mast__subhead { color: var(--yellow); font: 600 clamp(1.75rem, 3vw, 2.5rem)/1.12 var(--display); margin-bottom: 1rem; }
.mast__lead { max-width: 60ch; font-size: 1.25rem; line-height: 1.55; color: #f2e9f6; margin-bottom: 0; }
.mast__copy { min-width: 0; }
.mast__links { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; margin-top: 1.6rem; align-items: center; }
.mast__button { min-height: 52px; display: inline-flex; align-items: center; justify-content: space-between; gap: 1.6rem; background: var(--yellow); color: var(--ink); padding: .65rem 1.1rem; border-radius: .5rem; font-weight: 700; text-decoration: none; }
.mast__plain { min-height: 44px; display: inline-flex; align-items: center; padding: .4rem 0; }
.mast :focus-visible { outline-color: var(--yellow); }
.mast__button:focus-visible { outline-color: var(--sheet); }
.paper-scene { position: relative; width: 100%; height: 370px; isolation: isolate; }
.paper-scene__back { position: absolute; inset: 5% 7% 4% 8%; background: var(--plum); clip-path: polygon(0 6%, 90% 0, 100% 94%, 6% 100%); }
.paper-scene__sheet { position: absolute; width: 65%; height: 83%; top: 3%; left: 14%; padding: 28% 10% 0; background: var(--sheet); transform: rotate(-7deg); clip-path: polygon(0 0, 100% 1%, 99% 96%, 91% 97%, 81% 96%, 70% 99%, 60% 97%, 50% 100%, 39% 97%, 30% 99%, 20% 97%, 9% 99%, 0 97%); }
.paper-scene__corner { position: absolute; width: 21%; height: 18%; top: 8%; left: 15%; background: var(--yellow); border-radius: 50%; }
.paper-scene__line { display: block; height: 3px; margin-bottom: 21px; background: #9e8d9b; }
.paper-scene__line:last-child { width: 65%; }
.paper-scene__ticket { position: absolute; bottom: 4%; right: 3%; width: 46%; height: 34%; background: var(--yellow); transform: rotate(8deg); clip-path: polygon(0 0, 99% 0, 100% 40%, 96% 47%, 100% 55%, 99% 100%, 0 100%, 0 55%, 4% 48%, 0 40%); }
.paper-scene__circle { position: absolute; left: 18%; top: 21%; width: 35%; aspect-ratio: 1; border: 4px solid var(--ink); border-radius: 50%; }
.paper-scene__stripe { position: absolute; left: 60%; top: 31%; width: 22%; height: 4px; background: var(--ink); box-shadow: 0 16px var(--ink), 0 32px var(--ink); }
.paper-scene__tape { position: absolute; top: 0; left: 39%; width: 27%; height: 36px; background: #caa8d4; opacity: .85; transform: rotate(12deg); }
.reading { display: grid; grid-template-columns: minmax(0, 72ch) minmax(220px, 1fr); gap: 5rem; max-width: 1240px; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.reading__body { min-width: 0; }
.reading__side { min-width: 0; align-self: start; }
.check-list { padding: 0; list-style: none; margin-bottom: 2.75rem; border-block: 2px solid var(--ink); }
.check-list__item { position: relative; padding: 1.1rem .3rem 1.1rem 2.8rem; margin: 0; border-bottom: 1px solid var(--rule); font-size: 1.125rem; }
.check-list__item:last-child { border-bottom: 0; }
.check-list__item::before { content: ""; position: absolute; left: .15rem; top: 1.45rem; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 2px; }
.note { margin-bottom: 2.5rem; }
.note p { max-width: 72ch; }
.ask-note { background: var(--yellow); color: var(--ink); padding: 1.6rem 1.4rem 2rem; clip-path: polygon(0 0,100% 0,100% 96%,95% 98%,87% 97%,80% 99%,69% 97%,60% 99%,50% 97%,40% 99%,30% 98%,20% 100%,10% 97%,0 99%); box-shadow: 8px 8px 0 #e4d9c8; }
.ask-note h2 { font-size: 1.65rem; }
.ask-note p { font-size: 1.125rem; line-height: 1.6; margin-bottom: 0; }
.reading__word-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; font-size: 1rem; margin-top: 1.4rem; }
.bill-note, .licence-note { border-left: 5px solid var(--plum); padding-left: 1.25rem; margin-block: 1.5rem; }
.source-note { background: #e9e0ed; padding: 1.4rem 1.5rem; margin-block: 2rem; border-top: 3px solid var(--plum); }
.source-note h2 { font-size: 1.55rem; }
.source-note p, .source-note a { font-size: 1rem; }
.source-note ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.source-note li { margin: 0; }
.source-note a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; padding: .45rem 0; }
.source-note a span { flex: none; }
.next-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 90px; gap: .2rem 1.25rem; padding: 1.25rem 0; border-block: 1px solid var(--ink); text-decoration: none; }
.next-note > span:first-child { grid-column: 1; color: var(--muted); font-size: 1rem; }
.next-note strong { grid-column: 1; font-size: 1.2rem; }
.next-note > span:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 2rem; }
.next-note:hover strong { text-decoration: underline; }
.urgent-note { padding: 1.5rem; background: var(--ink); color: var(--sheet); margin-bottom: 2.5rem; border-left: 7px solid var(--yellow); }
.urgent-note h2 { color: var(--yellow); }
.urgent-note p:last-child { font-weight: 700; margin-bottom: 0; }
.glossary label { display: block; font-weight: 600; margin-bottom: .5rem; }
.glossary__controls { display: flex; gap: .6rem; }
.glossary input { width: 100%; min-width: 0; min-height: 52px; border: 2px solid var(--ink); border-radius: .3rem; background: var(--sheet); color: var(--ink); padding: .6rem .75rem; }
.glossary input::placeholder { color: var(--muted); opacity: 1; }
.glossary button { min-height: 52px; min-width: 70px; border: 0; border-radius: .3rem; padding: .6rem 1rem; background: var(--ink); color: var(--sheet); }
.glossary__status { min-height: 1.7em; font-size: 1rem; margin-block: .6rem 1.25rem; }
.glossary__entry { border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-bottom: 1.25rem; }
.glossary__entry h3 { font-weight: 700; }
.glossary__entry p { margin-bottom: 0; }
.glossary__empty { padding: 1.25rem; background: var(--yellow); }
.note-index { margin-bottom: 2rem; }
.note-index ul { list-style: none; padding: 0; }
.note-index li { margin-bottom: 0; }
.note-index a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; padding: .75rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.note-index a:hover { text-decoration: underline; }
.note-index span { flex: none; }
.footer { background: #e7ddcd; padding: 2rem max(1.25rem, calc((100vw - 1240px) / 2)) 9rem; }
.footer p { max-width: 70ch; font-size: 1rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; font-size: 1rem; }
.dock { position: fixed; z-index: 10; bottom: max(.75rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(550px, calc(100% - 24px)); padding: .4rem; gap: .2rem; background: var(--ink); border: 1px solid #8b739c; border-radius: .9rem; box-shadow: 0 5px 20px #21162f40; }
.dock__link { display: flex; justify-content: center; align-items: center; min-height: 50px; padding: .45rem .35rem; font-size: 1rem; line-height: 1.2; font-weight: 600; color: var(--sheet); border-radius: .5rem; text-decoration: none; }
.dock__link[aria-current="page"] { background: var(--yellow); color: var(--ink); }
.dock__link:hover { background: var(--plum); color: var(--sheet); }
.dock__link:focus-visible { outline-color: var(--yellow); outline-offset: 1px; }
.dock__link[aria-current="page"]:focus-visible { outline-color: var(--sheet); }
@media (max-width: 850px) {
  .mast { padding-bottom: 2.5rem; }
  .mast__identity { margin-bottom: 2rem; }
  .mast--home .mast__grid { gap: 1rem; grid-template-columns: minmax(0, 1fr); }
  .paper-scene { height: 270px; width: min(100%, 400px); margin: .5rem auto 0; }
  .reading { grid-template-columns: minmax(0, 1fr); gap: 2rem; max-width: 75ch; padding-top: 2rem; }
  .reading__side { max-width: 42ch; width: 100%; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .mast { padding: 1rem 1.25rem 2.25rem; }
  .mast__identity { align-items: flex-start; flex-direction: column; gap: .1rem; margin-bottom: 1.5rem; }
  .mast__identity > span { line-height: 1.5; }
  .mast__lead { font-size: 1.125rem; }
  h1 { font-size: 2.75rem; }
  .paper-scene { height: 220px; width: 290px; max-width: 100%; }
  .paper-scene__sheet { padding-top: 25%; }
  .paper-scene__line { margin-bottom: 15px; }
  .mast__links { gap: .25rem 1rem; }
  .reading { padding: 1.75rem 1.25rem 3rem; }
  .source-note { padding: 1.2rem; }
  .dock__link { padding-inline: .15rem; }
  .footer { padding-bottom: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { font: 400 12pt/1.5 sans-serif; background: white; color: black; }
  .mast { background: white; color: black; padding: 0; }
  .mast__eyebrow, .mast__lead, .mast__subhead, .mast__identity > span { color: black; }
  .paper-scene, .dock, .skip-link, .mast__links, .reading__side, .glossary__filter, .footer__links, .next-note { display: none; }
  .reading { display: block; max-width: none; padding: 1rem 0; }
  .footer { background: white; padding: 1rem 0; }
  .source-note, .urgent-note { background: white; color: black; border-color: black; }
  .urgent-note h2 { color: black; }
  .glossary__entry[hidden] { display: block !important; }
  .note, .glossary__entry { break-inside: avoid; }
}
