/* Pençenari Konfederasyonu Derneği — design system (docs/SPEC.md §6).
   Sections: fonts · tokens · base · layout · type · ornaments · buttons · header · announcement ·
   page hero · cards · forms · feedback · tabs/table/pagination/chips/stats · prose · modal ·
   cookie banner · toasts · CTA band · footer · misc · motion · print */

/* ---------- Fonts (self-hosted, latin + latin-ext; Turkish needs both) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-wght-normal.woff2?v=3100e775e8) 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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext-wght-normal.woff2?v=34b9c504ca) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-wght-italic.woff2?v=7291b5970d) 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: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext-wght-italic.woff2?v=71254244cc) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-400-normal.woff2?v=1fe9ad5d8b) 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 Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-ext-400-normal.woff2?v=b13dce3420) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-600-normal.woff2?v=5d2286941a) 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 Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-ext-600-normal.woff2?v=cf96856237) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-700-normal.woff2?v=28453852ea) 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 Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-ext-700-normal.woff2?v=edb9f5d879) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-400-italic.woff2?v=eabce94d4a) 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 Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/playfair-display-latin-ext-400-italic.woff2?v=b02fdf18a2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --navy-950: #000A1A;
  --navy-900: #001027;
  --navy-800: #0A1F3F;
  --navy-700: #13305C;
  --navy-600: #1E437A;
  --red-800: #6E0004;
  --red-700: #880105;
  --red-600: #A5121A;
  --red-500: #C42A2F;
  --cream-50: #FDFAF7;
  --cream-100: #F8F1EB;
  --cream-200: #F4E5DE;
  --cream-300: #E9D5C8;
  --brass-500: #B08D57;
  --brass-300: #D8BF95;
  --brass-700: #7A5A2B;
  --ink-900: #14171F;
  --ink-700: #3A4150;
  --ink-500: #6B7280;
  --ink-300: #D5D8DE;
  --ink-100: #F2F3F5;
  --success: #15803D;
  --warning: #B45309;
  --danger: #B91C1C;
  --info: #1D4ED8;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;

  --shadow-sm: 0 1px 2px rgba(0, 16, 39, .06), 0 1px 1px rgba(0, 16, 39, .03);
  --shadow: 0 1px 2px rgba(0, 16, 39, .05), 0 10px 24px -8px rgba(0, 16, 39, .14);
  --shadow-lg: 0 2px 6px rgba(0, 16, 39, .05), 0 28px 56px -16px rgba(0, 16, 39, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 220ms;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: clamp(1rem, .97rem + .16vw, 1.0625rem);
  --fs-lg: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  --fs-h4: clamp(1.125rem, 1.08rem + .2vw, 1.25rem);
  --fs-h3: clamp(1.3rem, 1.18rem + .55vw, 1.625rem);
  --fs-h2: clamp(1.85rem, 1.42rem + 1.85vw, 2.75rem);
  --fs-h1: clamp(2.2rem, 1.55rem + 2.9vw, 3.9rem);
  --fs-display: clamp(2.6rem, 1.5rem + 4.8vw, 5.25rem);
  --section-space: clamp(56px, 2.5rem + 4vw, 100px);

  /* Semantic (light context) */
  --bg: var(--cream-50);
  --surface: #FFFFFF;
  --surface-2: var(--cream-100);
  --text: var(--ink-900);
  --text-2: var(--ink-700);
  --text-muted: #5D6472;
  --heading: var(--navy-900);
  --link: var(--red-700);
  --link-hover: var(--navy-900);
  --eyebrow: var(--red-700);
  --border: #E8DCD2;
  --border-strong: #94897F;
  --focus-ring: var(--red-600);
  --outline-border: rgba(0, 16, 39, .3);
  --outline-hover-bg: var(--navy-900);
  --outline-hover-fg: var(--cream-50);
  --ghost-hover-bg: rgba(0, 16, 39, .06);

  --kilim-band: url(/assets/img/patterns/kilim-band.svg?v=b938e6448e);
  --kilim-tile: url(/assets/img/patterns/kilim-tile.svg?v=f00a2e5a5f);
  --ornament: url(/assets/img/patterns/ornament.svg?v=1a8b3e9439);
  --medallion: url(/assets/img/patterns/medallion.svg?v=15f8fe78ca);
}

@media (min-width: 1100px) {
  :root { --header-h: 80px; }
}

/* Dark contexts re-map the semantic tokens so components adapt automatically. */
.section--navy, .section--red, .page-hero, .cta-band, .site-footer, .topbar, .announcement, .is-dark {
  --text: var(--cream-100);
  --text-2: rgba(248, 241, 235, .88);
  --text-muted: rgba(248, 241, 235, .74);
  --heading: var(--cream-50);
  --link: var(--brass-300);
  --link-hover: #FFFFFF;
  --eyebrow: var(--brass-300);
  --border: rgba(244, 229, 222, .16);
  --focus-ring: var(--brass-300);
  --outline-border: rgba(244, 229, 222, .5);
  --outline-hover-bg: var(--cream-50);
  --outline-hover-fg: var(--navy-900);
  --ghost-hover-bg: rgba(255, 255, 255, .1);
  color: var(--text);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
  overflow-x: clip;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-scroll-locked { overflow: hidden; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
main { flex: 1 0 auto; display: block; }
main:focus { outline: none; }
[hidden] { display: none !important; }
/* Auth-aware visibility (app.js sets html.auth-user / html.auth-staff) */
html:not(.auth-user) [data-auth="user"],
html:not(.auth-staff) [data-auth="staff"],
html.auth-user [data-auth="guest"] { display: none !important; }

:where(h1, h2, h3, h4, h5, h6) {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--heading);
  text-wrap: balance;
}
:where(h1) { font-size: var(--fs-h1); letter-spacing: -.02em; }
:where(h2) { font-size: var(--fs-h2); }
:where(h3) { font-size: var(--fs-h3); line-height: 1.25; }
:where(h4) { font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -.005em; }
:where(h5, h6) { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; line-height: 1.4; }
:where(p, ul, ol, dl, blockquote, figure, pre, table) { margin: 0 0 1em; }
:where(p) { text-wrap: pretty; }
:where(a) {
  color: var(--link);
  text-decoration-thickness: from-font;
  text-underline-offset: .18em;
  transition: color var(--dur) var(--ease);
}
:where(a:hover) { color: var(--link-hover); }
:where(strong, b) { font-weight: 650; }
:where(small) { font-size: var(--fs-xs); }
:where(hr) { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
img, picture, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(button) { cursor: pointer; }
:where(table) { border-collapse: collapse; }
:where(address) { font-style: normal; }
::selection { background: rgba(136, 1, 5, .16); color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -.22em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 12px;
  z-index: 200;
  padding: .75rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: var(--cream-50);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}
.skip-link:focus { top: 12px; color: var(--cream-50); }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.container--wide { max-width: calc(1400px + 2 * var(--gutter)); }

.section { position: relative; padding-block: var(--section-space); }
.section--tight { padding-block: calc(var(--section-space) * .6); }
.section--flush-top { padding-top: 0; }
.section--cream { background: var(--cream-100); }
.section--white { background: var(--surface); }
.section--navy, .section--red { isolation: isolate; overflow: hidden; }
.section--navy { background: linear-gradient(170deg, var(--navy-900) 0%, var(--navy-950) 100%); }
.section--red { background: linear-gradient(160deg, var(--red-700) 0%, var(--red-800) 100%); }
.section--navy::before, .section--red::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--cream-200);
  -webkit-mask: var(--kilim-tile) 0 0 / 88px 88px repeat;
  mask: var(--kilim-tile) 0 0 / 88px 88px repeat;
  opacity: .045;
  pointer-events: none;
}
.section--red::before { opacity: .07; }

.grid {
  display: grid;
  gap: var(--grid-gap, clamp(16px, 1rem + 1vw, 28px));
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stack > * { margin-block: 0; }
.stack > * + * { margin-block-start: var(--stack-space, 1rem); }
.stack--sm { --stack-space: .5rem; }
.stack--lg { --stack-space: 2rem; }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-space, .75rem);
}
.cluster--center { justify-content: center; }
.cluster--between { justify-content: space-between; }
.cluster--end { justify-content: flex-end; }

.split {
  display: grid;
  gap: clamp(28px, 1rem + 4vw, 80px);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--reverse > :first-child { order: 2; }
  .split--top { align-items: start; }
}

.text-center { text-align: center; }
.text-center .lead, .text-center .section-title { margin-inline: auto; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 .85rem;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.eyebrow::before,
.section-head--center .eyebrow::after,
.text-center .eyebrow::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--brass-500);
  transform: rotate(45deg);
}
.section--navy .eyebrow::before, .section--red .eyebrow::before, .page-hero .eyebrow::before, .cta-band .eyebrow::before,
.section--navy .eyebrow::after, .section--red .eyebrow::after { background: var(--brass-300); }

.section-head { max-width: 760px; margin-bottom: clamp(28px, 1.25rem + 2.5vw, 56px); }
.section-head--center, .text-center .section-head { margin-inline: auto; text-align: center; }
.section-head > :last-child { margin-bottom: 0; }
.section-title { font-size: var(--fs-h2); margin: 0 0 .35em; }
.section-head--center .section-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 24px;
  margin: .55em auto 0;
  background: var(--ornament) center / contain no-repeat;
}
.section-head .lead { margin-top: .85rem; }
.section-head--center .lead { margin-inline: auto; }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 62ch;
}
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.025em;
}
.serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 400; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}
.link-arrow::after {
  content: "→";
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--link-hover); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Ornaments ---------- */
.divider-kilim {
  display: block;
  height: 14px;
  margin: 0;
  border: 0;
  background: var(--kilim-band) left center / auto 100% repeat-x;
}
.divider-kilim--thin { height: 8px; }

.ornament {
  position: relative;
  height: 24px;
  max-width: 520px;
  margin: 2rem auto;
  background: var(--ornament) center / 120px 24px no-repeat;
}
.ornament::before, .ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 58px);
  height: 1px;
}
.ornament::before { left: 0; background: linear-gradient(to right, transparent, var(--brass-500)); }
.ornament::after { right: 0; background: linear-gradient(to left, transparent, var(--brass-500)); }

.media-frame { position: relative; isolation: isolate; }
.media-frame > img, .media-frame > picture img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.media-frame::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  border: 1.5px solid var(--brass-500);
  border-radius: var(--radius-lg);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--heading);
  --btn-bd: transparent;
  --btn-bg-hover: var(--btn-bg);
  --btn-fg-hover: var(--btn-fg);
  --btn-bd-hover: var(--btn-bd);
  --btn-shadow: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 46px;
  padding: .66rem 1.35rem;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
  border-color: var(--btn-bd-hover);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.15em; height: 1.15em; }

.btn--primary {
  --btn-bg: var(--red-700);
  --btn-fg: var(--cream-50);
  --btn-bd: var(--red-700);
  --btn-bg-hover: var(--red-800);
  --btn-bd-hover: var(--red-800);
  --btn-fg-hover: #FFFFFF;
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(110, 0, 4, .22), 0 8px 18px -8px rgba(136, 1, 5, .55);
}
.btn--navy {
  --btn-bg: var(--navy-900);
  --btn-fg: var(--cream-50);
  --btn-bd: var(--navy-900);
  --btn-bg-hover: var(--navy-700);
  --btn-bd-hover: var(--navy-700);
  --btn-fg-hover: #FFFFFF;
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 2px rgba(0, 16, 39, .2), 0 8px 18px -8px rgba(0, 16, 39, .45);
}
.btn--outline {
  --btn-fg: var(--heading);
  --btn-bd: var(--outline-border);
  --btn-bg-hover: var(--outline-hover-bg);
  --btn-fg-hover: var(--outline-hover-fg);
  --btn-bd-hover: var(--outline-hover-bg);
}
.btn--light {
  --btn-bg: var(--cream-50);
  --btn-fg: var(--navy-900);
  --btn-bd: var(--cream-50);
  --btn-bg-hover: #FFFFFF;
  --btn-bd-hover: #FFFFFF;
  --btn-fg-hover: var(--red-700);
  --btn-shadow: 0 1px 2px rgba(0, 0, 0, .15), 0 10px 24px -10px rgba(0, 0, 0, .5);
}
.btn--ghost {
  --btn-fg: var(--heading);
  --btn-bg-hover: var(--ghost-hover-bg);
  padding-inline: 1rem;
}
.btn--danger {
  --btn-bg: var(--danger);
  --btn-fg: #FFFFFF;
  --btn-bd: var(--danger);
  --btn-bg-hover: #991B1B;
  --btn-bd-hover: #991B1B;
}
.btn--sm { min-height: 38px; padding: .45rem .95rem; font-size: .875rem; }
.btn--lg { min-height: 54px; padding: .85rem 1.75rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0; width: 46px; }
.btn--icon.btn--sm { width: 38px; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; pointer-events: none; }
.btn[aria-busy="true"]:disabled { opacity: .88; }
.btn[aria-busy="true"]::before {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  background: var(--navy-950);
  color: rgba(244, 229, 222, .84);
  font-size: var(--fs-xs);
  line-height: 1.4;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}
.topbar__place { display: flex; align-items: center; gap: .5rem; margin: 0; min-width: 0; white-space: nowrap; }
.topbar__place .icon { width: 15px; height: 15px; color: var(--brass-300); }
.topbar__motto {
  display: none;
  margin-left: .5rem;
  padding-left: .95rem;
  border-left: 1px solid rgba(244, 229, 222, .22);
  color: var(--brass-300);
  letter-spacing: .06em;
}
.topbar__links {
  display: flex;
  align-items: center;
  gap: 2px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 34px;
  color: inherit;
  text-decoration: none;
}
.topbar__link:hover { color: #FFFFFF; }
.topbar__link .icon { width: 15px; height: 15px; color: var(--brass-300); }
@media (max-width: 719px) {
  .topbar__links { gap: 2px 6px; }
  .topbar__link { min-width: 34px; justify-content: center; }
  .topbar__link > span:not(.visually-hidden) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .topbar__link .icon { width: 17px; height: 17px; }
}
@media (min-width: 860px) {
  .topbar__motto { display: inline; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .3s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(253, 250, 247, .93);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 16, 39, .45); }
html.is-drawer-open .site-header { z-index: 85; }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  margin-right: auto;
  color: var(--navy-900);
  text-decoration: none;
  border-radius: 8px;
}
.brand:hover { color: var(--navy-900); }
.brand__logo {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 2px 4px rgba(0, 16, 39, .18));
  transition: transform .5s var(--ease);
}
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.03); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--navy-900);
}
.brand__sub {
  margin-top: 5px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--red-700);
}

.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.header-login, .account-menu { display: none; }
.header-join { display: none; }
@media (min-width: 420px) {
  .header-join { display: inline-flex; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--brass-500); }
.nav-toggle__bars { display: grid; gap: 4px; width: 20px; }
.nav-toggle__bars span { display: block; height: 2px; border-radius: 2px; background: currentColor; }
.nav-toggle__bars span:nth-child(2) { width: 70%; margin-left: auto; }

/* Off-canvas drawer (default, < 1100px) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: rgba(0, 10, 26, .55);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.nav-backdrop.is-visible { opacity: 1; }
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  background: var(--cream-50);
  box-shadow: -24px 0 60px -20px rgba(0, 10, 26, .45);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .38s var(--ease), visibility 0s linear .38s;
}
.site-nav.is-open {
  transform: none;
  visibility: visible;
  transition: transform .38s var(--ease), visibility 0s;
}
.site-nav::before {
  content: "";
  flex: none;
  height: 10px;
  background: var(--kilim-band) left center / auto 100% repeat-x;
}
.site-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 24px;
  border-bottom: 1px solid var(--border);
}
.site-nav__title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red-700);
}
.site-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--navy-900);
}
.site-nav__close:hover { background: var(--cream-200); }

.nav { margin: 0; padding: 8px 12px; list-style: none; }
.nav__item { position: relative; }
.nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--navy-900);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--red-700); }
.nav__link.is-active { color: var(--red-700); font-weight: 600; }
.nav__caret { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.nav__toggle[aria-expanded="true"] .nav__caret,
.account-menu__toggle[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

.nav__link--bisare { justify-content: flex-start; color: var(--red-700); font-weight: 600; }
.nav__item--bisare > .nav__link--bisare {
  position: relative;
  margin-block: 6px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(136, 1, 5, .09), rgba(136, 1, 5, .02));
  box-shadow: inset 3px 0 0 var(--red-700);
}
.nav__link--bisare .nav__badge {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-700);
}
.nav__flame { width: 17px; height: 17px; flex: none; fill: currentColor; transform-origin: 50% 90%; }
.nav__link--bisare:hover .nav__flame { animation: flicker 1.4s ease-in-out infinite; }

.nav__sub { display: none; margin: 0; padding: 4px 0 10px 14px; list-style: none; }
.nav__toggle[aria-expanded="true"] + .nav__sub { display: block; }
.nav__sublink {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--navy-900);
  font-size: 1rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__sublink:hover { background: var(--cream-100); color: var(--red-700); }
.nav__sublink.is-active .nav__subtitle { color: var(--red-700); }
.nav__subtitle { font-weight: 600; line-height: 1.35; }
.nav__subdesc { display: none; font-size: .8125rem; line-height: 1.4; color: var(--text-muted); }
.nav__sublink--icon { flex-direction: row; align-items: center; gap: 11px; }
.nav__sublink--icon .icon { width: 18px; height: 18px; color: var(--brass-700); }
.nav__sub-sep { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }

.site-nav__extra { display: grid; gap: 22px; margin-top: auto; padding: 22px 24px 28px; }
.site-nav__auth { display: grid; gap: 10px; }
.site-nav__hello { margin: 0 0 8px; color: var(--text-muted); font-size: var(--fs-sm); }
.site-nav__hello strong { color: var(--navy-900); }
.site-nav__links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav__links a, .site-nav__links button {
  display: block;
  width: 100%;
  padding: 9px 0;
  border: 0;
  background: none;
  color: var(--navy-900);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}
.site-nav__links a:hover, .site-nav__links button:hover { color: var(--red-700); }
.site-nav__links a.is-active { color: var(--red-700); }
.site-nav__contact {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.site-nav__contact a { display: inline-flex; align-items: center; gap: .55rem; color: var(--text-2); text-decoration: none; }
.site-nav__contact a:hover { color: var(--red-700); }
.site-nav__contact .icon { color: var(--brass-700); }

@media (min-width: 1100px) {
  .nav-toggle, .site-nav__head, .site-nav__extra, .nav-backdrop, .site-nav::before { display: none !important; }
  .site-header__inner { gap: 20px; }
  .brand { margin-right: 0; gap: 12px; }
  .brand__logo { width: 54px; height: 54px; }
  .brand__name { font-size: 1.5rem; }
  .brand__sub { font-size: .6rem; }
  .site-nav {
    position: static;
    z-index: auto;
    flex: 1;
    flex-direction: row;
    justify-content: center;
    width: auto;
    background: none;
    box-shadow: none;
    overflow: visible;
    transform: none;
    visibility: visible;
    transition: none;
  }
  .nav { display: flex; align-items: center; gap: 0; padding: 0; }
  .nav__link {
    width: auto;
    padding: .55rem .62rem;
    border: 0;
    border-radius: 8px;
    font-size: .9375rem;
    white-space: nowrap;
  }
  .nav__link::after {
    content: "";
    position: absolute;
    left: .62rem;
    right: .62rem;
    bottom: 1px;
    height: 2px;
    border-radius: 2px;
    background: var(--red-700);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
  }
  .nav__link:hover::after, .nav__link.is-active::after, .nav__toggle[aria-expanded="true"]::after { transform: scaleX(1); }
  .nav__link.is-active { font-weight: 500; }
  .nav__caret { width: 15px; height: 15px; margin-left: -4px; }
  .nav__item--bisare > .nav__link--bisare {
    gap: 6px;
    margin-block: 0;
    margin-inline: 4px;
    padding-inline: .8rem;
    border-radius: 999px;
    background: rgba(136, 1, 5, .065);
    box-shadow: inset 0 0 0 1px rgba(136, 1, 5, .14);
    font-weight: 600;
  }
  .nav__link--bisare::after { display: none; }
  .nav__item--bisare > .nav__link--bisare:hover,
  .nav__item--bisare > .nav__link--bisare.is-active { background: var(--red-700); color: var(--cream-50); box-shadow: none; }
  .nav__link--bisare .nav__badge { display: none; }
  .nav__flame { width: 16px; height: 16px; }

  .nav__sub, .account-menu .nav__sub {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 10;
    display: block;
    min-width: 296px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: inset 0 3px 0 var(--red-700), var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav__sub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
  }
  .nav__toggle[aria-expanded="true"] + .nav__sub,
  .account-menu__toggle[aria-expanded="true"] + .nav__sub {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s;
  }
  .nav__sub.nav__sub--end, .account-menu .nav__sub.nav__sub--end { left: auto; right: 0; min-width: 240px; transform: translateY(8px); }
  .account-menu__toggle[aria-expanded="true"] + .nav__sub.nav__sub--end { transform: none; }
  .nav__sublink { padding: 10px 14px; font-size: var(--fs-sm); }
  .nav__subdesc { display: block; }

  .header-actions { gap: 4px; }
  .header-login, .header-join { display: inline-flex; }
  .account-menu { display: block; position: relative; }
  .header-login {
    align-items: center;
    gap: .4rem;
    min-height: 40px;
    padding: .4rem .7rem;
    border-radius: 8px;
    color: var(--navy-900);
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
  }
  .header-login:hover { color: var(--red-700); background: var(--ghost-hover-bg); }
  .header-login .icon { width: 18px; height: 18px; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .nav__item--home { display: none; }
  .nav__link { padding-inline: .5rem; font-size: .9rem; }
  .nav__link--bisare { padding-inline: .7rem; }
  .nav__link::after { left: .5rem; right: .5rem; }
  .brand__name { font-size: 1.36rem; }
  .brand__sub { font-size: .54rem; letter-spacing: .13em; }
  .header-login span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1280px) {
  .nav__link { padding-inline: .78rem; }
  .nav__link::after { left: .78rem; right: .78rem; }
}

.account-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy-900);
  font-size: .9375rem;
  font-weight: 600;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.account-menu__toggle:hover, .account-menu__toggle[aria-expanded="true"] { border-color: var(--brass-500); box-shadow: var(--shadow-sm); }
.account-menu__toggle.is-active { border-color: var(--red-700); }
.account-menu__name { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  color: var(--cream-50);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: inset 0 0 0 2px var(--brass-300);
}

/* ---------- Announcement bar ---------- */
.announcement {
  position: relative;
  background: linear-gradient(90deg, var(--red-800), var(--red-700) 50%, var(--red-800));
  color: var(--cream-50);
  font-size: var(--fs-sm);
}
.announcement__inner { display: flex; align-items: center; gap: 12px; min-height: 46px; padding-block: 8px; }
.announcement__icon { width: 18px; height: 18px; color: var(--brass-300); }
.announcement__text { flex: 1; margin: 0; line-height: 1.45; }
.announcement__link { margin-left: .35rem; color: #FFFFFF; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.announcement__link:hover { color: var(--brass-300); }
.announcement__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.announcement__close:hover { background: rgba(255, 255, 255, .14); }
.announcement__close .icon { width: 18px; height: 18px; }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(44px, 2rem + 4vw, 96px) 0 clamp(60px, 2.5rem + 5vw, 120px);
  background:
    radial-gradient(ellipse 55% 90% at 92% 10%, rgba(136, 1, 5, .5), transparent 62%),
    radial-gradient(ellipse 40% 60% at 0% 100%, rgba(30, 67, 122, .45), transparent 70%),
    linear-gradient(165deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: var(--text);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--cream-200);
  -webkit-mask: var(--kilim-tile) 0 0 / 76px 76px repeat;
  mask: var(--kilim-tile) 0 0 / 76px 76px repeat;
  opacity: .075;
  pointer-events: none;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: var(--kilim-band) left center / auto 100% repeat-x;
}
.page-hero--red {
  background:
    radial-gradient(ellipse 50% 90% at 95% 0%, rgba(0, 16, 39, .55), transparent 65%),
    linear-gradient(160deg, var(--red-700) 0%, var(--red-800) 100%);
}
.page-hero--red::before { opacity: .09; }
.page-hero > .container { position: relative; }
@media (min-width: 1000px) {
  .page-hero > .container::after {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(var(--gutter) - 40px);
    z-index: -1;
    width: clamp(340px, 30vw, 460px);
    aspect-ratio: 1;
    background: var(--medallion) center / contain no-repeat;
    opacity: .2;
    transform: translateY(-50%);
    pointer-events: none;
  }
  .page-hero--plain > .container::after, .error-hero > .container::after { display: none; }
}
.page-hero__title {
  max-width: 22ch;
  margin: .2em 0 0;
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.022em;
  color: var(--heading);
}
.page-hero__lead {
  max-width: 60ch;
  margin: 1.1rem 0 0;
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--text-2);
}
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }
@media (max-width: 479px) {
  .page-hero__actions { flex-direction: column; align-items: stretch; }
  .page-hero__actions .btn { width: 100%; }
}
.page-hero .eyebrow { margin-top: 1.25rem; margin-bottom: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .8rem;
  margin: 0 0 1.4rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.breadcrumb > * + *::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: .8rem;
  vertical-align: .15em;
  background: var(--brass-500);
  transform: rotate(45deg);
}
.page-hero .breadcrumb > * + *::before, .is-dark .breadcrumb > * + *::before { background: var(--brass-300); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--link-hover); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--heading); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-900);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cream-200);
}
.card__media:has(img)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 10, 26, .18), transparent 45%);
  pointer-events: none;
}
.card__media:not(:has(img, picture, video, iframe))::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ornament) center / 96px 20px no-repeat, var(--cream-200);
  opacity: .9;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.card__media .badge { position: absolute; top: 14px; left: 14px; z-index: 1; }
.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .55rem;
  padding: clamp(18px, 1rem + .6vw, 26px);
}
.card__body > * { margin: 0; }
.card__body > .badge, .card__body > .btn, .card__body > .chip { align-self: flex-start; }
.card__body > :last-child:not(:first-child) { margin-top: auto; padding-top: .4rem; }
.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.12rem + .35vw, 1.38rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--navy-900);
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--red-700); }
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .9rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
}
.card__meta .icon { width: 15px; height: 15px; color: var(--brass-700); vertical-align: -.2em; margin-right: .25rem; }
.card__text { color: var(--ink-700); font-size: var(--fs-sm); line-height: 1.6; }
.card--hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, var(--red-700), var(--brass-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.card--hover:hover, .card--hover:focus-within {
  transform: translateY(-4px);
  border-color: var(--brass-300);
  box-shadow: var(--shadow-lg);
}
.card--hover:hover::before, .card--hover:focus-within::before { transform: scaleX(1); }
.card--hover:hover .card__media img { transform: scale(1.045); }
.card--hover .card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card--hover .card__title a:focus-visible { outline: none; }
.card--hover:has(.card__title a:focus-visible) { outline: 2.5px solid var(--focus-ring); outline-offset: 3px; }
.card--hover a:not(.card__title a), .card--hover button { position: relative; z-index: 2; }
.card--flat { box-shadow: none; }
.card--cream { background: var(--cream-100); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.5rem; }
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem 1.25rem;
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.field--full, .form-grid > fieldset, .form-grid > .form-section { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.35;
  color: var(--heading);
}
.field__req, .field__label abbr[title] { color: var(--red-700); text-decoration: none; margin-left: .15em; }
.field__optional { margin-left: .35em; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); }
.field__hint { margin: 0; font-size: .85rem; line-height: 1.45; color: var(--text-muted); }
.field__error {
  display: none;
  align-items: flex-start;
  gap: .4rem;
  margin: 0;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--danger);
}
.field__error::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: .12em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field.has-error .field__error { display: flex; }

.input, .select, .textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .68rem .9rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(0, 16, 39, .05);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #7A808B; opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--navy-700); }
.input:focus, .select:focus, .textarea:focus {
  /* transparent outline: invisible normally, drawn as a real outline in forced-colors mode */
  outline: 2px solid transparent;
  outline-offset: 1px;
  border-color: var(--red-700);
  box-shadow: 0 0 0 4px rgba(136, 1, 5, .25);
}
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] {
  background-color: var(--cream-100);
  color: var(--ink-700);
  cursor: not-allowed;
}
.textarea { min-height: 136px; resize: vertical; line-height: 1.55; }
.select {
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001027' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 18px;
  cursor: pointer;
}
.select[multiple] { padding-right: .9rem; background-image: none; min-height: 120px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); background-color: #FFFBFB; }
.field.has-error .input:focus, .field.has-error .select:focus, .field.has-error .textarea:focus { box-shadow: 0 0 0 4px rgba(185, 28, 28, .16); }
.input-group { display: flex; align-items: stretch; }
.input-group > .input { border-radius: 8px 0 0 8px; }
.input-group > .btn { border-radius: 0 8px 8px 0; }

fieldset.fieldset, .form-section {
  margin: 0;
  padding: clamp(18px, 1rem + 1vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.fieldset > legend, .form-section__title {
  padding: 0 .4rem;
  margin-left: -.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading);
}

.check, .switch {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}
.check input {
  display: grid;
  place-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin: .12em 0 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  appearance: none;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.check input[type="radio"] { border-radius: 50%; }
.check input::before {
  content: "";
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  transform: scale(0);
  transition: transform .15s var(--ease);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.check input[type="radio"]::before { width: 8px; height: 8px; border-radius: 50%; clip-path: none; }
.check input:checked { border-color: var(--red-700); background: var(--red-700); }
.check input:checked::before { transform: scale(1); }
.check input:hover:not(:disabled) { border-color: var(--red-700); }
.check input:focus-visible { outline: 2.5px solid var(--focus-ring); outline-offset: 2px; }
.check input:disabled { opacity: .55; cursor: not-allowed; }
.check a { position: relative; }
.field.has-error .check input { border-color: var(--danger); }
.check-list { display: grid; gap: .6rem; }
.check-grid { display: grid; gap: .6rem 1.25rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.switch { align-items: center; }
.switch input {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: #7D8592;
  appearance: none;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.switch input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .22s var(--ease);
}
.switch input:checked { background: var(--red-700); }
.switch input:checked::before { transform: translateX(20px); }
.switch input:disabled { cursor: not-allowed; opacity: .6; }
.switch input:focus-visible { outline: 2.5px solid var(--focus-ring); outline-offset: 3px; }
.switch__text { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); min-width: 3.2em; }

/* Windows High Contrast / forced colours: custom-drawn checkmarks and switch knobs vanish (backgrounds are
   overridden), so fall back to the native controls there. */
@media (forced-colors: active) {
  .check input, .switch input { appearance: auto; forced-color-adjust: auto; }
  .check input::before, .switch input::before { display: none; }
  .switch input { width: 20px; height: 20px; border-radius: 0; }
  .check input:focus-visible, .switch input:focus-visible { outline: 2px solid Highlight; }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: .5rem;
}
.form-actions--between { justify-content: space-between; }
.form-note { font-size: .85rem; color: var(--text-muted); }

/* ---------- Feedback ---------- */
.alert {
  --alert-c: var(--info);
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E");
  position: relative;
  margin: 0 0 1rem;
  padding: .95rem 1.15rem .95rem 3.05rem;
  border: 1px solid #C9D6F5;
  border-radius: 10px;
  background: #EEF3FC;
  color: var(--ink-900);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.alert::before {
  content: "";
  position: absolute;
  top: 1.02rem;
  left: 1.05rem;
  width: 20px;
  height: 20px;
  background: var(--alert-c);
  -webkit-mask: var(--alert-icon) center / contain no-repeat;
  mask: var(--alert-icon) center / contain no-repeat;
}
.alert > :last-child { margin-bottom: 0; }
.alert__title { display: block; margin-bottom: .15rem; font-weight: 650; color: var(--ink-900); }
.alert a { color: inherit; font-weight: 600; }
.alert--info { --alert-c: var(--info); }
.alert--success {
  --alert-c: var(--success);
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.4 2.8 2.8 5.4-5.6'/%3E%3C/svg%3E");
  border-color: #BFE3CB;
  background: #EDF7F0;
}
.alert--warning {
  --alert-c: var(--warning);
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 2.4 17.6A2 2 0 0 0 4.1 20.6h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4.5M12 17v.01'/%3E%3C/svg%3E");
  border-color: #F0D5A8;
  background: #FDF6E9;
}
.alert--error {
  --alert-c: var(--danger);
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E");
  border-color: #F0C4C4;
  background: #FCEFEF;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem .62rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
  background: var(--ink-100);
  color: var(--ink-700);
  vertical-align: middle;
}
.badge--navy { background: var(--navy-900); color: var(--cream-50); }
.badge--red { background: var(--red-700); color: #FFFFFF; }
.badge--brass { background: #F3E9D7; color: #6E5226; border-color: #E4D2B1; }
.badge--green { background: #E3F4E8; color: #14653A; border-color: #BFE3CB; }
.badge--amber { background: #FDF0DA; color: #8A3F07; border-color: #F0D5A8; }
.badge--gray { background: var(--ink-100); color: var(--ink-700); border-color: var(--ink-300); }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: clamp(40px, 2rem + 4vw, 80px) clamp(20px, 4vw, 48px);
  border: 1px dashed #D3C2B4;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(248, 241, 235, .7));
  color: var(--ink-700);
  text-align: center;
}
.empty-state::before {
  content: "";
  width: 120px;
  height: 24px;
  margin-bottom: .6rem;
  background: var(--ornament) center / contain no-repeat;
}
.empty-state:has(.empty-state__icon)::before { display: none; }
.empty-state__icon { width: 44px; height: 44px; margin-bottom: .4rem; color: var(--red-700); }
.empty-state__title, .empty-state h2, .empty-state h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.2rem + .4vw, 1.55rem);
  color: var(--navy-900);
}
.empty-state p { max-width: 48ch; margin: 0 auto; font-size: var(--fs-sm); }
.empty-state .cluster, .empty-state .btn { margin-top: .6rem; }

.skeleton {
  display: block;
  min-height: 1em;
  border-radius: 6px;
  background: linear-gradient(90deg, #EEE4DB 0%, #F8F2EC 45%, #EEE4DB 90%) 0 0 / 300% 100%;
  color: transparent !important;
  animation: shimmer 1.6s ease-in-out infinite;
  user-select: none;
}
.skeleton--text { height: .85em; margin-block: .4em; }
.skeleton--text:last-child { width: 72%; }
.skeleton--title { height: 1.5em; width: 68%; margin-block: .3em .6em; }
.skeleton--media { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.skeleton--circle { width: 48px; height: 48px; border-radius: 50%; }
.skeleton--btn { width: 140px; height: 44px; border-radius: var(--radius-sm); }

.spinner {
  display: inline-block;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid rgba(136, 1, 5, .18);
  border-top-color: var(--red-700);
  border-radius: 50%;
  vertical-align: middle;
  animation: spin .75s linear infinite;
}
.spinner--lg { width: 2.6rem; height: 2.6rem; border-width: 3px; }
.is-dark .spinner, .section--navy .spinner { border-color: rgba(244, 229, 222, .2); border-top-color: var(--brass-300); }
.loading-block { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 48px 16px; color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- Tabs ---------- */
.tabs [role="tablist"] {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs [role="tablist"]::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  padding: .8rem 1.1rem;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: none;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.tab:hover { color: var(--heading); background: var(--ghost-hover-bg); }
.tab[aria-selected="true"] { color: var(--heading); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--red-700);
}
.tab__count { margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; background: var(--cream-200); font-size: .75rem; color: var(--ink-700); }
.tabs [role="tabpanel"] { padding-top: 1.5rem; }
.tabs [role="tabpanel"]:focus-visible { outline-offset: 6px; }

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table { width: 100%; margin: 0; border-collapse: collapse; font-size: var(--fs-sm); color: var(--ink-900); }
.table-wrap > .table { min-width: 36rem; }
.table code { white-space: nowrap; }
.table caption { padding: .9rem 1rem; text-align: left; font-weight: 600; color: var(--heading); caption-side: top; }
.table th {
  padding: .8rem 1rem;
  background: var(--cream-100);
  color: var(--ink-700);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td { padding: .85rem 1rem; border-top: 1px solid var(--border); vertical-align: top; }
.table tbody tr { transition: background-color var(--dur) var(--ease); }
.table tbody tr:hover { background: #FCF8F4; }
.table--compact th, .table--compact td { padding: .55rem .8rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; margin-top: 2.5rem; }
.pagination__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 42px;
  height: 42px;
  padding: 0 .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--navy-900);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pagination__link:hover { border-color: var(--navy-900); color: var(--navy-900); }
.pagination__link[aria-current="page"] {
  border-color: var(--red-700);
  background: var(--red-700);
  color: #FFFFFF;
  box-shadow: 0 6px 14px -6px rgba(136, 1, 5, .6);
  cursor: default;
}
.pagination__link:disabled, .pagination__link[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.pagination__link .icon { width: 16px; height: 16px; }
.pagination__gap { min-width: 24px; color: var(--text-muted); text-align: center; }
.pagination__status { margin: .9rem 0 0; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
@media (max-width: 479px) {
  .pagination__label { display: none; }
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 38px;
  padding: .4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--navy-900); color: var(--navy-900); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-current="true"], .chip[aria-selected="true"] {
  border-color: var(--navy-900);
  background: var(--navy-900);
  color: var(--cream-50);
}
.chip__count { padding: .05rem .45rem; border-radius: 999px; background: rgba(0, 16, 39, .08); font-size: .75rem; }
.chip.is-active .chip__count, .chip[aria-pressed="true"] .chip__count { background: rgba(255, 255, 255, .18); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Stats ---------- */
.stat { display: flex; flex-direction: column; gap: .45rem; }
.stat--center { align-items: center; text-align: center; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 1.7rem + 2.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--red-700);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.section--navy .stat__value, .section--red .stat__value, .is-dark .stat__value { color: var(--cream-50); }

/* ---------- Prose ---------- */
.prose {
  max-width: 70ch;
  font-size: clamp(1.0313rem, 1rem + .2vw, 1.125rem);
  line-height: 1.78;
  color: var(--text);
}
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.2em; }
.prose :is(h2, h3, h4) { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2 { margin-top: 2.1em; font-size: clamp(1.55rem, 1.3rem + 1vw, 2.05rem); }
.prose h3 { margin-top: 1.8em; font-size: clamp(1.25rem, 1.15rem + .5vw, 1.45rem); }
.prose h4 { margin-top: 1.6em; font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.prose :is(h2, h3, h4) + * { margin-top: .65em; }
.prose > :first-child { margin-top: 0; }
.prose a:not(.btn) { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(136, 1, 5, .35); text-underline-offset: .2em; }
.prose a:not(.btn):hover { color: var(--link-hover); text-decoration-color: currentColor; }
.prose strong { color: var(--heading); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: .45em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.15em;
  top: .72em;
  width: 6px;
  height: 6px;
  background: var(--brass-500);
  transform: rotate(45deg);
}
.prose ol > li::marker { color: var(--red-700); font-weight: 700; }
.prose blockquote {
  position: relative;
  margin-block: 1.8em;
  padding: 1.2em 1.4em 1.2em 1.6em;
  border-left: 3px solid var(--red-700);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--cream-100);
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: 1.18em;
  font-style: italic;
  line-height: 1.6;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .7em; }
.prose blockquote :is(cite, footer) {
  display: block;
  margin-top: .8em;
  font-family: var(--font-body);
  font-size: .8rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.prose figure { margin-block: 2em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose figcaption { margin-top: .7em; font-size: .875rem; line-height: 1.5; color: var(--text-muted); text-align: center; }
.prose table { width: 100%; font-size: .95rem; line-height: 1.5; }
.prose th, .prose td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--cream-100); font-weight: 650; color: var(--heading); }
.prose hr {
  height: 24px;
  margin-block: 2.6em;
  border: 0;
  background: var(--ornament) center / 120px 24px no-repeat;
}
.prose code { padding: .12em .38em; border-radius: 4px; background: var(--cream-200); font-family: var(--font-mono); font-size: .88em; }
.prose pre { overflow-x: auto; padding: 1em 1.2em; border-radius: var(--radius); background: var(--navy-900); color: var(--cream-100); font-size: .9em; }
.prose pre code { padding: 0; background: none; }
.prose .heading-anchor {
  margin-left: .35em;
  color: var(--brass-500);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.prose :is(h2, h3):hover .heading-anchor, .prose .heading-anchor:focus-visible { opacity: 1; }
.prose--dropcap > p:first-of-type::first-letter {
  float: left;
  margin: .08em .1em 0 0;
  font-family: var(--font-display);
  font-size: 3.6em;
  font-weight: 600;
  line-height: .8;
  color: var(--red-700);
}
.section--navy .prose blockquote, .is-dark .prose blockquote { background: rgba(255, 255, 255, .06); color: var(--cream-100); }

/* ---------- Modal ---------- */
dialog.modal {
  width: min(560px, calc(100% - 32px));
  max-height: min(88vh, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--cream-50);
  color: var(--ink-900);
  box-shadow: 0 40px 90px -24px rgba(0, 10, 26, .6);
  overflow: hidden;
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in .32s var(--ease); }
dialog.modal::before {
  content: "";
  flex: none;
  height: 8px;
  background: var(--kilim-band) left center / auto 100% repeat-x;
}
dialog.modal::backdrop { background: rgba(0, 10, 26, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.modal--wide { width: min(820px, calc(100% - 32px)); }
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px 26px;
  border-bottom: 1px solid var(--border);
}
.modal__title { margin: .2rem 0 0; font-size: clamp(1.3rem, 1.2rem + .5vw, 1.6rem); line-height: 1.25; color: var(--navy-900); }
.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--navy-900);
}
.modal__close:hover { background: var(--cream-200); }
.modal__body { flex: 1 1 auto; overflow-y: auto; padding: 20px 26px 22px; font-size: var(--fs-sm); line-height: 1.6; }
.modal__body > :last-child { margin-bottom: 0; }
.modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px 20px;
  border-top: 1px solid var(--border);
  background: var(--cream-100);
}
@media (max-width: 519px) {
  .modal__footer .btn { flex: 1 1 100%; }
}

/* ---------- Cookie banner & dialog ---------- */
/* While the fixed banner is shown, reserve its height (set by app.js as --cookie-banner-h) so that focused
   elements and the end of the page are never hidden underneath it (WCAG 2.4.11). */
html:has(body.has-cookie-banner) { scroll-padding-bottom: calc(var(--cookie-banner-h, 220px) + 16px); }
body.has-cookie-banner { padding-bottom: calc(var(--cookie-banner-h, 220px) + 16px); }
body.has-cookie-banner:has(.site-footer) { padding-bottom: 0; }
body.has-cookie-banner .site-footer { padding-bottom: calc(var(--cookie-banner-h, 220px) + 16px); }
.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  max-width: 600px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-900);
  box-shadow: 0 30px 70px -20px rgba(0, 10, 26, .45), 0 2px 6px rgba(0, 10, 26, .08);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.cookie-banner.is-visible { transform: none; opacity: 1; }
.cookie-banner::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--kilim-band) left center / auto 100% repeat-x;
}
.cookie-banner__inner { display: grid; gap: 14px; padding: 18px 20px 20px; }
.cookie-banner__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .35rem;
  font-size: 1.2rem;
  color: var(--navy-900);
}
.cookie-banner__title .icon { width: 22px; height: 22px; color: var(--red-700); }
.cookie-banner__text p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink-700); }
/* Three equally prominent choices (KVKK Çerez Rehberi): same size, weight and style; stacked on narrow screens. */
.cookie-banner__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cookie-banner__actions .btn { min-height: 44px; padding-inline: .5rem; font-size: .875rem; white-space: nowrap; }
@media (min-width: 560px) {
  .cookie-banner__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .cookie-banner { left: 24px; right: auto; bottom: 24px; width: 600px; }
  .cookie-banner__inner { padding: 20px 24px 22px; }
}
.cookie-dialog__intro { color: var(--ink-700); }
.consent-option { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.consent-option + .consent-option { margin-top: 12px; }
.consent-option__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: .4rem; }
.consent-option__title { margin: 0; font-family: var(--font-body); font-size: 1rem; font-weight: 700; letter-spacing: 0; color: var(--navy-900); }
.consent-option__desc { margin: 0; color: var(--ink-700); font-size: .875rem; }
.consent-option__list { margin: .6rem 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--ink-700); }
.consent-option__list li { position: relative; padding-left: 1.1rem; }
.consent-option__list li + li { margin-top: .3rem; }
.consent-option__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 5px;
  height: 5px;
  background: var(--brass-500);
  transform: rotate(45deg);
}
.consent-option__list strong { color: var(--navy-900); font-weight: 600; }
.cookie-dialog__more { margin: 14px 0 0; font-size: .85rem; color: var(--text-muted); }
dialog.cookie-dialog { width: min(620px, calc(100% - 32px)); }
.cookie-dialog__footer { justify-content: flex-start; }
@media (min-width: 560px) {
  .cookie-dialog__footer .btn--primary { margin-left: auto; }
}

/* ---------- Toasts ---------- */
.toast-root {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  pointer-events: none;
}
@media (min-width: 600px) {
  .toast-root { top: calc(var(--header-h) + 16px); left: auto; right: 20px; width: 380px; }
}
.toast {
  --toast-c: var(--brass-300);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 10px 14px 16px;
  border-radius: 12px;
  border-left: 4px solid var(--toast-c);
  background: var(--navy-900);
  color: var(--cream-100);
  box-shadow: 0 24px 48px -16px rgba(0, 10, 26, .55), 0 2px 6px rgba(0, 10, 26, .2);
  font-size: var(--fs-sm);
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in .35s var(--ease);
}
.toast.is-leaving { animation: toast-out .25s var(--ease) forwards; }
.toast--success { --toast-c: #4ADE80; }
.toast--error { --toast-c: #F87171; }
.toast--warning { --toast-c: #FBBF24; }
.toast__icon { width: 20px; height: 20px; margin-top: 1px; color: var(--toast-c); }
.toast__msg { flex: 1; margin: 0; padding-top: 1px; }
.toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin: -4px 0 -4px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(248, 241, 235, .75);
}
.toast__close:hover { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.toast__close:focus-visible { outline-color: var(--brass-300); }
.toast__close .icon { width: 16px; height: 16px; }

/* ---------- CTA band (partial: cta-uyelik) ---------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(56px, 2.5rem + 4vw, 104px);
  background:
    radial-gradient(ellipse 50% 120% at 100% 0%, rgba(0, 16, 39, .5), transparent 60%),
    linear-gradient(135deg, var(--red-700) 0%, var(--red-800) 100%);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--cream-200);
  -webkit-mask: var(--kilim-tile) 0 0 / 80px 80px repeat;
  mask: var(--kilim-tile) 0 0 / 80px 80px repeat;
  opacity: .08;
}
.cta-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  background: var(--kilim-band) left center / auto 100% repeat-x;
}
.cta-band__inner { display: grid; gap: 28px; align-items: center; }
.cta-band__seal img { width: 96px; height: 96px; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .4)); }
.cta-band__title { margin: 0; font-size: var(--fs-h2); color: var(--heading); }
.cta-band__lead { max-width: 58ch; margin: .9rem 0 0; font-size: var(--fs-lg); line-height: 1.6; color: var(--text-2); }
.cta-band .eyebrow { margin-bottom: .7rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Phones: stack the actions as equal, full-width buttons. */
@media (max-width: 479px) {
  .cta-band__actions { flex-direction: column; align-items: stretch; }
  .cta-band__actions .btn { width: 100%; }
}
@media (min-width: 1000px) {
  .cta-band__inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 44px; }
  .cta-band__seal img { width: 132px; height: 132px; }
  .cta-band__actions { flex-direction: column; align-items: stretch; min-width: 230px; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: auto;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 55%);
  font-size: var(--fs-sm);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--cream-200);
  -webkit-mask: var(--kilim-tile) 0 0 / 96px 96px repeat;
  mask: var(--kilim-tile) 0 0 / 96px 96px repeat;
  opacity: .03;
  pointer-events: none;
}
.site-footer__band { height: 14px; background: var(--kilim-band) left center / auto 100% repeat-x; }
.site-footer__main {
  display: grid;
  gap: 44px;
  padding-block: clamp(48px, 2rem + 3vw, 80px) clamp(36px, 2rem + 2vw, 56px);
}
@media (min-width: 1040px) {
  .site-footer__main { grid-template-columns: minmax(300px, 1.05fr) minmax(0, 2.2fr); gap: 72px; }
}
.footer-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--cream-50); text-decoration: none; }
.footer-brand:hover { color: var(--cream-50); }
.footer-brand__logo { width: 68px; height: 68px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }
.footer-brand__text { display: flex; flex-direction: column; line-height: 1; }
.footer-brand__name { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; letter-spacing: -.01em; }
.footer-brand__sub { margin-top: 6px; font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-300); }
.site-footer__mission { max-width: 46ch; margin: 1.3rem 0 0; color: var(--text-muted); line-height: 1.7; }
.site-footer__motto {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--brass-300);
}
.footer-contact { display: grid; gap: .55rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.footer-contact li { display: flex; align-items: flex-start; gap: .7rem; color: var(--text-2); }
.footer-contact .icon { width: 17px; height: 17px; margin-top: .22em; color: var(--brass-300); }
.footer-contact a { color: var(--text-2); text-decoration: none; overflow-wrap: anywhere; }
.footer-contact a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cream-100);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-social a:hover { border-color: var(--brass-300); background: rgba(255, 255, 255, .06); }
.footer-social .icon { width: 18px; height: 18px; }

.site-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
@media (min-width: 760px) {
  .site-footer__nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.footer-col__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.05rem;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass-300);
}
.footer-col__title::before { content: ""; width: 6px; height: 6px; background: var(--brass-500); transform: rotate(45deg); }
.footer-col ul { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.footer-col a, .footer-col__button {
  display: inline-block;
  padding: .3rem 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover, .footer-col__button:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--brass-500); text-underline-offset: .25em; }
.footer-col__bisare { color: var(--brass-300) !important; font-weight: 600; }
.footer-col__button { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(216, 191, 149, .5); text-underline-offset: .25em; }

.site-footer__bottom { border-top: 1px solid var(--border); }
.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 20px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.site-footer__bottom p { margin: 0; }
.site-footer__slogan { font-family: var(--font-display); font-style: italic; font-size: .95rem; color: var(--brass-300); letter-spacing: .01em; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(216, 191, 149, .35);
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--cream-50);
  box-shadow: 0 14px 30px -10px rgba(0, 10, 26, .55);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background-color var(--dur) var(--ease), bottom .3s var(--ease);
}
.back-to-top.is-visible, .back-to-top:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--red-700); }
.back-to-top:focus-visible { outline-color: var(--red-600); }
.back-to-top .icon { width: 20px; height: 20px; }
@media (min-width: 720px) {
  .back-to-top { right: 24px; bottom: 24px; }
}
@media (max-width: 719px) {
  body.has-cookie-banner .back-to-top { display: none; }
}

/* ---------- Error page (404) ---------- */
.error-hero { text-align: center; }
.error-hero .breadcrumb { justify-content: center; }
.error-hero .page-hero__title, .error-hero .page-hero__lead { margin-inline: auto; }
.error-code {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 10rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.04em;
  color: transparent;
  background: linear-gradient(180deg, var(--cream-50) 0%, var(--brass-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.quick-links { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--navy-900);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.quick-link:hover { transform: translateY(-3px); border-color: var(--brass-300); box-shadow: var(--shadow); color: var(--navy-900); }
.quick-link__icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--cream-200);
  color: var(--red-700);
}
.quick-link__icon svg { width: 22px; height: 22px; }
.quick-link__text { display: flex; flex-direction: column; min-width: 0; }
.quick-link__title { font-weight: 650; }
.quick-link__desc { font-size: var(--fs-xs); color: var(--text-muted); }
.quick-link--bisare .quick-link__icon { background: var(--red-700); color: var(--cream-50); }

/* ---------- Turnstile slot ---------- */
.turnstile-slot:empty { display: none; }
.turnstile-slot { min-height: 65px; }

/* ---------- Reveal on scroll ---------- */
.reveal { transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-pending { opacity: 0; transform: translateY(18px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.08, .96) rotate(-3deg); }
  60% { transform: scale(.96, 1.06) rotate(2deg); }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .spinner, .btn[aria-busy="true"]::before { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
  .reveal, .reveal.is-pending { opacity: 1; transform: none; }
  .card--hover:hover, .quick-link:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .site-footer, .announcement, .cookie-banner, .toast-root, .back-to-top, .cta-band,
  .nav-backdrop, .skip-link, .pagination, dialog { display: none !important; }
  html, body { background: #FFFFFF !important; color: #000000 !important; }
  body { font-size: 11pt; line-height: 1.5; }
  .page-hero, .section--navy, .section--red, .section--cream { background: none !important; color: #000000 !important; padding-block: 12pt !important; }
  .page-hero::before, .page-hero::after, .section--navy::before, .section--red::before { display: none !important; }
  .page-hero *, .section--navy *, .section--red * { color: #000000 !important; }
  .reveal, .reveal.is-pending { opacity: 1 !important; transform: none !important; }
  .card, .quick-link { box-shadow: none !important; break-inside: avoid; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444444; }
  h1, h2, h3 { break-after: avoid; }
  img { break-inside: avoid; }
}
