/* ------------------------------------------------------------------
   JSON TOON Dönüştürücü
   İki renk anlam taşır: kehribar = JSON (ağır), turkuaz = TOON (hafif).
   ------------------------------------------------------------------ */

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #12202f;
  --ink-2: #4a5868;
  --ink-3: #6f7c8b;
  --line: #d9dfe7;
  --line-2: #e8ecf1;

  --json: #b86a08;
  --json-fill: #e9a23b;
  --json-soft: #fdf3e2;
  --toon: #0b7d6e;
  --toon-fill: #19a593;
  --toon-soft: #e3f6f3;
  --danger: #b3261e;
  --danger-soft: #fdecea;

  --code-key: #0b6a8f;
  --code-str: #3d6b1f;
  --code-num: #9a4a00;
  --code-lit: #7a3fa0;
  --code-meta: #0b7d6e;
  --code-dim: #8491a0;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;

  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
  --wrap: 1180px;
  --shadow: 0 1px 2px rgba(18, 32, 47, .06), 0 8px 24px -12px rgba(18, 32, 47, .18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141c;
    --surface: #161e29;
    --surface-2: #1b2532;
    --ink: #e7ecf2;
    --ink-2: #aab6c4;
    --ink-3: #8794a3;
    --line: #2b3746;
    --line-2: #222d3a;
    --json: #f0ab4c;
    --json-fill: #d9902a;
    --json-soft: #2c2314;
    --toon: #45cdb9;
    --toon-fill: #24a896;
    --toon-soft: #12302d;
    --danger: #ff8a80;
    --danger-soft: #3a1b19;
    --code-key: #6cc4ea;
    --code-str: #a5d67a;
    --code-num: #f0ab4c;
    --code-lit: #cf9cf0;
    --code-meta: #45cdb9;
    --code-dim: #72808f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e141c;
  --surface: #161e29;
  --surface-2: #1b2532;
  --ink: #e7ecf2;
  --ink-2: #aab6c4;
  --ink-3: #8794a3;
  --line: #2b3746;
  --line-2: #222d3a;
  --json: #f0ab4c;
  --json-fill: #d9902a;
  --json-soft: #2c2314;
  --toon: #45cdb9;
  --toon-fill: #24a896;
  --toon-soft: #12302d;
  --danger: #ff8a80;
  --danger-soft: #3a1b19;
  --code-key: #6cc4ea;
  --code-str: #a5d67a;
  --code-num: #f0ab4c;
  --code-lit: #cf9cf0;
  --code-meta: #45cdb9;
  --code-dim: #72808f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ul, figure, pre { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
code, pre, textarea { font-family: var(--mono); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--toon); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Üst bant ---------- */

.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
.site-head__in { display: flex; align-items: center; gap: 24px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--font-display); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand img { display: block; border-radius: 7px; }
.brand__to { font-weight: 400; color: var(--ink-3); }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { padding: 6px 10px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--line-2); }

.theme { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.theme button { display: grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); cursor: pointer; }
.theme button:hover { color: var(--ink); }
.theme .ic { width: 16px; height: 16px; }
:root[data-theme-choice="light"] .theme [data-theme-set="light"],
:root[data-theme-choice="system"] .theme [data-theme-set="system"],
:root[data-theme-choice="dark"] .theme [data-theme-set="dark"] { background: var(--ink); color: var(--bg); }

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

.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px 56px; padding-block: 44px 28px; }
.intro h1 { font: 700 clamp(34px, 5.2vw, 58px)/1.02 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.intro__lede { max-width: 54ch; padding-bottom: 6px; font-size: 17px; color: var(--ink-2); }

/* ---------- Araç ---------- */

.tool { padding-bottom: 56px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.seg__btn { padding: 7px 14px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.seg__btn:hover { color: var(--ink); }
.seg__btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn--small { height: 30px; padding: 0 10px; font-size: 13.5px; }

.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { color: var(--ink); background: var(--line-2); }
.icon-btn.is-done { color: var(--toon); }

.pick { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; }
.pick__label { color: var(--ink-2); white-space: nowrap; }
.toolbar .pick__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

select, input[type="number"] {
  height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); font-size: 14.5px; max-width: 100%;
}
select { padding-right: 30px; cursor: pointer; }
select:hover, input[type="number"]:hover { border-color: var(--ink-3); }

.check { display: inline-flex; align-items: flex-start; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--toon-fill); flex: none; }
.check small { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.35; }

/* Paneller */

.panes { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }

.pane { position: relative; display: flex; flex-direction: column; min-width: 0; height: clamp(340px, 54vh, 560px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.pane[data-kind="json"] { --tone: var(--json); --tone-fill: var(--json-fill); --tone-soft: var(--json-soft); }
.pane[data-kind="toon"] { --tone: var(--toon); --tone-fill: var(--toon-fill); --tone-soft: var(--toon-soft); }
.pane::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tone-fill); }

.pane__head { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 3px 8px 0 16px; border-bottom: 1px solid var(--line-2); }
.pane__title { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 3px; background: var(--tone-fill); }
.pane__fmt { height: 30px; padding: 0 26px 0 8px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; min-width: 0; }
.pane__tokens { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--tone-soft); color: var(--tone); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pane__tools { display: flex; gap: 2px; }

#input, .output {
  flex: 1; min-height: 0; width: 100%; margin: 0; padding: 14px 16px; border: 0; background: transparent;
  font-size: 13.5px; line-height: 1.6; tab-size: 4; white-space: pre; overflow: auto; color: var(--ink);
}
#input { resize: none; outline: none; }
#input::placeholder { color: var(--ink-3); opacity: 1; }
#input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tone-fill) 55%, transparent); }
.output:focus-visible { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tone-fill) 55%, transparent); }
.output code { font-size: inherit; }
.output__empty { position: absolute; left: 16px; top: 62px; font: 400 13.5px/1.6 var(--mono); color: var(--ink-3); pointer-events: none; }

.pane__drop { position: absolute; inset: 3px 0 0 0; display: none; place-items: center; background: color-mix(in srgb, var(--tone-soft) 92%, transparent); color: var(--tone); font-weight: 700; border: 2px dashed var(--tone-fill); border-radius: 0 0 var(--r-lg) var(--r-lg); pointer-events: none; }
.pane.is-dragging .pane__drop { display: grid; }

.error { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px 10px 16px; border-top: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); color: var(--danger); font-size: 14px; line-height: 1.45; }
.error p { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.error .btn { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: transparent; color: var(--danger); }

.swap { align-self: center; justify-self: center; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.swap:hover { color: var(--ink); border-color: var(--ink-3); }

/* Seçenekler */

.options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 14px 2px 0; }
.prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-left: auto; }
.options__status { flex: 1 1 100%; font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Token defteri */

.ledger { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.ledger__bars { padding: 22px 26px 24px; }
.ledger__cost { padding: 22px 26px 24px; border-left: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.ledger__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 16px; font: 700 17px/1.3 var(--font-display); letter-spacing: -.01em; }
.ledger__meta { font: 400 13px/1.3 var(--font); color: var(--ink-3); letter-spacing: 0; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 196px minmax(0, 1fr); align-items: center; gap: 12px; }
.bar dt { overflow-wrap: anywhere; }
.bar dt { font-size: 14.5px; color: var(--ink-2); }
.bar dd { display: flex; align-items: center; gap: 12px; }
.bar__track { flex: 1; height: 20px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.bar__fill { display: block; width: 0; height: 100%; border-radius: 5px; transition: width .35s cubic-bezier(.2, .7, .2, 1); }
.bar--json .bar__fill { background: var(--json-fill); }
.bar--min .bar__fill { background: color-mix(in srgb, var(--json-fill) 55%, var(--line)); }
.bar--other .bar__fill { background: var(--ink-3); opacity: .55; }
.bar--toon .bar__fill { background: var(--toon-fill); }
.bar.is-na dt, .bar.is-na .bar__num { color: var(--ink-3); font-weight: 400; }
.bar.is-na .bar__num { font-size: 13px; }
.bar__tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--toon-soft); color: var(--toon); font-size: 12px; font-weight: 700; line-height: 1.6; vertical-align: 1px; white-space: nowrap; }
.bar--toon dt { color: var(--ink); font-weight: 700; }
.bar__num { width: 92px; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ledger__verdict { margin-top: 18px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.ledger__verdict strong { color: var(--toon); font-weight: 700; }
.ledger__verdict strong.is-worse { color: var(--json); }

.cost__inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: grid; gap: 5px; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; align-content: end; }
.field:last-child { grid-column: 1 / -1; }
.field input, .field select { width: 100%; color: var(--ink); }
.cost__result { margin-top: 16px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.cost__result strong { display: block; margin-bottom: 2px; font: 700 30px/1.15 var(--font-display); letter-spacing: -.02em; color: var(--toon); font-variant-numeric: tabular-nums; }
.cost__result strong.is-worse { color: var(--json); }
.note { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

.advisor { grid-column: 1 / -1; padding: 22px 26px 24px; border-top: 1px solid var(--line-2); }
.advisor .ledger__title { margin-bottom: 8px; }
.advisor__summary { max-width: 78ch; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.advisor__list { display: grid; gap: 10px; margin-top: 16px; }
.tip { display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px 13px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--json-fill); border-radius: var(--r-md); background: var(--surface-2); }
.tip--tip { border-left-color: var(--toon-fill); }
.tip--note { border-left-color: var(--line); }
.tip__body { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.tip__body p { max-width: 82ch; overflow-wrap: anywhere; }
.tip__where { margin-bottom: 2px; font-size: 13px; color: var(--ink-3); }
.tip__where code { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.tip__body p code { padding: 1px 5px; border-radius: 4px; background: var(--line-2); font-size: .9em; color: var(--ink); }
.tip__body .tip__where code { padding: 0; background: none; }
.tip__gain { margin-top: 6px; color: var(--ink); }
.tip .btn { flex: none; align-self: center; }

/* ---------- Metin bölümleri ---------- */

.prose, .fit, .faq { padding-block: 56px; border-top: 1px solid var(--line); }
.prose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; align-items: start; }
.prose h2, .fit h2, .faq h2 { margin-bottom: 18px; font: 700 clamp(26px, 3vw, 34px)/1.12 var(--font-display); letter-spacing: -.025em; }
.prose__text p { max-width: 62ch; color: var(--ink-2); }
.prose__text p + p { margin-top: 14px; }
.prose__text code, .faq code { padding: 1px 5px; border-radius: 4px; background: var(--line-2); font-size: .88em; color: var(--ink); }

.anatomy { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.anatomy figcaption { padding: 12px 18px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; font-weight: 700; }
.anatomy__code { padding: 18px; overflow-x: auto; font-size: 14px; line-height: 1.75; color: var(--ink); background: var(--surface-2); }
.anatomy__legend { display: grid; gap: 14px; padding: 18px; }
.anatomy__legend div { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 14px; align-items: start; }
.anatomy__legend dt { justify-self: start; max-width: 100%; overflow-wrap: anywhere; font: 600 13px/1.5 var(--mono); }
.anatomy__legend dd { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.a-key { font-weight: 700; }
.a-len { padding: 1px 3px; border-radius: 4px; background: var(--json-soft); color: var(--json); font-weight: 700; }
.a-fields { padding: 1px 3px; border-radius: 4px; background: var(--toon-soft); color: var(--toon); font-weight: 700; }
.a-row { color: var(--ink-2); box-shadow: inset 0 -1px 0 var(--line); }
dt.a-row { padding: 1px 3px; }

.fit__lede { max-width: 68ch; margin-bottom: 26px; color: var(--ink-2); }
.fit__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.fit__col { padding: 24px 26px 26px; }
.fit__col + .fit__col { border-left: 1px solid var(--line-2); }
.fit__col h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font: 700 17px/1.3 var(--font-display); }
.fit__col h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.fit__col--yes h3::before { background: var(--toon-fill); }
.fit__col--no h3::before { background: var(--json-fill); }
.fit__col li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.fit__col li + li { margin-top: 10px; }
.fit__col li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 6px; height: 2px; background: var(--ink-3); }

.snippet { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.snippet__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 18px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; font-weight: 700; }
.snippet pre { padding: 16px 18px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; }

.t-key { color: var(--code-key); }
.t-str { color: var(--code-str); }
.t-num { color: var(--code-num); }
.t-lit { color: var(--code-lit); }
.t-meta { color: var(--code-meta); font-weight: 600; }
.t-kw { color: var(--code-lit); }
.t-com, .t-dim { color: var(--code-dim); }

.faq__list { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; font-size: 16.5px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { max-width: 70ch; padding: 0 2px 20px; color: var(--ink-2); }

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

.site-foot { border-top: 1px solid var(--line); }
.site-foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 24px 36px; font-size: 14px; color: var(--ink-3); }
.site-foot a { color: var(--ink-2); }

/* ---------- Geçmiş çekmecesi ---------- */

.drawer { width: min(440px, 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: -18px 0 40px -24px rgba(0, 0, 0, .45); }
.drawer[open] { display: flex; flex-direction: column; }
.drawer::backdrop { background: rgba(10, 16, 24, .45); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 12px 22px; border-bottom: 1px solid var(--line-2); }
.drawer__head h2 { font: 700 19px/1.2 var(--font-display); }
.drawer__toggle { padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.drawer__list { flex: 1; overflow: auto; }
.drawer__empty { flex: 1; padding: 22px; color: var(--ink-3); font-size: 14.5px; }
.drawer__foot { padding: 12px 22px 18px; border-top: 1px solid var(--line-2); }

.h-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--line-2); }
.h-item__load { display: grid; gap: 4px; min-width: 0; padding: 12px 8px 12px 22px; border: 0; background: none; text-align: left; cursor: pointer; }
.h-item__load:hover { background: var(--surface-2); }
.h-item__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--ink-3); }
.h-item__meta b { color: var(--ink); font-weight: 700; }
.h-item__meta .gain { color: var(--toon); font-weight: 700; }
.h-item__peek { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12.5px/1.5 var(--mono); color: var(--ink-2); }
.h-item .icon-btn { align-self: center; margin-right: 10px; }

/* ---------- Bildirim ---------- */

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 14px); padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Dar ekranlar ---------- */

@media (max-width: 1040px) {
  .site-nav a:nth-child(n+3) { display: none; }
}

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; padding-block: 32px 22px; }
  .ledger { grid-template-columns: 1fr; }
  .ledger__cost { border-left: 0; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .prose, .fit__cols { grid-template-columns: 1fr; }
  .fit__col + .fit__col { border-left: 0; border-top: 1px solid var(--line-2); }
}

@media (max-width: 760px) {
  .wrap { padding-inline: 16px; }
  .site-nav { display: none; }
  .theme { margin-left: auto; }
  .panes { grid-template-columns: 1fr; }
  .pane { height: clamp(260px, 42vh, 380px); }
  .swap { margin: 8px 0; transform: rotate(90deg); }
  .toolbar { align-items: stretch; }
  .seg { width: 100%; }
  .seg__btn { flex: 1; padding-inline: 6px; }
  .toolbar__right { width: 100%; }
  .toolbar__right .pick { flex: 1 1 100%; }
  .toolbar__right .pick select { width: 100%; }
  .toolbar__right .btn { flex: 1; justify-content: center; }
  .prompt { margin-left: 0; width: 100%; }
  .prompt .btn { flex: 1; justify-content: center; }
  .advisor { padding: 18px 16px 20px; }
  .tip { flex-direction: column; gap: 10px; }
  .tip .btn { align-self: flex-start; }
  .pane__head { flex-wrap: wrap; padding-bottom: 4px; }
  .ledger__bars, .ledger__cost { padding: 18px 16px 20px; }
  .bar { grid-template-columns: 1fr; gap: 4px; }
  .bar__num { width: 78px; }
  .cost__inputs { grid-template-columns: 1fr; }
  .field:last-child { grid-column: auto; }
  .prose, .fit, .faq { padding-block: 40px; }
  .anatomy__legend div { grid-template-columns: 1fr; gap: 4px; }
  .fit__col { padding: 20px 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar__fill, .toast, .faq summary::after { transition: none; }
}
