/* Moulin de la Tourne — papier, encre & typographie */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe6d5;
  --card: #fffcf5;
  --ink: #1f1b16;
  --ink-2: #463e33;
  --muted: #776b5b;
  --line: #e0d4bf;
  --line-2: #cdbd9f;
  --accent: #a3341f;       /* rouge d'imprimerie */
  --accent-ink: #fff8ef;
  --accent-soft: #f3dfd4;
  --indigo: #24406a;       /* bleu encre */
  --gold: #a9822a;         /* dorure */
  --shadow: 0 1px 2px rgba(60, 40, 15, .06), 0 8px 24px -12px rgba(60, 40, 15, .22);
  --shadow-lg: 0 2px 4px rgba(60, 40, 15, .06), 0 22px 48px -20px rgba(60, 40, 15, .35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", "P052", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --wrap: 1200px;
  --grain: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --laid: repeating-linear-gradient(90deg, rgba(90, 66, 30, .05) 0 1px, transparent 1px 7px);
  --chain: repeating-linear-gradient(90deg, transparent 0 46px, rgba(90, 66, 30, .09) 46px 47px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #16130f;
  --paper-2: #1d1914;
  --card: #211c16;
  --ink: #f0e7d7;
  --ink-2: #d4c7b1;
  --muted: #a29581;
  --line: #352e25;
  --line-2: #4a4033;
  --accent: #e2765b;
  --accent-ink: #1a110c;
  --accent-soft: #3a2119;
  --indigo: #9db8e2;
  --gold: #d6b15f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 48px -20px rgba(0, 0, 0, .7);
  --laid: repeating-linear-gradient(90deg, rgba(255, 240, 210, .035) 0 1px, transparent 1px 7px);
  --chain: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 240, 210, .06) 46px 47px);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16130f;
    --paper-2: #1d1914;
    --card: #211c16;
    --ink: #f0e7d7;
    --ink-2: #d4c7b1;
    --muted: #a29581;
    --line: #352e25;
    --line-2: #4a4033;
    --accent: #e2765b;
    --accent-ink: #1a110c;
    --accent-soft: #3a2119;
    --indigo: #9db8e2;
    --gold: #d6b15f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 48px -20px rgba(0, 0, 0, .7);
    --laid: repeating-linear-gradient(90deg, rgba(255, 240, 210, .035) 0 1px, transparent 1px 7px);
    --chain: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 240, 210, .06) 46px 47px);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; color: var(--ink); letter-spacing: -.005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.15rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
sup { font-size: .62em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.kicker {
  margin: 0 0 .55rem; color: var(--accent); font: 600 .74rem/1.3 var(--sans);
  letter-spacing: .16em; text-transform: uppercase;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 999px; font: 600 .95rem/1 var(--sans); text-decoration: none; border: 1.5px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -10px var(--accent); }
.btn-primary:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font: 500 .86rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font: 600 .74rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.pill:hover { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------------------ header */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 3px double var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 74px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.logo-mark { width: 42px; height: 42px; flex: none; }
.logo-words { display: flex; flex-direction: column; min-width: 0; }
.logo-text { font: 600 1.32rem/1.05 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.logo-sub { font: 600 .64rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-drop > summary {
  display: inline-flex; align-items: center; gap: 4px; padding: 9px 13px; border-radius: 999px; color: var(--ink-2);
  font: 500 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; list-style: none;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.main-nav > a:hover, .nav-drop > summary:hover, .nav-drop[open] > summary { background: var(--paper-2); color: var(--ink); }
.nav-drop { position: relative; }
.nav-drop[open] svg { transform: rotate(180deg); }
.drop-panel {
  position: absolute; top: calc(100% + 10px); right: -120px; width: min(620px, 92vw); z-index: 70;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.drop-panel a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.drop-panel a small { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.drop-panel a:hover { background: var(--paper-2); color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
.menu-toggle { display: none; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; padding: 64px 0 56px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9;
  background: radial-gradient(1000px 420px at 85% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
              radial-gradient(700px 360px at -5% 110%, color-mix(in srgb, var(--indigo) 10%, transparent), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem); line-height: 1.04; letter-spacing: -.02em; margin-bottom: .45em; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero-lead { font-size: 1.14rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 0; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt { font: 600 1.7rem/1.1 var(--serif); color: var(--ink); font-variant-numeric: oldstyle-nums; }
.hero-stats dd { margin: 2px 0 0; color: var(--muted); font-size: .86rem; max-width: 15em; }
.hero-sheet { position: relative; display: flex; justify-content: center; }
.sheet {
  position: relative; width: min(100%, 380px); aspect-ratio: 3 / 4; padding: 34px 34px 28px;
  background: var(--card) var(--chain), var(--card);
  background-image: var(--chain), var(--laid);
  border-radius: 6px; box-shadow: var(--shadow-lg); transform: rotate(2.2deg);
  display: flex; flex-direction: column; justify-content: flex-end; color: var(--ink-2);
}
.sheet::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid var(--line-2); border-radius: 3px; pointer-events: none;
}
.hero-sheet::before {
  content: ""; position: absolute; width: min(100%, 380px); aspect-ratio: 3 / 4; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 6px; transform: rotate(-4deg) translate(-14px, 8px); box-shadow: var(--shadow);
}
.sheet-watermark { position: absolute; top: 26px; left: 50%; width: 62%; transform: translateX(-50%); color: var(--ink); opacity: .1; }
.sheet-steps { list-style: none; margin: 0 0 14px; padding: 0; position: relative; font: 500 1rem/1.2 var(--serif); }
.sheet-steps li { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.sheet-steps span { width: 2.2em; color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .04em; }
.sheet-foot { position: relative; margin: 0; font: 600 .68rem/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------ sections */
.home-section { margin: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; }
.section-link { flex: none; color: var(--ink-2); font: 600 .92rem/1.2 var(--sans); text-decoration: none; }
.section-link:hover { color: var(--accent); }
.empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* essentials */
.essentials { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; }
.feature {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; padding: 34px;
  border-radius: var(--radius); text-decoration: none; overflow: hidden; color: #f7efe2;
  background: radial-gradient(520px 300px at 85% 0%, rgba(226, 118, 91, .35), transparent 70%), linear-gradient(160deg, #2a2219, #15110c);
  box-shadow: var(--shadow-lg);
}
.feature::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 240, 210, .045) 0 1px, transparent 1px 7px); }
.feature-letter {
  position: absolute; top: 18px; right: 26px; font: 600 9rem/1 var(--serif); color: rgba(255, 238, 214, .12);
}
.feature .card-cat { color: #f0a58f; position: relative; }
.feature h3 { position: relative; color: #fff8ec; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.05rem); margin: 8px 0 12px; }
.feature p { position: relative; color: #d9ccb6; margin-bottom: 18px; }
.feature-more { position: relative; font: 600 .92rem/1 var(--sans); color: #f7efe2; }
.feature:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.essentials-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.essentials-list li { display: grid; grid-template-columns: 52px 1fr; gap: 2px 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.essentials-list li:first-child { padding-top: 4px; }
.ess-n { grid-row: span 2; font: 600 1.9rem/1 var(--serif); color: var(--line-2); font-variant-numeric: oldstyle-nums; }
.essentials-list a { font: 600 1.1rem/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.essentials-list a:hover { color: var(--accent); }
.ess-cat { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* ------------------------------------------------------------ cards */
.grid { display: grid; gap: 26px; }
.cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { min-width: 0; }
.card-link {
  display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card-link:hover .card-title { color: var(--accent); }
.card-art {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background-color: var(--tone, #e9dcc5); background-image: var(--chain), var(--laid);
  border-bottom: 1px solid var(--line);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.tone-0 { --tone: #eadbc2; --tone-ink: #8a3a22; }
.tone-1 { --tone: #dfe3e3; --tone-ink: #24406a; }
.tone-2 { --tone: #e9e0c6; --tone-ink: #6b5a1d; }
.tone-3 { --tone: #e6d6d2; --tone-ink: #7c2f3a; }
.tone-4 { --tone: #dde3d4; --tone-ink: #3d5a36; }
.tone-5 { --tone: #e3dce8; --tone-ink: #4a3a6a; }
:root[data-theme="dark"] .card-art { --tone: #2a241c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-art { --tone: #2a241c; } }
:root[data-theme="dark"] .lettrine { --tone-ink: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lettrine { --tone-ink: var(--accent); } }
.lettrine {
  display: grid; place-items: center; width: 92px; height: 92px; font: 600 3.4rem/1 var(--serif); color: var(--tone-ink, var(--accent));
  border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--card) 72%, transparent); transition: transform .3s ease;
}
.card-link:hover .lettrine { transform: scale(1.06) rotate(-2deg); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card-cat { color: var(--accent); font: 700 .7rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.card-title { margin: 0; font-size: 1.16rem; line-height: 1.28; transition: color .15s; }
.card-text { margin: 0; color: var(--ink-2); font-size: .94rem; line-height: 1.55; }
.card-meta { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: .8rem; }
.card-mini .card-art { aspect-ratio: 5 / 2; }
.card-mini .lettrine { width: 54px; height: 54px; font-size: 2rem; outline-offset: 3px; }
.card-mini .card-title { font-size: 1.02rem; }
.card-mini .card-body { padding: 14px 16px 16px; }

.card-row .card-link { flex-direction: row; align-items: stretch; }
.card-row .card-art { flex: 0 0 200px; aspect-ratio: auto; min-height: 168px; border-bottom: 0; border-right: 1px solid var(--line); }
.card-row .card-title { font-size: 1.3rem; }
.card-row .card-body { padding: 22px 26px; justify-content: center; }

/* ------------------------------------------------------------ catalogue des rubriques */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 26px; min-height: 118px;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink);
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 26px; background-position: 0 44px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-card::after { /* trou de fiche de bibliothèque */
  content: ""; position: absolute; bottom: 8px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line-2);
}
.cat-card:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: var(--shadow); border-color: var(--accent); }
.cat-no { color: var(--accent); font: 600 .7rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.cat-name { font: 600 1.14rem/1.25 var(--serif); }
.cat-count { color: var(--muted); font-size: .84rem; }

.about-band {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; margin: 72px 0; padding: 38px 40px;
  border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); background-image: var(--laid);
}
.about-band-mark { font: 3.4rem/1 var(--serif); color: var(--accent); }
.about-band h2 { margin-top: 4px; }
.about-band p { color: var(--ink-2); max-width: 60em; }
.about-band p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ listes */
.breadcrumbs { padding: 20px 0 6px; font-size: .86rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "›"; margin: 0 9px; color: var(--line-2); }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] span { display: inline-block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.list-head { padding: 26px 0 24px; border-bottom: 3px double var(--line); margin-bottom: 22px; }
.list-head h1 { margin-bottom: .3em; }
.list-head h1 .muted { font-weight: 400; font-size: .6em; }
.list-intro { color: var(--ink-2); font-size: 1.1rem; max-width: 46em; margin-bottom: .6em; }
.list-count { margin: 0; color: var(--muted); font-size: .88rem; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.post-list { display: grid; gap: 18px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.page-nums { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-num, .page-btn {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font: 500 .92rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.page-num:hover, .page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-num.is-current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-btn.is-disabled { opacity: .4; }
.page-gap { display: inline-grid; place-items: center; min-width: 20px; color: var(--muted); }
.page-info { text-align: center; color: var(--muted); font-size: .84rem; margin: 6px 0 0; }

/* ------------------------------------------------------------ sidebar */
.sidebar-sticky { position: sticky; top: 98px; display: grid; gap: 22px; }
.side-box, .toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 18px; }
.side-title { font: 700 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.side-list, .side-cats, .toc ol { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.side-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.side-list a { color: var(--ink); text-decoration: none; font: 500 .98rem/1.35 var(--serif); }
.side-list a:hover { color: var(--accent); }
.side-cats li a { display: flex; justify-content: space-between; padding: 7px 0; color: var(--ink-2); text-decoration: none; border-bottom: 1px dotted var(--line-2); font-size: .94rem; }
.side-cats li:last-child a { border-bottom: 0; }
.side-cats a small { color: var(--muted); font-variant-numeric: tabular-nums; }
.side-cats a:hover, .side-cats a[aria-current] { color: var(--accent); }
.side-note p { margin: 0; color: var(--ink-2); font: italic 1rem/1.5 var(--serif); }
.toc ol { counter-reset: toc; max-height: calc(100vh - 340px); overflow: auto; }
.toc li { counter-increment: toc; }
.toc a {
  display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; color: var(--ink-2); text-decoration: none; font-size: .9rem; line-height: 1.35;
}
.toc a::before { content: counter(toc, upper-roman) "."; color: var(--muted); font: 600 .78rem/1.6 var(--serif); }
.toc a:hover, .toc a.is-active { color: var(--accent); }
.toc a.is-active::before { color: var(--accent); }

/* ------------------------------------------------------------ article */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; margin-top: 10px; }
.article { min-width: 0; max-width: 760px; }
.article-head { padding: 14px 0 26px; margin-bottom: 30px; border-bottom: 3px double var(--line); }
.article-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.article-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.05rem); line-height: 1.1; letter-spacing: -.015em; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: .9rem; margin-top: 18px; }
.article-meta a { color: var(--ink); text-decoration: none; font-weight: 600; }
.article-meta a:hover { color: var(--accent); }
.byline { display: inline-flex; align-items: center; gap: 9px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 .9rem/1 var(--serif); }
.dot { color: var(--line-2); }

.answer-box { position: relative; margin: 0 0 30px; padding: 24px 26px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: var(--shadow); }
.answer-label { margin: 0 0 8px; font: 700 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.answer-text { margin: 0; font: 400 1.16rem/1.6 var(--serif); color: var(--ink); }

.figure { margin: 0 0 30px; }
.figure img { width: 100%; border-radius: var(--radius); background: var(--paper-2); }
.figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 9px 2px 0; color: var(--muted); font-size: .84rem; font-style: italic; }
.figure .credit a { color: var(--muted); }

.toc-mobile { display: none; margin: 0 0 26px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.toc-mobile summary { cursor: pointer; font: 700 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.toc-mobile ol { margin: 12px 0 0; padding-left: 22px; }
.toc-mobile li { padding: 4px 0; }
.toc-mobile a { color: var(--ink-2); text-decoration: none; }

.prose { font-size: 1.08rem; line-height: 1.75; color: var(--ink); counter-reset: sec; }
.prose > * { max-width: 100%; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose .table-wrap { margin: 0 0 1.25em; }
.prose .lead { margin-bottom: 1.4em; }
.prose .lead p:first-child { font: 400 1.24rem/1.65 var(--serif); color: var(--ink); }
.prose.has-dropcap .lead p:first-child::first-letter {
  float: left; font: 600 4.4em/.82 var(--serif); color: var(--accent); margin: .08em .1em 0 0; padding: .08em .12em .04em;
  border: 1.5px solid var(--accent); outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}
.prose h2 { counter-increment: sec; margin: 1.9em 0 .7em; font-size: clamp(1.45rem, 1.25rem + .8vw, 1.85rem); scroll-margin-top: 96px; }
.prose h2::before { content: counter(sec, upper-roman) ". "; color: var(--accent); font-weight: 500; }
.prose h3 { margin: 1.6em 0 .55em; font-size: 1.28rem; scroll-margin-top: 96px; }
.prose h4 { margin: 1.4em 0 .5em; font-size: 1.08rem; font-family: var(--sans); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose ul li::marker { color: var(--accent); content: "◆  "; font-size: .7em; }
.prose ol li::marker { color: var(--accent); font-weight: 700; font-family: var(--serif); }
.prose strong { font-weight: 650; color: var(--ink); }
.prose hr { border: 0; text-align: center; margin: 2.2em 0; height: auto; }
.prose hr::before { content: "❦"; color: var(--accent); font: 1.5rem/1 var(--serif); }
.prose blockquote { padding: 6px 0 6px 22px; border-left: 3px solid var(--accent); font: italic 1.15rem/1.6 var(--serif); color: var(--ink-2); }
.prose code { padding: .12em .4em; border-radius: 5px; background: var(--paper-2); font-size: .88em; }
.prose pre { padding: 18px 20px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line); overflow-x: auto; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; }
.prose pre code { padding: 0; background: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.5; min-width: 520px; }
.table-wrap th, .table-wrap td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--paper-2); font: 700 .78rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper-2) 45%, transparent); }

.read-also { display: flex; flex-direction: column; gap: 4px; margin: 0 0 1.6em; padding: 16px 20px; border-radius: 10px; background: var(--paper-2); border: 1px dashed var(--line-2); }
.read-also-label { font: 700 .7rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.read-also a { font: 600 1.08rem/1.35 var(--serif); color: var(--ink); text-decoration: none; }
.read-also a:hover { color: var(--accent); }

.facts, .bottom-line { margin: 36px 0; padding: 26px 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.facts h2, .bottom-line h2, .faq > h2 { font-size: 1.5rem; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 26px; }
.facts li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }
.bottom-line { background: var(--paper-2); border-left: 4px solid var(--gold); }
.bottom-line p { margin: 0; font: 1.1rem/1.65 var(--serif); }

.faq { margin: 44px 0 32px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.1rem; line-height: 1.35; }
.faq-item summary:hover h3 { color: var(--accent); }
.faq-icon { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.6px; margin: -.8px 0 0 -5px; background: var(--accent); transition: transform .2s; }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-answer { padding: 0 20px 18px; color: var(--ink-2); font-size: 1rem; line-height: 1.7; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-answer p { margin: 0 0 .8em; }
.faq-more { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; }

.article-foot { display: grid; gap: 16px; margin: 36px 0 26px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filed, .share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filed-label { font: 700 .72rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.editorial-note { color: var(--muted); font-size: .9rem; font-style: italic; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0; }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-decoration: none; transition: border-color .15s, transform .15s; }
.pn:hover { border-color: var(--accent); transform: translateY(-2px); }
.pn-next { text-align: right; }
.pn-label { color: var(--muted); font: 600 .74rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.pn-title { color: var(--ink); font: 600 1.04rem/1.35 var(--serif); }
.related { margin: 56px 0 72px; }
.ad { margin: 28px 0; text-align: center; min-height: 90px; }

/* ------------------------------------------------------------ pages */
.static-page { max-width: 820px; margin: 0 auto 72px; }
.static-head { padding: 22px 0 22px; margin-bottom: 28px; border-bottom: 3px double var(--line); }
.static-page .prose h2::before { content: none; }
.lead-p { font: 400 1.25rem/1.6 var(--serif); color: var(--ink); }
.contact-card { display: inline-flex; gap: 14px; align-items: center; padding: 16px 22px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 1.1rem; }
.contact-label { font: 700 .72rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.not-found { padding: 40px 22px 20px; }
.nf-head { position: relative; max-width: 720px; margin: 0 auto 36px; text-align: center; }
.nf-code { margin: 0; font: 600 clamp(6rem, 4rem + 8vw, 10rem)/1 var(--serif); color: transparent; -webkit-text-stroke: 1.5px var(--line-2); letter-spacing: .04em; }
.nf-head .hero-cta { justify-content: center; }
.nf-cats { justify-content: center; }

/* ------------------------------------------------------------ footer */
.site-footer { position: relative; margin-top: 40px; background: #1d1913; color: #cdbfa8; }
.footer-edge { position: absolute; top: -10px; left: 0; right: 0; height: 11px; background: #1d1913;
  -webkit-mask: radial-gradient(6px at 50% 0, #0000 97%, #000) 0 0 / 14px 11px repeat-x; mask: radial-gradient(6px at 50% 0, #0000 97%, #000) 0 0 / 14px 11px repeat-x; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding: 58px 22px 38px; }
.site-footer .logo { color: #f6ecdb; }
.site-footer .logo-sub { color: #9d8f78; white-space: normal; }
.footer-brand p { margin-top: 16px; font-size: .93rem; line-height: 1.6; color: #b5a78f; max-width: 30em; }
.footer-title { margin-bottom: 12px; font: 700 .72rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #e2765b; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #e8dcc6; text-decoration: none; font-size: .94rem; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 22px 30px; border-top: 1px solid #3a3227; font-size: .82rem; color: #998b74; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
}
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top[hidden] { display: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-layout, .list-layout { grid-template-columns: minmax(0, 1fr); }
  .article-layout .sidebar { display: none; }
  .article { margin: 0 auto; }
  .toc-mobile { display: block; }
  .list-layout .sidebar-sticky { position: static; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 18px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a, .nav-drop > summary { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .drop-panel { position: static; width: auto; grid-template-columns: 1fr 1fr; box-shadow: none; margin: 4px 0 6px; }
  .theme-toggle { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-sheet { display: none; }
  .essentials { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header-inner { min-height: 64px; gap: 10px; }
  .logo-mark { width: 36px; height: 36px; }
  .logo-text { font-size: 1.12rem; }
  .logo-sub { font-size: .56rem; letter-spacing: .14em; }
  .icon-btn { width: 40px; height: 40px; }
  .hero { padding: 40px 0 36px; }
  .hero-lead { font-size: 1.04rem; }
  .home-section { margin: 46px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cards-grid, .cards-4 { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-card { padding: 14px 14px 26px; min-height: 104px; }
  .cat-name { font-size: 1rem; }
  .feature { min-height: 320px; padding: 26px; }
  .card-row .card-link { flex-direction: column; }
  .card-row .card-art { flex: none; aspect-ratio: 5 / 2; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .card-row .card-art .lettrine { width: 60px; height: 60px; font-size: 2.2rem; }
  .card-row .card-body { padding: 16px 18px 18px; }
  .card-row .card-title { font-size: 1.15rem; }
  .list-layout .sidebar-sticky { grid-template-columns: 1fr; }
  .subnav:not(.nf-cats) { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 22px; padding: 2px 16px 6px; scrollbar-width: none; }
  .subnav:not(.nf-cats)::-webkit-scrollbar { display: none; }
  .subnav .chip { flex: none; }
  .about-band { grid-template-columns: 1fr; padding: 26px 22px; gap: 8px; }
  .prose { font-size: 1.02rem; }
  .prose .lead p:first-child { font-size: 1.12rem; }
  .prose.has-dropcap .lead p:first-child::first-letter { font-size: 3.5em; outline: 0; }
  .answer-box, .facts, .bottom-line { padding: 20px; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
  .pagination { justify-content: center; }
  .pagination .page-btn { flex: 1 1 40%; }
  .page-nums { order: -1; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; padding-top: 48px; }
  .drop-panel { grid-template-columns: 1fr; }
  .breadcrumbs [aria-current] span { max-width: 22ch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sidebar, .share, .prev-next, .related, .ad, .to-top, .progress { display: none !important; }
  body { background: #fff; }
}
