@font-face { font-family: "Roboto"; src: url("/static/fonts/Roboto.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Momo Trust Display"; src: url("/static/fonts/MomoTrustDisplay-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
:root {
    --fg: #fff; --muted: #9a9a9a; --line: #2e2e2e; --bg: #000; --card: #0b0b0b; --card-2: #141414;
    --link: #6cb6ff; --bad: #ff6b6b; --ok: #5fd68a; --signal: #ffb703; --radius: 8px;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --sans: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --logo: "Momo Trust Display", "Montserrat", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans); }
::selection { background: #fff; color: #000; }
a { color: var(--link); }
.muted { color: var(--muted); }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px clamp(16px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.mark { display: inline-flex; align-items: center; text-decoration: none; }
.logo-img { display: block; height: 44px; width: auto; }
.who { display: flex; align-items: center; gap: 12px; font-size: 15px; flex-wrap: wrap; justify-content: flex-end; }
.who__name { font-weight: 500; }
.avatar { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; background: var(--card-2); flex: none; }

.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 96px; }
.wrap--narrow { max-width: 560px; }
h1 { font-size: clamp(28px, 5.5vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; margin: 40px 0 16px; }
h2 { font-size: 22px; font-weight: 500; margin: 0 0 10px; }
.wrap > h2 { margin: 48px 0 20px; font-size: 26px; }
.wrap > p { margin: 0 0 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin: 32px 0; }
.door { display: grid; gap: 14px; }
.door p, .door h2 { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1 1 180px; min-width: 0; }

input, select { font: inherit; color: inherit; background: #0b0b0b; border: 1.5px solid #3a3a3a; border-radius: var(--radius); padding: 10px 12px; min-height: 44px; }
input::placeholder { color: #666; }
input:focus, select:focus { border-color: #fff; outline: none; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: var(--radius); border: 2px solid #fff;
       background: #fff; color: #000; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: #d9d9d9; border-color: #d9d9d9; }
.btn--ghost { background: transparent; color: #fff; }
.btn--ghost:hover { background: #fff; color: #000; border-color: #fff; }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad); border-color: var(--bad); color: #000; }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 14px; border-width: 1.5px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn--big { min-height: 58px; font-size: 20px; padding: 0 32px; border-width: 4px; background: transparent; color: #fff; text-transform: uppercase; }
.btn--big:hover { background: #fff; color: #000; }
.err { color: var(--bad); margin: 8px 0 0; }
.ok { color: var(--ok); }


.link { font: 500 13px/1.3 var(--mono); overflow-wrap: anywhere; background: var(--card-2); border-radius: var(--radius); padding: 7px 10px; text-decoration: none; color: #fff; }
.link:hover { text-decoration: underline; }
.badge { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 10px; background: #1e1e1e; color: #ccc; }
.empty { text-align: center; padding: 36px 0; color: var(--muted); }
.big-name { font-size: clamp(24px, 5vw, 34px); font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; margin: 16px 0 6px; }
.center { text-align: center; }
[hidden] { display: none !important; }

.error-page { min-height: 100vh; display: flex; flex-direction: column; }
.error-page .top { border-bottom: 0; }
.error { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 20px 72px; text-align: center; }
.error__code { margin: 0; font: 400 clamp(110px, 26vw, 280px)/.9 var(--logo); letter-spacing: -.04em; }
.error__title { margin: 12px 0 0; font-size: clamp(26px, 5vw, 40px); font-weight: 700; }
.error__text { max-width: 520px; margin: 8px 0 0; font-size: 18px; color: #bdbdbd; }
.error__actions { margin-top: 24px; }

@media (max-width: 560px) {
    .logo-img { height: 34px; }
    .card { padding: 18px; } .file__share { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- away: шапка, вкладки, карточки ссылок, QR, статистика */
.mark__badge { width: 40px; height: 40px; flex: none; margin-right: 12px; }
.mark__text { font: 400 34px/1 var(--logo); letter-spacing: -.02em; color: #fff; }
.tabs { display: flex; gap: 8px; margin: 28px 0 8px; flex-wrap: wrap; }
.tab { min-height: 40px; padding: 0 18px; border-radius: var(--radius); border: 2px solid var(--line); background: transparent; color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.tab:hover { border-color: #fff; }
.tab[aria-selected="true"] { background: #fff; color: #000; border-color: #fff; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.form label > input, .form label > select { color: #fff; font-size: 16px; width: 100%; }
.form__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.checks { display: flex; gap: 8px 18px; align-items: center; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; color: #fff; }
.checks input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: #fff; }
input[type=color] { padding: 2px; width: 56px; min-height: 40px; cursor: pointer; }
.lnk { display: grid; gap: 12px; margin: 18px 0; }
.lnk--new { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.lnk__head { display: flex; gap: 8px 16px; align-items: baseline; flex-wrap: wrap; }
.lnk__title { font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.lnk__target { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.lnk__urls { display: grid; gap: 8px; }
.lnk__url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lnk__url .link { flex: 0 1 auto; min-width: 0; }
.lnk__meta { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.lnk__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qr { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.qr__opts { display: grid; gap: 12px; }
.qr__preview { width: 240px; max-width: 100%; aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); background: repeating-conic-gradient(#222 0 25%, #2c2c2c 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; overflow: hidden; }
.qr__preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stat-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 24px 0; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat-card__n { font-size: 32px; font-weight: 700; line-height: 1.1; }
.stat-card__l { color: var(--muted); font-size: 14px; }
.chart { width: 100%; height: auto; display: block; }
.chart__grid { stroke: #2a2a2a; stroke-width: 1; }
.chart__label { fill: var(--muted); font: 11px var(--sans); }
.chart__bar { fill: var(--link); }
.chart__bar:hover { fill: #fff; }
.chart__zero { fill: #2a2a2a; }
.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.donut { width: 180px; height: 180px; flex: none; }
.donut__ring { fill: none; stroke-width: 26; }
.donut__total { fill: #fff; font: 700 26px var(--sans); text-anchor: middle; }
.donut__sub { fill: var(--muted); font: 12px var(--sans); text-anchor: middle; }
.dev-desktop { stroke: #56b6c2; background: #56b6c2; } .dev-mobile { stroke: #7fc87f; background: #7fc87f; }
.dev-tablet { stroke: #c678dd; background: #c678dd; } .dev-bot { stroke: #e5c07b; background: #e5c07b; } .dev-other { stroke: #8b95a1; background: #8b95a1; }
.legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.logbox { margin: 0; padding: 12px; max-height: 520px; overflow: auto; font: 12.5px/1.5 var(--mono); background: #050505; color: #d7dde3; border: 1px solid var(--line); border-radius: var(--radius); white-space: pre; }
.logbox--empty { color: var(--muted); white-space: normal; }
.stats-wrap { max-width: 920px; }
.ansi-bold { font-weight: 700; } .ansi-dim { opacity: .65; } .ansi-underline { text-decoration: underline; }
.ansi-fg-black { color: #6b7682; } .ansi-fg-red { color: #e06c75; } .ansi-fg-green { color: #7fc87f; } .ansi-fg-yellow { color: #e5c07b; }
.ansi-fg-blue { color: #61afef; } .ansi-fg-magenta { color: #c678dd; } .ansi-fg-cyan { color: #56b6c2; } .ansi-fg-white { color: #d7dde3; }
.ansi-fg-bright-black { color: #8b95a1; } .ansi-fg-bright-red { color: #ff7b86; } .ansi-fg-bright-green { color: #98e698; } .ansi-fg-bright-yellow { color: #ffd98a; }
.ansi-fg-bright-blue { color: #82c4ff; } .ansi-fg-bright-magenta { color: #e09bff; } .ansi-fg-bright-cyan { color: #7be0ec; } .ansi-fg-bright-white { color: #fff; }
.ansi-bg-black { background: #2b3138; } .ansi-bg-red { background: #b4414b; } .ansi-bg-green { background: #3f7a3f; } .ansi-bg-yellow { background: #9a7a2c; }
.ansi-bg-blue { background: #2f6aa8; } .ansi-bg-magenta { background: #8a4a9c; } .ansi-bg-cyan { background: #2f808a; } .ansi-bg-white { background: #aab3bc; color: #101418; }
.ansi-bg-bright-black { background: #4a525b; } .ansi-bg-bright-red { background: #d9545f; } .ansi-bg-bright-green { background: #55a355; } .ansi-bg-bright-yellow { background: #c9a23c; }
.ansi-bg-bright-blue { background: #4a8ad0; } .ansi-bg-bright-magenta { background: #ad63c4; } .ansi-bg-bright-cyan { background: #4aa7b3; } .ansi-bg-bright-white { background: #e6ebef; color: #101418; }
@media (max-width: 640px) { .qr { grid-template-columns: 1fr; } .qr__preview { width: 100%; max-width: 280px; } .mark__text { font-size: 28px; } }
