/* =========================================================================
   NI Design Tokens — canonical source. Reference: /design-system/
   Bu dosya tema head'inde diğer style'lardan ÖNCE yüklenir.
   ========================================================================= */
:root {
    --ni-red:        #DC2626;
    --ni-red-soft:   rgba(220, 38, 38, 0.10);
    --ni-red-border: rgba(220, 38, 38, 0.30);
    --ni-navy:       #0B1B33;

    --ni-bg:         #FFFFFF;
    --ni-bg-elev:    #F7F8FA;
    --ni-bg-muted:   #EEF0F4;
    --ni-border:     #D8DDE6;
    --ni-border-strong: #0B1B33;

    --ni-text:       #0B1B33;
    --ni-text-muted: #5B6573;
    --ni-text-faint: #8A93A1;

    --ni-radius-sm:  6px;
    --ni-radius-md:  10px;
    --ni-radius-lg:  14px;
    --ni-radius-pill: 999px;

    --ni-shadow-sm:  0 1px 2px rgba(11,27,51,.06);
    --ni-shadow-md:  0 4px 14px rgba(11,27,51,.08);

    /* legacy var aliases for old code that uses --color-* names */
    --color-bg-card:        var(--ni-bg);
    --color-bg-muted:       var(--ni-bg-muted);
    --color-border:         var(--ni-border);
    --color-text:           var(--ni-text);
    --color-text-secondary: var(--ni-text-muted);
}

html[data-theme="dark"] {
    --ni-bg:         #0E141F;
    --ni-bg-elev:    #161E2C;
    --ni-bg-muted:   #1F2937;
    --ni-border:     #2F3A4D;
    --ni-border-strong: #FFFFFF;
    --ni-text:       #F1F4F8;
    --ni-text-muted: #B6BFCC;
    --ni-text-faint: #7C8597;
    --ni-shadow-sm:  0 1px 2px rgba(0,0,0,.45);
    --ni-shadow-md:  0 4px 14px rgba(0,0,0,.55);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --ni-bg:         #0E141F;
        --ni-bg-elev:    #161E2C;
        --ni-bg-muted:   #1F2937;
        --ni-border:     #2F3A4D;
        --ni-border-strong: #FFFFFF;
        --ni-text:       #F1F4F8;
        --ni-text-muted: #B6BFCC;
        --ni-text-faint: #7C8597;
        --ni-shadow-sm:  0 1px 2px rgba(0,0,0,.45);
        --ni-shadow-md:  0 4px 14px rgba(0,0,0,.55);
    }
}

/* ===== .ni-card canonical ===== */
.ni-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) minmax(120px, 180px);
    align-items: center;
    column-gap: 14px;
    padding: 14px 16px;
    min-height: 72px;
    background: var(--ni-bg);
    border: 1px solid var(--ni-border);
    border-radius: var(--ni-radius-md);
    color: var(--ni-text);
    text-decoration: none;
    box-shadow: var(--ni-shadow-sm);
    transition: border-color .12s, transform .12s, box-shadow .12s;
}
.ni-card:hover { border-color: var(--ni-red); transform: translateY(-1px); box-shadow: var(--ni-shadow-md); }
.ni-card--live { border-left: 3px solid var(--ni-red); }
.ni-card--past { opacity: .82; }

.ni-card__time {
    font-weight: 800; font-variant-numeric: tabular-nums;
    color: var(--ni-red); font-size: 18px;
    text-align: left; display: flex; align-items: center;
}
.ni-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ni-card__match {
    display: flex; align-items: center; gap: 8px;
    color: var(--ni-text); font-weight: 600; font-size: 15px; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ni-card__match-text { overflow: hidden; text-overflow: ellipsis; }
.ni-card__icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.ni-card__score { font-weight: 800; color: var(--ni-red); padding: 0 6px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ni-card__lg-line { font-size: 12px; color: var(--ni-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-card__meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; text-align: right; min-width: 0; }
.ni-card__ch {
    background: var(--ni-bg-muted); color: var(--ni-text);
    padding: 4px 8px; border-radius: var(--ni-radius-sm);
    font-size: 12px; font-weight: 600; white-space: nowrap;
    max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 640px) {
    .ni-card { grid-template-columns: 84px minmax(0, 1fr); row-gap: 6px; }
    .ni-card__meta { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px; justify-content: flex-start; }
    .ni-card__match { white-space: normal; }
}
.ni-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }

/* ===== Pills & Badges ===== */
.ni-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--ni-radius-pill);
    background: var(--ni-bg-muted); color: var(--ni-text);
    font-size: 13px; font-weight: 600; text-decoration: none;
    border: 1px solid var(--ni-border);
}
.ni-pill:hover { border-color: var(--ni-red); }
.ni-pill--live { background: var(--ni-red-soft); color: var(--ni-red); border-color: var(--ni-red-border); font-weight: 700; }

.ni-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: var(--ni-radius-sm); font-size: 11px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.ni-badge--live { background: var(--ni-red); color: #fff; }
.ni-badge--ht   { background: #F59E0B; color: #11161E; }
.ni-badge--ft   { background: var(--ni-text-muted); color: var(--ni-bg); }

.ni-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ni-red); display: inline-block; animation: ni-pulse 1.2s infinite; flex-shrink: 0; }
@keyframes ni-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.78); } }

/* ===== Hero ===== */
.ni-hero { padding: 18px 0 14px; }
.ni-hero h1 { font-size: clamp(24px, 3.2vw, 32px); margin: 0 0 8px; color: var(--ni-text); display: flex; align-items: center; gap: 10px; font-weight: 800; }
.ni-hero p { font-size: 15px; line-height: 1.55; color: var(--ni-text-muted); max-width: 780px; margin: 0; }

/* ===== Fold-answer ===== */
.ni-fold-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 14px 0 18px; padding: 14px 18px; border: 1px solid var(--ni-border); border-radius: var(--ni-radius-lg); background: var(--ni-bg-elev); }
.ni-fold-answer__col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ni-fold-answer__label { font-size: 11px; color: var(--ni-text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.ni-fold-answer__value { font-size: 22px; line-height: 1.15; color: var(--ni-text); font-weight: 700; }
.ni-fold-answer__time  { font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ni-text); font-weight: 800; }

/* ===== Callout (NO left accent line) ===== */
.ni-callout { margin: 14px 0; padding: 14px 16px; background: var(--ni-bg-elev); border-radius: var(--ni-radius-md); color: var(--ni-text); border: 1px solid var(--ni-border); }
.ni-callout--neutral { background: var(--ni-bg-muted); }
.ni-callout__label { display: block; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ni-text-muted); font-weight: 700; }

/* ===== FAQ ===== */
.ni-faq details { margin: 0 0 10px; padding: 14px 16px; background: var(--ni-bg-elev); border-radius: var(--ni-radius-md); color: var(--ni-text); border: 1px solid var(--ni-border); }
.ni-faq summary { font-weight: 600; cursor: pointer; list-style: none; color: var(--ni-text); }
.ni-faq summary::-webkit-details-marker { display: none; }
.ni-faq p { margin: 10px 0 0; line-height: 1.65; color: var(--ni-text); }
