/* kamolkhon.com — 2026 redesign */

@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-cyrillic-wght-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/literata-cyrillic-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/golos-text-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/golos-text-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  color-scheme: light;
  --paper: #f5f0e6;
  --paper-2: #ece5d6;
  --ink: #1b1915;
  --ink-2: #4a443b;
  --muted: #776f62;
  --rule: #d6ccb9;
  --rule-strong: #1b1915;
  --accent: #9a2f1c;
  --accent-ink: #7d2413;
  --mark: #f0dcae;
  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Golos Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 76rem;
  --measure: 41rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #14120f; --paper-2: #1e1b16; --ink: #ebe4d5; --ink-2: #c9c0ae; --muted: #9a917f;
    --rule: #37322a; --rule-strong: #ebe4d5; --accent: #e3795f; --accent-ink: #f09a83; --mark: #57431a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14120f; --paper-2: #1e1b16; --ink: #ebe4d5; --ink-2: #c9c0ae; --muted: #9a917f;
  --rule: #37322a; --rule-strong: #ebe4d5; --accent: #e3795f; --accent-ink: #f09a83; --mark: #57431a;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.6;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--mark); color: var(--ink); }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sans { font-family: var(--sans); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 50; font-family: var(--sans); }
.skip:focus { left: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* small caps label used everywhere for meta */
.label { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.label a { text-decoration: none; }
.num { font-family: var(--sans); font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; margin-right: auto; white-space: nowrap; }
.brand svg { width: 1.35rem; height: 1.35rem; color: var(--accent); flex: none; }
.nav { font-family: var(--sans); font-size: .9375rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav a, .nav summary, .icon-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); cursor: pointer; }
.nav a:hover, .nav summary:hover, .icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav summary { list-style: none; user-select: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translateY(-2px); }
.nav details { position: relative; }
.nav details ul { position: absolute; right: 0; top: calc(100% + .5rem); display: block; min-width: 16rem; padding: .5rem; background: var(--paper); border: 1px solid var(--rule); border-radius: .75rem; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .35); }
.nav details ul a { display: flex; border-radius: .45rem; padding: .5rem .7rem; }
.icon-btn { border: 0; background: none; font: inherit; padding: .5rem; }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.menu-toggle { display: none; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
@media (max-width: 56rem) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); padding: .5rem var(--gutter) 1.25rem; max-height: calc(100dvh - 3.75rem); overflow: auto; }
  .site-head.open .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--rule); }
  .nav a, .nav summary { padding: .85rem .25rem; border-radius: 0; font-size: 1.0625rem; justify-content: space-between; width: 100%; }
  .nav a[aria-current] { box-shadow: none; color: var(--accent); }
  .nav details ul { position: static; border: 0; box-shadow: none; padding: 0 0 .5rem 1rem; min-width: 0; background: none; }
  .nav details ul a { padding: .55rem .25rem; font-size: 1rem; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 21rem); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: end; }
.hero h1 { font-size: clamp(2.9rem, 9.2vw, 7.75rem); font-weight: 400; line-height: .93; letter-spacing: -.035em; margin: .35em 0 .3em -.04em; }
.hero h1 em { font-style: italic; font-weight: 300; }
.hero .ru { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); font-style: italic; }
.hero .lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.5; max-width: 34rem; color: var(--ink-2); margin: 1.6rem 0 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; font-family: var(--sans); font-size: .9375rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.15rem; border: 1px solid var(--rule-strong); border-radius: 999px; text-decoration: none; font-weight: 500; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: 2px; filter: saturate(.9) contrast(1.02); }
.portrait figcaption { margin-top: .6rem; }
@media (max-width: 44rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 15rem; order: -1; }
}
.band { margin: 0; position: relative; }
.band img { display: block; width: 100%; height: clamp(9rem, 24vw, 19rem); object-fit: cover; object-position: 50% 35%; filter: grayscale(1) contrast(1.05) sepia(.18); }
.band figcaption { padding-top: .6rem; }

/* ---------- sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.75rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 2px solid var(--rule-strong); padding-top: .9rem; margin-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -.015em; }
.section-head .more { font-family: var(--sans); font-size: .9375rem; white-space: nowrap; text-decoration: none; color: var(--ink-2); }
.section-head .more:hover { color: var(--accent); }
.arrow::after { content: "\2192"; margin-left: .35em; display: inline-block; transition: transform .2s; }
a:hover .arrow::after, .arrow:hover::after { transform: translateX(.2em); }

/* feature */
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); }
.feature-main h3 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); letter-spacing: -.025em; line-height: 1.06; margin: .5rem 0 1rem; }
.feature-main h3 a { text-decoration: none; }
.feature-main p { font-size: 1.1875rem; color: var(--ink-2); max-width: 36rem; }
.feature-side { border-left: 1px solid var(--rule); padding-left: clamp(1rem, 3vw, 2.5rem); }
.feature-side ol { list-style: none; margin: 0; padding: 0; }
.feature-side li { padding: .95rem 0; border-bottom: 1px solid var(--rule); }
.feature-side li:first-child { padding-top: 0; }
.feature-side li:last-child { border-bottom: 0; }
.feature-side a.t { display: block; font-size: 1.1875rem; line-height: 1.3; text-decoration: none; margin-top: .25rem; }
@media (max-width: 52rem) {
  .feature { grid-template-columns: 1fr; }
  .feature-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
}

/* ---------- entry rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) minmax(8rem, 13rem); gap: .25rem 1.5rem; padding: 1.05rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.row[hidden] { display: none; }
.row .when { font-family: var(--sans); font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .title { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.28; text-decoration: none; font-weight: 500; }
.row .ex { color: var(--ink-2); font-size: .975rem; line-height: 1.5; margin: .3rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 44rem; }
.row .meta { font-family: var(--sans); font-size: .8125rem; color: var(--muted); text-align: right; line-height: 1.45; }
.row .meta a { text-decoration: none; }
.row .meta a:hover { text-decoration: underline; }
.chip { display: inline-block; font-family: var(--sans); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .12rem .4rem; border: 1px solid var(--rule); border-radius: 3px; color: var(--muted); vertical-align: .12em; margin-left: .35rem; white-space: nowrap; }
@media (max-width: 46rem) {
  .row { grid-template-columns: 1fr; gap: .15rem; }
  .row .meta { text-align: left; }
}
.year-head { display: flex; align-items: baseline; gap: 1rem; margin: 2.75rem 0 0; padding-bottom: .5rem; border-bottom: 2px solid var(--rule-strong); }
.year-head h2 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 400; letter-spacing: -.03em; font-variant-numeric: lining-nums; }
.year-head[hidden] { display: none; }

/* ---------- topics ---------- */
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 5vw, 4.5rem); }
.topics li { border-bottom: 1px solid var(--rule); }
.topics a { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: .75rem; align-items: baseline; padding: 1.05rem 0; text-decoration: none; }
.topics .n { font-family: var(--sans); font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.topics .t { font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.2; font-weight: 500; }
.topics .r { display: block; font-size: .95rem; color: var(--muted); font-style: italic; font-weight: 400; margin-top: .15rem; }
.topics .d { display: block; font-size: .95rem; color: var(--ink-2); font-weight: 400; margin-top: .4rem; line-height: 1.45; }
.topics .c { font-family: var(--sans); font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.topics a:hover .t { color: var(--accent); }
@media (max-width: 46rem) { .topics { grid-template-columns: 1fr; } }

/* ---------- books ---------- */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 2rem); }
.shelf a { text-decoration: none; display: block; }
.shelf .cover { aspect-ratio: 2 / 3; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 14px 24px -18px rgb(0 0 0 / .55); transition: transform .25s; }
.shelf .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelf .cover span { padding: 1rem; font-size: 1rem; line-height: 1.25; text-align: center; color: var(--ink-2); }
.shelf a:hover .cover { transform: translateY(-4px); }
.shelf .bt { font-size: 1rem; line-height: 1.3; margin-top: .75rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shelf .by { font-family: var(--sans); font-size: .8125rem; color: var(--muted); margin-top: .2rem; }

/* series block */
.series-block { background: var(--ink); color: var(--paper); }
.series-block .section-head { border-top-color: var(--paper); }
.series-block .label, .series-block .more { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.series-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 5vw, 4.5rem); }
.series-grid p { color: color-mix(in srgb, var(--paper) 78%, transparent); font-size: 1.125rem; max-width: 26rem; }
.series-grid ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.series-grid li { counter-increment: s; border-bottom: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.series-grid li a { display: grid; grid-template-columns: 2.5rem 1fr; padding: .9rem 0; text-decoration: none; font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.3; }
.series-grid li a::before { content: counter(s, decimal-leading-zero); font-family: var(--sans); font-size: .8125rem; color: color-mix(in srgb, var(--paper) 55%, transparent); padding-top: .3em; }
.series-grid li a:hover { color: #f3a48f; }
@media (max-width: 52rem) { .series-grid { grid-template-columns: 1fr; } }

/* ---------- page head ---------- */
.page-head { padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(1.25rem, 3vw, 2rem); }
.page-head h1 { font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 400; letter-spacing: -.03em; line-height: 1; margin-top: .5rem; }
.page-head .sub { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 40rem; margin: 1.1rem 0 0; }
.page-head .ru { font-style: italic; color: var(--muted); font-size: 1.25rem; margin-top: .6rem; }
.crumbs { font-family: var(--sans); font-size: .8125rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs span { margin-inline: .4em; opacity: .6; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; padding: .9rem 0; border-block: 1px solid var(--rule); font-family: var(--sans); font-size: .875rem; position: sticky; top: 3.75rem; background: var(--paper); z-index: 5; }
.filters .grp { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.filters .grp > span { color: var(--muted); margin-right: .35rem; }
.filters button { font: inherit; background: none; border: 1px solid var(--rule); color: var(--ink-2); border-radius: 999px; padding: .3rem .75rem; cursor: pointer; }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: .32rem .75rem; max-width: 100%; }
.filters .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 46rem) { .filters { position: static; } }

/* ---------- article ---------- */
.article-head { padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.25rem); max-width: 58rem; }
.article-head h1 { font-size: clamp(2rem, 5.2vw, 3.9rem); font-weight: 450; letter-spacing: -.028em; line-height: 1.06; margin: .9rem 0 0; }
.article-head h1.long { font-size: clamp(1.75rem, 3.9vw, 2.9rem); line-height: 1.12; }
.byline { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-top: 1.5rem; font-family: var(--sans); font-size: .875rem; color: var(--muted); }
.byline b { font-weight: 500; color: var(--ink-2); }
.article-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5.5rem); border-top: 2px solid var(--rule-strong); padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.article-grid.solo { grid-template-columns: minmax(0, 50rem); }
.aside { font-family: var(--sans); font-size: .875rem; align-self: start; position: sticky; top: 5.25rem; }
.aside section { padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--rule); }
.aside section:last-child { border-bottom: 0; }
.aside h2 { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.aside ul, .aside ol { list-style: none; margin: 0; padding: 0; }
.aside li { margin-bottom: .45rem; line-height: 1.4; }
.aside a { text-decoration: none; }
.aside a:hover { text-decoration: underline; }
.aside .here { color: var(--accent); font-weight: 500; }
.aside ol { counter-reset: p; }
.aside ol li { counter-increment: p; display: grid; grid-template-columns: 1.6rem 1fr; }
.aside ol li::before { content: counter(p); color: var(--muted); font-variant-numeric: tabular-nums; }
.taglist { display: flex; flex-wrap: wrap; gap: .4rem; }
.taglist a { border: 1px solid var(--rule); border-radius: 999px; padding: .22rem .7rem; text-decoration: none; }
.taglist a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
@media (max-width: 62rem) {
  .article-grid { grid-template-columns: minmax(0, var(--measure)); }
  .aside { position: static; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
}

.prose { font-size: clamp(1.09rem, 1.25vw, 1.2rem); line-height: 1.72; hanging-punctuation: first; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.6em; letter-spacing: -.015em; margin: 2em 0 .6em; }
.prose h3 { font-size: 1.28em; margin: 1.8em 0 .5em; }
.prose h4, .prose h5 { font-size: 1.05em; font-weight: 600; margin: 1.6em 0 .4em; }
.prose a { color: var(--accent-ink); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.6em 0; padding: .1em 0 .1em 1.25em; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 1.25rem; margin: 2.25em 0; background: center / 1.25rem no-repeat url("/assets/star.svg"); opacity: .7; }
.prose img { border-radius: 2px; }
.prose figure { margin: 1.9em 0; }
.prose figure img { display: block; }
.prose figcaption, .prose .wp-caption-text { font-family: var(--sans); font-size: .8125rem; line-height: 1.45; color: var(--muted); margin-top: .55rem; }
.prose .alignleft { float: left; margin: .35em 1.5em 1em 0; max-width: 46%; }
.prose .alignright { float: right; margin: .35em 0 1em 1.5em; max-width: 46%; }
.prose .aligncenter { margin-inline: auto; display: block; text-align: center; }
.prose .aligncenter img { margin-inline: auto; }
.prose .ta-center { text-align: center; }
.prose .ta-right { text-align: right; }
.prose .indent { padding-left: 1.75em; }
.prose h2, .prose h3, .prose hr, .prose .gallery, .prose .embed, .prose .table-wrap { clear: both; }
@media (max-width: 36rem) { .prose .alignleft, .prose .alignright { float: none; margin: 1.25em 0; max-width: 100%; } }
.prose .embed { position: relative; aspect-ratio: 16 / 9; margin: 1.9em 0; background: var(--paper-2); }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose video { display: block; width: 100%; height: auto; margin: 1.9em 0; background: #000; }
.prose audio { width: 100%; margin: 1em 0; }
.prose .table-wrap { overflow-x: auto; margin: 1.6em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92em; line-height: 1.5; }
.prose td, .prose th { padding: .55em .75em .55em 0; vertical-align: top; border-bottom: 1px solid var(--rule); text-align: left; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem; margin: 1.9em 0; }
.prose .gallery figure { margin: 0; }
.prose .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.prose .file { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1.6em 0; padding: 1rem 1.15rem; border: 1px solid var(--rule); border-radius: .5rem; font-family: var(--sans); font-size: .9375rem; }
.prose .file::before { content: "PDF"; font-size: .6875rem; font-weight: 700; letter-spacing: .08em; padding: .2rem .45rem; background: var(--accent); color: #fff; border-radius: 3px; }
.prose .file a { color: inherit; font-weight: 500; }
.prose sup { line-height: 0; }
.prose[dir="rtl"] { font-family: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, serif; line-height: 1.95; }
.prose > p:first-of-type.dropcap::first-letter { float: left; font-size: 3.55em; line-height: .82; padding: .07em .1em 0 0; font-weight: 500; color: var(--accent); }

/* page children nav */
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; font-family: var(--sans); font-size: .9375rem; }
.subnav a { border: 1px solid var(--rule); border-radius: 999px; padding: .35rem .9rem; text-decoration: none; }
.subnav a[aria-current], .subnav a:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* comments */
.comments { margin-top: clamp(2.5rem, 6vw, 4rem); max-width: var(--measure); }
.comments > h2 { font-size: 1.5rem; border-top: 2px solid var(--rule-strong); padding-top: .9rem; }
.comments > p.note { font-family: var(--sans); font-size: .875rem; color: var(--muted); margin: .4rem 0 1.25rem; }
.comment { padding: 1.15rem 0; border-top: 1px solid var(--rule); }
.comment.d2 { margin-left: 1.5rem; } .comment.d3, .comment.d4, .comment.d5 { margin-left: 3rem; }
.comment header { font-family: var(--sans); font-size: .875rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin-bottom: .5rem; }
.comment header b { font-weight: 600; }
.comment header .own { color: var(--accent); }
.comment header time { color: var(--muted); }
.comment .body { font-size: 1rem; line-height: 1.6; }
.comment .body p:last-child { margin-bottom: 0; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: clamp(2.5rem, 6vw, 4rem); border-top: 2px solid var(--rule-strong); padding-top: 1.25rem; }
.pager a { text-decoration: none; display: block; }
.pager .t { display: block; font-size: 1.2rem; line-height: 1.3; margin-top: .35rem; }
.pager .next { text-align: right; }
@media (max-width: 40rem) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* index of terms */
.index-cols { columns: 3 14rem; column-gap: clamp(1.5rem, 4vw, 3.5rem); }
.index-cols section { break-inside: avoid; margin-bottom: 2rem; }
.index-cols h2 { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); border-top: 2px solid var(--rule-strong); padding-top: .7rem; margin-bottom: .5rem; }
.index-cols ul { list-style: none; margin: 0; padding: 0; }
.index-cols li a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 1.125rem; }
.index-cols li a span:last-child { font-family: var(--sans); font-size: .8125rem; color: var(--muted); align-self: center; }
.index-cols li small { display: block; font-size: .875rem; color: var(--muted); font-style: italic; }

/* search */
.search-box { display: flex; gap: .5rem; max-width: 40rem; margin-top: 1.5rem; }
.search-box input { flex: 1; min-width: 0; font: inherit; font-size: 1.2rem; padding: .7rem 1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--rule-strong); border-radius: 0; }
.search-box input:focus { outline: 0; border-bottom-color: var(--accent); }
mark { background: var(--mark); color: inherit; padding: 0 .1em; }

/* ---------- footer ---------- */
.site-foot { margin-top: clamp(3rem, 8vw, 6rem); border-top: 2px solid var(--rule-strong); padding-block: clamp(2rem, 5vw, 3.5rem); font-family: var(--sans); font-size: .9375rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 2rem; }
.foot-grid .who { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; letter-spacing: -.01em; }
.foot-grid .who small { display: block; font-family: var(--sans); font-size: .875rem; color: var(--muted); margin-top: .6rem; letter-spacing: 0; max-width: 22rem; line-height: 1.5; }
.foot-grid h2 { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .4rem; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .8125rem; }
@media (max-width: 52rem) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid .who { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } @view-transition { navigation: none; } }
@media print {
  .site-head, .site-foot, .aside, .pager, .filters { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-grid { display: block; border: 0; }
}

/* books page + stacked entries */
.prose .entry { display: flow-root; padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.prose .entry:first-child { padding-top: 0; }
.prose .entry h2 { font-size: 1.45em; margin: 0 0 .5em; clear: none; line-height: 1.2; }
.prose .entry h2 a { text-decoration: none; color: var(--ink); }
.prose .entry h2 a:hover { color: var(--accent); }
.prose .entry img { float: left; width: 9.5rem; margin: .2rem 1.75rem .75rem 0; border: 1px solid var(--rule); box-shadow: 0 14px 24px -18px rgb(0 0 0 / .55); }
.prose .entry p { font-size: .95em; }
@media (max-width: 36rem) { .prose .entry img { width: 6.5rem; margin-right: 1rem; } }
.prose.docs ul { list-style: none; padding: 0; }
.prose.docs li { padding: .9rem 0; border-bottom: 1px solid var(--rule); margin: 0; font-size: .95em; }
.wrap-inner small { opacity: .6; font-size: .85em; margin-left: .15em; }

/* narrow header */
@media (max-width: 56rem) {
  .site-head .wrap { gap: .1rem; }
  .brand { min-width: 0; font-size: 1.0625rem; gap: .5rem; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
  .icon-btn { padding: .55rem; flex: none; }
}
@media (max-width: 22rem) { .brand svg { display: none; } }
.filters:has(.grp:only-of-type button:nth-of-type(2):last-of-type) { display: none; }
