@font-face {
  font-family: Hedvig;
  src: url(/assets/hedvig-letters-serif.a4a26cdaad0760ee66df.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url(/assets/dm-sans.2f39f6604a7be3c639e3.woff2) format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --paper: #faf8f1;
  --ink: #20241f;
  --muted: #585e56;
  --line: #c7c9bc;
  --red: #b93726;
  --wash: #eeeee4;
  --blue: #20365a;
  --serif: Hedvig, Georgia, serif;
  --advent-first: url(/assets/advent-first.74b006d2e9c1aa043214.webp);
  --sans: DM, "Helvetica Neue", Arial, sans-serif;
  --figures: var(--sans);
  --motion: 160ms ease;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #305b9b;
  outline-offset: 4px;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button,
a {
  transition:
    background-color var(--motion),
    color var(--motion),
    border-color var(--motion);
}
button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1160px, calc(100% - 104px));
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -8rem;
  padding: 0.7rem;
  background: white;
  z-index: 5;
}
.skip:focus {
  top: 1rem;
}
.mast {
  border-bottom: 1px solid var(--ink);
}
.mast-in {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 19px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand b {
  font: 800 32px/1 var(--sans);
  letter-spacing: -2.4px;
}
.brand b span {
  color: var(--red);
}
.mark {
  background: var(--red);
  width: 34px;
  height: 34px;
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 4px;
}
.mark i {
  width: 21px;
  height: 5px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
}
.brand-desc {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
}
.topnav {
  margin-left: auto;
  display: flex;
  gap: 26px;
}
.topnav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.topnav a:hover,
.topnav a:focus-visible {
  color: var(--red);
}
.paper-btn,
.outline,
.context,
.action,
.text-btn,
.voice-line button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.paper-btn,
.outline {
  border: 1px solid #8b9185;
  background: transparent;
  padding: 10px 16px;
  min-height: 42px;
}
.paper-btn {
  margin-left: 12px;
}
.paper-btn:hover,
.outline:hover {
  background: #e7e9dd;
  border-color: var(--ink);
}
.casebar {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
}

.context {
  border: 0;
  background: var(--wash);
  padding: 8px 12px;
  font-size: 13px;
  min-height: 38px;
}
.context:hover {
  background: #dfe3d4;
}
.context svg {
  width: 15px;
  height: 15px;
}
.chevron {
  width: 6px;
  height: 6px;
  display: block;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin: -3px 2px 0 3px;
}
.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 7%;
  align-items: center;
  padding: 38px 0 36px;
}
.kicker,
.smallcap,
.num,
figcaption,
#mode,
.pmeta {
  font: 500 11px/1.5 var(--figures);
  letter-spacing: 0.065em;
}
.kicker,
.smallcap {
  text-transform: uppercase;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--red);
  font-weight: 650;
}
.redline {
  width: 25px;
  height: 2px;
  background: var(--red);
}
.dot {
  color: #74776d;
}
.kicker span:last-child {
  color: var(--muted);
}
h1 {
  font: 400 clamp(56px, 6.1vw, 92px) / 0.99 var(--serif);
  letter-spacing: -0.045em;
  margin: 17px 0 19px;
  max-width: 12ch;
}
.intro p {
  font-size: clamp(16px, 1.28vw, 19px);
  max-width: 50ch;
  line-height: 1.55;
  color: #3b4139;
}
.action {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  padding: 12px 18px;
  min-height: 45px;
}
.action:hover {
  background: #992d1e;
  border-color: #992d1e;
}
.intro .action {
  margin-top: 25px;
}
.arrow {
  width: 15px;
  height: 12px;
  position: relative;
  display: inline-block;
  margin-left: 3px;
}
.arrow:before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 5px;
  border-top: 1.6px solid currentColor;
}
.arrow:after {
  content: "";
  position: absolute;
  right: 1px;
  top: 2px;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1.6px 1.6px 0 0;
  transform: rotate(45deg);
}
.arrow.down {
  transform: rotate(90deg);
}
.scene {
  position: relative;
  aspect-ratio: 1.47;
  overflow: hidden;
  background: #35466b;
}
.plate {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background-image: var(--sheet, var(--advent-first)), var(--board-sheet, none);
  background-size: var(--columns, 200%) var(--rows, 200%);
  background-position: var(--x, 0%) var(--y, 0%);
}
figcaption {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.035em;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
figcaption span:first-child {
  font-weight: bold;
  color: var(--ink);
}
.chapter,
.evidence,
.finish {
  border-top: 1px solid var(--ink);
}
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 6%;
  padding: 29px 0 31px;
}
.chapter-head,
.evidence-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.num {
  display: block;
  color: var(--red);
  font-size: 13px;
  padding-top: 8px;
  border-top: 2px solid var(--red);
  min-width: 26px;
  margin-top: 4px;
}
.chapter h2,
.evidence h2,
.finish h2,
dialog h2 {
  font: 400 clamp(33px, 3.1vw, 46px) / 1.07 var(--serif);
  letter-spacing: -0.035em;
}
.chapter-head p,
.evidence-head p,
.finish p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 7px;
  max-width: 40ch;
}
.rule-box {
  border: 1px solid var(--line);
  background: #f2f2e8;
  padding: 19px 24px 18px;
  border-radius: 4px;
}
.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.slider-head label,
form > label:not(.check) {
  display: block;
  font-size: 15px;
  font-weight: 650;
}
.slider-head output {
  font: 600 25px/1 var(--sans);
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.rule-box input[type="range"] {
  appearance: none;
  width: 100%;
  height: 30px;
  cursor: pointer;
  background: transparent;
  margin: 9px 0 0;
  display: block;
}
.rule-box input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(
    to right,
    var(--red) var(--fill, 60%),
    #c9ccbd var(--fill, 60%)
  );
  border-radius: 3px;
}
.rule-box input[type="range"]::-moz-range-track {
  height: 4px;
  background: #c9ccbd;
}
.rule-box input[type="range"]::-moz-range-progress {
  height: 4px;
  background: var(--red);
}
.rule-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: var(--red);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  margin-top: -6.5px;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--red);
}
.rule-box input[type="range"]::-moz-range-thumb {
  background: var(--red);
  width: 16px;
  height: 16px;
  border: 2px solid var(--paper);
  border-radius: 50%;
}
.endpoints {
  display: flex;
  justify-content: space-between;
  font: 11px var(--figures);
  color: var(--muted);
}
.model {
  margin-top: 14px;
  font-size: 14px;
}
.role-box,
.reply,
.age-note {
  border-left: 3px solid #536d91;
  background: #e9edf0;
  padding: 18px 22px;
}
.role-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.role-box h3,
.source-grid h3 {
  font: 400 28px/1.12 var(--serif);
  letter-spacing: -0.025em;
}
.role-box p,
.source-grid p,
.lit p {
  font-size: 14px;
  line-height: 1.55;
  margin-top: 6px;
}
.role-box .outline {
  flex: none;
  border-color: #a1a9af;
  color: var(--blue);
}
.argument textarea,
dialog input:not([type="checkbox"]),
dialog select {
  width: 100%;
  border: 1px solid #9b9f92;
  border-radius: 3px;
  background: #fffefa;
  padding: 11px 12px;
  margin: 7px 0 10px;
  font-size: 16px;
  line-height: 1.4;
}
.argument textarea {
  resize: vertical;
  min-height: 82px;
}
.form-actions,
.finish-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.reply {
  margin-top: 17px;
  background: #f4eae2;
  border-color: var(--red);
}
.reply p {
  font: 400 27px/1.22 var(--serif);
  margin-top: 5px;
}
.reply #argument-fact {
  font: 400 15px/1.5 var(--sans);
  margin: 6px 0 12px;
}
#argument-fact:empty {
  display: none;
}
.reply .smallcap {
  color: var(--red);
}
.text-btn,
.voice-line button {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.voice-line {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.voice-line span,
.hint,
#local-status {
  font-size: 12px;
  color: var(--muted);
}
#local-status:empty {
  display: none;
}
.evidence {
  padding: 29px 0;
}
.evidence-head p {
  max-width: 70ch;
}
.inquiry-body {
  max-width: 62ch;
  padding: 0 0 15px;
}
.inquiry-body p {
  margin: 0 0 12px;
}
.inquiry-body label {
  display: block;
  margin-bottom: 5px;
  font-weight: 650;
}
.inquiry-body textarea {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--sans);
  resize: vertical;
}
.inquiry-body #inquiry-note {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.source-grid.law-first {
  grid-template-columns: minmax(0, 1fr);
  max-width: 70ch;
}
@media screen and (min-width: 701px) {
  #secondary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.source-grid article {
  border-top: 2px solid var(--blue);
  padding: 11px 2px 0;
}
.smallcap {
  color: var(--blue);
}
.source-grid h3 {
  margin: 8px 0;
}
.source-grid #law-citation {
  font-size: 0.875rem;
  color: var(--muted);
}
.vrow {
  margin: 8px 0;
  font-size: 12px;
}
.vrow b {
  float: right;
  font-weight: 500;
}
.vtrack {
  height: 5px;
  background: #dfe2d6;
  clear: both;
  margin: 3px 0;
}
.vtrack i {
  display: block;
  height: 100%;
  background: var(--blue);
}
.vrow:first-child .vtrack i {
  background: var(--red);
}
.vnote {
  font-size: 12px !important;
  color: var(--muted);
}
details {
  border-block: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  padding: 13px 2px;
}
.sources-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 5px 0 18px;
}
.sources-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources-inner li {
  font-size: 14px;
  margin-bottom: 6px;
}
.sources-inner a,
.age-note a {
  color: var(--blue);
}
.sourcelink > a {
  display: block;
  width: fit-content;
  line-height: 1.5;
}
.source-heading {
  margin: 0 0 8px;
  font: 650 14px/1.4 var(--sans);
  color: var(--ink);
}
#source-context {
  margin-top: 16px;
}
.further {
  border-top: 0;
}
.local-research {
  margin: 4px 0 18px;
  padding: 14px 16px;
  background: #f3f7f1;
  border: 1px solid #c6d4c4;
  border-inline-start: 3px solid var(--blue);
  border-radius: 2px;
}
.local-research p {
  font: 400 15px/1.5 var(--sans);
  margin: 6px 0 10px;
}
.local-research-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.local-research-links a {
  color: var(--blue);
  font: 500 15px/1.45 var(--sans);
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.research-list,
.collection-shelf ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(12px, 3vw, 36px);
  margin: 0;
  padding: 3px 0 18px;
  list-style: none;
}
.research-list h4 {
  margin: 0;
  font: 600 16px/1.4 var(--sans);
}
.research-list a,
.collection-shelf a {
  color: var(--blue);
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.research-list p,
.research-intro {
  font: 400 15px/1.5 var(--sans);
  margin: 6px 0;
}
.research-credit {
  font: 400 13px/1.45 var(--sans);
  color: var(--muted);
}
.collection-shelf {
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}
.collection-shelf ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.collection-shelf li,
.collection-shelf p {
  font: 400 14px/1.45 var(--sans);
}
.collection-shelf p {
  color: var(--muted);
  margin: 4px 0 0;
}
#ai-sources {
  border-bottom: 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.research-intro {
  margin: 0 0 14px;
}
@media (max-width: 620px) {
  .research-list,
  .collection-shelf ul {
    grid-template-columns: minmax(0, 1fr);
  }
}
.finish {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 29px 0 36px;
}
.finish h2 {
  font-size: 36px;
}
.finish p {
  max-width: 58ch;
}
.finish-actions {
  flex-shrink: 0;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 18px 0 28px;
  font-size: 12px;
  color: var(--muted);
}
footer b {
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -1px;
}
#mode {
  margin-left: auto;
  font-size: 10px;
}
dialog {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 5px;
  padding: 25px 27px;
  color: var(--ink);
  width: min(465px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 12px 80px #1d292329;
}
dialog::backdrop {
  background: #20241f80;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 36px;
}
.close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  font-size: 24px;
  line-height: 1;
}
.age-note {
  font-size: 14px;
  margin: 16px 0 0;
  padding: 0 14px;
}
.age-note[open] {
  padding-bottom: 13px;
}
.age-note p {
  margin: 0 0 4px;
}
.age-note a {
  font-size: 12px;
}
dialog form > p,
.check,
#voice-offline p {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.check input {
  margin-top: 5px;
  accent-color: var(--red);
}
#voice { width: min(42rem, calc(100% - 1.5rem)); }
#voice-offline:not([hidden]) { border-inline-start: 3px solid var(--blue); padding-inline-start: .8rem; }
#debate-case { margin-block: .7rem .3rem; color: var(--blue); }
#debate-how summary { cursor: pointer; font-weight: 650; }
#voice .debate-steps {
  padding-inline-start: 1.5rem;
  margin-block: 1rem 1.4rem;
}
#voice .debate-steps li { margin-block: .45rem; padding-inline-start: .25rem; }
#voice .debate-steps li::marker { color: var(--blue); font-weight: 700; }
#voice-form h3 { font: 650 1rem/1.35 var(--sans); margin-bottom: .35rem; }
#voice-form h3 + p { margin-top: 0; }
#voice-stop { margin-bottom: 1rem; }
#voice-state:not(:empty) {
  padding-top: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--blue);
}
#audio,
.print-sheet {
  display: none;
}
@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 56px);
  }
  .cover {
    gap: 5%;
    padding: 32px 0;
  }

  .role-box {
    display: block;
  }
  .role-box .outline {
    margin-top: 12px;
  }
  .chapter {
    gap: 4%;
    grid-template-columns: 0.8fr 1.2fr;
  }
  .finish {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .mast-in {
    height: 64px;
    gap: 10px;
  }
  .brand {
    gap: 7px;
  }
  .brand b {
    font-size: 26px;
  }
  .mark {
    width: 27px;
    height: 27px;
    gap: 3px;
  }
  .mark i {
    width: 16px;
    height: 4px;
  }
  .brand-desc {
    font-size: 10px;
    padding-left: 10px;
  }
  .topnav {
    display: none;
  }
  .paper-btn {
    margin-left: auto;
    font-size: 12px;
    gap: 5px;
    padding: 6px 10px;
    min-height: 38px;
  }
  .paper-btn svg {
    width: 15px;
  }
  .casebar {
    align-items: start;
    flex-direction: column-reverse;
    gap: 7px;
    padding: 10px 0 8px;
  }
  .context {
    font-size: 12px;
    min-height: 32px;
    padding: 5px 8px;
  }

  .cover {
    grid-template-columns: 1fr;
    padding: 23px 0;
    gap: 20px;
  }
  .kicker {
    font-size: 10px;
  }
  .cover h1 {
    font-size: clamp(53px, 11.3vw, 74px);
    max-width: 16ch;
    margin: 12px 0;
  }
  .intro p {
    font-size: 16px;
    max-width: 100%;
  }
  .intro .action {
    margin-top: 15px;
  }
  .scene {
    aspect-ratio: 2.05;
  }
  .chapter {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 23px 0;
  }
  .chapter-head,
  .evidence-head {
    gap: 12px;
  }
  .chapter h2,
  .evidence h2,
  .finish h2 {
    font-size: 35px;
  }
  .chapter-head p {
    max-width: none;
    margin-top: 4px;
  }
  .rule-box {
    padding: 16px;
  }
  .slider-head label {
    font-size: 14px;
  }
  .slider-head output {
    font-size: 22px;
  }
  .source-grid,
  .sources-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .source-grid {
    margin: 19px 0;
  }
  .role-box {
    padding: 16px 18px;
  }
  .evidence,
  .finish {
    padding: 23px 0;
  }
  .source-grid h3 {
    font-size: 26px;
  }
  footer {
    gap: 8px;
    flex-wrap: wrap;
  }
  .num {
    margin-top: 3px;
    padding-top: 5px;
    min-width: 22px;
  }
  .finish-actions {
    flex-shrink: 1;
  }
}
@media (max-width: 450px) {
  .brand-desc {
    display: none;
  }

  .context {
    max-width: 100%;
  }
  .context span:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 370px) {
  .brand-desc {
    display: none;
  }

  .wrap {
    width: calc(100% - 28px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
@page {
  size: A4;
  margin: 12mm 15mm;
}
@media print {
  html,
  body {
    background: white;
    color: #111;
    scroll-behavior: auto;
  }
  body > * {
    display: none !important;
  }
  body > .print-sheet {
    display: block !important;
    font: 10.2pt/1.34 var(--sans);
  }
  .print-mast,
  .print-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1.5pt solid #111;
    padding-bottom: 2mm;
    font: 9pt var(--sans);
  }
  .print-mast b {
    font: 800 17pt var(--sans);
    letter-spacing: -1px;
  }
  .pmeta {
    font: 8pt/1.3 var(--sans);
    margin: 2mm 0;
  }
  .print-sheet h1 {
    font: 400 28pt/1 var(--serif);
    max-width: none;
    margin: 2mm 0;
  }
  .print-sheet p {
    overflow-wrap: anywhere;
  }
  .print-sheet section {
    border-top: 0.8pt solid #222;
    padding-top: 2.4mm;
    margin-top: 3mm;
    break-inside: avoid;
  }
  .print-sheet h2 {
    font: 600 12pt var(--sans);
    margin: 0 0 1.4mm;
  }
  .print-sheet h2 small {
    float: right;
    font: 8pt var(--figures);
    padding-top: 1mm;
  }
  .print-sheet #p-prompt {
    font-weight: 600;
  }
  .print-sheet section p {
    margin: 1.2mm 0;
  }
  .lines {
    height: 16mm;
    border-bottom: 0.4pt solid #888;
  }
  .lines.twice {
    height: 28mm;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 6.7mm,
      #999 6.8mm,
      #999 7mm
    );
    print-color-adjust: exact;
  }
  .print-foot {
    margin-top: 4mm;
    gap: 3mm;
    border: 0;
  }
  .print-foot span {
    flex: 1;
    border-bottom: 0.5pt solid #777;
  }
}

.arguments {
  margin-top: 12px;
  border-bottom: 0;
}
.arguments summary {
  font-size: 13px;
  padding: 7px 0;
}
.sourcelink {
  font-size: 12px;
  color: var(--blue);
  margin: 7px 0;
}
.arguments p {
  padding-bottom: 4px;
}

.topnav button {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink);
  font: 600 14px var(--sans);
}
.topnav button:hover {
  color: var(--red);
}
@media (max-width: 700px) {
  .topnav {
    display: flex;
  }
  .topnav a {
    display: none;
  }
  .paper-btn {
    margin-left: 0;
  }
}
@media (max-width: 450px) {
  .paper-btn span {
    display: none;
  }
  .paper-btn {
    min-width: 38px;
  }
  .topnav button {
    font-size: 13px;
    min-height: 38px;
  }
}

@media screen {
  :root {
    --page-gutter: clamp(16px, 4.2vw, 72px);
    --grid-gap: clamp(16px, 1.75vw, 27px);
    --blue-paper: #e8eaf0;
  }
  .wrap {
    width: min(1192px, calc(100% - var(--page-gutter) * 2));
  }
  .mast-in {
    height: 77px;
    gap: clamp(12px, 1.3vw, 21px);
  }
  .brand,
  .brand-desc,
  .paper-btn {
    flex-shrink: 0;
  }
  .topnav {
    align-items: center;
    gap: clamp(16px, 1.7vw, 28px);
  }
  .topnav a,
  .topnav button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
  .topnav a:first-child {
    color: var(--red);
  }
  .paper-btn {
    margin-left: 4px;
  }
  .casebar {
    min-height: 72px;
  }
  .context {
    min-height: 42px;
  }
  .context {
    min-width: 0;
    max-width: 32%;
  }
  .context svg,
  .chevron {
    flex-shrink: 0;
  }
  .context #identity {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cover,
  .chapter {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--grid-gap);
  }
  .cover {
    padding: clamp(30px, 3.5vw, 53px) 0 clamp(32px, 3.6vw, 55px);
  }
  .intro,
  .chapter-head {
    grid-column: 1/7;
    min-width: 0;
  }
  .cover figure,
  .chapter > :nth-child(2) {
    grid-column: 7/-1;
    min-width: 0;
  }
  .intro {
    padding-right: clamp(0px, 1.8vw, 28px);
  }
  .cover h1 {
    font-size: clamp(66px, 7.3vw, 105px);
    line-height: 0.9;
    letter-spacing: -0.047em;
    max-width: none;
    margin: 22px 0 24px;
  }
  .cover h1 span {
    display: block;
  }
  .intro p {
    font-size: clamp(16px, 1.36vw, 19px);
    line-height: 1.52;
    max-width: 46ch;
  }
  .intro .action {
    margin-top: 22px;
  }
  .scene {
    aspect-ratio: 1.49;
  }
  .cover figcaption {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.35;
    align-items: baseline;
  }
  .cover figcaption span:last-child {
    letter-spacing: 0;
    font-family: var(--sans);
    font-size: 12px;
  }
  .chapter {
    padding: clamp(23px, 2.5vw, 38px) 0;
    align-items: start;
  }
  .chapter-head,
  .evidence-head {
    gap: clamp(12px, 1.2vw, 18px);
  }
  .chapter h2,
  .evidence h2 {
    font-size: clamp(36px, 3.55vw, 51px);
    line-height: 1;
    letter-spacing: -0.04em;
  }
  .chapter-head p {
    max-width: 37ch;
  }
  .rule-box {
    background: #f2eee2;
    border-color: #c9c2b2;
    border-radius: 2px;
    padding: 19px clamp(15px, 2vw, 27px) 18px;
  }
  .slider-head {
    align-items: baseline;
  }
  .slider-head label {
    max-width: 24ch;
    line-height: 1.35;
  }
  .slider-head output {
    font-size: clamp(27px, 2.7vw, 39px);
    line-height: 1.03;
    letter-spacing: -0.055em;
  }
  .slider-head output small {
    font-size: 0.48em;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .rule-box input[type="range"] {
    height: 30px;
    margin-top: 9px;
  }
  .scale-ticks {
    height: 5px;
    margin: -3px 8px 7px;
    border-right: 1px solid #8a8f81;
    background: repeating-linear-gradient(
      to right,
      #8a8f81 0 1px,
      transparent 1px calc(100% / var(--intervals, 5))
    );
  }
  .endpoints {
    font-size: 11px;
  }
  .role-box {
    background: var(--blue);
    color: #fffaf1;
    border: 0;
    border-radius: 2px;
    padding: 20px clamp(17px, 2vw, 27px);
  }
  .role-box h3 {
    font-size: clamp(27px, 2.4vw, 35px);
    line-height: 1.04;
  }
  .role-box p {
    color: #e8ecf3;
    max-width: 47ch;
  }
  .role-box .outline {
    color: white;
    border-color: #a0adbf;
    min-height: 42px;
  }
  .role-box .outline:hover {
    background: #334c70;
  }
  .source-grid {
    gap: var(--grid-gap);
  }
  .source-grid article {
    min-width: 0;
  }
  .source-grid h3 {
    font-size: clamp(26px, 2.2vw, 33px);
  }
  .source-grid article:last-child h3 {
    font-size: clamp(23px, 2vw, 30px);
  }
  .finish-actions {
    min-width: 0;
    flex-shrink: 1;
  }
  .finish-actions > * {
    white-space: normal;
  }
  .dialog-head h2 {
    font-size: clamp(32px, 4vw, 40px);
  }
  dialog {
    border: 0;
    border-top: 4px solid var(--red);
    border-radius: 3px;
    padding: clamp(17px, 3vw, 29px);
  }
  .dialog-head {
    align-items: flex-start;
  }
  .close {
    flex-shrink: 0;
  }
  dialog input,
  dialog select,
  dialog form,
  .age-note {
    min-width: 0;
  }
  .age-note a,
  .source-grid a {
    overflow-wrap: anywhere;
  }
  .check {
    align-items: start;
  }
  .check input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 3px 0 0;
  }
  .intro .action,
  .form-actions .action,
  .print-btn,
  .role-box button {
    min-height: 44px;
  }
}
@media screen and (min-width: 701px) and (max-width: 960px) {
  .topnav a {
    display: none;
  }
  .mast-in {
    height: 69px;
  }
  .context {
    max-width: 28%;
  }
  .cover {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 23px;
  }
  .cover .intro {
    grid-column: 1;
    padding-right: 0;
  }
  .cover figure {
    grid-column: 2;
  }
  .cover h1 {
    font-size: clamp(62px, 8.3vw, 76px);
  }
  .scene {
    aspect-ratio: 1.02;
  }
  .chapter-head {
    grid-column: 1/6;
  }
  .chapter > :nth-child(2) {
    grid-column: 6/-1;
  }
  .role-box {
    display: block;
  }
  .role-box .outline {
    margin-top: 14px;
  }
  .source-grid {
    gap: 17px;
  }
  .source-grid p {
    font-size: 14px;
  }
}
@media screen and (max-width: 700px) {
  .mast-in {
    height: 62px;
    gap: 9px;
  }
  .brand-desc {
    display: none;
  }
  .topnav {
    display: flex;
    min-width: 0;
  }
  .topnav a {
    display: none;
  }
  .topnav button {
    min-height: 44px;
  }
  .paper-btn {
    margin-left: 0;
    min-height: 40px;
  }
  .casebar {
    gap: 6px;
    padding: 8px 0 6px;
    min-height: 0;
  }
  .context {
    max-width: 100%;
    min-height: 36px;
  }
  .cover,
  .chapter {
    grid-template-columns: minmax(0, 1fr);
  }
  .cover {
    gap: 0;
    padding: 24px 0 25px;
  }
  .cover .intro {
    display: contents;
  }
  .cover .kicker {
    grid-row: 1;
    grid-column: 1;
  }
  .cover h1 {
    grid-column: 1;
    grid-row: 2;
    font-size: clamp(51px, 11.8vw, 77px);
    line-height: 0.94;
    letter-spacing: -0.044em;
    margin: 12px 0 17px;
  }
  .cover h1 span {
    display: inline;
  }
  .cover figure {
    grid-column: 1;
    grid-row: 3;
    max-width: 100%;
    margin: 0 0 17px;
  }
  .cover .scene {
    aspect-ratio: 1.98;
  }
  .cover figcaption {
    font-size: 10px;
    margin-top: 5px;
  }
  .cover figcaption span:last-child {
    font-size: 11px;
  }
  .cover #story {
    grid-column: 1;
    grid-row: 4;
    max-width: 50ch;
    font-size: 16px;
    line-height: 1.5;
  }
  .cover .fiction-note {
    grid-column: 1;
    grid-row: 5;
    justify-self: start;
  }
  .cover .intro .action {
    grid-column: 1;
    grid-row: 6;
    justify-self: start;
    margin-top: 14px;
  }
  .chapter {
    padding: 23px 0;
    row-gap: 15px;
  }
  .chapter-head,
  .chapter > :nth-child(2) {
    grid-column: 1;
  }
  .chapter-head p,
  .evidence-head p {
    max-width: 52ch;
  }
  .chapter h2,
  .evidence h2 {
    font-size: clamp(35px, 7vw, 42px);
  }
  .rule-box {
    padding: 15px 16px 13px;
  }
  .role-box {
    padding: 18px;
  }
  .role-box .outline {
    margin-top: 13px;
  }
  .source-grid {
    grid-template-columns: 1fr;
  }
  .finish {
    align-items: flex-start;
  }
  .print-foot {
    min-width: 0;
  }
}
@media screen and (max-width: 450px) {
  .paper-btn span {
    display: none;
  }
  .intro h1 {
    overflow-wrap: normal;
  }
  .finish-actions {
    width: 100%;
  }
}
@media screen and (max-width: 350px) {
  .mast-in {
    gap: 7px;
  }
  .brand b {
    font-size: 23px;
  }
  .brand .mark {
    width: 24px;
    height: 24px;
  }
  .topnav button {
    font-size: 12px;
  }
  .slider-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .cover figcaption {
    gap: 7px;
  }
  .chapter-head p {
    font-size: 14px;
  }
  .finish-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .finish-actions > * {
    width: 100%;
  }
}
/* Typography follows the same two families from the cover to the printed sheet. */
:root {
  font-synthesis: none;
  font-optical-sizing: auto;
}
.kicker,
.smallcap,
figcaption,
.num,
.endpoints,
.case-copy small,
.slider-head output {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}
.kicker,
.smallcap {
  font-weight: 700;
  letter-spacing: 0.105em;
}
.num {
  font-weight: 600;
}
[hidden] {
  display: none !important;
}
@media screen {
  .cover h1 {
    font-size: clamp(53px, 6.1vw, 87px);
    line-height: 0.99;
    letter-spacing: -0.055em;
  }
  .chapter h2,
  .evidence h2 {
    font-size: clamp(31px, 2.85vw, 42px);
    letter-spacing: -0.042em;
  }
  .role-box h3,
  .source-grid h3,
  .source-grid article:last-child h3 {
    font-size: clamp(23px, 1.8vw, 28px);
    letter-spacing: -0.034em;
  }
  .role-box p,
  .source-grid p {
    font-size: 15px;
  }
  .casebar {
    display: flex;
    flex-flow: row wrap;
    gap: 8px 20px;
    min-height: 66px;
    padding-block: 9px;
  }
  .catalog-nav,
  .case-stepper,
  .library-open {
    display: flex;
    align-items: center;
  }
  .catalog-nav {
    gap: clamp(12px, 2.2vw, 32px);
    min-width: 0;
    flex-wrap: wrap;
  }
  .library-open {
    min-height: 42px;
    gap: 9px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    border-radius: 3px;
    font-weight: 650;
    font-size: 14px;
    padding: 8px 13px;
  }
  .library-open:hover {
    background: var(--blue);
  }
  .library-open svg {
    width: 16px;
    height: 16px;
  }
  .case-stepper {
    gap: 4px;
  }
  .case-stepper button {
    display: grid;
    place-items: center;
    width: 40px;
    min-height: 42px;
    background: transparent;
    border: 0;
    border-radius: 2px;
  }
  .case-stepper button:hover:enabled {
    background: var(--wash);
  }
  .case-stepper button:disabled {
    opacity: 0.28;
    cursor: default;
  }
  .case-stepper svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8;
  }
  #current-case {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
  }
  .context {
    order: 0;
    margin: 0 0 0 auto;
    min-height: 42px;
    max-width: 38%;
  }
  #library {
    width: min(815px, calc(100% - 32px));
    max-height: min(88dvh, 785px);
    padding: 0;
    overflow: hidden;
  }
  #library[open] {
    display: flex;
    flex-direction: column;
  }
  #library .dialog-head {
    margin: 0;
    align-items: center;
    padding: 20px 25px 17px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  #library .dialog-head h2 {
    font: 400 clamp(28px, 4vw, 41px) / 1.03 var(--serif);
    letter-spacing: -0.045em;
  }
  .case-list {
    padding: 10px 14px 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 6px;
  }
  .case-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-bottom-color: var(--line);
    padding: 10px;
    color: var(--ink);
    border-radius: 0;
  }
  .case-card[aria-pressed="true"] {
    background: #ede9da;
    border-color: #cbc3b0;
    box-shadow: inset 3px 0 var(--red);
  }
  .case-card:hover {
    background: var(--wash);
  }
  .case-card:focus-visible {
    outline-offset: -3px;
  }
  .case-thumb {
    display: block;
    aspect-ratio: 1;
    background-image: var(--sheet);
    background-size: var(--columns) var(--rows, 200%);
    background-position: var(--x) var(--y);
  }
  .case-copy {
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
  }
  .case-copy small {
    font-size: 11px;
    font-weight: 650;
    color: #4a544b;
    letter-spacing: 0.065em;
    text-transform: uppercase;
  }
  .case-copy strong {
    font: 400 clamp(17px, 1.55vw, 22px) / 1.12 var(--serif);
    letter-spacing: -0.032em;
    text-wrap: balance;
  }
  #choice-rule {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  #choice-label {
    font: 650 15px/1.4 var(--sans);
    padding: 0;
    margin: 0 0 12px;
  }
  .option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
    gap: 7px;
  }
  .option-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 9px 11px;
    background: var(--paper);
    border: 1px solid #c8c5b7;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.28;
    cursor: pointer;
  }
  .option-grid label:has(:checked) {
    background: #fffaf0;
    border-color: var(--red);
    box-shadow: inset 2px 0 var(--red);
  }
  .option-grid input {
    width: 17px;
    height: 17px;
    flex: none;
    accent-color: var(--red);
    margin: 0;
  }
  .option-grid label:hover {
    border-color: var(--ink);
  }
}
@media screen and (max-width: 700px) {
  .cover h1 {
    font-size: clamp(40px, 10.8vw, 67px);
    line-height: 1.01;
    letter-spacing: -0.052em;
    text-wrap: balance;
  }
  .chapter h2,
  .evidence h2 {
    font-size: clamp(29px, 6vw, 38px);
  }
  .casebar {
    gap: 2px 12px;
    min-height: 58px;
  }
  .catalog-nav {
    gap: 7px;
  }
  .case-stepper {
    gap: 0;
  }
  .case-stepper button {
    width: 32px;
  }
  .library-open {
    min-height: 40px;
    padding-inline: 10px;
  }
  .context {
    max-width: 45%;
  }
  #library .dialog-head {
    padding: 16px;
  }
  .case-list {
    gap: 0 5px;
    padding: 7px 8px 10px;
  }
  .case-card {
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
  }
}
@media screen and (max-width: 550px) {
  .casebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 6px;
    padding: 8px 0;
  }
  .catalog-nav {
    display: contents;
  }
  .library-open {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
  }
  .case-stepper {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
  }
  .context {
    grid-row: 2;
    grid-column: 1/-1;
    justify-self: start;
    max-width: 100%;
    margin: 0;
    min-height: 35px;
    padding: 4px 7px;
    background: transparent;
  }
  #library {
    width: calc(100% - 22px);
  }
  .case-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
  }
}
@media screen and (max-width: 335px) {
  .case-stepper button {
    width: 25px;
  }
  #current-case {
    font-size: 12px;
  }
  .library-open {
    font-size: 12px;
    gap: 5px;
  }
}
@media print {
  .casebar,
  dialog {
    display: none !important;
  }
}

@media screen {
  main[id],
  section[id] {
    scroll-margin-block-start: calc(var(--mast-height, 72px) + 12px);
  }
  .mast {
    position: sticky;
    inset-block-start: 0;
    z-index: 4;
    background: var(--paper);
  }
  .skip:focus {
    position: fixed;
  }
  #nav-open {
    gap: 6px;
  }
  #nav-open svg {
    width: 16px;
    height: 16px;
  }
  #voice-top svg {
    display: none;
  }
  .topnav a[aria-current="location"] {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  .case-end {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 17px 0;
    border-top: 1px solid var(--line);
  }
  #end-next {
    display: grid;
    grid-template-columns: 1fr 24px;
    align-items: center;
    gap: 1px 13px;
    background: none;
    border: 0;
    color: var(--ink);
    text-align: start;
    padding: 6px 0 6px 6px;
  }
  #end-next > span:first-child {
    color: var(--muted);
    font: 500 12px/1.2 var(--sans);
  }
  #end-next strong {
    grid-column: 1;
    font: 550 19px/1.3 var(--sans);
  }
  #end-next .arrow {
    grid-area: 1 / 2 / span 2;
    justify-self: center;
  }
  #end-next:hover,
  .chapter-menu a:hover,
  .nav-tools a:hover,
  .nav-tools button:hover {
    color: var(--red);
  }
  #navigation {
    padding: 0;
    width: min(460px, calc(100% - 28px));
    max-height: min(88dvh, 750px);
  }
  #navigation[open] {
    display: flex;
    flex-direction: column;
  }
  #navigation .dialog-head {
    margin: 0;
    padding: 18px 23px 13px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  #navigation h2 {
    margin: 3px 0 0;
  }
  .nav-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 3px 23px 12px;
  }
  .chapter-menu a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    min-height: 42px;
    padding: 7px 2px;
    color: var(--blue);
    font: 550 16px/1.3 var(--sans);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  .chapter-menu a[aria-current="location"] {
    color: var(--red);
    font-weight: 700;
  }
  .chapter-menu a[aria-current="location"]::after {
    content: "";
    width: 22px;
    height: 2px;
    background: currentColor;
  }
  .nav-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px 13px;
    padding-top: 9px;
  }
  .nav-tools #worksheet-pack {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }
  #pack-profile {
    font-size: 12px;
    font-weight: 450;
    color: var(--muted);
  }
  .nav-tools button,
  .nav-tools a {
    background: none;
    border: 0;
    display: flex;
    align-items: center;
    text-align: start;
    min-height: 41px;
    padding: 4px 0;
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    font: 550 14px/1.4 var(--sans);
  }
}
@media screen and (max-width: 700px) {
  .topnav {
    gap: 6px;
  }
  #voice-top {
    min-width: 36px;
    justify-content: center;
  }
  #voice-top svg {
    display: inline;
  }
  #voice-top span {
    display: none;
  }
  #nav-open {
    font-size: 14px;
  }
}
@media screen and (max-width: 350px) {
  #navigation .dialog-head {
    padding-inline: 14px;
  }
  .nav-scroll {
    padding-inline: 14px;
  }
  .topnav {
    gap: 2px;
  }
  #nav-open {
    font-size: 13px;
    gap: 3px;
  }
}
@media screen {
  .intro .fiction-note {
    font: 450 13px/1.4 var(--sans);
    color: var(--muted);
    margin: 8px 0 0;
  }
  .confirm-value {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--blue);
    font: 600 13px/1.4 var(--sans);
    padding: 5px 0;
    margin-top: 6px;
  }
  #law-detail {
    max-width: 60ch;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px;
  }
}
@media screen and (min-width: 1000px) {
  #library {
    width: min(970px, calc(100% - 80px));
  }
  .case-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.scene.single-art .plate,
.case-thumb.single-art {
  background-size: cover;
  background-position: center;
}
@media screen {
  .language-picker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    min-height: 42px;
    color: var(--ink);
  }
  .language-picker svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    pointer-events: none;
  }
  .language-picker select {
    font: 600 14px/1.3 DM, Arial, sans-serif;
    background-color: transparent;
    border: 0;
    color: inherit;
    min-height: 42px;
    cursor: pointer;
  }
  .source-language {
    display: inline-block;
    margin-inline-start: .45em;
    font: 600 .72em/1.45 DM, Arial, sans-serif;
    letter-spacing: .05em;
    vertical-align: .1em;
    color: var(--ink);
  }
  #current-case { overflow-wrap: anywhere; }
}
@media screen and (max-width: 700px) {
  .casebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3px 8px;
  }
  .catalog-nav { display: contents; }
  .library-open { grid-area: 1 / 1; justify-self: start; text-align: start; }
  .case-stepper { grid-area: 1 / 2; justify-self: end; min-width: 0; max-width: 100%; }
  .case-stepper button { flex: none; width: 28px; }
  .context { grid-area: 2 / 1; justify-self: start; max-width: 100%; margin: 0; }
  .casebar > .language-picker { grid-area: 2 / 2; justify-self: end; }
}

.source-language-note {
  margin-block: .7rem 1rem;
  max-width: 58ch;
  font: 400 .85rem/1.45 var(--sans);
}

@media screen {
  .nav-scroll > .language-picker {
    display: flex;
    width: fit-content;
    margin-block-start: .6rem;
  }
}

/* A lesson has one active stage. The case, its progress and its next action
   share a reading width, while the illustrated opening uses the full spread. */
@media screen {
  .mast-in {
    min-height: 62px;
    height: auto;
    padding-block: 7px;
  }
  .mast-in > .language-picker { margin-inline-start: auto; }
  .mast-in .topnav:has(.language-picker) { margin-inline-start: auto; }
  .mast-in > .language-picker + .topnav { margin-inline-start: 0; }
  #nav-open, .mast-in .language-picker select { min-height: 44px; }
  #main:has([data-stage]) {
    --lesson-width: 65rem;
    --stage-space: clamp(24px, 4vw, 52px);
  }
  #main .casebar:has(#profile-open) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px 16px;
    min-height: 53px;
    padding-block: 3px;
    border: 0;
  }
  #main .casebar #library-open {
    color: var(--ink);
    background: transparent;
    border: 0;
    min-height: 44px;
    padding: 4px;
    margin-inline-start: -4px;
  }
  #main .casebar #library-open:hover { color: var(--red); }
  #main .casebar #profile-open {
    background: transparent;
    min-height: 44px;
    max-width: 51%;
    padding: 6px 3px;
    margin-inline-start: auto;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) 7px;
    gap: 0 8px;
    text-align: start;
  }
  #profile-open > svg { grid-area: 1 / 1 / span 2; }
  #main #profile-open .profile-label {
    grid-area: 1 / 2;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: start;
    font-size: 13px;
    line-height: 1.3;
  }
  #profile-open #identity { grid-area: 2 / 2; color: var(--muted); font: 500 12px/1.35 var(--sans); }
  #profile-open .chevron { grid-area: 1 / 3 / span 2; }
  .journey-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(54px, 110px);
    align-items: center;
    gap: 8px 16px;
    max-width: var(--lesson-width);
    margin: clamp(19px, 3vw, 36px) auto 0;
    color: var(--muted);
    font: 550 13px/1.35 var(--sans);
  }
  .journey-context #current-case {
    min-width: 0;
    text-align: start;
    color: var(--ink);
    font: 650 14px/1.35 var(--sans);
  }
  .journey-context #journey-count { font-variant-numeric: tabular-nums; }
  #journey-progress {
    appearance: none;
    width: 100%;
    height: 4px;
    accent-color: var(--red);
    border: 0;
    background: #d8d8cd;
    color: var(--red);
  }
  #journey-progress::-webkit-progress-bar { background: #d8d8cd; }
  #journey-progress::-webkit-progress-value { background: var(--red); }
  #journey-progress::-moz-progress-bar { background: var(--red); }
  #main:has(.cover:not([hidden])) .journey-context {
    max-width: none;
    margin-top: 0;
    padding-top: 14px;
  }
  .cover[data-stage] {
    padding-block: clamp(26px, 3.2vw, 46px) clamp(23px, 3.2vw, 44px);
    align-items: center;
  }
  .cover[data-stage] .intro {
    display: block;
    min-width: 0;
    padding-inline-end: clamp(0px, 1.7vw, 25px);
  }
  .cover[data-stage] h1 {
    margin-block: 14px 19px;
    font: 400 clamp(52px, 5.5vw, 78px)/1.015 var(--serif);
    letter-spacing: -.048em;
    overflow-wrap: break-word;
  }
  .cover[data-stage] #story {
    max-width: 51ch;
    font: 450 clamp(17px, 1.37vw, 19px)/1.51 var(--sans);
    color: var(--ink);
  }
  .cover[data-stage] .fiction-note {
    max-width: 52ch;
    margin-block: 10px 0;
    font: 450 13px/1.45 var(--sans);
  }
  .cover[data-stage] figure { align-self: center; margin: 0; min-width: 0; }
  .cover[data-stage] .scene { aspect-ratio: 1.52; }
  #cover-actions { margin-top: 21px; }
  #cover-actions .action { margin: 0; }
  #main > .chapter[data-stage],
  #main > .evidence[data-stage],
  #main > .finish[data-stage] {
    width: min(100%, var(--lesson-width));
    margin-inline: auto;
    border: 0;
    padding-block: var(--stage-space) clamp(18px, 2.8vw, 34px);
  }
  #main > .chapter[data-stage] {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: clamp(26px, 4.5vw, 71px);
    align-items: start;
  }
  .chapter[data-stage] .chapter-head { grid-column: 1; }
  .chapter[data-stage] > :nth-child(2) { grid-column: 2; min-width: 0; }
  #main [data-stage] :is(.chapter-head, .evidence-head, .finish) h2,
  #main .finish[data-stage] h2 {
    font: 400 clamp(37px, 3.7vw, 52px)/1.055 var(--serif);
    letter-spacing: -.039em;
  }
  #main [data-stage] :is(.chapter-head, .evidence-head) p,
  #main .finish[data-stage] p {
    font: 450 clamp(16px, 1.25vw, 18px)/1.55 var(--sans);
    margin-top: 12px;
    max-width: 45ch;
  }
  #main .evidence[data-stage] .evidence-head { margin-bottom: 20px; }
  .chapter[data-stage] .rule-box,
  .chapter[data-stage] .role-box {
    padding: clamp(19px, 2.65vw, 34px);
    border-radius: 3px;
  }
  .chapter[data-stage] .rule-box { background: #f1eee3; }
  .chapter[data-stage] .slider-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 9px 20px;
  }
  .chapter[data-stage] .slider-head label {
    flex: 1 1 14rem;
    max-width: none;
    font: 600 16px/1.48 var(--sans);
  }
  .chapter[data-stage] .slider-head output {
    max-width: 100%;
    font-variant-numeric: tabular-nums;
  }
  .chapter[data-stage] .rule-box input[type=range] { height: 38px; }
  .chapter[data-stage] :is(.role-box .outline, .confirm-value, .option-grid label) {
    min-height: 44px;
  }
  .chapter[data-stage] .role-box { display: block; }
  .chapter[data-stage] .role-box h3 { font-size: clamp(25px, 2.4vw, 32px); }
  .chapter[data-stage] .role-box p {
    font: 450 16px/1.55 var(--sans);
    max-width: 48ch;
    margin-top: 10px;
  }
  .chapter[data-stage] .role-box button { margin-top: 17px; }
  .chapter[data-stage] .role-box:has(#role-text[hidden]) {
    padding: 0;
    background: transparent;
  }
  .chapter[data-stage] #role-text[hidden] + #role-button {
    margin: 0;
    padding: 12px 18px;
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }
  .chapter[data-stage] #role-text[hidden] + #role-button:hover { background: #2f4a74; }
  .chapter[data-stage] .argument textarea {
    min-height: 7rem;
    padding: 12px 15px;
    line-height: 1.55;
  }
  #stage-actions {
    max-width: var(--lesson-width);
    margin-inline: auto;
  }
  .journey-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 14px;
  }
  #stage-actions .journey-controls {
    padding-block: 17px 0;
    border-top: 1px solid var(--line);
  }
  .journey-controls > :is(button, a) {
    max-width: 100%;
    min-height: 46px;
    text-align: start;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
  }
  #journey-back, #journey-extra {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 3px;
    color: var(--blue);
    background: transparent;
    border: 0;
    font: 600 14px/1.4 var(--sans);
    text-decoration: underline;
    text-underline-offset: .23em;
    text-decoration-color: #a4adba;
  }
  #journey-back:hover, #journey-extra:hover { text-decoration-color: currentColor; }
  #journey-next { margin-inline-start: auto; padding: 12px 21px; }
  #cover-actions #journey-next { margin-inline-start: 0; }
  .finish[data-stage] { display: block; }
  #finish-recap { max-width: 68ch; margin: 20px 0; }
  #finish-recap > div { padding: 12px 0; border-top: 1px solid var(--line); }
  #finish-recap dt { color: var(--muted); font: 600 13px/1.35 var(--sans); }
  #finish-recap dd { margin: 5px 0 0; font: 500 17px/1.46 var(--sans); overflow-wrap: anywhere; }
  #main:has([data-stage]) > footer {
    margin-top: clamp(24px, 4vw, 60px);
    padding-block: 16px 20px;
    border-top: 1px solid var(--line);
  }
  #main:has([data-stage]) > footer a { display: inline-flex; align-items: center; min-height: 40px; }
  #main [data-stage] :is(h1,h2):focus:not(:focus-visible) { outline: none; }
  #main [data-stage] :is(h1,h2):focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
}
@media screen and (max-width: 760px) {
  #main:has([data-stage]) { --stage-space: clamp(20px, 4.8vw, 33px); }
  #main > .chapter[data-stage], .cover[data-stage] {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  #main > .chapter[data-stage] > :nth-child(2),
  .chapter[data-stage] .chapter-head,
  .cover[data-stage] .intro, .cover[data-stage] figure { grid-column: 1; }
  .cover[data-stage] .intro { grid-row: 1; padding: 0; }
  .cover[data-stage] figure {
    grid-row: 2;
    width: 100%;
    max-width: 550px;
    justify-self: start;
  }
  .cover[data-stage] h1 {
    font-size: clamp(39px, 9.5vw, 63px);
    margin-block: 11px 14px;
  }
  .cover[data-stage] h1 span { display: inline; }
  .cover[data-stage] #story { font-size: 17px; line-height: 1.47; }
  .cover[data-stage] .scene { aspect-ratio: 2.12; }
  #cover-actions { margin-top: 16px; }
  #main [data-stage] :is(.chapter-head, .evidence-head) p { margin-top: 8px; }
  .journey-context { grid-template-columns: minmax(0, 1fr) auto minmax(35px, 60px); gap: 8px; }
  #main:has([data-stage]) > footer { margin-top: 25px; }
}
@media screen and (max-width: 450px) {
  .mast-in { flex-wrap:wrap; row-gap:0; column-gap:8px; min-height:56px; padding-block:4px; }
  .mast-in .language-picker { gap: 2px; }
  .mast-in .language-picker svg { display: none; }
  .mast-in .language-picker select { padding-inline: 1px; font-size: 13px; }
  .mast-in .brand b { font-size: 24px; }
  #nav-open { padding-inline: 2px; }
  #main .casebar:has(#profile-open) { min-height: 47px; padding: 0; }
  .journey-context { margin-top: 15px; }
  .cover[data-stage] { padding-top: 19px; }
  #stage-actions .journey-controls { column-gap: 10px; }
}
@media screen and (max-height: 490px) and (min-width: 761px) {
  .cover[data-stage] { padding-block: 18px; }
  .cover[data-stage] h1 { font-size: clamp(41px, 4.5vw, 63px); margin-block: 8px 12px; }
}
@media screen and (max-width: 370px) {
  .mast .wrap { width: calc(100% - 24px); }
  .mast-in, .mast-in .brand, .mast-in #nav-open { gap: 5px; }
  .mast-in .brand b { font-size: 21px; letter-spacing: -.065em; }
  .mast-in .mark { width: 24px; height: 24px; }
  .mast-in .topnav { flex-shrink: 0; }
  #main .casebar #profile-open { grid-template-columns: minmax(0, 1fr) 6px; gap: 0 5px; }
  #profile-open > svg { display: none; }
  #main #profile-open .profile-label { grid-column: 1; }
  #profile-open #identity { grid-column: 1; }
  #profile-open .chevron { grid-column: 2; }
}
@media screen {
  .finish[data-stage] .finish-actions { margin-top: 18px; }
  #main #case-end {
    width: min(100%, var(--lesson-width));
    margin: 16px auto 0;
  }
}

@media screen {
  .welcome-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: clamp(40px, 6.8vw, 104px);
    align-items: start;
    max-width: 69rem;
    margin-inline: auto;
    padding-block: clamp(38px, 7.6vh, 86px) clamp(28px, 5vh, 60px);
  }
  .welcome-intro, .welcome-form { min-width: 0; }
  .welcome-intro h1 {
    max-width: 15ch;
    margin: 0;
    font: 400 clamp(53px, 5.8vw, 84px)/1.015 var(--serif);
    letter-spacing: -.048em;
    text-wrap: balance;
    overflow-wrap: break-word;
  }
  .welcome-dilemma {
    max-width: 43ch;
    margin-top: clamp(16px, 2.1vw, 26px);
    color: var(--ink);
    font: 450 clamp(18px, 1.55vw, 22px)/1.48 var(--sans);
  }
  .welcome-purpose {
    max-width: 53ch;
    margin-top: 13px;
    color: var(--muted);
    font: 450 16px/1.55 var(--sans);
  }
  .welcome-form {
    padding: clamp(22px, 2.75vw, 37px);
    border: 1px solid #c9c5b7;
    border-radius: 3px;
    background: #f1eee3;
  }
  .welcome-form h2 {
    font: 400 clamp(30px, 2.55vw, 39px)/1.1 var(--serif);
    letter-spacing: -.039em;
  }
  #welcome-guide {
    max-width: 52ch;
    color: var(--muted);
    font: 450 15px/1.48 var(--sans);
  }
  #welcome-guide { margin-top: 8px; }
  .welcome-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    margin-top: 20px;
  }
  .welcome-fields > div { display: grid; align-content: start; gap: 5px; min-width: 0; }
  .welcome-fields label {
    color: var(--ink);
    font: 650 15px/1.35 var(--sans);
  }
  .welcome-fields :is(input, select) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 47px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #888c80;
    border-radius: 3px;
    background-color: #fffefa;
    color: var(--ink);
    font: 450 16px/1.4 var(--sans);
  }
  .welcome-fields input::placeholder { color: #596054; opacity: 1; }
  #welcome-start { min-height: 47px; max-width: 100%; margin-top: 21px; white-space: normal; }
}
@media screen and (max-width: 850px) {
  .welcome-grid { gap: clamp(23px, 4.7vw, 40px); }
  .welcome-intro h1 { font-size: clamp(45px, 6.1vw, 54px); }
  .welcome-form { padding: 22px; }
}
@media screen and (max-width: 700px) {
  .welcome-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    max-width: 35rem;
    padding-block: 23px 28px;
  }
  .welcome-intro h1 {
    max-width: 18ch;
    font-size: clamp(37px, 8vw, 51px);
    line-height: 1.035;
    letter-spacing: -.043em;
  }
  .welcome-dilemma { margin-top: 13px; font-size: 17px; line-height: 1.45; }
  .welcome-purpose { margin-top: 8px; font-size: 15px; line-height: 1.45; }
  .welcome-form {
    padding: 17px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }
  .welcome-form h2 { font-size: clamp(27px, 5vw, 31px); }
  #welcome-guide { margin-top: 5px; }
  .welcome-fields {
    grid-template-columns: minmax(0, 1.45fr) minmax(98px, 1fr);
    gap: 5px 12px;
    margin-top: 14px;
  }
  .welcome-fields > div { display: contents; }
  .welcome-fields label { align-self: end; }
  .welcome-fields label[for=welcome-place] { grid-area: 1 / 1; }
  .welcome-fields label[for=welcome-age] { grid-area: 1 / 2; margin: 0; }
  #welcome-place { grid-area: 2 / 1; }
  #welcome-age { grid-area: 2 / 2; }
  #welcome-start { margin-top: 16px; }
}
@media screen and (max-width: 510px) {
  .welcome-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .welcome-fields > div { display: grid; }
  .welcome-fields label[for], #welcome-place, #welcome-age { grid-area: auto; }
}
@media screen and (min-width: 620px) and (max-width: 700px) and (max-height: 520px) {
  .welcome-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: none;
    gap: 23px;
    padding-block: 18px;
  }
  .welcome-intro h1 { font-size: 38px; }
  .welcome-form { padding: 0 0 0 17px; border: 0; border-left: 1px solid var(--line); }
  .welcome-fields { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .welcome-fields > div { display: grid; }
  .welcome-fields label[for], #welcome-place, #welcome-age { grid-area: auto; }
  #welcome-start { margin-top: 13px; }
}
@media screen and (max-width: 370px) {
  .welcome-grid { gap: 16px; padding-block: 17px 20px; }
  .welcome-intro h1 { font-size: 34px; }
  .welcome-dilemma { font-size: 16px; }
  .welcome-form { padding-top: 13px; }
  .welcome-fields { gap: 8px; }
}
@media print {
  html[data-view=welcome] body > .print-sheet { display: none !important; }
  html[data-view=welcome] body > #welcome:not([hidden]) {
    display: block !important;
    width: 100%;
    max-width: 155mm;
    margin: 0;
    color: #171917;
    font: 12pt/1.45 var(--sans);
  }
  #welcome h1 { font: 400 29pt/1.1 var(--serif); max-width: none; margin: 0 0 12pt; }
  #welcome :is(.welcome-purpose, .welcome-form) { margin-top: 12pt; }
  #welcome h2 { font: 400 20pt/1.15 var(--serif); }
  #welcome .welcome-fields { display: grid; gap: 5pt; max-width: 100mm; margin-top: 14pt; }
  #welcome .welcome-fields > div {
    display: grid;
    grid-template-columns: 33mm minmax(0, 1fr);
    gap: 6pt;
    align-items: baseline;
  }
  #welcome .welcome-fields label { font-weight: 600; }
  #welcome .welcome-fields :is(input, select) {
    appearance: none;
    min-width: 0;
    margin: 0;
    padding: 2pt 0;
    border: 0;
    border-bottom: .6pt solid #9a9d94;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: #171917;
    caret-color: transparent;
    font: inherit;
  }
  #welcome-place::-webkit-search-cancel-button { display: none; }
  #welcome-place::-webkit-calendar-picker-indicator { opacity: 0; }
  #welcome-start { display: none; }
}

/* The two parts of a printed Advent calendar: a winter panorama and numbered doors. */
:root {
  --advent-stories: url(/assets/advent-stories.e1b0b0ab417abcfa9c40.webp);
  --advent-village: url(/assets/advent-village.4346bc4f122cb07a499c.webp);
  --village-portrait: url(/assets/advent-portrait.05d05f23bba03dbb1062.webp);
  --pine: #163e34;
  --winter-paper: #f7f3e6;
}
.calendar-doors { list-style: none; margin: 0; padding: 0; }
.calendar-door { color: inherit; text-decoration: none; }
@media screen {
  html[data-view=calendar] body,
  html[data-view=welcome] body { background: var(--winter-paper); }
  html[data-view=calendar] .mast, html[data-view=welcome] .mast {
    background: var(--winter-paper);
    border-bottom-color: #91a096;
  }
  html[data-view=calendar] .brand b, html[data-view=welcome] .brand b { color: var(--pine); }
  .calendar { padding-block: clamp(14px, 2.7vw, 38px) clamp(42px, 6vw, 88px); }
  .calendar-hero {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
    color: #fff9e9;
    background: var(--pine);
    overflow: hidden;
  }
  .calendar-heading { align-self: center; padding: clamp(26px, 3.7vw, 60px); }
  .calendar-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 13px;
    margin: 0;
    font: 650 clamp(11px, 1.2vw, 13px)/1.4 var(--sans);
    letter-spacing: .025em;
  }
  .calendar-eyebrow span + span { padding-inline-start: 13px; border-inline-start: 1px solid #80a28b; }
  .calendar-heading h1 {
    max-width: 11ch; margin: clamp(18px, 2.7vw, 38px) 0 0;
    color: inherit;
    font: 400 clamp(48px, 6.6vw, 98px)/.96 var(--serif);
    letter-spacing: -.06em; text-wrap: balance; overflow-wrap: anywhere;
  }
  .calendar-lede {
    max-width: 40ch; margin-top: clamp(18px, 2vw, 29px);
    color: #f4f3e4; font: 450 clamp(16px, 1.38vw, 20px)/1.46 var(--sans);
  }
  .calendar-village {
    min-height: clamp(240px, 26vw, 400px);
    background: #b8c5bc var(--advent-village) center 54%/cover no-repeat;
  }
  .calendar-collection { margin-top: clamp(28px, 4.4vw, 62px); }
  .calendar-collection-head {
    display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap;
    gap: 12px 24px; margin-bottom: clamp(15px, 2vw, 25px);
  }
  .calendar-collection-head h2 {
    font: 400 clamp(31px, 3.35vw, 49px)/1.06 var(--serif);
    color: var(--pine); letter-spacing: -.047em;
  }
  #calendar-guide { max-width: 59ch; margin: 7px 0 0; font: 450 16px/1.45 var(--sans); color: #394b42; }
  .calendar-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
  .calendar-links :is(a,button) { min-height: 44px; }
  #calendar-today { background: var(--pine); border-color: var(--pine); color: #fff9e9; }
  #calendar-resume { background: transparent; color: var(--pine); border-color: #8b9c8d; }
  .calendar-doors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
  .calendar-doors li {
    --door-paper: #e4e6d5; --door-ink: #173c32; --door-border: #91a38b;
    min-width: 0; display: flex;
  }
  .calendar-doors li:is(:nth-child(12n+1),:nth-child(12n+9),:nth-child(24)) {
    --door-paper: #234c40; --door-ink: #fffae8; --door-border: #8dae8e;
  }
  .calendar-doors li:is(:nth-child(12n+3),:nth-child(12n+8)) {
    --door-paper: #f0dacf; --door-ink: #702b29; --door-border: #c69e90;
  }
  .calendar-doors li:is(:nth-child(12n+4),:nth-child(12n+11)) {
    --door-paper: #c5d7d4; --door-ink: #183a42; --door-border: #8baaa3;
  }
  .calendar-doors li:is(:nth-child(12n+6),:nth-child(12n+7)) {
    --door-paper: #78342f; --door-ink: #fff3df; --door-border: #d5a28a;
  }
  .calendar-doors li:is(:nth-child(12n+5),:nth-child(12n+10)) {
    --door-paper: #eadeba; --door-ink: #493719; --door-border: #b5a57d;
  }
  .calendar-door {
    position: relative; isolation: isolate;
    display: flex; flex: 1; flex-direction: column; align-items: start;
    min-width: 0; min-height: clamp(132px, 12.2vw, 192px); padding: clamp(15px, 1.65vw, 26px);
    color: var(--door-ink); background-color: var(--door-paper);
    transition: transform 140ms ease, box-shadow 140ms ease;
  }
  .calendar-door::before {
    content: ""; position: absolute; z-index: -1; inset: 6px;
    border: 1px dashed var(--door-border); pointer-events: none;
  }
  .calendar-door[aria-current=date] { box-shadow: inset 0 0 0 3px var(--door-ink); }
  .calendar-door:focus-visible { z-index: 1; outline-offset: 1px; }
  @media (hover:hover) {
    .calendar-door[href]:hover { transform: translateY(-2px); box-shadow: 0 4px 0 #193c3529; }
    .calendar-door[aria-current=date]:hover { box-shadow: inset 0 0 0 3px var(--door-ink), 0 4px 0 #193c3529; }
  }
  .door-number {
    font: 400 clamp(43px, 4.7vw, 70px)/.98 var(--serif); letter-spacing: -.055em;
    font-variant-numeric: lining-nums tabular-nums;
  }
  .door-name {
    margin-top: auto; padding-top: 16px; width: 100%;
    font: 675 clamp(14px, 1.18vw, 18px)/1.22 var(--sans); overflow-wrap: anywhere; hyphens: auto;
  }
  .door-status {
    margin-top: 5px; font: 550 12px/1.25 var(--sans); overflow-wrap: anywhere;
  }
  .journey-origin {
    min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 11px;
  }
  .journey-origin a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .calendar-back {
    display: inline-flex; align-items: center; min-height: 44px; gap: 10px;
    color: var(--pine); font: 600 14px/1.35 var(--sans);
  }
  .calendar-back::before {
    content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 0 1.5px 1.5px;
    transform: rotate(45deg);
  }
}
@media screen and (max-width: 920px) {
  .calendar-doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calendar-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); }
}
@media screen and (max-width: 680px) {
  .calendar-hero { grid-template-columns: 1fr; }
  .calendar-heading { padding: 21px 22px 22px; }
  .calendar-heading h1 { margin-top: 11px; max-width: none; font-size: clamp(41px, 8.9vw, 58px); }
  .calendar-lede { margin-top: 10px; max-width: 46ch; font-size: 16px; }
  .calendar-village { min-height: 0; height: clamp(98px, 27vw, 162px); background-position: center 57%; }
  .calendar-doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .calendar-door { padding: 14px; min-height: 121px; }
  .door-name { font-size: 14px; padding-top: 12px; }
}
@media screen and (max-width: 460px) {
  .calendar-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-door { min-height: 118px; padding: 14px 16px; }
  .calendar { padding-block-start: 11px; }
  .calendar-collection { margin-top: 25px; }
  #calendar-guide { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .calendar-door { transition: none; }
  .calendar-door:hover { transform: none; }
}
@media print {
  html[data-view=calendar] body > .print-sheet { display: none !important; }
  html[data-view=calendar] body > #calendar:not([hidden]) { display: block !important; width: 100%; margin: 0; }
  .calendar-hero { border-bottom: .6pt solid; padding-bottom: 8pt; }
  .calendar-eyebrow { font-size: 9pt; }
  .calendar-eyebrow span + span { margin-left: 8pt; }
  .calendar-heading h1 { font: 400 29pt/1.1 var(--serif); margin: 5pt 0; }
  .calendar-lede, #calendar-guide { font-size: 10pt; }
  .calendar-collection-head { margin: 10pt 0; }
  .calendar-collection-head h2 { font-size: 19pt; }
  .calendar-links, .calendar-back { display: none; }
  .calendar-doors { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5pt; }
  .calendar-door { display: block; border: .6pt solid #8b9088; padding: 5pt; }
  .door-number { display: block; font: 400 18pt/1.1 var(--serif); }
  .door-name, .door-status { display: block; font: 600 9pt/1.2 var(--sans); }
}

@media screen {
  .door-name { order: 3; }
  .door-status { order: 2; }
  #main .family-panel {
    grid-column: 1 / -1; min-width: 0; width: min(100%, 48rem);
  }
  #main:has(.family-panel:not([hidden])) .chapter[data-stage]:not([hidden]) { display: block; }
  #main .family-panel h2 {
    margin: 0; color: var(--pine);
    font: 400 clamp(37px, 4.8vw, 68px)/1.04 var(--serif); letter-spacing: -.048em;
    overflow-wrap: break-word;
  }
  #main .family-panel > p {
    margin: 13px 0 0; max-width: 50ch; color: var(--ink);
    font: 450 clamp(17px, 1.55vw, 21px)/1.45 var(--sans);
  }
  .family-choices {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
    margin: 23px 0 0; padding: 0; border: 0; min-width: 0;
  }
  .family-choices label {
    display: flex; align-items: center; gap: 13px; min-height: 54px; padding: 12px 16px;
    border: 1px solid #9aa89b; background: #f1f1e5; color: var(--pine);
    border-radius: 3px; font: 600 clamp(16px,1.4vw,19px)/1.4 var(--sans); cursor: pointer;
  }
  .family-choices label small { display: block; margin-bottom: 2px; font: 550 13px/1.3 var(--sans); }
  .family-choices label:has(input:checked) { background: #e0e9d9; border-color: var(--pine); box-shadow: inset 3px 0 var(--pine); }
  .family-choices input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--pine); }
  .family-choices span { min-width: 0; overflow-wrap: anywhere; }
  .family-compare, .decision-reminder { padding: 0; margin: 22px 0; }
  .family-compare { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .family-compare > div { min-width: 0; padding: 16px; border-top: 3px solid var(--pine); background: #e9eddf; }
  .family-compare > div + div { border-top-color: #954938; background: #f3e5da; }
  .family-compare > div:only-child { grid-column: 1 / -1; }
  .family-compare dt, .decision-reminder dt { font: 650 13px/1.35 var(--sans); color: #47574c; }
  .family-compare dd { margin: 8px 0 0; font: 550 clamp(17px,1.55vw,21px)/1.4 var(--sans); overflow-wrap: anywhere; }
  .family-compare dd + dd { border-top: 1px solid #bfc9ba; padding-top: 8px; }
  .family-source-link {
    display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px;
    color: var(--pine); font: 600 15px/1.35 var(--sans);
  }
  .family-story-tools { margin-block: 8px 14px; }
  .family-story-tools p, .field-note { color: var(--muted); font: 450 14px/1.45 var(--sans); }
  #family-listen { min-height: 44px; margin-top: 4px; }
  #family-print { min-height: 46px; margin-top: 22px; }
  .decision-reminder { margin: 0 0 15px; background: #eaf0e3; border-inline-start: 3px solid var(--pine); padding: 12px 15px; }
  .decision-reminder > div + div:not([hidden]) { margin-top: 9px; }
  .decision-reminder dd { margin: 3px 0 0; font: 550 16px/1.4 var(--sans); overflow-wrap: anywhere; }
  #role-proposal { grid-column: 1 / -1; }
  #argument-saving { margin: 5px 0 12px; }
  #alternative-rule { border-top: 1px solid var(--line); margin-top: 12px; }
  #alternative-rule summary { padding-block: 10px; min-height: 44px; font: 600 14px/1.45 var(--sans); cursor: pointer; }
  #alternative-rule label { display: block; margin-bottom: 4px; font: 650 15px/1.4 var(--sans); }
  #alternative-rule textarea { width: 100%; min-height: 72px; padding: 9px; border: 1px solid #878d80; resize: vertical; background: var(--paper); }
  #alternative-help { margin: 5px 0 0; color: var(--muted); font: 450 13px/1.45 var(--sans); }
}
@media screen and (max-width: 560px) {
  .family-compare { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .family-choices { margin-top: 17px; }
  #main .family-panel h2 { font-size: clamp(33px,9vw,45px); }
}

@media screen {
  .calendar-profile {
    min-height: 44px; padding: 4px 7px; background: none; border: 0;
    font: 600 14px/1.35 var(--sans); text-decoration: underline; text-underline-offset: 3px; color: var(--pine);
  }
  #welcome .welcome-grid { align-items: center; }
  #welcome .welcome-intro h1 { margin-top: 15px; color: var(--pine); }
  #welcome .welcome-intro #welcome-guide { font-size: clamp(16px,1.45vw,20px); line-height: 1.5; color: #36493e; margin-top: 16px; }
  .welcome-village {
    margin-top: clamp(20px,2.6vw,37px); aspect-ratio: 3 / 1;
    background: #bbc9c2 var(--advent-village) center / cover no-repeat;
  }
  #welcome .welcome-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 0; }
  #welcome .welcome-fields > div:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; }
  #welcome .welcome-fields :is(label, input, select) { grid-area: auto; }
  #welcome .welcome-form { border: 1px solid #aab6a9; background: #e9ecdf; }
  .welcome-door { margin: 0 0 15px; color: var(--pine); font: 650 16px/1.4 var(--sans); }
  .welcome-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top: 18px; }
  .welcome-actions #welcome-start { margin: 0; }
  #welcome .calendar-back { margin-top: 8px; }
  .calendar-door .door-name { font-weight: 625; }
  #main .cover[data-stage] h1 { max-width: 16ch; overflow-wrap: anywhere; }
}
@media screen and (max-width:700px) {
  #welcome .welcome-grid { gap:16px; padding-top:19px; }
  #welcome .welcome-form { padding:17px; }
  #welcome .welcome-intro h1 { margin-top:10px; }
  #welcome .welcome-intro #welcome-guide { margin-top:8px; }
  .welcome-village { margin-top:14px; max-height:135px; }
}
@media print {
  #welcome .welcome-actions, #welcome .calendar-back, .welcome-village { display:none; }
}
@media screen {
  #calendar-profile { text-align: start; text-decoration: none; }
  #calendar-profile span { text-decoration: underline; text-underline-offset: 3px; }
  #calendar-profile small { display: block; margin-top: 2px; color: var(--muted); font: 500 12px/1.3 var(--sans); }
}
@media screen {
  .door-top { display: flex; align-items: start; justify-content: space-between; gap: 5px; width: 100%; }
  .door-picture {
    display: block; flex: 0 0 auto; width: clamp(44px, 4.6vw, 69px); aspect-ratio: 1;
    background-image: var(--sheet); background-size: var(--columns) var(--rows);
    background-position: var(--x) var(--y); background-repeat: no-repeat;
    box-shadow: 0 0 0 1px #fff9e496;
  }
}
@media screen and (max-width: 680px) {
  .door-picture { width: clamp(40px, 12vw, 62px); }
}
@media print { .door-picture { display: none; } }

@media print {
  html[data-audience=school] .print-sheet .lines { height: 12mm; }
  html[data-audience=school] .print-sheet .lines.twice { height: 20mm; }
  html[data-audience=adult] .print-sheet .lines { height: 11mm; }
  html[data-audience=adult] .print-sheet .lines.twice { height: 17mm; }
}
@media screen {
  html[data-audience=together] #fall .kicker { display: none; }
}
@media screen and (max-width: 760px) {
  html[data-audience=together] #main #fall:not([hidden]) { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  html[data-audience=together] #fall .intro { display: contents; }
  html[data-audience=together] #fall #title { order: 1; margin-top: 0; }
  html[data-audience=together] #fall figure { order: 2; width: 100%; align-self: start; margin: 0 0 15px; }
  html[data-audience=together] #fall .scene { aspect-ratio: 1.8; }
  html[data-audience=together] #fall #story { order: 3; }
  html[data-audience=together] #fall .family-story-tools { order: 4; }
  html[data-audience=together] #fall #cover-actions { order: 5; }
}

@media screen and (max-width: 620px) {
  html[data-audience=together] .scene { aspect-ratio: 1; }
}

/* Push-to-talk keeps the microphone controls and the current reply together. */
.sponsored { margin: 1rem 0; padding: 1rem 0; border-block: 1px solid var(--line); }
.sponsored h3, .sponsored h4 { font: 650 1.05rem/1.35 var(--sans); margin: .4rem 0; }
.sponsored h4 { font-size: .88rem; }
.sponsored p { margin: .5rem 0 .8rem; }
#sponsor-form .sponsor-consent { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr); align-items: start; gap: .65rem; margin: .85rem 0; font-weight: 500; }
#sponsor-form .sponsor-consent input { flex: 0 0 auto; width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; }
.sponsor-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.sponsor-clock { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sponsor-clock time { font-variant-numeric: tabular-nums; font-weight: 700; }
.sponsor-written { min-height: 44px; padding: .45rem 0; background: transparent; border: 0; color: var(--blue); text-decoration: underline; text-underline-offset: .18em; }
#sponsor-transcript { margin-top: 1rem; }
#sponsor-transcript p { overflow-wrap: anywhere; }
#sponsor-audio { display: block; width: 100%; max-width: 30rem; }
#voice-own summary { cursor: pointer; min-height: 44px; padding: .65rem 0; }
#sponsor-state:empty { display: none; }

.illustration-frame { position: relative; }
button.illustration-open {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 8px;
  background: transparent;
  color: #fff;
  cursor: zoom-in;
}
.illustration-open span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #f8f4eac4;
  border-radius: 50%;
  background: #142b25eb;
}
.illustration-open svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.illustration-open:hover span, .illustration-open:focus-visible span { background: #071d16; }
button.illustration-open:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
#illustration-viewer {
  width: min(850px, calc(100vw - 24px), calc(100dvh - 96px));
  max-width: none;
  max-height: calc(100dvh - 16px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 4px;
}
#illustration-viewer::backdrop { background: #101914d9; }
.illustration-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 4px 14px; }
.illustration-toolbar h2 { margin: 0; font: 650 clamp(14px, 2.3vw, 19px)/1.2 var(--sans); overflow-wrap: anywhere; }
.illustration-toolbar .close { flex: none; min-width: 44px; min-height: 44px; }
#illustration-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--paper);
  background-image: var(--sheet);
  background-size: var(--columns) var(--rows);
  background-position: var(--x) var(--y);
  background-repeat: no-repeat;
}
#illustration-square img { display: block; width: 100%; height: 100%; object-fit: contain; }
#illustration-square img[hidden] { display: none; }
@media print { #illustration-viewer, .illustration-open { display: none !important; } }
@media screen and (min-aspect-ratio: 3 / 2) and (max-height: 550px) {
  #illustration-viewer[open] {
    display: grid;
    grid-template-columns: auto minmax(104px, 180px);
    width: fit-content;
    max-width: calc(100vw - 20px);
  }
  #illustration-square { grid-area: 1 / 1; width: min(calc(100dvh - 24px), calc(100vw - 148px)); }
  .illustration-toolbar {
    grid-area: 1 / 2;
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: space-between;
    padding: 8px 10px 13px;
  }
  .illustration-toolbar .close { align-self: flex-end; }
}

@media screen {
  .calendar-collection-head > div:first-child { max-width: 46rem; }
  #calendar-request, #library-guide { line-height: 1.5; }
  #calendar-request { margin-top: .7rem; font-weight: 620; }
  #calendar-request a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pine); text-underline-offset: .2em; }
  .calendar-door.is-locked { cursor: default; }
  .calendar-door.is-locked .door-picture { opacity: .72; }
  .calendar-door.is-locked::before { border-style: dotted; }
  .calendar-door.is-requested { outline: 3px solid var(--door-ink); outline-offset: -4px; }
  #library-guide { margin: 0 0 1rem; max-width: 66ch; color: var(--pine); }
}

.site-credit.wrap { display:flex; justify-content:center; align-items:baseline; flex-wrap:wrap;
  gap:.28em; margin:1.6rem auto 1rem; padding:.8rem 0; border:0; color:#525950; font:400 .75rem/1.5 var(--sans); }
.site-credit.wrap { align-items:center; gap:0 1.25rem; padding-inline:.7rem; }
.site-credit .credit-signature, .site-credit .credit-feedback { display:inline-flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:.28em; }
.site-credit a { display:inline-flex; align-items:center; min-height:34px; color:inherit; text-underline-offset:.18em; }
.site-credit .credit-feedback { gap:.45em; }
.site-credit a:focus-visible { outline:2px solid var(--pine); outline-offset:2px; }
@media screen and (max-width:540px) { .site-credit.wrap { flex-direction:column; gap:0; } }
.site-credit .credit-heart { width:1em; height:1em; flex:none; align-self:center; color:#864432; }
@media print { .site-credit.wrap { display:none !important; } }

/* The entire village is one Advent calendar. The same ordered list can
   unfold to show all the questions, including those behind closed doors. */
@media screen {
  html[data-view=calendar] { --calendar-rail:clamp(14px,4.4vw,78px); }
  #calendar {
    --scene-ink:#17363b; --scene-paper:#fff8e9;
    --scene-edge:var(--calendar-rail); --window-size:clamp(48px,10.8vw,61px);
    width:100%; max-width:none; margin:0; padding:0;
  }
  #calendar .calendar-stage {
    isolation:isolate; position:relative;
    display:grid; grid-template-rows:auto 1fr auto; min-height:calc(100svh - 60px);
    color:#fff9e9; background:#344e51;
  }
  #calendar .calendar-village {
    position:absolute; z-index:-2; inset:0; width:100%; height:100%; min-height:0;
    pointer-events:none; background-position:49% 55%;
  }
  #calendar .calendar-stage::before {
    content:""; position:absolute; z-index:-1; inset:0; pointer-events:none;
    background:linear-gradient(180deg,#132936ed 0,#1b303bc4 137px,#17313732 270px,transparent 57%,#1830352e 85%,#142d33bc);
  }
  #calendar-preview { display:none; }
  #calendar .calendar-heading {
    padding:17px var(--scene-edge) 0; align-self:stretch; color:#fff9ea; background:transparent;
  }
  #calendar .calendar-eyebrow { color:#fff4d8; font-size:12px; letter-spacing:.025em; }
  #calendar .calendar-eyebrow span + span { border-color:#ddbd83; }
  #calendar .calendar-heading h1 {
    max-width:18ch; margin:7px 0 6px; color:inherit;
    font:400 clamp(37px,9.2vw,78px)/1.01 var(--serif); letter-spacing:-.052em;
    text-wrap:balance; overflow-wrap:break-word;
  }
  #calendar #calendar-guide, #calendar #calendar-request {
    max-width:58ch; margin:0; color:#fff9ed; text-shadow:0 1px 4px #172a30;
    font:500 14px/1.38 var(--sans);
  }
  #calendar #calendar-request:not([hidden]) { margin-top:4px; font-weight:650; }
  #calendar #calendar-request a { color:inherit; }
  #calendar .calendar-collection {
    grid-row:2; grid-column:1; display:flex; flex-direction:column;
    min-width:0; margin:0; padding:9px var(--scene-edge) 15px; background:none;
  }
  #calendar .calendar-collection-head {
    display:flex; justify-content:flex-start; align-items:center; flex-wrap:wrap; gap:3px 7px; margin:0 0 6px;
  }
  #calendar .calendar-collection-head h2 {
    position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden;
  }
  #calendar .calendar-collection-head :is(a,button) {
    min-height:44px; padding:6px 10px; border:1px solid #d4b47a; border-radius:4px;
    background:#17343bf5; color:#fff9e9; font:650 .8125rem/1.2 var(--sans);
    text-decoration:none;
  }
  #calendar #calendar-today, #calendar #calendar-retry { background:#fff2d6; color:#254340; }
  #calendar #calendar-questions { display:inline-flex; gap:7px; align-items:center; }
  #calendar[data-phone] :is(#calendar-guide.preview-status, #doors-title, #calendar-questions) { display:none; }
  #calendar[data-phone] .calendar-collection-head:not(:has(:is(#calendar-today, #calendar-resume, #calendar-retry):not([hidden]))) { display:none; }
  #calendar-questions::before { content:""; width:.82em; height:.82em; border:1.5px solid currentColor; border-radius:2px; }
  #calendar-questions[aria-pressed=true]::before { background:currentColor; box-shadow:inset 0 0 0 2px #17343b; }
  #calendar .calendar-doors {
    flex:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; align-content:space-around;
    gap:12px 8px; margin:0; padding:10px 0;
  }
  #calendar .calendar-doors li { position:relative; display:flex; justify-content:center; min-width:0; }
  #calendar .calendar-doors li:nth-child(even) { top:4px; }
  #calendar .calendar-door {
    position:relative; isolation:auto; flex:0 0 auto; width:var(--window-size); padding:0; min-height:0;
    color:var(--scene-ink); border:0; border-radius:0; background:transparent;
    outline:0; box-shadow:none; filter:drop-shadow(0 2px 3px #172d3a9c);
  }
  #calendar .calendar-door::before { content:none; }
  #calendar .door-top {
    position:relative; display:flex; flex-direction:column; justify-content:flex-end; align-items:stretch;
    width:100%; aspect-ratio:1; min-height:0; gap:0; overflow:hidden; border:2px solid #f9f4e6;
    border-radius:0; background:#18363b; box-shadow:0 0 0 1px #27383a9c;
  }
  #calendar .door-top::after {
    content:""; position:absolute; inset:2px; z-index:1; pointer-events:none; border:1px dashed #fffaf0ad;
  }
  #calendar .door-picture {
    position:absolute; inset:0; width:100%; height:100%; opacity:1; border:0; border-radius:0; box-shadow:none;
  }
  #calendar .door-number {
    position:relative; z-index:1; order:1; width:100%; margin:0; padding:1px 0 2px;
    border-top:1px solid #e0d9c6; color:#fff7e0; background:#174047; text-align:center;
    font:400 clamp(21px,4.4vw,28px)/1 var(--serif);
    font-variant-numeric:lining-nums tabular-nums; letter-spacing:-.035em;
  }
  #calendar .is-locked .door-picture { filter:saturate(.45) contrast(.83) brightness(.94); }
  #calendar .is-locked .door-top { border-color:#d6d5cb; }
  #calendar .is-locked .door-number { color:#fffcf3; background:#50534d; border-top-color:#c8c8bc; }
  #calendar .is-locked .door-signals { color:#333c32; background:#d7d8cd; }
  #calendar .calendar-door:is(.is-requested,[aria-current=date]) .door-number { background:#873b30; color:#fff6dc; }
  #calendar .door-signals {
    position:absolute; z-index:1; top:3px; right:3px; display:flex; gap:1px; align-items:center;
    padding:2px; background:#fff9ed; color:#29372e; border-radius:0; box-shadow:0 0 0 1px #424b3f6b;
  }
  #calendar .door-signals svg { display:block; width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2; stroke-linejoin:round; }
  #calendar .calendar-door:is(.is-opened,.is-requested,[aria-current=date],:hover) { box-shadow:none; }
  #calendar .calendar-door:is(.is-requested,[aria-current=date]) .door-top { box-shadow:0 0 0 2px #9b493a,0 0 0 4px #fff7e9; }
  #calendar .calendar-door:focus-visible {
    z-index:3; outline:3px solid #fff9df; outline-offset:2px; box-shadow:0 0 0 7px #17434c;
  }
  #calendar .calendar-door[href] { transition: transform .22s ease, filter .22s ease; }
  #calendar .calendar-door[href]:hover { transform: translateY(-3px); filter: drop-shadow(0 6px 12px #102430a8); }
  #calendar:not(.show-questions) .calendar-door.is-inspected:not(:focus-visible) .door-top {
    outline:2px solid #284648; outline-offset:1px; box-shadow:0 0 0 4px #fff8e9;
  }
  #calendar .calendar-door[href]:hover .door-top { box-shadow:0 0 0 2px #254c50,0 0 0 4px #fff8e9,0 0 18px #ffe5a366; }
  @keyframes calendar-lantern {
    0%, 100% { box-shadow:0 0 0 2px #9b493a,0 0 0 4px #fff7e9,0 0 14px 2px #ffd98a66; }
    50% { box-shadow:0 0 0 2px #b05340,0 0 0 4px #fffaf0,0 0 24px 6px #ffd98aa6; }
  }
  @media (prefers-reduced-motion: no-preference) {
    #calendar .calendar-door[aria-current=date] .door-top { animation: calendar-lantern 3.6s ease-in-out infinite; }
  }
  @media (prefers-reduced-motion: reduce) {
    #calendar .calendar-door[href] { transition: none; }
    #calendar .calendar-door[href]:hover { transform: none; }
  }
  #calendar .door-caption {
    display:none; position:absolute; z-index:2; bottom:calc(100% + 7px); left:50%; transform:translateX(-50%);
    width:max-content; max-width:min(18rem,65vw); margin:0; padding:9px 11px 10px; border-radius:3px;
    background:var(--scene-paper); color:var(--scene-ink); box-shadow:0 2px 7px #0f252d70; text-align:start;
  }
  #calendar .door-caption::after {
    content:""; position:absolute; top:100%; left:calc(50% - 6px); border:6px solid transparent; border-top-color:var(--scene-paper);
  }
  #calendar .door-name, #calendar .door-status { display:block; order:initial; margin:0; padding:0; }
  #calendar .door-name { font:650 .9375rem/1.27 var(--sans); overflow-wrap:break-word; hyphens:manual; }
  #calendar .door-status { margin-top:3px; color:#50574d; font:500 .75rem/1.3 var(--sans); overflow-wrap:break-word; }
  #calendar .calendar-doors li:focus-within { z-index:5; }
  #calendar .calendar-door.is-inspected .door-caption { display:block; }
  #calendar[data-phone] .calendar-doors li:nth-child(-n+6) .door-caption {
    top:calc(100% + 7px); bottom:auto;
  }
  #calendar[data-phone] .calendar-doors li:nth-child(-n+6) .door-caption::after {
    top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:var(--scene-paper);
  }
  #calendar .calendar-links {
    display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:0 15px;
    padding:6px var(--scene-edge); border-top:1px solid #c0ab8099; background:#173239ed;
  }
  #calendar .calendar-links button {
    min-height:44px; padding:4px 0; border:0; border-radius:0; background:none; color:#fff9e9;
    font:600 13px/1.27 var(--sans); text-decoration:underline; text-decoration-color:#d4bd91; text-underline-offset:4px;
  }
  #calendar #calendar-profile { display:flex; align-items:flex-start; justify-content:center; flex-direction:column; gap:2px; }
  #calendar #calendar-profile small { margin:0; font-size:.6875rem; color:#ead8b4; }
  #calendar.show-questions .calendar-collection { padding-top:9px; }
  #calendar.show-questions .calendar-collection-head {
    position:sticky; top:calc(var(--mast-height,64px) + 4px); z-index:6; width:fit-content;
    max-width:100%; background:#183238f2; border-radius:4px;
  }
  #calendar .calendar-door { scroll-margin-block:calc(var(--mast-height,64px) + 54px) 20px; }
  #calendar.show-questions .calendar-doors {
    grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; align-content:start; gap:10px;
  }
  #calendar.show-questions .calendar-doors li { top:auto; }
  #calendar.show-questions .calendar-door {
    width:100%; flex:1; display:flex; flex-direction:column; align-items:flex-start; gap:7px; filter:none;
    padding:9px; background:var(--scene-paper); border:1px solid #acaa96; border-radius:0;
  }
  #calendar.show-questions .door-top { width:48px; min-height:0; }
  #calendar.show-questions .door-number { font-size:20px; }
  #calendar.show-questions .calendar-doors .door-caption {
    display:block; position:static; width:100%; max-width:none; padding:0; transform:none; box-shadow:none;
  }
  #calendar.show-questions .door-caption::after { display:none; }
}
@media screen and (hover:hover) {
  #calendar .calendar-doors li:hover { z-index:4; }
}
@media screen and (max-width:599px) {
  #calendar .calendar-doors li:nth-child(4n+1) .door-caption,
  #calendar .calendar-doors li:nth-child(4n+2) .door-caption { left:0; transform:none; }
  #calendar .calendar-doors li:nth-child(4n+1) .door-caption::after,
  #calendar .calendar-doors li:nth-child(4n+2) .door-caption::after { left:17px; }
  #calendar .calendar-doors li:nth-child(4n) .door-caption,
  #calendar .calendar-doors li:nth-child(4n+3) .door-caption { left:auto; right:0; transform:none; }
  #calendar .calendar-doors li:nth-child(4n) .door-caption::after,
  #calendar .calendar-doors li:nth-child(4n+3) .door-caption::after { left:auto; right:17px; }
}
@media screen and (min-width:600px) {
  #calendar { --window-size:clamp(56px,6.1vw,92px); }
  #calendar .calendar-heading { padding-top:clamp(22px,3.4vh,44px); }
  #calendar .calendar-heading h1 { font-size:clamp(54px,5.7vw,94px); }
  #calendar .calendar-doors { grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px 12px; padding-block:14px; }
  #calendar .calendar-doors li:nth-child(even) { top:7px; }
  #calendar .door-number { font-size:clamp(23px,2.1vw,33px); padding-block:2px 4px; }
  #calendar .door-signals svg { width:14px; height:14px; }
  #calendar #calendar-guide { font-size:16px; }
  #calendar .calendar-links { padding-block:8px; gap:0 24px; }
  #calendar .calendar-links button { font-size:14px; }
  #calendar.show-questions .calendar-doors { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media screen and (min-width:600px) and (max-width:1023px) {
  #calendar .calendar-doors li:nth-child(6n+1) .door-caption { left:-2px; transform:none; }
  #calendar .calendar-doors li:nth-child(6n+1) .door-caption::after { left:20px; }
  #calendar .calendar-doors li:nth-child(6n) .door-caption { right:-2px; left:auto; transform:none; }
  #calendar .calendar-doors li:nth-child(6n) .door-caption::after { left:auto; right:20px; }
}
@media screen and (min-width:1024px) {
  html[data-view=calendar] .mast .mast-in {
    width:calc(100% - var(--calendar-rail) - var(--calendar-rail)); max-width:none;
  }
  #calendar .calendar-heading { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:clamp(20px,4vw,80px); }
  #calendar .calendar-heading-copy { min-width:0; }
  #calendar:not(.show-questions) #calendar-preview:not([hidden]) {
    display:block; align-self:start; justify-self:end; width:min(100%,27rem); padding:12px 18px 14px;
    background:var(--scene-paper); color:var(--scene-ink); border-inline-start:3px solid #82734e;
    box-shadow:0 2px 8px #142b3433;
  }
  #calendar-preview-meta { margin:0 0 4px; color:#46584d; font:600 .8125rem/1.35 var(--sans); }
  #calendar-preview-title { margin:0; font:400 clamp(1.3rem,1.7vw,1.68rem)/1.16 var(--serif); letter-spacing:-.018em; hyphens:manual; overflow-wrap:break-word; }
  #calendar:not(.show-questions) .calendar-door.is-inspected .door-caption { display:none; }
  #calendar .calendar-links { padding-block:10px; }
  #calendar .calendar-stage { min-height:max(565px,calc(100svh - 64px)); }
  #calendar .calendar-stage::before {
    background:linear-gradient(180deg,#142a37d9,#19313a8c 24%,#142c331a 48%,transparent 78%,#172d335e),
               linear-gradient(100deg,#112d3982,transparent 48%);
  }
  #calendar .calendar-collection { padding-top:13px; }
  #calendar .calendar-doors { grid-template-columns:repeat(8,var(--window-size)); justify-content:space-between; gap:17px 0; padding:14px 0 17px; }
  #calendar .calendar-doors li:nth-child(even) { top:9px; }
  #calendar .calendar-doors li:nth-child(8n+1) .door-caption { left:-4px; transform:none; }
  #calendar .calendar-doors li:nth-child(8n+1) .door-caption::after { left:24px; }
  #calendar .calendar-doors li:nth-child(8n) .door-caption { right:-4px; left:auto; transform:none; }
  #calendar .calendar-doors li:nth-child(8n) .door-caption::after { left:auto; right:24px; }
  #calendar.show-questions .calendar-doors { grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
  #calendar.show-questions .calendar-door { flex-direction:row; align-items:flex-start; }
  #calendar.show-questions .door-top { flex:0 0 44px; min-height:0; }
}
@media print {
  #calendar-preview, #calendar .calendar-collection-head :is(a,button), .door-signals { display:none; }
  .door-caption { display:block; }
}

@media screen {
  #welcome {
    width:100%; max-width:none; padding:0; color:#183936;
  }
  #welcome .welcome-grid {
    min-height:max(535px,calc(100svh - 72px)); position:relative; isolation:isolate;
    width:100%; max-width:none; margin:0; padding:clamp(35px,6vw,100px);
    display:grid; grid-template-columns:minmax(0,1fr); align-content:center; justify-items:start;
  }
  #welcome .welcome-village {
    display:block; z-index:-1; position:absolute; inset:0; width:100%; height:100%;
    max-height:none; margin:0; aspect-ratio:auto; background-position:62% 52%;
  }
  #welcome .welcome-card {
    width:min(100%,29rem); min-width:0; padding:clamp(24px,3vw,46px);
    border:1px solid #cfbd96; border-top:5px solid #a77739; background:#fff7e7;
    box-shadow:0 12px 40px #13282c3b;
  }
  #welcome .welcome-intro h1 {
    margin-top:15px; color:#193e3b; font-size:clamp(48px,5.2vw,78px);
    line-height:1.01; letter-spacing:-.051em;
  }
  #welcome .welcome-intro #welcome-guide { color:#394b42; font:450 17px/1.48 var(--sans); margin-top:14px; }
  #welcome .welcome-form {
    margin:20px 0 0; border:0; border-top:1px solid #cbbfa7; padding:20px 0 0; background:transparent;
  }
  #welcome .welcome-fields :is(input,select) { background:#fffbf1; color:#173c37; border-color:#8c9a88; }
  #welcome .welcome-actions { margin-top:17px; }
  #welcome .welcome-actions #welcome-start { background:#1b4441; border-color:#1b4441; color:#fff8e5; }
}
@media screen and (max-width:650px) {
  #welcome { background:#fff7e7; }
  #welcome .welcome-grid { min-height:0; padding:0; gap:0; align-content:start; }
  #welcome .welcome-village {
    position:relative; z-index:0; inset:auto; grid-area:1/1; width:100%; height:clamp(128px,calc(100svh - 30rem),420px);
    background-position:55% 59%;
  }
  #welcome .welcome-card {
    width:100%; padding:22px clamp(18px,6vw,36px) 30px;
    border:0; border-top:3px solid #a77739; box-shadow:none;
  }
  #welcome .welcome-intro h1 { margin-top:12px; font-size:clamp(39px,10.5vw,61px); }
  #welcome .welcome-intro #welcome-guide { margin-top:10px; font-size:16px; }
  #welcome .welcome-form { margin-top:16px; padding-top:17px; }
}
@media (forced-colors:active) {
  #calendar .calendar-door .door-top, #calendar .calendar-door .door-caption { border:1px solid CanvasText; }
  #calendar .calendar-door:focus-visible { outline:3px solid Highlight; }
}

@media screen and (max-aspect-ratio:4/5) {
  #calendar .calendar-village, #welcome .welcome-village {
    background-image:var(--village-portrait,var(--advent-village)); background-position:50% 50%;
  }
}

.work-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px clamp(15px, 2vw, 27px);
  border: 1px solid #c7c9bc;
  background: #eeeee5;
}
.work-invite h3 {
  font: 400 clamp(21px, 2vw, 28px) / 1.1 var(--serif);
  letter-spacing: -0.035em;
  margin: 5px 0 0;
}
.work-invite .outline {
  flex-shrink: 0;
}
.work-invite .smallcap,
.thought-invite {
  color: var(--blue);
}
.thought-invite {
  border: 0;
  background: none;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: 600 14px/1.4 var(--sans);
}
.thought-invite:hover {
  color: var(--red);
  border-color: var(--red);
}
#workshop,
#thought {
  padding: 0;
  width: min(710px, calc(100% - 32px));
  max-height: min(90dvh, 900px);
  overflow: hidden;
}
#workshop[open],
#thought[open] {
  display: flex;
  flex-direction: column;
}
#workshop .dialog-head,
#thought .dialog-head {
  margin: 0;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  padding: 17px clamp(16px, 3vw, 30px) 15px;
}
#workshop .dialog-head h2,
#thought .dialog-head h2 {
  font: 400 clamp(29px, 3.6vw, 38px) / 1.05 var(--serif);
  letter-spacing: -0.043em;
  margin-top: 4px;
}
.work-scroll {
  padding: 21px clamp(16px, 3vw, 30px) 23px;
  overscroll-behavior: contain;
  overflow: auto;
  min-height: 0;
  scroll-padding-block: 12px;
}
.work-scroll > h3 {
  font: 400 clamp(24px, 2.2vw, 30px) / 1.12 var(--serif);
  letter-spacing: -0.035em;
  margin: 0 0 7px;
}
.work-scroll > p,
.thought-pair p {
  font: 400 15px/1.48 var(--sans);
  margin: 0 0 12px;
  color: #3b433d;
}
.work-scroll .work-proposal {
  font-weight: 600;
  color: var(--blue);
  margin: 10px 0 15px;
}
.work-switch {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 18px;
}
.work-switch button {
  font: 600 14px var(--sans);
  min-height: 44px;
  margin: 0 15px -1px 0;
  padding: 0 1px;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
}
.work-switch button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}
.work-scroll h4,
.work-scroll label[for],
.work-scroll legend {
  font: 650 16px/1.35 var(--sans);
  margin: 0 0 5px;
}
.work-scroll .work-hint,
.work-help p,
.work-export span {
  font: 400 14px/1.45 var(--sans);
  color: #515b52;
  margin: 3px 0 10px;
}
.work-seeds {
  display: flex;
  flex-flow: row wrap;
  gap: 5px;
  margin: 8px 0;
}
.work-seeds button {
  border: 1px solid #b5bdaf;
  background: transparent;
  font: 550 13px/1.25 var(--sans);
  padding: 7px 9px;
  min-height: 36px;
  border-radius: 2px;
}
.work-seeds button[aria-pressed="true"] {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}
#work-code {
  width: 100%;
  resize: vertical;
  min-height: 62px;
  background: #f0efe5;
  padding: 11px 13px;
  border: 1px solid #a5ac9d;
  font:
    500 15px/1.48 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0;
  border-radius: 2px;
}
#work-code[aria-invalid="true"] {
  border-color: var(--red);
}
#work-error:not(:empty) {
  color: var(--red);
  margin: 4px 0;
  font-size: 14px;
}
#code-editor {
  margin: 8px 0 13px;
}
#code-editor > summary {
  min-height: 44px;
}
.work-help {
  border: 0;
  margin: 2px 0 12px;
}
.work-help summary {
  font-size: 13px;
  padding: 7px 0;
}
.work-help p {
  margin: 5px 0;
}
.work-preview {
  border: 1px solid var(--line);
  padding: 15px;
  margin: 0 0 14px;
}
.work-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 10px;
  margin: 9px 0;
}
.work-inputs label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  font: 550 13px/1.35 var(--sans);
}
.work-inputs input {
  display: block;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  width: 100%;
}
.live-result {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  color: var(--blue);
  font-size: 14px;
}
.live-result strong {
  font-size: 21px;
  letter-spacing: -0.035em;
}
.work-export {
  display: flex;
  align-items: center;
  gap: 10px 15px;
  flex-wrap: wrap;
  padding-top: 16px;
  margin-top: 17px;
  border-top: 1px solid var(--line);
}
.work-export span {
  margin: 0;
  font-size: 12px;
}
#trials fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  margin: 10px 0;
  padding: 9px 12px;
}
#trials legend {
  font-size: 14px;
  padding: 0 4px;
}
.trial-facts {
  font: 13px/1.35 var(--sans);
  margin: 0 0 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.trial-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.trial-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  min-height: 36px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}
.trial-options input {
  width: 16px !important;
  height: 16px;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--red);
}
.trial-options label:has(:checked) {
  border-color: var(--blue);
  background: #e7eaf0;
}
.trial-verdict:not(:empty) {
  display: block;
  color: var(--blue);
  font-size: 14px;
  margin-top: 7px;
}
#trial-status:not(:empty),
#work-reflection {
  margin: 9px 0 0;
  font-size: 15px;
}
#work-reflection {
  border-left: 3px solid var(--red);
  padding: 6px 0 6px 10px;
}
.thought-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 9px 0 13px;
}
.thought-pair section {
  background: #f1efe5;
  padding: 14px 16px;
}
.thought-pair h3, .thought-prompt h3 {
  margin: 0;
  color: var(--pine);
  font: 650 14px/1.35 var(--sans);
}
.thought-pair p {
  margin: 6px 0 0;
}
.thought-prompt { margin: 20px 0 14px; }
#thought-question {
  margin: 6px 0 0;
  color: var(--pine);
  font: 400 clamp(21px, 2.6vw, 27px)/1.22 var(--serif);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.thought-link {
  font: 12px/1.4 var(--sans);
  color: var(--muted);
  display: block;
  margin-top: 15px;
}
@media screen and (max-width: 700px) {
  .work-invite {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .work-invite h3 {
    font-size: 23px;
  }
  #workshop,
  #thought {
    width: calc(100% - 18px);
    max-height: 94dvh;
  }
  .work-scroll {
    padding: 15px;
  }
  .work-invite .outline {
    min-height: 44px;
  }
}
@media screen and (max-width: 470px) {
  .thought-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .thought-pair section {
    padding: 10px 12px;
  }
  .work-export {
    align-items: flex-start;
    flex-direction: column;
  }
  .work-invite {
    gap: 12px;
  }
  .work-scroll label[for],
  .work-scroll legend {
    font-size: 15px;
  }
}

@media screen and (max-width: 350px) {
  dialog {
    max-width: calc(100vw - 16px);
  }
  .dialog-head {
    gap: 8px;
  }
  .dialog-head > :first-child {
    min-width: 0;
  }
  .dialog-head h2 {
    font-size: 26px;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  #workshop .dialog-head h2,
  #thought .dialog-head h2 {
    font-size: 26px;
  }
}
footer a {
  font-size: 12px;
  color: var(--muted);
}

.work-switch {
  flex-wrap: wrap;
}
#work-own fieldset {
  margin: 14px 0;
  padding: 0;
  min-width: 0;
  border: none;
}
#work-own legend {
  margin-bottom: 6px;
}
#work-own .work-inputs,
#revise-rule {
  margin-top: 14px;
}
#find-status:empty,
#export-status:empty,
#own-result:empty {
  display: none;
}
#own-result p,
#export-status {
  margin: 8px 0 0;
  font-size: 14px;
}
.rule-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
  margin: 15px 0 0;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.rule-comparison > div {
  background: #f1f0e8;
  padding: 10px 12px;
}
.rule-comparison dt {
  font-size: 13px;
}
.rule-comparison dd {
  margin: 3px 0 0;
  font: 400 25px/1.15 var(--serif);
  color: var(--blue);
}

@media screen and (max-width: 560px) {
  .rule-comparison {
    grid-template-columns: 1fr;
  }
  .rule-comparison > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
  }
  .rule-comparison dd {
    font-size: 22px;
    margin: 0;
  }
}

.work-calculations {
  margin: 12px 0;
}
.calculation-list {
  margin: 0;
}
.calculation-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.calculation-list dt {
  font: 400 14px/1.4 var(--sans);
  overflow-wrap: anywhere;
}
.calculation-list dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

@media screen {
  .work-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(4px, 1.1vw, 12px);
  }
  .work-switch button {
    min-width: 0;
    margin: 0 0 -1px;
    padding: 8px 2px;
    min-height: 46px;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: start;
    line-height: 1.3;
  }
  #work-edit #work-context {
    max-width: 64ch;
    font: 450 15px/1.5 var(--sans);
  }
  #continue-own { min-height: 44px; margin-top: 10px; }
  .work-seeds button { min-height: 44px; }
}

@media screen {
  #cover-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 20px;
  }
  #cover-actions .journey-controls { width: auto; }
  .share-day {
    min-height: 44px;
    padding: 5px 2px;
    background: none;
    border: 0;
    color: var(--pine);
    font: 600 .88rem/1.4 var(--sans);
    text-decoration: underline;
    text-underline-offset: .22em;
  }
  #share-panel { width: min(30rem, calc(100% - 2rem)); }
  #share-panel label { display: block; margin-bottom: .4rem; }
  .share-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .55rem;
  }
  .share-fields input { flex: 1 1 12rem; width: 100%; min-width: 0; }
  .share-fields .action { margin: 0; min-height: 44px; }
  #share-status { margin: .8rem 0 0; min-height: 1.4em; font: 550 .88rem/1.4 var(--sans); }
}
@media print { .share-day, #share-panel { display: none !important; } }

.short-door {
  --door-pine:#183d3a;
  --door-paper:#fbf7ea;
  --door-rule:#c9c4af;
  color:#243630; background:var(--door-paper);
}
.short-door-inner { margin-inline:auto; padding-block:0 clamp(25px,4.5vw,65px); }
.short-door-bar {
  display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:4px 18px;
  min-height:62px; padding-block:6px; border-bottom:1px solid var(--door-rule);
}
.short-door-bar :is(a,button) {
  display:inline-flex; align-items:center; min-height:44px; background:none; border:0;
  padding:5px 0; color:var(--door-pine); text-decoration:underline; text-underline-offset:.23em;
  text-decoration-color:#89978a; font:600 .875rem/1.3 var(--sans);
}
.door-calendar-link { gap:9px; }
.door-calendar-link::before {
  content:""; flex:0 0 8px; width:8px; height:8px; border:solid currentColor;
  border-width:0 0 1.5px 1.5px; transform:rotate(45deg);
}
.short-door-context {
  flex:1; min-width:0; display:flex; align-items:baseline; flex-wrap:wrap; gap:0 .65em;
  padding-inline:.8em; border-inline-start:1px solid var(--door-rule);
  font:650 .875rem/1.35 var(--sans); color:var(--door-pine); overflow-wrap:break-word;
}
#door-subject { font-weight:450; }
.short-door-progress {
  display:flex; align-items:center; gap:.65em; margin:clamp(18px,4vh,43px) 0 12px;
  color:#526358; font:600 .8125rem/1.25 var(--sans);
}
.short-door-progress progress {
  display:block; width:4rem; height:3px; border:0; background:#d9dacb; color:#536f5e; appearance:none;
}
.short-door-progress progress::-webkit-progress-bar { background:#d9dacb; }
.short-door-progress progress::-webkit-progress-value { background:#536f5e; }
.short-door-progress progress::-moz-progress-bar { background:#536f5e; }
.short-door h1 {
  font:400 clamp(2.35rem,4.9vw,4.3rem)/1.09 var(--serif); letter-spacing:-.042em; max-width:none;
  color:var(--door-pine); overflow-wrap:break-word; text-wrap:balance; margin:0;
}
.short-door :is(a,button,summary):focus-visible {
  outline:3px solid #285869; outline-offset:4px;
}
.short-door-opening {
  display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr); align-items:center;
  gap:clamp(24px,4.5vw,64px); padding-block:5px clamp(10px,1.6vw,26px);
}
.short-door-opening-copy { min-width:0; }
.short-door h1:focus { outline:0; }
#door-opening-action { margin-top:clamp(16px,2vw,28px); }
#door-story, #door-law {
  font:450 clamp(1.0625rem,1.6vw,1.35rem)/1.54 var(--sans); max-width:52ch;
  overflow-wrap:break-word; text-wrap:pretty;
}
#door-story { margin:clamp(15px,2vw,28px) 0 0; }
.short-door-art {
  display:block; aspect-ratio:1; background-image:var(--sheet), var(--board-sheet, none);
  background-size:var(--columns) var(--rows); background-position:var(--x) var(--y); background-repeat:no-repeat;
}
.door-art-figure {
  position:relative; margin:0; justify-self:end; width:100%; max-width:34rem;
}
.door-art-figure::before {
  content:""; position:absolute; inset:-18px; z-index:0; pointer-events:none; border-radius:16px;
  background:radial-gradient(ellipse at center, #f1cf8852 0%, #f1cf8814 52%, transparent 74%);
}
.door-art-figure .door-art-frame { position:relative; z-index:1; width:100%; max-width:none; }
.door-art-figure:has(.wide-painting) { max-width:42rem; }
#door-image {
  width:100%; max-width:none; justify-self:end; border:6px solid #fffdf6; border-radius:3px; cursor:zoom-in;
  box-shadow:0 0 0 1px #c4bea6,0 20px 46px #1430262b,0 4px 12px #14302612;
  transition:transform .28s ease, box-shadow .28s ease;
}
.door-art-frame:hover #door-image {
  transform:translateY(-2px);
  box-shadow:0 0 0 1px #b6ad8e,0 26px 54px #14302636,0 0 36px #e8c27245;
}
.door-art-caption {
  position:relative; z-index:1; margin:10px 4px 0; text-align:center;
  font:italic 400 .94rem/1.4 var(--serif); color:#4a5a50;
}
.short-door-perspectives-head {
  display:flex; align-items:center; justify-content:space-between; gap:16px 28px;
}
.short-door-perspectives-head > div { min-width:0; }
.door-perspectives-art {
  flex:0 0 auto; width:clamp(72px,7.5vw,108px); padding:3px; background:#fffdf6;
  border:1px solid #c4bea6; border-radius:3px; cursor:zoom-in;
  box-shadow:0 6px 18px #1430261f,0 0 18px #e8c27233;
  transition:transform .2s ease, box-shadow .2s ease;
}
.door-perspectives-art:hover {
  transform:translateY(-2px) scale(1.03); box-shadow:0 10px 24px #1430262b,0 0 24px #e8c27252;
}
.door-perspectives-art .short-door-art { width:100%; border-radius:1px; }
.door-perspectives-art .short-door-art.wide-painting { aspect-ratio:3 / 2; background-size:cover; }
.short-door-intro { color:#4a5a50; margin:12px 0 0; font:450 1rem/1.45 var(--sans); max-width:60ch; }
.short-door-voices {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch;
  gap:clamp(10px,1.6vw,22px); padding:0; margin:clamp(18px,2.5vw,34px) 0; list-style:none;
}
.short-door-voices li {
  border-top:3px solid #547969; background:#e9eddf; border-radius:2px;
  padding:clamp(15px,1.8vw,25px); min-width:0; box-shadow:0 2px 10px #1b362b0a;
}
.short-door-voices li:nth-child(2) { --voice-rule:#946846; border-color:var(--voice-rule); background:#f3e8d7; }
.short-door-voices li:nth-child(3) { --voice-rule:#6c8090; border-color:var(--voice-rule); background:#e6ebeb; }
.short-door-voices h2 { font:680 .95rem/1.3 var(--sans); color:#34453a; margin:0; overflow-wrap:break-word; }
.short-door-voices p {
  margin:12px 0 0; color:#20372f; font:400 clamp(1.2rem,1.8vw,1.55rem)/1.35 var(--serif);
  letter-spacing:-.018em; overflow-wrap:break-word; text-wrap:pretty;
}
.short-door-discussion {
  margin:0; max-width:58ch; padding:14px 18px; border-radius:3px;
  background:linear-gradient(135deg,#f7f1e1,#edf2e6); border:1px solid #d5ccb4; border-inline-start:4px solid #946846;
  font:600 clamp(1.02rem,1.35vw,1.18rem)/1.48 var(--sans); color:var(--door-pine);
}
.short-door-grounding-grid {
  display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,.75fr); gap:clamp(25px,5vw,70px);
  align-items:start; margin-top:clamp(15px,2.3vw,32px);
}
#door-law { margin:0; }
.short-door-ruling { border-inline-start:3px solid #7b9685; padding-inline-start:16px; margin:20px 0; }
.short-door-ruling h2 { font:650 .9rem/1.3 var(--sans); color:#4e6254; margin:0 0 5px; }
#door-ruling-summary { margin:0 0 6px; font:450 1rem/1.5 var(--sans); }
.short-door-ruling a, .short-door-sources a { color:#214f4b; text-underline-offset:.2em; overflow-wrap:anywhere; }
.short-door-sources { border-top:1px solid var(--door-rule); margin-top:20px; }
.short-door-sources summary,.short-door-flap summary { min-height:44px; cursor:pointer; }
.short-door-sources summary { padding:11px 2px; color:#31483c; font:650 .9375rem/1.4 var(--sans); }
.short-door-sources ul { list-style:none; margin:0; padding:1px 0 6px; }
.short-door-sources li { margin:0; }
.short-door-sources li a { display:inline-block; padding:6px 0; font:500 .95rem/1.42 var(--sans); }
.short-door-flap {
  margin:0; padding:14px; background:linear-gradient(145deg,#f6eed7,#efe2c0); color:var(--door-pine);
  border:1px solid #baa573; border-radius:3px; box-shadow:0 6px 20px #4836181c;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.short-door-flap[open] { background:#f3ecd9; border-color:#c9c2a8; box-shadow:0 2px 10px #35493a12; }
.short-door-flap:not([open]):hover {
  transform:translateY(-3px); box-shadow:0 12px 26px #48361826; border-color:#967c46;
}
.short-door-flap:not([open]):hover .door-flap-paper,
.short-door-flap:not([open]) summary:focus-visible .door-flap-paper {
  transform:perspective(230px) rotateY(-28deg);
}
.short-door-flap summary { display:flex; align-items:center; gap:15px; font:400 clamp(1.45rem,2vw,1.9rem)/1.1 var(--serif); }
.short-door-flap summary::-webkit-details-marker { display:none; }
.short-door-flap summary::after {
  content:""; flex:0 0 8px; width:8px; height:8px; margin-inline:auto 5px;
  border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg);
}
.short-door-flap[open] summary::after { transform:rotate(225deg); }
.door-flap-window {
  position:relative; display:block; flex:0 0 auto; width:clamp(60px,5.8vw,82px); aspect-ratio:1;
  overflow:hidden; background:#d9d3bd; border:2px solid #fffdf6; border-radius:2px;
  box-shadow:0 0 0 1px #9a9781,0 4px 12px #35493a1f;
  transition:width .28s ease;
}
#door-flap-art { width:138%; position:absolute; left:-19%; top:-19%; }
.door-flap-paper {
  position:absolute; inset:0; background:linear-gradient(135deg,#f5edd6 70%,#e1d3ac 74%,#f9f3df 85%);
  clip-path:polygon(0 0,100% 0,100% 66%,66% 100%,0 100%);
  transform-origin:left; transition:transform .38s ease; backface-visibility:hidden;
}
.door-flap-paper::after { content:""; position:absolute; inset:3px; border:1px dashed #9c9272; }
.short-door-flap[open] .door-flap-window { width:clamp(98px,9.5vw,140px); }
.short-door-flap[open] .door-flap-paper { transform:perspective(230px) rotateY(-112deg); }
#door-observation { margin:11px 4px 3px; font:500 1rem/1.48 var(--sans); overflow-wrap:break-word; text-wrap:pretty; }
.short-door-actions {
  display:flex; align-items:center; justify-content:space-between; gap:8px 18px; flex-wrap:wrap;
  border-block-start:1px solid var(--door-rule); margin-top:clamp(22px,3.7vw,48px); padding-block:14px 0;
}
.short-door-forward { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; margin-inline-start:auto; gap:7px 14px; }
.door-primary,.door-secondary { min-height:46px; font:650 .95rem/1.3 var(--sans); }
.door-primary {
  display:inline-flex; align-items:center; justify-content:center; gap:12px; text-align:start;
  padding:12px 17px; border:1px solid var(--door-pine); border-radius:3px; color:#fff9e9; background:var(--door-pine);
}
#door-next::after { content:""; display:block; flex:0 0 7px; width:7px; height:7px; border:solid currentColor; border-width:1.5px 1.5px 0 0; transform:rotate(45deg); }
.door-primary:hover { background:#28564d; }
.door-secondary { border:0; padding:8px 4px; background:none; color:var(--door-pine); text-decoration:underline; text-underline-offset:4px; }
#door-finished { color:#3c5c48; font:650 .94rem/1.35 var(--sans); margin:0; }
@media screen and (max-width:700px) {
  .short-door-bar { min-height:52px; gap:2px 12px; }
  .short-door-context { padding-inline:.6em 0; font-size:.82rem; gap:0 .45em; }
  .short-door-progress { margin-top:17px; }
  .short-door-opening { grid-template-columns:minmax(0,1fr); gap:18px; padding-bottom:0; }
  .short-door h1 { font-size:clamp(2.25rem,8.7vw,3.5rem); }
  #door-image { width:min(60%,15.5rem); justify-self:center; }
  #door-story { margin-top:12px; max-width:none; }
  .short-door-voices { grid-template-columns:minmax(0,1fr); gap:8px; margin-block:15px; }
  .short-door-voices li { border-top:0; border-inline-start:3px solid var(--voice-rule,#547969); padding:12px 14px; }
  .short-door-voices p { margin-top:3px; font-size:1.15rem; }
  .short-door-grounding-grid { grid-template-columns:minmax(0,1fr); gap:17px; }
  .short-door-flap { order:-1; padding:8px 10px; }
  .short-door-flap summary { gap:12px; }
  .short-door-actions { margin-top:20px; padding-top:10px; }
}
@media screen and (max-width:450px) {
  .short-door-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 10px; padding-block:0 8px; }
  .short-door-context { grid-row:2; grid-column:1/-1; padding:0; margin:0; border:0; }
  .door-share-link { grid-row:1; grid-column:2; justify-self:end; }
  .short-door-forward { gap:4px 9px; }
  .short-door-actions:has(#door-next[hidden]) .short-door-forward { width:100%; justify-content:space-between; }
}
@media (prefers-reduced-motion:reduce) { .door-flap-paper, .short-door-flap { transition:none; } .short-door-flap:not([open]):hover { transform:none; } }
.door-source-trail { margin:4px 0 12px; padding:12px 16px; border-inline-start:3px solid #799681; background:#edf1e8; }
.door-source-trail h2 { margin:0; font:650 1rem/1.4 var(--sans); }
.door-source-trail p { margin:.45em 0 0; max-width:62ch; font:450 1rem/1.48 var(--sans); }
#door-trail-question { font-weight:600; }
#door-explore { padding:10px 14px; margin:16px 0 0; background:#edf2e6; border:1px solid #c3ceb9; border-inline-start:3px solid #547969; }
#door-explore summary { font:650 1.02rem/1.35 var(--sans); margin:0; min-height:44px; display:flex; align-items:center; gap:10px; cursor:pointer; color:var(--door-pine); list-style:none; }
#door-explore summary::-webkit-details-marker { display:none; }
#door-explore summary::after { content:""; flex:0 0 8px; width:8px; height:8px; margin-inline:auto 4px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
#door-explore[open] summary::after { transform:rotate(225deg); }
#door-explore-action { margin:.45em 0 .2em; font:450 1rem/1.5 var(--sans); }
#door-explore a { display:inline-block; padding:.5em 0; color:#214f4b; text-underline-offset:.2em; overflow-wrap:anywhere; }
#door-explore .door-directory { margin:0; font:.87rem/1.4 var(--sans); color:#4a5a50; }
@media print {
  html[data-view=door] body > .print-sheet { display:none !important; }
  html[data-view=door] body > #door-visit:not([hidden]) { display:block !important; width:100%; margin:0; background:white; }
  .short-door-inner { padding:0; width:100%; }
  #door-visit :is(.door-source-trail p,#door-reflection) { max-width:none; }
  .short-door-bar { display:block; min-height:0; padding-bottom:5pt; }
  .short-door-context { padding:0; border:0; font-size:10pt; }
  #door-opening-action, .short-door-bar :is(button,a), .short-door-progress, .short-door-actions, .door-flap-window, .door-art-caption, .door-perspectives-art, .short-door-profile, .short-door-unlocked, .door-young-hint, .door-adult-angle { display:none !important; }
  #door-visit :is(#door-opening,#door-perspectives,#door-grounding)[hidden] { display:block !important; }
  #door-visit .short-door-opening { display:block; }
  #door-visit #door-image { display:none; }
  #door-visit h1 { margin:6pt 0 3pt; font-size:19pt; line-height:1.05; }
  #door-visit :is(#door-story,#door-law,.short-door-intro,.short-door-discussion,#door-observation) { max-width:none; margin:3pt 0; font:10pt/1.3 var(--sans); }
  .short-door-discussion { padding:0; background:none; border:0; }
  .short-door-voices { margin:4pt 0; gap:5pt; }
  .short-door-voices li { padding:5pt; border-top:1pt solid #777; box-shadow:none; }
  .short-door-voices h2, .short-door-ruling h2,.short-door-sources summary { font:600 9pt/1.2 var(--sans); }
  .short-door-voices p { font:10pt/1.3 var(--serif); margin-top:3pt; }
  .short-door-grounding-grid { display:block; margin-top:4pt; }
  .short-door-flap,.short-door-sources,.short-door-ruling { margin:4pt 0; padding:2pt; background:none; box-shadow:none; border-radius:0; }
  .short-door-flap summary,.short-door-sources summary { min-height:0; padding:1pt 0; font:650 9pt/1.2 var(--sans); }
  .short-door-flap summary::after, #door-explore summary::after { display:none; }
  #door-ruling-summary, #door-ruling-link, .short-door-sources li a { font:9pt/1.25 var(--sans); padding:0; }
}

@media print {
  .door-source-trail { background:none; margin:3pt 0; padding:2pt 6pt; }
  .door-source-trail h2,.door-source-trail p { font:9pt/1.25 var(--sans); margin:1pt 0; }
  #door-explore { margin:4pt 0 0; padding:4pt 0 0; background:none; border:0; border-top:1px solid var(--door-rule); }
  #door-explore summary, #door-explore-action, #door-explore-link, #door-explore .door-directory { margin:1pt 0; font:9pt/1.2 var(--sans); }
  #door-explore a { padding:0; }
}

/* The closed calendar keeps its square paper windows. In a story the whole painting is visible. */
.door-art-frame { justify-self:end; width:100%; }
#door-image { max-width:none; }
:is(#door-image,#illustration-square).wide-painting, #scene.wide-painting .plate {
  aspect-ratio:3 / 2; background-image:var(--whole-painting); background-size:contain;
  background-position:center; background-repeat:no-repeat;
}
#scene.wide-painting { aspect-ratio:3 / 2; }
#illustration-viewer:has(.wide-painting) {
  width:min(1100px, calc(100vw - 24px), calc((100dvh - 96px) * 1.5));
}
#door-reflection { margin:10px 4px 5px; font:600 1rem/1.5 var(--sans); }
.door-young-hint {
  margin:14px 0 0; max-width:54ch; padding:10px 14px;
  font:500 .95rem/1.48 var(--sans); color:#2e433a;
  background:#f5efe0; border-inline-start:3px solid #c99d4a; border-radius:2px;
}
.short-door-young { max-width:65ch; border-top:1px solid var(--door-rule); margin-top:1.5rem; }
.short-door-young.is-active-age {
  border:1px solid #d5c49d; border-inline-start:3px solid #c99d4a;
  background:#fbf5e6; padding:6px 14px 10px; border-radius:2px;
}
.short-door-young summary { min-height:44px; padding-block:.65em; font:620 .95rem/1.45 var(--sans); cursor:pointer; }
#door-young-text { margin:.15rem 0 .75rem; }
.door-adult-angle {
  max-width:65ch; margin-top:1.25rem; padding:14px 16px;
  background:#eef2ec; border:1px solid #c4d0c2; border-inline-start:3px solid var(--door-pine); border-radius:2px;
}
.door-adult-angle h2 { margin:0; font:650 .95rem/1.35 var(--sans); color:var(--door-pine); }
.door-adult-angle p { margin:6px 0 0; font:450 1rem/1.55 var(--sans); color:#273831; }
.short-door-profile {
  margin-top:clamp(18px,2.4vw,28px); padding:clamp(16px,2vw,22px);
  background:#f6f2e8; border:1px solid var(--door-rule); border-radius:3px;
}
.short-door-profile-head {
  display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 18px;
}
.short-door-profile h2 { margin:0; font:650 .95rem/1.35 var(--sans); color:var(--door-pine); }
.short-door-profile-fields {
  margin-top:12px; display:grid; grid-template-columns:minmax(10.5rem,14rem) minmax(0,1fr); gap:12px 18px;
}
.short-door-field { display:grid; gap:5px; min-width:0; }
.short-door-field label { font:600 .86rem/1.3 var(--sans); color:#35473e; }
.short-door-field :is(select,input) {
  width:100%; min-width:0; max-width:100%; min-height:44px; padding:8px 12px;
  font:450 1rem/1.3 var(--sans); color:var(--door-ink); background:#fffdf8;
  border:1px solid #c7c1b3; border-radius:2px; box-sizing:border-box;
}
.short-door-field :is(select,input):focus-visible { outline:2px solid var(--door-pine); outline-offset:2px; }
.short-door-profile-status { margin:10px 0 0; font:500 .92rem/1.45 var(--sans); color:#4a5b52; }
.short-door-profile-cards {
  margin-top:14px; display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap:12px 16px;
}
.short-door-insight {
  padding:13px 15px; background:#fffdf8; border:1px solid #d9d2c2; border-radius:2px; min-width:0;
}
.short-door-insight.is-local {
  border-inline-start:3px solid var(--door-pine); background:#f3f7f1; border-color:#c6d4c4;
}
.short-door-insight-kicker {
  margin:0; font:650 .78rem/1.3 var(--sans); letter-spacing:.04em; text-transform:uppercase; color:#5a6b60;
}
.short-door-insight h3 {
  margin:4px 0 0; font:650 1rem/1.35 var(--sans); color:var(--door-pine);
}
.short-door-insight p {
  margin:6px 0 0; font:450 .93rem/1.5 var(--sans); color:#2e3d36;
}
.short-door-insight-source {
  margin-top:8px; font:500 .88rem/1.4 var(--sans); color:#3d5148;
}
.short-door-insight-source a, .short-door-local-links a {
  color:#214f4b; text-underline-offset:.2em; overflow-wrap:anywhere;
}
.short-door-local-links {
  margin:8px 0 0; padding:0; list-style:none; display:grid; gap:6px;
}
.short-door-local-links li { font:500 .92rem/1.4 var(--sans); }
.short-door-local-links a { display:inline-block; padding:2px 0; }
.profile-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; }
@media screen and (max-width:640px) {
  .short-door-profile-fields { grid-template-columns:minmax(0,1fr); }
}
.short-door-unlocked {
  margin-top:clamp(20px,2.6vw,34px); padding:clamp(18px,2.2vw,26px);
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px 28px;
  background:linear-gradient(135deg,#e7efe2,#f6eed7); border:1px solid #b4c4ac; border-inline-start:4px solid var(--door-pine);
  border-radius:3px; box-shadow:0 8px 24px #183e3414;
}
.short-door-unlocked-copy { flex:1 1 28rem; min-width:0; }
.short-door-unlocked h2 { font:400 clamp(1.35rem,2.1vw,1.75rem)/1.2 var(--serif); color:var(--door-pine); margin:0; }
#door-unlocked-title::before { content:"✦ "; color:#9a6d28; font-size:.86em; }
.short-door-unlocked p { margin:8px 0 0; max-width:58ch; font:450 1rem/1.5 var(--sans); color:#2e433a; }
.short-door-unlocked-actions { display:flex; flex-wrap:wrap; gap:10px; flex-shrink:0; }
#door-deep-case::after { content:""; display:block; flex:0 0 7px; width:7px; height:7px; border:solid currentColor; border-width:1.5px 1.5px 0 0; transform:rotate(45deg); }
@keyframes door-unlocked-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
@keyframes door-art-bloom { from { opacity:0; transform:scale(.97); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: no-preference) {
  #door-opening:not([hidden]) .door-art-figure { animation:door-art-bloom .42s cubic-bezier(.22,1,.36,1) both; }
  .short-door-unlocked:not([hidden]) { animation:door-unlocked-in .28s ease-out both; }
  #door-perspectives:not([hidden]) .short-door-voices li { animation:door-unlocked-in .32s ease-out both; }
  #door-perspectives:not([hidden]) .short-door-voices li:nth-child(2) { animation-delay:.06s; }
  #door-perspectives:not([hidden]) .short-door-voices li:nth-child(3) { animation-delay:.12s; }
  .short-door-flap[open] :is(#door-observation, #door-reflection) { animation:door-unlocked-in .28s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  #door-image, .door-perspectives-art, .door-flap-window { transition:none; }
  .door-art-frame:hover #door-image, .door-perspectives-art:hover { transform:none; }
}
@media screen and (max-width:700px) {
  .door-art-figure { order:-1; width:100%; max-width:24rem; justify-self:center; }
  .door-art-figure::before { inset:-10px; }
  .door-art-frame { width:100%; justify-self:center; }
  .door-art-frame:has(.wide-painting) { width:100%; }
  #door-image { width:100%; border-width:4px; }
  .door-perspectives-art { width:68px; }
}
@media print {
  #door-visit .door-art-figure { display:none; }
  #door-visit .door-art-figure::before { display:none; }
  #door-visit:has(#door-reflection:not([hidden])) .door-art-figure {
    display:block; float:right; width:40mm; max-width:40mm; margin:0 0 3mm 4mm;
  }
  #door-visit .door-art-frame button { display:none; }
  #door-visit .door-art-frame #door-image.wide-painting { display:block; width:40mm; border:0; box-shadow:none; print-color-adjust:exact; }
  #door-perspectives { clear:both; }
  #door-reflection,#door-young-text,.short-door-young summary { font:9pt/1.23 var(--sans); margin:2pt 0; }
  .short-door-young { margin:3pt 0; max-width:none; }
  .short-door-young summary { padding:0; min-height:0; }
}

[data-painting="schulzeitung"] { --whole-painting: url(/illustrations/schulzeitung.webp); }
[data-painting="velokamera"] { --whole-painting: url(/illustrations/velokamera.webp); }
[data-painting="schulzirkus"] { --whole-painting: url(/illustrations/schulzirkus.webp); }
[data-painting="sankt-galler-globus"] { --whole-painting: url(/illustrations/sankt-galler-globus.webp); }
[data-painting="spielstrasse"] { --whole-painting: url(/illustrations/spielstrasse.webp); }
[data-painting="biberweg"] { --whole-painting: url(/illustrations/biberweg.webp); }
[data-painting="torentscheid"] { --whole-painting: url(/illustrations/torentscheid.webp); }

.calendar-discovery{max-width:68rem;margin:clamp(1rem,3vw,3rem) auto;padding:0 clamp(1rem,4vw,3rem);color:#183d33;line-height:1.55;overflow-wrap:anywhere}
.calendar-discovery h1{max-width:24ch;font:400 clamp(2.1rem,5vw,4.3rem)/1.06 Hedvig,Georgia,serif;letter-spacing:-.04em;margin:0 0 1rem}
.calendar-discovery p{max-width:64ch;margin:.65rem 0}
.calendar-discovery a{color:#174e41;text-decoration:underline;text-underline-offset:.18em}
.calendar-discovery :is(summary,a):focus-visible{outline:3px solid #a03924;outline-offset:3px}
.calendar-discovery summary{min-height:44px;cursor:pointer;padding:.55rem 0;font-weight:650;color:#23473c}
.calendar-discovery nav{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem 1rem;margin:.4rem 0}
.calendar-discovery nav a{padding:.45rem 0;min-height:44px}
.calendar-discovery ul{padding-inline-start:1.25rem}
.calendar-discovery li{margin:.5rem 0}.calendar-discovery li p{margin:0}
.calendar-discovery .worksheet-links{display:flex;flex-wrap:wrap;gap:.5rem 1rem}
html[data-view] .calendar-discovery{max-width:none;margin:0 auto 1rem;width:min(100%,79rem);padding:0 clamp(1rem,4vw,3rem);font-size:.91rem}
html[data-view] .calendar-discovery h1,html[data-view]:not([data-view=calendar]) .calendar-discovery{display:none}
@media print{.calendar-discovery{display:none!important}}

@media screen { :root {--board-first:url(/assets/board-first.251380b73a4dc7f34f20.webp); --board-stories:url(/assets/board-stories.94c1a24a53ba716ad324.webp);} #calendar-doors .door-picture {--advent-first:url(/assets/board-first.251380b73a4dc7f34f20.webp); --advent-stories:url(/assets/board-stories.94c1a24a53ba716ad324.webp);} }