/**
 * Katman 2 ana sayfa — üç direk (sınır · zaman · netlik) mimari okuma modeli
 * Katman 1 “lens ray”ından farklı: teal / blueprint ekseni + üç bağlantılı panel
 */

.l2dm-root {
    position: relative;
    margin: clamp(2rem, 4vw, 3rem) 0 clamp(2.5rem, 4vw, 3.5rem);
    padding: clamp(1.35rem, 2.5vw, 2rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: 22px;
    background: linear-gradient(168deg,
            rgba(6, 14, 22, 0.96) 0%,
            rgba(8, 18, 28, 0.94) 45%,
            rgba(10, 22, 32, 0.95) 100%);
    border: 1px solid rgba(45, 212, 191, 0.22);
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(56, 189, 248, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.l2dm-root::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 42% at 85% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 40% at 10% 100%, rgba(45, 212, 191, 0.1), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.l2dm-inner {
    position: relative;
    z-index: 1;
}

.l2dm-head {
    margin-bottom: 1.5rem;
    max-width: 48rem;
}

.l2dm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(153, 246, 228, 0.88);
    margin: 0 0 0.45rem;
}

.l2dm-kicker i {
    color: #2dd4bf;
    font-size: 0.8rem;
}

.l2dm-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    color: #f8fafc;
    margin: 0 0 0.5rem;
}

.l2dm-title-accent {
    background: linear-gradient(105deg, #5eead4 0%, #38bdf8 48%, #a5f3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.l2dm-desc {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.65;
    color: rgba(186, 210, 218, 0.96);
    max-width: 46rem;
}

/* Derinlik ekseni (yatay) */
.l2dm-axis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 1.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: rgba(4, 12, 18, 0.72);
    border: 1px solid rgba(56, 189, 248, 0.16);
}

.l2dm-axis-node {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #042f2e;
    background: linear-gradient(145deg, #5eead4, #14b8a6);
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.4);
}

.l2dm-axis-node:nth-child(3) {
    background: linear-gradient(145deg, #7dd3fc, #0ea5e9);
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.38);
}

.l2dm-axis-node:nth-child(5) {
    background: linear-gradient(145deg, #99f6e4, #2dd4bf);
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.35);
}

.l2dm-axis-line {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg,
            rgba(45, 212, 191, 0.55),
            rgba(56, 189, 248, 0.5),
            rgba(94, 234, 212, 0.55));
    opacity: 0.9;
    min-width: 12px;
}

.l2dm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.15rem);
}

.l2dm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.15rem 1.1rem 1.25rem;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    background: linear-gradient(155deg,
            rgba(10, 22, 30, 0.94) 0%,
            rgba(4, 10, 16, 0.96) 100%);
    border: 1px solid rgba(45, 212, 191, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.22s ease;
}

.l2dm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    opacity: 0.95;
}

.l2dm-card--boundary::before {
    background: linear-gradient(90deg, #14b8a6, #06b6d4);
}

.l2dm-card--time::before {
    background: linear-gradient(90deg, #22d3ee, #38bdf8);
}

.l2dm-card--clarity::before {
    background: linear-gradient(90deg, #2dd4bf, #5eead4);
}

.l2dm-card:hover,
.l2dm-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(94, 234, 212, 0.38);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(45, 212, 191, 0.1);
    outline: none;
}

.l2dm-card--time:hover,
.l2dm-card--time:focus-visible {
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(14, 165, 233, 0.12);
}

.l2dm-card--clarity:hover,
.l2dm-card--clarity:focus-visible {
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(20, 184, 166, 0.12);
}

.l2dm-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #ccfbf1;
    background: linear-gradient(145deg, rgba(20, 184, 166, 0.22), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(45, 212, 191, 0.32);
}

.l2dm-card--time .l2dm-card-icon {
    color: #e0f2fe;
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.22), rgba(56, 189, 248, 0.2));
    border-color: rgba(56, 189, 248, 0.32);
}

.l2dm-card--clarity .l2dm-card-icon {
    color: #ecfdf5;
    background: linear-gradient(145deg, rgba(45, 212, 191, 0.24), rgba(94, 234, 212, 0.18));
    border-color: rgba(94, 234, 212, 0.32);
}

.l2dm-card-step {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 190, 200, 0.92);
}

.l2dm-card-title {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f8fafc;
    margin: 0;
    line-height: 1.25;
}

.l2dm-card-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: rgba(186, 210, 218, 0.95);
    flex: 1;
}

.l2dm-chip {
    display: inline-block;
    align-self: flex-start;
    margin-top: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.66rem;
    font-weight: 600;
    color: #99f6e4;
    background: rgba(4, 12, 18, 0.78);
    border: 1px solid rgba(45, 212, 191, 0.22);
}

.l2dm-card--time .l2dm-chip {
    color: #bae6fd;
    border-color: rgba(56, 189, 248, 0.25);
}

.l2dm-card--clarity .l2dm-chip {
    color: #a7f3d0;
    border-color: rgba(52, 211, 153, 0.28);
}

.l2dm-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #5eead4;
}

.l2dm-card--time .l2dm-card-cta {
    color: #7dd3fc;
}

.l2dm-card--clarity .l2dm-card-cta {
    color: #6ee7b7;
}

.l2dm-card-cta i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.l2dm-card:hover .l2dm-card-cta i,
.l2dm-card:focus-visible .l2dm-card-cta i {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .l2dm-grid {
        grid-template-columns: 1fr;
    }

    .l2dm-axis {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 14px;
    }

    .l2dm-axis-line {
        display: none;
    }
}

/* —— Katman haritası: merdiven + L1/L2 tablosu (sadece index) —— */
.l2map-root {
    margin: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(2rem, 4vw, 2.75rem);
    padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
}

/* İç kutu: l2dm bölümündeki gibi yalnızca .container (max-width 1200px + sayfa padding) */
.l2map-inner {
    position: relative;
    z-index: 1;
}

.l2map-head {
    margin-bottom: 1.35rem;
}

.l2map-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(94, 234, 212, 0.88);
    margin: 0 0 0.4rem;
}

.l2map-kicker i {
    color: #2dd4bf;
    font-size: 0.78rem;
}

.l2map-title {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #f8fafc;
    margin: 0 0 0.45rem;
}

.l2map-title-accent {
    background: linear-gradient(105deg, #5eead4, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.l2map-lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(186, 210, 218, 0.95);
    max-width: 44rem;
}

.l2map-ladder {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
}

.l2map-rung {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(155deg, rgba(10, 22, 30, 0.88), rgba(4, 12, 18, 0.92));
    border: 1px solid rgba(45, 212, 191, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

a.l2map-rung:hover,
a.l2map-rung:focus-visible {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateX(3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    outline: none;
}

.l2map-rung--current {
    border-color: rgba(45, 212, 191, 0.45);
    background: linear-gradient(155deg, rgba(12, 36, 40, 0.95), rgba(6, 20, 28, 0.96));
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, 0.12),
        0 12px 36px rgba(0, 0, 0, 0.4);
}

.l2map-rung--external {
    opacity: 0.92;
    border-style: dashed;
}

.l2map-rung-badge {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #042f2e;
    background: linear-gradient(145deg, #5eead4, #14b8a6);
}

.l2map-rung-badge--soft {
    font-size: 0.85rem;
    color: #ccfbf1;
    background: rgba(45, 212, 191, 0.2);
    border: 1px solid rgba(45, 212, 191, 0.35);
}

.l2map-rung-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.l2map-rung-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.l2map-rung-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(165, 200, 210, 0.95);
}

.l2map-rung-arrow {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: rgba(56, 189, 248, 0.75);
}

.l2map-rung-pin {
    flex-shrink: 0;
    color: #f472b6;
    font-size: 1rem;
}

.l2map-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(45, 212, 191, 0.18);
    background: linear-gradient(180deg, rgba(6, 14, 22, 0.55), rgba(4, 10, 16, 0.75));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.l2map-table {
    width: 100%;
    min-width: 280px;
    border-collapse: collapse;
    font-size: 0.82rem;
    line-height: 1.5;
}

.l2map-table-caption {
    caption-side: top;
    text-align: left;
    padding: 0.85rem 1rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(153, 246, 228, 0.9);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.l2map-table thead th {
    text-align: left;
    padding: 0.65rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e2e8f0;
    background: rgba(8, 20, 28, 0.95);
    border-bottom: 1px solid rgba(45, 212, 191, 0.2);
}

.l2map-table tbody th {
    text-align: left;
    padding: 0.65rem 0.85rem;
    font-weight: 700;
    color: #99f6e4;
    width: 28%;
    vertical-align: top;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(4, 12, 18, 0.4);
}

.l2map-table td {
    padding: 0.65rem 0.85rem;
    color: rgba(203, 213, 225, 0.96);
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
    vertical-align: top;
}

.l2map-table tbody tr:last-child th,
.l2map-table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 640px) {
    .l2map-table thead {
        display: none;
    }

    .l2map-table tbody tr {
        display: block;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    }

    .l2map-table tbody tr:last-child {
        border-bottom: none;
    }

    .l2map-table tbody th {
        display: block;
        width: 100%;
        border-bottom: none;
        padding-bottom: 0.25rem;
    }

    .l2map-table td {
        display: block;
        border-bottom: none;
        padding-top: 0.15rem;
        padding-left: 1rem;
    }

    .l2map-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(125, 211, 252, 0.85);
        margin-bottom: 0.2rem;
    }

    .l2map-table td:first-of-type::before {
        content: 'Katman 1 (Core)';
    }

    .l2map-table td:last-of-type::before {
        content: 'Katman 2 (Peak)';
    }
}
