/* Kodvira — Hızlı Araçlar ortak stilleri (C · Aydınlık sinyal) */
.tool-hero { padding: 30px 0 92px; }
.tool-hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.12; margin: 0 0 10px; font-weight: 800; }
.tool-hero .lead { font-size: clamp(15.5px, 1.8vw, 18px); max-width: 680px; margin: 0; }
@media (max-width: 600px) { .tool-hero { padding: 20px 0 80px; } }

.tool { position: relative; margin-top: -72px; z-index: 2; }
.tool .box { background: var(--surface); border: 1px solid #d6d2c7; border-radius: 18px; box-shadow: 0 30px 60px -40px rgba(60, 40, 10, .45); padding: 26px; }
@media (max-width: 600px) { .tool .box { padding: 18px 16px; border-radius: 18px; } }
.tool .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .tool .cols { grid-template-columns: 1fr; gap: 18px; } }

.fields { display: grid; gap: 14px; }
.fields .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: grid; gap: 6px; }
.f > span { font-size: 14px; font-weight: 600; color: var(--text); }
.f small { color: var(--faint); font-size: 12.5px; }
.f input, .f select {
  font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px; width: 100%;
  border: 1.5px solid #d6d2c7; background: #fff; color: var(--text); appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s;
}
.f select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.f input:focus, .f select:focus { outline: none; border-color: var(--murekkep); box-shadow: 0 0 0 3px rgba(240, 90, 26, .18); }
.unit { position: relative; }
.unit input { padding-right: 52px; }
.unit b { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 600; font-size: 15px; pointer-events: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { font: inherit; font-size: 14.5px; font-weight: 600; border: 0; background: none; padding: 9px 6px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 13.5px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.chips button:hover { border-color: var(--murekkep); color: var(--text); }
.chips button[aria-pressed="true"] { border-color: var(--sinyal); background: var(--sinyal-acik); color: var(--sinyal-koyu); }

.result { background: var(--grafit); color: #ecebe7; border-radius: 16px; padding: 22px; position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 0 0 1px #0d0d0f, 0 24px 40px -24px rgba(40, 25, 5, .55); }
.result::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: linear-gradient(var(--grafit-cizgi) 1px, transparent 1px), linear-gradient(90deg, var(--grafit-cizgi) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
.result .lbl { font: 600 11.5px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: #9a988f; }
.result .big { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; font-size: clamp(28px, 4.4vw, 38px); line-height: 1.15; margin: 8px 0 14px; letter-spacing: -.02em; color: var(--sinyal); word-break: break-word; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 0; padding-top: 14px; border-top: 1px solid var(--grafit-cizgi); }
.result dt { color: #b9b6ad; font-size: 15px; }
.result dd { margin: 0; text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.result .hint { margin: 14px 0 0; font-size: 13px; color: #9a988f; }
/* Dağılım çubuğu (araclar.js · T.dagilim): brütün nereye gittiği */
.result .dagilim { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--grafit-cizgi); }
.result .dagilim .bar { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; background: var(--grafit-2); margin: 10px 0 12px; }
.result .dagilim .bar i { display: block; height: 100%; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.result .dagilim .lej { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 13px; color: #b9b6ad; }
.result .dagilim .lej > span { display: flex; justify-content: space-between; gap: 8px; }
.result .dagilim .lej b { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; color: #ecebe7; }
.result .dagilim .lej i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; }
.result .dagilim .s { background: var(--sinyal); } .result .dagilim .a { background: #a3a199; } .result .dagilim .b { background: #6b6a64; } .result .dagilim .c { background: #4a4944; }
@media (max-width: 420px) { .result .dagilim .lej { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .result .dagilim .bar i { transition: none; } }
.result .kv-uyari { margin: -4px 0 14px; padding: 9px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; color: #fde68a; background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .35); }
.f input[aria-invalid="true"] { border-color: var(--uyari); box-shadow: 0 0 0 3px rgba(194, 58, 40, .15); }
.result .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.result .actions { display: grid; grid-template-columns: 1fr 1fr; }
.result .actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; color: #ecebe7; background: transparent; border: 1.5px solid #55544f; border-radius: 10px; padding: 11px 12px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.result .actions button:hover { border-color: var(--sinyal); color: var(--sinyal); }
.result .actions button[data-x="xlsx"] { background: var(--sinyal); border-color: var(--sinyal); color: var(--murekkep); }
.result .actions button[data-x="xlsx"]:hover { background: #ecebe7; border-color: #ecebe7; color: var(--murekkep); }
.result .actions .i { width: 18px; height: 18px; }
#kv-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--grafit); color: #ecebe7; padding: 11px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 99; max-width: 90vw; text-align: center; }
#kv-toast.on { opacity: 1; transform: translate(-50%, 0); }
.tbl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.tbl-head h2 { font-size: 18px; margin: 0; }
.tbl-head + .tbl-wrap { margin-top: 10px; }

.tbl-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid #d6d2c7; border-radius: 12px; }
/* Yana kayan tabloda kenarda hafif gölge: "devamı var" ipucu (yalnız kaydırılabilirken görünür) */
.tbl-wrap {
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255,255,255,0)) left center / 36px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255,255,255,0)) right center / 36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(30,25,10,.18), rgba(30,25,10,0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(30,25,10,.18), rgba(30,25,10,0)) right center / 14px 100% no-repeat scroll,
    var(--surface);
  -webkit-overflow-scrolling: touch;
}
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl th { background: #faf9f6; font-size: 13px; color: var(--muted); font-weight: 700; position: sticky; top: 0; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 700; background: #faf9f6; }

.minis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .minis { grid-template-columns: 1fr; } }
.mini { background: #fff; border: 1px solid #d6d2c7; border-radius: 16px; padding: 18px; display: grid; gap: 10px; }
.mini h2 { font-size: 17px; margin: 0; }
.mini .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15.5px; color: var(--muted); }
.mini .row input { width: 120px; flex: 1 1 100px; font: inherit; font-size: 16.5px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #d6d2c7; background: #fff; color: var(--text); }
.mini .row input:focus { outline: none; border-color: var(--murekkep); box-shadow: 0 0 0 3px rgba(240, 90, 26, .18); }
.mini .ans { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; font-size: 23px; color: var(--sinyal-koyu); min-height: 32px; }

.article { max-width: 820px; }
.article h2 { font-size: clamp(22px, 2.8vw, 28px); margin: 34px 0 10px; line-height: 1.25; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 18px; margin: 22px 0 6px; }
.article p, .article li { color: var(--muted); font-size: 16.5px; }
.article .formula { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sinyal); border-radius: 10px; padding: 14px 16px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 15px; color: var(--text); overflow-x: auto; }
.article details { background: var(--surface); border: 1px solid #d6d2c7; border-radius: 12px; padding: 4px 18px; }
.article details + details { margin-top: 10px; }
.article summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--text); }
.article summary::-webkit-details-marker { display: none; }
.article summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--sinyal-koyu); }
.article details[open] summary::after { content: "−"; }
.article details p { margin: 0 0 16px; }
.note { font-size: 13.5px; color: var(--faint); margin-top: 14px; }
/* Makale içi "İlgili hesaplamalar" listesi (araclar/_kaynak/_ilgili.py) */
.article ul.ilgili { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.article ul.ilgili li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sinyal); border-radius: 10px; padding: 12px 14px; font-size: 15.5px; line-height: 1.5; }
.article ul.ilgili li span { display: block; margin-top: 2px; }
.article ul.ilgili a { font-weight: 700; color: var(--text); text-decoration: underline; text-decoration-color: var(--sinyal); text-underline-offset: 3px; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.tlink { display: flex; gap: 14px; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid #d6d2c7; border-radius: 14px; padding: 16px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.tlink:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -22px rgba(30, 25, 10, .45); border-color: var(--murekkep); }
.tlink .ico { margin: 0; flex: none; }
.tlink b { display: block; font-family: "Manrope", sans-serif; font-weight: 700; font-size: 16px; }
.tlink span { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; }
.f input[type="checkbox"] { appearance: auto; -webkit-appearance: checkbox; width: 20px; height: 20px; flex: none; accent-color: var(--sinyal); }
.tlink span.ico { display: grid; color: var(--k); font-size: inherit; }
[hidden] { display: none !important; }
.fx-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.fx-pair #swap { padding: 12px; margin-bottom: 1px; }
@media (max-width: 560px) {
  .fx-pair { grid-template-columns: 1fr; gap: 8px; }
  .fx-pair #swap { justify-self: center; padding: 8px 14px; margin: 0; }
  .fx-pair #swap .i { transform: rotate(90deg); }
}
input[type="date"] { min-height: 50px; }
.fields .two > * { min-width: 0; }
.f input[type="date"] { min-width: 0; width: 100%; font-size: 16px; padding-left: 10px; padding-right: 8px; }

/* Örnek hesap tabloları (makale içinde) */
.article .tbl-wrap.ornek { margin-top: 10px; }
.article .tbl-wrap.ornek .tbl { font-size: 14.5px; }
/* Telefonda tablolar: başlıklar alt satıra geçebilir, kenar boşlukları daralır; böylece çoğu tablo ekrana sığar */
@media (max-width: 560px) {
  .tbl th { white-space: normal; min-width: 4.6em; line-height: 1.3; vertical-align: bottom; }
  .tbl th, .tbl td { padding: 9px 9px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 12px; }
  .tbl th:last-child, .tbl td:last-child { padding-right: 12px; }
  .tbl, .article .tbl-wrap.ornek .tbl { font-size: 13.5px; }
  /* Yana kayan geniş tablolarda ilk sütun (ay, dönem, tutar…) sabit kalır; hangi satıra bakıldığı kaybolmaz */
  .tbl td:first-child, .tbl th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
  .tbl th:first-child { background: #faf9f6; z-index: 2; }
  .tbl tfoot td:first-child { background: #faf9f6; }
}
.article .tbl-wrap.ornek .tbl td { color: var(--text); }
.article .tbl-wrap.ornek .tbl td:first-child { font-weight: 600; }
.article .tbl-not { font-size: 14px; margin: 8px 0 0; }
