/* ==========================================================================
   1. Brand Layer: Tokens & Color Schemes (LOCKED)
   ========================================================================== */

:root {
  --scheme: light;
  --sticky-offset: 0px;
  --paper: #F7F8F5;
  --surface: #FFFFFF;
  --surface-subtle: #F0F2EB;
  --ink: #161811;
  --muted: #5D6255;
  --placeholder: #5D6255;
  --line: #DDE1D4;
  --line-strong: #C4CBB7;
  --accent: #D5FD42;
  --accent-hover: #C7EE35;
  --accent-soft: #EFF8CF;
  --accent-soft-ink: #334500;
  --link: #334500;
  --link-hover: #243400;
  --on-accent: #121212;
  --focus: #334500;
  --focus-ring: #334500;
  --info-bg: #EFF8CF;
  --info-ink: #161811;
  --success: #245C37;
  --success-bg: #EAF4E4;
  --success-border: #C5D8B8;
  --danger: #8A261E;
  --danger-bg: #FBEDEA;
  --danger-border: #E6C1BA;
  --disabled-bg: #ECEEE7;
  --disabled-ink: #5D6255;
}

:root[data-theme="dark"] {
  --scheme: dark;
  --paper: #121212;
  --surface: #1B1B1B;
  --surface-subtle: #252525;
  --ink: #F5F5F0;
  --muted: #A3A3A3;
  --placeholder: #A3A3A3;
  --line: #333333;
  --line-strong: #4A4A4A;
  --accent: #D5FD42;
  --accent-hover: #C7EE35;
  --accent-soft: #30391A;
  --accent-soft-ink: #D5FD42;
  --link: #D5FD42;
  --link-hover: #C7EE35;
  --on-accent: #121212;
  --focus: #D5FD42;
  --focus-ring: #D5FD42;
  --info-bg: #202619;
  --info-ink: #F5F5F0;
  --success: #B5E48A;
  --success-bg: #25331B;
  --success-border: #455C2A;
  --danger: #FFAAA3;
  --danger-bg: #3A211F;
  --danger-border: #70403C;
  --disabled-bg: #262626;
  --disabled-ink: #A3A3A3;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  color-scheme: var(--scheme);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Base Container (default / ekle.html) */
.archive-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.2rem 2.25rem 5rem;
}

/* Expanded Container for Directory Site (1320px) */
body.page-dizin .archive-container {
  max-width: 1320px;
  padding: 2rem 2rem 5rem;
}

/* Typography Defaults */
h1, h2, h3, h4 {
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-ligatures: common-ligatures contextual;
  -webkit-font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "liga" 1, "dlig" 0;
  -webkit-font-feature-settings: "liga" 1, "dlig" 0;
}

p {
  margin: 0 0 1rem;
  color: var(--ink);
  line-height: 1.7;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 140ms ease;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Accessible Skip Links */
.skip-links {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  display: flex;
  gap: .5rem;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 0;
  pointer-events: auto;
  padding: .6rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  font-family: "DM Mono", monospace;
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.skip-link:focus,
.skip-link:focus-visible,
.skip-links:focus-within .skip-link {
  position: static;
}

.skip-link:focus,
.skip-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Search Highlights */
mark.search-hit {
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  padding: 0 .12em;
}

/* Divider */
.hero-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

/* ==========================================================================
   2. Shared Brand Header & Footer
   ========================================================================== */

.archive-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 48px;
  margin-bottom: .5rem;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.brand-logo-link {
  display: block;
  text-decoration: none;
}

.brand-logo {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--surface-subtle);
  object-fit: cover;
  transition: opacity 140ms ease;
}

.brand-logo:hover {
  opacity: .88;
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: .01em;
  color: var(--ink);
}

.brand-links {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .84rem;
  white-space: nowrap;
}

.brand-links a {
  text-decoration: none;
  color: var(--muted);
}

.brand-links a:hover {
  color: var(--link);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.language-btn {
  min-width: 30px;
  height: 26px;
  padding: 0 .35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .72rem;
  line-height: 1;
  cursor: pointer;
}

.language-btn:hover {
  color: var(--ink);
}

.language-btn.active {
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 600;
}

.theme-toggle-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--link);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.theme-toggle-btn:hover {
  background: var(--surface-subtle);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Footer */
.archive-footer {
  font-family: "DM Mono", monospace;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 .2rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.footer-name {
  color: var(--ink);
  font-weight: 500;
}

.footer-bottom-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.footer-credit {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.footer-credit a {
  color: var(--muted);
  text-decoration: none;
}

.footer-credit a:hover {
  color: var(--link);
  text-decoration: underline;
}

.footer-actions {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: .5rem;
  font-size: .78rem;
  line-height: 1.5;
}

.footer-actions a {
  font-family: "DM Mono", monospace;
  color: var(--link);
  font-size: .78rem;
  font-weight: 400;
  text-decoration: none;
}

.footer-actions a:hover {
  text-decoration: underline;
}

.footer-actions span {
  color: var(--muted);
  font-size: .78rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.footer-social a {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border-radius: 4px;
  text-decoration: none;
  transition: color 120ms ease;
}

.footer-social a:hover {
  color: var(--link);
}

.footer-social svg {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-social .icon-fill {
  fill: currentColor;
}

.footer-social .icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* ==========================================================================
   3. Directory Product Layer: Compact Hero (Künye)
   ========================================================================== */

.dizin-hero {
  display: flex;
  flex-direction: column;
  margin: .4rem 0 2.75rem;
}

.dizin-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.dizin-hero-title-area {
  max-width: 820px;
}

.dizin-hero-action-area {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
}

.hero-eyebrow {
  font-family: "DM Mono", monospace;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: .5rem;
}

.dizin-h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: normal;
}

.dizin-hero-bottom {
  display: flex;
  align-items: last baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-top: .7rem;
}

.dizin-hero-copy {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 44px;
  padding: 0 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: "DM Mono", monospace;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease;
  user-select: none;
}

.hero-cta-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.hero-cta-btn .cta-arrow {
  font-size: .95rem;
  line-height: 1;
}

.suggest-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 24%);
}

.suggest-dialog::backdrop {
  background: rgb(0 0 0 / 52%);
  backdrop-filter: blur(2px);
}

.suggest-dialog form {
  padding: 1.5rem;
}

.suggest-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.suggest-dialog-heading h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
}

.suggest-dialog-heading p {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.suggest-dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.suggest-dialog-close:hover,
.suggest-cancel-btn:hover {
  background: var(--surface-subtle);
}

.suggest-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .95rem;
  margin-top: 1.25rem;
}

.suggest-form-field {
  min-width: 0;
}

.suggest-form-span-2 {
  grid-column: 1 / -1;
}

.suggest-form-field label {
  display: block;
  margin-bottom: .4rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.suggest-form-field input,
.suggest-form-field select,
.suggest-form-field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
}

.suggest-form-field textarea {
  min-height: 92px;
  resize: vertical;
}

.suggest-form-field input:focus,
.suggest-form-field select:focus,
.suggest-form-field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.suggest-form-field small {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.suggest-email-note {
  margin: 1rem 0 0;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.suggest-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1rem;
}

.suggest-cancel-btn,
.suggest-submit-btn {
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 10px;
  font-family: "DM Mono", monospace;
  font-size: .82rem;
  cursor: pointer;
}

.suggest-cancel-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.suggest-submit-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.suggest-submit-btn:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.hero-updated-at {
  font-family: "DM Mono", monospace;
  font-size: .76rem;
  line-height: 1.65;
  color: var(--muted);
  letter-spacing: .03em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   4. Sticky Toolbar & Segmented Controls
   ========================================================================== */

.dizin-toolbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 45;
  background: var(--paper);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  margin: 0 0 1.25rem;
}

.dizin-toolbar-wrapper.is-stuck {
  border-bottom: 1px solid var(--line);
}

.dizin-toolbar {
  width: 100%;
}

.toolbar-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 0;
}

/* Wide Search */
.toolbar-search {
  position: relative;
  flex: 1 1 320px;
  min-width: 180px;
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.toolbar-search:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.toolbar-search .search-icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
  color: var(--muted);
}

.toolbar-search-input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: .94rem;
  padding: 0 2.2rem 0 2.5rem;
  outline: none;
  scroll-margin-top: 16px;
}

.toolbar-search-input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.toolbar-search-clear {
  position: absolute;
  right: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.toolbar-search-clear:hover {
  color: var(--ink);
}

/* Segmented Category Control */
.segmented-control {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  gap: 2px;
  flex-shrink: 0;
}

.segment-btn {
  height: 38px;
  padding: 0 .9rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: background-color 140ms ease, color 140ms ease;
  user-select: none;
  white-space: nowrap;
}

.segment-btn:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

/* Active Segment uses --ink background and --paper text (NOT LIME) */
.segment-btn.active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
}

.seg-count {
  font-size: .75rem;
}

.seg-label-full {
  display: inline;
}

.seg-label-short {
  display: none;
}

/* Sort Dropdown */
.toolbar-sort {
  position: relative;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.toolbar-sort:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.toolbar-sort-select {
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: .82rem;
  padding: 0 2rem 0 .95rem;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}

.sort-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  display: flex;
  align-items: center;
}

/* View Switcher */
.toolbar-view {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
  height: 46px;
}

.view-btn {
  height: 38px;
  padding: 0 .75rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: background-color 140ms ease, color 140ms ease;
  user-select: none;
}

.view-btn svg {
  stroke: currentColor;
}

.view-btn:hover {
  color: var(--ink);
}

.view-btn.active {
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 500;
}

/* Mobile Letter Strip (Hidden on Desktop) */
.mobile-letter-strip {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  gap: .3rem;
  padding: .4rem 0 .2rem;
  border-top: 1px solid var(--line);
}

.mobile-letter-strip::-webkit-scrollbar {
  display: none;
}

.strip-letter-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 .4rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 140ms ease, color 140ms ease;
}

.strip-letter-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.strip-letter-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 700;
}

/* Sub-Bar: Result Summary & Overlap Notice */
.toolbar-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .85rem;
  padding: .95rem 0 1.1rem;
  font-family: "DM Mono", monospace;
  font-size: .82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.result-summary strong {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   5. Directory Layout: Sticky Rail + Main Area
   ========================================================================== */

.dizin-body-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 2.25rem;
  position: relative;
  margin-top: 1.5rem;
}

/* Sticky Letter Rail (>= 1100px) */
.letter-index-rail {
  flex: 0 0 36px;
  width: 36px;
  position: sticky;
  top: calc(var(--sticky-offset, 0px) + 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  z-index: 30;
  padding: .2rem 0;
  max-height: calc(100vh - var(--sticky-offset, 0px) - 32px);
  overflow-y: auto;
  scrollbar-width: none;
}

.letter-index-rail::-webkit-scrollbar {
  display: none;
}

.rail-letter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 140ms ease, color 140ms ease;
  user-select: none;
}

.rail-letter-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

/* Active letter gets lime circle */
.rail-letter-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

/* Main Directory Listing Area */
.dizin-main-area {
  flex: 1 1 auto;
  min-width: 0;
}

/* ==========================================================================
   6. Showcase View (Vitrin / Grid View)
   ========================================================================== */

.directory-container {
  scroll-margin-top: calc(var(--sticky-offset, 0px) + 16px);
  outline: none;
}

.directory-container.view-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.65rem;
}

/* Letter Group Structure for Accessibility */
.letter-group {
  display: contents;
}

.letter-group-list {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Vitrin Item (Individual Showcase Unit on Paper) */
.vitrin-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  scroll-margin-top: calc(var(--sticky-offset, 0px) + 16px);
}

.vitrin-media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
  overflow: hidden;
  transition: border-color 140ms ease;
}

.vitrin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 180ms ease;
}

.vitrin-item:hover .vitrin-media img {
  transform: scale(1.03);
}

.vitrin-item:hover .vitrin-media {
  border-color: var(--line-strong);
}

/* Fallback Monogram */
.vitrin-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 4.5rem;
  color: var(--muted);
  user-select: none;
}

.vitrin-media.no-img img {
  display: none;
}

.vitrin-media.no-img .vitrin-fallback {
  display: flex;
}

/* Accessible focus ring on the image frame */
.vitrin-card-link:focus-visible ~ .vitrin-media,
.vitrin-item:has(.vitrin-card-link:focus-visible) .vitrin-media {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Vitrin Metadata Row */
.vitrin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-family: "DM Mono", monospace;
  font-size: .75rem;
  letter-spacing: .04em;
}

.vitrin-badges {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  font-family: "DM Mono", monospace;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .18rem .45rem;
  border-radius: 5px;
  line-height: 1.25;
}

.badge-designer {
  background: var(--surface-subtle);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge-foundry {
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  border: 1px solid transparent;
}

/* Title & Card-covering Link */
.vitrin-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.95rem;
  line-height: 1.15;
  margin: .1rem 0 0;
  font-weight: 400;
  color: var(--ink);
}

.vitrin-card-link {
  color: inherit;
  text-decoration: none;
}

/* Entire cell becomes clickable link */
.vitrin-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.vitrin-item:hover .vitrin-title {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Identity Line (Ekip / Marka / Yazıevi) */
.identity-line {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  line-height: 1.4;
  margin-top: -.25rem;
  flex-wrap: wrap;
}

.identity-label {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  flex-shrink: 0;
}

.identity-val {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.list-row-line2 .identity-line {
  margin-top: 0;
  display: inline-flex;
}

.vitrin-domain {
  font-family: "DM Mono", monospace;
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}

.vitrin-domain .arrow-icon {
  font-size: .85rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.vitrin-item:hover .vitrin-domain .arrow-icon {
  transform: translate(2px, -2px);
  color: var(--link);
}

/* ==========================================================================
   7. List View (Dense Editorial Index Rows)
   ========================================================================== */

.directory-container.view-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Dizin List Row */
.dizin-list-row {
  position: relative;
  border-bottom: 1px solid var(--line);
  transition: background-color 140ms ease;
  scroll-margin-top: calc(var(--sticky-offset, 0px) + 16px);
  min-width: 0;
}

.list-row-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .8rem .75rem;
  color: inherit;
  text-decoration: none;
  min-height: 64px;
  border-radius: 8px;
  min-width: 0;
}

.dizin-list-row:hover {
  background: var(--surface-subtle);
}

.dizin-list-row:hover .list-row-title {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dizin-list-row:has(.list-row-link:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.list-row-media {
  flex: 0 0 56px;
  width: 56px;
  height: 42px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-subtle);
  position: relative;
}

.list-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.list-row-media.no-img img {
  display: none;
}

.list-row-media .media-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.3rem;
  color: var(--muted);
}

.list-row-media.no-img .media-fallback {
  display: flex;
}

.list-row-content {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-width: 0;
}

.list-row-line1 {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.list-row-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.85rem;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 400;
  min-width: 0;
  overflow-wrap: anywhere;
}

.list-row-badges {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.list-row-line2 {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 0 0 auto;
}

.list-row-sub {
  font-size: .84rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.list-row-platform {
  flex: 0 0 auto;
  font-family: "DM Mono", monospace;
  font-size: .76rem;
  color: var(--muted);
  text-align: right;
  text-transform: uppercase;
}

.list-row-domain {
  flex: 0 0 auto;
  font-family: "DM Mono", monospace;
  font-size: .78rem;
  color: var(--link);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .3rem;
}

.list-row-domain .arrow-icon {
  font-size: .85rem;
}

/* ==========================================================================
   8. Status & Empty State
   ========================================================================== */

.app-status {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 3rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.empty-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2.2rem;
  margin: 0 0 .5rem;
  color: var(--ink);
}

.empty-desc {
  color: var(--muted);
  font-size: .98rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.reset-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: "DM Mono", monospace;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.reset-filter-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ==========================================================================
   9. ekle.html Compatibility Styles (Scoped so preview still works)
   ========================================================================== */

.index-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
}

.badge-platform {
  font-family: "DM Mono", monospace;
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
}

.card-middle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.1rem;
}

.card-info {
  flex: 1 1 auto;
  min-width: 0;
}

.entry-title {
  margin: 0 0 .3rem;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1.2;
}

.entry-description {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--muted);
  margin: .4rem 0 0;
}

.card-media {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media .media-fallback {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.9rem;
  color: var(--muted);
}

.card-bottom {
  border-top: 1px solid var(--line);
  padding-top: .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "DM Mono", monospace;
  font-size: .82rem;
}

.entry-link-btn {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

.entry-domain {
  color: var(--muted);
  font-size: .78rem;
}

/* ==========================================================================
   10. Responsive Media Queries
   ========================================================================== */

/* 1100px: Toolbar stacks & becomes static, mobile strip is sticky at top, 2 cols */
@media (max-width: 1100px) {
  #dizin-toolbar-section.dizin-toolbar-wrapper {
    position: static;
    border-bottom: 0;
    margin-bottom: 0;
  }

  .toolbar-inner {
    flex-wrap: wrap;
    gap: .75rem;
  }

  .toolbar-search {
    flex: 1 1 100%;
    order: 1;
  }

  .segmented-control {
    order: 2;
    flex: 1 1 auto;
  }

  .toolbar-sort {
    order: 3;
  }

  .toolbar-view {
    order: 4;
  }

  .letter-index-rail {
    display: none !important;
  }

  .mobile-letter-strip {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    border-top: 0;
    padding: .45rem 0;
    max-height: 56px;
    height: auto;
    margin-bottom: 1rem;
    align-items: center;
  }

  .dizin-body-wrapper {
    gap: 0;
  }

  .directory-container.view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.25rem;
  }
}

/* 900px: 2-line list view */
@media (max-width: 900px) {
  .list-row-link {
    align-items: flex-start;
    gap: .75rem;
    padding: .65rem .5rem;
    min-height: auto;
  }

  .list-row-media {
    margin-top: 3px;
  }

  .list-row-content {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .list-row-line1 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .list-row-line1 .list-row-title {
    flex: 0 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .list-row-line1 .list-row-badges {
    flex-shrink: 0;
    flex-wrap: wrap;
  }

  .list-row-line2 {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    font-size: .78rem;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .list-row-sub {
    max-width: none;
    white-space: normal;
  }
}

/* 760px: Tablet & Mobile Headings & Padding */
@media (max-width: 760px) {
  body.page-dizin .archive-container {
    padding: 1.25rem 1rem 3.5rem;
  }

  .archive-brand-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .65rem;
    position: relative;
  }

  .header-controls {
    position: absolute;
    top: 4px;
    right: 0;
  }

  .dizin-hero {
    margin-bottom: 2.25rem;
  }

  .dizin-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dizin-hero-action-area {
    width: 100%;
  }

  .dizin-hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .hero-cta-btn {
    width: 100%;
    justify-content: center;
  }

  .suggest-dialog form {
    padding: 1.15rem;
  }

  .suggest-form-grid {
    grid-template-columns: 1fr;
  }

  .suggest-form-span-2 {
    grid-column: auto;
  }

  .suggest-dialog-heading h2 {
    font-size: 1.75rem;
  }

  .footer-content {
    gap: .75rem;
  }

  .footer-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .footer-actions {
    justify-content: flex-start;
  }
}

/* 640px: 1 Column Grid & Full-width Mobile Toolbar Controls */
@media (max-width: 640px) {
  .directory-container.view-grid {
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
  }

  .toolbar-view {
    flex: 1 1 auto;
    min-width: 0;
  }

  .toolbar-view .view-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }

  .list-row-title {
    font-size: 1.45rem;
  }
}

/* 480px: Tight Hero & Clean Segment Labels */
@media (max-width: 480px) {
  .dizin-hero {
    padding: .7rem 0;
    margin-bottom: 2rem;
  }

  .dizin-h1 {
    font-size: 1.9rem;
  }

  .dizin-hero-copy {
    font-size: .95rem;
    line-height: 1.5;
  }

  .toolbar-inner {
    gap: .5rem;
    padding: .5rem 0;
  }

  .dizin-body-wrapper {
    margin-top: .75rem;
  }

  .seg-prefix {
    display: none;
  }
}

/* 440px Mobile Viewport: Compact full-width segments without horizontal scroll */
@media (max-width: 440px) {
  #dizin-toolbar-section.dizin-toolbar-wrapper {
    position: static;
  }

  .toolbar-inner {
    padding: .5rem 0;
  }

  .segmented-control {
    display: flex;
    width: 100%;
    overflow-x: visible;
  }

  .segment-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 .4rem;
    justify-content: center;
    font-size: .8rem;
  }

  .seg-label-full {
    display: none;
  }

  .seg-label-short {
    display: inline;
  }

  .seg-count {
    display: none;
  }

  .toolbar-sort-select {
    font-size: .78rem;
  }

  .view-btn {
    padding: 0 .6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ekle.html uyumluluğu: eski sayfa kuralları */
body:not(.page-dizin) h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  line-height: 1.04;
  margin: .3rem 0 .8rem;
  letter-spacing: normal;
}
body:not(.page-dizin) .hero-header { margin-bottom: 2rem; }
body:not(.page-dizin) .hero-eyebrow { color: var(--link); margin-bottom: .65rem; }
body:not(.page-dizin) .hero-copy {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}
body:not(.page-dizin) .hero-rule { margin: 1.8rem 0 1.5rem; }
@media (max-width: 760px) {
  body:not(.page-dizin) .archive-container { padding: 1.15rem 1rem 3rem; }
  body:not(.page-dizin) h1 { font-size: clamp(2.35rem, 10vw, 3.4rem); }
  body:not(.page-dizin) .hero-copy { font-size: 1rem; }
}
