/* ==========================================================================
   JessicaAi — Lacivert & Altın (hukuk teması)
   ========================================================================== */

:root {
  /* Zemin & metin */
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --stone: #e9eef5;
  --chalk: #f8fafc;
  --white: #ffffff;
  --line: #cbd5e1;
  --line-soft: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;          /* #f8fafc üzerinde 7.2:1 */

  /* Marka: otorite laciverti + güven altını */
  --primary: #1e3a8a;        /* beyaz üzerinde 10.4:1 */
  --primary-deep: #172e6e;
  --primary-soft: #e8edf8;
  --primary-line: #b8c6e6;
  --gold: #d4a84b;           /* lacivert zemin üzerinde vurgu */
  --gold-light: #ecd59f;
  --gold-text: #92400e;      /* açık zeminde altın tonlu metin, 7:1 */

  --danger: #b91c1c;
  --warning: #92400e;
  --success: #166534;
  --info: #1e40af;

  --font-display: "EB Garamond", "Georgia", serif;
  --font-body: "Lato", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Consolas", monospace;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.22);
  --ease: 220ms cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --wrap: min(1280px, calc(100% - 2rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    linear-gradient(180deg, var(--chalk) 0%, var(--stone) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.wrap { width: var(--wrap); margin-inline: auto; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 250, 0.9);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header--home {
  position: absolute;
  inset-inline: 0;
  background: transparent;
  border-bottom-color: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0.5rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.site-header--home .brand { color: var(--chalk); }

.brand-logo {
  width: 42px;
  height: auto;
  flex-shrink: 0;
  display: block;
  background: transparent;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-text em {
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}

.site-header--home .brand-text em { color: var(--gold-light); }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 0.85rem;
  border-radius: var(--radius);
  position: relative;
  transition: color var(--ease), background var(--ease);
}

.site-header--home .nav-link { color: rgba(248, 250, 252, 0.88); }

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.site-header--home .nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.nav-sep {
  width: 1px;
  height: 22px;
  margin: 0 0.35rem;
  background: var(--line);
}

.site-header--home .nav-sep { background: rgba(255, 255, 255, 0.25); }

.nav-link--muted { font-weight: 400; }

/* --- Type --- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.05rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 0.55rem;
}

.lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.page-main { padding: 2.25rem 0 3.5rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease), border-color var(--ease), color var(--ease);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-deep);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.btn-danger { background: var(--danger); color: var(--white); }

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Forms --- */
.form-group { margin-bottom: 1.15rem; }

label, .form-label {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.form-label-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

textarea,
input[type="text"],
input[type="password"],
input[type="file"],
select,
.select-custom {
  width: 100%;
  font: inherit;
  font-family: var(--font-body);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--chalk);
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

select,
.select-custom {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23101820'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
  outline: none;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.14);
}

textarea { min-height: 150px; resize: vertical; line-height: 1.65; }

.char-counter {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.74rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.char-counter.is-warn { color: var(--danger); }

/* --- Info / alerts --- */
.info-box {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.info-box-icon {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  opacity: 0.85;
}

.info-box--info { background: #eef5f9; border-color: #c5d7e4; color: var(--info); }
.info-box--tip { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-deep); }
.info-box--warn { background: #faf4e8; border-color: #e4d3ab; color: var(--warning); }
.info-box--legal { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: rgba(247,249,250,0.88); }

.alert {
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  border: 1px solid;
  font-size: 0.92rem;
}

.alert-error { background: #fbf0f2; border-color: #ecc0c8; color: var(--danger); }
.alert-warn  { background: #fbf6ec; border-color: #ead9ad; color: var(--warning); }
.alert-ok    { background: var(--primary-soft); border-color: var(--primary-line); color: var(--success); }
.alert-info  { background: #eef5f9; border-color: #c5d7e4; color: var(--info); }

.disclaimer {
  margin-top: 1.25rem;
  padding: 0.95rem 1.05rem;
  background: var(--primary-soft);
  border-top: 1px solid var(--primary-line);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.8rem;
  color: var(--primary-deep);
}

.panel {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
}

/* ==========================================================================
   HOME — arama
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
  color: var(--chalk);
  background:
    radial-gradient(ellipse 60% 70% at 85% 10%, rgba(212, 168, 75, 0.14) 0%, transparent 60%),
    linear-gradient(160deg, #0b1a3d 0%, #13265c 55%, #0f172a 100%);
}

/* Durağan sütun/çizgi süsü: mahkeme sütunları, kâğıt satırları */
.hero-plane {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 96px, rgba(255, 255, 255, 0.045) 96px 97px),
    repeating-linear-gradient(0deg, transparent 0 32px, rgba(255, 255, 255, 0.025) 32px 33px);
  mask-image: linear-gradient(100deg, transparent 0%, #000 45%, #000 100%);
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, #000 45%, #000 100%);
}

.hero-plane-grid,
.hero-plane-glow { display: none; }

.hero-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy { max-width: 36rem; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(212, 168, 75, 0.45);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.hero-eyebrow svg { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0; }

.hero-copy h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 1.1rem;
  max-width: 16ch;
}

.hero-copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-light);
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 32rem;
  color: rgba(248, 250, 252, 0.82);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  list-style: none;
}

.hero-stats li {
  padding-right: 1.75rem;
  margin-right: 1.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-stats li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.hero-stats span {
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.7);
}

.hero-cta { width: 100%; }

.search-panel {
  background: var(--white);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.search-panel-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
  color: var(--ink);
}

.search-panel textarea {
  background: var(--chalk);
  min-height: 150px;
}

.char-counter .is-ok { color: var(--success); }

.field-error {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--danger);
  font-weight: 700;
}

.field-error:empty { display: none; }

/* Örnek olaylar */
.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
}

.examples-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 0.15rem;
}

.example-chip {
  min-height: 36px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.example-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* Kategori: segment düğmeleri (radio) */
.category-group {
  border: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  min-width: 0;
}

.category-group legend {
  padding: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--chalk);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.segmented label:hover { border-color: var(--primary); color: var(--primary); }

.segmented input:checked + label {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.search-submit-row { margin-top: 1.35rem; }

.search-submit-row .btn {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
}

.search-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.search-note svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Process */
.process {
  padding: 5rem 0 5.5rem;
  background: var(--chalk);
  border-top: 1px solid var(--line-soft);
}

.process-intro {
  max-width: 38rem;
  margin-bottom: 2.75rem;
}

.process-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.process-list li {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.process-num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.process-list h3 { margin-bottom: 0.4rem; }
.process-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ==========================================================================
   RESULTS
   ========================================================================== */

.page-results .results-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
  padding: 0.85rem 0;
  margin: -0.5rem 0 1.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.results-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
}

.results-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 1.75rem;
  align-items: start;
}

.results-query { margin-bottom: 1.75rem; }

.results-query .panel {
  border-left: 3px solid var(--primary);
  background: linear-gradient(180deg, var(--white) 0%, var(--chalk) 100%);
}

.col-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line-soft);
}

.col-heading h2 { margin: 0; font-size: 1.3rem; }

.scanner-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.karar-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.karar-card:hover {
  border-color: var(--primary-line);
  box-shadow: var(--shadow);
}

/* Görüşteki atıftan gelinen kart */
.karar-card.is-cited {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.35);
}

.karar-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.karar-card-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.karar-card-title:hover { color: var(--primary); }

.karar-card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.karar-card-meta {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 0.55rem;
}

.karar-card-reason {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.7rem 0.85rem;
  background: var(--chalk);
  border-radius: var(--radius);
  border-left: 2px solid var(--primary);
  margin: 0 0 0.85rem;
  line-height: 1.55;
}

.karar-card-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.karar-card-link:hover { color: var(--primary); }

.opinion-panel {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--gold);
  padding: 1.55rem 1.6rem 0;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.opinion-panel h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.opinion-panel blockquote,
.gorus {
  border-left: 3px solid var(--primary);
  padding-left: 1.15rem;
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text);
}

.gorus .karar-atif {
  color: var(--primary-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.gorus .karar-atif:hover { color: var(--primary); }

.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}

/* ==========================================================================
   DETAIL
   ========================================================================== */

.page-detail .detail-header {
  background: linear-gradient(145deg, var(--ink) 0%, var(--primary-deep) 100%);
  color: var(--chalk);
  padding: 2.75rem 0 2.5rem;
  margin: -2.25rem calc(-50vw + 50%) 2rem;
  padding-left: calc(50vw - 50% + 1rem);
  padding-right: calc(50vw - 50% + 1rem);
  border-bottom: 2px solid var(--gold);
}

.page-detail .detail-header .wrap { padding: 0; }
.page-detail .detail-header h1 { color: var(--chalk); }
.page-detail .detail-header .meta { color: rgba(247,249,250,0.68); }

.detail-docket { margin-bottom: 1rem; }

.docket-stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(212, 168, 75, 0.45);
  padding: 0.38rem 0.72rem;
  background: rgba(255, 255, 255, 0.06);
}

.karar-block {
  margin: 1.6rem 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
}

.karar-block:first-child { border-top: none; padding-top: 0; }

.karar-block h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.7rem;
  font-weight: 500;
}

.karar-block pre,
.karar-block .karar-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin: 0;
  background: var(--chalk);
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  line-height: 1.7;
}

.atif-list { list-style: none; padding: 0; margin: 0; }

.atif-list li {
  padding: 0.8rem 1rem;
  background: var(--chalk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.atif-list a {
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.atif-list a:hover { color: var(--primary); }

/* ==========================================================================
   LOGIN — iki sütun: marka paneli + form
   ========================================================================== */

.page-login { min-height: 100svh; background: var(--chalk); }
.page-login .site-header,
.page-login .site-footer { display: none; }

.auth-split {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(2rem, 5vw, 4rem);
  color: var(--chalk);
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(212, 168, 75, 0.16) 0%, transparent 60%),
    linear-gradient(160deg, #0b1a3d 0%, #13265c 60%, #0f172a 100%);
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, transparent 0 96px, rgba(255, 255, 255, 0.045) 96px 97px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.auth-brand > * { position: relative; }

.auth-brand .brand { color: var(--white); }
.auth-brand .brand-text em { color: var(--gold-light); }

.auth-brand h2 {
  color: var(--white);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  max-width: 15ch;
}

.auth-brand h2 em { font-style: italic; font-weight: 500; color: var(--gold-light); }

.auth-brand-lead {
  margin: 0 0 1.75rem;
  max-width: 30rem;
  color: rgba(248, 250, 252, 0.8);
  font-size: 1.05rem;
}

.auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.auth-points li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: rgba(248, 250, 252, 0.9);
}

.auth-points svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--gold);
}

.auth-brand-foot {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(248, 250, 252, 0.6);
  max-width: 34rem;
}

.auth-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) 1rem;
}

.auth-card {
  width: min(400px, 100%);
}

.auth-card-head { margin-bottom: 1.75rem; }

.auth-card-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 3vw, 2.4rem);
}

.auth-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

.auth-form .form-group { margin-bottom: 1.15rem; }

.auth-form input { background: var(--white); min-height: 48px; }

.input-with-action { position: relative; }
.input-with-action input { padding-right: 3.25rem; }

.input-action {
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.input-action:hover { color: var(--primary); background: var(--primary-soft); }
.input-action svg { width: 20px; height: 20px; }
.input-action .icon-hide { display: none; }
.input-action[aria-pressed="true"] .icon-show { display: none; }
.input-action[aria-pressed="true"] .icon-hide { display: block; }

.auth-form input[aria-invalid="true"] { border-color: var(--danger); }

.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  min-height: 52px;
  font-size: 1rem;
}

.auth-help {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { gap: 1.5rem; padding-bottom: 2.25rem; }
  .auth-brand h2 { font-size: 1.9rem; }
  .auth-points, .auth-brand-foot { display: none; }
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: rgba(247, 249, 250, 0.55);
  font-size: 0.84rem;
  padding: 2.25rem 0 2.5rem;
}

.footer-inner { max-width: 40rem; }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--chalk);
  margin: 0 0 0.55rem;
}
.site-footer p { margin: 0; }

/* --- Admin / shared --- */
.karar-list { list-style: none; padding: 0; margin: 0; }
.karar-list li { border-top: 1px solid var(--line-soft); padding: 0.9rem 0; }
.karar-list a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.meta { color: var(--muted); font-size: 0.88rem; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data th, table.data td {
  border: 1px solid var(--line-soft);
  padding: 0.65rem 0.8rem;
  text-align: left;
}
table.data th {
  background: var(--stone);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--white);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin-top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Scan progress overlay --- */
body.is-scanning { overflow: hidden; }

.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(30, 58, 138, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: scan-fade-in 280ms var(--ease);
}

.scan-overlay[hidden] { display: none !important; }

.scan-overlay-card {
  text-align: center;
  color: var(--white);
  padding: 1.5rem;
}

.scan-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
}

.scan-ring svg {
  display: block;
  transform: rotate(-90deg);
}

.scan-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 6;
}

.scan-ring-prog {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 180ms linear;
}

.scan-overlay-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
  animation: scan-logo-pulse 1.8s ease-in-out infinite;
}

.scan-overlay-pct {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold-light);
}

.scan-overlay-title {
  margin: 0.35rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.scan-overlay-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

@keyframes scan-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scan-logo-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.88; }
}

/* --- Follow-up chat --- */
.chat-panel {
  margin: 0 0 1.75rem;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.25rem;
}

.chat-panel--top {
  margin-top: 0.25rem;
}

.chat-panel-head h2 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.35rem;
}

.chat-panel-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 0.25rem;
}

.chat-thread:empty { display: none; }

.chat-bubble {
  max-width: min(720px, 100%);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--primary-soft);
  border-color: var(--primary-line);
}

.chat-bubble--assistant {
  align-self: flex-start;
  background: var(--chalk);
}

.chat-bubble-meta {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-bubble-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 0.95rem;
}

.chat-bubble--assistant .chat-bubble-body {
  white-space: normal;
  border-left: none;
  padding-left: 0;
}

.chat-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font: inherit;
  background: var(--white);
  color: var(--text);
}

.chat-form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.chat-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

/* --- Search history --- */
.history-home {
  padding: 2.5rem 0 0.5rem;
}

.history-home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.history-home-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0 2rem;
}

.history-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
}

.history-card--link {
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), transform var(--ease);
}

.history-card--link:hover {
  border-color: var(--primary-line);
  transform: translateY(-1px);
}

.history-card-main { flex: 1; min-width: 0; }

.history-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.history-card-olay {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.history-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.history-card-actions form { margin: 0; }

.page-gecmis .lead { max-width: 42rem; }

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 2rem) 0 3rem;
  }
  .hero-stage { grid-template-columns: 1fr; gap: 2rem; }
  .hero-copy h1 { max-width: none; }
  .process-list { grid-template-columns: 1fr; gap: 1rem; }
  .results-layout { grid-template-columns: 1fr; }
  .chat-panel { padding: 1.15rem; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand-text { display: none; }
  .nav-link { padding: 0 0.6rem; font-size: 0.88rem; }
  .nav-sep { display: none; }
  .search-panel { padding: 1.2rem; }
  .hero-stats li { padding-right: 1rem; margin-right: 1rem; }
  .hero-stats strong { font-size: 1.5rem; }
}

/* ==========================================================================
   MOTION — sayfa geçişleri + giriş animasyonları
   ========================================================================== */

/* Aynı site içi gezinmede tarayıcının yerleşik çapraz-belge geçişi (Chrome/Edge 126+, Safari 18.2+) */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 160ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Başlık çubuğu geçişte sabit kalsın */
.site-header { view-transition-name: site-header; }

/* JS + motion.js hazırsa, animasyonlu öğeler ilk karede gizli başlar (FOUC yok) */
.js-motion [data-animate] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .js-motion [data-animate] { opacity: 1; }
}
