:root {
  color-scheme: light;
  --paper: #f7f3eb;
  --white: #fffcf7;
  --ink: #252e25;
  --olive: #263b2f;
  --muted: #535b4f;
  --rust: #924931;
  --line: #ded8cc;
  --sage: #e6ebe0;
  --display: "PT Serif", Georgia, serif;
  --body: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.62 var(--body); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button:enabled, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; }
h2 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.045em; }
h3 { font-size: clamp(26px, 3vw, 35px); line-height: 1.17; letter-spacing: -.025em; }
.shell { width: min(100% - 96px, 1280px); margin-inline: auto; }
.section { padding-block: clamp(64px, 8vw, 110px); }
.skip-link { position: fixed; z-index: 10; top: 0; left: 12px; transform: translateY(-120%); background: var(--white); padding: 8px 16px; }
.skip-link:focus { transform: translateY(8px); }

.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 73px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.brand-mark { position: relative; width: 28px; height: 22px; flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: 3px; width: 16px; height: 16px; border: 1.5px solid var(--rust); border-radius: 50%; }
.brand-mark::before { left: 0; }
.brand-mark::after { right: 0; }
.header-inner nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 45px); color: var(--muted); font-size: 14px; }
.header-inner nav a { padding-block: 11px; }
.header-inner nav a:hover, .brand:hover, .text-link:hover { color: var(--rust); }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font-size: 14px; font-weight: 700; line-height: 1.3; }
.header-action { border-color: #bac1b3; min-height: 40px; padding-inline: 14px; white-space: nowrap; }
.header-action:hover { background: var(--sage); }
.primary { background: var(--olive); color: var(--white); }
.primary:hover { background: #385343; }
.secondary { border-color: #c7cec0; color: var(--olive); }
.secondary:enabled:hover { background: var(--sage); }
.secondary:disabled { opacity: .55; }
.text-link { display: inline-flex; gap: 8px; align-items: center; width: fit-content; font-size: 14px; font-weight: 700; }
.hero { display: grid; grid-template-columns: .91fr 1.09fr; align-items: center; gap: clamp(28px, 5vw, 76px); padding-block: clamp(42px, 5vw, 74px); }
.kicker { display: flex; align-items: center; gap: 9px; color: var(--rust); font-size: 12px; font-weight: 750; letter-spacing: .085em; text-transform: uppercase; }
.kicker span { width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
h1 { margin-block: 23px 22px; font-size: clamp(50px, 6.6vw, 102px); line-height: .96; letter-spacing: -.063em; }
h1 em { display: block; color: var(--rust); font-weight: 400; }
.hero-intro { max-width: 440px; color: var(--muted); font-size: clamp(16px, 1.55vw, 20px); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 29px; }
.hero-actions .primary { min-height: 51px; }
.hero-image { aspect-ratio: 1.28; overflow: hidden; border-radius: 14px; background: #d9c8ae; }
.hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 47%; }

.contents { background: #eee9dd; border-block: 1px solid var(--line); }
.contents-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.contents-inner a { min-height: 82px; display: flex; align-items: center; gap: 14px; padding: 10px 24px; font-size: 14px; }
.contents-inner a:first-child { padding-left: 0; }
.contents-inner a + a { border-left: 1px solid #d9d2c4; }
.contents-inner a:hover { color: var(--rust); }
.contents-inner a span:first-child { font-family: var(--display); color: var(--rust); font-size: 30px; line-height: 1; }
.contents-inner a span:last-child { margin-left: auto; color: var(--rust); }

.section-heading { display: grid; grid-template-columns: 1.22fr .78fr; gap: 24px; align-items: end; margin-bottom: 36px; }
.section-heading p, .section-note, .discussion-intro p { color: var(--muted); max-width: 420px; }
.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 58px); }
.task-grid > div, .pattern-list { border-top: 1px solid var(--line); }
.task, .pattern { border-bottom: 1px solid var(--line); }
summary { list-style: none; display: grid; grid-template-columns: 35px minmax(0, 1fr) 24px; align-items: center; gap: 9px; min-height: 68px; padding: 13px 5px; font-size: clamp(15px, 1.45vw, 18px); font-weight: 650; line-height: 1.38; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; justify-self: end; color: var(--rust); font-size: 22px; font-weight: 400; line-height: 1; }
details[open] summary::after { content: "−"; }
summary:hover, details[open] summary { color: var(--rust); }
.task-number { font-size: 12px; font-weight: 650; color: var(--rust); }
.task > div, .pattern > div { padding: 0 28px 20px 49px; color: var(--muted); font-size: 15px; }
.task .text-link { margin-top: 12px; }
.prompt { margin-top: 12px; color: var(--olive); font-weight: 600; }

.patterns-section { background: var(--sage); }
.patterns-section .shell { display: grid; grid-template-columns: .72fr 1.28fr; grid-template-areas: "intro list" "note list"; gap: 18px clamp(32px, 7vw, 100px); align-items: start; }
.patterns-section .section-heading { display: block; grid-area: intro; margin: 0; }
.patterns-section .section-heading p { margin-top: 20px; }
.pattern-list { grid-area: list; border-color: #bcc5b6; }
.pattern { border-color: #bcc5b6; }
.pattern summary { min-height: 64px; padding-inline: 4px; grid-template-columns: minmax(0, 1fr) 24px; }
.pattern > div { padding-left: 4px; }
.section-note { grid-area: note; align-self: end; font-size: 14px; }

.love-panel { display: grid; grid-template-columns: 1fr .8fr; align-items: start; gap: clamp(28px, 5.5vw, 80px); padding: clamp(25px, 4.7vw, 64px); border-radius: 16px; background: var(--olive); color: #fff9ed; }
.love-panel h2 { max-width: 580px; margin-block: 18px 24px; font-size: clamp(33px, 4.4vw, 66px); overflow-wrap: anywhere; }
.love-kicker { color: #edc9ab; }
.love-panel > div:first-child > p:not(.kicker) { max-width: 530px; color: #e5ebdf; margin-top: 13px; }
.practice { color: var(--ink); background: #f6efdf; border-radius: 12px; padding: clamp(20px, 3vw, 40px); }
.practice > p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.choices button { min-height: 44px; border: 1px solid #b9bfb0; border-radius: 6px; padding: 7px 13px; background: transparent; color: var(--olive); font-size: 14px; line-height: 1.35; }
.choices button:hover { border-color: var(--olive); }
.choices button[aria-pressed="true"] { background: var(--olive); color: white; border-color: var(--olive); }
.practice-response { min-height: 100px; padding-top: 14px; margin-top: 18px; border-top: 1px solid #d9d0bd; color: var(--muted); font-size: 15px; }
.practice .text-link { margin-top: 12px; }

.discussion-section { background: #ebe5d9; }
.discussion-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(28px, 7vw, 100px); }
.discussion-intro p { margin-top: 18px; }
.discussion { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(18px, 3.2vw, 44px); }
.discussion-status { display: grid; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 650; }
.discussion-status progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 7px; overflow: hidden; background: #e8e9e1; color: var(--olive); }
progress::-webkit-progress-bar { background: #e8e9e1; }
progress::-webkit-progress-value { background: var(--olive); }
progress::-moz-progress-bar { background: var(--olive); }
.question-body { margin-block: 24px; min-height: 215px; }
.question-topic { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--rust); }
.question-body h3 { max-width: 630px; }
.question-body h3:focus-visible { outline-offset: 5px; }
.question-body p + .button { margin-top: 16px; }
#question-hint { margin-top: 13px; max-width: 565px; color: var(--muted); font-size: 15px; }
.discussion-controls { display: flex; justify-content: space-between; gap: 10px; min-height: 46px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 80px; font-size: 14px; color: var(--muted); }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
  .header-inner { gap: 12px; }
  .header-inner nav { gap: 16px; font-size: 13px; }
  .brand { font-size: 13px; }
  .hero { gap: 30px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 117px; }
  .shell { width: calc(100% - 36px); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding-top: 9px; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; text-align: center; font-size: clamp(11px, 2.8vw, 14px); }
  .header-inner nav a { display: grid; align-items: center; min-height: 44px; padding: 4px; line-height: 1.18; }
  .brand { line-height: 1.2; }
  .hero, .section-heading, .task-grid, .love-panel, .discussion-layout { grid-template-columns: 1fr; }
  .hero { gap: 24px; padding-block: 32px 27px; }
  h1 { font-size: clamp(46px, 10.4vw, 75px); margin-block: 15px 14px; letter-spacing: -.055em; }
  .hero-intro { max-width: 520px; }
  .hero-actions { margin-top: 21px; gap: 6px 13px; }
  .hero-actions .primary { min-height: 48px; padding-inline: 13px; }
  .hero-actions .text-link { min-height: 44px; }
  .hero-image { aspect-ratio: 1.63; }
  .hero-image img { object-position: center 44%; }
  .contents-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contents-inner a, .contents-inner a:first-child { min-height: 72px; padding: 8px 5px; flex-direction: column; justify-content: center; text-align: center; font-size: clamp(11px, 2.9vw, 14px); line-height: 1.25; gap: 5px; }
  .contents-inner a span:first-child { font-size: clamp(21px, 5.5vw, 28px); }
  .contents-inner a span:last-child { display: none; }
  .section-heading { gap: 12px; margin-bottom: 22px; }
  .section { padding-block: 56px; }
  .task-grid { gap: 0; }
  .task-grid > div + div { border-top: 0; }
  summary { min-height: 61px; grid-template-columns: 30px minmax(0, 1fr) 22px; }
  .task > div { padding-left: 44px; }
  .patterns-section .shell { grid-template-columns: 1fr; grid-template-areas: "intro" "list" "note"; }
  .patterns-section .section-heading p { margin-top: 12px; }
  .love-panel { gap: 23px; }
  .love-panel h2 { margin-block: 15px 17px; }
  .discussion-intro p { margin-top: 13px; }
  .question-body { min-height: 226px; }
  .site-footer { align-items: start; padding-block: 17px; font-size: 13px; }
  .site-footer a { white-space: nowrap; }
}

@media (max-width: 350px) {
  .shell { width: calc(100% - 28px); }
  .header-action { padding-inline: 8px; font-size: 13px; gap: 5px; }
  .brand { gap: 6px; }
  .discussion-controls .button { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.arrow {
  display: inline-block;
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
  transform: rotate(-45deg);
}

.arrow.down-right { transform: rotate(45deg); }
.arrow::before, .arrow::after { position: absolute; content: ""; }
.arrow::before { top: 6px; left: 0; width: 12px; border-top: 1.5px solid currentColor; }
.arrow::after { top: 3px; right: 2px; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }

.pair-panel { margin-top: 1.5rem; }
.pair-panel fieldset { margin: 1rem 0; padding: 0; border: 0; min-width: 0; }
.pair-panel legend, .pair-panel label { display: block; margin-bottom: .5rem; }
.pair-panel input[type=checkbox] { margin-inline-end: .5rem; }
.pair-panel textarea { display: block; width: 100%; min-height: 6rem; padding: .75rem; margin: .4rem 0 1rem; font: inherit; border: 1px solid #767676; border-radius: .5rem; }
.pair-panel .pair-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pair-panel article { border-block-start: 1px solid #76767655; padding-block: 1rem; }
.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pair-grid p { white-space: pre-wrap; overflow-wrap: anywhere; }
.pair-panel select { max-width: 100%; padding: .5rem; font: inherit; }
@media (max-width: 520px) { .pair-grid { grid-template-columns: 1fr; } }
