/* ============================================================================
   DevToolbox — By Mühendis Tools

   Dış kütüphane yok. Araç sayfalarının hızlı açılması ürünün büyüme
   kanalının (arama) bir parçası; bir CSS çerçevesi için 200 KB indirmek
   burada kazançtan çok kayıp.

   Renkler değişken olarak tanımlı ve işletim sistemi açık tema istediğinde
   yeniden tanımlanıyor. Varsayılan koyu: geliştiriciler gün boyu koyu
   temada çalışıyor.
   ========================================================================== */

:root {
    --bg: #0D1117;
    --bg-2: #141B23;
    --bg-3: #1B242E;
    --line: #2A3540;
    --text: #E6EDF3;
    --muted: #93A1AE;
    --brand: #1498D5;
    --brand-2: #46B8EE;
    --ok: #3FB950;
    --warn: #D29922;
    --bad: #F85149;
    --radius: 12px;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #FFFFFF;
        --bg-2: #F5F7FA;
        --bg-3: #EBEFF4;
        --line: #D5DCE4;
        --text: #16202A;
        --muted: #5B6977;
        --brand: #0C72A6;
        --brand-2: #1498D5;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--brand-2); }
a:hover { color: var(--brand); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }

.dt-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.dt-skip {
    position: absolute;
    left: -9999px;
}
.dt-skip:focus {
    left: 12px; top: 12px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--brand);
    color: #fff;
    border-radius: 8px;
}

/* ------------------------------------------------------------------ Üst bar */

.dt-header {
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
    position: sticky;
    top: 0;
    z-index: 20;
}

.dt-header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 62px;
}

.dt-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.dt-logo__mark {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), #0B5E8A);
    color: #fff;
    font-family: var(--mono);
    font-size: .82rem;
    font-weight: 700;
}

.dt-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.dt-logo__text strong { font-size: 1.02rem; }
.dt-logo__text small { font-size: .72rem; color: var(--muted); }

.dt-search-open,
.dt-hero__search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--muted);
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
    appearance: none;
}

.dt-search-open:hover, .dt-hero__search:hover { border-color: var(--brand); color: var(--text); }

kbd {
    padding: 1px 6px;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: var(--bg-3);
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--muted);
}

/* -------------------------------------------------------------------- Giriş */

.dt-hero {
    padding: 56px 0 40px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(760px 320px at 50% -30%, rgba(20, 152, 213, .18), transparent 70%),
        var(--bg);
    text-align: center;
}

.dt-kicker {
    margin: 0 0 8px;
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-2);
    font-weight: 700;
}

.dt-hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 5vw, 2.8rem); }

.dt-lead { margin: 0 auto; max-width: 62ch; color: var(--muted); }

.dt-hero__search { margin: 24px auto 0; justify-content: center; }

/* ------------------------------------------------------------------ Bölümler */

.dt-section { margin: 44px 0; }

.dt-section h2 { margin: 0 0 6px; font-size: 1.22rem; }
.dt-section h2 a { color: inherit; text-decoration: none; }
.dt-section h2 a:hover { color: var(--brand-2); }
.dt-section__summary { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }

.dt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.dt-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-2);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s ease, transform .1s ease;
}

.dt-card:hover { border-color: var(--brand); transform: translateY(-1px); color: var(--text); }
.dt-card strong { font-size: .98rem; }
.dt-card span { font-size: .86rem; color: var(--muted); }

/* ---------------------------------------------------------------- Araç sayfası */

.dt-crumbs {
    display: flex;
    gap: 8px;
    padding: 18px 0 0;
    font-size: .85rem;
    color: var(--muted);
}

.dt-tool-head { padding: 14px 0 22px; }
.dt-tool-head h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.dt-tool-head .dt-lead { margin: 0; max-width: 70ch; }

.dt-tool {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
    overflow: hidden;
}

.dt-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-3);
}

.dt-bar__spacer { flex: 1 1 auto; }

.dt-panes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
}

@media (max-width: 820px) { .dt-panes { grid-template-columns: 1fr; } }

.dt-pane { display: flex; flex-direction: column; background: var(--bg-2); min-width: 0; }

.dt-pane__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.dt-pane__head .dt-bar__spacer { flex: 1 1 auto; }

.dt-pane textarea,
.dt-pane pre {
    margin: 0;
    border: 0;
    min-height: 320px;
    padding: 14px;
    background: transparent;
    color: var(--text);
    font-family: var(--mono);
    font-size: .88rem;
    line-height: 1.55;
    resize: vertical;
    tab-size: 2;
    white-space: pre;
    overflow: auto;
}

.dt-pane textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.dt-status {
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    font-size: .85rem;
    color: var(--muted);
    min-height: 40px;
}

.dt-status.is-ok { color: var(--ok); }
.dt-status.is-bad { color: var(--bad); }

/* ----------------------------------------------------------------- Denetimler */

.dt-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 15px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
}

.dt-btn:hover { border-color: var(--brand); color: var(--text); }
.dt-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.dt-btn--primary { background: var(--brand); border-color: transparent; color: #fff; }
.dt-btn--primary:hover { background: var(--brand-2); color: #fff; }

.dt-field { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--muted); }

.dt-field select,
.dt-field input[type="text"],
.dt-field input[type="number"] {
    min-height: 34px;
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .88rem;
}

.dt-field input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }

.dt-input-mono {
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: .9rem;
}

/* --------------------------------------------------------------------- Metin */

.dt-prose { margin: 40px 0; max-width: 74ch; }
.dt-prose h2 { font-size: 1.22rem; margin: 0 0 12px; }
.dt-prose p { color: var(--muted); }

.dt-note {
    padding: 12px 16px;
    border-radius: 9px;
    border: 1px solid var(--warn);
    background: rgba(210, 153, 34, .1);
    color: var(--text);
    font-size: .9rem;
}

.dt-steps { margin: 0; padding-left: 20px; }
.dt-steps li { margin-bottom: 10px; color: var(--muted); }
.dt-steps strong { display: block; color: var(--text); }

.dt-faq { margin: 0; }
.dt-faq dt { font-weight: 600; margin-top: 18px; }
.dt-faq dd { margin: 5px 0 0; color: var(--muted); }

/* --------------------------------------------------------------------- Arama */

.dt-search {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: start center;
    padding-top: 12vh;
    background: rgba(5, 10, 15, .62);
}

.dt-search__box {
    width: min(620px, 92vw);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-2);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
    overflow: hidden;
}

.dt-search__box input {
    width: 100%;
    padding: 16px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1.02rem;
}

.dt-search__box input:focus { outline: none; }

.dt-search__results { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }

.dt-search__results a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 13px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.dt-search__results li.is-active a,
.dt-search__results a:hover { background: var(--bg-3); }

.dt-search__results small { color: var(--muted); font-size: .82rem; }

.dt-search__empty { padding: 18px; color: var(--muted); font-size: .9rem; text-align: center; }

/* --------------------------------------------------------------------- Alt */

.dt-footer {
    margin-top: 60px;
    padding: 30px 0 40px;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--muted);
    font-size: .88rem;
}

.dt-footer p { margin: 0 0 6px; }
.dt-footer__brand strong { color: var(--text); }
.dt-footer__links { margin-top: 12px; display: flex; gap: 10px; }

.dt-error { padding: 70px 20px; text-align: center; }
.dt-error h1 { margin: 0 0 10px; }
.dt-error .dt-btn { margin-top: 18px; }

/* --------------------------------------------------------------------------
   Araç içi düzen parçaları

   Bunlar bir süre araç modüllerinde satır içi `style` niteliği olarak
   duruyordu ve içerik politikası (`style-src 'self'`) hepsini sessizce
   atıyordu: araç çalışıyor, yalnızca düzeni yok oluyordu. Politikayı
   gevşetmek yerine stiller buraya taşındı — politika bu ürünün
   satış noktalarından biri.
   -------------------------------------------------------------------------- */

/** Dikey yığın: sade formlar için. */
.dt-stack { display: grid; gap: 14px; padding: 16px; }

/** Yan yana denetimler; renk seçici + metin alanı gibi. */
.dt-row { display: flex; gap: 12px; align-items: end; }

/** İki eşit kutu. Dar ekranda alt alta geçiyor. */
.dt-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .dt-duo { grid-template-columns: 1fr; } }

/** Tek panelli araçlar (JWT, özet, UUID) — ikiye bölünmüş ızgarayı tek kolona indiriyor. */
.dt-panes--single { grid-template-columns: 1fr; }

/** Etiketi girdinin üstüne alan alan. `.dt-field` ile birlikte kullanılıyor. */
.dt-field--stack { display: grid; gap: 6px; align-items: stretch; }

/** Girdi, panel başlığının altında tek satırlık bir değer olduğunda. */
.dt-pane textarea.dt-pane__input--short { min-height: 110px; }

/** Satır satır sonuç listesi: etiket + değer + kopyala. */
.dt-rows { display: grid; gap: 1px; background: var(--line); }

.dt-rows__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-2);
}

.dt-rows__label { min-width: 86px; font-size: .82rem; color: var(--muted); }
.dt-rows__label--wide { min-width: 120px; }

@media (max-width: 560px) {
    .dt-rows__item { flex-wrap: wrap; }
    .dt-rows__label, .dt-rows__label--wide { min-width: 0; flex: 1 0 100%; }
}

/** Denetim çubuğu ile panellerin arasına giren tek alanlık satır. */
.dt-field-row { padding: 14px 16px; border-bottom: 1px solid var(--line); }

/** Renk önizleme kutuları. Metin rengi çalışma zamanında CSSOM ile atanıyor. */
.dt-swatch { padding: 18px; border-radius: 9px; text-align: center; font-weight: 600; }
.dt-swatch--light { background: #fff; }
.dt-swatch--dark { background: #111; }

.dt-color-pick { width: 52px; height: 38px; padding: 0; border: 0; background: none; }

/** Durum satırının içindeki açıklama listesi. */
.dt-note-line { margin: 0 0 6px; }
.dt-list { margin: 0; padding-left: 18px; }
.dt-list-head { margin: 0 0 8px; }
.dt-bad { color: var(--bad); }

/* --------------------------------------------------------------------------
   Fark listesi (metin karşılaştırma)
   -------------------------------------------------------------------------- */

.dt-diff {
    border-top: 1px solid var(--line);
    max-height: 60vh;
    overflow: auto;
    font-size: .86rem;
}

.dt-diff:empty { display: none; }

.dt-diff__line {
    display: grid;
    grid-template-columns: 48px 48px 18px 1fr;
    align-items: baseline;
    gap: 6px;
    padding: 2px 14px;
    background: var(--bg-2);
}

.dt-diff__no {
    text-align: right;
    font-size: .76rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.dt-diff__isaret { color: var(--muted); user-select: none; }

.dt-diff__metin {
    font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    min-width: 0;
}

/* Renk tek başına taşıyıcı değil: + / − işaretleri de var, böylece
   renk ayrımı güç olan kullanıcılar için de okunur kalıyor. */
.dt-diff__line--eklendi { background: color-mix(in srgb, var(--ok) 14%, var(--bg-2)); }
.dt-diff__line--eklendi .dt-diff__isaret { color: var(--ok); }

.dt-diff__line--silindi { background: color-mix(in srgb, var(--bad) 14%, var(--bg-2)); }
.dt-diff__line--silindi .dt-diff__isaret { color: var(--bad); }

@media (max-width: 560px) {
    .dt-diff__line { grid-template-columns: 30px 18px 1fr; }
    .dt-diff__line .dt-diff__no:first-child { display: none; }
}

/* --------------------------------------------------------------------------
   Kaydırıcılı denetimler ve gölge önizlemesi
   -------------------------------------------------------------------------- */

.dt-range { width: 100%; accent-color: var(--brand); }

.dt-range__baslik {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.dt-range__deger {
    font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
    font-size: .8rem;
    color: var(--text);
}

.dt-shadow__sahne {
    display: grid;
    place-items: center;
    min-height: 230px;
    padding: 26px;
    border-radius: 10px;
    /* Gölge açık zeminde değerlendirilir; koyu temada da aynı zemin kalıyor
       ki üretilen kural, kullanılacağı yerdeki gibi görünsün. */
    background: #f4f6fa;
}

.dt-shadow__kutu {
    display: grid;
    place-items: center;
    width: 160px;
    height: 110px;
    border-radius: 12px;
    background: #fff;
    color: #0b1220;
    font-size: .85rem;
    font-weight: 600;
}
