:root {
  --bg: #072033;
  --bg-2: #0b3a58;
  --text: #f3f8fc;
  --muted: #9ec4dc;
  --line: rgba(186, 230, 253, 0.28);
  --glass: rgba(186, 230, 253, 0.1);
  --glass-2: rgba(224, 242, 254, 0.16);
  --azure: #38bdf8;
  --azure-2: #7dd3fc;
  --cta: #38bdf8;
  --cta-ink: #072033;
  --hover: rgba(56, 189, 248, 0.14);
  --shadow: 0 20px 40px -20px rgba(2, 40, 72, 0.55);
  --ring: #38bdf8;
}

[data-theme="light"] {
  --bg: #eaf5fd;
  --bg-2: #cfe8fa;
  --text: #0a3656;
  --muted: #215a7d;
  --line: rgba(2, 99, 163, 0.18);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(255, 255, 255, 0.78);
  --azure: #0278bd;
  --azure-2: #0369a1;
  --cta: #0278bd;
  --cta-ink: #f7fbff;
  --hover: rgba(2, 120, 189, 0.1);
  --shadow: 0 16px 32px -18px rgba(14, 116, 176, 0.28);
  --ring: #0278bd;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
h1, h2, p { margin: 0; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(56, 189, 248, 0.28), transparent 60%),
    radial-gradient(720px 480px at 92% 8%, rgba(14, 165, 233, 0.22), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 48%, var(--bg) 100%);
}

[data-theme="light"] .bg {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(720px 480px at 92% 8%, rgba(125, 211, 252, 0.35), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 48%, var(--bg) 100%);
}

.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

.site-header, main, footer { position: relative; z-index: 1; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 16px 0;
}

.glass {
  background: linear-gradient(165deg, var(--glass-2), var(--glass));
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: Outfit, "Source Sans 3", sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0369a1);
}

.mark svg { display: block; width: 32px; height: 32px; padding: 7px; }

.tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover { background: var(--hover); border-color: var(--azure); transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.97); }

.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .icon-sun, [data-theme="dark"] .icon-moon { display: none; }

main { flex: 1; display: flex; align-items: center; padding: 24px 0 48px; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 700; }

.card {
  width: min(560px, 100%);
  margin-inline: auto;
  padding: 40px 32px 32px;
  border-radius: 28px;
}

.horizon {
  display: block;
  width: 100%;
  height: 56px;
  margin-bottom: 24px;
  color: var(--azure);
}

.horizon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 1.4s cubic-bezier(0.22, 0.8, 0.3, 1) 0.15s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

h1 {
  font-family: Outfit, "Source Sans 3", sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 8vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.lede {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}

.card-note {
  margin-top: 12px;
  color: var(--azure-2);
  font-family: Outfit, "Source Sans 3", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.links { display: grid; gap: 12px; margin-top: 32px; }

.btn {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 20px 12px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover { background: var(--hover); border-color: var(--azure); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15); }
.btn:active { transform: scale(0.985); }

.btn.primary { background: var(--cta); color: var(--cta-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); background: var(--cta); box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25); }

.btn .ico {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--azure);
  background: var(--hover);
}

.btn.primary .ico { color: var(--cta-ink); background: rgba(7, 32, 51, 0.14); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.btn strong { font-family: Outfit, "Source Sans 3", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.25; }
.btn small { font-size: 14px; opacity: 0.8; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn:not(.primary) small { color: var(--muted); opacity: 1; }

.btn .go { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }

footer { padding: 0 0 32px; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 560px); }
  .site-header { padding: 10px 0; }
  .nav { min-height: 56px; padding: 6px 6px 6px 12px; gap: 10px; }
  .logo { gap: 7px; font-size: 15px; }
  .mark, .mark svg { width: 30px; height: 30px; }
  .tools { gap: 6px; }
  .icon-btn { min-width: 44px; height: 44px; padding: 0 10px; }
  main { display: block; padding: 12px 0 28px; }
  .breadcrumbs { margin-bottom: 12px; padding: 7px 14px; }
  .card { width: 100%; padding: 26px 22px 22px; border-radius: 24px; }
  .horizon { height: 42px; margin-bottom: 14px; }
  h1 { font-size: clamp(30px, 8.5vw, 40px); }
  .lede { margin-top: 12px; font-size: 16px; line-height: 1.55; }
  .card-note { margin-top: 10px; font-size: 14px; }
  .links { gap: 10px; margin-top: 22px; }
  .btn { min-height: 64px; gap: 12px; padding: 9px 14px 9px 12px; border-radius: 18px; }
  .btn .ico { width: 40px; height: 40px; border-radius: 12px; }
  .btn strong { font-size: 16px; }
  .btn small { font-size: 12px; }
  footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .shell { width: calc(100% - 20px); }
  .card { padding: 22px 16px 18px; border-radius: 20px; }
  .btn { gap: 10px; padding-inline: 10px; }
  .btn .go { width: 18px; }
  .btn strong { font-size: 15px; }
  .btn small { font-size: 11px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  main { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .horizon path { stroke-dashoffset: 0; }
}
