@font-face {
  font-family: 'Latin Modern';
  src: url('fonts/lmroman17-regular.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Latin Modern';
  src: url('fonts/lmroman12-italic.woff') format('woff');
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/OpenSans-Regular.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/OpenSans-Semibold.woff') format('woff');
  font-weight: 600;
  font-display: swap;
}
:root {
  --paper: #f7f1ec;
  --muted: #d5cbd9;
  --lilac: #dbc4e9;
  --line: #ede0fb32;
  --serif: 'Latin Modern', Georgia, serif;
  --gutter: max(6vw, calc((100vw - 83rem) / 2));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: #110e20;
  color: var(--paper);
  font: 1rem/1.66 'Open Sans', Arial, sans-serif;
  font-kerning: normal;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--lilac); outline-offset: 5px; }
h1, h2, h3, blockquote {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}
header, footer { display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gutter); }
header { min-height: 4.8rem; background: #100d22; position: relative; z-index: 2; border-bottom: 1px solid var(--line); }
.logo { display: block; width: clamp(10.7rem, 18.4vw, 14.5rem); }
header nav { display: flex; align-items: center; gap: clamp(1.3rem, 2.2vw, 2.3rem); font-size: .9rem; }
header nav a:hover, footer a:hover { color: var(--lilac); text-decoration: underline; text-underline-offset: .3em; }
details { position: relative; }
summary { display: flex; list-style: none; align-items: center; gap: .66rem; cursor: pointer; padding: .55rem 0 .55rem 1.6rem; border-left: 1px solid var(--line); }
summary::-webkit-details-marker { display: none; }
.menu-mark { width: 1rem; height: .4rem; border-block: 1px solid currentColor; }
.links { position: absolute; right: 0; top: calc(100% + .6rem); background: #211a30; width: min(21rem, 88vw); padding: .45rem 1.25rem; border: 1px solid var(--line); box-shadow: 0 12px 32px #08051070; }
.links a { display: block; padding: .68rem 0; }
.links a + a { border-top: 1px solid var(--line); }
.links [aria-current] { color: var(--lilac); font-weight: 600; }
footer { padding-block: 1.55rem; border-top: 1px solid var(--line); font-size: .9rem; }
footer img { display: block; width: 9rem; }
.article { width: min(100% - 2 * var(--gutter), 49rem); min-height: 70vh; margin: auto; padding-block: clamp(2.25rem, 6vw, 6rem); }
.article .back { color: var(--muted); font-size: .88rem; }
.article h1 { font-size: clamp(2.75rem, 6.2vw, 5.65rem); line-height: 1.04; letter-spacing: -.038em; margin: 1.55rem 0; }
.article p { max-width: 62ch; margin: .8rem 0 1.15rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.8; text-wrap: pretty; }
.article h1 + p { max-width: 49ch; font-size: clamp(1.18rem, 1.6vw, 1.43rem); line-height: 1.55; color: var(--paper); }
.article h2 { font-size: clamp(1.95rem, 3.1vw, 2.8rem); line-height: 1.12; margin-top: 2.25rem; letter-spacing: -.025em; }
.article blockquote { font-style: italic; font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.27; color: var(--lilac); border-left: 1px solid #b09bbb; padding-left: 1.2rem; margin: 2rem 0; }
.article .btn { margin-top: 1.2rem; }

.opening {
  display: grid;
  min-height: clamp(32rem, 41vw, 43rem);
  align-items: center;
  gap: clamp(2rem, 7vw, 7.5rem);
  padding: clamp(3rem, 6vw, 6.5rem) var(--gutter);
  background: linear-gradient(90deg, #100b24ef, #100b24b8 39%, #120b2026 76%), url('kaffebord.jpg') center 55% / cover;
}
.intro h1 { font-size: clamp(3.4rem, 6.9vw, 7.2rem); line-height: .99; letter-spacing: -.045em; }
.intro h1 em { color: #e7d5eb; font-weight: 400; }
.intro p { max-width: 37ch; margin: 1.8rem 0; font-size: clamp(1.04rem, 1.35vw, 1.25rem); color: #e3dae1; }
.read { display: inline-block; font-size: .97rem; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em; }
.read:hover, .read:focus-visible { text-decoration-thickness: 2px; }
.excerpt { background: #e7ded1; color: #30272f; padding: clamp(1.5rem, 3vw, 3.5rem); border-top: .3rem solid #99849b; }
.excerpt .source { margin: 0 0 1.35rem; font-size: .85rem; letter-spacing: .035em; }
.excerpt h2 { font-size: clamp(2.7rem, 4vw, 4.25rem); line-height: .98; letter-spacing: -.045em; }
.excerpt blockquote { font-size: clamp(1.35rem, 1.8vw, 1.85rem); line-height: 1.25; font-style: italic; margin: 1.3rem 0 .8rem; text-wrap: pretty; }
.excerpt p { margin: 0 0 1.2rem; }
.excerpt a:focus-visible, .contents a:focus-visible { outline-color: #57475e; }
.contents { padding: clamp(3rem, 5vw, 6rem) var(--gutter); background: #f4f1ed; color: #2b2530; display: grid; gap: 2rem; }
.contents h2 { font-size: clamp(2.4rem, 3.4vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.contents-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.3rem, 2.4vw, 2.8rem); }
.contents-list a { display: block; }
.contents-list img { display: block; width: 100%; aspect-ratio: 2.05; object-fit: cover; margin-bottom: 1.2rem; }
.contents > .read { justify-self: start; }
.excerpt { padding-inline: var(--gutter); }
.excerpt p, .excerpt blockquote { max-width: 52ch; }
.excerpt h2 br { display: none; }
.mail { text-decoration: underline; text-underline-offset: .25em; }
.signature strong { font-weight: 600; }
.article h1 { overflow-wrap: anywhere; }
.contents-list h3 { font-size: clamp(1.75rem, 2.5vw, 2.65rem); line-height: 1.12; letter-spacing: -.03em; }
.contents-list p { margin: .45rem 0 0; color: #514954; }
.contents-list a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.article .read { margin-top: 1rem; }
.back { text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 48rem) {
  header { min-height: 4rem; }
  header nav > a { display: none; }
  .contents-list { grid-template-columns: 1fr; gap: 2rem; }
  .opening { align-items: end; background-image: linear-gradient(0deg, #100b24fa, #100b24ba 58%, #100b242b 96%), url('kaffebord.jpg'); background-position: 65% center; }
  .intro h1 { font-size: clamp(2.8rem, 10.2vw, 4.8rem); }
  .excerpt { border-top-width: .2rem; }
  .excerpt h2 br { display: none; }
  .excerpt h2 br::after { content: ' '; }
  .contents { gap: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.guide a:not(.back) { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: #a78bb5; }
.chapter-nav { margin-block: 2rem; padding: 1rem 1.4rem; border-block: 1px solid var(--line); }
.chapter-nav ul, .references ul { padding-left: 1.2rem; margin: .4rem 0; }
.chapter-nav li { padding-block: .22rem; }
.chapter { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.guide h3 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); line-height: 1.24; text-wrap: pretty; margin: 1.8rem 0 .5rem; }
.guide .location, .guide .note, .references { color: var(--muted); font-size: .92rem; }
.guide .location { margin-top: 2.4rem; letter-spacing: .04em; }
.guide .location + h3 { margin-top: .4rem; }
.references { margin: 1.4rem 0; }
.references span, .worked strong { font-weight: 600; }
.worked { background: #221c31; border-left: 2px solid #baa2c9; margin: 1.2rem 0 2rem; padding: 1rem 1.4rem; }
.worked p { margin-bottom: 0; }
.continue { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 2rem; }
.worksheet label { display: block; margin-top: 2rem; font-weight: 600; }
.worksheet label + p { margin-top: .25rem; }
.worksheet textarea { width: 100%; padding: .8rem; font: inherit; background: #211a2e; color: var(--paper); border: 1px solid #bda8c9; border-radius: 3px; resize: vertical; }
.worksheet button { font: inherit; margin: 1.2rem 0; padding: .55rem 1rem; cursor: pointer; }
.print-answer { display: none; }
.names { columns: 2 13rem; padding-left: 1.2rem; }
footer { flex-wrap: wrap; gap: .8rem 1.4rem; }
@media print {
  body:has(.worksheet) { background: white; color: black; }
  body:has(.worksheet) :is(header, footer, .article > :not(.worksheet), .worksheet button, textarea, .worksheet h2 + p) { display: none; }
  body:has(.worksheet) .article { width: 100%; padding: 0; }
  .worksheet label { break-after: avoid; }
  .worksheet p { color: #333; }
  .print-answer { display: block; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 3rem; border-bottom: 1px solid #999; }
}
.start-button, .guide .start-button {
  display: inline-block; background: #ebdcef; color: #281c32; border-radius: .3rem;
  padding: .78rem 1.25rem; font-weight: 600; font-size: .97rem; text-decoration: none;
}
.start-button:hover { background: #fff2ff; }
.guide-panel[hidden] { display: none; }
.guide-panel h2 { margin-top: .6rem; }
.guide-panel { max-width: 42rem; }
.choices { display: grid; gap: .7rem; margin-block: 2rem; }
.choices a { display: block; border: 1px solid #77657f; border-radius: .25rem; padding: 1rem 1.2rem; }
.choices a:hover { background: #30263b; }
.guide-panel label { display: block; font-weight: 600; margin-block: 1.25rem .4rem; }
.guide-panel label small { color: var(--muted); font-weight: 400; }
.guide-panel textarea { background: #201a2d; border: 1px solid #ae98b9; color: var(--paper); width: 100%; font: inherit; padding: .85rem; border-radius: .25rem; resize: vertical; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.7rem; margin-block: 1.5rem; }
.article .guide-caption, .article .guide-footnote { font-size: .94rem; color: var(--muted); }
.article .guide-footnote { margin-top: 3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
#recap dt { color: var(--lilac); font-weight: 600; }
#recap dd { white-space: pre-wrap; overflow-wrap: anywhere; margin: .3rem 0 1.2rem; }
.exercise-audio { margin-block: 1.5rem; padding: 1rem 1.2rem; border-left: 2px solid #baa2c9; background: #221c31; }
.exercise-audio #audio-title { font-weight: 600; margin: 0 0 .65rem; }
.exercise-audio audio { display: block; width: min(100%, 28rem); }
.exercise-audio summary { display: list-item; border: 0; padding: .65rem 0 .2rem; font-size: .94rem; }

.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 5; background: #f7f1ec; color: #21152a; padding: .6rem 1rem; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.links { max-height: calc(100dvh - 5.5rem); overflow-y: auto; }
#receipt-print { font: inherit; cursor: pointer; }
@media print {
  body:has(.start-guide) { color: black; background: white; }
  body:has(.start-guide) :is(header, footer, .skip-link, .guide-footnote, .guide-actions, #recap-note, #receipt-print) { display: none; }
  .start-guide { min-height: 0; width: 100%; padding: 0; }
  .start-guide #recap dt { color: black; break-after: avoid; }
}
.situations { margin-block: 2.5rem 3rem; }
.situations details { border-bottom: 1px solid var(--line); }
.situations details:first-of-type { border-top: 1px solid var(--line); }
.situations summary { display: list-item; list-style: disclosure-closed inside; border: 0; padding: .85rem .25rem; }
.situations summary::-webkit-details-marker { display: inline; }
.situations details[open] > summary { list-style-type: disclosure-open; color: var(--lilac); }
.situations ul { margin: 0 0 1rem; padding-left: 1.6rem; }
.situations li { margin-block: .35rem; }
.story-question { margin: 1.25rem 0 1.75rem; padding: .3rem 1.15rem .55rem; border-left: 2px solid #ae98b7; }
.story-question p { color: var(--paper); font-family: var(--serif); font-size: 1.48rem; line-height: 1.3; margin: .3rem 0 .45rem; }
.story-question a { font-size: .92rem; }
.home-start, .home-more { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; }
.home-more a { text-decoration: underline; text-underline-offset: .25em; }
.story-chapter { border-top: 1px solid var(--line); }
.story-chapter:last-of-type { border-bottom: 1px solid var(--line); }
.story-chapter > summary { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.3rem 0; border: 0; }
.story-chapter > summary::after { content: ''; width: .6rem; height: .6rem; margin-right: .35rem; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); }
.story-chapter[open] > summary::after { transform: rotate(225deg); }
.story-chapter > summary h2 { margin: 0; font-size: clamp(1.65rem, 2.5vw, 2.2rem); }
.story-return { display: inline-block; margin: .5rem 0 1.75rem; }
@media (max-width: 48rem) { .intro h1 { font-size: clamp(2.4rem, 9.2vw, 4.5rem); } }

.names { list-style: none; padding: 0; columns: 2 18rem; column-gap: 2rem; }
.names li { break-inside: avoid; padding: .55rem 0; }
.names a { display: block; text-decoration: none; }
.names strong { text-decoration: underline; text-underline-offset: .15em; }
.names span { display: block; color: inherit; font-weight: normal; line-height: 1.45; }

.exercise-photo { display: block; width: 100%; height: clamp(12rem, 38vw, 22rem); object-fit: cover; margin: 1.25rem 0; }
@media print { .exercise-photo { display: none; } }

.article.contact { max-width: 41rem; }
.article.contact h1 { font-family: inherit; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; }
.contact-form { display: grid; gap: .45rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.contact-form label { font-weight: 600; margin-top: 1rem; }
.contact-form label span { color: var(--muted); font-weight: 400; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .75rem .9rem; background: #201c2f; color: var(--paper);
  font: inherit; border: 1px solid #82778b; border-radius: .25rem;
}
.contact-form textarea { resize: vertical; }
.article .contact-form p { font: inherit; font-size: .94rem; color: var(--muted); margin: .6rem 0; }
.contact-form p a { text-decoration: underline; }
.contact-form button { justify-self: start; padding: .7rem 1.3rem; border: 0; border-radius: .25rem; background: var(--paper); color: #151021; font: inherit; font-weight: 600; cursor: pointer; }
.contact-form :focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }
