/* Astro Shamans — bundle.css
   tokens.css'ten sonra yüklenir. İçerik:
   1. Fontlar (Google Fonts)
   2. Accent şekil katmanı: tokens.json'un tema başına taşıyamadığı değerler
      (radius, stroke, derinlik, hareket, başlık tipografisi, bileşen sayıları)
   3. Yoğunluk: data-density="comfortable|compact" (boşluk, kontrol boyu, gövde metni)
   4. Tipografi sınıfları (.type-*), temel sayfa stili
   5. Bileşenler: motion, button, card, tag, sticker, site-nav, section-head, divider, site-footer
   6. Formlar: input, checkbox/radio, switch, field, segmented
   7. Geri bildirim: alert, spinner, status, progress/meter, toast, tooltip, dialog
   8. İçerik: table, code/kbd, disclosure, list, empty/suggestion
   9. Uygulama: app-shell, split, chat message, activity, composer
   10. Gezinme ve seçim: tabs, menu, breadcrumb, pagination, avatar, dropzone
   11. Formlar 2: combobox, tag input, number input, slider, date picker/calendar, choice card, swatch
   12. İçerik 2: gallery/lightbox, timeline, stepper, tree
   13. Katmanlar: popover, drawer, command palette
   14. Veri ve ERP: data table, description list, page header, toolbar, skeleton, badge
   15. İkonlar: .icon (Lucide ve as- ikonları için boy)
   16. Doku: kâğıt deseni, grain, oyma bant (.texture-paper, .texture-grain, .band)
   17. Site: hero, prose, figure/pullquote, stats, compare, case study
   18. Çizgi roman: reader, balloon, sfx
   19. Cihazlar: soundboard, generator
   Kural: bileşenler sadece semantik ve bileşen token'larını okur; primitive (slate-*, kagit-*, hue-*) kullanmaz. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Schibsted+Grotesk:wght@700;800&family=Bungee&family=Caveat:wght@600&family=Kalam:wght@700&family=JetBrains+Mono:wght@400&display=swap");

/* 2. Accent şekil katmanı */
:root {
  --font-body: var(--font-inter);
  --font-mono: var(--font-jetbrains-mono);
}
:root, [data-theme="stone"] {
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --stroke-outer: 1px;
  --stroke-inner: 1px;
  --stroke-focus: 2px;
  --shadow-press-offset: 0px;
  --halo-width: 0px;
  --halo-color: #FFFFFF;
  --ease-expressive: cubic-bezier(0, 0, 0.2, 1);
  --motion-boil-amplitude: 0px;
  --motion-boil-duration: 0ms;
  --spinner-ease: linear;
  /* Durum noktası halkası ve ilerleme dolgusunun ucu: sayfaya karşı en az 3:1 */
  --indicator-edge: var(--outline-variant);
  --field-inset: 0px;
  --sticker-tilt: 0;
  --divider-dash: 1px;
  --divider-gap: 0px;
  --font-display: var(--font-inter);
  --font-hand: var(--font-inter);
  --type-title-family: var(--font-inter);
  --type-title-size: 20px;
  --type-title-line: 1.4;
  --type-title-weight: 600;
  --type-title-tracking: 0px;
  --type-title-transform: none;
  --type-headline-family: var(--font-inter);
  --type-headline-size: 24px;
  --type-headline-line: 1.33;
  --type-headline-weight: 600;
  --type-headline-tracking: -0.01em;
  --type-headline-transform: none;
  --type-display-family: var(--font-inter);
  --type-display-size: 32px;
  --type-display-line: 1.25;
  --type-display-weight: 600;
  --type-display-tracking: -0.02em;
  --type-display-transform: none;
  --type-hand-family: var(--font-inter);
  --type-hand-size: 16px;
  --type-hand-line: 1.5;
  --type-hand-weight: 400;
  --type-hand-tracking: 0px;
  --type-hand-transform: none;
  color: var(--on-surface);
}
[data-theme="astro"] {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --stroke-outer: 2px;
  --stroke-inner: 1px;
  --stroke-focus: 2px;
  --shadow-press-offset: 4px;
  --halo-width: 0px;
  --halo-color: #FFFFFF;
  --ease-expressive: steps(2, end);
  --motion-boil-amplitude: 1px;
  --motion-boil-duration: 420ms;
  /* 8 adımda tam tur, 750ms: 160 bpm'de on altılık nota başına bir adım */
  --spinner-ease: steps(8, end);
  --indicator-edge: var(--outline);
  /* Alanlar kâğıda gömülü: iç gölge kayması */
  --field-inset: 3px;
  --sticker-tilt: -4;
  --divider-dash: 8px;
  --divider-gap: 6px;
  --font-display: var(--font-schibsted-grotesk);
  --font-hand: var(--font-caveat);
  --type-title-family: var(--font-schibsted-grotesk);
  --type-title-size: 22px;
  --type-title-line: 1.3;
  --type-title-weight: 700;
  --type-title-tracking: -0.01em;
  --type-title-transform: none;
  --type-headline-family: var(--font-schibsted-grotesk);
  --type-headline-size: clamp(28px, 24.87px + 0.870vw, 36px);
  --type-headline-line: 1.15;
  --type-headline-weight: 800;
  --type-headline-tracking: -0.015em;
  --type-headline-transform: none;
  --type-display-family: var(--font-schibsted-grotesk);
  --type-display-size: clamp(40px, 30.61px + 2.609vw, 64px);
  --type-display-line: 1.05;
  --type-display-weight: 800;
  --type-display-tracking: -0.02em;
  --type-display-transform: none;
  --type-hand-family: var(--font-caveat);
  --type-hand-size: 24px;
  --type-hand-line: 1.15;
  --type-hand-weight: 600;
  --type-hand-tracking: 0px;
  --type-hand-transform: none;
  color: var(--on-surface);
}
[data-theme="totem"] {
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --stroke-outer: 2.5px;
  --stroke-inner: 1.5px;
  --stroke-focus: 2.5px;
  --shadow-press-offset: 5px;
  --halo-width: 4px;
  --halo-color: #FFFDF8;
  --ease-expressive: steps(2, end);
  --motion-boil-amplitude: 1px;
  --motion-boil-duration: 420ms;
  --spinner-ease: steps(8, end);
  --indicator-edge: var(--outline);
  --field-inset: 3px;
  --sticker-tilt: -3;
  /* Dialog başlığı Totem'de de Inter: uzun onay soruları Bungee büyük harfle ağır okunuyor */
  --dialog-title-family: var(--font-inter);
  --dialog-title-size: 20px;
  --dialog-title-line: 1.4;
  --dialog-title-weight: 600;
  --dialog-title-tracking: 0px;
  --dialog-title-transform: none;
  --divider-dash: 1px;
  --divider-gap: 0px;
  --font-display: var(--font-bungee);
  --font-hand: var(--font-kalam);
  --type-title-family: var(--font-bungee);
  --type-title-size: 20px;
  --type-title-line: 1.2;
  --type-title-weight: 400;
  --type-title-tracking: 0px;
  --type-title-transform: uppercase;
  --type-headline-family: var(--font-bungee);
  --type-headline-size: clamp(24px, 20.87px + 0.870vw, 32px);
  --type-headline-line: 1.1;
  --type-headline-weight: 400;
  --type-headline-tracking: 0px;
  --type-headline-transform: uppercase;
  --type-display-family: var(--font-bungee);
  --type-display-size: clamp(32px, 24.17px + 2.174vw, 52px);
  --type-display-line: 1.05;
  --type-display-weight: 400;
  --type-display-tracking: 0px;
  --type-display-transform: uppercase;
  --type-hand-family: var(--font-kalam);
  --type-hand-size: 20px;
  --type-hand-line: 1.25;
  --type-hand-weight: 700;
  --type-hand-tracking: 0px;
  --type-hand-transform: none;
  color: var(--on-surface);
}

/* 3. Yoğunluk (renk asla yoğunluğa bağlı değildir) */
:root, [data-density="comfortable"] {
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --control-height-sm: 32px;
  --control-height-md: 40px;
  --control-height-lg: 48px;
  --control-pad-x: 16px;
  --row-height: 44px;
  --gap-inline: 12px;
  --gap-stack: 16px;
  --touch-target-min: 44px;
  --type-body-family: var(--font-body);
  --type-body-size: 16px;
  --type-body-line: 1.5;
  --type-body-weight: 400;
  --type-body-tracking: 0px;
  --type-body-transform: none;
  --type-body-strong-family: var(--font-body);
  --type-body-strong-size: 16px;
  --type-body-strong-line: 1.5;
  --type-body-strong-weight: 600;
  --type-body-strong-tracking: 0px;
  --type-body-strong-transform: none;
  --type-numeric-family: var(--font-body);
  --type-numeric-size: 16px;
  --type-numeric-line: 1.5;
  --type-numeric-weight: 400;
  --type-numeric-tracking: 0px;
  --type-numeric-transform: none;
  --type-label-family: var(--font-body);
  --type-label-size: 14px;
  --type-label-line: 1.43;
  --type-label-weight: 500;
  --type-label-tracking: 0px;
  --type-label-transform: none;
  --type-caption-family: var(--font-body);
  --type-caption-size: 13px;
  --type-caption-line: 1.38;
  --type-caption-weight: 400;
  --type-caption-tracking: 0px;
  --type-caption-transform: none;
  --type-numeric-variant: tabular-nums;
}
[data-density="compact"] {
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --control-height-sm: 24px;
  --control-height-md: 30px;
  --control-height-lg: 36px;
  --control-pad-x: 10px;
  --row-height: 32px;
  --gap-inline: 8px;
  --gap-stack: 12px;
  --touch-target-min: 32px;
  --type-body-family: var(--font-body);
  --type-body-size: 14px;
  --type-body-line: 1.43;
  --type-body-weight: 400;
  --type-body-tracking: 0px;
  --type-body-transform: none;
  --type-body-strong-family: var(--font-body);
  --type-body-strong-size: 14px;
  --type-body-strong-line: 1.43;
  --type-body-strong-weight: 600;
  --type-body-strong-tracking: 0px;
  --type-body-strong-transform: none;
  --type-numeric-family: var(--font-body);
  --type-numeric-size: 14px;
  --type-numeric-line: 1.43;
  --type-numeric-weight: 400;
  --type-numeric-tracking: 0px;
  --type-numeric-transform: none;
  --type-label-family: var(--font-body);
  --type-label-size: 13px;
  --type-label-line: 1.38;
  --type-label-weight: 500;
  --type-label-tracking: 0px;
  --type-label-transform: none;
  --type-caption-family: var(--font-body);
  --type-caption-size: 12px;
  --type-caption-line: 1.33;
  --type-caption-weight: 400;
  --type-caption-tracking: 0px;
  --type-caption-transform: none;
  --type-numeric-variant: tabular-nums;
}

/* 4. Tipografi sınıfları */
.type-display {
  font-family: var(--type-display-family);
  font-size: var(--type-display-size);
  line-height: var(--type-display-line);
  font-weight: var(--type-display-weight);
  letter-spacing: var(--type-display-tracking);
  text-transform: var(--type-display-transform);
}
.type-headline {
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  line-height: var(--type-headline-line);
  font-weight: var(--type-headline-weight);
  letter-spacing: var(--type-headline-tracking);
  text-transform: var(--type-headline-transform);
}
.type-title {
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
}
.type-hand {
  font-family: var(--type-hand-family);
  font-size: var(--type-hand-size);
  line-height: var(--type-hand-line);
  font-weight: var(--type-hand-weight);
  letter-spacing: var(--type-hand-tracking);
  text-transform: var(--type-hand-transform);
}
.type-body {
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-weight);
  letter-spacing: var(--type-body-tracking);
  text-transform: var(--type-body-transform);
}
.type-body-strong {
  font-family: var(--type-body-strong-family);
  font-size: var(--type-body-strong-size);
  line-height: var(--type-body-strong-line);
  font-weight: var(--type-body-strong-weight);
  letter-spacing: var(--type-body-strong-tracking);
  text-transform: var(--type-body-strong-transform);
}
.type-numeric {
  font-family: var(--type-numeric-family);
  font-size: var(--type-numeric-size);
  line-height: var(--type-numeric-line);
  font-weight: var(--type-numeric-weight);
  letter-spacing: var(--type-numeric-tracking);
  text-transform: var(--type-numeric-transform);
  font-variant-numeric: var(--type-numeric-variant);
}
.type-label {
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-tracking);
  text-transform: var(--type-label-transform);
}
.type-caption {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
  letter-spacing: var(--type-caption-tracking);
  text-transform: var(--type-caption-transform);
}

:where(body) {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
}
:where(a:not([class])) { color: var(--link); text-underline-offset: 0.2em; }
:where(a:not([class])):visited { color: var(--link-visited); }
::selection { background: var(--selection); color: var(--on-selection); }

/* 5. Bileşenler */
/* ============================================================
   Motion — titreyen çizgi ("boil")
   Hover süresince 3 karelik döngü: konum tam piksel kayar, köşeler hafifçe
   şekil değiştirir. Stone'da genlik 0 ve süre 0ms: hiçbir şey kıpırdamaz.
   Kullanan bileşen iki yerel değişken verir: --_r (köşe), --_amp (genlik).
   ============================================================ */

@keyframes boil {
  0% {
    translate: 0 0;
    border-radius: var(--_r);
  }
  33% {
    translate: calc(var(--_amp) * -1) 0;
    border-radius: calc(var(--_r) + var(--_amp) * 2) var(--_r) calc(var(--_r) - var(--_amp)) calc(var(--_r) + var(--_amp));
  }
  66% {
    translate: 0 var(--_amp);
    border-radius: var(--_r) calc(var(--_r) + var(--_amp)) var(--_r) calc(var(--_r) - var(--_amp) * 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-name: none !important;
  }
}

/* ============================================================
   Button
   .btn (secondary) · .btn--primary · .btn--ghost · .btn--danger
   .btn--sm · .btn--lg · .btn--icon · .btn--block
   disabled · aria-disabled="true" · aria-busy="true"
   ============================================================ */

.btn {
  --_bg: var(--action-secondary);
  --_bg-hover: var(--action-secondary-hover);
  --_bg-pressed: var(--action-secondary-pressed);
  --_fg: var(--on-action-secondary);
  --_border: var(--outline);
  --_shadow: var(--shadow-rest);
  --_shadow-hover: var(--shadow-hover);
  --_press: var(--shadow-press-offset);
  /* Tam piksele yuvarlanır: yarım piksel kayma düşük yoğunluklu ekranda yazıyı bulanıklaştırır */
  --_lift: round(calc(var(--shadow-press-offset) / -4), 1px);
  --_r: var(--radius-md);
  --_amp: var(--motion-boil-amplitude);
  --_h: var(--control-height-md);
  --_px: var(--control-pad-x);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  min-height: var(--_h);
  padding: 0 var(--_px);
  margin: 0;

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-tracking);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;

  color: var(--_fg);
  background: var(--_bg);
  border: var(--stroke-outer) solid var(--_border);
  border-radius: var(--_r);
  box-shadow: var(--_shadow);

  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-expressive),
    transform var(--dur-fast) var(--ease-expressive);
}

/* Dokunma alanı: görünen boy touch-target-min'den küçükse görünmez alan büyür */
.btn::before {
  content: "";
  position: absolute;
  inset: calc(min(0px, (var(--_h) - var(--touch-target-min)) / 2)) 0;
}

.btn svg {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.btn--primary {
  --_bg: var(--action-primary);
  --_bg-hover: var(--action-primary-hover);
  --_bg-pressed: var(--action-primary-pressed);
  --_fg: var(--on-action-primary);
}

.btn--ghost {
  --_bg: transparent;
  --_bg-hover: var(--action-ghost-hover);
  --_bg-pressed: var(--action-ghost-selected);
  --_fg: var(--on-surface);
  --_border: transparent;
  --_shadow: none;
  --_shadow-hover: none;
  --_press: 0px;
  --_lift: 0px;
  --_amp: 0px;
}

.btn--danger {
  --_bg: var(--feedback-danger);
  --_bg-hover: var(--feedback-danger-hover);
  --_bg-pressed: var(--feedback-danger-pressed);
  --_fg: var(--on-feedback-danger);
}

.btn--sm {
  --_h: var(--control-height-sm);
  --_px: calc(var(--control-pad-x) * 0.75);
  gap: var(--space-xs);
  font-size: var(--type-caption-size);
}

.btn--lg {
  --_h: var(--control-height-lg);
  --_px: calc(var(--control-pad-x) * 1.25);
  font-size: var(--type-body-size);
}

.btn--icon {
  width: var(--_h);
  padding: 0;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn:where(:not(:disabled, [aria-disabled="true"], [aria-busy="true"])):hover {
  background: var(--_bg-hover);
  box-shadow: var(--_shadow-hover);
  transform: translate(var(--_lift), var(--_lift));
  animation: boil var(--motion-boil-duration) steps(1, end) infinite;
}

.btn:where(:not(:disabled, [aria-disabled="true"], [aria-busy="true"])):active {
  background: var(--_bg-pressed);
  box-shadow: var(--shadow-pressed);
  transform: translate(var(--_press), var(--_press));
  animation: none;
}

.btn:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  --_bg: var(--action-disabled);
  --_fg: var(--on-action-disabled);
  --_border: var(--on-action-disabled);
  --_shadow: none;
  cursor: not-allowed;
}

.btn--ghost:disabled,
.btn--ghost[aria-disabled="true"] {
  --_bg: transparent;
  --_border: transparent;
}

/* Yükleniyor: etiket yerini korur (buton zıplamaz), üstte döner halka */
.btn[aria-busy="true"] {
  cursor: progress;
  color: transparent;
}
.btn[aria-busy="true"] > * {
  visibility: hidden;
}
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid var(--_fg);
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: btn-spin 750ms var(--spinner-ease, linear) infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
  .btn[aria-busy="true"]::after { animation-duration: 2s; }
}

@media (forced-colors: active) {
  .btn { border-color: ButtonText; }
  .btn:focus-visible { outline-color: Highlight; }
}

/* ============================================================
   Card
   .card · .card--interactive · .card--flat · .card--filled · .card--horizontal
   .card__media (--square · --portrait · --wide · --inset) · .card__body ·
   .card__eyebrow · .card__title · .card__link · .card__text · .card__meta · .card__actions
   ============================================================ */

.card {
  --_bg: var(--surface-container-lowest);
  --_border: var(--card-border);
  --_shadow: var(--shadow-rest);
  --_pad: var(--space-lg);
  --_lift: round(calc(var(--shadow-press-offset) / -4), 1px);
  --_r: var(--radius-lg);
  --_amp: var(--motion-boil-amplitude);

  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;

  color: var(--on-surface);
  background: var(--_bg);
  border: var(--stroke-outer) solid var(--_border);
  border-radius: var(--_r);
  box-shadow: var(--_shadow);
  overflow: clip;

  transition:
    box-shadow var(--dur-fast) var(--ease-expressive),
    transform var(--dur-fast) var(--ease-expressive);
}

.card__media {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 10;
  background: var(--surface-container);
  /* Kenar çizgisi gölgeyle çiziliyor: dikey ve yatay düzende aynı çalışır */
  box-shadow: 0 0 0 var(--stroke-outer) var(--_border);
}

.card__media > img,
.card__media > svg,
.card__media > video,
.card__media > picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__media--square   { aspect-ratio: 1 / 1; }
.card__media--portrait { aspect-ratio: 4 / 5; }
.card__media--wide     { aspect-ratio: 16 / 9; }

.card__media--inset {
  margin: var(--_pad) var(--_pad) 0;
  border: var(--stroke-outer) solid var(--_border);
  border-radius: var(--radius-md);
  box-shadow: none;
  overflow: clip;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: var(--space-sm);
  min-width: 0;
  padding: var(--_pad);
}

.card__eyebrow {
  margin: 0;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}

.card__title {
  margin: 0;
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
  text-wrap: balance;
}

.card__text {
  margin: 0;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}

.card__meta:has(.tag) {
  gap: var(--space-xs);
}

.card__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-inline);
  margin-top: auto;
  padding-top: var(--space-sm);
}

/* Tamamı tıklanabilir kart: başlıktaki .card__link'in tıklama alanı tüm kartı kaplar */
.card__link {
  color: inherit;
  text-decoration: none;
}
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}
.card__link:focus-visible {
  outline: none;
}
.card:has(.card__link:focus-visible) {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.card--interactive:hover {
  box-shadow: var(--shadow-hover);
  transform: translate(var(--_lift), var(--_lift));
  animation: boil var(--motion-boil-duration) steps(1, end) infinite;
}
.card--interactive:hover .card__link {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
}
.card--interactive:active:not(:has(.card__actions :active)) {
  box-shadow: var(--shadow-pressed);
  transform: translate(var(--shadow-press-offset), var(--shadow-press-offset));
  animation: none;
}

.card--flat {
  --_shadow: none;
}

.card--filled {
  --_bg: var(--surface-container);
  --_border: transparent;
  --_shadow: none;
}

.card--horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}
.card--horizontal > .card__media {
  flex: 1 1 200px;
  aspect-ratio: auto;
  min-height: 180px;
}
.card--horizontal > .card__media--inset {
  margin: var(--_pad) 0 var(--_pad) var(--_pad);
}
.card--horizontal > .card__body {
  flex: 2 1 280px;
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card--interactive:hover,
  .card--interactive:active { transform: none; }
}

@media (forced-colors: active) {
  .card { border-color: CanvasText; }
}

/* ------------------------------------------------------------
   Card · ek parçalar
   .card__badge · .card__stamp · .card__note · .card__text--clamp ·
   .card__progress · .card__foot · .card__likes · .card__ext
   ------------------------------------------------------------ */

.card__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  background: var(--card-cat, var(--expressive-1));
  border: var(--stroke-outer) solid var(--outline);
  color: var(--on-surface);
  font-family: var(--type-hand-family);
  font-size: var(--type-hand-size, 24px);
  font-weight: var(--type-hand-weight, 600);
  line-height: 1;
  overflow: hidden;
}
.card__badge > img,
.card__badge > svg:not(.lucide) { width: 100%; height: 100%; object-fit: cover; }
.card__badge > .lucide { width: 28px; height: 28px; }

/* Damga: köşeye basılmış el yazısı; süs, anlam taşımaz (aria-hidden) */
.card__stamp {
  position: absolute;
  z-index: 2;
  top: var(--space-md);
  right: var(--space-md);
  padding: 0 var(--space-sm);
  font-family: var(--type-hand-family);
  font-size: calc(var(--type-hand-size, 24px) * 0.8);
  font-weight: var(--type-hand-weight, 600);
  line-height: 1.4;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: 2px dashed var(--outline);
  border-radius: var(--radius-sm);
  transform: rotate(6deg);
  pointer-events: none;
}

.card__note {
  margin: 0;
  font-family: var(--type-hand-family);
  font-size: var(--type-hand-size, 24px);
  font-weight: var(--type-hand-weight, 600);
  line-height: 1.15;
  color: var(--on-surface);
}

.card__meta li { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.card__meta li > svg { width: 1.1em; height: 1.1em; flex: none; }

.card__progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}
.card__progress-bar {
  height: 8px;
  box-sizing: border-box;
  background: var(--surface-container);
  border: var(--stroke-inner) solid var(--outline);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.card__progress-bar > span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  background: var(--action-primary);
  border-right: var(--stroke-inner) solid var(--indicator-edge);
  box-sizing: border-box;
}

.card__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: var(--stroke-inner) dashed var(--outline-container);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}
.card__actions + .card__foot { margin-top: var(--space-sm); }
.card__foot > svg { width: 1.25em; height: 1.25em; flex: none; }

.card__likes {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: var(--touch-target-min);
  padding: 0 var(--space-xs);
  margin: calc(var(--space-xs) * -1) 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.card__likes svg { width: 1.2em; height: 1.2em; }
.card__likes[aria-pressed="true"] { color: var(--on-surface); }
.card__likes[aria-pressed="true"] svg { fill: currentColor; }
.card__likes:hover { color: var(--on-surface); background: var(--action-ghost-hover); }
.card__likes:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: 2px; }

.card__ext { width: 1em; height: 1em; margin-left: var(--space-2xs); vertical-align: -0.1em; }

/* ------------------------------------------------------------
   Card · kâğıt varyantları (Astro/Totem'de süslü, Stone'da sade)
   .card--tape    bantlı kâğıt   --card-tilt, --card-tape
   .card--note    defter fişi    --card-tape (görsel bantları)
   .card--sticker çıkartma       --card-cat
   ------------------------------------------------------------ */

/* Bantlı kâğıt: hafif eğik, üstte bant; hover'da düzelir (card--interactive) */
.card--tape {
  overflow: visible;
  transform: rotate(var(--card-tilt, calc(var(--sticker-tilt) * 0.4)));
}
.card--tape:nth-child(even),
:nth-child(even) > .card--tape {
  --card-tilt: calc(var(--sticker-tilt) * -0.3);
}
.card--tape::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -12px;
  left: 50%;
  width: 88px;
  height: 24px;
  background: var(--card-tape, var(--expressive-2));
  opacity: 0.8;
  border-inline: 2px dashed var(--outline-variant);
  transform: translateX(-50%) rotate(-3deg);
  pointer-events: none;
}
.card--tape > .card__media:first-child {
  overflow: clip;
  border-radius: calc(var(--_r) - var(--stroke-outer)) calc(var(--_r) - var(--stroke-outer)) 0 0;
}
.card--tape.card--horizontal > .card__media:first-child {
  border-radius: calc(var(--_r) - var(--stroke-outer)) 0 0 calc(var(--_r) - var(--stroke-outer));
}

/* Defter fişi: çizgili kâğıt, domates kenar çizgisi, el yazısı başlık; görsel bantla yapışık */
.card--note {
  --_r: var(--radius-sm);
  --_line: 32px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--_line) - 1px), var(--outline-variant) calc(var(--_line) - 1px) var(--_line));
  background-position: 0 calc(var(--_pad) - 6px);
}
.card--note::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 2px;
  background: var(--expressive-pop);
  pointer-events: none;
}
.card--note > .card__body { padding-left: calc(var(--_pad) + 20px); }
.card--note .card__title {
  font-family: var(--type-hand-family);
  font-size: calc(var(--type-hand-size, 24px) * 1.25);
  font-weight: var(--type-hand-weight, 600);
  line-height: var(--_line);
  letter-spacing: 0;
  text-transform: none;
}
.card--note .card__text { line-height: var(--_line); }
.card--note > .card__media {
  z-index: 1;
  margin: calc(var(--_pad) + 4px) var(--_pad) 0 calc(var(--_pad) + 20px);
  overflow: visible;
  border: var(--stroke-inner) solid var(--outline);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--outline-variant);
  transform: rotate(-1.5deg);
}
.card--note > .card__media::before,
.card--note > .card__media::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -10px;
  width: 60px;
  height: 20px;
  background: var(--card-tape, var(--expressive-2));
  opacity: 0.8;
  border-inline: 2px dashed var(--outline-variant);
  pointer-events: none;
}
.card--note > .card__media::before { left: -18px; transform: rotate(-38deg); }
.card--note > .card__media::after { right: -18px; transform: rotate(38deg); }

/* Çıkartma: kalın kontur, kategori renginde kayık gölge + mürekkep kenar */
.card--sticker {
  --_cat: var(--card-cat, var(--expressive-1));
  --_off: 6px;
  --_shadow: var(--_off) var(--_off) 0 0 var(--_cat), var(--_off) var(--_off) 0 var(--stroke-outer) var(--outline);
  border-width: calc(var(--stroke-outer) + 1px);
}
.card--sticker.card--interactive:hover {
  --_off: 9px;
  box-shadow: var(--_shadow);
}
.card--sticker.card--interactive:active:not(:has(.card__actions :active)) {
  --_off: 2px;
  box-shadow: var(--_shadow);
}

/* Stone: süsler kapanır, kartlar sade kalır */
[data-theme="stone"] .card--tape { transform: none; }
[data-theme="stone"] .card--tape::before,
[data-theme="stone"] .card--note::after,
[data-theme="stone"] .card--note > .card__media::before,
[data-theme="stone"] .card--note > .card__media::after { display: none; }
[data-theme="stone"] .card--note { background-image: none; }
[data-theme="stone"] .card--note > .card__media { transform: none; box-shadow: none; }
[data-theme="stone"] .card--sticker { --_shadow: var(--shadow-rest); border-width: var(--stroke-outer); }
[data-theme="stone"] .card--sticker.card--interactive:hover { box-shadow: var(--shadow-hover); }

@media (prefers-reduced-motion: reduce) {
  .card--tape.card--interactive:hover { transform: rotate(var(--card-tilt, calc(var(--sticker-tilt) * 0.4))); }
}

/* ============================================================
   Tag / Etiket — bilgi taşır: kategori, araç, durum, filtre
   .tag · .tag--success|warning|danger|info · .tag--c1..c4 · .tag--sm
   button.tag[aria-pressed] · .tag__remove · .tag-list
   ============================================================ */

.tag {
  --_bg: var(--surface-container);
  --_fg: var(--on-surface-variant);
  --_border: var(--tag-border);
  --_dot: transparent;

  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  box-sizing: border-box;
  max-width: 100%;
  margin: 0;
  padding: var(--space-2xs) var(--space-sm);

  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;

  color: var(--_fg);
  background: var(--_bg);
  border: var(--stroke-inner) solid var(--_border);
  border-radius: var(--radius-sm);
}

.tag > span:not([class]) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag--success { --_bg: var(--feedback-success-container); --_fg: var(--on-feedback-success-container); --_border: var(--feedback-success-border); }
.tag--warning { --_bg: var(--feedback-warning-container); --_fg: var(--on-feedback-warning-container); --_border: var(--feedback-warning-border); }
.tag--danger  { --_bg: var(--feedback-danger-container);  --_fg: var(--on-feedback-danger-container);  --_border: var(--feedback-danger-border); }
.tag--info    { --_bg: var(--feedback-info-container);    --_fg: var(--on-feedback-info-container);    --_border: var(--feedback-info-border); }

.tag--c1 { --_dot: var(--expressive-1); }
.tag--c2 { --_dot: var(--expressive-2); }
.tag--c3 { --_dot: var(--expressive-3); }
.tag--c4 { --_dot: var(--expressive-4); }

.tag:is(.tag--c1, .tag--c2, .tag--c3, .tag--c4)::before {
  content: "";
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border-radius: var(--radius-full);
  background: var(--_dot);
  box-shadow: 0 0 0 var(--stroke-inner) var(--outline);
}

.tag--sm {
  padding: 0 var(--space-xs);
  font-size: calc(var(--type-caption-size) - 1px);
}

button.tag,
a.tag {
  cursor: pointer;
  font: inherit;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  transition: background-color var(--dur-fast) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}

button.tag:hover,
a.tag:hover {
  background-image: linear-gradient(var(--action-ghost-hover), var(--action-ghost-hover));
}
button.tag:active,
a.tag:active {
  background-image: linear-gradient(var(--action-ghost-selected), var(--action-ghost-selected));
}

.tag[aria-pressed="true"],
.tag[aria-selected="true"] {
  --_bg: var(--action-primary);
  --_fg: var(--on-action-primary);
  --_border: var(--outline);
}

.tag:is(button, a):focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.tag:is(button):disabled {
  --_bg: var(--action-disabled);
  --_fg: var(--on-action-disabled);
  --_border: transparent;
  cursor: not-allowed;
  background-image: none;
}

.tag__remove {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  margin: 0 calc(var(--space-xs) * -1) 0 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.tag__remove svg {
  width: 0.9em;
  height: 0.9em;
}
.tag__remove:hover {
  background: var(--action-ghost-hover);
}
.tag__remove:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 1px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (forced-colors: active) {
  .tag { border-color: CanvasText; }
  .tag[aria-pressed="true"] { background: Highlight; color: HighlightText; }
}

/* ============================================================
   Sticker — sadece süsler; tıklanmaz, bilgi taşımaz (aria-hidden="true")
   .sticker · .sticker--c1..c3 · .sticker--flip · .sticker--flat · .sticker--sm · .sticker--corner
   ============================================================ */

.sticker {
  --_bg: var(--expressive-pop);
  --_fg: var(--on-expressive-pop);
  --_tilt: var(--sticker-tilt);
  --_off: calc(var(--shadow-press-offset) / 2);

  display: inline-block;
  box-sizing: border-box;
  margin: 0;
  padding: 0.05em 0.45em 0.1em;

  font-family: var(--type-hand-family);
  font-size: var(--type-hand-size);
  line-height: 1.1;
  font-weight: var(--type-hand-weight);
  letter-spacing: var(--type-hand-tracking);
  text-transform: var(--type-hand-transform);
  white-space: nowrap;

  color: var(--_fg);
  background: var(--_bg);
  border: var(--stroke-outer) solid var(--tag-border);
  border-radius: var(--radius-sm);
  /* Önce hale (Totem'de beyaz kesim kenarı), arkasında halenin şeklini izleyen kayık gölge */
  box-shadow:
    0 0 0 var(--halo-width) var(--halo-color),
    var(--_off) var(--_off) 0 var(--halo-width) var(--outline);
  rotate: calc(var(--_tilt) * 1deg);

  pointer-events: none;
  user-select: none;
}

.sticker--c1 { --_bg: var(--expressive-1); --_fg: var(--on-surface); }
.sticker--c2 { --_bg: var(--expressive-2); --_fg: var(--on-surface); }
.sticker--c3 { --_bg: var(--expressive-3); --_fg: var(--on-surface); }

.sticker--flip { --_tilt: calc(var(--sticker-tilt) * -1); }
.sticker--flat { --_tilt: 0; }

.sticker--sm {
  font-size: calc(var(--type-hand-size) * 0.75);
}

.sticker--corner {
  position: absolute;
  z-index: 2;
  top: var(--space-sm);
  right: var(--space-sm);
}

@media (forced-colors: active) {
  .sticker { border-color: CanvasText; }
}

/* ============================================================
   Site navigation
   .site-nav[data-open] > .site-nav__bar > .site-nav__brand · .site-nav__links · .site-nav__end
   (.site-nav__lang · .site-nav__toggle) · .skip-link · .site-nav--flush
   Dar düzen navigasyonun kendi genişliğine göre (760px) açılır.
   ============================================================ */

.site-nav {
  container-type: inline-size;
  container-name: site-nav;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--space-md) var(--space-md) 0;
}

.site-nav__bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  box-sizing: border-box;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);

  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--nav-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
}

.site-nav__brand {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height-md);
  padding: 0 var(--space-xs);
  border-radius: var(--radius-sm);

  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
  line-height: 1;
  color: inherit;
  text-decoration: none;
}
.site-nav__brand img,
.site-nav__brand svg {
  height: 1.5em;
  width: auto;
}

.site-nav__links {
  order: 2;
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.site-nav__links a {
  display: flex;
  align-items: center;
  min-height: var(--control-height-md);
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);

  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1;
  white-space: nowrap;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.site-nav__links a:hover {
  color: var(--on-surface);
  background: var(--action-ghost-hover);
}
.site-nav__links a[aria-current="page"] {
  color: var(--on-surface);
  background: var(--action-ghost-selected);
  font-weight: var(--type-body-strong-weight);
}

.site-nav__end {
  order: 3;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.site-nav__lang {
  display: flex;
  gap: 0;
  margin: 0;
  padding: var(--space-2xs);
  list-style: none;
  border: var(--stroke-inner) solid var(--nav-border);
  border-radius: var(--radius-full);
}
.site-nav__lang a {
  display: grid;
  place-items: center;
  min-width: 2.25em;
  min-height: calc(var(--control-height-sm) - var(--space-xs) * 2);
  padding: 0 var(--space-sm);
  border-radius: var(--radius-full);

  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-label-weight);
  line-height: 1;
  color: var(--on-surface-variant);
  text-decoration: none;
}
.site-nav__lang a:hover {
  color: var(--on-surface);
  background: var(--action-ghost-hover);
}
/* Seçili dil bir eylem değil, bir durum: ana eylem rengini almaz */
.site-nav__lang a[aria-current="true"] {
  color: var(--on-surface);
  background: var(--action-ghost-selected);
}

.site-nav__toggle {
  display: none;
}
.site-nav__toggle .i-close { display: none; }
.site-nav__toggle[aria-expanded="true"] .i-open { display: none; }
.site-nav__toggle[aria-expanded="true"] .i-close { display: block; }

.site-nav a:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  z-index: 60;
  top: var(--space-sm);
  left: var(--space-md);
  transform: translateY(-200%);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

@container site-nav (max-width: 759px) {
  .site-nav__toggle {
    display: inline-flex;
  }
  .site-nav__end {
    margin-left: auto;
  }
  .site-nav__links {
    order: 4;
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2xs);
    margin: var(--space-xs) 0 0;
    padding: var(--space-sm) 0 var(--space-xs);
    border-top: var(--stroke-inner) solid var(--nav-border);
  }
  .site-nav[data-open="true"] .site-nav__links {
    display: flex;
  }
  .site-nav__links a {
    min-height: var(--control-height-lg);
    font-size: var(--type-body-size);
  }
}

.site-nav--flush {
  padding: 0;
}
.site-nav--flush .site-nav__bar {
  border-width: 0 0 var(--stroke-outer);
  border-radius: 0;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-nav__links a { transition: none; }
}

@media (forced-colors: active) {
  .site-nav__bar { border-color: CanvasText; }
  .site-nav__links a[aria-current="page"] { outline: 2px solid CanvasText; }
}

/* ============================================================
   Section heading / Bölüm başlığı
   .section-head (--lg · --sm · --center) > .section-head__text
   (.section-head__eyebrow · __title · __mark · __meta · __lede) · .section-head__actions
   ============================================================ */

.section-head {
  --_title-family: var(--type-headline-family);
  --_title-size: var(--type-headline-size);
  --_title-line: var(--type-headline-line);
  --_title-weight: var(--type-headline-weight);
  --_title-tracking: var(--type-headline-tracking);
  --_title-transform: var(--type-headline-transform);
  --_gap: var(--space-sm);
  --_after: var(--space-xl);

  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md) var(--space-lg);
  margin: 0 0 var(--_after);
  color: var(--on-surface);
}

.section-head__text {
  display: flex;
  flex-direction: column;
  gap: var(--_gap);
  flex: 1 1 28rem;
  min-width: 0;
}

.section-head__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}

.section-head__title {
  margin: 0;
  font-family: var(--_title-family);
  font-size: var(--_title-size);
  line-height: var(--_title-line);
  font-weight: var(--_title-weight);
  letter-spacing: var(--_title-tracking);
  text-transform: var(--_title-transform);
  text-wrap: balance;
}

/* Başlıktaki bir kelimenin altına fosforlu kalem: expressive-pop */
.section-head__mark {
  color: inherit;
  background: linear-gradient(
    transparent 60%,
    var(--expressive-pop) 60%,
    var(--expressive-pop) 92%,
    transparent 92%
  );
  padding: 0 0.08em;
  margin: 0 -0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.section-head__meta {
  text-transform: none;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-label-weight);
  letter-spacing: 0;
  color: var(--on-surface-variant);
  white-space: nowrap;
  margin-left: var(--space-sm);
  vertical-align: 0.2em;
}

.section-head__lede {
  margin: 0;
  max-width: 60ch;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
  text-wrap: pretty;
}

.section-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-inline);
  flex: none;
  /* Astro/Totem butonlarının kayık gölgesine yer */
  padding: 0 var(--shadow-press-offset) var(--shadow-press-offset) 0;
}

.section-head__actions:has(> .btn--ghost:only-child) {
  padding: 0;
}
.section-head__actions > .btn--ghost:only-child {
  margin-inline: calc((var(--control-pad-x) + var(--stroke-outer)) * -1);
}

.section-head--lg {
  --_title-family: var(--type-display-family);
  --_title-size: var(--type-display-size);
  --_title-line: var(--type-display-line);
  --_title-weight: var(--type-display-weight);
  --_title-tracking: var(--type-display-tracking);
  --_title-transform: var(--type-display-transform);
  --_gap: var(--space-md);
  --_after: var(--space-2xl);
}
.section-head--lg .section-head__lede {
  font-size: calc(var(--type-body-size) * 1.125);
}

.section-head--sm {
  --_title-family: var(--type-title-family);
  --_title-size: var(--type-title-size);
  --_title-line: var(--type-title-line);
  --_title-weight: var(--type-title-weight);
  --_title-tracking: var(--type-title-tracking);
  --_title-transform: var(--type-title-transform);
  --_gap: var(--space-xs);
  --_after: var(--space-md);
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-head--center .section-head__text {
  align-items: center;
  flex-basis: auto;
}
.section-head--center .section-head__eyebrow,
.section-head--center .section-head__actions {
  justify-content: center;
}
.section-head--center .section-head__actions > .btn--ghost:only-child {
  margin-inline: 0;
}

@media (forced-colors: active) {
  .section-head__mark { background: Mark; color: MarkText; }
}

/* ============================================================
   Divider / Ayırıcı
   .divider · --dashed · --solid · --strong · --label (--start) · --vertical · --flush · --lg
   Kesik desen degrade ile çizilir; tire ve boşluk token'dan gelir.
   ============================================================ */

.divider {
  --_c: var(--divider-color);
  --_w: var(--stroke-inner);
  --_dash: var(--divider-dash);
  --_gap: var(--divider-gap);
  --_line: repeating-linear-gradient(
    var(--_dir, 90deg),
    var(--_c) 0 var(--_dash),
    transparent var(--_dash) calc(var(--_dash) + var(--_gap))
  );

  display: block;
  box-sizing: border-box;
  height: var(--_w);
  margin: var(--space-lg) 0;
  padding: 0;
  border: 0;
  background: var(--_line);
  color: var(--on-surface-variant);
}

.divider--dashed {
  --_dash: var(--space-sm);
  --_gap: calc(var(--space-xs) + var(--space-2xs));
}
.divider--solid {
  --_gap: 0px;
}
.divider--strong {
  --_c: var(--outline);
  --_w: var(--stroke-outer);
}

.divider--flush { margin: 0; }
.divider--lg { margin: var(--space-2xl) 0; }

.divider--label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: auto;
  background: none;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  white-space: nowrap;
}
.divider--label::before,
.divider--label::after {
  content: "";
  flex: 1 1 0;
  height: var(--_w);
  background: var(--_line);
}

.divider--label.divider--start::before {
  display: none;
}

.divider--vertical {
  --_dir: 180deg;
  display: inline-block;
  align-self: stretch;
  width: var(--_w);
  height: auto;
  min-height: 1em;
  margin: 0 var(--space-sm);
  vertical-align: middle;
}

@media (forced-colors: active) {
  .divider,
  .divider--label::before,
  .divider--label::after { background: CanvasText; }
  .divider--label { background: none; }
}

/* ============================================================
   Site footer
   .site-footer (--inverse) > .site-footer__inner > .site-footer__top
   (.site-footer__brand · __name · __note · __group · __heading · __links · __ext) ·
   .divider · .site-footer__bottom
   ============================================================ */

.site-footer {
  --_bg: var(--surface-container);
  --_fg: var(--on-surface);
  --_muted: var(--on-surface-variant);
  --_link: var(--on-surface);
  --_ring: var(--focus-ring);

  container-type: inline-size;
  container-name: site-footer;
  color: var(--_fg);
  background: var(--_bg);
  border-top: var(--stroke-outer) solid var(--divider-color);
}

.site-footer__inner {
  box-sizing: border-box;
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
}

.site-footer__top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--space-xl) var(--space-lg);
}

@container site-footer (min-width: 720px) {
  .site-footer__top {
    grid-template-columns: 2fr repeat(auto-fit, minmax(11rem, 1fr));
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  min-width: 0;
}

.site-footer__name {
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  line-height: var(--type-headline-line);
  font-weight: var(--type-headline-weight);
  letter-spacing: var(--type-headline-tracking);
  text-transform: var(--type-headline-transform);
  color: inherit;
  text-decoration: none;
}

.site-footer__note {
  margin: 0;
  max-width: 36ch;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--_muted);
}

.site-footer__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.site-footer__heading {
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  color: var(--_muted);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--control-height-sm);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--_link);
  text-decoration: none;
  text-underline-offset: 0.2em;
}
.site-footer__links a:hover {
  text-decoration: underline;
  text-decoration-thickness: from-font;
}
.site-footer__links a[aria-current="page"] {
  font-weight: var(--type-body-strong-weight);
}

.site-footer__ext {
  width: 0.85em;
  height: 0.85em;
  flex: none;
  color: var(--_muted);
}

.site-footer a:focus-visible {
  outline: var(--stroke-focus) solid var(--_ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.site-footer__inner > .divider {
  margin: var(--space-xl) 0 var(--space-md);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-lg);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--_muted);
}
.site-footer__bottom p {
  margin: 0;
}
.site-footer__bottom a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.site-footer--inverse {
  --_bg: var(--surface-inverse);
  --_fg: var(--on-surface-inverse);
  --_muted: color-mix(in oklab, var(--on-surface-inverse) 72%, var(--surface-inverse));
  --_link: var(--on-surface-inverse);
  /* focus-ring koyu zeminde 3:1'i geçmiyor; açık zemin rengi kullanılır */
  --_ring: var(--on-surface-inverse);
  border-top-color: var(--surface-inverse);
}
.site-footer--inverse .divider {
  --_c: color-mix(in oklab, var(--on-surface-inverse) 40%, var(--surface-inverse));
}

/* 6. Formlar */
/* ============================================================
   Input · Textarea · Select
   .input (input, textarea, select) · .input--sm · .input--lg
   [aria-invalid="true"] · :disabled · [readonly]
   .input-group > .input-group__icon · .input · .btn--ghost (son ek)
   Kontrolün kenarı outline'dır (buton ile aynı); kâğıttan kalkmaz, gölgesi yoktur.
   ============================================================ */

.input {
  --_h: var(--control-height-md);
  --_px: calc(var(--control-pad-x) * 0.75);
  --_bg: var(--surface-container-lowest);
  --_fg: var(--on-surface);
  --_border: var(--outline);
  /* İçe gömük alan: kâğıda kazınmış kuyu. Buton kâğıttan kalkar, alan kâğıda gömülür. Stone'da field-inset 0 */
  --_well: var(--surface-container);

  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--_h);
  margin: 0;
  padding: 0 var(--_px);

  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--_fg);
  background-color: var(--_bg);
  border: var(--stroke-outer) solid var(--_border);
  border-radius: var(--radius-md);
  box-shadow: inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--_well);
  outline: none;
  appearance: none;
  transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}

.input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.85;
}

.input:hover:not(:disabled, [readonly]) {
  --_bg: var(--action-secondary-hover);
}

.input:focus-visible,
.input:focus {
  --_well: var(--surface-container-high);
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.input[aria-invalid="true"] {
  --_border: var(--feedback-danger);
  /* Kalınlaşan kenar: renk tek başına hatayı söylemez */
  box-shadow: inset 0 0 0 var(--stroke-inner) var(--feedback-danger), inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--_well);
}

.input:disabled {
  box-shadow: none;
  --_bg: var(--action-disabled);
  --_fg: var(--on-action-disabled);
  --_border: var(--on-action-disabled);
  cursor: not-allowed;
}
.input:disabled::placeholder { color: var(--on-action-disabled); }

.input[readonly] {
  box-shadow: none;
  --_bg: var(--surface-container);
  --_border: var(--outline-variant);
}

.input--sm {
  --_h: var(--control-height-sm);
  --_px: var(--space-sm);
  font-size: var(--type-label-size);
}
.input--lg {
  --_h: var(--control-height-lg);
  --_px: var(--control-pad-x);
}

/* Sayılar: tutar, adet */
.input--numeric {
  font-variant-numeric: tabular-nums;
  text-align: end;
}

/* Kod, yol, komut */
.input--mono {
  font-family: var(--font-mono);
  font-size: calc(var(--type-body-size) - 2px);
}

textarea.input {
  display: block;
  min-height: calc(var(--_h) * 2);
  padding-block: calc((var(--_h) - 1lh) / 2 - var(--stroke-outer));
  resize: vertical;
}
textarea.input--auto {
  field-sizing: content;
  min-height: var(--_h);
  max-height: 16lh;
  resize: none;
}

/* Select: ok currentColor ile çizilir; her zeminde ve accent'ta mürekkebi izler */
select.input {
  padding-inline-end: calc(var(--_px) + 1.5em);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    right calc(var(--_px) + 0.35em) center,
    right var(--_px) center;
  background-size: 0.35em 0.35em;
  background-repeat: no-repeat;
  cursor: pointer;
}
select.input[multiple] {
  padding: var(--space-xs);
  background-image: none;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.input-group > .input {
  flex: 1 1 auto;
}
.input-group__icon {
  position: absolute;
  inset-inline-start: calc(var(--control-pad-x) * 0.75);
  width: 1.15em;
  height: 1.15em;
  color: var(--on-surface-variant);
  pointer-events: none;
}
.input-group:has(> .input-group__icon:first-child) > .input {
  padding-inline-start: calc(var(--control-pad-x) * 0.75 + 1.15em + var(--space-sm));
}
/* Sondaki ghost buton (temizle, göster, kopyala) kutunun içine oturur */
.input-group > .btn {
  position: absolute;
  inset-inline-end: var(--space-2xs);
  --_h: calc(var(--control-height-md) - var(--space-xs) * 2);
}
.input-group:has(> .btn:last-child) > .input {
  padding-inline-end: calc(var(--control-height-md));
}

@media (forced-colors: active) {
  .input { border-color: FieldText; }
  .input[aria-invalid="true"] { border-color: Mark; }
}

/* ============================================================
   Checkbox · Radio
   input.checkbox · input.radio (indeterminate destekli)
   label.choice > input + .choice__text (> .choice__hint)
   Astro/Totem'de işaretli kutu yarım press-offset kadar mürekkep gölge taşır.
   ============================================================ */

.checkbox,
.radio {
  --_size: calc(var(--type-body-size) * 1.25);
  --_bg: var(--surface-container-lowest);
  --_border: var(--outline);
  --_off: calc(var(--shadow-press-offset) / 2);

  position: relative;
  flex: none;
  display: inline-grid;
  place-content: center;
  box-sizing: border-box;
  width: var(--_size);
  height: var(--_size);
  margin: 0;

  background: var(--_bg);
  border: var(--stroke-outer) solid var(--_border);
  border-radius: calc(var(--radius-sm) * 0.75);
  appearance: none;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-expressive);
}
.radio {
  border-radius: var(--radius-full);
}

.checkbox::before,
.radio::before {
  content: "";
  width: calc(var(--_size) * 0.7);
  height: calc(var(--_size) * 0.7);
  background: var(--on-action-primary);
  scale: 0;
  transition: scale var(--dur-fast) var(--ease-expressive);
}
.checkbox::before {
  -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='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checkbox:indeterminate::before {
  -webkit-mask: none;
          mask: none;
  height: calc(var(--_size) * 0.14);
  min-height: 2px;
  border-radius: var(--radius-full);
  width: calc(var(--_size) * 0.5);
}
.radio::before {
  width: calc(var(--_size) * 0.42);
  height: calc(var(--_size) * 0.42);
  border-radius: var(--radius-full);
}

.checkbox:hover:not(:disabled),
.radio:hover:not(:disabled) {
  --_bg: var(--action-secondary-hover);
}

.checkbox:is(:checked, :indeterminate),
.radio:checked {
  --_bg: var(--action-primary);
  box-shadow: var(--_off) var(--_off) 0 0 var(--outline);
}
.checkbox:is(:checked, :indeterminate):hover:not(:disabled),
.radio:checked:hover:not(:disabled) {
  --_bg: var(--action-primary-hover);
}
.checkbox:is(:checked, :indeterminate)::before,
.radio:checked::before {
  scale: 1;
}

.checkbox:focus-visible,
.radio:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.checkbox[aria-invalid="true"],
.radio[aria-invalid="true"] {
  --_border: var(--feedback-danger);
  outline: var(--stroke-inner) solid var(--feedback-danger);
  outline-offset: 0;
}

.checkbox:disabled,
.radio:disabled {
  --_bg: var(--action-disabled);
  --_border: var(--on-action-disabled);
  box-shadow: none;
  cursor: not-allowed;
}
.checkbox:disabled::before,
.radio:disabled::before {
  background: var(--on-action-disabled);
}

.choice {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-sm);
  min-height: var(--control-height-sm);
  padding-block: calc((var(--control-height-sm) - var(--type-body-size) * 1.25) / 2);
  box-sizing: border-box;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-size) * 1.25);
  color: var(--on-surface);
  cursor: pointer;
}
.choice > :is(.checkbox, .radio, .switch) {
  margin-top: 0;
}
.choice__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}
.choice__hint {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}
.choice:has(:disabled) {
  color: var(--on-action-disabled);
  cursor: not-allowed;
}
.choice:has(:disabled) .choice__hint {
  color: var(--on-action-disabled);
}

@media (forced-colors: active) {
  .checkbox, .radio { border-color: FieldText; }
  .checkbox:is(:checked, :indeterminate), .radio:checked { background: Highlight; }
  .checkbox::before, .radio::before { background: HighlightText; }
}

/* ============================================================
   Switch — anında uygulanan açma-kapama ayarı
   input.switch[role="switch"] (type="checkbox") · .switch--sm
   Kaydet butonu bekleyen formda switch değil checkbox kullanılır.
   ============================================================ */

.switch {
  --_h: calc(var(--type-body-size) * 1.5);
  --_w: calc(var(--_h) * 1.666);
  --_pad: 3px;
  --_thumb: calc(var(--_h) - var(--_pad) * 2 - var(--stroke-outer) * 2);
  --_track: var(--surface-container-high);
  --_knob: var(--surface-container-lowest);
  --_off: calc(var(--shadow-press-offset) / 2);

  position: relative;
  flex: none;
  box-sizing: border-box;
  width: var(--_w);
  height: var(--_h);
  margin: 0;
  background: var(--_track);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-full);
  appearance: none;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color var(--dur-fast) var(--ease-standard);
}

.switch::before {
  content: "";
  position: absolute;
  top: var(--_pad);
  left: var(--_pad);
  width: var(--_thumb);
  height: var(--_thumb);
  box-sizing: border-box;
  background: var(--_knob);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-full);
  transition: translate var(--dur-base) var(--ease-expressive);
}

.switch:hover:not(:disabled) {
  --_track: var(--surface-container-highest);
}

.switch:checked {
  --_track: var(--action-primary);
  box-shadow: var(--_off) var(--_off) 0 0 var(--outline);
}
.switch:checked:hover:not(:disabled) {
  --_track: var(--action-primary-hover);
}
.switch:checked::before {
  translate: calc(var(--_w) - var(--_thumb) - var(--_pad) * 2 - var(--stroke-outer) * 2) 0;
}

.switch:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.switch:disabled {
  --_track: var(--action-disabled);
  --_knob: var(--action-disabled);
  border-color: var(--on-action-disabled);
  box-shadow: none;
  cursor: not-allowed;
}
.switch:disabled::before {
  border-color: var(--on-action-disabled);
}

.switch--sm {
  --_h: calc(var(--type-body-size) * 1.125);
  --_pad: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .switch::before, .checkbox::before, .radio::before { transition: none; }
}
@media (forced-colors: active) {
  .switch { border-color: FieldText; }
  .switch:checked { background: Highlight; }
}

/* ============================================================
   Field — etiket, kontrol, yardım ve hata metni bir arada
   .field > .field__label (.field__optional) · kontrol · .field__hint · .field__error · .field__counter
   .field--row: ayar satırı (metin solda, switch/select sağda)
   fieldset.fieldset > legend.fieldset__legend · .fieldset__options (--row)
   ============================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
  margin: 0;
}

.field__label,
.fieldset__legend {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-body-strong-weight, 600);
  color: var(--on-surface);
}

.field__optional {
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}

.field__hint,
.field__error,
.field__counter {
  margin: 0;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}

/* Hata metni danger zeminin yazı rengini alır: krem ve gri zeminde 4.5:1 */
.field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  color: var(--on-feedback-danger-container);
  font-weight: var(--type-label-weight);
}
.field__error svg {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  margin-top: -0.05em;
  color: var(--feedback-danger);
}
.field__error:empty { display: none; }

.field__foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}
.field__counter {
  margin-inline-start: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.field--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--row-height);
}
.field--row > .field__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}
.field--row .field__label {
  font-weight: var(--type-label-weight);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
}
.field--row > :is(.input, select) {
  width: auto;
  min-width: 10rem;
}

.fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.fieldset__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.fieldset__options--row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-lg);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap-stack);
}

/* ============================================================
   Segmented control — 2-4 seçenekten biri, anında uygulanır
   .segmented[role="radiogroup"] > label.segmented__item > input[type="radio"] + metin/ikon
   .segmented--sm · .segmented--block
   Seçili parça bir durumdur, eylem değil: action-ghost-selected.
   ============================================================ */

.segmented {
  display: inline-flex;
  align-items: stretch;
  gap: var(--space-2xs);
  box-sizing: border-box;
  margin: 0;
  padding: var(--space-2xs);
  background: var(--surface-container-lowest);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-md);
}

.segmented__item {
  --_h: calc(var(--control-height-md) - var(--space-2xs) * 2 - var(--stroke-inner) * 2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--_h);
  padding: 0 calc(var(--control-pad-x) * 0.75);
  border-radius: calc(var(--radius-md) - var(--space-2xs));

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1;
  white-space: nowrap;
  color: var(--on-surface-variant);
  cursor: pointer;
  user-select: none;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.segmented__item > input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.segmented__item svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}
.segmented__item:hover {
  color: var(--on-surface);
  background: var(--action-ghost-hover);
}
.segmented__item:has(input:checked) {
  color: var(--on-surface);
  background: var(--action-ghost-selected);
  font-weight: var(--type-body-strong-weight, 600);
}
.segmented__item:has(input:focus-visible) {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 1px;
}
.segmented__item:has(input:disabled) {
  color: var(--on-action-disabled);
  background: none;
  cursor: not-allowed;
}

.segmented--sm .segmented__item {
  --_h: calc(var(--control-height-sm) - var(--space-2xs) * 2 - var(--stroke-inner) * 2);
  padding: 0 var(--space-sm);
  font-size: var(--type-caption-size);
}
.segmented--block {
  display: flex;
  width: 100%;
}
.segmented--block .segmented__item {
  flex: 1 1 0;
}

@media (forced-colors: active) {
  .segmented { border-color: CanvasText; }
  .segmented__item:has(input:checked) { background: Highlight; color: HighlightText; }
}

/* 7. Geri bildirim */
/* ============================================================
   Alert / Notice — satır içi uyarı, bilgi ve hata kutusu
   .alert (nötr) · .alert--success|warning|danger|info
   > .alert__icon · .alert__body (.alert__title · .alert__text) · .alert__actions · .alert__close
   Durum rengi tek başına anlam taşımaz: ikon ve başlık da durumu söyler.
   ============================================================ */

.alert {
  --_bg: var(--surface-container);
  --_fg: var(--on-surface);
  --_border: var(--outline-container);
  --_mark: var(--surface-inverse);
  --_on-mark: var(--on-surface-inverse);

  display: flex;
  align-items: flex-start;
  gap: var(--space-sm) var(--space-md);
  box-sizing: border-box;
  margin: 0;
  padding: var(--space-md);

  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--_fg);
  background: var(--_bg);
  border: var(--stroke-inner) solid var(--_border);
  border-radius: var(--radius-md);
}

.alert--success { --_bg: var(--feedback-success-container); --_fg: var(--on-feedback-success-container); --_border: var(--feedback-success-border); --_mark: var(--feedback-success); --_on-mark: var(--on-feedback-success); }
.alert--warning { --_bg: var(--feedback-warning-container); --_fg: var(--on-feedback-warning-container); --_border: var(--feedback-warning-border); --_mark: var(--feedback-warning); --_on-mark: var(--on-feedback-warning); }
.alert--danger  { --_bg: var(--feedback-danger-container);  --_fg: var(--on-feedback-danger-container);  --_border: var(--feedback-danger-border);  --_mark: var(--feedback-danger);  --_on-mark: var(--on-feedback-danger); }
.alert--info    { --_bg: var(--feedback-info-container);    --_fg: var(--on-feedback-info-container);    --_border: var(--feedback-info-border);    --_mark: var(--feedback-info);    --_on-mark: var(--on-feedback-info); }

/* İkon Lucide'in daireli durum ikonu (info, circle-check, circle-alert, circle-x).
   Rengi kutunun yazı rengi: açık durum renkleri (Astro nane, gök) açık zeminde 3:1 vermez,
   on-container renkleri verir. */
.alert__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  color: var(--_fg);
}
.alert__icon svg {
  width: 1.25em;
  height: 1.25em;
}

.alert__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.125em;
}

.alert__title {
  margin: 0;
  font-weight: var(--type-body-strong-weight, 600);
}

.alert__text {
  margin: 0;
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
}
.alert__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.alert__close {
  flex: none;
  margin: calc(var(--space-xs) * -1) calc(var(--space-xs) * -1) 0 0;
  color: inherit;
}

/* Sayfa üstünde tam genişlik bant */
.alert--banner {
  border-width: 0 0 var(--stroke-inner);
  border-radius: 0;
  align-items: center;
  padding-block: var(--space-sm);
}
.alert--banner .alert__body { padding-top: 0; }

@media (forced-colors: active) {
  .alert { border-color: CanvasText; }
}

/* ============================================================
   Spinner — buton dışında dönen yükleniyor halkası
   .spinner (1em, yazı boyunu izler) · .spinner--sm · .spinner--lg
   Rengi currentColor; tek başına kullanılırsa role="status" + aria-label.
   ============================================================ */

.spinner {
  display: inline-block;
  flex: none;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  border: max(2px, 0.14em) solid currentColor;
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: as-spin 750ms var(--spinner-ease, linear) infinite;
}
.spinner--sm { width: 0.75em; height: 0.75em; border-width: 2px; }
.spinner--lg { width: 2em; height: 2em; border-width: max(3px, 0.12em); }

@keyframes as-spin {
  to { rotate: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* ============================================================
   Status dot — hazır, çalışıyor, kapalı gibi sürekli durumlar
   .status (nötr) · .status--success|warning|danger|info · .status--busy (nabız)
   > .status__dot + metin
   ============================================================ */

.status {
  --_dot: var(--outline-variant);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface);
  white-space: nowrap;
}
.status--success { --_dot: var(--feedback-success); }
.status--warning { --_dot: var(--feedback-warning); }
.status--danger  { --_dot: var(--feedback-danger); }
.status--info    { --_dot: var(--feedback-info); }

.status__dot {
  position: relative;
  flex: none;
  width: 0.6em;
  height: 0.6em;
  background: var(--_dot);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 var(--stroke-inner) var(--indicator-edge);
}

.status--busy .status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--_dot);
  animation: as-pulse 1200ms var(--ease-standard) infinite;
}
@keyframes as-pulse {
  from { opacity: 0.7; scale: 1; }
  to   { opacity: 0;   scale: 2.6; }
}

/* ============================================================
   Progress · Meter
   .progress (> .progress__head (.progress__label · .progress__value)) > .progress__track > .progress__fill
   .progress--indeterminate · .progress--sm
   .meter: aynı görünüm, bir kapasitenin doluluğu; .meter--warning · .meter--danger
   ============================================================ */

.progress,
.meter {
  --_fill: var(--action-primary);
  --_h: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.meter { --_fill: var(--feedback-success); }
.meter--warning { --_fill: var(--feedback-warning); }
.meter--danger  { --_fill: var(--feedback-danger); }

.progress__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}
.progress__label { font-weight: var(--type-label-weight); color: var(--on-surface); }
.progress__value { font-variant-numeric: tabular-nums; white-space: nowrap; }

.progress__track {
  position: relative;
  box-sizing: border-box;
  height: var(--_h);
  overflow: hidden;
  background: var(--surface-container);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-full);
}

.progress__fill {
  height: 100%;
  width: 0;
  max-width: 100%;
  background: var(--_fill);
  border-radius: inherit;
  /* Dolgunun ucu çizgiyle biter: Astro/Totem mürekkep, Stone outline-variant (izüstü 3:1) */
  box-shadow: var(--stroke-inner) 0 0 0 var(--indicator-edge);
  transition: width var(--dur-slow) var(--ease-expressive);
}

.progress--sm { --_h: 4px; }
.progress--sm .progress__track { border-width: 0; }

.progress--indeterminate .progress__fill {
  width: 40% !important;
  animation: as-indeterminate 1400ms var(--ease-standard) infinite;
}
@keyframes as-indeterminate {
  from { translate: -100% 0; }
  to   { translate: 250% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .progress__fill { transition: none; }
  .progress--indeterminate .progress__fill { animation-duration: 4s; }
}
@media (forced-colors: active) {
  .progress__track { border-color: CanvasText; }
  .progress__fill { background: Highlight; }
}

/* ============================================================
   Toast — kısa süreli bildirim; sayfanın akışını kesmez
   .toast-region (sağ alt, aria-live) > .toast (--success|warning|danger|info)
   > .toast__icon · .toast__text · .toast__action · .toast__close
   JS: AstroShamans.toast({ text, tone, action, onAction, duration })
   ============================================================ */

.toast-region {
  position: fixed;
  z-index: 90;
  inset-block-end: var(--space-lg);
  inset-inline-end: var(--space-lg);
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: var(--space-sm);
  max-width: min(420px, calc(100vw - var(--space-lg) * 2));
  pointer-events: none;
}
.toast-region--static {
  position: static;
}

.toast {
  --_mark: transparent;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  min-height: var(--control-height-lg);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  border: var(--stroke-outer) solid var(--surface-inverse);
  border-radius: var(--radius-md);
  /* İnce açık hale: koyu toast kayık mürekkep gölgesinden ayrılsın */
  box-shadow: 0 0 0 var(--stroke-inner) var(--surface-container-lowest), var(--shadow-overlay);
  pointer-events: auto;
  animation: as-toast-in var(--dur-base) var(--ease-expressive);
}
.toast[data-leaving="true"] {
  animation: as-toast-out var(--dur-fast) var(--ease-standard) forwards;
}
@keyframes as-toast-in  { from { opacity: 0; translate: 0 var(--space-sm); } }
@keyframes as-toast-out { to   { opacity: 0; translate: 0 var(--space-xs); } }

.toast--success { --_mark: var(--feedback-success); }
.toast--warning { --_mark: var(--feedback-warning); }
.toast--danger  { --_mark: var(--feedback-danger); }
.toast--info    { --_mark: var(--feedback-info); }

.toast__icon {
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border-radius: var(--radius-full);
  background: var(--_mark);
  box-shadow: 0 0 0 var(--stroke-inner) var(--on-surface-inverse);
}
.toast:not([class*="toast--"]) .toast__icon { display: none; }

.toast__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-block: var(--space-xs);
}

.toast__action {
  flex: none;
  min-height: var(--control-height-sm);
  padding: 0 var(--space-sm);
  font: inherit;
  font-weight: var(--type-body-strong-weight, 600);
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.toast__action:hover,
.toast__close:hover {
  background: color-mix(in oklab, var(--on-surface-inverse) 14%, transparent);
}

.toast__close {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--control-height-sm);
  height: var(--control-height-sm);
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.toast__close svg { width: 1.1em; height: 1.1em; }

.toast :is(.toast__action, .toast__close):focus-visible {
  outline: var(--stroke-focus) solid var(--on-surface-inverse);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .toast, .toast[data-leaving="true"] { animation: none; }
}
@media (forced-colors: active) {
  .toast { border-color: CanvasText; }
}

/* ============================================================
   Tooltip — bir kontrolün ek açıklaması; kısa ve etkileşimsiz
   .tooltip-wrap > tetikleyici (aria-describedby) + .tooltip[role="tooltip"]
   .tooltip--bottom · .tooltip--start · .tooltip--end
   Hover ve klavye odağında görünür; Escape ile kapanır (bundle.js).
   ============================================================ */

.tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.tooltip {
  position: absolute;
  z-index: 80;
  inset-block-end: calc(100% + var(--space-xs));
  inset-inline-start: 50%;
  translate: -50% 0;
  box-sizing: border-box;
  width: max-content;
  max-width: 16rem;
  padding: var(--space-2xs) var(--space-sm);

  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  text-align: center;
  text-transform: none;
  white-space: normal;
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  border-radius: var(--radius-sm);
  pointer-events: none;

  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-standard), visibility 0s linear var(--dur-fast);
}

.tooltip-wrap:is(:hover, :focus-within):not([data-dismissed="true"]) > .tooltip,
.tooltip--open {
  opacity: 1;
  visibility: visible;
  transition-delay: 300ms, 300ms;
}
.tooltip-wrap:focus-within:not([data-dismissed="true"]) > .tooltip {
  transition-delay: 0s, 0s;
}

.tooltip--bottom {
  inset-block-end: auto;
  inset-block-start: calc(100% + var(--space-xs));
}
.tooltip--start {
  inset-inline-start: 0;
  translate: none;
}
.tooltip--end {
  inset-inline-start: auto;
  inset-inline-end: 0;
  translate: none;
}

/* Klavye kısayolu tooltip'in içinde */
.tooltip kbd {
  margin-inline-start: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.92em;
  opacity: 0.8;
}

@media (forced-colors: active) {
  .tooltip { border: 1px solid CanvasText; }
}

/* ============================================================
   Dialog / Modal — onay ve kısa formlar için pencere
   dialog.dialog (--sm · --lg) > .dialog__head (.dialog__title · .dialog__close)
   · .dialog__body · .dialog__actions
   JS: [data-dialog-open="id"] · [data-dialog-close] · AstroShamans.confirm({...}) → Promise<boolean>
   ============================================================ */

.dialog {
  --_w: 480px;
  box-sizing: border-box;
  width: min(var(--_w), calc(100vw - var(--space-lg) * 2));
  max-height: calc(100dvh - var(--space-2xl) * 2);
  margin: auto;
  padding: 0;

  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay);
  overflow: auto;
}
dialog.dialog:not([open]) { display: none; }
.dialog[open] {
  display: flex;
  flex-direction: column;
  animation: as-dialog-in var(--dur-base) var(--ease-expressive);
}
.dialog::backdrop {
  background: var(--scrim);
}
@keyframes as-dialog-in {
  from { opacity: 0; translate: 0 var(--space-md); }
}

.dialog--sm { --_w: 380px; }
.dialog--lg { --_w: 720px; }

/* Önizleme ve belgelerde akış içinde gösterim */
.dialog--static {
  position: static;
  display: flex;
  flex-direction: column;
  max-height: none;
  margin: 0;
  overflow: visible;
  animation: none;
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
}

/* Başlık accent'ın type-title'ı; Totem --dialog-title-* ile Inter'e geçer */
.dialog__title {
  margin: 0;
  font-family: var(--dialog-title-family, var(--type-title-family));
  font-size: var(--dialog-title-size, var(--type-title-size));
  line-height: var(--dialog-title-line, var(--type-title-line));
  font-weight: var(--dialog-title-weight, var(--type-title-weight));
  letter-spacing: var(--dialog-title-tracking, var(--type-title-tracking));
  text-transform: var(--dialog-title-transform, var(--type-title-transform));
  text-wrap: balance;
}

.dialog__close {
  margin: calc(var(--space-xs) * -1) calc(var(--space-sm) * -1) 0 0;
}

.dialog__body {
  display: flex;
  flex-direction: column;
  gap: var(--gap-stack);
  padding: 0 var(--space-lg) var(--space-lg);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
}
.dialog__body > p { margin: 0; }

.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--gap-inline);
  padding: var(--space-md) calc(var(--space-lg) + var(--shadow-press-offset)) calc(var(--space-lg) + var(--shadow-press-offset)) var(--space-lg);
  border-top: var(--stroke-inner) solid var(--divider-color);
  background: var(--surface-container-low);
  border-radius: 0 0 calc(var(--radius-lg) - var(--stroke-outer)) calc(var(--radius-lg) - var(--stroke-outer));
}

@media (prefers-reduced-motion: reduce) {
  .dialog[open] { animation: none; }
}
@media (forced-colors: active) {
  .dialog { border-color: CanvasText; }
}

/* 8. İçerik */
/* ============================================================
   Table — veri ve markdown tabloları
   .table-wrap (yatay kaydırma, kap) > table.table (--hover · --striped · --plain)
   th > button.table__sort[aria-sort] · td.num / th.num · tr[aria-selected="true"] · caption
   Satır çizgisi --table-row-border (yoksa surface-container-high): Astro/Totem'de
   kap konturu mürekkep, satır çizgileri açık kâğıt tonu.
   ============================================================ */

.table-wrap {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
}

.table {
  --_row-border: var(--table-row-border);
  --_pad-x: var(--space-md);
  --_pad-y: calc((var(--row-height) - 1lh) / 2);

  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  color: var(--on-surface);
  text-align: start;
}

.table caption {
  padding: var(--space-md) var(--_pad-x) var(--space-sm);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-body-strong-weight, 600);
  text-align: start;
  caption-side: top;
}

.table th,
.table td {
  padding: var(--_pad-y) var(--_pad-x);
  text-align: start;
  vertical-align: top;
  border-bottom: var(--stroke-inner) solid var(--_row-border);
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
  white-space: nowrap;
  vertical-align: bottom;
  background: var(--surface-container-low);
  border-bottom: var(--stroke-inner) solid var(--outline-container);
}

.table tbody tr:last-child > * {
  border-bottom: 0;
}

.table tbody th {
  font-weight: var(--type-label-weight);
}

.table .num {
  text-align: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table__muted {
  color: var(--on-surface-variant);
}

.table__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: calc(var(--space-2xs) * -1) calc(var(--space-xs) * -1);
  padding: var(--space-2xs) var(--space-xs);
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.table__sort::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  opacity: 0.35;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 40%, 0 40%, 0 60%, 100% 60%, 50% 100%);
}
th[aria-sort="ascending"] .table__sort::after  { opacity: 1; clip-path: polygon(50% 15%, 100% 75%, 0 75%); }
th[aria-sort="descending"] .table__sort::after { opacity: 1; clip-path: polygon(0 25%, 100% 25%, 50% 85%); }
th[aria-sort] { color: var(--on-surface); }
.table__sort:hover { background: var(--action-ghost-hover); }
.table__sort:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 1px;
}

.table--hover tbody tr:hover > * {
  background: var(--action-ghost-hover);
}
.table tbody tr[aria-selected="true"] > * {
  background: var(--action-ghost-selected);
}
.table--striped tbody tr:nth-child(even) > * {
  background: var(--surface-container-low);
}

/* Markdown içindeki tablo: kapsız, sadece çizgiler */
.table--plain thead th {
  background: none;
}
.table-wrap:has(> .table--plain) {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.table--plain :is(th, td):first-child { padding-inline-start: 0; }
.table--plain :is(th, td):last-child  { padding-inline-end: 0; }

@media (forced-colors: active) {
  .table-wrap { border-color: CanvasText; }
  .table tbody tr[aria-selected="true"] > * { background: Highlight; color: HighlightText; }
}

/* ============================================================
   Code · Kbd
   code.code (satır içi) · kbd.kbd
   .code-block (--inverse) > .code-block__head (.code-block__lang · copy butonu) > pre > code
   [data-copy] butonu en yakın .code-block'taki kodu kopyalar (bundle.js).
   ============================================================ */

.code {
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.875em;
  line-height: 1;
  color: var(--on-surface);
  background: var(--surface-container);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.kbd {
  display: inline-block;
  min-width: 1.6em;
  box-sizing: border-box;
  padding: 0.1em 0.4em;
  font-family: var(--font-mono);
  font-size: 0.8125em;
  line-height: 1.3;
  text-align: center;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-inner) solid var(--outline-variant);
  border-bottom-width: calc(var(--stroke-inner) + 1px);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.code-block {
  --_bg: var(--surface-container);
  --_fg: var(--on-surface);
  --_muted: var(--on-surface-variant);
  --_border: var(--outline-container);
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  color: var(--_fg);
  background: var(--_bg);
  border: var(--stroke-inner) solid var(--_border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block--inverse {
  --_bg: var(--surface-inverse);
  --_fg: var(--on-surface-inverse);
  --_muted: color-mix(in oklab, var(--on-surface-inverse) 72%, var(--surface-inverse));
  --_border: var(--surface-inverse);
}

.code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--control-height-sm);
  padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-md);
  border-bottom: var(--stroke-inner) solid color-mix(in oklab, var(--_fg) 18%, transparent);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--_muted);
}
.code-block__lang {
  font-family: var(--font-mono);
}
.code-block__head .btn {
  --_fg: var(--_muted);
  color: var(--_muted);
}
.code-block--inverse .code-block__head .btn:hover {
  background: color-mix(in oklab, var(--on-surface-inverse) 14%, transparent);
}

.code-block pre {
  margin: 0;
  padding: var(--space-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: calc(var(--type-body-size) - 2px);
  line-height: 1.6;
  tab-size: 2;
  white-space: pre;
}
.code-block pre code {
  font: inherit;
}

/* Satır numarası olmadan sade vurgular: yorum ve komut istemi */
.code-block .c { color: var(--_muted); font-style: italic; }
.code-block .p { color: var(--_muted); user-select: none; }

.code-block--wrap pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ============================================================
   Disclosure — aç-kapa bölüm ("Düşünce süreci", "Teknik kayıt", SSS)
   details.disclosure (--boxed) > summary.disclosure__summary (+ .disclosure__meta) · .disclosure__body
   ============================================================ */

.disclosure {
  min-width: 0;
  margin: 0;
}

.disclosure__summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height-sm);
  padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-xs);
  margin-inline-start: calc(var(--space-xs) * -1);
  box-sizing: border-box;

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface);
  border-radius: var(--radius-sm);
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.disclosure__summary::-webkit-details-marker { display: none; }

.disclosure__summary::before {
  content: "";
  flex: none;
  width: 0.45em;
  height: 0.45em;
  margin: 0 0.2em;
  border-right: max(1.5px, var(--stroke-inner)) solid currentColor;
  border-bottom: max(1.5px, var(--stroke-inner)) solid currentColor;
  rotate: -45deg;
  transition: rotate var(--dur-fast) var(--ease-expressive);
}
.disclosure[open] > .disclosure__summary::before {
  rotate: 45deg;
  translate: 0 -0.15em;
}

.disclosure__summary:hover {
  background: var(--action-ghost-hover);
}
.disclosure__summary:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 1px;
}

.disclosure__meta {
  margin-inline-start: auto;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight, 400);
  color: var(--on-surface-variant);
  white-space: nowrap;
}

.disclosure__body {
  padding: var(--space-xs) 0 var(--space-sm) calc(0.45em + 0.4em + var(--space-sm));
  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
}
.disclosure__body > :first-child { margin-top: 0; }
.disclosure__body > :last-child { margin-bottom: 0; }

.disclosure--boxed {
  background: var(--surface-container-lowest);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-md);
}
.disclosure--boxed > .disclosure__summary {
  min-height: var(--control-height-md);
  margin: 0;
  padding-inline: var(--space-md);
  border-radius: calc(var(--radius-md) - var(--stroke-inner));
}
.disclosure--boxed[open] > .disclosure__summary {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
.disclosure--boxed > .disclosure__body {
  padding: var(--space-xs) var(--space-md) var(--space-md);
}

.disclosure-group > .disclosure--boxed + .disclosure--boxed {
  margin-top: var(--space-sm);
}

@media (prefers-reduced-motion: reduce) {
  .disclosure__summary::before { transition: none; }
}

/* ============================================================
   List — seçilebilir satırlar (sohbetler, son klasörler, dosyalar)
   .list > .list__heading · li > .list__item (a | button) [aria-current="page" | aria-selected="true"]
   .list__item > .list__icon · .list__text (.list__title · .list__sub) · .list__meta · .list__actions
   ============================================================ */

.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.list > li {
  position: relative;
  min-width: 0;
}

.list__heading {
  padding: var(--space-md) var(--space-sm) var(--space-xs);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}
.list > .list__heading:first-child {
  padding-top: var(--space-xs);
}

.list__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  width: 100%;
  min-height: var(--control-height-md);
  margin: 0;
  padding: var(--space-xs) var(--space-sm);

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  text-align: start;
  text-decoration: none;
  color: var(--on-surface);
  background: none;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard);
}

.list__item:hover {
  background: var(--action-ghost-hover);
}
.list__item:is([aria-current="page"], [aria-current="true"], [aria-selected="true"]) {
  background: var(--action-ghost-selected);
}
.list__item:is([aria-current="page"], [aria-current="true"], [aria-selected="true"]) .list__title {
  font-weight: var(--type-body-strong-weight, 600);
}
.list__item:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: -1px;
}
.list__item:is(:disabled, [aria-disabled="true"]) {
  color: var(--on-action-disabled);
  background: none;
  cursor: not-allowed;
}

.list__icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  color: var(--on-surface-variant);
}

.list__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.list__title,
.list__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list__sub {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}

.list__meta {
  flex: none;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Satır eylemleri (yeniden adlandır, sil): hover ve odakta görünür, satırın üstüne biner */
.list__actions {
  position: absolute;
  inset-block: 0;
  inset-inline-end: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  opacity: 0;
  pointer-events: none;
}
.list > li:is(:hover, :focus-within) > .list__actions {
  opacity: 1;
  pointer-events: auto;
}
.list > li:is(:hover, :focus-within):has(> .list__actions) > .list__item .list__meta {
  visibility: hidden;
}

.list--compact .list__item {
  min-height: var(--control-height-sm);
  padding-block: var(--space-2xs);
}

@media (forced-colors: active) {
  .list__item:is([aria-current="page"], [aria-selected="true"]) { outline: 2px solid CanvasText; }
}

/* ============================================================
   Empty state — boş ekranın başlığı, açıklaması ve örnek eylemleri
   .empty (--sm) > .empty__art · .empty__title · .empty__text · .empty__actions · .empty__suggestions > button.suggestion
   ============================================================ */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}

.empty__art {
  width: 96px;
  height: 96px;
  margin-bottom: var(--space-sm);
}
.empty__art svg { width: 100%; height: 100%; display: block; }

.empty__title {
  margin: 0;
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  line-height: var(--type-headline-line);
  font-weight: var(--type-headline-weight);
  letter-spacing: var(--type-headline-tracking);
  text-transform: var(--type-headline-transform);
  color: var(--on-surface);
  text-wrap: balance;
}

.empty__text {
  margin: 0;
  max-width: 46ch;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
  text-wrap: pretty;
}

.empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap-inline);
  margin-top: var(--space-md);
}

.empty__suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-md);
  width: 100%;
  margin-top: var(--space-lg);
  padding: 0 var(--shadow-press-offset) var(--shadow-press-offset) 0;
  box-sizing: border-box;
  text-align: start;
}

.empty--sm {
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-xs);
}
.empty--sm .empty__title {
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
}
.empty--sm .empty__text {
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
}
.empty--sm .empty__art { width: 64px; height: 64px; }

/* Öneri: kart görünümlü, tıklanınca istemi dolduran buton */
.suggestion {
  --_lift: round(calc(var(--shadow-press-offset) / -4), 1px);
  --_r: var(--radius-md);
  --_amp: var(--motion-boil-amplitude);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: var(--space-md);

  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  text-align: start;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--_r);
  box-shadow: var(--shadow-rest);
  cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease-expressive), transform var(--dur-fast) var(--ease-expressive);
}
.suggestion__title {
  font-weight: var(--type-body-strong-weight, 600);
}
.suggestion__text {
  color: var(--on-surface-variant);
}
.suggestion:hover {
  box-shadow: var(--shadow-hover);
  transform: translate(var(--_lift), var(--_lift));
  animation: boil var(--motion-boil-duration) steps(1, end) infinite;
}
.suggestion:active {
  box-shadow: var(--shadow-pressed);
  transform: translate(var(--shadow-press-offset), var(--shadow-press-offset));
  animation: none;
}
.suggestion:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .suggestion { transition: none; }
  .suggestion:hover, .suggestion:active { transform: none; }
}

/* 9. Uygulama */
/* ============================================================
   App shell — uygulama ekranları için sol panel + ana alan
   .app-shell[data-sidebar="open|closed"] > .app-sidebar (__head · __body · __foot)
   · .app-main > .app-topbar (__title · __actions) · .app-content
   SiteNav/SiteFooter web sitesi içindir; uygulama ekranı bunu kullanır.
   Panel genişliği --app-sidebar-width (varsayılan 296px). Dar ekranda (720px altı) panel ana alanın üstüne açılır.
   ============================================================ */

.app-shell {
  --_sw: var(--app-sidebar-width, 296px);
  container-type: inline-size;
  container-name: app-shell;
  position: relative;
  display: grid;
  grid-template-columns: var(--_sw) minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  color: var(--on-surface);
  background: var(--surface);
  overflow: hidden;
}
.app-shell[data-sidebar="closed"] {
  grid-template-columns: 0 minmax(0, 1fr);
}
.app-shell[data-sidebar="closed"] > .app-sidebar {
  visibility: hidden;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--surface-container-low);
  border-inline-end: var(--stroke-inner) solid var(--outline-container);
}

.app-sidebar__head,
.app-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  min-height: calc(var(--control-height-md) + var(--space-md) * 2);
  padding: var(--space-md);
}
.app-sidebar__head {
  padding-inline-end: calc(var(--space-md) + var(--shadow-press-offset));
}

.app-sidebar__brand {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: 1.1;
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-sm) var(--space-md);
}

.app-sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border-top: var(--stroke-inner) solid var(--outline-container);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.app-topbar {
  border-bottom: var(--stroke-inner) solid var(--outline-container);
}
.app-topbar__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-strong-weight, 600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.app-topbar--plain {
  border-bottom: 0;
}

.app-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* İçeriği okunur genişlikte ortalar (sohbet, ayarlar) */
.app-column {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--app-column-width, 46rem);
  margin: 0 auto;
  padding: var(--space-lg);
}

@container app-shell (max-width: 719px) {
  .app-shell,
  .app-shell[data-sidebar="closed"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-sidebar {
    position: absolute;
    z-index: 40;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(var(--_sw), 85cqi);
    box-shadow: var(--shadow-overlay);
  }
  .app-shell:not([data-sidebar="open"]) > .app-sidebar {
    visibility: hidden;
  }
  .app-main {
    grid-column: 1;
  }
}

/* ============================================================
   Split pane — sürüklenerek genişliği ayarlanan iki bölme
   .split (--vertical) > .split__pane · .split__handle[role="separator"][tabindex="0"] · .split__pane
   İlk bölmenin boyu --split (px ya da %). JS: sürükleme, ok tuşları (16px), Home/End.
   ============================================================ */

.split {
  --_size: var(--split, 50%);
  display: flex;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.split > .split__pane {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.split > .split__pane:first-child {
  flex: 0 0 var(--_size);
}
.split > .split__pane:last-child {
  flex: 1 1 0;
}

.split__handle {
  position: relative;
  flex: none;
  width: var(--stroke-inner);
  background: var(--outline-container);
  cursor: col-resize;
  touch-action: none;
  outline: none;
}
/* Görünmez tutma alanı 9px; görünen çizgi hover ve odakta kalınlaşır */
.split__handle::before {
  content: "";
  position: absolute;
  inset: 0 -4px;
}
.split__handle::after {
  content: "";
  position: absolute;
  inset: 0 calc(var(--stroke-inner) * -1);
  background: var(--outline);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.split__handle:hover::after,
.split__handle[data-dragging="true"]::after {
  opacity: 1;
}
.split__handle:focus-visible::after {
  opacity: 1;
  background: var(--focus-ring);
  inset: 0 calc(var(--stroke-focus) * -1);
}

.split--vertical {
  flex-direction: column;
}
.split--vertical > .split__handle {
  width: auto;
  height: var(--stroke-inner);
  cursor: row-resize;
}
.split--vertical > .split__handle::before { inset: -4px 0; }
.split--vertical > .split__handle::after { inset: calc(var(--stroke-inner) * -1) 0; }

.split[data-resizing="true"] {
  user-select: none;
}

/* ============================================================
   Chat message — kullanıcı balonu ve asistan metin bloğu
   .thread > .msg.msg--user (> .msg__bubble) · .msg.msg--assistant (> .msg__body)
   .msg__meta · .msg__actions · .msg__typing
   Asistan metni kapsızdır; içindeki markdown .msg__body'nin tipografisini alır.
   ============================================================ */

.thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.msg {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.msg--user {
  align-items: flex-end;
}

.msg__bubble {
  box-sizing: border-box;
  max-width: min(85%, 36rem);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg__body {
  min-width: 0;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: 1.6;
  color: var(--on-surface);
  overflow-wrap: anywhere;
}
.msg__body > :first-child { margin-top: 0; }
.msg__body > :last-child { margin-bottom: 0; }
.msg__body :is(p, ul, ol, .code-block, .table-wrap, .disclosure, .alert) {
  margin: 0 0 var(--space-md);
}
.msg__body :is(ul, ol) {
  padding-inline-start: 1.4em;
}
.msg__body li + li {
  margin-top: var(--space-2xs);
}
.msg__body :is(h2, h3, h4) {
  margin: var(--space-lg) 0 var(--space-sm);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-strong-weight, 600);
}
.msg__body :not(pre) > code {
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-container);
  border-radius: var(--radius-sm);
}
.msg__body a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

.msg__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}

.msg__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-inline-start: calc(var(--space-xs) * -1);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.msg--user .msg__actions {
  margin-inline: 0 calc(var(--space-xs) * -1);
}
.msg:is(:hover, :focus-within) .msg__actions,
.msg:last-child .msg__actions {
  opacity: 1;
}

.msg--error .msg__body {
  color: var(--on-feedback-danger-container);
}

/* Yazıyor: üç nokta sırayla kalkar (Astro/Totem'de adım adım) */
.msg__typing {
  display: inline-flex;
  gap: 0.3em;
  padding: var(--space-sm) 0;
}
.msg__typing span {
  width: 0.45em;
  height: 0.45em;
  background: var(--on-surface-variant);
  border-radius: var(--radius-full);
  animation: as-typing 1200ms var(--ease-expressive) infinite;
}
.msg__typing span:nth-child(2) { animation-delay: 150ms; }
.msg__typing span:nth-child(3) { animation-delay: 300ms; }
@keyframes as-typing {
  0%, 60%, 100% { translate: 0 0; opacity: 0.5; }
  30% { translate: 0 -0.35em; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .msg__typing span { animation: none; opacity: 0.7; }
}
@media (forced-colors: active) {
  .msg__bubble { border: 1px solid CanvasText; }
}

/* ============================================================
   Activity row — ajan ve log ekranları için eylem satırı
   .activity-list > details.activity (--error) > summary.activity__head
   (> .activity__icon · .activity__verb · .activity__target · .activity__end (.tag · .activity__time))
   · .activity__body (çıktı)
   ============================================================ */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity {
  --_border: var(--outline-container);
  min-width: 0;
  background: var(--surface-container-lowest);
  border: var(--stroke-inner) solid var(--_border);
  border-radius: var(--radius-md);
}
.activity--error {
  --_border: var(--feedback-danger-border);
}

.activity__head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  min-height: var(--control-height-md);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  color: var(--on-surface);
  border-radius: calc(var(--radius-md) - var(--stroke-inner));
  list-style: none;
  cursor: pointer;
}
.activity__head::-webkit-details-marker { display: none; }
.activity__head:hover {
  background: var(--action-ghost-hover);
}
.activity__head:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 1px;
}
.activity[open] > .activity__head {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
/* Açılmayan satır: summary yerine div */
div.activity__head { cursor: default; }
div.activity__head:hover { background: none; }

.activity__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--control-height-md) - var(--space-sm) * 2);
  height: calc(var(--control-height-md) - var(--space-sm) * 2);
  color: var(--on-surface);
  background: var(--surface-container);
  border-radius: var(--radius-sm);
}
.activity__icon svg {
  width: 1.1em;
  height: 1.1em;
}
.activity--error .activity__icon {
  color: var(--on-feedback-danger-container);
  background: var(--feedback-danger-container);
}

.activity__verb {
  flex: none;
  font-weight: var(--type-body-strong-weight, 600);
}

.activity__target {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: calc(var(--type-label-size) - 1px);
  color: var(--on-surface-variant);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity__end {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-inline-start: auto;
}
.activity__time {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
}

.activity__body {
  padding: var(--space-sm);
  border-top: var(--stroke-inner) solid var(--_border);
}
.activity__body > .code-block {
  border: 0;
}
.activity__body pre {
  max-height: 16rem;
}

/* ============================================================
   Composer — kendiliğinden uzayan mesaj alanı ve gönder butonu
   form.composer > textarea.composer__input · .composer__bar (> .composer__tools · .composer__send)
   .composer[data-busy="true"]: yanıt yazılırken (gönder yerine durdur butonu gösterilir)
   ============================================================ */

.composer {
  --_r: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--_r);
  box-shadow: var(--shadow-rest);
  cursor: text;
}
.composer:focus-within {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.composer__input {
  box-sizing: border-box;
  width: 100%;
  min-height: calc(1lh + var(--space-md) * 2);
  max-height: 14lh;
  margin: 0;
  padding: var(--space-md) var(--space-md) var(--space-xs);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: inherit;
  background: none;
  border: 0;
  outline: none;
  resize: none;
  field-sizing: content;
}
.composer__input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.85;
}

.composer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm) var(--space-sm);
}
.composer__tools {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  min-width: 0;
}
.composer__tools select.input {
  box-shadow: none;
  width: auto;
  border-color: transparent;
  background-color: transparent;
}
.composer__tools select.input:hover {
  background-color: var(--action-ghost-hover);
}

.composer__send,
.composer__stop {
  flex: none;
}
.composer__stop { display: none; }
.composer[data-busy="true"] .composer__send { display: none; }
.composer[data-busy="true"] .composer__stop { display: inline-flex; }

.composer__hint {
  margin: var(--space-xs) 0 0;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
  text-align: center;
}

/* 10. Gezinme ve seçim */
/* ============================================================
   Tabs — aynı sayfadaki görünümler arasında geçiş
   .tabs > .tabs__list[role="tablist"] > button.tabs__tab[role="tab"][aria-selected] (> .tabs__count)
   · .tabs__panel[role="tabpanel"]
   .tabs--fill: sekmeler eşit genişlik. Seçili sekme bir durumdur: mürekkep alt çizgi, ana eylem rengi değil.
   ============================================================ */

.tabs {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tabs__list {
  display: flex;
  gap: var(--space-2xs);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: var(--stroke-inner) solid var(--outline-container);
}
.tabs__list::-webkit-scrollbar { display: none; }

.tabs__tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--control-height-md);
  margin: 0;
  padding: 0 var(--space-md);

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1;
  white-space: nowrap;
  color: var(--on-surface-variant);
  background: none;
  border: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.tabs__tab svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}
.tabs__tab::after {
  content: "";
  position: absolute;
  inset-inline: var(--space-xs);
  bottom: calc(var(--stroke-inner) * -1);
  height: calc(var(--stroke-outer) + 1px);
  background: var(--on-surface);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  scale: 0 1;
  transition: scale var(--dur-fast) var(--ease-expressive);
}
.tabs__tab:hover {
  color: var(--on-surface);
  background: var(--action-ghost-hover);
}
.tabs__tab[aria-selected="true"] {
  color: var(--on-surface);
  font-weight: var(--type-body-strong-weight, 600);
}
.tabs__tab[aria-selected="true"]::after {
  scale: 1 1;
}
.tabs__tab:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: -2px;
}
.tabs__tab:disabled {
  color: var(--on-action-disabled);
  background: none;
  cursor: not-allowed;
}

.tabs__count {
  min-width: 1.5em;
  padding: 0.15em 0.4em;
  box-sizing: border-box;
  font-size: calc(var(--type-caption-size) - 1px);
  font-weight: var(--type-label-weight);
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
  background: var(--surface-container);
  border-radius: var(--radius-full);
}

.tabs__panel {
  padding-top: var(--space-lg);
}
.tabs__panel[hidden] { display: none; }
.tabs__panel:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.tabs--fill .tabs__tab {
  flex: 1 1 0;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .tabs__tab::after { transition: none; }
}
@media (forced-colors: active) {
  .tabs__tab[aria-selected="true"]::after { background: Highlight; }
}

/* ============================================================
   Menu — bir butondan açılan eylem listesi (daha fazla, sırala, hesap)
   .menu-wrap > button[aria-haspopup="menu"][aria-expanded] + .menu[role="menu"]
   > .menu__label · button.menu__item[role="menuitem"] (> svg · metin · .menu__hint) · .menu__sep
   .menu--end (sağa hizalı) · .menu--up (yukarı açılır) · .menu__item--danger
   JS: AstroShamans.initMenus(): oklar, Home/End, Escape, dışarı tıklama, odağın butona dönmesi.
   ============================================================ */

.menu-wrap {
  position: relative;
  display: inline-flex;
}

.menu {
  position: absolute;
  z-index: 70;
  inset-block-start: calc(100% + var(--space-xs));
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  box-sizing: border-box;
  min-width: 12rem;
  max-width: 20rem;
  margin: 0;
  padding: var(--space-xs);

  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
  animation: as-menu-in var(--dur-fast) var(--ease-expressive);
}
.menu[hidden] { display: none; }
@keyframes as-menu-in {
  from { opacity: 0; translate: 0 calc(var(--space-xs) * -1); }
}

.menu--end {
  inset-inline-start: auto;
  inset-inline-end: 0;
}
.menu--up {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--space-xs));
}
/* Belge ve önizlemede akış içinde */
.menu--static {
  position: static;
  animation: none;
}

.menu__label {
  padding: var(--space-xs) var(--space-sm) var(--space-2xs);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}

.menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-sizing: border-box;
  width: 100%;
  min-height: var(--control-height-sm);
  margin: 0;
  padding: var(--space-xs) var(--space-sm);

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  text-align: start;
  text-decoration: none;
  color: var(--on-surface);
  background: none;
  border: 0;
  border-radius: calc(var(--radius-md) - var(--space-xs));
  cursor: pointer;
}
.menu__item > svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  color: var(--on-surface-variant);
}
.menu__item:is(:hover, :focus-visible) {
  background: var(--action-ghost-hover);
  outline: none;
}
.menu__item:focus-visible {
  box-shadow: inset 0 0 0 var(--stroke-focus) var(--focus-ring);
}
.menu__item[aria-checked="true"] {
  font-weight: var(--type-body-strong-weight, 600);
}
.menu__item[aria-checked]::after {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  margin-inline-start: auto;
  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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  visibility: hidden;
}
.menu__item[aria-checked="true"]::after { visibility: visible; }

.menu__hint {
  margin-inline-start: auto;
  padding-inline-start: var(--space-md);
  font-family: var(--font-mono);
  font-size: calc(var(--type-caption-size) - 1px);
  color: var(--on-surface-variant);
  white-space: nowrap;
}

.menu__item--danger,
.menu__item--danger > svg {
  color: var(--on-feedback-danger-container);
}
.menu__item--danger:is(:hover, :focus-visible) {
  background: var(--feedback-danger-container);
}

.menu__item:is(:disabled, [aria-disabled="true"]) {
  color: var(--on-action-disabled);
  background: none;
  cursor: not-allowed;
}
.menu__item:is(:disabled, [aria-disabled="true"]) > svg { color: inherit; }

.menu__sep {
  height: var(--stroke-inner);
  margin: var(--space-xs) calc(var(--space-xs) * -1);
  background: var(--table-row-border);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .menu { animation: none; }
}
@media (forced-colors: active) {
  .menu { border-color: CanvasText; }
}

/* ============================================================
   Breadcrumb — sayfanın hiyerarşideki yeri
   nav.breadcrumb[aria-label] > ol > li > a · li > [aria-current="page"]
   ============================================================ */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  color: var(--on-surface-variant);
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.breadcrumb li + li::before {
  content: "/";
  margin: 0 var(--space-sm);
  color: var(--outline-variant);
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.breadcrumb a:hover {
  color: var(--on-surface);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.breadcrumb a:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.breadcrumb [aria-current="page"] {
  color: var(--on-surface);
  font-weight: var(--type-body-strong-weight, 600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Pagination — uzun listelerde sayfalar
   nav.pagination[aria-label] > ul > li > a.pagination__item ([aria-current="page"])
   · .pagination__item--prev · --next · span.pagination__gap
   ============================================================ */

.pagination ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  box-sizing: border-box;
  min-width: var(--control-height-md);
  min-height: var(--control-height-md);
  padding: 0 var(--space-sm);

  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
  text-decoration: none;
  background: none;
  border: var(--stroke-inner) solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.pagination__item svg { width: 1.15em; height: 1.15em; }
.pagination__item:hover {
  color: var(--on-surface);
  background: var(--action-ghost-hover);
}
.pagination__item[aria-current="page"] {
  color: var(--on-surface);
  font-weight: var(--type-body-strong-weight, 600);
  background: var(--action-ghost-selected);
  border-color: var(--outline-container);
}
.pagination__item:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.pagination__item[aria-disabled="true"] {
  color: var(--on-action-disabled);
  background: none;
  pointer-events: none;
}
.pagination__gap {
  min-width: var(--control-height-sm);
  text-align: center;
  color: var(--on-surface-variant);
}

/* ============================================================
   Avatar — kişi ya da karakter görseli; yoksa baş harfler
   .avatar (> img | baş harfler) · .avatar--sm · .avatar--lg · .avatar--c1..c3 · .avatar--square
   .avatar-group (üst üste binen)
   ============================================================ */

.avatar {
  --_size: var(--control-height-md);
  --_bg: var(--surface-container);
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--_size);
  height: var(--_size);
  overflow: hidden;

  font-family: var(--type-label-family);
  font-size: calc(var(--_size) * 0.38);
  font-weight: var(--type-body-strong-weight, 600);
  line-height: 1;
  text-transform: uppercase;
  color: var(--on-surface);
  background: var(--_bg);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-full);
  user-select: none;
}
.avatar > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--sm { --_size: var(--control-height-sm); }
.avatar--lg { --_size: calc(var(--control-height-lg) * 1.5); }
.avatar--square { border-radius: var(--radius-md); }

.avatar--c1 { --_bg: var(--expressive-1); }
.avatar--c2 { --_bg: var(--expressive-2); }
.avatar--c3 { --_bg: var(--expressive-3); }

.avatar-group {
  display: inline-flex;
  align-items: center;
}
.avatar-group > .avatar {
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar-group > .avatar + .avatar {
  margin-inline-start: calc(var(--control-height-md) * -0.28);
}

/* ============================================================
   Dropzone — dosya bırakma ve seçme alanı
   label.dropzone > input[type="file"] · .dropzone__icon · .dropzone__title · .dropzone__hint
   [data-dragover="true"] sürüklerken (bundle.js); seçilen dosyalar .dropzone__files listesine yazılır
   ============================================================ */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  box-sizing: border-box;
  min-height: 9rem;
  padding: var(--space-lg);
  text-align: center;

  color: var(--on-surface);
  background: var(--surface-container-low);
  border: var(--stroke-outer) dashed var(--outline-variant);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.dropzone > input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone:hover {
  background: var(--action-ghost-hover);
  border-color: var(--outline);
}
.dropzone:has(input:focus-visible) {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.dropzone[data-dragover="true"] {
  background: var(--action-ghost-selected);
  border-style: solid;
  border-color: var(--outline);
}
.dropzone:has(input:disabled) {
  color: var(--on-action-disabled);
  background: var(--action-disabled);
  border-color: var(--on-action-disabled);
  cursor: not-allowed;
}

.dropzone__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--space-xs);
  color: var(--on-surface-variant);
}
.dropzone__title {
  font-family: var(--type-label-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-strong-weight, 600);
}
.dropzone__title u {
  color: var(--link);
  text-underline-offset: 0.2em;
}
.dropzone__hint {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}

.dropzone__files {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-sm) 0 0;
  padding: 0;
  list-style: none;
}
.dropzone__files:empty { display: none; }

/* 11. Formlar, 2. bölüm */
/* ============================================================
   Combobox — yazarak daraltılan seçim listesi
   .combobox > input.input[role="combobox"] + ul.combobox__list[role="listbox"]
   > li.combobox__option[role="option"] (> .combobox__hint) · li.combobox__empty
   JS: AstroShamans.initComboboxes(): süzme, oklar, Enter, Escape; 'combobox:select' olayı.
   ============================================================ */

.combobox {
  position: relative;
  min-width: 0;
}
.combobox > .input {
  padding-inline-end: calc(var(--control-pad-x) * 0.75 + 1.5em);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    right calc(var(--control-pad-x) * 0.75 + 0.35em) center,
    right calc(var(--control-pad-x) * 0.75) center;
  background-size: 0.35em 0.35em;
  background-repeat: no-repeat;
}

.combobox__list {
  position: absolute;
  z-index: 70;
  inset-inline: 0;
  inset-block-start: calc(100% + var(--space-xs));
  max-height: 16rem;
  margin: 0;
  padding: var(--space-xs);
  overflow-y: auto;
  list-style: none;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
}
.combobox__list[hidden] { display: none; }

.combobox__option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height-sm);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  border-radius: calc(var(--radius-md) - var(--space-xs));
  cursor: pointer;
}
.combobox__option:hover,
.combobox__option[data-active="true"] {
  background: var(--action-ghost-hover);
}
.combobox__option[data-active="true"] {
  box-shadow: inset 0 0 0 var(--stroke-focus) var(--focus-ring);
}
.combobox__option[aria-selected="true"] {
  font-weight: var(--type-body-strong-weight, 600);
}
.combobox__option[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  margin-inline-start: auto;
  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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.combobox__option[hidden] { display: none; }
.combobox__hint {
  margin-inline-start: auto;
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
}
.combobox__option mark {
  color: inherit;
  background: var(--selection);
  border-radius: 2px;
}
.combobox__empty {
  padding: var(--space-sm);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
}

/* ============================================================
   Tag input — yazıp Enter (ya da virgül) ile etiket ekleme
   .tag-input > .tag (> .tag__remove) … + input.tag-input__field
   Görünüm .input ile aynı; etiketler kutunun içinde sarar.
   ============================================================ */

.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  box-sizing: border-box;
  min-height: var(--control-height-md);
  padding: calc(var(--space-xs) - var(--stroke-outer) + 1px) calc(var(--control-pad-x) * 0.5);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--surface-container);
  cursor: text;
}
.tag-input:hover {
  background: var(--action-secondary-hover);
}
.tag-input:focus-within {
  box-shadow: inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--surface-container-high);
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.tag-input[aria-invalid="true"] {
  border-color: var(--feedback-danger);
  box-shadow: inset 0 0 0 var(--stroke-inner) var(--feedback-danger), inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--surface-container);
}
.tag-input__field {
  flex: 1 1 6rem;
  min-width: 6rem;
  min-height: calc(var(--control-height-md) - var(--space-xs) * 2);
  margin: 0;
  padding: 0 var(--space-xs);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  color: var(--on-surface);
  background: none;
  border: 0;
  outline: none;
}
.tag-input__field::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.85;
}

/* ============================================================
   Number input — adım butonlu sayı alanı
   .number-input > button.number-input__step (−) · input.input.input--numeric · button.number-input__step (+)
   min / max / step input'tan okunur; Shift ile 10 adım.
   ============================================================ */

.number-input {
  display: inline-flex;
  align-items: stretch;
  box-sizing: border-box;
  max-width: 100%;
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--surface-container);
}
.number-input:focus-within {
  box-shadow: inset var(--field-inset, 0px) var(--field-inset, 0px) 0 0 var(--surface-container-high);
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.number-input > .input {
  box-shadow: none;
  width: 5.5em;
  min-height: calc(var(--control-height-md) - var(--stroke-outer) * 2);
  text-align: center;
  background: none;
  border: 0;
  border-radius: 0;
  -moz-appearance: textfield;
}
.number-input > .input:focus,
.number-input > .input:focus-visible {
  outline: none;
}
.number-input > .input::-webkit-inner-spin-button,
.number-input > .input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-input__step {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--control-height-md) - var(--stroke-outer) * 2);
  margin: 0;
  padding: 0;
  color: var(--on-surface);
  background: none;
  border: 0;
  cursor: pointer;
}
.number-input__step:first-child {
  border-inline-end: var(--stroke-inner) solid var(--outline-container);
  border-radius: calc(var(--radius-md) - var(--stroke-outer)) 0 0 calc(var(--radius-md) - var(--stroke-outer));
}
.number-input__step:last-child {
  border-inline-start: var(--stroke-inner) solid var(--outline-container);
  border-radius: 0 calc(var(--radius-md) - var(--stroke-outer)) calc(var(--radius-md) - var(--stroke-outer)) 0;
}
.number-input__step svg { width: 1.1em; height: 1.1em; }
.number-input__step:hover:not(:disabled) { background: var(--action-ghost-hover); }
.number-input__step:active:not(:disabled) { background: var(--action-ghost-selected); }
.number-input__step:disabled {
  color: var(--on-action-disabled);
  cursor: not-allowed;
}
.number-input--sm .number-input__step { width: calc(var(--control-height-sm) - var(--stroke-outer) * 2); }
.number-input--sm > .input { --_h: var(--control-height-sm); min-height: calc(var(--control-height-sm) - var(--stroke-outer) * 2); font-size: var(--type-label-size); }

/* ============================================================
   Slider — aralıktan değer seçme
   input[type="range"].slider (--_pct JS ile) · .range-slider (iki uçlu: iki .slider üst üste)
   .slider-field > .slider-field__head (etiket + output) + slider
   Dolgu action-primary değil, mürekkep: değer seçilir, tıklanacak bir eylem değil.
   ============================================================ */

.slider {
  --_pct: 50%;
  --_track: calc(var(--stroke-outer) * 2 + 4px);
  --_thumb: calc(var(--type-body-size) * 1.25);
  --_off: calc(var(--shadow-press-offset) / 2);
  display: block;
  width: 100%;
  height: var(--_thumb);
  margin: 0;
  background: none;
  appearance: none;
  cursor: pointer;
}
.slider::-webkit-slider-runnable-track {
  height: var(--_track);
  background: linear-gradient(to right, var(--on-surface) var(--_pct), var(--surface-container) var(--_pct));
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-full);
}
.slider::-moz-range-track {
  height: var(--_track);
  background: var(--surface-container);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-full);
}
.slider::-moz-range-progress {
  height: var(--_track);
  background: var(--on-surface);
  border-radius: var(--radius-full);
}
.slider::-webkit-slider-thumb {
  width: var(--_thumb);
  height: var(--_thumb);
  margin-top: calc((var(--_track) - var(--stroke-inner) * 2 - var(--_thumb)) / 2);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-full);
  box-shadow: var(--_off) var(--_off) 0 0 var(--outline);
  appearance: none;
  transition: scale var(--dur-fast) var(--ease-expressive);
}
.slider::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--_thumb);
  height: var(--_thumb);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-full);
  box-shadow: var(--_off) var(--_off) 0 0 var(--outline);
}
.slider:hover::-webkit-slider-thumb { scale: 1.1; }
.slider:active::-webkit-slider-thumb { box-shadow: none; }
.slider:focus-visible { outline: none; }
.slider:focus-visible::-webkit-slider-thumb {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.slider:focus-visible::-moz-range-thumb {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.slider:disabled { cursor: not-allowed; opacity: 0.5; }

.slider-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}
.slider-field__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
}
.slider-field__head output {
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-body-strong-weight, 600);
  font-variant-numeric: tabular-nums;
  color: var(--on-surface);
}
.slider-field__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
}

/* İki uçlu: iki slider üst üste; sadece uçları tıklanır, dolgu iki değer arası */
.range-slider {
  --_lo: 20%;
  --_hi: 80%;
  position: relative;
  height: calc(var(--type-body-size) * 1.25);
}
.range-slider > .slider {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.range-slider > .slider::-webkit-slider-thumb { pointer-events: auto; position: relative; z-index: 1; }
.range-slider > .slider::-moz-range-thumb { pointer-events: auto; }
.range-slider > .slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right,
    var(--surface-container) var(--_lo), var(--on-surface) var(--_lo),
    var(--on-surface) var(--_hi), var(--surface-container) var(--_hi));
}
.range-slider > .slider + .slider::-webkit-slider-runnable-track {
  background: none;
  border-color: transparent;
}
.range-slider > .slider::-moz-range-progress { background: none; }

@media (forced-colors: active) {
  .slider::-webkit-slider-thumb { border-color: ButtonText; }
}

/* ============================================================
   Date picker · Calendar
   .datepicker > .input-group (input.input + takvim butonu) + .datepicker__popover > .calendar
   .calendar > .calendar__head (önceki · .calendar__title · sonraki) · table.calendar__grid
   > button.calendar__day ([aria-selected] · [data-today] · [data-outside])
   JS: AstroShamans.calendar(el, {value, min, max, onSelect}) · initDatepickers(). Biçim gg.aa.yyyy.
   ============================================================ */

.datepicker {
  position: relative;
  min-width: 0;
}
.datepicker__popover {
  position: absolute;
  z-index: 70;
  inset-block-start: calc(100% + var(--space-xs));
  inset-inline-start: 0;
  padding: var(--space-sm);
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
}
.datepicker__popover[hidden] { display: none; }

.calendar {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  color: var(--on-surface);
}
.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
}
.calendar__title {
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-body-strong-weight, 600);
}
.calendar__grid {
  border-collapse: collapse;
}
.calendar__grid th {
  padding: 0 0 var(--space-xs);
  font-size: var(--type-caption-size);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
  text-align: center;
}
.calendar__grid td { padding: 1px; }
.calendar__day {
  display: grid;
  place-items: center;
  width: var(--control-height-md);
  height: var(--control-height-md);
  margin: 0;
  padding: 0;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface);
  background: none;
  border: var(--stroke-inner) solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.calendar__day:hover { background: var(--action-ghost-hover); }
/* Komşu ayın günleri tıklanabilir: soluk değil, ikincil renk ve ince yazı (4.5:1) */
.calendar__day[data-outside="true"] { color: var(--on-surface-variant); font-weight: 400; }
.calendar__day[data-today="true"] { border-color: var(--outline); }
.calendar__day[aria-selected="true"] {
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  font-weight: var(--type-body-strong-weight, 600);
}
.calendar__day:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 1px;
}
.calendar__day:disabled {
  color: var(--on-action-disabled);
  background: none;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* ============================================================
   Choice card — kart görünümlü seçenek (radio ya da checkbox)
   .choice-cards (ızgara) > label.choice-card > input.radio|.checkbox + .choice-card__body
   (.choice-card__title · .choice-card__text · .choice-card__meta)
   Seçili kart: action-ghost-selected zemin ve mürekkep kontur (bir durum, eylem değil).
   ============================================================ */

.choice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  box-sizing: border-box;
  min-width: 0;
  padding: var(--space-md);
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.choice-card:hover {
  background: color-mix(in oklab, var(--surface-container-lowest), var(--on-surface) 4%);
}
.choice-card:has(input:checked) {
  background: var(--action-ghost-selected);
  border-color: var(--outline);
  box-shadow: inset 0 0 0 var(--stroke-inner) var(--outline);
}
.choice-card:has(input:focus-visible) {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}
.choice-card > input {
  margin-top: 0.1em;
}
.choice-card > input:focus-visible { outline: none; }
.choice-card:has(input:disabled) {
  color: var(--on-action-disabled);
  background: var(--action-disabled);
  border-color: transparent;
  cursor: not-allowed;
}
.choice-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}
.choice-card__title {
  font-family: var(--type-label-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-strong-weight, 600);
}
.choice-card__text,
.choice-card__meta {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}
.choice-card__meta {
  margin-top: var(--space-xs);
  font-variant-numeric: tabular-nums;
}
/* Kontrolü gizleyip tüm kartı seçici yapan sürüm (görsel seçenekler) */
.choice-card--bare > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   Swatch — renk seçici
   .swatches[role="radiogroup"] > label.swatch > input[type="radio"] + span.swatch__chip (style="--swatch: #hex")
   .swatch--custom (input[type="color"]) · .swatches--sm · .swatches--lg
   Seçili renk çift halkayla işaretlenir: zemin rengi boşluk + mürekkep halka.
   ============================================================ */

.swatches {
  --_size: var(--control-height-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-2xs);
  border: 0;
}
.swatches--sm { --_size: calc(var(--control-height-sm) * 0.75); gap: var(--space-xs); }
.swatches--lg { --_size: var(--control-height-lg); }

.swatch {
  position: relative;
  display: inline-grid;
  flex: none;
  cursor: pointer;
}
.swatch > input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.swatch__chip {
  display: block;
  box-sizing: border-box;
  width: var(--_size);
  height: var(--_size);
  background: var(--swatch, var(--surface-container));
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-full);
  transition: box-shadow var(--dur-fast) var(--ease-expressive);
}
.swatch:hover .swatch__chip {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 calc(2px + var(--stroke-inner)) var(--outline-variant);
}
.swatch:has(input:checked) .swatch__chip {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 calc(2px + var(--stroke-outer) + 1px) var(--outline);
}
.swatch:has(input:focus-visible) .swatch__chip {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: calc(4px + var(--stroke-outer) + 1px);
}
.swatches--square .swatch__chip { border-radius: var(--radius-sm); }

.swatch--custom .swatch__chip {
  display: grid;
  place-items: center;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border-style: dashed;
  border-color: var(--outline-variant);
}
.swatch--custom .swatch__chip svg { width: 55%; height: 55%; }
.swatch--custom > input[type="color"] {
  width: 100%;
  height: 100%;
}

/* 12. İçerik, 2. bölüm */
/* ============================================================
   Gallery · Lightbox — çizimler ve görsel portfolyo
   .gallery (--masonry · --square) > button.gallery__item[data-full] (> img · .gallery__caption)
   dialog.lightbox > .lightbox__figure (img · figcaption) · .lightbox__close · .lightbox__prev · .lightbox__next · .lightbox__count
   JS: AstroShamans.initGalleries(): tıklayınca lightbox, oklar ve Escape.
   ============================================================ */

.gallery {
  --_cols: var(--gallery-columns, 3);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0 var(--shadow-press-offset) var(--shadow-press-offset) 0;
  list-style: none;
}
.gallery--masonry {
  display: block;
  columns: var(--_cols) 12rem;
  column-gap: var(--space-md);
}
.gallery--masonry > * {
  break-inside: avoid;
  margin-bottom: var(--space-md);
}

.gallery__item {
  --_lift: round(calc(var(--shadow-press-offset) / -4), 1px);
  --_r: var(--radius-md);
  --_amp: var(--motion-boil-amplitude);
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--on-surface);
  background: var(--surface-container);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--_r);
  box-shadow: var(--shadow-rest);
  cursor: zoom-in;
  transition: box-shadow var(--dur-fast) var(--ease-expressive), transform var(--dur-fast) var(--ease-expressive);
}
.gallery__item > img,
.gallery__item > svg {
  display: block;
  width: 100%;
  height: auto;
}
.gallery:not(.gallery--masonry) .gallery__item {
  aspect-ratio: 4 / 5;
}
.gallery--square:not(.gallery--masonry) .gallery__item { aspect-ratio: 1 / 1; }
.gallery:not(.gallery--masonry) .gallery__item > :is(img, svg) {
  height: 100%;
  object-fit: cover;
}
.gallery__caption {
  position: absolute;
  inset-inline: var(--space-xs);
  inset-block-end: var(--space-xs);
  padding: var(--space-2xs) var(--space-sm);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  text-align: start;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-sm);
  opacity: 0;
  translate: 0 var(--space-xs);
  transition: opacity var(--dur-fast) var(--ease-standard), translate var(--dur-fast) var(--ease-expressive);
}
.gallery__item:is(:hover, :focus-visible) .gallery__caption {
  opacity: 1;
  translate: 0 0;
}
.gallery__item:hover {
  box-shadow: var(--shadow-hover);
  transform: translate(var(--_lift), var(--_lift));
  animation: boil var(--motion-boil-duration) steps(1, end) infinite;
}
.gallery__item:active {
  box-shadow: var(--shadow-pressed);
  transform: translate(var(--shadow-press-offset), var(--shadow-press-offset));
  animation: none;
}
.gallery__item:focus-visible {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

.lightbox {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: var(--space-xl) var(--space-2xl);
  color: var(--on-surface-inverse);
  background: transparent;
  border: 0;
  overflow: hidden;
}
dialog.lightbox:not([open]) { display: none; }
.lightbox[open] {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
  animation: as-dialog-in var(--dur-base) var(--ease-expressive);
}
.lightbox::backdrop {
  background: color-mix(in oklab, var(--surface-inverse) 92%, transparent);
}
.lightbox__figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
  height: 100%;
  margin: 0;
  justify-content: center;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100dvh - var(--space-xl) * 2 - 3rem);
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox__figure figcaption {
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  text-align: center;
}
.lightbox__count {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}
.lightbox :is(.lightbox__prev, .lightbox__next, .lightbox__close) {
  display: grid;
  place-items: center;
  width: var(--control-height-lg);
  height: var(--control-height-lg);
  padding: 0;
  color: var(--on-surface-inverse);
  background: none;
  border: var(--stroke-inner) solid color-mix(in oklab, var(--on-surface-inverse) 40%, transparent);
  border-radius: var(--radius-full);
  cursor: pointer;
}
.lightbox :is(.lightbox__prev, .lightbox__next, .lightbox__close):hover {
  background: color-mix(in oklab, var(--on-surface-inverse) 14%, transparent);
}
.lightbox :is(.lightbox__prev, .lightbox__next, .lightbox__close):focus-visible {
  outline: var(--stroke-focus) solid var(--on-surface-inverse);
  outline-offset: 2px;
}
.lightbox :is(.lightbox__prev, .lightbox__next, .lightbox__close) svg { width: 1.4em; height: 1.4em; }
.lightbox__prev { grid-column: 1; }
.lightbox__next { grid-column: 3; }
.lightbox__close {
  position: absolute;
  inset-block-start: var(--space-md);
  inset-inline-end: var(--space-md);
}

@media (prefers-reduced-motion: reduce) {
  .gallery__item, .gallery__caption { transition: none; }
  .gallery__item:hover, .gallery__item:active { transform: none; }
}

/* ============================================================
   Timeline — tarihli olay listesi (süreç, sürüm geçmişi, proje hikâyesi)
   ol.timeline > li.timeline__item (--done · --current) > .timeline__marker + .timeline__content
   (.timeline__date · .timeline__title · .timeline__text)
   Çizgi divider-dash / divider-gap ile çizilir: Astro'da kesikli.
   ============================================================ */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline__item {
  --_dot: calc(var(--type-body-size) * 0.75);
  position: relative;
  display: grid;
  grid-template-columns: var(--_dot) 1fr;
  gap: 0 var(--space-md);
  padding-bottom: var(--space-lg);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  inset-block: calc(var(--_dot) + 0.4em + var(--space-xs)) 0;
  inset-inline-start: calc(var(--_dot) / 2 - var(--stroke-inner) / 2);
  width: var(--stroke-inner);
  background: repeating-linear-gradient(180deg, var(--divider-color) 0 var(--divider-dash), transparent var(--divider-dash) calc(var(--divider-dash) + var(--divider-gap)));
}
.timeline__item:last-child::before { display: none; }
.timeline__marker {
  box-sizing: border-box;
  width: var(--_dot);
  height: var(--_dot);
  margin-top: 0.4em;
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-full);
}
.timeline__item--done .timeline__marker { background: var(--on-surface); }
.timeline__item--current .timeline__marker {
  background: var(--expressive-pop);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 calc(3px + var(--stroke-inner)) var(--outline);
}
.timeline__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}
.timeline__date {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
}
.timeline__title {
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-strong-weight, 600);
  color: var(--on-surface);
}
.timeline__text {
  margin: 0;
  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
}

/* ============================================================
   Stepper — çok adımlı akışta nerede olunduğu
   ol.stepper (--vertical) > li.stepper__step ([data-state="done"] · [aria-current="step"])
   > .stepper__marker (numara ya da tik) + .stepper__label (> .stepper__hint)
   ============================================================ */

.stepper {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.stepper__step {
  --_m: calc(var(--control-height-sm) * 0.875);
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  text-align: center;
  counter-increment: step;
}
.stepper__step + .stepper__step::before {
  content: "";
  position: absolute;
  inset-block-start: calc(var(--_m) / 2);
  inset-inline: calc(-50% + var(--_m) / 2 + var(--space-xs)) calc(50% + var(--_m) / 2 + var(--space-xs));
  height: var(--stroke-inner);
  background: var(--outline-container);
}
.stepper__step:is([data-state="done"], [aria-current="step"]) + .stepper__step::before,
.stepper__step[data-state="done"]::before {
  background: var(--outline);
}
.stepper__marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--_m);
  height: var(--_m);
  font-family: var(--type-label-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-body-strong-weight, 600);
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline-container);
  border-radius: var(--radius-full);
}
.stepper__marker:empty::before { content: counter(step); }
.stepper__step[aria-current="step"] .stepper__marker {
  color: var(--on-surface);
  border-color: var(--outline);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 calc(3px + var(--stroke-inner)) var(--outline);
}
.stepper__step[data-state="done"] .stepper__marker {
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  border-color: var(--surface-inverse);
}
.stepper__step[data-state="done"] .stepper__marker:empty::before {
  content: "";
  width: 55%;
  height: 55%;
  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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stepper__label {
  display: flex;
  flex-direction: column;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}
.stepper__step:is([aria-current="step"], [data-state="done"]) .stepper__label { color: var(--on-surface); }
.stepper__step[aria-current="step"] .stepper__label { font-weight: var(--type-body-strong-weight, 600); }
.stepper__hint {
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight, 400);
  color: var(--on-surface-variant);
}

.stepper--vertical {
  flex-direction: column;
  gap: var(--space-lg);
}
.stepper--vertical .stepper__step {
  flex-direction: row;
  align-items: flex-start;
  text-align: start;
  gap: var(--space-md);
}
.stepper--vertical .stepper__step + .stepper__step::before {
  inset-inline: calc(var(--_m) / 2 - var(--stroke-inner) / 2) auto;
  inset-block: calc((var(--space-lg) + var(--space-xs)) * -1) calc(100% + var(--space-xs));
  width: var(--stroke-inner);
  height: auto;
}
.stepper--vertical .stepper__label { padding-top: 0.2em; }

/* ============================================================
   Tree view — iç içe dosya ve klasör listesi
   ul.tree[role="tree"] > li[role="treeitem"][aria-expanded] > .tree__row (> .tree__twisty · .tree__icon · .tree__label · .tree__meta)
   + ul[role="group"] (iç içe). Seçili: aria-selected="true".
   JS: AstroShamans.initTrees(): oklar (aşağı/yukarı gez, sağ aç, sol kapat), Enter seçer, Home/End.
   ============================================================ */

.tree,
.tree [role="group"] {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tree [role="group"] {
  position: relative;
  padding-inline-start: var(--space-md);
}
.tree [role="group"]::before {
  content: "";
  position: absolute;
  inset-block: 0 var(--space-xs);
  inset-inline-start: calc(var(--space-sm) + 0.5em);
  width: var(--stroke-inner);
  background: var(--table-row-border);
}
.tree [aria-expanded="false"] > [role="group"] { display: none; }

.tree__row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--control-height-sm);
  padding: 0 var(--space-sm) 0 var(--space-xs);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  color: var(--on-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}
.tree__row:hover { background: var(--action-ghost-hover); }
[role="treeitem"][aria-selected="true"] > .tree__row {
  background: var(--action-ghost-selected);
  font-weight: var(--type-body-strong-weight, 600);
}
[role="treeitem"]:focus-visible { outline: none; }
[role="treeitem"]:focus-visible > .tree__row {
  box-shadow: inset 0 0 0 var(--stroke-focus) var(--focus-ring);
}

.tree__twisty {
  flex: none;
  display: grid;
  place-items: center;
  width: 1em;
  height: 1em;
  color: var(--on-surface-variant);
}
.tree__twisty::before {
  content: "";
  width: 0.4em;
  height: 0.4em;
  border-right: max(1.5px, var(--stroke-inner)) solid currentColor;
  border-bottom: max(1.5px, var(--stroke-inner)) solid currentColor;
  rotate: -45deg;
  transition: rotate var(--dur-fast) var(--ease-expressive);
}
[aria-expanded="true"] > .tree__row > .tree__twisty::before { rotate: 45deg; translate: 0 -0.1em; }
[role="treeitem"]:not([aria-expanded]) > .tree__row > .tree__twisty::before { display: none; }

.tree__icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  color: var(--on-surface-variant);
}
.tree__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree__meta {
  flex: none;
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .tree__twisty::before { transition: none; }
}

/* 13. Katmanlar */
/* ============================================================
   Popover — bir butondan açılan, içinde kendi içeriği olan küçük panel
   .popover-wrap > button[aria-expanded][aria-controls] + .popover[role="dialog"]
   > .popover__head (.popover__title · kapat) · .popover__body · .popover__actions
   .popover--end · .popover--up · .popover--static
   JS: AstroShamans.initPopovers(): aç/kapa, Escape, dışarı tıklama; açılınca odak içeriğe.
   ============================================================ */

.popover-wrap {
  position: relative;
  display: inline-flex;
}

.popover {
  position: absolute;
  z-index: 75;
  inset-block-start: calc(100% + var(--space-sm));
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-sizing: border-box;
  width: max-content;
  min-width: 14rem;
  max-width: min(22rem, calc(100vw - var(--space-lg) * 2));
  padding: var(--space-md);
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
  animation: as-menu-in var(--dur-fast) var(--ease-expressive);
}
.popover[hidden] { display: none; }
.popover--end { inset-inline-start: auto; inset-inline-end: 0; }
.popover--up { inset-block-start: auto; inset-block-end: calc(100% + var(--space-sm)); }
.popover--static { position: static; animation: none; }

.popover__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}
.popover__title {
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: var(--type-body-strong-weight, 600);
}
.popover__head > .btn {
  margin: calc(var(--space-xs) * -1) calc(var(--space-sm) * -1) 0 0;
}
.popover__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
}
.popover__body > p { margin: 0; }
.popover__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--shadow-press-offset) var(--shadow-press-offset) 0;
}

@media (prefers-reduced-motion: reduce) {
  .popover { animation: none; }
}

/* ============================================================
   Drawer — kenardan kayan panel (ayarlar, ayrıntı, filtre)
   dialog.drawer (--start · --sm · --lg) > .drawer__head (.drawer__title · kapat) · .drawer__body · .drawer__foot
   Açma/kapama Dialog ile aynı: [data-dialog-open="id"] · [data-dialog-close]. Varsayılan sağdan.
   ============================================================ */

.drawer {
  --_w: 420px;
  box-sizing: border-box;
  width: min(var(--_w), 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: 0;
  border-inline-start: var(--stroke-outer) solid var(--card-border);
  box-shadow: var(--shadow-overlay);
  overflow: hidden;
}
dialog.drawer:not([open]) { display: none; }
.drawer[open] {
  display: flex;
  flex-direction: column;
  animation: as-drawer-in var(--dur-base) var(--ease-expressive);
}
.drawer::backdrop { background: var(--scrim); }
@keyframes as-drawer-in { from { translate: 100% 0; } }

.drawer--start {
  margin: 0 auto 0 0;
  border-inline-start: 0;
  border-inline-end: var(--stroke-outer) solid var(--card-border);
}
.drawer--start[open] { animation-name: as-drawer-in-start; }
@keyframes as-drawer-in-start { from { translate: -100% 0; } }
.drawer--sm { --_w: 320px; }
.drawer--lg { --_w: 640px; }
.drawer--static {
  position: static;
  display: flex;
  flex-direction: column;
  height: auto;
  margin: 0;
  animation: none;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: calc(var(--control-height-md) + var(--space-md) * 2);
  box-sizing: border-box;
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--stroke-inner) solid var(--outline-container);
}
.drawer__title {
  margin: 0;
  font-family: var(--dialog-title-family, var(--type-title-family));
  font-size: var(--dialog-title-size, var(--type-title-size));
  line-height: var(--dialog-title-line, var(--type-title-line));
  font-weight: var(--dialog-title-weight, var(--type-title-weight));
  letter-spacing: var(--dialog-title-tracking, var(--type-title-tracking));
  text-transform: var(--dialog-title-transform, var(--type-title-transform));
}
.drawer__head > .btn { margin-inline-end: calc(var(--space-sm) * -1); }
.drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap-stack);
  padding: var(--space-lg);
}
.drawer__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--gap-inline);
  padding: var(--space-md) calc(var(--space-lg) + var(--shadow-press-offset)) calc(var(--space-md) + var(--shadow-press-offset)) var(--space-lg);
  background: var(--surface-container-low);
  border-top: var(--stroke-inner) solid var(--outline-container);
}

@media (prefers-reduced-motion: reduce) {
  .drawer[open] { animation: none; }
}

/* ============================================================
   Command palette — Ctrl K ile açılan arama ve komut listesi
   dialog.command > .command__search (svg + input) · ul.command__list[role="listbox"]
   > li.command__group (başlık) · li.command__item[role="option"] (> svg · metin · .command__hint) · li.command__empty
   .command__foot (klavye ipuçları)
   JS: AstroShamans.initCommand(dialog, {hotkey: 'k'}): süzme, oklar, Enter tıklar, Escape kapatır.
   ============================================================ */

.command {
  box-sizing: border-box;
  width: min(560px, calc(100vw - var(--space-lg) * 2));
  max-height: min(480px, calc(100dvh - 20vh));
  margin: 12vh auto auto;
  padding: 0;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay);
  overflow: hidden;
}
dialog.command:not([open]) { display: none; }
.command[open] {
  display: flex;
  flex-direction: column;
  animation: as-dialog-in var(--dur-base) var(--ease-expressive);
}
.command::backdrop { background: var(--scrim); }
.command--static { position: static; display: flex; flex-direction: column; max-height: none; margin: 0; animation: none; }

.command__search {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
  border-bottom: var(--stroke-inner) solid var(--outline-container);
}
.command__search svg {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  color: var(--on-surface-variant);
}
.command__search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--control-height-lg);
  margin: 0;
  padding: 0;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  color: var(--on-surface);
  background: none;
  border: 0;
  outline: none;
}
.command__search input::placeholder { color: var(--on-surface-variant); opacity: 0.85; }

.command__list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: var(--space-xs);
  overflow-y: auto;
  list-style: none;
}
.command__group {
  padding: var(--space-sm) var(--space-sm) var(--space-2xs);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}
.command__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height-md);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.command__item > svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  color: var(--on-surface-variant);
}
.command__item:hover { background: var(--action-ghost-hover); }
.command__item[data-active="true"] {
  background: var(--action-ghost-selected);
}
.command__item[hidden],
.command__group[hidden] { display: none; }
.command__hint {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: calc(var(--type-caption-size) - 1px);
  color: var(--on-surface-variant);
}
.command__empty {
  padding: var(--space-lg) var(--space-md);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  text-align: center;
  color: var(--on-surface-variant);
}
.command__foot {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  background: var(--surface-container-low);
  border-top: var(--stroke-inner) solid var(--outline-container);
}

/* 14. Veri ve ERP */
/* ============================================================
   Data table — araç çubuğu, filtre çipleri, toplu seçim ve sayfalama ile tablo
   .data-table > .data-table__toolbar (arama · .data-table__filters · eylemler)
   · .data-table__bulkbar[hidden] (.data-table__count · eylemler)
   · .table-wrap > table.table (th/td.table__select > input.checkbox) · .data-table__foot
   Satırlar: tr.table__loading (iskelet) · tr.table__empty (> td > .empty--sm)
   JS: AstroShamans.initDataTables(): başlık checkbox'ı tümünü seçer (indeterminate), seçili satır aria-selected,
   bulkbar sayısı; 'datatable:select' olayı.
   ============================================================ */

.data-table {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

.data-table__toolbar,
.data-table__bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--gap-inline);
  min-height: var(--control-height-md);
}
.data-table__toolbar > .input-group {
  flex: 0 1 18rem;
}
.data-table__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  flex: 1 1 auto;
  min-width: 0;
}
.data-table__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-inline-start: auto;
  padding: 0 var(--shadow-press-offset) var(--shadow-press-offset) 0;
}

/* Toplu seçim çubuğu araç çubuğunun yerini alır: koyu bant */
.data-table__bulkbar {
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  border-radius: var(--radius-md);
}
.data-table__bulkbar[hidden] { display: none; }
.data-table__count {
  margin-inline-end: auto;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-body-strong-weight, 600);
  font-variant-numeric: tabular-nums;
}
.data-table__bulkbar .btn {
  --_fg: var(--on-surface-inverse);
  color: var(--on-surface-inverse);
}
.data-table__bulkbar .btn--ghost:hover {
  background: color-mix(in oklab, var(--on-surface-inverse) 14%, transparent);
}
.data-table__bulkbar .btn:focus-visible {
  outline-color: var(--on-surface-inverse);
}
.data-table:has(.data-table__bulkbar:not([hidden])) .data-table__toolbar { display: none; }

.table .table__select {
  width: 1%;
  padding-inline-end: 0;
  vertical-align: middle;
}
.table .table__select .checkbox { vertical-align: middle; }
.table thead .table__select { vertical-align: middle; }

.table__loading td {
  vertical-align: middle;
}
.table__loading .skeleton { height: 0.8em; }

.table__empty > td {
  padding: 0;
  border-bottom: 0;
}

.data-table__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Description list — anahtar-değer ayrıntı görünümü (kayıt detayı, ayarların özeti)
   dl.desc-list (--stacked · --columns) > .desc-list__row > dt + dd
   ============================================================ */

.desc-list {
  margin: 0;
  font-family: var(--type-body-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
}
.desc-list__row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: var(--space-xs) var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: var(--stroke-inner) solid var(--table-row-border);
}
.desc-list__row:last-child { border-bottom: 0; }
.desc-list dt {
  color: var(--on-surface-variant);
  font-weight: var(--type-label-weight);
}
.desc-list dd {
  margin: 0;
  min-width: 0;
  color: var(--on-surface);
  overflow-wrap: anywhere;
}
.desc-list dd.num,
.desc-list .num {
  font-variant-numeric: tabular-nums;
}
.desc-list--stacked .desc-list__row {
  grid-template-columns: 1fr;
  gap: var(--space-2xs);
}
.desc-list--columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-md) var(--space-lg);
}
.desc-list--columns .desc-list__row {
  grid-template-columns: 1fr;
  gap: var(--space-2xs);
  padding: 0;
  border: 0;
}

/* ============================================================
   Page header — uygulama ve ERP ekranlarının üst bölümü
   .page-header > nav.breadcrumb · .page-header__row (.page-header__text (.page-header__title · .page-header__meta) · .page-header__actions)
   · .page-header__lede · .tabs (isteğe bağlı, altta)
   Başlık accent'ın type-headline'ı; web sayfası başlığı için SectionHead--lg kullanılır.
   ============================================================ */

.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
  margin: 0 0 var(--space-lg);
}
.page-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
}
.page-header__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1 1 20rem;
  min-width: 0;
}
.page-header__title {
  margin: 0;
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  line-height: var(--type-headline-line);
  font-weight: var(--type-headline-weight);
  letter-spacing: var(--type-headline-tracking);
  text-transform: var(--type-headline-transform);
  color: var(--on-surface);
  text-wrap: balance;
}
.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
}
.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-inline);
  flex: none;
  padding: 0 var(--shadow-press-offset) var(--shadow-press-offset) 0;
}
.page-header__lede {
  margin: 0;
  max-width: 64ch;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--on-surface-variant);
}
.page-header > .tabs { margin-top: var(--space-sm); }

/* ============================================================
   Toolbar — ikon ve küçük butonlardan oluşan araç çubuğu (editör, tablo üstü, tuval)
   .toolbar[role="toolbar"][aria-label] > .btn--ghost … · .toolbar__sep · .toolbar__spacer · .toolbar__group
   .toolbar--boxed: kap içinde. JS: AstroShamans.initToolbars(): oklarla gezinme (tek Tab durağı).
   Basılı araç: aria-pressed="true" → action-ghost-selected.
   ============================================================ */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
  min-width: 0;
}
.toolbar--boxed {
  padding: var(--space-2xs);
  background: var(--surface-container-lowest);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-md);
}
.toolbar__group {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}
.toolbar__sep {
  align-self: stretch;
  width: var(--stroke-inner);
  margin: var(--space-xs) var(--space-xs);
  background: var(--table-row-border);
}
.toolbar__spacer { flex: 1 1 auto; }
.toolbar .btn[aria-pressed="true"] {
  --_bg: var(--action-ghost-selected);
  --_bg-hover: var(--action-ghost-selected);
  background: var(--action-ghost-selected);
}

/* ============================================================
   Skeleton — içerik yüklenirken yerini tutan blok
   .skeleton (--text · --circle · --rect) · .skeleton-stack (birkaç satır)
   aria-hidden="true"; kapsayıcıya aria-busy="true".
   ============================================================ */

.skeleton {
  display: block;
  height: 1em;
  background: var(--surface-container-high);
  border-radius: var(--radius-sm);
  animation: as-skeleton 1400ms var(--ease-standard) infinite alternate;
}
.skeleton--text {
  height: 0.75em;
  margin: 0.35em 0;
  border-radius: var(--radius-full);
}
.skeleton--circle {
  width: var(--control-height-md);
  height: var(--control-height-md);
  border-radius: var(--radius-full);
}
.skeleton--rect {
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
}
.skeleton-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.skeleton-stack > .skeleton--text:last-child { width: 60%; }
@keyframes as-skeleton {
  from { opacity: 1; }
  to { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; opacity: 0.7; }
}

/* ============================================================
   Badge — sayaç ve bildirim noktası
   .badge (nötr: koyu) · .badge--muted · .badge--danger · .badge--dot
   .badge-anchor > (buton ya da ikon) + .badge (köşeye oturur)
   Sekme içi sayı için Tabs'in .tabs__count'u kullanılır.
   ============================================================ */

.badge {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 0.4em;
  font-family: var(--type-label-family);
  font-size: calc(var(--type-caption-size) - 1px);
  font-weight: var(--type-body-strong-weight, 600);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--on-surface-inverse);
  background: var(--surface-inverse);
  border-radius: var(--radius-full);
  vertical-align: middle;
}
.badge--muted {
  color: var(--on-surface);
  background: var(--surface-container-high);
}
.badge--danger {
  color: var(--on-feedback-danger);
  background: var(--feedback-danger);
}
.badge--dot {
  min-width: 0;
  width: 0.6rem;
  height: 0.6rem;
  padding: 0;
  font-size: 0;
}

.badge-anchor {
  position: relative;
  display: inline-flex;
}
.badge-anchor > .badge {
  position: absolute;
  z-index: 1;
  inset-block-start: 0;
  inset-inline-end: 0;
  translate: 35% -35%;
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}
.badge-anchor > .badge--dot { translate: 10% -10%; }

/* 15. İkonlar */
/* ============================================================
   Icon — Lucide (1.68.0) ve Lucide çizgisindeki as- ikonları, inline SVG
   svg.icon (.icon--sm · .icon--lg) · rengi currentColor, çizgi her accent'ta 2px
   Bileşenlerin içindeki ikonlar boyunu bileşenden alır; .icon metin içi ve serbest kullanım içindir.
   ============================================================ */

.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
}
.icon--sm { width: 1em; height: 1em; vertical-align: -0.15em; }
.icon--lg { width: 1.5em; height: 1.5em; vertical-align: -0.35em; }

/* 16. Doku */
/* ============================================================
   Doku — kâğıt deseni, grain, oyma bant
   Desenler maske olarak çizilir: rengi --texture-ink (varsayılan outline), görünürlüğü token'dan.
   Stone düz kalır (desen ve grain 0); Astro noktalı defter + hafif grain;
   Totem topografik çizgi + belirgin grain + linocut dalga bandı.
   .texture-paper (accent'ın kâğıt deseni) · --topo · --dots
   .texture-grain (üstüne grain)
   .band (oyma bant) · --c1|c2|c3|pop|ink · --sm|--lg · --flip
   ============================================================ */

:root, [data-theme="stone"] {
  --texture-topo-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cpath fill='none' stroke='black' stroke-width='1.25' stroke-linejoin='round' d='M-21 169 -27 171 -32 174 -37 179 -40 185 -42 191 -42 196 -41 201 -38 207 -29 218 7 251 13 254 19 256 27 256 33 254 37 249 37 244 24 222 16 195 11 183 5 176 -3 170 -11 168 -21 169 M299 169 293 171 288 175 283 180 280 185 278 191 278 196 279 201 282 207 291 218 327 251 333 254 341 256 347 256 353 254 357 249 357 244 344 222 336 195 331 183 325 175 317 170 309 168 299 169 M-48 224 -32 238 -11 262 -3 267 5 270 23 272 31 271 39 270 45 267 50 264 55 259 58 252 58 244 56 238 37 215 32 206 21 180 15 171 8 165 2 160 -5 157 -13 155 -21 154 -29 155 -35 156 -42 159 -48 164 M368 228 360 219 355 211 342 183 336 173 326 163 315 157 305 154 296 154 288 155 280 159 273 163 266 170 261 178 257 188 255 195 254 201 256 207 258 212 265 219 286 236 304 257 312 264 325 270 341 272 357 270 368 265 M-25 -48 -17 -44 -8 -41 3 -40 18 -39 39 -41 47 -44 55 -48 M295 -48 302 -44 310 -42 329 -39 352 -40 361 -42 368 -44 M368 211 360 199 344 170 338 162 331 156 321 149 310 144 283 135 273 133 268 133 265 135 260 140 257 145 239 185 235 198 234 207 236 220 238 225 241 230 248 235 264 242 272 248 291 268 300 275 315 279 334 281 354 280 368 276 M-48 248 -29 268 -19 275 -11 278 -1 280 23 281 34 280 42 278 50 275 56 271 63 264 67 257 69 250 70 243 69 236 66 230 44 206 25 172 19 164 13 158 3 150 -9 144 -38 135 -48 133 M233 -48 234 -40 235 -38 238 -37 252 -39 259 -39 291 -33 317 -31 349 -32 358 -34 368 -36 M-48 -37 -32 -33 -17 -31 7 -31 29 -32 40 -34 50 -37 58 -42 65 -48 M368 195 349 165 342 156 334 148 325 141 301 125 280 107 273 104 265 103 257 106 251 111 244 119 238 129 235 138 231 162 223 193 220 212 221 222 223 233 231 262 233 278 234 281 236 283 240 283 252 281 259 281 291 287 315 289 349 288 360 286 368 284 M-48 283 -27 288 -6 289 27 288 39 286 47 284 60 277 69 267 77 252 79 244 79 238 78 230 74 222 50 198 31 167 19 153 7 142 -21 124 -38 108 -48 104 M213 -48 209 -35 197 -5 196 2 199 4 204 4 212 2 251 -12 268 -17 307 -23 354 -26 368 -30 M-48 -18 -11 -23 31 -26 44 -28 52 -31 60 -35 66 -40 73 -48 M145 109 139 114 134 122 130 132 127 142 127 150 129 155 132 158 137 160 142 161 148 159 161 154 171 145 175 137 174 132 173 127 169 121 164 115 154 109 150 108 145 109 M368 181 353 159 341 145 312 119 294 101 286 95 276 90 267 89 257 92 245 100 235 109 225 121 219 130 215 140 210 209 211 223 214 252 214 265 210 281 197 313 196 321 197 323 199 324 209 323 254 307 273 302 310 297 352 294 368 290 M-48 302 -13 297 36 293 47 291 55 288 61 284 68 278 77 265 85 248 88 231 86 220 82 212 77 207 61 196 55 189 32 158 21 145 -8 119 -30 97 -39 92 -48 89 M203 -48 200 -37 195 -26 180 -1 166 16 136 42 131 48 129 55 128 63 132 80 132 90 130 101 119 132 115 146 113 161 114 171 116 174 119 176 127 177 143 174 178 163 187 162 193 165 197 172 200 182 205 252 204 267 201 281 194 296 185 312 177 324 169 333 139 358 131 368 M-48 -6 -9 -15 37 -21 50 -24 58 -27 66 -33 72 -39 79 -48 M368 168 344 137 307 99 296 88 284 81 278 79 272 78 265 79 257 81 244 89 214 113 206 118 198 119 193 118 187 115 178 109 171 101 161 89 159 82 158 77 159 69 163 60 169 50 177 40 191 27 212 15 244 3 296 -12 318 -17 355 -21 368 -23 M-48 314 -8 304 44 298 53 295 61 291 68 286 75 278 81 270 87 259 91 248 95 236 97 225 97 215 96 206 92 199 88 196 69 188 60 181 52 172 24 138 -17 94 -26 87 -34 82 -42 79 -48 78 M170 368 182 355 195 345 212 335 236 325 276 313 304 306 325 302 357 299 368 297 M196 -48 193 -37 188 -26 181 -14 172 -2 156 14 122 39 116 45 114 50 112 55 112 61 117 82 119 92 117 109 110 133 100 160 93 170 87 175 80 177 74 176 68 174 61 169 48 156 8 107 -8 90 -19 80 -30 73 -40 69 -48 68 M-48 5 -22 -5 -6 -9 10 -12 42 -15 55 -19 63 -23 71 -30 78 -38 85 -48 M368 156 336 116 319 97 301 80 284 71 278 69 272 68 265 69 259 71 248 77 217 99 209 102 201 104 191 101 182 94 176 85 174 80 173 74 174 68 177 60 187 45 199 34 217 23 231 17 265 8 310 -8 328 -12 368 -17 M-48 325 -24 316 -9 312 8 308 45 304 55 301 63 297 69 292 76 285 87 268 97 248 110 211 114 204 118 199 129 191 150 183 167 179 174 179 178 180 184 183 188 190 191 199 194 214 198 238 198 252 197 267 194 280 184 301 170 320 154 335 123 358 115 368 M184 368 193 358 204 350 216 344 230 338 265 328 297 316 312 311 328 308 368 303 M190 -48 186 -35 180 -24 173 -13 164 -2 155 7 145 14 108 37 102 42 98 48 96 53 96 60 107 89 109 98 108 109 104 125 97 144 90 154 82 160 77 162 71 161 66 160 60 156 45 141 19 103 7 90 -9 77 -26 66 -38 59 -48 56 M-48 17 -21 3 -5 -3 13 -6 47 -10 60 -14 68 -19 75 -26 82 -35 90 -48 M368 144 357 130 339 103 329 92 318 82 302 71 291 63 281 59 270 56 264 57 259 59 249 64 222 84 214 89 207 90 199 90 193 87 188 80 186 72 188 61 195 50 205 40 219 33 233 27 256 23 265 20 299 3 316 -3 333 -6 368 -10 M-48 337 -24 325 -6 318 13 314 48 310 56 308 64 304 76 293 86 280 96 260 114 222 124 208 135 199 148 194 161 191 167 191 172 193 178 197 183 206 187 219 191 236 192 249 192 262 189 275 185 286 174 305 159 323 142 336 108 357 103 362 98 368 M197 368 207 359 220 352 233 348 256 343 265 340 296 325 310 319 331 314 368 310 M185 -48 180 -35 174 -22 165 -11 154 -0 143 8 130 16 90 34 83 39 78 45 75 53 76 61 79 66 90 80 95 88 98 97 99 108 96 124 89 138 80 146 76 148 71 148 66 147 61 144 50 133 41 119 29 95 24 89 17 82 -11 64 -30 50 -38 42 -39 39 -40 34 -36 26 -28 18 -17 11 -6 5 4 2 15 -0 52 -2 58 -4 64 -7 71 -12 79 -21 95 -48 M225 44 233 43 239 45 240 48 238 55 231 63 221 71 212 75 206 74 203 71 202 68 202 63 204 58 208 53 214 48 225 44 M368 130 360 117 350 97 344 89 337 82 310 65 292 52 282 42 280 36 282 29 289 21 299 13 312 6 323 2 334 -0 368 -2 M-32 368 -39 360 -40 354 -35 346 -27 337 -13 328 2 323 18 319 52 318 60 315 66 312 74 305 84 292 95 273 116 233 127 217 137 209 148 204 159 202 168 204 174 209 179 219 184 231 186 246 187 259 185 270 182 281 177 293 164 310 148 325 127 338 89 355 82 360 77 368 M214 368 223 364 231 363 238 364 240 368 M288 368 281 360 280 357 281 352 288 342 301 332 313 325 328 321 341 319 368 318 M179 -48 175 -35 169 -24 160 -13 150 -3 135 7 117 15 103 18 77 19 71 21 68 24 63 31 47 60 40 66 36 68 29 68 21 67 11 65 -5 57 -16 47 -19 42 -21 37 -20 29 -18 24 -13 19 -1 12 10 8 21 7 34 7 60 10 64 9 68 8 72 3 77 -5 100 -48 M368 58 362 66 355 68 344 68 331 65 318 58 307 50 301 42 299 34 300 27 305 21 313 15 323 10 333 8 342 7 354 7 368 9 M55 85 63 84 72 86 80 92 85 99 88 108 86 117 82 126 76 132 69 132 63 130 57 124 53 116 50 106 49 97 52 89 55 85 M-15 368 -19 363 -21 358 -21 350 -18 346 -14 341 -3 333 7 329 18 327 32 327 60 330 64 329 69 326 74 320 80 309 114 246 127 227 137 219 148 213 158 213 166 216 172 222 176 231 180 244 181 257 180 268 177 280 172 291 166 301 158 310 149 318 138 325 127 331 117 335 106 337 95 339 77 339 71 341 64 348 54 368 M305 368 300 360 299 352 303 344 312 336 323 330 336 327 350 327 368 329 M174 -48 170 -37 165 -27 158 -17 150 -9 140 -2 129 4 117 7 108 8 100 7 95 5 91 0 90 -5 90 -11 93 -21 105 -48 M15 18 23 18 31 19 36 23 39 27 39 34 36 41 29 47 23 50 15 50 7 48 0 43 -4 37 -4 31 0 25 7 20 15 18 M335 18 344 18 351 19 356 23 359 27 359 34 355 41 349 47 342 50 334 50 326 48 320 43 316 37 316 31 320 25 326 21 335 18 M146 223 154 223 161 225 167 231 172 240 175 251 175 264 173 275 169 286 164 296 156 305 146 314 137 320 125 325 114 328 105 328 97 326 92 323 91 320 90 312 93 299 101 280 114 256 125 239 135 229 146 223 M7 368 2 365 -3 360 -4 355 -4 350 -1 346 5 341 11 339 19 337 26 338 32 340 37 344 39 347 39 352 37 358 32 364 27 368 M327 368 320 363 317 358 316 354 317 349 321 344 326 340 333 338 341 337 347 338 353 341 357 344 359 347 359 352 357 358 354 363 347 368 M169 -48 166 -38 162 -30 156 -22 150 -16 142 -9 133 -5 124 -1 116 -0 109 -1 105 -3 101 -7 100 -13 100 -19 102 -27 111 -48 M146 233 153 233 158 235 163 240 167 247 169 256 170 265 168 275 165 283 161 291 155 299 148 306 140 312 130 317 122 319 114 320 107 318 102 313 100 305 101 294 107 280 117 260 127 246 137 237 146 233 M163 -48 158 -34 148 -22 142 -16 135 -12 129 -10 122 -9 117 -9 113 -12 110 -14 109 -19 109 -26 110 -32 117 -48 M141 244 146 243 151 243 156 246 160 251 162 257 163 264 163 272 160 280 153 293 142 304 133 308 127 310 121 311 116 310 111 307 109 301 109 293 112 281 118 270 125 258 133 249 141 244 M155 -48 151 -37 145 -28 135 -21 127 -19 124 -19 121 -21 118 -27 119 -37 124 -48 M140 256 145 254 148 255 153 259 155 267 154 278 149 288 141 296 132 300 124 301 121 299 118 294 118 288 120 281 124 272 129 265 135 259 140 256'/%3E%3C/svg%3E");
  --texture-dots-image: radial-gradient(circle, #000 1.1px, transparent 1.6px);
  --texture-grain-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -1.4 1.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --texture-paper-image: none;
  --texture-paper-size: 320px 320px;
  --texture-band-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='32' viewBox='0 0 96 32'%3E%3Cpath fill='black' d='M0 32 L0 9.00 L2 9.65 L4 10.29 L6 10.91 L8 11.50 L10 12.04 L12 12.54 L14 12.97 L16 13.33 L18 13.62 L20 13.83 L22 13.96 L24 14.00 L26 13.96 L28 13.83 L30 13.62 L32 13.33 L34 12.97 L36 12.54 L38 12.04 L40 11.50 L42 10.91 L44 10.29 L46 9.65 L48 9.00 L50 8.35 L52 7.71 L54 7.09 L56 6.50 L58 5.96 L60 5.46 L62 5.03 L64 4.67 L66 4.38 L68 4.17 L70 4.04 L72 4.00 L74 4.04 L76 4.17 L78 4.38 L80 4.67 L82 5.03 L84 5.46 L86 5.96 L88 6.50 L90 7.09 L92 7.71 L94 8.35 L96 9.00 L96 32Z'/%3E%3C/svg%3E");
  --texture-ink: var(--outline);
}
[data-theme="astro"] {
  --texture-paper-image: var(--texture-dots-image);
  --texture-paper-size: 20px 20px;
  --texture-band-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='32' viewBox='0 0 96 32'%3E%3Cpath fill='black' d='M0 32 L0 9.00 L2 9.65 L4 10.29 L6 10.91 L8 11.50 L10 12.04 L12 12.54 L14 12.97 L16 13.33 L18 13.62 L20 13.83 L22 13.96 L24 14.00 L26 13.96 L28 13.83 L30 13.62 L32 13.33 L34 12.97 L36 12.54 L38 12.04 L40 11.50 L42 10.91 L44 10.29 L46 9.65 L48 9.00 L50 8.35 L52 7.71 L54 7.09 L56 6.50 L58 5.96 L60 5.46 L62 5.03 L64 4.67 L66 4.38 L68 4.17 L70 4.04 L72 4.00 L74 4.04 L76 4.17 L78 4.38 L80 4.67 L82 5.03 L84 5.46 L86 5.96 L88 6.50 L90 7.09 L92 7.71 L94 8.35 L96 9.00 L96 32Z'/%3E%3C/svg%3E");
}
[data-theme="totem"] {
  --texture-paper-image: var(--texture-topo-image);
  --texture-paper-size: 320px 320px;
  --texture-band-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='32' viewBox='0 0 96 32'%3E%3Cpath fill='black' fill-rule='evenodd' d='M0 32 L0.0 9.0 L3.0 10.1 L6.0 11.1 L9.0 12.0 L12.0 12.9 L15.0 13.4 L18.0 14.0 L21.0 13.5 L24.0 14.0 L27.0 14.3 L30.0 13.8 L33.0 13.5 L36.0 12.2 L39.0 11.8 L42.0 10.7 L45.0 10.0 L48.0 9.1 L51.0 7.6 L54.0 6.8 L57.0 6.0 L60.0 5.8 L63.0 5.1 L66.0 4.1 L69.0 4.4 L72.0 3.7 L75.0 4.2 L78.0 4.0 L81.0 4.4 L84.0 5.8 L87.0 6.0 L90.0 6.8 L93.0 8.5 L96.0 9.0 L96 32Z M2.0 15.2 3.9 15.5 5.8 15.8 7.7 16.2 9.6 16.6 11.5 16.9 13.4 17.2 15.3 17.5 17.2 17.8 19.1 18.0 21.0 18.1 22.9 18.2 24.8 18.2 26.7 18.2 28.6 18.2 30.5 18.1 32.4 17.9 34.3 17.7 36.2 17.5 38.1 17.2 40.0 17.0 40.0 17.0 38.1 17.8 36.2 18.5 34.3 19.1 32.4 19.6 30.5 20.0 28.6 20.4 26.7 20.6 24.8 20.7 22.9 20.8 21.0 20.7 19.1 20.5 17.2 20.3 15.3 19.9 13.4 19.4 11.5 18.9 9.6 18.3 7.7 17.6 5.8 16.9 3.9 16.1 2.0 15.2Z M46.0 15.2 48.3 14.1 50.6 13.1 52.9 12.2 55.2 11.4 57.5 10.6 59.8 9.9 62.1 9.3 64.4 8.9 66.7 8.5 69.0 8.3 71.3 8.2 73.6 8.3 75.9 8.5 78.2 8.8 80.5 9.3 82.8 9.8 85.1 10.5 87.4 11.3 89.7 12.2 92.0 13.2 92.0 13.2 89.7 12.8 87.4 12.3 85.1 11.9 82.8 11.5 80.5 11.2 78.2 11.0 75.9 10.8 73.6 10.8 71.3 10.8 69.0 10.9 66.7 11.1 64.4 11.4 62.1 11.7 59.8 12.1 57.5 12.6 55.2 13.1 52.9 13.6 50.6 14.2 48.3 14.7 46.0 15.2Z M14.0 23.5 16.2 23.6 18.4 23.7 20.6 23.8 22.8 23.8 25.0 23.7 27.2 23.5 29.4 23.2 31.6 22.8 33.8 22.4 36.0 21.9 38.2 21.4 40.4 20.8 42.6 20.2 44.8 19.6 47.0 19.0 49.2 18.4 51.4 17.8 53.6 17.3 55.8 16.8 58.0 16.5 58.0 16.5 55.8 17.3 53.6 18.1 51.4 19.0 49.2 19.8 47.0 20.7 44.8 21.5 42.6 22.2 40.4 22.9 38.2 23.6 36.0 24.1 33.8 24.6 31.6 25.0 29.4 25.2 27.2 25.3 25.0 25.3 22.8 25.2 20.6 25.0 18.4 24.6 16.2 24.1 14.0 23.5Z M64.0 15.2 66.0 14.6 68.0 14.2 70.0 14.0 72.0 13.8 74.0 13.7 76.0 13.7 78.0 13.9 80.0 14.1 82.0 14.4 84.0 14.9 86.0 15.4 88.0 15.9 90.0 16.6 92.0 17.3 94.0 18.0 96.0 18.8 98.0 19.6 100.0 20.4 102.0 21.2 104.0 22.0 104.0 22.0 102.0 21.7 100.0 21.2 98.0 20.7 96.0 20.2 94.0 19.7 92.0 19.1 90.0 18.6 88.0 18.1 86.0 17.5 84.0 17.1 82.0 16.6 80.0 16.2 78.0 15.9 76.0 15.6 74.0 15.4 72.0 15.2 70.0 15.1 68.0 15.1 66.0 15.1 64.0 15.2Z M-32.0 15.2 -30.0 14.6 -28.0 14.2 -26.0 14.0 -24.0 13.8 -22.0 13.7 -20.0 13.7 -18.0 13.9 -16.0 14.1 -14.0 14.4 -12.0 14.9 -10.0 15.4 -8.0 15.9 -6.0 16.6 -4.0 17.3 -2.0 18.0 0.0 18.8 2.0 19.6 4.0 20.4 6.0 21.2 8.0 22.0 8.0 22.0 6.0 21.7 4.0 21.2 2.0 20.7 0.0 20.2 -2.0 19.7 -4.0 19.1 -6.0 18.6 -8.0 18.1 -10.0 17.5 -12.0 17.1 -14.0 16.6 -16.0 16.2 -18.0 15.9 -20.0 15.6 -22.0 15.4 -24.0 15.2 -26.0 15.1 -28.0 15.1 -30.0 15.1 -32.0 15.2Z M-8.0 21.5 -6.1 21.9 -4.2 22.3 -2.3 22.8 -0.4 23.3 1.5 23.8 3.4 24.3 5.3 24.9 7.2 25.4 9.1 25.9 11.0 26.4 12.9 26.8 14.8 27.3 16.7 27.6 18.6 27.9 20.5 28.2 22.4 28.4 24.3 28.5 26.2 28.6 28.1 28.6 30.0 28.6 30.0 28.6 28.1 29.0 26.2 29.3 24.3 29.5 22.4 29.6 20.5 29.6 18.6 29.5 16.7 29.3 14.8 29.0 12.9 28.6 11.0 28.2 9.1 27.7 7.2 27.1 5.3 26.5 3.4 25.9 1.5 25.2 -0.4 24.5 -2.3 23.7 -4.2 23.0 -6.1 22.3 -8.0 21.5Z M88.0 21.5 89.9 21.9 91.8 22.3 93.7 22.8 95.6 23.3 97.5 23.8 99.4 24.3 101.3 24.9 103.2 25.4 105.1 25.9 107.0 26.4 108.9 26.8 110.8 27.3 112.7 27.6 114.6 27.9 116.5 28.2 118.4 28.4 120.3 28.5 122.2 28.6 124.1 28.6 126.0 28.6 126.0 28.6 124.1 29.0 122.2 29.3 120.3 29.5 118.4 29.6 116.5 29.6 114.6 29.5 112.7 29.3 110.8 29.0 108.9 28.6 107.0 28.2 105.1 27.7 103.2 27.1 101.3 26.5 99.4 25.9 97.5 25.2 95.6 24.5 93.7 23.7 91.8 23.0 89.9 22.3 88.0 21.5Z M36.0 27.5 38.1 26.8 40.2 26.1 42.3 25.3 44.4 24.6 46.5 23.8 48.6 23.0 50.7 22.3 52.8 21.6 54.9 20.9 57.0 20.3 59.1 19.8 61.2 19.3 63.3 19.0 65.4 18.7 67.5 18.5 69.6 18.5 71.7 18.5 73.8 18.7 75.9 19.0 78.0 19.4 78.0 19.4 75.9 19.4 73.8 19.4 71.7 19.5 69.6 19.6 67.5 19.9 65.4 20.2 63.3 20.6 61.2 21.1 59.1 21.6 57.0 22.1 54.9 22.7 52.8 23.3 50.7 23.9 48.6 24.6 46.5 25.2 44.4 25.8 42.3 26.3 40.2 26.8 38.1 27.2 36.0 27.5Z M84.0 20.5 85.9 20.7 87.8 21.1 89.7 21.5 91.6 22.0 93.5 22.5 95.4 23.0 97.3 23.6 99.2 24.2 101.1 24.7 103.0 25.3 104.9 25.9 106.8 26.4 108.7 26.9 110.6 27.3 112.5 27.7 114.4 28.1 116.3 28.4 118.2 28.6 120.1 28.8 122.0 29.0 122.0 29.0 120.1 29.2 118.2 29.3 116.3 29.3 114.4 29.3 112.5 29.1 110.6 28.8 108.7 28.5 106.8 28.1 104.9 27.6 103.0 27.1 101.1 26.5 99.2 25.9 97.3 25.2 95.4 24.6 93.5 23.9 91.6 23.2 89.7 22.5 87.8 21.8 85.9 21.1 84.0 20.5Z M-12.0 20.5 -10.1 20.7 -8.2 21.1 -6.3 21.5 -4.4 22.0 -2.5 22.5 -0.6 23.0 1.3 23.6 3.2 24.2 5.1 24.7 7.0 25.3 8.9 25.9 10.8 26.4 12.7 26.9 14.6 27.3 16.5 27.7 18.4 28.1 20.3 28.4 22.2 28.6 24.1 28.8 26.0 29.0 26.0 29.0 24.1 29.2 22.2 29.3 20.3 29.3 18.4 29.3 16.5 29.1 14.6 28.8 12.7 28.5 10.8 28.1 8.9 27.6 7.0 27.1 5.1 26.5 3.2 25.9 1.3 25.2 -0.6 24.6 -2.5 23.9 -4.4 23.2 -6.3 22.5 -8.2 21.8 -10.1 21.1 -12.0 20.5Z'/%3E%3C/svg%3E");
}

.texture-paper,
.texture-grain {
  position: relative;
  isolation: isolate;
}
.texture-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--texture-ink);
  opacity: var(--_tex-op, var(--texture-pattern-opacity));
  -webkit-mask: var(--_tex-img, var(--texture-paper-image)) 0 0 / var(--_tex-size, var(--texture-paper-size)) repeat;
          mask: var(--_tex-img, var(--texture-paper-image)) 0 0 / var(--_tex-size, var(--texture-paper-size)) repeat;
  border-radius: inherit;
}
/* Desen accent'tan bağımsız seçilirse Stone'da da görünür */
.texture-paper--topo { --_tex-img: var(--texture-topo-image); --_tex-size: 320px 320px; --_tex-op: max(var(--texture-pattern-opacity), 0.12); }
.texture-paper--dots { --_tex-img: var(--texture-dots-image); --_tex-size: 20px 20px; --_tex-op: max(var(--texture-pattern-opacity), 0.18); }
.texture-paper--none::before { display: none; }

.texture-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--texture-grain-image) 0 0 / 200px 200px;
  opacity: var(--texture-grain-opacity);
  mix-blend-mode: multiply;
  border-radius: inherit;
}

.band {
  --_c: var(--outline);
  --_h: 32px;
  display: block;
  height: var(--_h);
  margin: 0;
  border: 0;
  background: var(--_c);
  -webkit-mask: var(--texture-band-image) 0 100% / auto 100% repeat-x;
          mask: var(--texture-band-image) 0 100% / auto 100% repeat-x;
}
.band--c1  { --_c: var(--expressive-1); }
.band--c2  { --_c: var(--expressive-2); }
.band--c3  { --_c: var(--expressive-3); }
.band--pop { --_c: var(--expressive-pop); }
.band--surface { --_c: var(--surface); }
.band--sm { --_h: 16px; }
.band--lg { --_h: 56px; }
.band--flip { scale: 1 -1; }

@media (forced-colors: active) {
  .texture-paper::before, .texture-grain::after { display: none; }
  .band { background: CanvasText; }
}

/* 17. Site */
/* ============================================================
   Hero — sayfa açılışı
   .hero (--split · --center) > .hero__inner > .hero__text (.hero__eyebrow · .hero__title · .hero__lede
   · .hero__actions · .hero__note) + .hero__media
   ============================================================ */

.hero {
  --_pad-y: calc(var(--space-2xl) * 1.5);
  box-sizing: border-box;
  padding: var(--_pad-y) var(--space-lg);
  background: var(--surface);
  color: var(--on-surface);
}
.hero__inner {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
  max-width: 72rem;
  margin: 0 auto;
}
.hero--split .hero__inner {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.hero--center .hero__inner {
  justify-items: center;
  text-align: center;
  max-width: 48rem;
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  min-width: 0;
}
.hero--center .hero__text { align-items: center; }

.hero__eyebrow {
  margin: 0;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}
.hero__title {
  margin: 0;
  font-family: var(--type-display-family);
  font-size: calc(var(--type-display-size) * 1.15);
  line-height: var(--type-display-line);
  font-weight: var(--type-display-weight);
  letter-spacing: var(--type-display-tracking);
  text-transform: var(--type-display-transform);
  text-wrap: balance;
}
.hero__mark {
  color: inherit;
  background: linear-gradient(transparent 62%, var(--expressive-pop) 62%, var(--expressive-pop) 92%, transparent 92%);
  padding: 0 0.06em;
  margin: 0 -0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero__lede {
  margin: 0;
  max-width: 34em;
  font-size: calc(var(--type-body-size) * 1.125);
  line-height: 1.55;
  color: var(--on-surface-variant);
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-inline);
  margin-top: var(--space-sm);
}
.hero--center .hero__actions { justify-content: center; }
.hero__note {
  margin: var(--space-xs) 0 0;
  font-family: var(--type-hand-family);
  font-size: var(--type-hand-size);
  line-height: var(--type-hand-line);
  font-weight: var(--type-hand-weight);
  color: var(--on-surface-variant);
  rotate: calc(var(--sticker-tilt) * 0.5deg);
}

.hero__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 34rem;
  background: var(--surface-container);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
  overflow: visible;
  rotate: calc(var(--sticker-tilt) * -0.4deg);
}
.hero__media > img,
.hero__media > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - var(--stroke-outer));
}
.hero__media > .sticker { position: absolute; z-index: 2; top: calc(var(--space-md) * -1); right: calc(var(--space-md) * -0.5); }

@media (max-width: 760px) {
  .hero { --_pad-y: var(--space-2xl); }
  .hero--split .hero__inner { grid-template-columns: 1fr; }
  .hero__media { max-height: 22rem; aspect-ratio: 4 / 3; }
}

/* ============================================================
   Prose — uzun metin (vaka çalışması, yazı, cihaz açıklaması)
   .prose içindeki h2, h3, p, ul, ol, blockquote, figure, hr, code, a otomatik biçimlenir.
   ============================================================ */

.prose {
  max-width: 68ch;
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  line-height: 1.65;
  color: var(--on-surface);
}
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1em; }
.prose > h2 {
  margin-top: 2.2em;
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  line-height: var(--type-headline-line);
  font-weight: var(--type-headline-weight);
  letter-spacing: var(--type-headline-tracking);
  text-transform: var(--type-headline-transform);
  text-wrap: balance;
  scroll-margin-top: var(--space-xl);
}
.prose > h3 {
  margin-top: 1.8em;
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
  scroll-margin-top: var(--space-xl);
}
.prose > h2 + *, .prose > h3 + * { margin-top: 0.6em; }
.prose > :first-child { margin-top: 0; }
.prose :where(ul, ol):not([class]) { padding-left: 1.4em; }
.prose :where(ul, ol):not([class]) > li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--on-surface-variant); }
.prose a { color: var(--link); text-underline-offset: 0.2em; }
.prose a:visited { color: var(--link-visited); }
.prose strong { font-weight: var(--type-body-strong-weight, 600); }
.prose :not(pre) > code {
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-container);
  border-radius: var(--radius-sm);
}
.prose > blockquote:not(.pullquote) {
  padding-left: var(--space-md);
  border-left: calc(var(--stroke-outer) * 2) solid var(--outline);
  color: var(--on-surface-variant);
}
.prose > hr {
  height: 0;
  margin: 2.2em 0;
  border: 0;
  border-top: var(--stroke-inner) solid var(--divider-color);
}
.prose > .figure, .prose > .pullquote, .prose > .stats, .prose > .compare { margin-top: 2em; margin-bottom: 2em; }

/* ============================================================
   Figure · Pullquote · Stats
   .figure (--wide · --plain) > img|svg + figcaption
   .pullquote > p + cite
   .stats > .stat (.stat__value · .stat__label · .stat__note)
   ============================================================ */

.figure { margin: 0; }
.figure > img,
.figure > svg,
.figure > video,
.figure > .compare {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  background: var(--surface-container);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
}
.figure--plain > img, .figure--plain > svg { border: 0; background: none; }
.figure > figcaption {
  margin-top: var(--space-sm);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--on-surface-variant);
}
.prose > .figure--wide { max-width: none; width: min(100vw - var(--space-xl), 68ch + 24rem); margin-left: calc((min(100vw - var(--space-xl), 68ch + 24rem) - 100%) / -2); }

.pullquote {
  margin: 0;
  padding: var(--space-md) 0;
  border-top: var(--stroke-outer) solid var(--outline);
  border-bottom: var(--stroke-inner) solid var(--divider-color);
}
.pullquote > p {
  margin: 0;
  font-family: var(--type-title-family);
  font-size: calc(var(--type-title-size) * 1.15);
  line-height: 1.35;
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
  text-wrap: balance;
}
.pullquote > cite {
  display: block;
  margin-top: var(--space-sm);
  font-style: normal;
  font-size: var(--type-label-size);
  color: var(--on-surface-variant);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
}
.stat__value {
  font-family: var(--type-display-family);
  font-size: calc(var(--type-headline-size) * 1.2);
  line-height: 1.05;
  font-weight: var(--type-display-weight);
  letter-spacing: var(--type-display-tracking);
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: var(--type-label-size); font-weight: var(--type-label-weight); }
.stat__note { font-size: var(--type-caption-size); color: var(--on-surface-variant); }

/* ============================================================
   Compare — önce / sonra kaydırıcı
   .compare > .compare__before + .compare__after (+ .compare__label) + input.compare__range
   ============================================================ */

.compare {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}
.compare__before,
.compare__after {
  display: block;
  margin: 0;
}
.compare__before { position: relative; height: 100%; }
.compare__before > :is(img, svg, video), .compare__after > :is(img, svg, video) { display: block; width: 100%; height: 100%; object-fit: cover; }
.compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}
.compare__label {
  position: absolute;
  top: var(--space-sm);
  padding: var(--space-2xs) var(--space-sm);
  font-size: var(--type-caption-size);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-inverse);
  background: color-mix(in srgb, var(--surface-inverse) 80%, transparent);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.compare__before .compare__label { left: var(--space-sm); }
.compare__after .compare__label { right: var(--space-sm); }
.compare::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: calc(var(--stroke-outer) * 2);
  translate: -50% 0;
  background: var(--outline);
  box-shadow: 0 0 0 1px var(--surface-container-lowest);
  pointer-events: none;
}
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
}
.compare__handle {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: var(--pos);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  translate: -50% -50%;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--outline);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-rest);
  pointer-events: none;
}
.compare__handle svg { width: 1.25em; height: 1.25em; }
.compare:has(.compare__range:focus-visible) .compare__handle {
  outline: var(--stroke-focus) solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   Case study — vaka çalışması sayfa düzeni
   .case > .case__header (.case__eyebrow · .case__title · .case__lede · .case__meta)
   · .case__cover · .case__layout (.case__toc + .case__body.prose) · .case__next
   ============================================================ */

.case {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}
.case__header {
  display: grid;
  gap: var(--space-md);
  max-width: 52rem;
}
.case__eyebrow {
  margin: 0;
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}
.case__title {
  margin: 0;
  font-family: var(--type-display-family);
  font-size: var(--type-display-size);
  line-height: var(--type-display-line);
  font-weight: var(--type-display-weight);
  letter-spacing: var(--type-display-tracking);
  text-transform: var(--type-display-transform);
  text-wrap: balance;
}
.case__lede {
  margin: 0;
  font-size: calc(var(--type-body-size) * 1.125);
  line-height: 1.55;
  color: var(--on-surface-variant);
}
.case__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0 0;
  padding: var(--space-md) 0 0;
  border-top: var(--stroke-inner) solid var(--divider-color);
}
.case__meta > div { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
.case__meta dt { font-size: var(--type-caption-size); color: var(--on-surface-variant); }
.case__meta dd { margin: 0; font-size: var(--type-label-size); font-weight: var(--type-label-weight); }

.case__cover { margin: var(--space-2xl) 0; }

.case__layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: start;
}
.case__toc {
  position: sticky;
  top: var(--space-lg);
  font-size: var(--type-label-size);
}
.case__toc-title {
  margin: 0 0 var(--space-sm);
  font-size: var(--type-caption-size);
  font-weight: var(--type-label-weight);
  color: var(--on-surface-variant);
}
.case__toc ol { margin: 0; padding: 0; list-style: none; border-left: var(--stroke-inner) solid var(--divider-color); }
.case__toc a {
  display: block;
  margin-left: calc(var(--stroke-inner) * -1);
  padding: var(--space-xs) var(--space-md);
  color: var(--on-surface-variant);
  text-decoration: none;
  border-left: calc(var(--stroke-outer) * 2) solid transparent;
}
.case__toc a:hover { color: var(--on-surface); }
.case__toc a[aria-current="true"] {
  color: var(--on-surface);
  font-weight: var(--type-body-strong-weight, 600);
  border-left-color: var(--outline);
}
.case__toc a:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.case__next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  color: var(--on-surface);
  text-decoration: none;
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
  transition: box-shadow var(--dur-fast) var(--ease-expressive), translate var(--dur-fast) var(--ease-expressive);
}
.case__next:hover { box-shadow: var(--shadow-hover); translate: 0 round(calc(var(--shadow-press-offset) / -4), 1px); }
.case__next:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: 3px; }
.case__next-label { display: block; font-size: var(--type-caption-size); color: var(--on-surface-variant); }
.case__next-title {
  display: block;
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: var(--type-title-weight);
  text-transform: var(--type-title-transform);
}
.case__next svg { flex: none; width: 1.5em; height: 1.5em; }

@media (max-width: 860px) {
  .case__layout { grid-template-columns: 1fr; }
  .case__toc { position: static; }
}

/* 18. Çizgi roman */
/* ============================================================
   Comic reader — webtoon (kaydırma) ve sayfa sayfa okuma
   .reader[data-mode="scroll|page"] (--contained) > .reader__bar · .reader__progress
   · ol.reader__pages > li.reader__page · .reader__nav · .reader__end
   ============================================================ */

.reader {
  --_w: 720px;
  --reader-height: 640px;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--on-surface);
  background: var(--surface-container-low);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: clip;
}
.reader:fullscreen { --reader-height: calc(100vh - 3.5rem); border: 0; border-radius: 0; }

.reader__bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-container-lowest);
  border-bottom: var(--stroke-outer) solid var(--card-border);
}
.reader__title {
  margin: 0;
  min-width: 0;
  font-family: var(--type-title-family);
  font-size: calc(var(--type-title-size) * 0.85);
  line-height: 1.2;
  font-weight: var(--type-title-weight);
  text-transform: var(--type-title-transform);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reader__bar > .input { flex: 0 1 auto; width: auto; }
.reader__bar-end { display: flex; align-items: center; gap: var(--space-sm); margin-left: auto; }
.reader__count {
  min-width: 4.5em;
  font-size: var(--type-label-size);
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--on-surface-variant);
}
.reader__progress {
  position: relative;
  z-index: 3;
  height: 4px;
  background: var(--surface-container);
}
.reader__progress > span {
  display: block;
  height: 100%;
  width: var(--_p, 0%);
  background: var(--action-primary);
  border-right: var(--stroke-inner) solid var(--outline-container);
}

.reader__pages {
  margin: 0;
  padding: 0;
  list-style: none;
}
.reader--contained .reader__pages {
  height: var(--reader-height);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.reader__page {
  width: 100%;
  max-width: var(--_w);
  margin: 0 auto;
  background: var(--surface-container-lowest);
}
.reader__page > img,
.reader__page > svg { display: block; width: 100%; height: auto; }
.reader[data-mode="scroll"] .reader__page + .reader__page { margin-top: 0; }
.reader[data-mode="scroll"] .reader__nav { display: none; }

.reader[data-mode="page"] .reader__pages {
  display: grid;
  place-items: center;
  height: var(--reader-height);
  padding: var(--space-md);
  box-sizing: border-box;
  overflow: hidden;
}
.reader[data-mode="page"] .reader__page { display: none; height: 100%; width: auto; max-width: 100%; background: none; }
.reader[data-mode="page"] .reader__page[aria-current="page"] { display: block; }
.reader[data-mode="page"] .reader__page > img,
.reader[data-mode="page"] .reader__page > svg {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border: var(--stroke-outer) solid var(--card-border);
  box-shadow: var(--shadow-rest);
  box-sizing: border-box;
  background: var(--surface-container-lowest);
}
.reader__nav {
  position: absolute;
  inset: auto 0 0;
  bottom: var(--space-md);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-md);
  pointer-events: none;
}
.reader__nav > .btn { pointer-events: auto; }
.reader__end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  max-width: var(--_w);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  text-align: center;
}
.reader[data-mode="page"] .reader__end { display: none; }
.reader__end-title {
  margin: 0;
  font-family: var(--type-hand-family);
  font-size: calc(var(--type-hand-size) * 1.2);
  line-height: var(--type-hand-line);
  font-weight: var(--type-hand-weight);
}
.reader__end p { margin: 0; color: var(--on-surface-variant); font-size: var(--type-label-size); }

/* ============================================================
   Balloon ve SFX — konuşma balonu, düşünce, bağırma, fısıltı, anlatı kutusu; ses efekti yazısı
   .balloon (--tail-bl|br|tl|tr|none · --thought · --shout · --whisper · --caption · --caps)
   .sfx (--c1|c2|c3|ink · --sm|--lg · --tremble · --bounce)
   ============================================================ */

.balloon {
  --_bg: var(--surface-container-lowest);
  --_ink: var(--outline);
  --_bw: max(var(--stroke-outer), 1.5px);
  --_tail: 1.25rem;
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  max-width: 22rem;
  margin: 0;
  padding: 0.8em 1.15em;
  font-family: var(--type-hand-family);
  font-size: calc(var(--type-hand-size) * 0.85);
  line-height: 1.2;
  font-weight: var(--type-hand-weight);
  text-align: center;
  color: var(--on-surface);
  background: var(--_bg);
  border: var(--_bw) solid var(--_ink);
  border-radius: 50% / 50%;
  isolation: isolate;
}
.balloon--caps { text-transform: uppercase; letter-spacing: 0.02em; }

/* Kuyruk: mürekkep üçgen + iç zemin üçgeni */
.balloon::before,
.balloon::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 22%;
  width: var(--_tail);
  height: var(--_tail);
  clip-path: polygon(0 0, 100% 0, 10% 100%);
}
.balloon::before { background: var(--_ink); margin-top: calc(var(--_bw) * -0.5); }
.balloon::after {
  background: var(--_bg);
  width: calc(var(--_tail) - var(--_bw) * 2.6);
  height: calc(var(--_tail) - var(--_bw) * 2.2);
  margin-top: calc(var(--_bw) * -1.6);
  margin-left: calc(var(--_bw) * 1.3);
}
.balloon--tail-br::before, .balloon--tail-br::after { left: auto; right: 22%; clip-path: polygon(0 0, 100% 0, 90% 100%); }
.balloon--tail-br::after { margin-left: 0; margin-right: calc(var(--_bw) * 1.3); }
.balloon--tail-tl::before, .balloon--tail-tl::after { top: auto; bottom: 100%; clip-path: polygon(10% 0, 100% 100%, 0 100%); }
.balloon--tail-tl::before { margin-top: 0; margin-bottom: calc(var(--_bw) * -0.5); }
.balloon--tail-tl::after { margin-top: 0; margin-bottom: calc(var(--_bw) * -1.6); }
.balloon--tail-tr::before, .balloon--tail-tr::after { top: auto; bottom: 100%; left: auto; right: 22%; clip-path: polygon(0 100%, 90% 0, 100% 100%); }
.balloon--tail-tr::before { margin-top: 0; margin-bottom: calc(var(--_bw) * -0.5); }
.balloon--tail-tr::after { margin: 0 calc(var(--_bw) * 1.3) calc(var(--_bw) * -1.6) 0; }
.balloon--tail-none::before, .balloon--tail-none::after { display: none; }

.balloon--whisper { border-style: dashed; }

/* Düşünce: kuyruk yerine iki küçük kabarcık */
.balloon--thought { border-radius: 48% 52% 46% 54% / 55% 45% 55% 45%; }
.balloon--thought::before,
.balloon--thought::after {
  clip-path: none;
  margin: 0;
  background: var(--_bg);
  border: var(--_bw) solid var(--_ink);
  border-radius: 50%;
  box-sizing: border-box;
}
.balloon--thought::before { width: 0.9rem; height: 0.9rem; top: calc(100% + 0.2rem); left: 24%; }
.balloon--thought::after { width: 0.55rem; height: 0.55rem; top: calc(100% + 1.25rem); left: 18%; }

/* Bağırma: sivri kenar; kontur iki katmanlı clip-path ile çizilir */
.balloon--shout {
  --_spikes: polygon(50% 0%, 57% 12%, 69% 3%, 71% 16%, 86% 10%, 82% 25%, 98% 24%, 89% 37%, 100% 47%, 90% 55%, 99% 70%, 85% 70%, 89% 87%, 74% 80%, 68% 97%, 58% 85%, 48% 100%, 41% 85%, 29% 96%, 27% 80%, 11% 88%, 15% 71%, 1% 70%, 10% 56%, 0% 45%, 11% 37%, 3% 22%, 18% 24%, 14% 8%, 29% 15%, 32% 2%, 43% 12%);
  padding: 1.9em 2.3em;
  background: none;
  border: 0;
  text-transform: uppercase;
}
.balloon--shout::before,
.balloon--shout::after {
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  margin: 0;
  clip-path: var(--_spikes);
}
.balloon--shout::before { background: var(--_ink); }
.balloon--shout::after {
  inset: calc(var(--_bw) * 2.2);
  width: auto;
  height: auto;
  background: var(--_bg);
}

/* Anlatı kutusu */
.balloon--caption {
  --_bg: var(--expressive-1);
  padding: 0.5em 0.8em;
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  line-height: 1.35;
  font-weight: var(--type-label-weight);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
  box-shadow: calc(var(--shadow-press-offset) / 2) calc(var(--shadow-press-offset) / 2) 0 var(--_ink);
}
.balloon--caption::before, .balloon--caption::after { display: none; }

@media (forced-colors: active) {
  .balloon { border-color: CanvasText; }
  .balloon--shout { border: 2px solid CanvasText; }
  .balloon--shout::before, .balloon--shout::after { display: none; }
}

.sfx {
  --_fill: var(--expressive-pop);
  --_ink: var(--outline);
  --_tilt: calc(var(--sticker-tilt) * -2);
  --_off: max(calc(var(--shadow-press-offset) * 0.75), 2px);
  display: inline-block;
  margin: 0;
  font-family: var(--type-display-family);
  font-size: calc(var(--type-display-size) * 1.1);
  line-height: 1;
  font-weight: var(--type-display-weight);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--_fill);
  -webkit-text-stroke: max(calc(var(--stroke-outer) * 1.5), 2px) var(--_ink);
  paint-order: stroke fill;
  text-shadow: var(--_off) var(--_off) 0 var(--_ink);
  rotate: calc(var(--_tilt) * 1deg);
  white-space: nowrap;
}
.sfx--c1 { --_fill: var(--expressive-1); }
.sfx--c2 { --_fill: var(--expressive-2); }
.sfx--c3 { --_fill: var(--expressive-3); }
.sfx--ink { --_fill: var(--surface-container-lowest); }
.sfx--sm { font-size: calc(var(--type-headline-size) * 1.1); }
.sfx--lg { font-size: calc(var(--type-display-size) * 1.6); }
.sfx__ch { display: inline-block; }
.sfx--bounce .sfx__ch { translate: 0 calc((var(--i, 0) - var(--n, 0) / 2) * (var(--i, 0) - var(--n, 0) / 2) * -0.07em); rotate: calc((var(--i, 0) - var(--n, 0) / 2) * 5deg); }
.sfx--tremble { animation: as-tremble calc(var(--motion-boil-duration) * 0.6) var(--ease-expressive) infinite; }
@keyframes as-tremble {
  0% { translate: 0 0; }
  33% { translate: calc(var(--motion-boil-amplitude) * -2) var(--motion-boil-amplitude); }
  66% { translate: calc(var(--motion-boil-amplitude) * 2) calc(var(--motion-boil-amplitude) * -1); }
}
@media (forced-colors: active) { .sfx { -webkit-text-stroke: 0; text-shadow: none; } }

/* 19. Cihazlar */
/* ============================================================
   Soundboard — ortam ve tek seferlik ses kutucukları
   .soundboard > .soundboard__bar + ul.soundboard__grid > li.sound-tile (--c1..c4)
   .sound-tile > button.sound-tile__play[aria-pressed] (ikon · __name · __meta · __eq · .kbd)
   + .sound-tile__controls (döngü butonu · .slider)
   ============================================================ */

.soundboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.soundboard__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
}
.soundboard__master {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1 1 14rem;
  max-width: 22rem;
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
}
.soundboard__master > span { white-space: nowrap; }
.soundboard__master > svg { flex: none; width: 1.25em; height: 1.25em; }
.soundboard__bar > .btn:last-child { margin-left: auto; }
.soundboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sound-tile {
  --_c: var(--expressive-1);
  --_lift: round(calc(var(--shadow-press-offset) / -4), 1px);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
  overflow: clip;
  transition: box-shadow var(--dur-fast) var(--ease-expressive), translate var(--dur-fast) var(--ease-expressive), background-color var(--dur-fast) var(--ease-expressive);
}
.sound-tile--c2 { --_c: var(--expressive-2); }
.sound-tile--c3 { --_c: var(--expressive-3); }
.sound-tile:has(.sound-tile__play:hover) { box-shadow: var(--shadow-hover); translate: 0 var(--_lift); }
.sound-tile:has(.sound-tile__play:active) { box-shadow: var(--shadow-pressed); translate: var(--shadow-press-offset) var(--shadow-press-offset); }
.sound-tile:has([aria-pressed="true"].sound-tile__play) { background: var(--_c); }

.sound-tile__play {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon key" "name name" "meta eq";
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
  padding: var(--space-md);
  margin: 0;
  font: inherit;
  text-align: left;
  color: var(--on-surface);
  background: none;
  border: 0;
  cursor: pointer;
}
.sound-tile__play:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: calc(var(--stroke-focus) * -2); border-radius: var(--radius-lg); }
.sound-tile__play > svg {
  grid-area: icon;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem;
  box-sizing: border-box;
  background: var(--_c);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-md);
}
.sound-tile:has([aria-pressed="true"].sound-tile__play) .sound-tile__play > svg { background: var(--surface-container-lowest); }
.sound-tile__play > .kbd { grid-area: key; justify-self: end; }
.sound-tile__name {
  grid-area: name;
  margin-top: var(--space-xs);
  font-weight: var(--type-body-strong-weight, 600);
  line-height: 1.3;
}
.sound-tile__meta { grid-area: meta; font-size: var(--type-caption-size); color: var(--on-surface-variant); }
.sound-tile:has([aria-pressed="true"].sound-tile__play) .sound-tile__meta { color: var(--on-surface); }
.sound-tile__eq {
  grid-area: eq;
  justify-self: end;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 1rem;
}
.sound-tile__eq > i {
  display: block;
  width: 3px;
  height: 25%;
  background: currentColor;
  border-radius: 1px;
  opacity: 0.35;
}
.sound-tile:has([aria-pressed="true"].sound-tile__play) .sound-tile__eq > i {
  opacity: 1;
  animation: as-eq 600ms var(--_eq-ease, ease-in-out) infinite alternate;
}
[data-theme="astro"] .sound-tile, [data-theme="totem"] .sound-tile { --_eq-ease: steps(3, end); }
.sound-tile__eq > i:nth-child(2) { animation-delay: -150ms !important; animation-duration: 450ms !important; }
.sound-tile__eq > i:nth-child(3) { animation-delay: -300ms !important; animation-duration: 525ms !important; }
.sound-tile__eq > i:nth-child(4) { animation-delay: -75ms !important; animation-duration: 375ms !important; }
@keyframes as-eq { from { height: 20%; } to { height: 100%; } }

.sound-tile__controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm) var(--space-sm) var(--space-md);
  border-top: var(--stroke-inner) solid var(--outline-container);
}
.sound-tile__controls > .slider { flex: 1; min-width: 0; }
.sound-tile__controls > .btn[aria-pressed="true"] { background: var(--action-ghost-selected); }

/* ============================================================
   Generator — rastgele üreteç kartı (Necizim, karakter, gezegen)
   .gen > .gen__head · .gen__result (.gen__headline) · .gen__portrait? · dl.gen__fields
   (.gen__field[data-field] > dt + dd + .gen__lock) · .gen__actions · ol.gen__history
   ============================================================ */

.gen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface-container-lowest);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
}
.gen--portrait { grid-template-columns: 9rem minmax(0, 1fr); }
.gen--portrait > :not(.gen__portrait) { grid-column: 2; }
.gen__portrait {
  grid-column: 1;
  grid-row: 1 / span 4;
  margin: 0;
  aspect-ratio: 3 / 4;
  background: var(--surface-container);
  border: var(--stroke-outer) solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gen__portrait > img, .gen__portrait > svg { display: block; width: 100%; height: 100%; object-fit: cover; }

.gen__head { display: flex; flex-direction: column; gap: var(--space-2xs); }
.gen__title {
  margin: 0;
  font-family: var(--type-title-family);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: var(--type-title-weight);
  letter-spacing: var(--type-title-tracking);
  text-transform: var(--type-title-transform);
}
.gen__desc { margin: 0; font-size: var(--type-label-size); color: var(--on-surface-variant); }

.gen__result {
  display: grid;
  place-items: center;
  min-height: 6.5rem;
  padding: var(--space-lg);
  text-align: center;
  background: var(--surface-container-low);
  border: var(--stroke-inner) solid var(--outline-container);
  border-radius: var(--radius-md);
  box-shadow: inset var(--field-inset) var(--field-inset) 0 0 var(--surface-container);
}
.gen__headline {
  margin: 0;
  font-family: var(--type-hand-family);
  font-size: calc(var(--type-hand-size) * 1.5);
  line-height: 1.1;
  font-weight: var(--type-hand-weight);
  text-wrap: balance;
}
.gen__headline [data-field] { white-space: nowrap; }
.gen[data-rolling] [data-field] { color: var(--on-surface-variant); }

.gen__fields { display: grid; margin: 0; }
.gen__field {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--row-height);
  border-bottom: var(--stroke-inner) solid var(--table-row-border);
}
.gen__field:last-child { border-bottom: 0; }
.gen__field > dt { font-size: var(--type-label-size); color: var(--on-surface-variant); }
.gen__field > dd { margin: 0; font-weight: var(--type-body-strong-weight, 600); }
.gen__field:has(.gen__lock[aria-pressed="true"]) > dd { text-decoration: underline var(--stroke-outer) var(--expressive-pop); text-underline-offset: 0.3em; }
.gen__lock .lucide-lock { display: none; }
.gen__lock[aria-pressed="true"] .lucide-lock { display: block; }
.gen__lock[aria-pressed="true"] .lucide-lock-open { display: none; }

.gen__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-inline); }
.gen__actions > .gen__seed { margin-left: auto; font-family: var(--font-mono); font-size: var(--type-caption-size); color: var(--on-surface-variant); }

.gen__history {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gen__history:empty { display: none; }
.gen__history button {
  padding: var(--space-2xs) var(--space-sm);
  font: inherit;
  font-size: var(--type-caption-size);
  color: var(--on-surface-variant);
  background: none;
  border: var(--stroke-inner) solid var(--tag-border);
  border-radius: var(--radius-full);
  cursor: pointer;
}
.gen__history button:hover { color: var(--on-surface); background: var(--action-ghost-hover); }
.gen__history button:focus-visible { outline: var(--stroke-focus) solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 560px) {
  .gen--portrait { grid-template-columns: 1fr; }
  .gen--portrait > * { grid-column: 1 !important; }
  .gen__portrait { grid-row: auto; max-width: 10rem; }
  .gen__field { grid-template-columns: 6rem minmax(0, 1fr) auto; }
}
