:root {
  color-scheme: light;
  --bg: #f2f5f9;
  --panel: #ffffff;
  --field: #f8fafd;
  --text: #172235;
  --muted: #657386;
  --border: #d6dee8;
  --accent: #0b5bd3;
  --accent-soft: #e8f1ff;
  --danger: #df3f48;
  --success: #187c45;
  --shadow: #14243a20;
  --header-height: 68px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 280px; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", system-ui, sans-serif; font-size: 16px; line-height: 1.6; overflow-x: hidden; }
button { font: inherit; }
a { color: var(--accent); }
code { padding: 2px 5px; border-radius: 5px; background: var(--accent-soft); font-family: Consolas, monospace; overflow-wrap: anywhere; }
.wrap { width: min(1080px, calc(100% - 36px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid transparent; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-height); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; font-weight: 700; text-decoration: none; }
.logo img { width: 34px; height: 34px; object-fit: contain; }
.nav { display: flex; flex: 1; justify-content: flex-end; gap: 21px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.menu-toggle { display: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--panel); color: var(--text); cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr); align-items: center; gap: 46px; padding: 70px 0 60px; }
.eyebrow { color: var(--accent); font-weight: 650; }
.hero h1 { margin: 10px 0 18px; font-size: clamp(34px, 3.7vw, 46px); line-height: 1; letter-spacing: -1.5px; }
.hero h1 span { display: block; }
.lead { margin: 0; color: var(--muted); font-size: 20px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 32px; }
.download-group { display: grid; justify-items: center; width: 210px; }
.download-group .button { width: 100%; }
.meta { margin: 5px 0 0; color: var(--muted); font-size: 14px; text-align: center; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 19px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font-weight: 650; text-align: center; text-decoration: none; }
.button:hover { filter: brightness(.96); }
.button.secondary { border-color: var(--border); background: transparent; color: var(--text); }
.button.secondary:hover { border-color: var(--accent); }

.app-window { color-scheme: light; --accent: #0b5bd3; --muted: #657386; --danger: #df3f48; --success: #187c45; zoom: .86; overflow: hidden; border: 1px solid #cdd7e5; border-radius: 14px; background: #f7f9fc; color: #172235; box-shadow: 0 22px 50px var(--shadow); font-size: 12px; }
.window-bar { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 0 12px 0 16px; background: #eef1f5; color: #38465b; }
.window-buttons { letter-spacing: 2px; }
.window-body { padding: 18px 20px 16px; }
.window-body h2 { margin: 0; color: var(--accent); font-size: 21px; }
.window-subtitle { margin: 0 0 14px; color: var(--muted); }
.window-body label { color: var(--accent); font-weight: 700; }
.control-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; margin: 7px 0; }
.field { display: flex; align-items: center; justify-content: space-between; min-width: 0; height: 34px; padding: 0 10px; overflow: hidden; border: 1px solid #d8e0ec; border-radius: 7px; background: #fff; white-space: nowrap; text-overflow: ellipsis; }
.field.path { display: block; line-height: 34px; font-size: 10px; }
.field.muted { justify-content: flex-start; color: #8b97a8; }
.mini-button { display: grid; place-items: center; min-height: 34px; padding: 0 10px; border-radius: 7px; background: #e1e8f2; color: #24324a; font-weight: 700; }
.mini-button.primary { background: var(--accent); color: #fff; }
.mini-button.danger { margin-left: auto; background: var(--danger); color: #fff; }
.mini-button.save { background: var(--success); color: #fff; }
.list-title { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; }
.list-title span { color: var(--muted); }
.server-list { height: 126px; margin: 6px 0 8px; overflow: hidden; border: 1px solid #d8e0ec; border-radius: 7px; background: #fff; }
.server-list div { height: 34px; padding: 7px 10px; border-bottom: 1px solid #edf1f6; font-size: 11px; }
.server-list .selected { background: #dbe9fc; }
.move-row { display: grid; grid-template-columns: 86px 86px 1fr; gap: 8px; }
.window-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #d8e0ec; color: var(--muted); }

section { padding: 38px 0; scroll-margin-top: calc(var(--header-height) + 20px); }
h1, h2, h3 { line-height: 1.2; }
h2 { margin: 0 0 20px; font-size: 30px; letter-spacing: -.5px; }
h3 { margin: 0 0 8px; font-size: 18px; }
p { margin: 0 0 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.steps { counter-reset: step; }
.step { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; padding: 10px 0; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
footer { display: flex; justify-content: space-between; gap: 24px; padding-top: 30px; padding-bottom: 45px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 17px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
.back-to-top { position: fixed; right: 24px; bottom: 24px; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 8px 24px var(--shadow); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top svg { width: 22px; height: 22px; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 38px; padding-top: 50px; }
  .hero-copy { max-width: 760px; }
  .app-window { width: min(100%, 680px); zoom: 1; }
}
@media (max-width: 760px) {
  .menu-toggle { display: grid; }
  .nav { position: absolute; top: calc(var(--header-height) - 4px); right: 18px; display: none; flex: none; width: min(250px, calc(100% - 36px)); min-height: 0; padding: 6px; gap: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); box-shadow: 0 14px 36px var(--shadow); }
  .nav.is-open { display: grid; align-content: start; grid-auto-rows: min-content; }
  .nav a { padding: 10px 12px; font-size: 16px; line-height: 1.25; }
  .grid, .info { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(32px, 8vw, 42px); }
}
@media (max-width: 540px) {
  .wrap { width: min(100% - 24px, 1080px); }
  .logo span { max-width: 205px; font-size: 14px; line-height: 1.15; }
  .hero { padding-top: 34px; }
  .lead { font-size: 18px; }
  .hero-actions, .feedback-actions { display: grid; grid-template-columns: 1fr; }
  .download-group { width: 100%; }
  .button { width: 100%; }
  .window-body { padding: 15px 12px; }
  .control-row { grid-template-columns: minmax(0, 1fr) 80px; }
  .path { font-size: 9px !important; }
  .move-row { grid-template-columns: 1fr 1fr 1fr; }
  .mini-button { padding-inline: 6px; font-size: 10px; }
  .window-footer { align-items: stretch; flex-direction: column; }
  footer { flex-direction: column; }
  footer nav { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #181b20; --panel: #20242b; --field: #262b33; --text: #edf2f8; --muted: #aab5c3; --border: #343b46; --accent: #58a6ff; --accent-soft: #17314d; --shadow: #0000004a; }
}
