/* ==========================================================================
   DGR Web v10 — Yasal sayfalar (KVKK, gizlilik, çerezler, koşullar)
   Sade, okunur, yazdırılabilir. Yalnızca tokenlar (theme.css): sabit renk yok, blur yok.
   Düzen: sol kenarda içindekiler (≥ 62rem'de yapışkan), sağda belge. Dar ekranda içindekiler açılır başlık.
   Davranış: assets/js/front/legal.js · Sınıf öneki: lg-
   ========================================================================== */

.lg {
    padding-block: clamp(2rem, 4vw, 3.5rem) var(--section-py, clamp(4rem, 7vw, 7rem));
    color: var(--text-2);
}

.lg__wrap {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

@media (min-width: 62.01rem) {
    .lg__wrap {
        grid-template-columns: 15rem minmax(0, 1fr);
        gap: clamp(2.5rem, 5vw, 4.5rem);
    }
}

/* ---------- Kenar çubuğu ---------- */
.lg-side {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
}

@media (min-width: 62.01rem) {
    .lg-side {
        position: sticky;
        top: calc(var(--header-h, 68px) + 1.5rem);
        max-height: calc(100vh - var(--header-h, 68px) - 3rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 0.25rem;
    }
}

.lg-toc__sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    list-style: none;
    cursor: pointer;
    padding: 0.7rem 0;
    border-block: 1px solid var(--line);
    font-family: var(--mono);
    font-size: var(--fs-label, 0.75rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

.lg-toc__sum::-webkit-details-marker {
    display: none;
}

.lg-toc__sum:focus-visible,
.lg-toc__link:focus-visible,
.lg-docs__link:focus-visible,
.lg-doc a:focus-visible,
.lg-doc pre:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 2px;
}

.lg-toc__chev {
    width: 1rem;
    height: 1rem;
    color: var(--text-3);
    transition: transform 0.25s var(--ease);
}

.lg-toc[open] .lg-toc__chev {
    transform: rotate(180deg);
}

@media (min-width: 62.01rem) {
    .lg-toc__sum {
        cursor: default;
        border-top: 0;
    }

    .lg-toc__chev {
        display: none;
    }
}

.lg-toc__list {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0 0;
    counter-reset: lgtoc;
}

.lg-toc__list li {
    counter-increment: lgtoc;
}

.lg-toc__link {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: 0.25rem;
    padding: 0.45rem 0 0.45rem 0.75rem;
    border-left: 1px solid var(--line);
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.35;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.lg-toc__link::before {
    content: counter(lgtoc, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 0.7rem;
    line-height: 1.8;
    color: var(--text-3);
}

.lg-toc__link:hover {
    color: var(--text);
    border-left-color: var(--line-2);
}

.lg-toc__link[aria-current="true"] {
    color: var(--text);
    border-left-color: var(--brand);
    background: linear-gradient(90deg, var(--brand-soft), transparent 85%);
}

.lg-toc__link[aria-current="true"]::before {
    color: var(--brand-700);
}

.lg-docs__title {
    margin: 0 0 0.5rem;
    font-family: var(--mono);
    font-size: var(--fs-label, 0.75rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.lg-docs__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
}

.lg-docs__link {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    padding-block: 0.15rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.lg-docs__link:hover {
    color: var(--text);
    border-bottom-color: var(--line-2);
}

.lg-docs__link[aria-current="page"] {
    color: var(--text);
    border-bottom-color: var(--brand);
}

.lg-print {
    justify-self: start;
}

/* ---------- Belge ---------- */
.lg-doc {
    min-width: 0;
    max-width: 52rem;
    counter-reset: lgsec;
    font-size: 1rem;
    line-height: 1.7;
}

.lg-meta {
    margin: 0 0 1.75rem;
    font-family: var(--mono);
    font-size: var(--fs-label, 0.75rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.lg-sec {
    position: relative;
    counter-increment: lgsec;
    padding-top: 2.25rem;
    margin-top: 2.75rem;
    scroll-margin-top: calc(var(--header-h, 68px) + 1rem);
}

.lg-doc > .lg-brief + .lg-sec,
.lg-doc > .lg-meta + .lg-sec {
    margin-top: 1rem;
}

/* Bölüm üst çizgisi: görünür alana girince soldan çizilir (içerik her zaman görünür) */
.lg-sec::before,
.lg-sec::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
}

.lg-sec::before {
    background: var(--line);
}

.lg-sec::after {
    background: var(--brand);
    width: 4.5rem;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.7s var(--ease);
}

.lg-sec.is-in::after {
    transform: scaleX(1);
}

.lg-sec h2 {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--text);
}

.lg-sec h2::before {
    content: counter(lgsec, decimal-leading-zero);
    flex: none;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--brand-700);
}

.lg-sec h3 {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--text);
}

.lg-sec p {
    margin: 0 0 1rem;
}

.lg-sec strong,
.lg-sec b,
.lg-sec dt {
    color: var(--text);
    font-weight: 650;
}

.lg-sec em {
    font-style: normal;
    color: var(--text);
    border-bottom: 1px dotted var(--line-2);
}

.lg-doc a:not(.btn) {
    color: var(--brand-700);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color 0.2s var(--ease);
}

.lg-doc a:not(.btn):hover {
    color: var(--text);
}

.lg-doc code {
    font-family: var(--mono);
    font-size: 0.85em;
    padding: 0.1em 0.4em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    overflow-wrap: anywhere;
}

.lg-table code {
    white-space: nowrap;
    overflow-wrap: normal;
}

.lg-fine {
    font-size: 0.85rem;
    color: var(--text-3);
}

/* Listeler */
.lg-list {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.lg-list > li {
    position: relative;
    padding-left: 1.35rem;
}

ul.lg-list > li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.72em;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 1px;
    background: var(--brand);
}

ol.lg-list {
    counter-reset: lgalpha;
}

ol.lg-list > li {
    counter-increment: lgalpha;
    padding-left: 2rem;
}

ol.lg-list > li::before {
    content: "(" counter(lgalpha, lower-alpha) ")";
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--brand-700);
}

/* "Kısaca" özeti: sayı/kelime + tek cümle */
.lg-brief {
    display: grid;
    margin: 0 0 1rem;
    border-block: 1px solid var(--line);
}

.lg-brief__item {
    display: grid;
    gap: 0.25rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
}

.lg-brief__item:last-child {
    border-bottom: 0;
}

.lg-brief__label {
    font-family: var(--mono);
    font-size: var(--fs-label, 0.75rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.lg-brief__value {
    margin: 0;
    font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text);
}

.lg-brief__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-2);
}

@media (min-width: 40rem) {
    .lg-brief {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg-brief__item {
        padding: 1.25rem 1.25rem 1.25rem 0;
    }

    .lg-brief__item:nth-child(even) {
        padding-left: 1.25rem;
        border-left: 1px solid var(--line);
    }

    .lg-brief__item:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}

/* Künye / bilgi listesi */
.lg-dl {
    margin: 0 0 1.25rem;
    border-top: 1px solid var(--line);
}

.lg-dl__row {
    display: grid;
    gap: 0.15rem 1.5rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}

.lg-dl__row dt {
    font-family: var(--mono);
    font-size: var(--fs-label, 0.75rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    font-weight: 500;
}

.lg-dl__row dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

@media (min-width: 40rem) {
    .lg-dl__row {
        grid-template-columns: 13rem minmax(0, 1fr);
        align-items: baseline;
    }
}

/* Tablolar */
.lg-tablewrap {
    margin: 0 0 1.25rem;
}

.lg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.55;
}

.lg-table caption {
    text-align: left;
}

.lg-table th,
.lg-table td {
    padding: 0.85rem 1rem 0.85rem 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.lg-table thead th {
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: var(--fs-label, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

.lg-table tbody th {
    color: var(--text);
    font-weight: 650;
}

@media (max-width: 47.99rem) {
    .lg-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .lg-table,
    .lg-table tbody,
    .lg-table tr,
    .lg-table th,
    .lg-table td {
        display: block;
        width: 100%;
    }

    .lg-table tr {
        padding: 0.9rem 0;
        border-top: 1px solid var(--line);
    }

    .lg-table tr:last-child {
        border-bottom: 1px solid var(--line);
    }

    .lg-table th,
    .lg-table td {
        padding: 0.2rem 0;
        border: 0;
    }

    .lg-table tbody th {
        padding-bottom: 0.4rem;
        font-size: 1rem;
    }

    .lg-table td::before {
        content: attr(data-label);
        display: block;
        font-family: var(--mono);
        font-size: 0.7rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--text-3);
    }
}

/* Başvuru şablonu */
.lg-tpl-wrap {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
    margin-bottom: 1rem;
}

.lg-tpl {
    width: 100%;
    max-height: 26rem;
    margin: 0;
    padding: 1.1rem 1.25rem;
    overflow: auto;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm, 8px);
    background: var(--surface);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* İletişim formundaki aydınlatma özeti (partials/legal-form-notice.php) */
.lg-formnote__text {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-2);
}

.lg-formnote__text strong {
    color: var(--text);
}

.lg-formnote__text a {
    color: var(--brand-700);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.lg-formnote__hint {
    color: var(--text-3);
    font-size: 0.85em;
}

/* Altbilgi yasal bağlantı listesi (partials/legal-links.php) */
.lg-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
}

.lg-links a {
    color: var(--text-2);
    text-decoration: none;
}

.lg-links a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ---------- Hareket ---------- */
html[data-motion="off"] .lg-sec::after,
html[data-motion="off"] .lg-toc__chev,
html[data-motion="off"] .lg-toc__link {
    transition: none;
}

html[data-motion="off"] .lg-sec::after {
    transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
    .lg-sec::after,
    .lg-toc__chev,
    .lg-toc__link,
    .lg-docs__link {
        transition: none;
    }

    .lg-sec::after {
        transform: scaleX(1);
    }
}

/* ---------- Yazdırma: yalnızca belge, siyah-beyaz, bağlantı adresleri ---------- */
@media print {
    html,
    body {
        background: #fff !important;
        color: #000 !important;
    }

    header,
    footer,
    nav.crumbs,
    .nav,
    .footer,
    .lg-side,
    .lg-print,
    .lg-copy,
    .cs,
    [data-consent],
    [data-welcome],
    dialog,
    .to-top,
    .toast,
    .dial,
    .speed-dial,
    .announce,
    .amb,
    .ambient,
    .lamp,
    .theme-lamp,
    .page-head .anim-in:not(h1):not(.page-head__intro) {
        display: none !important;
    }

    .lg,
    .lg * {
        color: #000 !important;
        background: transparent !important;
        border-color: #999 !important;
        box-shadow: none !important;
    }

    .lg__wrap {
        display: block;
    }

    .lg-doc {
        max-width: none;
    }

    .lg-sec {
        break-inside: avoid-page;
    }

    .lg-sec::after {
        display: none;
    }

    .lg-doc a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    .lg-tpl {
        max-height: none;
        overflow: visible;
    }
}

/* ==========================================================================
   v12 "Ember" katmanı — okunur ve sakin: içindekiler kart, "kısaca" özeti kart, bölüm numaraları turuncu
   ========================================================================== */
.lg-toc { padding: 0.9rem 1.1rem 0.6rem; }
.lg-toc__sum { padding: 0.25rem 0 0.75rem; border-top: 0; }
.lg-toc__link[aria-current="true"] { color: var(--brand-600); }
.lg-toc__link[aria-current="true"]::before { background: var(--brand); }
.lg-sec::after { background: var(--grad-brand, linear-gradient(90deg, var(--brand), var(--accent, #ffb347))); }
.lg-sec h2 { font-weight: 700; }
.lg-sec h2::before { color: var(--brand-600); }
.lg-doc a:not(.btn) { color: var(--brand-600); }

.lg-brief {
    gap: 0.75rem;
    border: 0;
}

.lg-brief__item {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r, 16px);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.lg-brief__item:last-child { border-bottom: 1px solid var(--line); }
.lg-brief__value { color: var(--brand-600); font-weight: 700; }

@media (min-width: 40rem) {
    .lg-brief__item { padding: 1.1rem 1.2rem; }
    .lg-brief__item:nth-child(even) { padding-left: 1.2rem; border-left: 1px solid var(--line); }
    .lg-brief__item:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

.lg-tablewrap {
    border: 1px solid var(--line);
    border-radius: var(--r, 16px);
    background: var(--surface);
    overflow: clip;
}

.lg-table th, .lg-table td { padding-inline: 1rem; }
