/* KuraklıkLab Pro — styles.css
   Layout: instrument-style app shell — sticky top bar + stepper, live scene with gauge rail, card panels on a stone ground. */
:root {
  --bg: #eef0eb; --surface: #fbfcf9; --surface-2: #e4e8e0; --ink: #1b2320; --ink-2: #4d5a55; --ink-3: #75817c; --line: #cfd5cb;
  --water: #1f5f8b; --water-2: #3d80ba; --water-soft: #dbe8f2; --earth: #a4561f; --earth-soft: #f3e2d1; --leaf: #4c7a38; --crack: #3b2414;
  --ok: #367447; --warn: #a96d14; --bad: #a3361c; --ok-bg: #e2efe3; --warn-bg: #f6ead2; --bad-bg: #f5dfd7;
  --shadow: 0 1px 2px rgba(20,30,25,.06), 0 6px 20px rgba(20,30,25,.05);
  --f-display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Source Sans 3', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --r: 10px; --gut: clamp(16px, 3vw, 32px);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111614; --surface: #182019; --surface-2: #212a25; --ink: #e5ebe6; --ink-2: #a9b5af; --ink-3: #7e8b85; --line: #2d3832;
  --water: #6aa8d8; --water-2: #8fc0e6; --water-soft: #1b2d3a; --earth: #e08d52; --earth-soft: #3a2a1d; --leaf: #8cbf6f; --crack: #2a1a0e;
  --ok: #7cc48c; --warn: #e2ac52; --bad: #ef8a6b; --ok-bg: #1d3324; --warn-bg: #3a2e17; --bad-bg: #3d221a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #111614; --surface: #182019; --surface-2: #212a25; --ink: #e5ebe6; --ink-2: #a9b5af; --ink-3: #7e8b85; --line: #2d3832;
  --water: #6aa8d8; --water-2: #8fc0e6; --water-soft: #1b2d3a; --earth: #e08d52; --earth-soft: #3a2a1d; --leaf: #8cbf6f; --crack: #2a1a0e;
  --ok: #7cc48c; --warn: #e2ac52; --bad: #ef8a6b; --ok-bg: #1d3324; --warn-bg: #3a2e17; --bad-bg: #3d221a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-body); }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 88%; letter-spacing: -0.01em; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 750; line-height: 1.08; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; font-stretch: 95%; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--water-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 10px var(--gut); display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-family: var(--f-display); font-size: 1.15rem; font-stretch: 85%; font-weight: 500; letter-spacing: -0.01em; }
.brand-name b { font-weight: 800; color: var(--water); }
.brand-name i { font-style: normal; font-family: var(--f-mono); font-size: .68rem; padding: 1px 5px; border: 1px solid var(--earth); color: var(--earth); border-radius: 4px; vertical-align: 3px; }
.mainnav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav button { border: 0; background: none; padding: 8px 11px; border-radius: 8px; font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.mainnav button:hover { background: var(--surface-2); color: var(--ink); }
.mainnav button.on { color: var(--water); background: var(--water-soft); }
.top-tools { display: flex; gap: 8px; align-items: center; flex: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 11px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--water); color: #fff; }
:root[data-theme="dark"] .seg button.on { color: #0d1b26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { color: #0d1b26; } }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 36px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.menu-btn { display: none; }
.stepper { list-style: none; margin: 0 auto; padding: 0 var(--gut) 8px; max-width: 1320px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.stepper li { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-3); padding: 3px 10px 3px 4px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.stepper li span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font: 500 .7rem var(--f-mono); }
.stepper li b { font-weight: 600; }
.stepper li.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.stepper li.done span { background: var(--ok); color: var(--surface); }
.stepper li.cur { color: var(--water); border-color: var(--water); }
.stepper li.cur span { background: var(--water); color: var(--surface); }

@media (max-width: 1020px) {
  .menu-btn { display: grid; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gut); box-shadow: var(--shadow); }
  .mainnav.open { display: flex; }
  .mainnav button { text-align: left; padding: 10px 12px; }
  .topbar-in { justify-content: space-between; }
}

/* ---------- layout ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: var(--gut); padding-block: 22px 40px; }
.view { display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; flex-direction: column; gap: 6px; max-width: 80ch; }
.page-head p { color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.sec-title { margin-top: 18px; }
.note { color: var(--ink-3); font-size: .9rem; max-width: 90ch; }
.note.small { font-size: .82rem; }
.caption { color: var(--ink-3); font-size: .88rem; max-width: 100ch; }
.callout { border-left: 3px solid var(--water); background: var(--water-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .93rem; }
.callout:empty { display: none; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--water); border-color: var(--water); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #0d1b26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0d1b26; } }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: none; color: var(--water); }
.btn.small { padding: 6px 11px; font-size: .86rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.form-grid.one { grid-template-columns: 1fr; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--ink-2); font-weight: 600; min-width: 0; }
label.inline { flex-direction: row; align-items: center; gap: 8px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
input[type=number], input[type=text], input:not([type]), input[type=search], select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: .93rem; font-weight: 400; color: var(--ink); min-width: 0; width: 100%; }
label.inline select { width: auto; }
textarea { font-family: var(--f-mono); font-size: .82rem; resize: vertical; }
input[type=range] { accent-color: var(--water); width: 100%; }
input[type=checkbox] { accent-color: var(--water); width: 16px; height: 16px; }
.pair { display: flex; gap: 6px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.hero-text { display: flex; flex-direction: column; gap: 12px; max-width: 78ch; }
.hero-text .lead { color: var(--ink-2); font-size: 1.05rem; max-width: 68ch; }
.eyebrow { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .04em; color: var(--earth); text-transform: uppercase; }
.scene-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; }
@media (max-width: 900px) { .scene-wrap { grid-template-columns: 1fr; } }
.scene-card { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #cfd9df; aspect-ratio: 16 / 8.2; max-width: 100%; box-shadow: var(--shadow); }
@media (max-width: 600px) { .scene-card { aspect-ratio: 4 / 3.2; } }
#scene { width: 100%; height: 100%; display: block; }
.scene-date { position: absolute; left: 12px; top: 10px; background: rgba(20,28,32,.62); color: #f3f1ea; padding: 4px 10px; border-radius: 6px; font-size: .85rem; }
.gauges { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .gauges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.gauge { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; }
.gauge .gl { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; grid-column: 1 / -1; display: flex; justify-content: space-between; }
.gauge .gv { font: 500 1.35rem var(--f-mono); font-variant-numeric: tabular-nums; }
.gauge .gc { font-size: .78rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; justify-self: end; color: #1b1b1b; }
.gauge .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; position: relative; margin-top: 4px; background: linear-gradient(90deg, #8f2d14, #cc6b2c 20%, #e5b25d 33%, #d9d6cc 50%, #86b6dd 67%, #3a7cc0 80%, #1d4e89); }
.gauge .bar i { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); }
.scene-ctrl { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.ctl { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .84rem; max-width: 100%; }
.ctl span { white-space: normal; }
.ctl input[type=range] { width: 120px; }
.ctl.grow { flex: 1 1 220px; }
.ctl.grow input[type=range] { width: 100%; }
.ctl input[type=number] { width: 110px; }
table.tbl td.mono { white-space: nowrap; }
.ctl output { min-width: 4.5em; font-size: .82rem; color: var(--ink-2); }
.ctl-row { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.strip-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; }
.plot { width: 100%; min-height: 300px; }
.plot.tall { min-height: 380px; }
.plot.square { min-height: 360px; }
.plot.strip { min-height: 170px; height: 170px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feat { padding: 16px 18px; border-top: 3px solid var(--water); background: var(--surface); border-radius: 0 0 var(--r) var(--r); display: flex; flex-direction: column; gap: 6px; }
.feat:nth-child(3n+2) { border-top-color: var(--earth); }
.feat:nth-child(3n) { border-top-color: var(--leaf); }
.feat p { color: var(--ink-2); font-size: .94rem; }
.flow { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.flow li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.flow li::before { content: counter(s); font: 500 .75rem var(--f-mono); color: var(--water); }
.flow li span { font-size: .87rem; color: var(--ink-2); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpis.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.panel .kpi { background: var(--bg); }
.kpi .k { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.kpi .v { font: 500 1.3rem var(--f-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .s { font-size: .8rem; color: var(--ink-2); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .78rem; font-weight: 600; color: #1b1b1b; }

/* ---------- tabs, data ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--water); border-bottom-color: var(--water); }
.tabpane { display: flex; flex-direction: column; gap: 12px; }
.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 26px; align-items: center; text-align: center; gap: 8px; cursor: pointer; color: var(--ink-2); background: var(--bg); }
.drop.over { border-color: var(--water); background: var(--water-soft); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.qc-head { display: flex; justify-content: space-between; align-items: center; }
.qc-score { font: 500 1.6rem var(--f-mono); padding: 2px 12px; border-radius: 8px; }
.qc-score.ok { background: var(--ok-bg); color: var(--ok); } .qc-score.warn { background: var(--warn-bg); color: var(--warn); } .qc-score.bad { background: var(--bad-bg); color: var(--bad); }
.qc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qc-list li { padding: 7px 10px 7px 30px; border-radius: 7px; position: relative; font-size: .9rem; }
.qc-list li::before { content: ''; position: absolute; left: 11px; top: 13px; width: 9px; height: 9px; border-radius: 50%; }
.qc-list li.ok { background: var(--ok-bg); } .qc-list li.ok::before { background: var(--ok); }
.qc-list li.warn { background: var(--warn-bg); } .qc-list li.warn::before { background: var(--warn); }
.qc-list li.bad { background: var(--bad-bg); } .qc-list li.bad::before { background: var(--bad); }
.grid-scroll { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: 8px; }
table.grid { border-collapse: collapse; font-size: .84rem; font-family: var(--f-mono); }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; }
table.grid th { position: sticky; top: 0; background: var(--surface-2); padding: 6px 8px; font-family: var(--f-body); font-weight: 600; z-index: 1; white-space: nowrap; }
table.grid td input { border: 0; border-radius: 0; background: transparent; width: 92px; padding: 5px 7px; font-family: var(--f-mono); font-size: .84rem; }
table.grid td input:focus { background: var(--water-soft); outline: none; }
table.grid td.sel { text-align: center; width: 30px; }
.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.pager button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.pager button.on { background: var(--water); color: #fff; border-color: var(--water); }
details.paste { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
details.paste summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
details.paste textarea { margin: 8px 0; }

/* ---------- tables ---------- */
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
table.tbl th { text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink-3); padding: 7px 9px; white-space: nowrap; font-size: .8rem; }
table.tbl td { border-bottom: 1px solid var(--line); padding: 6px 9px; }
table.tbl td.num { font-family: var(--f-mono); text-align: right; }
table.tbl th.num { text-align: right; }
table.sortable th { cursor: pointer; }
table.sortable th:hover { color: var(--water); }
table.tbl tr.best td { background: var(--water-soft); }
.tbl-tools { display: flex; gap: 6px; align-items: center; }
.tbl-tools input { width: 170px; }

/* ---------- analysis ---------- */
.an-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .an-grid { grid-template-columns: 1fr; } }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 110px); max-height: calc(100vh - 130px); overflow-y: auto; }
@media (max-width: 960px) { .side { position: static; max-height: none; } }
.results { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.idx-select { display: flex; flex-direction: column; gap: 10px; }
.idx-layer h4 { margin: 0 0 4px; font: 600 .74rem var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.idx-layer h4 i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.idx-opt { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; font-weight: 500; font-size: .86rem; color: var(--ink); padding: 3px 0; }
.idx-opt b { font-family: var(--f-mono); font-weight: 500; font-size: .82rem; min-width: 3.6em; }
.idx-opt small { color: var(--ink-3); display: block; font-size: .78rem; }
.idx-opt.na { opacity: .45; }
.interp { background: var(--bg); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.interp h4 { margin: 0; font: 700 .9rem var(--f-display); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px; font: 500 .8rem var(--f-mono); cursor: pointer; background: var(--surface); }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ---------- report ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dl { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; position: relative; color: var(--ink); font-weight: 400; }
.dl:hover { border-color: var(--water); }
.dl b { font-family: var(--f-display); font-size: 1.05rem; font-stretch: 92%; }
.dl span { font-size: .87rem; color: var(--ink-2); }
.dl i { position: absolute; right: 14px; top: 14px; font-style: normal; color: var(--earth); font-size: .8rem; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hist li { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 6px 0; font-size: .9rem; flex-wrap: wrap; }

/* ---------- methods & help ---------- */
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; min-width: 0; }
.mcard header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mcard header code { font: 500 1rem var(--f-mono); color: var(--water); }
.mcard .layer-tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.eq { font-family: 'Cambria Math', 'STIX Two Math', 'Times New Roman', serif; font-size: 1.04rem; background: var(--bg); border-left: 3px solid var(--earth); padding: 10px 14px; border-radius: 0 8px 8px 0; overflow-x: auto; line-height: 1.8; }
.mcard h4 { margin: 4px 0 0; font: 700 .82rem var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.mcard p, .mcard li { font-size: .93rem; max-width: 95ch; }
.mcard ol { margin: 0; padding-left: 20px; }
.cls-row { display: flex; flex-wrap: wrap; gap: 6px; }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 92ch; }
.prose h2 { margin-top: 10px; }
.prose p, .prose li { color: var(--ink); }
.prose ol, .prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.prose code { font-family: var(--f-mono); font-size: .86rem; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.prose pre { font-family: var(--f-mono); font-size: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; margin: 0; }

.foot { border-top: 1px solid var(--line); padding-inline: var(--gut); padding-block: 18px 28px; color: var(--ink-3); font-size: .84rem; text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 9px; font-size: .92rem; z-index: 60; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }
