@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  --bg: #f6f6f4;
  --fg: #1b1b1a;
  --muted: #74746f;
  --field: #ffffff;
  --border: #d6d6d0;
  --accent: #2f5bd3;
  --accent-fg: #ffffff;
  --ok: #1d7a46;
  --err: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --fg: #ececea;
    --muted: #9a9a94;
    --field: #1e1e1d;
    --border: #3a3a37;
    --accent: #7a9cff;
    --accent-fg: #0d0d0c;
    --ok: #5fc58a;
    --err: #ff8a80;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
input, button { font-family: inherit; }
input::placeholder { font-family: inherit; color: var(--muted); opacity: 1; }
.logo {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.center {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}
.row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: min(820px, 100%);
}
.row input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--fg);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}
.row input:focus { border-color: var(--accent); }
#url { flex: 3; }
#short { flex: 2; cursor: pointer; }
#short:placeholder-shown { cursor: default; }
#short.copied { border-color: var(--ok); }
.row button {
  flex: none;
  width: 52px;
  height: 48px;
  font-size: 22px;
  color: var(--accent-fg);
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.row button:disabled { opacity: .5; cursor: wait; }
.msg { min-height: 1.4em; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.msg a { color: var(--accent); }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 560px) {
  .row { flex-direction: column; }
  .row button { width: 100%; }
}

/* honeypot: невидимо для людей, видно ботам, разбирающим DOM */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* страница-предупреждение перед переходом */
.card {
  width: min(560px, 100%);
  padding: 28px 24px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.card .lead { margin: 0; color: var(--muted); font-size: 14px; }
.card .dest { margin: 6px 0 4px; font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.card .full { margin: 0 0 20px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  color: var(--accent-fg);
  background: var(--accent);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
