/* A Homeland in Time — Temporal Humanism design system */
:root {
  --surface: #faf8f5; --surface-raised: #ffffff; --surface-sunken: #f2eef5;
  --ink: #171324; --ink-muted: #574b62; --link: #116f64; --link-hover: #0b5049;
  --accent: #66d9c2; --on-accent: #171324; --lilac: #c1a8e7; --lilac-ink: #5e3f8f;
  --gold: #d8bb83; --gold-ink: #7a5a1e; --plum: #201329; --amethyst: #30203e;
  --line: #ddd5e3; --line-dark: #4a3a58; --muted-dark: #b9a8c6; --paper: #faf8f5;
  --font-display: 'Manrope Variable', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'Onest Variable', 'Noto Sans SC', system-ui, sans-serif;
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px;
  --container: 1200px; --measure: 68ch;
}
html:lang(zh) { --font-display: 'Noto Sans SC', 'Manrope Variable', system-ui, sans-serif; --font-body: 'Noto Sans SC', 'Onest Variable', system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 1.1875rem; line-height: 1.65; }
html:lang(zh) body { line-height: 1.8; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.dk :focus-visible { outline-color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; }
html:lang(zh) h1, html:lang(zh) h2, html:lang(zh) h3 { letter-spacing: 0 !important; line-height: 1.35; }
p { margin: 0 0 1.25rem; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 2rem; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.75rem 1rem; z-index: 10; font-weight: 600; }
.skip:focus { left: 1rem; top: 1rem; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 0.75rem; }
html:lang(zh) .eyebrow { letter-spacing: 0.04em; }
.muted { color: var(--ink-muted); }
.lead { font-size: 1.375rem; line-height: 1.55; color: var(--ink-muted); max-width: 42rem; }
.measure { max-width: var(--measure); }

/* header */
.site-header { background: var(--plum); color: var(--paper); border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--paper); text-decoration: none; font: 800 1.0625rem/1.15 var(--font-display); }
.brand:hover { color: var(--paper); }
.brand svg { flex: none; }
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: 0.9375rem; font-weight: 500; flex-wrap: wrap; }
.nav a { color: var(--paper); text-decoration: none; padding: 0.5rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.langs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--muted-dark); border-radius: 999px; }
.langs a { font: 600 0.8125rem/1 var(--font-body); padding: 0.6rem 0.7rem; border-radius: 999px; color: var(--paper); text-decoration: none; min-width: 2.5rem; text-align: center; }
.langs a[lang="zh"] { font-family: 'Noto Sans SC', var(--font-body); }
.langs a[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.langs a:hover { background: var(--amethyst); color: var(--paper); }
.langs a[aria-current="true"]:hover { background: var(--accent); color: var(--on-accent); }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 0.9rem; border: 1px solid var(--muted-dark); border-radius: var(--radius-md); font-weight: 600; font-size: 0.9375rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--amethyst); }
.menu .menu-links { display: grid; gap: 0; margin-top: 0.75rem; }
.menu .menu-links a { color: var(--paper); text-decoration: none; padding: 0.7rem 0; border-top: 1px solid var(--line-dark); font-weight: 500; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu { display: block; order: 3; flex-basis: 100%; }
  .langs { margin-left: auto; }
}

/* sections */
.section { padding: 6rem 0; }
.section-alt { background: var(--surface-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dk { background: var(--plum); color: var(--paper); }
.dk .muted, .dk .lead, .dk .eyebrow { color: var(--muted-dark); }
.dk a { color: var(--accent); }
.hero { padding: 6.5rem 0 5rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.04; max-width: 56rem; }
.hero .lead { margin-top: 1.75rem; }
.page-head { padding: 5rem 0 3.5rem; }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.06; max-width: 52rem; }
.page-head .lead { margin-top: 1.5rem; }
h2.title { font-size: clamp(1.875rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 1.25rem; max-width: 48rem; }
h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }

.actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.6rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; font-size: 1.0625rem; text-decoration: none; text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent) !important; }
.btn-primary:hover { background: #8be4d2; }
.btn-secondary { border: 1.5px solid currentColor; color: inherit !important; }
.dk .btn-secondary { color: var(--paper) !important; border-color: var(--muted-dark); }

.motif { display: block; width: 100%; height: auto; margin-top: 4rem; }
.notice { display: flex; gap: 0.9rem; align-items: flex-start; max-width: 44rem; margin-top: 3rem; padding: 1rem 1.25rem; border: 1px solid var(--line-dark); border-radius: var(--radius-md); background: var(--amethyst); font-size: 1rem; line-height: 1.6; }
.notice p { margin: 0; }
.notice b { display: block; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lilac); }
.notice .dot { flex: none; width: 12px; height: 12px; margin-top: 0.4rem; border-radius: 50%; border: 2px solid var(--lilac); }
.notice.light { background: var(--surface-raised); border-color: var(--line); }
.notice.light b { color: var(--lilac-ink); } .notice.light .dot { border-color: var(--lilac-ink); }

.grid { display: grid; gap: 1.5rem; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; align-items: start; }
@media (max-width: 900px) { .g3, .g2 { grid-template-columns: 1fr; gap: 1.5rem; } .section { padding: 4rem 0; } .hero { padding: 4rem 0 3.5rem; } .wrap { padding: 0 1.25rem; } }

.card { padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); display: flex; flex-direction: column; gap: 0.75rem; }
.card p { margin: 0; font-size: 1.0625rem; color: var(--ink-muted); }
.card .eyebrow { margin: 0; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.card.key { border: 1.5px solid var(--link); }
.card.key .eyebrow { color: var(--link); }
.card a.more { margin-top: auto; font-weight: 600; font-size: 1rem; }

.quote { margin: 5rem 0 0; padding-top: 2rem; max-width: 52rem; border-top: 2px solid var(--gold); }
.quote p { font: 700 clamp(1.5rem, 3vw, 2.125rem)/1.28 var(--font-display); letter-spacing: -0.01em; margin: 0; }
.quote footer { margin-top: 1rem; font-size: 1rem; color: var(--ink-muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { display: flex; gap: 1.25rem; }
.steps .n { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 800 1rem/1 var(--font-display); }
.steps h3 { font-size: 1.1875rem; margin-bottom: 0.25rem; }
.steps p { margin: 0; color: var(--ink-muted); }

.grade { display: inline-flex; align-items: center; gap: 0.4rem; font: 600 0.8125rem/1.3 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink); padding: 0.15rem 0.5rem 0.15rem 0.2rem; border: 1px solid var(--ink-muted); border-radius: var(--radius-sm); background: var(--surface-raised); vertical-align: middle; }
.grade i { font-style: normal; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 4px; font: 800 0.75rem/1 var(--font-display); color: var(--on-accent); }
.grade.A i { background: var(--accent); } .grade.B i { background: var(--lilac); } .grade.N i { background: var(--gold); }
.grade.C i { border: 1.5px dashed var(--ink-muted); color: var(--ink); } .grade.D i { border: 1.5px dotted var(--ink-muted); color: var(--ink-muted); }

.prose { max-width: var(--measure); }
.prose section { margin-bottom: 3.5rem; }
.prose h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 700; margin-bottom: 1rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.prose ul { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.6rem; }
.ru-block { margin-top: 1rem; padding: 2rem; border-radius: var(--radius-lg); background: var(--plum); color: var(--paper); }
.ru-block p { font-size: 1.25rem; line-height: 1.6; }
.ru-block p:last-of-type { font: 700 1.375rem/1.4 var(--font-display); margin-bottom: 0; }
.ru-block .note { font: 400 0.9375rem/1.6 var(--font-body); color: var(--muted-dark); margin-top: 1.25rem; }
.honest { padding: 1.25rem 1.5rem; border-radius: var(--radius-md); background: var(--plum); color: var(--paper); font-size: 1.0625rem; margin-bottom: 3rem; max-width: var(--measure); }

.ladder { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; gap: 0.75rem; max-width: 52rem; }
.ladder li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.ladder li p { margin: 0; font-size: 1.0625rem; }
.sources { font-size: 0.9375rem; color: var(--ink-muted); padding-left: 1.25rem; }
.sources li { margin-bottom: 0.5rem; }

.books { display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-end; }
.cover { width: 220px; aspect-ratio: 2 / 3; border-radius: 6px 12px 12px 6px; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line-dark); }
.cover.dark { background: var(--amethyst); color: var(--paper); }
.cover.light { background: var(--paper); color: var(--ink); width: 190px; }
.cover .t { font: 800 1.5rem/1.05 var(--font-display); margin: 0; }
.cover .s { font-size: 0.75rem; line-height: 1.4; margin: 0.6rem 0 0; opacity: 0.85; }
.parts { counter-reset: part; }

.founder-quote blockquote { margin: 0; font: 700 clamp(1.375rem, 2.6vw, 1.875rem)/1.32 var(--font-display); letter-spacing: -0.01em; }
.founder-quote figcaption { margin-top: 1.25rem; font-size: 1rem; color: var(--ink-muted); }

.site-footer { padding: 3.5rem 0; font-size: 0.9375rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer p { margin: 0; max-width: 34rem; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 5s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.55; } }
}
@media print { .site-header, .site-footer, .motif { display: none; } body { background: #fff; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Long Russian, Portuguese and French words must never push the page wider than a phone */
body { overflow-wrap: break-word; }
p, li, h1, h2, h3, blockquote { hyphens: auto; -webkit-hyphens: auto; }
.ladder li, .ladder li > *, .grid > *, .steps li > div { min-width: 0; }
