:root {
  --bg: #f4f6f8; --surface: #fff; --surface2: #f6f8fa; --line: #d6dce3; --fg: #1b2530; --muted: #5b6876;
  --warn: #9a5b00; --warn-soft: #fbf0dc;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif; --mono: ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12171d; --surface: #1a2129; --surface2: #212a33; --line: #323d49; --fg: #e4e9ee; --muted: #9aa7b4; --warn: #e8b25a; --warn-soft: #3a2c14; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
a { color: var(--brand); }
.mono { font-family: var(--mono); }
.wrap { max-width: 920px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
.head { background: var(--brand); color: #fff; }
.head-in { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand b { display: block; font-size: 19px; line-height: 1.2; }
.brand small { opacity: .85; }
.mark { width: 46px; height: 46px; border-radius: 10px; background: #fff; color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.logo-img { max-height: 46px; max-width: 160px; background: #fff; border-radius: 8px; padding: 4px; }
.contact { font-size: 13px; opacity: .9; }
.head-side { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ui-lang { display: flex; gap: 2px; font-size: 12px; }
.ui-lang a { color: #fff; text-decoration: none; padding: 3px 7px; border-radius: 6px; opacity: .8; }
.ui-lang a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.ui-lang a[aria-current="true"] { opacity: 1; background: rgba(255,255,255,.22); font-weight: 600; }
.main { padding-block: 28px 40px; }
h1 { font-size: 24px; margin: 0 0 8px; text-wrap: balance; }
.search { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 12px; }
.search p { margin: 0; color: var(--muted); }
.fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.fld { display: grid; gap: 4px; flex: 1 1 180px; min-width: 0; }
.fld.code { flex: 0 1 140px; }
.fld span { font-size: 12px; font-weight: 600; color: var(--muted); }
input, select { font: inherit; color: inherit; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 12px; min-width: 0; }
input:focus, select:focus, a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn { font: inherit; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: 13px; color: var(--muted); }
.err { background: var(--warn-soft); color: var(--warn) !important; border-radius: 8px; padding: 12px 14px; }
.result { display: grid; gap: 14px; }
.rhead h1 { margin: 0; }
.sub, .note { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--fg); text-decoration: none; }
.chip[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.item h2 { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 15px; font-weight: 500; margin: 0; padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--line); }
.item h2 small { margin-left: auto; color: var(--muted); font-size: 12px; }
.row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row input { width: 18px; height: 18px; accent-color: var(--brand); }
.what { min-width: 0; cursor: pointer; }
.what b { font-weight: 500; display: block; }
.file { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.dl { font-weight: 600; text-decoration: none; padding: 4px 6px; }
.dls { white-space: nowrap; }
.dl.alt { font-weight: 400; opacity: .8; }
.none { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 14px; }
.bulk { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.all { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.all input { width: 18px; height: 18px; accent-color: var(--brand); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.foot { border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; padding-block: 16px; }
@media (max-width: 600px) {
  .row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .row .lang { display: none; }
}
.foot a { color: inherit; }
