/* Scholius: a page that reads like a well-made printed document, with notes in the margin. */
:root {
  --ink: #1b2540;
  --ink-soft: #3b4563;
  --muted: #6a6f7e;
  --paper: #f7f2e8;
  --paper-deep: #efe7d8;
  --rule: rgba(27, 37, 64, .14);
  --gold: #c8901f;
  --gold-ink: #9a640c;
  --gold-soft: #f6e7c6;
  --s4: #2f7d58; --s3: #3a7c99; --s2: #b07d27;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:lang(he), :lang(yi) { --serif: "Frank Ruhl Libre", "Fraunces", serif; --sans: "Heebo", "Inter", system-ui, sans-serif; }
/* Fraunces has no Cyrillic, Arabic or Chinese: Literata, Noto Naskh and Noto Serif SC carry the same bookish voice. */
:lang(ru) { --serif: "Literata", Georgia, serif; }
:lang(ar) { --serif: "Noto Naskh Arabic", "Fraunces", serif; --sans: "Noto Sans Arabic", "Inter", system-ui, sans-serif; }
:lang(zh) { --serif: "Noto Serif SC", "Songti SC", SimSun, serif; --sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; color: var(--ink); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip;
  background: var(--paper);
  /* Faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .12 0 0 0 0 .2 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.02em; }
:lang(he) :is(h1, h2, h3), :lang(yi) :is(h1, h2, h3) { letter-spacing: 0; font-weight: 500; }
:lang(ar) :is(h1, h2, h3), :lang(zh) :is(h1, h2, h3) { letter-spacing: 0; font-weight: 500; }
:lang(ru) :is(h1, h2, h3) { letter-spacing: -.01em; }
p, ol, ul { margin: 0; }
.page { width: min(1240px, 100% - 48px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 16px; top: 12px; z-index: 99; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 600 22px/1 "Fraunces", Georgia, serif; flex: none; }
.mark i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); top: 5px; right: 4px; }
.word { font: 500 22px/1 "Fraunces", Georgia, serif; letter-spacing: -.01em; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 500; font-size: 15px; text-decoration: none; transition: background .15s ease; }
.btn:hover { background: var(--ink-soft); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.link { font-weight: 500; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.link:hover { text-decoration-color: var(--ink); }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: rgba(247, 242, 232, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.links { display: flex; gap: 28px; }
.links a { text-decoration: none; font-size: 15px; color: var(--ink-soft); }
.links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
.actions { display: flex; align-items: center; gap: 14px; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-soft); min-height: 42px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lang ul { position: absolute; inset-inline-end: 0; top: 100%; margin-top: 6px; list-style: none; padding: 6px; min-width: 160px; max-height: calc(100vh - 84px); overflow-y: auto; background: #fffdf8; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 30px -16px rgba(27, 37, 64, .4); }
.lang li a { display: block; padding: 8px 12px; border-radius: 6px; text-decoration: none; font-family: var(--sans); }
.lang li a:hover { background: var(--paper); }
.lang li a[aria-current="page"] { color: var(--gold-ink); font-weight: 600; }

/* Section labels: a roman numeral and a quiet small-caps title, like a chapter heading */
.label { display: flex; align-items: baseline; gap: 14px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 28px; }
:lang(he) .label, :lang(yi) .label, :lang(ar) .label, :lang(zh) .label { letter-spacing: 0; font-size: 15px; }
.label span { font: italic 400 22px/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); font-family: "Fraunces", Georgia, serif; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); align-self: center; }
h2.big { font-size: clamp(36px, 5vw, 64px); line-height: 1.04; margin-bottom: 48px; }

/* Hero */
.hero { padding: 88px 0 56px; }
.kicker { font-size: 15px; color: var(--muted); margin-bottom: 26px; }
.kicker::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--gold); vertical-align: middle; margin-inline-end: 12px; }
h1 { font-size: clamp(48px, 8.2vw, 116px); line-height: .98; max-width: 11.5em; font-variation-settings: "opsz" 144; }
:lang(he) h1, :lang(yi) h1 { line-height: 1.1; font-size: clamp(44px, 7.4vw, 104px); }
:lang(ru) h1 { line-height: 1.06; font-size: clamp(42px, 7vw, 100px); font-variation-settings: "opsz" 72; }
:lang(ar) h1 { line-height: 1.4; font-size: clamp(42px, 6.6vw, 92px); }
:lang(zh) h1 { line-height: 1.2; font-size: clamp(42px, 6.8vw, 96px); }
:lang(ar) h2.big, :lang(ar) .prose h2, :lang(ar) .langs-copy h2, :lang(ar) .talk h2 { line-height: 1.45; }
:lang(zh) h2.big, :lang(zh) .prose h2, :lang(zh) .langs-copy h2, :lang(zh) .talk h2 { line-height: 1.3; }
.hero-sub { display: grid; grid-template-columns: minmax(0, 34em) auto; justify-content: space-between; align-items: end; gap: 32px 48px; margin-top: 44px; }
.lead { font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-soft); }
.cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* The product plate with margin notes */
.plate { display: grid; grid-template-columns: 170px minmax(0, 1fr) 170px; gap: 32px; margin-block: 8px 120px; }
.shot { position: relative; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--rule), 0 40px 80px -40px rgba(27, 37, 64, .45), 0 2px 6px rgba(27, 37, 64, .06); }
.shot img { width: 100%; }
.dot { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #fff; font: 600 13px/1 "Fraunces", serif; box-shadow: 0 0 0 4px rgba(200, 144, 31, .25); }
.margin { position: relative; }
.note { position: absolute; top: var(--y); inset-inline: 0; font: italic 400 15px/1.45 var(--serif); color: var(--ink-soft); padding-top: 12px; border-top: 1px solid var(--gold); }
:lang(he) .note, :lang(yi) .note, :lang(ar) .note, :lang(zh) .note { font-style: normal; font-size: 16px; }
.note sup { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 8px; border-radius: 50%; background: var(--gold); color: #fff; font: 600 11px/1 "Fraunces", serif; vertical-align: 2px; font-style: normal; }
.notes-inline { display: none; }

/* I. Problem */
.problem { padding-bottom: 130px; }
.problem-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 72px; align-items: start; }
.figure-num .num { display: block; font: 300 clamp(110px, 16vw, 210px)/.85 "Fraunces", serif; letter-spacing: -.05em; color: var(--ink); font-variation-settings: "opsz" 144; }
.figure-num .cap { display: block; margin-top: 18px; max-width: 22em; color: var(--muted); font-size: 15px; }
.boxes { display: grid; grid-template-columns: repeat(38, 1fr); gap: 3px; margin-top: 32px; max-width: 460px; }
.boxes i { aspect-ratio: 1; border-radius: 2px; background: rgba(27, 37, 64, .08); transition: background .3s ease; }
.boxes.fill i { background: var(--c); transition-delay: var(--d); }
.prose h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1.06; margin-bottom: 28px; }
.prose p { color: var(--ink-soft); font-size: 18px; }
.prose p + p { margin-top: 18px; }

/* II. How */
.how { padding-bottom: 130px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { display: grid; gap: 22px; align-content: start; }
.steps figure { margin: 0; aspect-ratio: 4 / 3.1; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--rule), 0 24px 50px -32px rgba(27, 37, 64, .45); }
.steps figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.steps h3 { display: flex; align-items: baseline; gap: 12px; font-size: 28px; }
.steps h3 span { font: italic 400 18px/1 "Fraunces", serif; color: var(--gold-ink); }
.steps p { color: var(--ink-soft); }

/* III. Contents, set like a table of contents */
.contents { padding-bottom: 130px; }
.toc { list-style: none; padding: 0; columns: 2; column-gap: 72px; }
.toc li { break-inside: avoid; display: grid; grid-template-columns: auto 1fr; gap: 4px 22px; padding: 22px 0; border-top: 1px solid var(--rule); }
.toc .n { grid-row: span 2; font: italic 400 18px/1.4 "Fraunces", serif; color: var(--gold-ink); min-width: 1.6em; }
.toc h3 { font-size: 24px; line-height: 1.25; }
.toc p { color: var(--muted); font-size: 16px; }

/* IV. Languages */
.langs { background: var(--ink); color: var(--paper); padding: 110px 0 120px; margin-bottom: 130px; }
.langs .label { color: var(--gold); }
.langs .label span { color: var(--paper); }
.langs .label::after { background: rgba(247, 242, 232, .18); }
.langs-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end; }
.langs-copy h2 { font-size: clamp(32px, 3.8vw, 50px); line-height: 1.08; }
.langs-copy p { color: #c9cddb; font-size: 18px; }

/* The same line of a report card, set in each language */
.specimen { list-style: none; padding: 0; margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); direction: ltr; border-top: 1px solid rgba(247, 242, 232, .22); border-bottom: 1px solid rgba(247, 242, 232, .22); }
.specimen li { display: flex; flex-direction: column; padding: 28px 28px 32px; border-left: 1px solid rgba(247, 242, 232, .14); min-width: 0; }
.specimen li:nth-child(4n+1) { border-left: 0; padding-left: 0; }
.specimen li:nth-child(4n) { padding-right: 0; }
.specimen li:nth-child(n+5) { border-top: 1px solid rgba(247, 242, 232, .14); }
.spec-lang { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.specimen li[dir="rtl"] .spec-lang { letter-spacing: 0; font-size: 14px; }
.spec-word { display: block; margin: 18px 0 30px; font: 400 clamp(36px, 3.5vw, 50px)/1.15 "Fraunces", Georgia, serif; letter-spacing: -.02em; color: var(--paper); white-space: nowrap; }
.specimen li[dir="rtl"] .spec-word { font-family: "Frank Ruhl Libre", serif; font-weight: 500; letter-spacing: 0; }
.spec-rows { display: grid; gap: 10px; margin-top: auto; font-size: 14.5px; }
.specimen li[dir="rtl"] .spec-rows { font-family: "Heebo", sans-serif; font-size: 15px; }
.specimen li:lang(ru) .spec-word { font-family: "Literata", Georgia, serif; font-weight: 500; letter-spacing: -.01em; }
.specimen li:lang(ar) .spec-word { font-family: "Noto Naskh Arabic", serif; font-weight: 500; }
.specimen li:lang(ar) .spec-rows, .specimen li:lang(ar) .spec-lang { font-family: "Noto Sans Arabic", sans-serif; }
.specimen li:lang(zh) .spec-word { font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-weight: 500; letter-spacing: 0; }
.specimen li:lang(zh) .spec-lang { letter-spacing: 0; font-size: 14px; }
.specimen li:lang(zh) .spec-rows, .specimen li:lang(zh) .spec-lang { font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
.spec-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(247, 242, 232, .12); color: #c9cddb; }
.spec-row i { font-style: normal; color: var(--paper); white-space: nowrap; }

/* V. Pocket */
.pocket { display: grid; grid-template-columns: 1.2fr 1fr; gap: 72px; align-items: center; padding-bottom: 130px; }
.pocket-copy p:not(.label) { color: var(--ink-soft); font-size: 18px; max-width: 30em; }
.pocket h2.big { margin-bottom: 24px; }
.phone { justify-self: center; width: min(320px, 80vw); padding: 12px; border-radius: 48px; background: #151c31; box-shadow: 0 50px 90px -40px rgba(27, 37, 64, .6); transform: rotate(-2.5deg); }
[dir="rtl"] .phone { transform: rotate(2.5deg); }
.phone img { border-radius: 37px; }

/* VI. Promises, set as a short signed letter */
.promises { padding-bottom: 120px; }
.letter { max-width: 760px; margin-inline: auto; background: #fffdf8; padding: 56px 64px; border: 1px solid var(--rule); box-shadow: 0 30px 60px -45px rgba(27, 37, 64, .5); }
.letter h2 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 28px; }
.letter ol { padding-inline-start: 1.4em; display: grid; gap: 14px; font-size: 18px; }
.letter li::marker { font: italic 400 18px "Fraunces", serif; color: var(--gold-ink); }
.sign { display: flex; align-items: center; gap: 12px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule); font: italic 400 20px/1 var(--serif); }
:lang(he) .sign, :lang(yi) .sign, :lang(ar) .sign, :lang(zh) .sign { font-style: normal; line-height: 1.3; }

/* Talk */
.talk { text-align: center; padding: 40px 0 140px; display: grid; justify-items: center; gap: 18px; }
.talk h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; max-width: 16em; }
.talk p { color: var(--ink-soft); font-size: 18px; max-width: 30em; }
.mail { margin-top: 10px; font: 400 clamp(28px, 4vw, 48px)/1.2 "Fraunces", serif; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 10px; }
.mail:hover { color: var(--gold-ink); }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 36px 0 48px; }
.foot-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 32px; }
.foot-row > p:not(.rights) { color: var(--muted); font-size: 15px; }
.foot-langs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-langs a { text-decoration: none; font-size: 15px; color: var(--ink-soft); font-family: var(--sans); }
.foot-langs a[aria-current="page"] { color: var(--gold-ink); }
.rights { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }

/* Narrower screens: margin notes move under the picture */
@media (max-width: 1180px) {
  .plate { grid-template-columns: 1fr; }
  .margin { display: none; }
  .notes-inline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; padding: 0; counter-reset: n; }
  .notes-inline li { counter-increment: n; font: italic 400 15px/1.45 var(--serif); color: var(--ink-soft); border-top: 1px solid var(--gold); padding-top: 12px; }
  :lang(he) .notes-inline li, :lang(yi) .notes-inline li, :lang(ar) .notes-inline li, :lang(zh) .notes-inline li { font-style: normal; }
  .notes-inline li::before { content: counter(n); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 8px; border-radius: 50%; background: var(--gold); color: #fff; font: 600 11px/1 "Fraunces", serif; font-style: normal; vertical-align: 2px; }
}
@media (max-width: 900px) {
  .links { display: none; }
  .hero-sub, .problem-grid, .langs-copy, .pocket { grid-template-columns: 1fr; }
  .langs-copy { gap: 20px; }
  .specimen { grid-template-columns: 1fr 1fr; }
  .specimen li:nth-child(n) { padding: 28px 28px 32px; border-left: 1px solid rgba(247, 242, 232, .14); }
  .specimen li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .specimen li:nth-child(even) { padding-right: 0; }
  .specimen li:nth-child(n+3) { border-top: 1px solid rgba(247, 242, 232, .14); }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .toc { columns: 1; }
  .notes-inline { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .page { width: calc(100% - 32px); }
  .bar { height: 58px; }
  .actions .btn { display: none; }
  .hero { padding: 48px 0 36px; }
  .plate { margin-bottom: 80px; }
  .dot { width: 18px; height: 18px; font-size: 10px; box-shadow: 0 0 0 3px rgba(200, 144, 31, .25); }
  .problem, .how, .contents, .pocket { padding-bottom: 88px; }
  .langs { padding: 72px 0 80px; margin-bottom: 88px; }
  .specimen { grid-template-columns: 1fr; margin-top: 40px; }
  .specimen li, .specimen li:nth-child(n) { border-left: 0; padding: 20px 0 22px; }
  .spec-word { margin: 10px 0 16px; font-size: 34px; }
  .specimen li + li { border-top: 1px solid rgba(247, 242, 232, .14); }
  .letter { padding: 36px 24px; }
  .foot-row { grid-template-columns: 1fr; }
}

/* The screenshot is the same picture in every language, so its margin notes stay on the same physical sides. */
.plate { direction: ltr; }
[dir="rtl"] .plate .margin, [dir="rtl"] .plate .notes-inline { direction: rtl; }

/* Log in */
.login { display: inline-flex; align-items: center; min-height: 42px; font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.login:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
