/* İçerik bileşenleri: bölüm kartları, listeler, görseller, videolar, görsel penceresi ve kutular. */

.draft-note {
    border-left: 2px solid #aaa08c;
    padding-left: 14px;
    margin: 22px 0 0;
    color: var(--panel-muted);
    font-size: 12px;
    line-height: 1.7;
}

.placeholder {
    color: var(--panel-muted);
}

.project-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px 32px;
    margin: 28px 0 0;
}

.project-facts dt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--panel-muted);
    margin-bottom: 7px;
}

.project-facts dd {
    font-size: 13px;
    margin: 0;
}

.article-section {
    position: relative;
    padding: 32px 38px 35px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    color: var(--panel-ink);
}

.introduction+.article-section {
    border-radius: 8px 8px 0 0;
}

.article-section:last-child {
    border-radius: 0 0 8px 8px;
}

.article-section>p:last-child {
    margin-bottom: 0;
}

.media-placeholder {
    min-height: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px dashed var(--line);
    background: #85978708;
    color: var(--panel-muted);
}

.media-placeholder>span {
    font-size: 13px;
}

.media-placeholder figcaption {
    font-size: 11px;
    margin-top: 8px;
    opacity: .75;
}

.article-section h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -.1px;
    line-height: 1.35;
    margin: 40px 0 18px;
}

.article-section ul {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.8;
}

.article-section li {
    margin-bottom: 8px;
}

.spaced-list {
    margin-bottom: 16px;
}

ol.spaced-list {
    margin-top: 0;
    padding-left: 22px;
    font-size: 15px;
    line-height: 1.8;
}

.article-section h2+h3 {
    margin-top: 4px;
}

.spaced-list li {
    margin-bottom: 12px;
}

.article-section li::marker {
    color: var(--panel-muted);
}

.loop-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px;
    margin: 6px 0 28px;
    padding: 0;
    list-style: none;
    counter-reset: loop-step;
}

.loop-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff66;
    counter-increment: loop-step;
}

.loop-steps li::before {
    content: counter(loop-step);
    font-size: 11px;
    letter-spacing: .8px;
    color: var(--accent);
}

.loop-steps-ranged {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.loop-steps-ranged li::before {
    content: attr(data-range);
}

.loop-steps li+li::after {
    content: "→";
    position: absolute;
    left: -34px;
    top: 50%;
    width: 34px;
    text-align: center;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--panel-muted);
}

.loop-steps strong {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

.loop-steps span {
    font-size: 13px;
    line-height: 1.55;
    color: var(--panel-muted);
}

.wide-figure {
    margin: 24px 0;
}

.wide-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.wide-figure figcaption {
    margin-top: 10px;
    color: var(--panel-muted);
    font-size: 12px;
    line-height: 1.6;
}

.media-row {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.phone-video {
    margin: 0;
}

.phone-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    background: #10161c;
    box-shadow: 0 10px 28px #0f1e2e24;
}

.media-notes p:first-child {
    margin-top: 0;
}

@media (max-width: 760px) {
    .loop-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .loop-steps-ranged {
        grid-template-columns: 1fr;
    }

    .loop-steps li+li::after {
        content: none;
    }

    .media-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .phone-video {
        width: min(240px, 72%);
        margin: 0 auto;
    }

    .project-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 20px;
        gap: 20px 24px;
    }

    .article-section {
        padding: 25px 23px 28px;
    }
}

@media (max-width: 360px) {
    .article-section {
        padding-left: 18px;
        padding-right: 18px;
    }
}

.owner-notice {
    position: fixed;
    z-index: 40;
    left: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: calc(100vw - 48px);
    padding: 12px 14px 12px 18px;
    border: 1px solid #dddcd3;
    border-radius: 10px;
    background: #faf9f4;
    color: #292d29;
    box-shadow: 0 14px 40px #0000002e;
    font-size: 13.5px;
    line-height: 1.5;
}

.owner-notice p {
    margin: 0;
}

.owner-notice button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #292d29;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 13px;
}

/* Arayüz ve modeller: numaralı işaretler */
.annotated {
    position: relative;
}

.phone-video img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 10px 28px #0f1e2e24;
}

.annotated .pin,
.pin-ref {
    display: inline-block;
    border-radius: 50%;
    background: #1d2630;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

.annotated .pin {
    position: absolute;
    width: 26px;
    height: 26px;
    font-size: 13px;
    line-height: 26px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px #fff, 0 4px 12px #0f1e2e40;
}

.pin-ref {
    width: 19px;
    height: 19px;
    font-size: 11px;
    line-height: 19px;
    vertical-align: 1px;
}

/* Görsel penceresi (lightbox) */
a[data-lightbox] {
    display: block;
    cursor: zoom-in;
}

html.lightbox-open {
    overflow: hidden;
}

.lightbox {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 64px 24px 24px;
    border: 0;
    background: transparent;
    overflow: hidden;
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightbox-in .18s ease-out;
}

.lightbox::backdrop {
    background: rgba(9, 14, 20, .88);
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.lightbox-figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1600px, 100%);
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    border-radius: 8px;
    background: #10161c;
    box-shadow: 0 20px 60px #00000080;
}

.lightbox-figure figcaption {
    max-width: 760px;
    color: #d9e2ea;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #ffffff24;
    color: #fff;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: #ffffff40;
}

@keyframes lightbox-in {
    from {
        opacity: 0;
        transform: scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox[open],
    .play-dialog[open] {
        animation: none;
    }
}

/* Oyun penceresi: "Tarayıcıda oyna" oyunun Web sürümünü geniş ekranda telefon oranında bir çerçevede,
   telefonda bütün ekranda açar. */
html.play-open {
    overflow: hidden;
}

.play-dialog {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: transparent;
    overflow: hidden;
}

.play-dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightbox-in .18s ease-out;
}

.play-dialog::backdrop {
    background: rgba(9, 14, 20, .88);
}

.play-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 100%;
}

.play-screen {
    height: min(860px, calc(100vh - 100px));
    height: min(860px, calc(100dvh - 100px));
    max-width: 100%;
    aspect-ratio: 9 / 19.5;
    border-radius: 22px;
    overflow: hidden;
    background: #efece4;
    box-shadow: 0 20px 60px #00000080;
}

.play-screen iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.play-hint {
    max-width: 440px;
    margin: 0;
    color: #d9e2ea;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.play-close {
    position: fixed;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #ffffff24;
    color: #fff;
    cursor: pointer;
}

.play-close:hover,
.play-close:focus-visible {
    background: #ffffff40;
}

.play-title {
    display: none;
}

/* Telefonda (ve yatay tutulan telefonda) oyun bütün ekranı kaplar. Üstteki çubukta oyunun adı ve kapatma düğmesi
   durur; çubuk oyunun üstüne binmez, böylece oyunun kendi düğmeleri kapanmaz. */
@media (max-width: 640px), (max-height: 500px) {
    .play-dialog {
        padding: 0;
    }

    .play-dialog::backdrop {
        background: #101418;
    }

    .play-stage {
        justify-content: flex-start;
        gap: 0;
        padding-top: calc(56px + env(safe-area-inset-top));
    }

    .play-screen {
        flex: 1 1 auto;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        border-radius: 0;
        box-shadow: none;
    }

    .play-hint {
        display: none;
    }

    .play-title {
        position: fixed;
        top: env(safe-area-inset-top);
        left: 18px;
        display: flex;
        align-items: center;
        height: 56px;
        margin: 0;
        color: #fff;
        font-size: 17px;
        font-weight: 600;
    }

    .play-close {
        top: calc(6px + env(safe-area-inset-top));
        right: 8px;
    }
}

@media (max-width: 760px) {
    .lightbox {
        padding: 64px 12px 16px;
    }
}

/* Bölüm editörü adımları: metnin altında aynı boyda görseller */
.editor-steps>li {
    margin-bottom: 34px;
}

.step-figure {
    margin: 14px 0 0;
}

.step-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    box-shadow: 0 8px 24px #0f1e2e1f;
}

.step-figure figcaption {
    margin-top: 10px;
    color: var(--panel-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

/* Test kısmı iki parçaya ayrılıyor: bot verisi ve gerçek veri. */
.article-section .part-heading {
    margin-top: 48px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.article-section h4 {
    font-family: var(--heading-font);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    margin: 32px 0 12px;
}

.article-section h3+h4 {
    margin-top: 10px;
}

/* Gerçek veri kısmı: henüz boş */
.coming-soon {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--panel-muted);
    font-size: 13px;
    letter-spacing: .3px;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--panel-ink);
    font-size: 14px;
    text-decoration: none;
}

.file-link::before {
    content: "↓";
    color: var(--panel-muted);
}

.file-link:hover {
    border-color: var(--panel-muted);
}

/* Yöntem kutusu: testlerin ve ölçülerin tanımı */
.method-box {
    margin: 22px 0 8px;
    padding: 18px 20px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--line) 22%, var(--surface));
}

.method-title {
    margin: 0 0 12px;
    color: var(--panel-muted);
    font-size: 10px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.method-box dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 4px 28px;
    margin: 0;
}

.method-box dt {
    font-size: 13.5px;
    font-weight: 600;
}

.method-box dd {
    margin: 3px 0 14px;
    color: var(--panel-muted);
    font-size: 13px;
    line-height: 1.55;
}

/* Vaka kutusu: eski ve yeni düzen yan yana */
.case-figure {
    margin: 20px 0 22px;
    padding: 22px 20px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    container-type: inline-size;
}

.case-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.case-col {
    padding: 14px 16px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--line) 25%, var(--surface));
}

.case-col-title {
    margin: 0 0 10px;
    font-weight: 600;
}

.case-result {
    display: inline-block;
    margin: 12px 0 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.case-result.is-lose {
    background: #c2462e1f;
    color: #a63a25;
}

.case-result.is-win {
    background: #2a669e1f;
    color: #2a669e;
}

.case-figure figcaption {
    margin-top: 14px;
    color: var(--panel-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

@container (max-width: 560px) {
    .case-compare {
        grid-template-columns: 1fr;
    }
}

/* Satır içi kod */
.article-section :not(pre)>code {
    padding: 1px 5px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--line) 60%, transparent);
    font: .86em/1.4 var(--body-font);
    white-space: nowrap;
}

/* Yapılacaklar listesi */
.todo-list {
    margin: 0 0 8px;
    padding-left: 22px;
}

.todo-list li {
    margin-bottom: 14px;
    line-height: 1.7;
}

.todo-meta {
    display: block;
    margin-top: 2px;
    color: var(--panel-muted);
    font-size: 12.5px;
}

/* Sanat bölümleri (Aplomb, Crumble Crew): oyun dosyalarından görsel sıraları, önce/sonra, parça kiti ve palet. */
.article-section .art-figure { margin: 22px 0 28px; }
.article-section .art-figure > figcaption { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--panel-muted); }
.article-section .art-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--art-col, 104px), 1fr)); gap: 16px 12px; max-width: var(--art-max, 100%); margin: 22px 0 26px; padding: 0; list-style: none; }
.article-section .art-figure > .art-row { margin: 0; }
.article-section .art-row li { margin: 0; min-width: 0; text-align: center; font-size: 12px; line-height: 1.45; }
.article-section .art-row img { display: block; width: 100%; height: auto; }
.article-section .art-row.is-rounded img { border-radius: 8px; }
.article-section .art-row.is-fixed img { height: 96px; object-fit: contain; }
.article-section .art-row.is-bars img { height: auto; margin: 10px 0 4px; }
.article-section .art-row span { display: block; margin-top: 6px; color: var(--panel-muted); }
.article-section .art-row strong { display: block; color: var(--panel-ink); font-weight: 600; }
.article-section .art-labels > div { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 20px; }
.article-section .art-labels figure { margin: 0; }
.article-section .art-labels img { display: block; width: 100%; height: auto; border-radius: 8px; }
.article-section .art-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 28px; margin: 22px 0 28px; }
.article-section .art-pair { margin: 0; min-width: 0; }
.article-section .art-pair > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.article-section .art-pair > div > div { position: relative; }
.article-section .art-pair img { display: block; width: 100%; height: auto; border-radius: 8px; }
.article-section .art-pair span { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 4px; background: #000000a6; color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .3px; }
.article-section .art-pair figcaption { margin-top: 9px; font-size: 12px; line-height: 1.6; }
.article-section .art-kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 22px 0 14px; padding: 0; list-style: none; }
.article-section .art-figure > .art-kit { margin: 0; }
.article-section .art-kit li { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-align: center; font-size: 11.5px; line-height: 1.4; }
.article-section .art-kit li > span:last-child { display: block; padding: 7px 4px 8px; }
.article-section .art-kit-art { display: grid; place-items: center; height: 88px; padding: 10px; background: var(--kit-bg, #eee); }
.article-section .art-kit-art img { display: block; max-width: 100%; max-height: 64px; width: auto; height: auto; }
.article-section .art-kit.is-icons { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-width: 640px; }
.article-section .art-kit.is-icons .art-kit-art { height: 68px; }
.article-section .art-kit.is-icons .art-kit-art img { max-height: 40px; }
.article-section .art-wordmark img { display: block; width: min(100%, 320px); height: auto; }
.article-section .art-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 12px 20px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 12px; line-height: 1.5; }
.article-section .art-swatches li { display: flex; align-items: center; gap: 10px; margin: 0; }
.article-section .art-swatches strong { font-weight: 600; }
.article-section .art-swatch { flex: none; width: 30px; height: 30px; border-radius: 6px; box-shadow: inset 0 0 0 1px #0000001f; }
@media (max-width: 760px) {
    .article-section .art-row { grid-template-columns: repeat(auto-fill, minmax(min(var(--art-col, 104px), 92px), 1fr)); gap: 14px 8px; }
    .article-section .art-row li { font-size: 11px; }
    .article-section .art-row.is-fixed img { height: 72px; }
    .article-section .art-labels > div { gap: 12px; }
    .article-section .art-pairs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .article-section .art-kit { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .article-section .art-kit.is-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .article-section .art-kit li { font-size: 10.5px; }
    .article-section .art-kit-art { height: 64px; padding: 8px; }
    .article-section .art-kit-art img { max-height: 46px; }
    .article-section .art-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
