/* =========================================================================
   Sanayi İçin Ne Derler — endüstriyel haber portalı tasarım sistemi
   Bootstrap / jQuery / Swiper / Masonry bağımlılığı yoktur.
   ========================================================================= */

/* ---------- 1. Tema belirteçleri ---------------------------------------- */

:root {
    color-scheme: light dark;

    --bg:          #ffffff;
    --bg-soft:     #f4f6f9;
    --bg-sunken:   #eceff4;
    --surface:     #ffffff;
    --surface-alt: #f8fafc;

    --ink:    #0c1420;
    --ink-2:  #44536b;
    --ink-3:  #6f7f97;
    --ink-on-dark: #eef3f9;

    --line:      #e2e8f0;
    --line-soft: #eef2f7;

    --accent:      #d94f04;
    --accent-hot:  #f97316;
    --accent-ink:  #ffffff;
    --accent-wash: rgba(217, 79, 4, .10);

    --steel:      #101c2b;
    --steel-2:    #1b2c42;

    --radius:    14px;
    --radius-sm: 9px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(12, 20, 32, .06), 0 1px 3px rgba(12, 20, 32, .04);
    --shadow:    0 4px 12px rgba(12, 20, 32, .07), 0 2px 4px rgba(12, 20, 32, .04);
    --shadow-lg: 0 18px 40px rgba(12, 20, 32, .13), 0 4px 12px rgba(12, 20, 32, .06);

    --wrap: 1240px;
    --measure: 74ch;

    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --step-step: clamp(.78rem, .74rem + .18vw, .85rem);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:          #0a0f16;
        --bg-soft:     #101823;
        --bg-sunken:   #0d141d;
        --surface:     #121b26;
        --surface-alt: #16202d;

        --ink:    #e9eff7;
        --ink-2:  #a7b6c9;
        --ink-3:  #7d8da3;

        --line:      #23303f;
        --line-soft: #1b2634;

        --accent:      #ff7a2f;
        --accent-hot:  #ff9d5c;
        --accent-ink:  #17202b;
        --accent-wash: rgba(255, 122, 47, .13);

        --steel:   #070c12;
        --steel-2: #101a26;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
        --shadow:    0 4px 14px rgba(0, 0, 0, .45);
        --shadow-lg: 0 20px 44px rgba(0, 0, 0, .55);
    }
}

:root[data-theme="dark"] {
    --bg:          #0a0f16;
    --bg-soft:     #101823;
    --bg-sunken:   #0d141d;
    --surface:     #121b26;
    --surface-alt: #16202d;

    --ink:    #e9eff7;
    --ink-2:  #a7b6c9;
    --ink-3:  #7d8da3;

    --line:      #23303f;
    --line-soft: #1b2634;

    --accent:      #ff7a2f;
    --accent-hot:  #ff9d5c;
    --accent-ink:  #17202b;
    --accent-wash: rgba(255, 122, 47, .13);

    --steel:   #070c12;
    --steel-2: #101a26;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow:    0 4px 14px rgba(0, 0, 0, .45);
    --shadow-lg: 0 20px 44px rgba(0, 0, 0, .55);
}

/* ---------- 2. Temel ----------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: -.021em;
    font-weight: 800;
    color: var(--ink);
    text-wrap: balance;
}

p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- 3. Yerleşim -------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 12px 20px;
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.section { padding-block: clamp(38px, 6vw, 62px); }
.section--soft { background: var(--bg-soft); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}

.section-title {
    font-size: clamp(1.24rem, 1.05rem + .8vw, 1.7rem);
    display: flex;
    align-items: center;
    gap: 11px;
}
.section-title::before {
    content: "";
    width: 6px;
    height: 1.05em;
    background: var(--accent);
    border-radius: 2px;
    flex: none;
}

.section-more {
    font-size: .88rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap .18s ease;
}
.section-more:hover { gap: 11px; }

/* ---------- 4. Üst şerit ve başlık --------------------------------------- */

.topbar {
    background: var(--steel);
    color: rgba(238, 243, 249, .74);
    font-size: .78rem;
    letter-spacing: .015em;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.topbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 38px;
}
.topbar__meta { display: flex; align-items: center; gap: 14px; }
.topbar__links { display: flex; align-items: center; gap: 16px; }
.topbar a { transition: color .16s ease; }
.topbar a:hover { color: var(--accent-hot); }
.topbar__sep { opacity: .35; }

@media (max-width: 640px) {
    .topbar__meta > :not(:first-child) { display: none; }
}

.masthead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.masthead__row {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 68px;
}

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--accent-hot), var(--accent));
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    flex: none;
}
.brand__mark svg { width: 21px; height: 21px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: -.03em;
}
.brand__tag {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* Gezinme */
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
    display: block;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: .93rem;
    font-weight: 650;
    color: var(--ink-2);
    transition: background .16s ease, color .16s ease;
}
.nav__link:hover { background: var(--bg-soft); color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--accent); background: var(--accent-wash); }

.masthead__tools { display: flex; align-items: center; gap: 6px; flex: none; }

.icon-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    border: 1px solid transparent;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 19px; height: 19px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
    .nav-toggle { display: grid; }
    .nav {
        position: fixed;
        inset: 68px 0 auto 0;
        margin: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        padding: 12px clamp(16px, 4vw, 32px) 20px;
        display: none;
    }
    .nav[data-open="true"] { display: block; }
    .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav__link { padding: 13px 14px; font-size: 1rem; }
}

/* ---------- 5. Son dakika şeridi ----------------------------------------- */

.ticker {
    background: var(--steel-2);
    color: var(--ink-on-dark);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.ticker__row { display: flex; align-items: stretch; min-height: 44px; }
.ticker__label {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    padding-inline: 16px;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 100%, 0 100%);
    padding-right: 26px;
}
.ticker__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.7s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.ticker__viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker__track {
    display: flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
    padding-left: 22px;
    animation: ticker-scroll 46s linear infinite;
}
.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track { animation-play-state: paused; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker__viewport { overflow-x: auto; }
    .ticker__track { animation: none; }
}
.ticker__item {
    font-size: .87rem;
    color: rgba(238, 243, 249, .82);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color .16s ease;
}
.ticker__item:hover { color: #fff; }
.ticker__item::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent-hot);
    flex: none;
}

/* ---------- 6. Görsel / yer tutucu --------------------------------------- */

.thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bg-sunken);
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
a:hover > .thumb img, .card:hover .thumb img { transform: scale(1.055); }

/* CMS'te kapak görseli olmayan içerikler için üretilen desen. */
.thumb--gen {
    background:
        repeating-linear-gradient(
            135deg,
            hsl(var(--h) 42% 46% / .16) 0 11px,
            transparent 11px 22px
        ),
        linear-gradient(150deg,
            hsl(var(--h) 45% 30%) 0%,
            hsl(calc(var(--h) + 22) 52% 17%) 100%);
}
/*
   Baş harf yerine ortak bir sanayi filigranı kullanılıyor: başlıkların büyük
   kısmı "Endüstriyel..." ile başladığı için harf monogramı neredeyse her
   kartta aynı çıkıyordu. Ayırt ediciliği slug'dan türeyen renk sağlıyor.
*/
.thumb--gen::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M12 50V26l12 8v-8l12 8V18l14 7v25z'/%3E%3Cpath d='M22 50v-7M32 50v-7M42 50v-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: min(34%, 92px);
    opacity: .22;
}

.thumb__badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
}

/* ---------- 7. Rozet / etiket -------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-sm);
}
.badge--muted {
    background: var(--bg-soft);
    color: var(--ink-2);
    border: 1px solid var(--line);
    box-shadow: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    font-size: .85rem;
    font-weight: 650;
    transition: all .16s ease;
}
.chip:hover, .chip[aria-current="page"] {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-wash);
}

/* ---------- 8. Meta satırı ----------------------------------------------- */

.meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    font-size: .8rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}
.meta__sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
.meta__item { display: inline-flex; align-items: center; gap: 5px; }
.meta__item svg { width: 14px; height: 14px; opacity: .75; }

/* ---------- 9. Kart ------------------------------------------------------ */

.card {
    display: flex;
    flex-direction: column;
    gap: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 13px;
    height: 100%;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}
.card__body { display: flex; flex-direction: column; gap: 9px; padding: 2px 6px 8px; flex: 1; }
.card__title {
    font-size: 1.06rem;
    line-height: 1.32;
    letter-spacing: -.015em;
}
.card__title a { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 2px; transition: background-size .3s ease; }
.card:hover .card__title a { background-size: 100% 2px; }
.card__excerpt {
    margin: 0;
    font-size: .9rem;
    color: var(--ink-2);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__foot { margin-top: auto; padding-top: 4px; }

/* Yatay kart (kenar çubuğu / öne çıkanlar) */
.card--row {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
}
.card--row .thumb { width: 108px; flex: none; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); }
.card--row .card__body { padding: 0; gap: 7px; }
.card--row .card__title { font-size: .96rem; }

/* Numaralı liste kartı */
.rank { display: flex; flex-direction: column; gap: 2px; }
.rank__item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-soft);
}
.rank__item:last-child { border-bottom: 0; }
.rank__no {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    flex: none;
    width: 34px;
    font-variant-numeric: tabular-nums;
}
.rank__title { font-size: .95rem; font-weight: 700; line-height: 1.42; }
.rank__item:hover .rank__title { color: var(--accent); }

/* ---------- 10. Manşet --------------------------------------------------- */

.hero { padding-top: clamp(24px, 4vw, 40px); }
.hero__grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }

.lead {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: clamp(340px, 46vw, 520px);
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    box-shadow: var(--shadow);
}
.lead .thumb {
    position: absolute;
    inset: 0;
    z-index: -2;
    border-radius: 0;
    aspect-ratio: auto;
    height: 100%;
}
.lead::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top,
        rgba(6, 10, 16, .93) 0%,
        rgba(6, 10, 16, .72) 38%,
        rgba(6, 10, 16, .18) 72%,
        rgba(6, 10, 16, .05) 100%);
}
.lead__body {
    padding: clamp(20px, 3.4vw, 38px);
    display: flex;
    flex-direction: column;
    gap: 13px;
    color: #fff;
    width: 100%;
}
/* Dikey flex kapsayıcıda rozet tüm genişliğe yayılmasın. */
.lead__body > .badge { align-self: flex-start; }
.lead__title {
    color: #fff;
    font-size: clamp(1.5rem, 1.05rem + 2.1vw, 2.6rem);
    line-height: 1.14;
    letter-spacing: -.03em;
}
.lead__excerpt {
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(.92rem, .88rem + .2vw, 1.03rem);
    max-width: 62ch;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lead .meta { color: rgba(255, 255, 255, .74); }
.lead__link { position: absolute; inset: 0; z-index: 3; }

.hero__side { display: flex; flex-direction: column; gap: 12px; }
.hero__side .card--row { flex: 1; }

/* ---------- 11. Izgara --------------------------------------------------- */

.grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.layout {
    display: grid;
    gap: clamp(26px, 4vw, 48px);
    grid-template-columns: minmax(0, 1fr) 328px;
    align-items: start;
}
@media (max-width: 1040px) { .layout { grid-template-columns: 1fr; } }

.sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 88px; }
@media (max-width: 1040px) { .sidebar { position: static; } }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.panel__title {
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 15px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}

/* ---------- 12. Yazı gövdesi (Markdown çıktısı) -------------------------- */

.article { max-width: var(--measure); }

.article__header { margin-bottom: 28px; }
.article__title {
    font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -.032em;
    margin-bottom: 16px;
}
.article__standfirst {
    font-size: clamp(1.02rem, .98rem + .3vw, 1.17rem);
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 18px;
}
.article__cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow); }
.article__cover .thumb { aspect-ratio: 21 / 9; border-radius: 0; }

.prose { font-size: 1.055rem; line-height: 1.78; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose h2, .prose h3, .prose h4 {
    color: var(--ink);
    margin: 2.1em 0 .6em;
    scroll-margin-top: 96px;
}
.prose h2 {
    font-size: 1.52em;
    padding-bottom: .34em;
    border-bottom: 1px solid var(--line);
}
.prose h3 { font-size: 1.24em; }
.prose h4 { font-size: 1.08em; }

.prose h2::before, .prose h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: .78em;
    margin-right: .5em;
    vertical-align: -.02em;
    background: var(--accent);
    border-radius: 2px;
}

.prose p { margin: 0 0 1.25em; }
.prose strong { color: var(--ink); font-weight: 700; }

.prose a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}
.prose a:hover { background: var(--accent-wash); }

.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.5em; }
.prose ul { list-style: none; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .55em; padding-left: .2em; }
.prose ul > li { position: relative; }
.prose ul > li::before {
    content: "";
    position: absolute;
    left: -1.15em;
    top: .65em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--accent);
    transform: rotate(45deg);
}
.prose ol::marker, .prose li::marker { color: var(--accent); font-weight: 700; }

.prose blockquote {
    margin: 1.7em 0;
    padding: 18px 22px;
    border-left: 4px solid var(--accent);
    background: var(--bg-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink);
    font-size: 1.06em;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose img { border-radius: var(--radius); margin: 1.6em 0; box-shadow: var(--shadow-sm); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.prose code {
    font-family: var(--font-mono);
    font-size: .87em;
    background: var(--bg-sunken);
    padding: .16em .4em;
    border-radius: 5px;
    border: 1px solid var(--line-soft);
}
.prose pre {
    background: var(--steel);
    color: #e6edf6;
    padding: 18px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.6em 0;
    font-size: .9em;
    line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.7em 0;
    font-size: .94em;
}
.prose thead { background: var(--bg-soft); }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { font-weight: 800; color: var(--ink); }

.table-scroll { overflow-x: auto; }

/* ---------- 13. İçindekiler ---------------------------------------------- */

.toc__list { display: flex; flex-direction: column; gap: 1px; }
.toc__link {
    display: block;
    padding: 7px 11px;
    border-left: 2px solid var(--line);
    font-size: .87rem;
    color: var(--ink-2);
    line-height: 1.45;
    transition: all .16s ease;
}
.toc__link:hover { color: var(--accent); border-left-color: var(--accent); background: var(--accent-wash); }
.toc__link--3 { padding-left: 22px; font-size: .83rem; }
.toc__link.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 650; }

/* ---------- 14. Okuma ilerlemesi ----------------------------------------- */

.progress {
    position: fixed;
    left: 0; top: 0;
    height: 3px;
    width: 100%;
    z-index: 200;
    background: transparent;
    pointer-events: none;
}
.progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-hot));
    transition: width .1s linear;
}

/* ---------- 15. Paylaşım ------------------------------------------------- */

.share { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.share__label {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.share__btn {
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--ink-2);
    background: var(--surface);
    transition: all .18s ease;
}
.share__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.share__btn svg { width: 17px; height: 17px; }

/* ---------- 16. Sayfalama ------------------------------------------------ */

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 42px;
}
.pager__link, .pager__gap {
    min-width: 42px;
    height: 42px;
    padding-inline: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: .9rem;
    font-weight: 650;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    transition: all .16s ease;
}
.pager__link:hover { border-color: var(--accent); color: var(--accent); }
.pager__link[aria-current="page"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.pager__gap { border-color: transparent; background: none; }
.pager__link[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pager__link svg { width: 15px; height: 15px; }
@media (max-width: 560px) {
    .pager__num { display: none; }
    .pager__num--edge { display: inline-flex; }
}

/* ---------- 17. Alt bilgi ------------------------------------------------ */

.footer {
    background: var(--steel);
    color: rgba(238, 243, 249, .72);
    margin-top: clamp(48px, 7vw, 84px);
    font-size: .9rem;
}
.footer a { transition: color .16s ease; }
.footer a:hover { color: var(--accent-hot); }

.footer__top {
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
    padding-block: clamp(38px, 5vw, 56px);
}
@media (max-width: 820px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

.footer__brand .brand__name { color: #fff; }
.footer__about { margin: 14px 0 0; max-width: 46ch; line-height: 1.7; color: rgba(238, 243, 249, .62); }

.footer__title {
    color: #fff;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 15px;
}
.footer__list { display: flex; flex-direction: column; gap: 10px; }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-block: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .84rem;
    color: rgba(238, 243, 249, .55);
}
.footer__powered { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 18. Duyuru şeridi -------------------------------------------- */

.promos {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--bg-soft);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}
.promos__label {
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* ---------- 19. Boş / hata durumu ---------------------------------------- */

.empty {
    text-align: center;
    padding: clamp(48px, 9vw, 96px) 20px;
    max-width: 54ch;
    margin-inline: auto;
}
.empty__code {
    font-size: clamp(3.4rem, 2rem + 7vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.05em;
    background: linear-gradient(140deg, var(--accent-hot), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}
.empty__title { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.8rem); margin-bottom: 12px; }
.empty__text { color: var(--ink-2); margin-bottom: 26px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 750;
    font-size: .94rem;
    border: 1px solid var(--accent);
    transition: all .18s ease;
}
.btn:hover { background: transparent; color: var(--accent); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--block { width: 100%; justify-content: center; }
.btn svg { width: 16px; height: 16px; }

/* ---------- 20. Yardımcılar ---------------------------------------------- */

.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;
}

.stack { display: flex; flex-direction: column; }
.stack--sm { gap: 10px; }
.stack--md { gap: 18px; }
.stack--lg { gap: 30px; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: var(--ink-3); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { opacity: .5; }
.breadcrumb__current { color: var(--ink-2); font-weight: 600; }

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 90;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 19px; height: 19px; }

/* ---------- 21. Baskı ---------------------------------------------------- */

@media print {
    .topbar, .masthead, .ticker, .sidebar, .footer, .to-top, .progress, .share { display: none !important; }
    body { font-size: 12pt; background: #fff; color: #000; }
    .article { max-width: none; }
    .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
