/* ==========================================================================
   ARAÇLAR — hesaplayıcı, test (quiz), sorgulama kutuları + araç listesi
   Tema değişkenleri: --primary --primary-dark --primary-soft --text --heading --muted --bg --surface --surface-2 --border --radius --radius-sm --shadow --dark-bg --on-dark (sonuç paneli; --tl-hl ile vurgu rengi ezilebilir)
   ========================================================================== */
.tl-box { --tl-h: var(--heading, var(--dark, #0f172a)); --tl-line: var(--border, #e5e7eb); --tl-soft: var(--primary-soft, rgba(29, 78, 216, .08));
  background: var(--bg, #fff); border: 1px solid var(--tl-line); border-radius: var(--radius, 14px); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 32px); color: var(--text); }
.tl-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.tl-ico { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--tl-soft, rgba(29,78,216,.08)); color: var(--primary); font-size: 26px; }
.tl-title { margin: 0 0 4px; font-size: 1.35rem; color: var(--tl-h); }
.tl-desc { margin: 0; color: var(--muted); }
.tl-note { display: flex; gap: 8px; align-items: flex-start; margin: 20px 0 0; padding: 12px 14px; border-radius: var(--radius-sm, 8px); background: var(--surface, #f8fafc); color: var(--muted); font-size: .85rem; }
.tl-note i { color: var(--primary); font-size: 1.1rem; }
.tl-help { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }

/* Formül */
.tl-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tl-grid > * { min-width: 0; }
.tl-inputs { display: grid; gap: 18px; }
.tl-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; font-size: .92rem; color: var(--tl-h); margin-bottom: 8px; }
.tl-range-val { font-weight: 800; color: var(--primary); font-size: 1rem; white-space: nowrap; }
.tl-f-range input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 6px; padding: 0; border: 0;
  background: linear-gradient(90deg, var(--primary) var(--tl-p, 50%), var(--surface-2, #e5e7eb) var(--tl-p, 50%)); outline-offset: 6px; }
.tl-f-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: grab; }
.tl-f-range input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); cursor: grab; }
.tl-range-lim { display: flex; justify-content: space-between; color: var(--muted); font-size: .76rem; margin-top: 6px; }
.tl-num { display: flex; align-items: stretch; border: 1px solid var(--tl-line); border-radius: var(--radius-sm, 8px); overflow: hidden; background: var(--bg, #fff); }
.tl-num:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tl-soft); }
.tl-num input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; border-radius: 0; }
.tl-affix { display: grid; place-items: center; padding: 0 12px; background: var(--surface, #f8fafc); color: var(--muted); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.tl-f-select select { width: 100%; }
.tl-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-radio { cursor: pointer; }
.tl-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tl-radio span { display: inline-block; padding: 8px 14px; border: 1px solid var(--tl-line); border-radius: 99px; font-size: .88rem; font-weight: 600; transition: all .2s; }
.tl-radio input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.tl-radio input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.tl-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; color: var(--tl-h); }
.tl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tl-switch-ui { position: relative; width: 44px; height: 24px; border-radius: 24px; background: var(--surface-2, #e5e7eb); transition: background .2s; flex-shrink: 0; }
.tl-switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.tl-switch input:checked + .tl-switch-ui { background: var(--primary); }
.tl-switch input:checked + .tl-switch-ui::after { transform: translateX(20px); }
.tl-switch input:focus-visible + .tl-switch-ui { outline: 2px solid var(--primary); outline-offset: 2px; }
.tl-outputs { --tl-on: var(--on-dark, #fff); display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; background: var(--dark-bg, var(--dark, #0f172a)); color: var(--tl-on); border-radius: var(--radius, 14px); padding: 22px; position: sticky; top: calc(var(--header-h, 80px) + 16px); }
.tl-out { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--tl-on) 14%, transparent); }
.tl-out:last-of-type { border-bottom: 0; }
.tl-out-l { min-width: 0; overflow-wrap: anywhere; color: color-mix(in srgb, var(--tl-on) 72%, transparent); font-size: .9rem; }
.tl-out-v { font-size: 1.12rem; font-weight: 800; text-align: right; white-space: nowrap; }
.tl-out small { flex-basis: 100%; color: color-mix(in srgb, var(--tl-on) 55%, transparent); font-size: .78rem; }
.tl-out.is-hl { flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 0; border-left: 4px solid var(--secondary, var(--primary)); border-radius: var(--radius-sm, 8px); background: color-mix(in srgb, var(--secondary, var(--primary)) 16%, color-mix(in srgb, var(--tl-on) 6%, transparent)); }
.tl-out.is-hl .tl-out-v { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--tl-hl, var(--tl-on)); text-align: left; white-space: normal; }
.tl-out-v.is-flash { animation: tlFlash .5s ease; }
@keyframes tlFlash { 0% { opacity: .35; } 100% { opacity: 1; } }
.tl-cta { margin-top: 6px; justify-content: center; }
.tl-box.is-js .tl-calc { display: none; }

/* Kompakt */
.tl-v-compact { padding: 20px; }
.tl-v-compact .tl-head { margin-bottom: 14px; }
.tl-v-compact .tl-ico { width: 42px; height: 42px; font-size: 21px; }
.tl-v-compact .tl-title { font-size: 1.1rem; }
.tl-v-compact .tl-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tl-v-compact .tl-inputs { gap: 12px; }
.tl-v-compact .tl-outputs { position: static; padding: 14px 16px; }
.tl-v-compact .tl-out:not(.is-hl) { display: none; }
.tl-v-compact .tl-out.is-hl { padding: 8px 0 8px 12px; background: none; }

/* Quiz */
.tl-progress { height: 6px; border-radius: 6px; background: var(--surface-2, #e5e7eb); overflow: hidden; margin-bottom: 10px; }
.tl-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .35s var(--ease, ease); }
.tl-qcount { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.tl-q { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.tl-box.is-js .tl-q[hidden] { display: none; }
.tl-q.is-in { animation: tlIn .3s var(--ease, ease); }
@keyframes tlIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.tl-q-title { font-size: 1.15rem; font-weight: 800; color: var(--tl-h); margin-bottom: 14px; padding: 0; line-height: 1.35; }
.tl-q-title span { color: var(--primary); }
.tl-opts { display: grid; gap: 10px; }
.tl-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--tl-line); border-radius: var(--radius-sm, 10px); cursor: pointer; transition: all .2s; font-weight: 600; }
.tl-opt:hover { border-color: var(--primary); background: var(--tl-soft); }
.tl-opt input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex-shrink: 0; }
.tl-opt span { flex: 1; }
.tl-opt i { color: var(--muted); opacity: 0; transition: opacity .2s; }
.tl-opt:hover i { opacity: 1; }
.tl-opt:has(input:checked) { border-color: var(--primary); background: var(--tl-soft); color: var(--primary); }
.tl-nav { display: flex; justify-content: space-between; gap: 10px; }
.tl-nav [data-tl-finish] { margin-left: auto; }
.tl-result.is-in { animation: tlIn .4s var(--ease, ease); }
.tl-result-band { padding: 26px; border-radius: var(--radius, 14px); background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary))); color: var(--on-primary, #fff); }
.tl-result-band h4 { color: inherit; font-size: 1.5rem; margin: 6px 0 8px; }
.tl-result-band p { opacity: .9; }
.tl-result-band .btn { margin: 6px 8px 0 0; }
.tl-result-band .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.tl-result-band .btn-outline { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.tl-score { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.18); font-size: .85rem; }

/* Sorgulama */
.tl-lookup-row { display: flex; gap: 10px; }
.tl-lookup-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; font-size: 1.05rem; }
.tl-lookup-row input::placeholder { text-transform: none; letter-spacing: 0; }
.tl-lookup-result:empty { display: none; }
.tl-lookup-result { margin-top: 18px; }
.tl-lk { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius, 14px); border: 1px solid var(--tl-line); animation: tlIn .3s var(--ease, ease); }
.tl-lk > i { font-size: 34px; flex-shrink: 0; }
.tl-lk p { margin: 4px 0 0; color: var(--muted); }
.tl-lk h4 { margin: 2px 0 12px; color: var(--tl-h); }
.tl-lk-ok { background: color-mix(in srgb, #10b981 10%, var(--bg, #fff)); border-color: color-mix(in srgb, #10b981 40%, var(--bg, #fff)); } .tl-lk-ok > i, .tl-lk-ok > div > strong { color: var(--success, #059669); }
.tl-lk-warn { background: color-mix(in srgb, #f59e0b 10%, var(--bg, #fff)); border-color: color-mix(in srgb, #f59e0b 40%, var(--bg, #fff)); } .tl-lk-warn > i, .tl-lk-warn > div > strong { color: var(--warning, #d97706); }
.tl-lk-none { background: color-mix(in srgb, #ef4444 9%, var(--bg, #fff)); border-color: color-mix(in srgb, #ef4444 35%, var(--bg, #fff)); } .tl-lk-none > i { color: var(--danger, #dc2626); }
.tl-lk-wait > i { color: var(--primary); animation: tlSpin 1s linear infinite; }
@keyframes tlSpin { to { transform: rotate(360deg); } }
.tl-lk-body { flex: 1; min-width: 0; }
.tl-lk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; }
.tl-lk-fields dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.tl-lk-fields dd { margin: 2px 0 0; font-weight: 700; color: var(--tl-h); }
.tl-lk-more { display: inline-block; margin-top: 14px; font-weight: 700; }

/* Araç listesi / kartlar */
.tl-page-in { display: grid; gap: 48px; }
.tl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tl-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--border, #e5e7eb); border-radius: var(--radius, 14px); background: var(--bg, #fff); color: var(--text); transition: all .25s; }
.tl-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); border-color: transparent; }
.tl-card strong { font-size: 1.1rem; color: var(--heading, var(--dark, #0f172a)); }
.tl-card small { color: var(--muted); font-size: .9rem; }
.tl-card .tl-ico { margin-bottom: 6px; }
.tl-type { position: absolute; right: 18px; top: 18px; font-style: normal; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); background: var(--primary-soft, rgba(29,78,216,.08)); padding: 3px 10px; border-radius: 99px; }
.tl-card-go { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--primary); font-size: .9rem; }

@media (max-width: 900px) {
  .tl-grid { grid-template-columns: minmax(0, 1fr); }
  .tl-outputs { position: static; }
  .tl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tl-cards { grid-template-columns: minmax(0, 1fr); }
  .tl-lookup-row { flex-direction: column; }
  .tl-head { gap: 12px; }
  .tl-out-v { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .tl-q.is-in, .tl-result.is-in, .tl-lk, .tl-out-v.is-flash { animation: none; } }
