/* Веб-калькулятор компенсаций. Цвета — как у главной страницы сайта (public/index.html). */
:root {
  --bg: #ffffff; --surface: #f6f7f9; --text: #1c1e21; --muted: #5b6470; --border: #e3e6ea;
  --accent: #2f6fed; --accent-soft: #eaf1fe; --ok: #1f8a4c; --warn: #b8740a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --surface: #181b21; --text: #e7e9ec; --muted: #9aa3af; --border: #262b33;
    --accent: #5b8dff; --accent-soft: #182338; --ok: #4cc27f; --warn: #e2a33b;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55; font-size: 16px;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px 64px; }
.top { margin-bottom: 18px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0 0 22px; }
h2 { font-size: 21px; margin: 32px 0 8px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.field { position: relative; min-width: 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; font: inherit; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.swap {
  font: inherit; font-size: 18px; width: 44px; height: 46px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--accent);
}
.options {
  position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 320px; overflow-y: auto;
}
.options li { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.options li[aria-selected="true"], .options li:hover { background: var(--accent-soft); }
.options .code { color: var(--muted); font-size: 13px; }
.options small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.options .empty { color: var(--muted); cursor: default; }

.q { margin-top: 14px; }
.q p { margin: 0 0 6px; font-size: 15px; }
.q[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  font: inherit; font-size: 14.5px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.chips button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.result .verdict { margin: 0 0 4px; font-size: 18px; color: var(--muted); }
.result[data-verdict="eligible"] .verdict { color: var(--ok); }
.result[data-verdict="disputable"] .verdict { color: var(--warn); }
.amount { font-size: 44px; font-weight: 800; margin: 0; line-height: 1.1; }
.meta { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.note { color: var(--muted); font-size: 14.5px; margin: 8px 0 0; }
.claim {
  display: block; text-align: center; margin: 16px 0 8px; padding: 13px; border-radius: 14px;
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none;
}
.fine { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }

.about ul { padding-left: 20px; }
.about li { margin-bottom: 6px; }
.app { color: var(--accent); font-weight: 600; text-decoration: none; }
footer { margin-top: 40px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--border); padding-top: 16px; }
footer a { color: var(--muted); }
.langs a { margin-right: 10px; white-space: nowrap; }

h3 { font-size: 17px; margin: 20px 0 6px; }
.about ol { padding-left: 22px; }
.about ol li { margin-bottom: 6px; }
.about .note { color: var(--muted); font-size: 14.5px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tabs a, .tabs span {
  font-size: 14px; padding: 6px 12px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--border); color: var(--text);
}
.tabs span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.amounts { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; }
.amounts th, .amounts td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.amounts thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.amounts tbody th { font-weight: 400; }
.amounts td { font-weight: 700; white-space: nowrap; }

details { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin-bottom: 8px; background: var(--surface); }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style-position: outside; }
details p { margin: 0 0 12px; color: var(--muted); }
.more a { color: var(--accent); text-decoration: none; }

@media (max-width: 520px) {
  h1 { font-size: 25px; }
  .route { grid-template-columns: 1fr; }
  .swap { justify-self: end; height: 38px; margin: -4px 0; }
}
