:root {
  --bg: #f7f8fa; --card: #ffffff; --text: #1a1d24; --muted: #5b6372; --line: #e3e6eb;
  --accent: #0b6e4f; --accent-soft: #e6f4ee; --warn: #9a5b00; --warn-soft: #fff4e0;
  --radius: 14px; --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --card: #1b1f27; --text: #e8eaee; --muted: #a0a8b6; --line: #2c323d;
    --accent: #4cc79a; --accent-soft: #173a2d; --warn: #f0b456; --warn-soft: #3a2c14;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); background: var(--card); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; text-decoration: none; color: var(--text); font-size: 18px; }
.logo span { color: var(--accent); }
nav.top a { margin-left: 16px; text-decoration: none; color: var(--muted); font-size: 14px; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.2; margin: 28px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; font-size: 17px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin: 16px 0; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 680px) { .calc { grid-template-columns: 1fr; } }
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input, select { width: 100%; padding: 11px 12px; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; font-weight: 500; text-align: center; padding: 10px; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; margin: 0; }
.seg input { display: none; }
.seg input:checked + span { color: var(--accent); font-weight: 700; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.result { background: var(--accent-soft); border-radius: 12px; padding: 18px; }
.big { font-size: clamp(30px, 6vw, 40px); font-weight: 800; color: var(--accent); line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.big-label { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
dl.rows { margin: 14px 0 0; }
dl.rows div { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums; gap: 12px; }
dl.rows dt { color: var(--muted); } dl.rows dd { margin: 0; font-weight: 600; text-align: right; }
.alert { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; margin-top: 12px; }
.ad { min-height: 100px; margin: 20px 0; }
article h2 { font-size: 22px; margin: 28px 0 8px; }
article h3 { font-size: 17px; margin: 18px 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
.table-scroll { overflow-x: auto; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; margin-top: 12px; }
.chart .bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; position: relative; min-width: 2px; }
.chart .bar i { position: absolute; bottom: 0; left: 0; right: 0; background: var(--muted); opacity: .45;
  border-radius: 3px 3px 0 0; }
.legend { font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.grid-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.grid-links a { display: block; text-decoration: none; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.grid-links a:hover { border-color: var(--accent); }
.grid-links strong { display: block; font-size: 17px; margin-bottom: 4px; }
.grid-links small { color: var(--muted); }
details { border-top: 1px solid var(--line); padding: 10px 0; }
summary { font-weight: 600; cursor: pointer; }
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0; color: var(--muted); font-size: 13px; }
.crumbs { font-size: 13px; color: var(--muted); margin-top: 16px; }
.crumbs a { color: var(--muted); }
[hidden] { display: none !important; }
.pct-row { display: grid; grid-template-columns: 1fr auto 1fr auto minmax(90px, 1.2fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.pct-row span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.pct-row output { font-weight: 800; color: var(--accent); font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .pct-row { grid-template-columns: 1fr auto 1fr; } .pct-row output { grid-column: 1 / -1; } .pct-row span:nth-of-type(2) { display: none; } }
form h3 { font-size: 15px; margin: 18px 0 8px; } form h3:first-child { margin-top: 0; }
.seg input[type="text"], .seg input[inputmode] { display: block; }
.langs a { margin-right: 4px; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
@media (prefers-color-scheme: dark) { .btn { color: #0b1a14; } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.countdown div { background: var(--accent-soft); border-radius: 12px; padding: 14px 4px; }
.countdown b { display: block; font-size: clamp(28px, 7vw, 48px); color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown small { color: var(--muted); font-size: 13px; }
.nums { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.nums span { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.heart { font-size: 56px; text-align: center; line-height: 1; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; background: var(--bg); transition: .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop p { margin: 6px 0; } .drop-ico { font-size: 34px; color: var(--accent); line-height: 1; }
.files { list-style: none; padding: 0; margin: 12px 0; }
.files li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: var(--card); }
.files .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.files .fsize { color: var(--muted); font-size: 13px; white-space: nowrap; }
.files button { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; flex: none; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; margin-top: 12px; }
.btn-big { width: 100%; padding: 14px; font-size: 17px; margin-top: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.results { margin-top: 12px; display: grid; gap: 8px; }
.res { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); }
.res img, .res .pdficon { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: var(--card); }
.res .pdficon { display: grid; place-items: center; font-weight: 800; color: #c0392b; font-size: 14px; border: 1px solid var(--line); }
.rinfo { flex: 1; min-width: 0; } .rinfo b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rinfo small { color: var(--muted); }
.conv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.conv .swap { margin-bottom: 24px; color: var(--muted); font-size: 22px; }
.conv-out { font-size: clamp(22px, 5vw, 30px); font-weight: 800; color: var(--accent); margin-top: 6px; font-variant-numeric: tabular-nums; }
