:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2233;
  --muted: #5d6680;
  --line: #e3e6ef;
  --accent: #2f6fed;
  --accent-ink: #ffffff;
  --accent-soft: #e8efff;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --surface: #171c2c;
    --text: #e7eaf3;
    --muted: #9aa3bb;
    --line: #273049;
    --accent: #5b8cff;
    --accent-soft: #1d2a4d;
    --danger: #ff8a80;
    --danger-soft: #3a1d1d;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); border-radius: 8px; background-color: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; padding: 7px 30px 7px 10px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235d6680' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px 7px;
}
.lang:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 8px 14px; font-size: 15px; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn[disabled] { opacity: .65; cursor: progress; }

main { flex: 1; }
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.02em; }
.hero p.lead { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.dropzone {
  margin: 44px auto 0; max-width: 640px; padding: 34px 24px; border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.dropzone svg { width: 40px; height: 40px; color: var(--accent); }
.dropzone strong { display: block; color: var(--text); margin: 8px 0 4px; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 8px 0 64px; }
.page-head { text-align: center; padding: 56px 0 32px; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 10px; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 12px 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.icon svg { width: 22px; height: 22px; }

section.plans { padding: 8px 0 64px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { display: flex; flex-direction: column; }
.plan ul { flex: 1; }
.plan .btn { width: 100%; }
.plan .price { font-size: 30px; font-weight: 700; margin: 8px 0; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan ul { padding-left: 18px; color: var(--muted); margin: 12px 0 18px; }
.plan.featured { border-color: var(--accent); }

.auth { display: grid; place-items: center; padding: 56px 20px; }
.auth .card { width: 100%; max-width: 420px; padding: 30px; }
.auth h1 { font-size: 24px; margin: 0 0 6px; }
.auth p.sub { margin: 0 0 22px; color: var(--muted); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
.field input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 6px 0 18px; }
.auth .btn { width: 100%; }
.auth .alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.alert {
  display: none; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px;
  background: var(--danger-soft); color: var(--danger); border: 1px solid currentColor;
}
.alert.show { display: block; }
.alert strong { display: block; margin-bottom: 2px; }
.alert .ref { display: block; margin-top: 6px; opacity: .8; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.auth .card p + p { margin-top: 12px; }
.auth .card h1 + p { margin-top: 14px; }
.card p.support-mail { font-size: 20px; font-weight: 600; margin: 16px 0; }
.notfound { text-align: center; padding: 96px 20px; }
.notfound .code { font-size: 72px; font-weight: 800; color: var(--accent); margin: 0; }

footer.bottom { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 22px 20px; }
footer.bottom .links { margin-left: auto; display: flex; gap: 18px; }

@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  nav.main a.link { display: none; }
  footer.bottom .links { margin-left: 0; }
}
