/* =============================================================================
   TELEFON  (< 640px)
   UX: Tek sütun, başparmak bölgesinde alt sekme çubuğu, hamburger çekmece menü,
   açılır arama, yapışkan kompakt başlık, kaydırılabilir manşet, kart listeleri,
   kompakt (yatay) postbit, büyük dokunma hedefleri ve 16px+ yazı (iOS yakınlaştırma yok).
   ========================================================================== */
html { font-size: 100%; scroll-padding-top: 64px; }
body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); background-image: none; }
.wrap { padding: 0 10px; }
.site-main { padding-top: 8px; }
:root { --gap: 12px; }

.only-mobile { display: grid !important; }
.hide-mobile, .hide-tablet, .hide-mobile-far { display: none !important; }

/* Tek sütun yerleşim: önce içerik, sonra sağ ve sol widget'lar */
.page { display: flex; flex-direction: column; }
.col-main, .col-left, .col-right { min-width: 0; width: 100%; }
.page--home .col-right { order: 2; }
.page--home .col-left { order: 3; }

/* Üst çubuk: yalnızca tema ve oturum */
.topbar__left { display: none; }
.topbar__in { justify-content: flex-end; min-height: 30px; }
.topbar__user span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Yapışkan kompakt başlık */
.masthead { position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.masthead__in { min-height: 56px; gap: 8px; flex-wrap: wrap; }
.brand { margin: 0 auto; }
.brand__mark { width: 34px; height: 34px; }
.brand__name { font-size: 1.35rem; }
.brand__tag { display: none; }
.masthead__quick { display: none; }
.masthead__search { order: 10; flex-basis: 100%; max-width: none; margin: 0 0 8px; display: none; }
.masthead.is-search-open .masthead__search { display: flex; }
.masthead__search input { height: 44px; font-size: 16px; }

/* Ana menü yerine çekmece; alt şerit kaydırılabilir çipler */
.mnav { display: none; }
.subbar__in { min-height: 40px; }
.subbar__label { display: none; }
.subbar__links li + li::before { display: none; }
.subbar__links { gap: 6px; padding: 6px 0; }
.subbar__links a { display: block; padding: 4px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 600; }
.ticker__in { height: 36px; }
.ticker__label { padding: 0 14px 0 8px; font-size: 0; gap: 0; }
.ticker__label .i { width: 16px; height: 16px; }
.ticker__item { font-size: .85rem; }

/* Alt sekme çubuğu */
.bnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
}
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.bnav a .i { width: 22px; height: 22px; }
.bnav a.is-active { color: var(--red); box-shadow: inset 0 3px 0 var(--red); }
.bnav a:hover { text-decoration: none; }
.to-top { bottom: calc(72px + env(safe-area-inset-bottom)); right: 12px; }

/* Kutular */
.box { border-radius: 6px; }
.box__head { min-height: 42px; }
.box__chips { display: none; }
.section-head { padding: 12px; }
.section-head h1 { font-size: 1.35rem; }
.section-head__cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; padding: 6px 12px; }

/* Manşet: kaydırılabilir (swipe) şerit */
.headline__slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.headline__slides::-webkit-scrollbar { display: none; }
.headline__slide { flex: 0 0 100%; opacity: 1; visibility: visible; scroll-snap-align: start; }
.headline__caption { padding: 40px 12px 10px; }
.headline__title { font-size: 1.15rem; }
.headline__summary { display: none; }
.headline__pager { overflow-x: auto; scrollbar-width: none; }
.headline__num { flex: 0 0 36px; height: 34px; }
.headline__all { display: none; }

/* Kartlar: ilk kart büyük, diğerleri yatay liste */
.grid-cards { grid-template-columns: 1fr; gap: 0; }
.grid-cards .card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px dotted var(--line); }
.grid-cards .card:first-child { display: block; padding-top: 0; }
.grid-cards .card:first-child .card__title { font-size: 1.12rem; }
.grid-cards .card:last-child { border-bottom: 0; }
.grid-cards .card:not(:first-child) .card__media { margin: 0; }
.grid-cards .card:not(:first-child) .cover__label { display: none; }
.card__title { font-size: 1rem; }
.cat-blocks, .grid-authors, .authors-grid, .tool-grid { grid-template-columns: 1fr; }
.arow { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
.arow__title { font-size: 1.02rem; }
.arow__summary { display: none; }
.box__body--list { padding: 0 12px; }

/* Tablolar */
.table th, .table td { padding: 9px 8px; }
.table { font-size: .92rem; }

/* Makale */
.article { padding: 14px; }
.article__title { font-size: 1.5rem; }
.article__summary { font-size: 1.02rem; }
.legis-card dl { grid-template-columns: 1fr; }
.article__nav { grid-template-columns: 1fr; }
.article__next { text-align: left; }
.prose { font-size: 1.05rem; }

/* Formlar: iOS yakınlaştırmasını önlemek için 16px */
.input, .select, .textarea { font-size: 16px; padding: 10px; }
.form-grid, .form-grid--title, .filters__row, .radio-group--cards { grid-template-columns: 1fr; }
.btn { min-height: 42px; }
.btn--small { min-height: 34px; }
.form__actions .btn { flex: 1; }
.search-big, .glossary-search { flex-direction: column; }

/* Sözlük ve takvim */
.term-list { columns: 1; }
.term-detail { padding: 14px; }
.term-detail__letter { width: 52px; height: 52px; font-size: 1.8rem; }
.term-detail h1 { font-size: 1.45rem; }
.alphabet a { min-width: 34px; height: 34px; }
/* Takvim ızgarası yerine liste görünümü */
.cal__grid { display: none; }
.cal__legend { display: none; }

/* Forum listesi: ikon + başlık; istatistikler satır içi */
.fhead { padding: 12px; }
.fhead__title { font-size: 1.25rem; }
.fhead__actions { width: 100%; }
.fhead__actions .btn { flex: 1; }
.ftable__colhead, .tlist__colhead { display: none; }
.frow { grid-template-columns: 42px minmax(0, 1fr); }
.frow__stats, .frow__last { display: none; }
.frow__icon .i { width: 22px; height: 22px; }
.frow__mstats { display: block; }
.frow__desc { font-size: .86rem; }
.trow { grid-template-columns: 34px minmax(0, 1fr); }
.trow__stats, .trow__last { display: none; }
.trow__icon .i { width: 17px; height: 17px; }
.trow__mstats { display: block; margin-top: 3px; }
.trow__title { font-size: 1rem; }
.tlist__bar { flex-direction: column; align-items: stretch; }
.tlist__sort .select { flex: 1; }

/* Konu sayfası */
.thead { padding: 12px; }
.thead__title { font-size: 1.2rem; }
.toolbar__left .btn { flex: 1; }
.toolbar__left { flex: 1; }

/* Postbit: her iki tercih de kompakt yatay karta dönüşür */
.post, .post--v, .post--h { display: block; border-radius: 6px; }
.post--v .post__side, .post--h .post__bar { padding: 8px 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); }
.post .pb-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post .pb-user__id { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.post .pb-user__names { align-items: flex-start !important; display: flex; flex-direction: column; }
.post .avatar--lg, .post .avatar--md { width: 42px; height: 42px; font-size: .95rem; border-radius: 5px; box-shadow: none; }
.post .pb-badges { margin: 0 !important; justify-content: flex-start; }
.post .pb-badges .badge--job { display: none; }
.post .pb-info { display: none; }
.pb-head { padding: 0 10px; }
.pb-body { padding: 12px; }
.pb-sig { display: none; }
.pb-thanks { margin: 0 12px 8px; }
.pb-foot { padding: 4px 6px; }
.pb-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
.pb-btn { flex: none; padding: 8px 10px; }
.pb-report[open] .inline-report { position: fixed; left: 10px; right: 10px; bottom: 80px; width: auto; }
.editor__bar { flex-wrap: nowrap; overflow-x: auto; }
.editor__count { display: none; }
.thread-foot { grid-template-columns: 1fr; }

/* Profil */
.profile__cover { height: 84px; }
.profile__id { flex-direction: column; align-items: center; text-align: center; margin-top: -48px; padding: 0 12px 10px; gap: 8px; }
.profile__avatar.avatar--xl { width: 96px; height: 96px; font-size: 2rem; }
.profile__names { padding-top: 0; }
.profile__name { justify-content: center; font-size: 1.35rem; }
.profile__badges { justify-content: center; }
.profile__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile__stats .stat { padding: 8px 4px; }
.profile__stats .stat:nth-child(3n) { border-right: 0; }
.profile__stats .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line-2); }
.stat dd { font-size: 1rem; }
.profile__tabs { overflow-x: auto; }

/* Kimlik doğrulama: yan bilgi alta */
.auth { grid-template-columns: 1fr; gap: 12px; }
.auth__box .box__body { padding: 14px; }

/* Alt bilgi */
.footer__band-in { gap: 6px 16px; font-size: .82rem; }
.footer__cols { grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 18px; }
.footer__col--brand { grid-column: 1 / -1; }
.footer__bottom-in { flex-direction: column; text-align: center; align-items: center; }

/* Sayfalama: yalnızca önceki/sonraki ve geçerli sayfa */
.pager { justify-content: center; }
.pager__item { min-width: 40px; height: 38px; }
.pager__info { height: 38px; }
