/* Palette: black / dark gray / white / light gray / silver, same as kova-apps.dev.
   The only other colors are the strength meter's muted wine tones (wine #670D2F is the "removed" color of the site). */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-cyrillic-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    --bg: #08080a;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hi: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.09);
    --border-hi: rgba(255, 255, 255, 0.2);
    --text: #f3f3f5;
    --muted: #8e8e97;
    --silver: #c4c6cd;
    --white: #ffffff;
    --lvl1: #670d2f;
    --lvl2: #7a4a58;
    --lvl3: #8e8e97;
    --lvl4: #c4c6cd;
    --lvl5: #ffffff;
    --radius: 18px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(900px 500px at 50% -10%, rgba(255, 255, 255, 0.06), transparent 70%), var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--silver); color: #000; }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 4vw, 40px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.langs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.langs button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.langs button[aria-pressed='true'] { background: var(--silver); color: #000; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 56px; display: flex; flex-direction: column; gap: 14px; }
.hero { padding: 28px 0 8px; text-align: center; }
.hero__logo { width: 96px; height: 96px; margin: 0 auto 14px; filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.6)); }
.hero h1 { font-size: clamp(32px, 6vw, 48px); letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 8px; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tabs button { border: 0; background: none; padding: 10px 8px; border-radius: 10px; font-weight: 500; color: var(--muted); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] { background: var(--surface-hi); color: var(--white); box-shadow: inset 0 0 0 1px var(--border-hi); }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 14px; backdrop-filter: blur(8px); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lbl, label { font-size: 14px; font-weight: 500; }
.num { font-family: var(--mono); font-size: 15px; color: var(--silver); }
.field { display: flex; flex-direction: column; gap: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; }
.notice { font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-hi); background: var(--surface-hi); color: var(--silver); }

.in { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.35); color: var(--text); font: inherit; }
.in:focus { border-color: var(--border-hi); outline: none; }
textarea.in { resize: vertical; font-size: 12px; line-height: 1.5; }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select.in option { background: #121216; }

input[type='checkbox'] { appearance: none; width: 18px; height: 18px; flex: none; border: 1px solid var(--border-hi); border-radius: 5px; background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; cursor: pointer; margin: 0; }
input[type='checkbox']::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #000; border-bottom: 2px solid #000; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.15s var(--ease); }
input[type='checkbox']:checked { background: var(--silver); border-color: var(--silver); }
input[type='checkbox']:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }

input[type='range'] { width: 100%; appearance: none; height: 4px; border-radius: 4px; background: var(--border-hi); outline-offset: 6px; }
input[type='range']::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); cursor: grab; }
input[type='range']::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 0; cursor: grab; }

.out { display: block; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.45); font-size: clamp(15px, 2.6vw, 19px); line-height: 1.5; word-break: break-all; min-height: 58px; user-select: all; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 1px solid var(--border-hi); background: var(--surface-hi); padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: 14px; transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--silver); border-color: var(--silver); color: #000; }
.btn--solid:hover { background: var(--white); }
.btn--ghost { background: none; }
.btn--sm { padding: 4px 12px; font-size: 12px; }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.mini { display: flex; gap: 6px; }
.keybox { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

/* strength */
.strength h2 { font-size: 16px; }
.strength h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.verdict strong { font-weight: 600; }
.meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.meter i { height: 8px; border-radius: 4px; background: var(--border); transition: background 0.35s var(--ease); }
.meter[data-level='1'] i:nth-child(-n + 1) { background: var(--lvl1); }
.meter[data-level='2'] i:nth-child(-n + 2) { background: var(--lvl2); }
.meter[data-level='3'] i:nth-child(-n + 3) { background: var(--lvl3); }
.meter[data-level='4'] i:nth-child(-n + 4) { background: var(--lvl4); }
.meter[data-level='5'] i:nth-child(-n + 5) { background: var(--lvl5); box-shadow: 0 0 12px rgba(255, 255, 255, 0.35); }
.times { display: flex; flex-direction: column; }
.times li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.times li:first-child { border-top: 0; }
.times li span:first-child { color: var(--muted); }
.times li span:last-child { text-align: right; font-weight: 500; }

.foot { text-align: center; padding-top: 6px; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 520px) {
    .grid2, .checks { grid-template-columns: 1fr; }
    .times li { flex-direction: column; gap: 2px; }
    .times li span:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
