/* FERHATLAS ortak yerlesim duzeni — r1 / 2026-11-12
   Yalnizca olcu, bosluk ve hizalamalari ortaklastirir; mevcut renkleri korur. */
:root {
  --fi-layout-wide: 1280px;
  --fi-layout-reading: 820px;
  --fi-layout-gutter: clamp(20px, 4vw, 48px);
  --fi-layout-section: clamp(64px, 8vw, 108px);
  --fi-layout-gap: clamp(20px, 3vw, 36px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 104px; }
body { overflow-x: clip; }
img, video, svg { max-width: 100%; }

/* Ortak sayfa genisligi ve ritmi */
:is(.wrap, .fi-shell, .fi-page-shell, .guide-shell, .article-shell, .fi-bc-shell) {
  width: min(100%, var(--fi-layout-wide));
  margin-inline: auto;
  padding-inline: var(--fi-layout-gutter);
}

:is(.article-shell, .reading-shell, .guide-article) {
  max-width: var(--fi-layout-reading);
}

main > :is(section, article):not([class]) {
  scroll-margin-top: 104px;
}

:is(.section-heading, .page-heading, .article-heading) {
  text-wrap: balance;
}

:is(.section-heading, .page-heading, .article-heading) > :is(p, .section-intro) {
  max-width: 62ch;
}

:is(.card-grid, .guide-grid, .article-grid, .fi-gi-grid, .method-grid, .steps) {
  gap: var(--fi-layout-gap);
}

:is(.card-grid, .guide-grid, .article-grid, .fi-gi-grid, .method-grid, .steps) > * {
  min-width: 0;
}

/* Ana tanitim sayfasi */
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 38px);
}

.hero {
  column-gap: clamp(24px, 5vw, 72px);
}

.hero > *, .report-shell > *, .discovery-panel > * {
  min-width: 0;
}

.section {
  padding-block: var(--fi-layout-section);
}

.section-heading {
  gap: clamp(28px, 5vw, 72px);
}

.discipline-strip {
  width: min(calc(100% - (2 * var(--fi-layout-gutter))), calc(var(--fi-layout-wide) - (2 * var(--fi-layout-gutter))));
  margin-inline: auto;
}

.report-shell {
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
}

.report-content {
  min-width: 0;
}

/* Rehber ve icerik sayfalari */
body.fi-web-standard main {
  min-width: 0;
}

body.fi-web-standard :is(.article-shell, .guide-shell, .fi-gi-main) {
  margin-inline: auto;
}

body.fi-web-standard :is(.article-shell, .guide-shell, .fi-gi-main) > :first-child {
  margin-top: 0;
}

body.fi-web-standard :is(.article-shell, .guide-shell, .fi-gi-main) > :last-child {
  margin-bottom: 0;
}

/* Atlas uygulamasi: tasarimi degistirmeden tasma ve genislikleri duzenle */
body.atlas-v951 :is(.auth-layout, .app-shell, .hero-content, .card-grid) {
  min-width: 0;
}

body.atlas-v951 .auth-layout {
  width: min(100%, var(--fi-layout-wide));
  margin-inline: auto;
  column-gap: clamp(30px, 6vw, 88px);
}

body.atlas-v951 .auth-form-wrap {
  width: min(100%, 540px);
}

body.atlas-v951 .hero-content {
  width: min(100%, var(--fi-layout-wide));
  margin-inline: auto;
}

body.atlas-v951 :is(.analysis-card, .weekly-transit-card) {
  min-width: 0;
}

@media (max-width: 1000px) {
  :root { --fi-layout-gutter: clamp(20px, 5vw, 36px); }

  .report-shell {
    grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --fi-layout-gutter: 24px;
    --fi-layout-section: 68px;
    --fi-layout-gap: 18px;
  }

  html { scroll-padding-top: 88px; }

  .hero, .report-shell, body.atlas-v951 .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-heading {
    align-items: flex-start;
  }

  .report-shell {
    display: block;
  }

  :is(.report-tabs, .discovery-tabs) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  body.atlas-v951 .auth-form-wrap {
    margin-inline: auto;
  }
}

@media (max-width: 420px) {
  :root {
    --fi-layout-gutter: 20px;
    --fi-layout-section: 58px;
  }
}
