@font-face {
  font-family: 'Reem Kufi';
  src: url('/public/assets/reem-kufi-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #303d3c;
  --muted: #4b5c59;
  --link: #315958;
  --chalk: #f7f5ef;
  --mineral: #dce7e5;
  --clay: #eae5db;
  --leaf: #dde5db;
  --rust: #7c4c39;
  --rule: #bbc5bf;
  --shell: 1224px;
  font-family: 'Reem Kufi', 'Trebuchet MS', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--chalk); color: var(--ink); font-size: 19px; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--rust); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--rust); outline-offset: 5px; border-radius: 4px; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.23; }
h1 { font-size: 64px; letter-spacing: -.028em; max-width: 19ch; text-wrap: balance; }
h2 { font-size: 33px; letter-spacing: -.015em; }
h3 { font-size: 24px; }
p, li { max-width: 69ch; }
strong { font-weight: 600; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ''; }
.wrap { width: min(var(--shell), calc(100% - 104px)); margin-inline: auto; }
.u-muted { color: var(--muted); }
.u-measure { max-width: 66ch; }
.u-stack > * + * { margin-top: 1.1em; }
.u-small { font-size: 17px; }
.skip-link { position: fixed; z-index: 20; inset: 12px auto auto 12px; padding: 12px 18px; min-height: 48px; background: var(--chalk); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.masthead { position: relative; z-index: 5; padding-block: 26px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; min-height: 56px; gap: 15px; text-decoration: none; color: var(--ink); }
.brand-mark { display: block; width: 45px; height: 43px; border: 2px solid var(--rust); border-radius: 48% 52% 43% 57% / 48% 38% 62% 52%; transform: rotate(-12deg); position: relative; }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; border: 1px solid var(--rust); border-radius: 50%; inset: 6px 4px 8px; }
.brand-mark::after { inset: 12px 9px 12px 8px; }
.brand-name { display: block; font-size: 25px; line-height: 1.05; }
.brand-note { display: block; font-size: 16px; line-height: 1.5; margin-top: 6px; color: var(--muted); }
.site-menu { position: relative; }
.site-menu > summary { display: flex; gap: 30px; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 20px; border: 1px solid #879b94; border-radius: 28px; font-size: 18px; background: var(--chalk); }
.disclosure-mark { font-size: 25px; line-height: 1; font-weight: 400; }
details[open] > summary > .disclosure-mark { transform: rotate(45deg); }
.menu-panel { position: absolute; top: calc(100% + 14px); right: 0; width: 480px; padding: 16px 24px; background: var(--chalk); border: 1px solid var(--rule); border-radius: 24px 24px 42px 24px; box-shadow: 0 15px 25px #30413b15; }
.menu-stage + .menu-stage { border-top: 1px solid var(--rule); }
.menu-stage > summary { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.menu-stage > summary::after { content: '+'; font-size: 24px; }
.menu-stage[open] > summary::after { content: '−'; }
.menu-stage ul { list-style: none; padding: 0 0 12px; }
.menu-stage a { display: flex; align-items: center; min-height: 48px; padding: 8px 14px; border-radius: 14px; font-size: 17px; text-decoration: none; }
.menu-stage a:hover, .menu-stage a[aria-current='page'] { background: var(--mineral); }
.menu-stage a[aria-current='page']::after { content: '•'; margin-left: auto; }

.opening { margin-top: 12px; }
.hero { background: var(--mineral); border-radius: 38px 114px 42px 38px; padding: 54px 54px 44px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 16px; align-items: center; }
.hero .guide-label { font-size: 18px; color: var(--muted); margin-bottom: 18px; }
.hero h1 { font-size: 70px; max-width: 12ch; }
.hero-deck { font-size: 22px; margin-top: 27px; max-width: 35ch; }
.hero-art { align-self: center; }
.hero-art img { mix-blend-mode: multiply; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 54px; padding: 11px 24px; border-radius: 30px 30px 30px 10px; text-decoration: none; font-size: 18px; background: #315958; color: #fffdf7; }
.button:hover { background: #254746; color: #fffdf7; }
.hero .button { margin-top: 30px; }
.button .arrow { font-size: 25px; }
.scenario { font-size: 23px; line-height: 1.65; max-width: 62ch; }
.home-scenario { padding-block: 60px 48px; padding-inline: 65px; border-bottom: 1px solid var(--rule); }
.home-text { padding-top: 58px; }
.reading-layout { display: grid; grid-template-columns: 216px minmax(0, 760px); gap: 68px; align-items: start; max-width: 1090px; margin-inline: auto; }
.margin-note { padding-top: 7px; font-size: 17px; color: var(--muted); }
.margin-note .stage-word { display: block; color: var(--rust); font-size: 24px; margin-bottom: 11px; }
.margin-note .stage-dot { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--rust); border-radius: 50%; margin-right: 7px; }
.margin-note .stage-dot.is-current { background: var(--rust); }
.stage-trace { margin-bottom: 25px; }
.article-copy section { margin-bottom: 48px; }
.article-copy h2 { margin-bottom: 23px; }
.article-copy p + p { margin-top: 18px; }
.article-copy .question-list { list-style: none; padding: 0; }
.question-list li { padding: 15px 0 15px 27px; position: relative; border-bottom: 1px solid var(--rule); }
.question-list li::before { content: ''; position: absolute; left: 0; top: 29px; width: 8px; height: 8px; border-radius: 50%; background: #9b7760; }
.takeaway { background: var(--clay); border-radius: 26px 40px 28px 8px; padding: 30px 35px; margin-block: 0 42px; }
.takeaway h2 { font-size: 23px; margin-bottom: 10px; }
.takeaway p { font-size: 21px; }

.learning-path { padding-block: 60px 10px; }
.path-intro { max-width: 760px; margin: 0 0 32px 284px; }
.path-intro h2 { font-size: 36px; }
.path-row { display: grid; grid-template-columns: 216px minmax(0, 760px); gap: 68px; padding-block: 28px; border-top: 1px solid var(--rule); }
.path-row h3 { color: var(--rust); font-size: 29px; }
.path-row .path-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.path-row a { min-height: 104px; font-size: 18px; padding: 18px 14px; display: flex; align-items: center; gap: 10px; justify-content: space-between; border-radius: 18px 26px 17px 8px; background: #edece4; text-decoration: none; }
.path-row:nth-of-type(2n) a { background: var(--mineral); }
.path-row a:hover { background: #cddad5; color: var(--ink); }
.path-row a span { font-size: 22px; }
.path-row p { font-size: 17px; color: var(--muted); margin-top: 6px; }

.chapter-opening { margin-block: 12px 56px; border-radius: 36px 90px 40px 10px; background: var(--clay); padding: 44px 54px 46px; }
.chapter-opening.is-leaf { background: var(--leaf); }
.chapter-heading { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 45px; align-items: center; }
.chapter-heading img { border-radius: 50%; mix-blend-mode: multiply; }
.chapter-heading .guide-label { display: block; font-size: 17px; margin-bottom: 16px; color: var(--rust); }
.chapter-heading h1 { max-width: 18ch; font-size: 54px; }
.chapter-opening .scenario { margin-top: 30px; max-width: 70ch; font-size: 22px; }
.source-drawer { border-block: 1px solid #9cafa6; margin-top: 44px; }
.source-drawer > summary { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 15px; font-size: 20px; }
.source-body { padding-block: 8px 25px; }
.source-body > p { margin-bottom: 18px; }
.source-list { list-style: none; padding: 0; }
.source-list li { padding-block: 14px; border-top: 1px solid var(--rule); }
.source-list a { font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 48px; padding-block: 8px; }
.source-list a::after { content: '↗'; flex-shrink: 0; font-size: 24px; }
.source-list p { margin-top: 4px; }
.next-reading { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; border-top: 1px solid var(--rule); margin-top: 45px; padding-top: 22px; }
.next-reading a { min-height: 76px; padding-block: 12px; display: flex; flex-direction: column; justify-content: center; font-size: 19px; }
.next-reading .next { text-align: right; }
.next-reading a span { font-size: 16px; color: var(--muted); text-decoration: none; margin-bottom: 3px; }
.end-home { margin-top: 42px; }
.end-home .source-drawer { max-width: 760px; margin-left: 284px; }
.site-footer { margin-top: 90px; padding-block: 38px; border-top: 1px solid var(--rule); background: #e9ece5; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.footer-definition { max-width: 45ch; font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 23px; }
.footer-links a { min-height: 48px; padding-block: 10px; font-size: 17px; display: inline-flex; align-items: center; }
.not-found { min-height: 45vh; padding-block: 55px; max-width: 760px; }
.not-found h1 { font-size: 54px; margin-bottom: 30px; }
.not-found p { margin-bottom: 24px; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  .hero { padding: 40px; grid-template-columns: minmax(0,1.25fr) minmax(0,.8fr); }
  .hero h1 { font-size: 60px; }
  .reading-layout, .path-row { grid-template-columns: 165px minmax(0,1fr); gap: 42px; }
  .path-intro, .end-home .source-drawer { margin-left: 207px; }
  .chapter-heading { grid-template-columns: minmax(0,1fr) 200px; gap: 26px; }
  .chapter-heading h1 { font-size: 47px; }
  .chapter-opening { padding: 40px; }
  .path-row .path-links { gap: 8px; }
}

@media (max-width: 760px) {
  body { font-size: 18px; line-height: 1.7; }
  h2 { font-size: 29px; line-height: 1.3; }
  .wrap { width: calc(100% - 40px); }
  .masthead { flex-wrap: wrap; gap: 17px; padding-block: 22px 18px; }
  .brand { gap: 12px; }
  .brand-name { font-size: 24px; }
  .brand-note { font-size: 16px; }
  .brand-mark { width: 40px; height: 40px; }
  .site-menu { width: 100%; }
  .site-menu > summary { min-height: 50px; padding-inline: 17px; }
  .menu-panel { position: static; width: 100%; margin-top: 12px; padding: 12px 17px; box-shadow: none; }
  .menu-stage a { min-height: 50px; font-size: 17px; }
  .opening { margin-top: 3px; }
  .hero { display: block; padding: 30px 26px 18px; border-radius: 28px 63px 28px 10px; }
  .hero .guide-label { margin-bottom: 18px; font-size: 17px; }
  .hero h1 { font-size: 47px; line-height: 1.25; letter-spacing: -.025em; max-width: 12ch; }
  .hero-deck { font-size: 20px; margin-top: 23px; max-width: 28ch; }
  .hero .button { margin-top: 24px; padding-inline: 19px; width: 100%; font-size: 18px; }
  .hero-art { max-width: 265px; margin: 18px auto 0; }
  .home-scenario { padding: 34px 6px; }
  .scenario, .chapter-opening .scenario { font-size: 20px; line-height: 1.65; }
  .home-text { padding-top: 36px; }
  .reading-layout { display: block; }
  .margin-note { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
  .margin-note .stage-word { font-size: 23px; margin-bottom: 3px; }
  .stage-trace { margin-bottom: 10px; line-height: 1; }
  .article-copy section { margin-bottom: 34px; }
  .article-copy h2 { margin-bottom: 19px; }
  .article-copy p + p { margin-top: 17px; }
  .takeaway { padding: 24px; margin-block: 0 32px; }
  .takeaway p { font-size: 20px; }
  .learning-path { padding-top: 42px; }
  .path-intro { margin: 0 0 25px; }
  .path-intro h2 { font-size: 31px; }
  .path-row { display: block; padding-block: 25px; }
  .path-row h3 { font-size: 27px; }
  .path-row p { margin-bottom: 19px; }
  .path-row .path-links { display: block; }
  .path-row a { min-height: 65px; padding: 15px 18px; margin-top: 9px; font-size: 18px; }
  .chapter-opening { margin: 3px 0 34px; padding: 29px 25px; border-radius: 26px 58px 24px 8px; }
  .chapter-heading { display: block; }
  .chapter-heading h1 { font-size: 40px; max-width: 16ch; }
  .chapter-heading .guide-label { font-size: 17px; margin-bottom: 15px; }
  .chapter-heading figure { max-width: 180px; margin: 20px 0 0 auto; }
  .chapter-opening .scenario { margin-top: 22px; }
  .source-drawer { margin-top: 33px; }
  .source-drawer > summary { font-size: 19px; gap: 10px; min-height: 70px; }
  .source-list a { font-size: 17px; }
  .source-list p, .source-body > p { font-size: 17px; }
  .end-home .source-drawer { margin-left: 0; }
  .next-reading { gap: 20px; }
  .next-reading a { font-size: 18px; }
  .site-footer { margin-top: 55px; padding-block: 30px; }
  .footer-inner { display: block; }
  .footer-definition { font-size: 17px; }
  .footer-links { justify-content: flex-start; margin-top: 20px; gap: 3px 21px; }
  .footer-links a { font-size: 17px; }
  .not-found { padding-block: 35px; }
  .not-found h1 { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  .masthead, .margin-note, .next-reading, .site-footer, .hero-art, .chapter-heading figure, .learning-path, .skip-link { display: none; }
  body { background: white; color: #202a28; font-size: 16px; }
  .wrap { width: 100%; max-width: none; }
  .hero, .chapter-opening { padding: 0 0 22px; border-radius: 0; background: white; }
  .hero h1, .chapter-heading h1 { font-size: 36px; max-width: none; }
  .reading-layout { display: block; }
  .takeaway { padding: 20px; border: 1px solid #83958d; background: white; }
  .source-drawer { break-inside: avoid; }
}
