:root {
  --color-bg: #F4EFE7;
  --color-surface: #FBF8F3;
  --color-surface-2: #EFE7D9;
  --color-border: #D8CBB8;
  --text-primary: #2B3137;
  --text-muted: #565F5A;
  --text-inverse: #F4EFE7;
  --text-inverse-muted: #C3CBC5;
  --accent-sage: #7F9384;
  --accent-gold-fill: #C9A25A;
  --accent-gold-ink: #9C6B24;
  --font-heading: 'Montserrat', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Manrope', -apple-system, sans-serif;
  --text-xs: 11px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 20px;
  --text-lg: 25px;
  --text-xl: 31px;
  --text-2xl: 39px;
  --text-3xl: 49px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --radius-card: 12px;
  --radius-button: 8px;
  --shadow-card: 0 1px 2px rgba(43,49,55,0.04), 0 8px 24px -12px rgba(43,49,55,0.18);
  --shadow-lift: 0 10px 30px -14px rgba(43,49,55,0.28);
  --content-measure: 62ch;
  --font-display: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
  --font-script: 'Caveat', 'Caveat Fallback', Georgia, serif;
  --motion-fast: 180ms;
  --motion-base: 280ms;
  --motion-slow: 450ms;
  --ease-motion: cubic-bezier(.22, 1, .36, 1);
  --header-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3, p { margin: 0; overflow-wrap: break-word; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-sage);
  flex: none;
}
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-button);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--accent-gold-ink);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--text-primary);
  color: var(--color-bg);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}
.btn-primary:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover, .btn-outline:hover { transform: none; }
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-gold-ink);
  outline-offset: 2px;
}
::selection { background: var(--accent-gold-fill); color: var(--text-primary); }
h1, h2, h3, .h1, .h2, .mat-title, .mat-note, .article-title, .toc-link, .eyebrow {
  text-wrap: balance;
}
p, li, .body-text {
  text-wrap: pretty;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/caveat-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/caveat-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Fallback';
  src: local('Georgia');
  font-weight: 700;
  size-adjust: 93%;
}
@font-face {
  font-family: 'Caveat Fallback';
  src: local('Georgia');
  size-adjust: 71%;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-h);
  padding-inline: clamp(16px, 3vw, 40px);
}
.site-header__brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-primary);
  line-height: 1.1;
  margin-right: auto;
}
.site-header__brand strong {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-header__tagline {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: opacity var(--motion-base) var(--ease-motion);
}
.site-header.is-compact .site-header__tagline { opacity: 0; }
.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.site-header__nav a {
  font-family: var(--font-body);
  font-size: 15px;
  text-decoration: none;
  color: var(--text-primary);
  transition: color var(--motion-fast) var(--ease-motion);
}
@media (hover: hover) and (pointer: fine) {
  .site-header__nav a:hover { color: var(--accent-gold-ink); }
}
.site-header__nav a.site-header__cta,
.site-header__nav a.site-header__cta:hover {
  color: var(--color-bg);
}
.site-header__cta {
  min-height: 44px;
}
.site-header__search {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex: none;
}
.site-header__search svg { width: 20px; height: 20px; }
.site-header__burger {
  width: 44px;
  height: 44px;
  flex: none;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.site-header__burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform var(--motion-fast) var(--ease-motion), opacity var(--motion-fast) var(--ease-motion);
}
.site-header.is-open .site-header__burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.is-open .site-header__burger span:nth-child(2) { opacity: 0; }
.site-header.is-open .site-header__burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 767px) {
  .site-header__burger { display: flex; }
  .site-header__search { display: none; }
  .site-header__nav {
    display: none;
  }
  .site-header.is-open .site-header__nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: var(--space-4);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-2);
  }
  .site-header.is-open .site-header__nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .site-header.is-open .site-header__nav .site-header__cta {
    justify-content: center;
    margin-top: var(--space-2);
  }
}
@media (min-width: 768px) {
  .site-header__burger { display: none; }
  .site-header__nav { display: flex; }
}
#segments, #personal-case { scroll-margin-top: calc(var(--header-h-live, var(--header-h)) + 8px); }
