:root {
  color-scheme: light;
  --ink: #191a24;
  --ink-soft: #303243;
  --muted: #64687a;
  --paper: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f1fb;
  --accent: #5b5ce2;
  --accent-strong: #4645c6;
  --accent-soft: #ececff;
  --mint: #0a9674;
  --mint-soft: #e7f7f2;
  --line: rgba(25, 26, 36, 0.055);
  --line-strong: rgba(25, 26, 36, 0.1);
  --shadow: 0 30px 84px rgba(38, 40, 78, 0.12), 0 8px 24px rgba(38, 40, 78, 0.055);
  --shadow-soft: 0 16px 42px rgba(38, 40, 78, 0.085);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --max: 960px;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 7%, rgba(91, 92, 226, 0.12), transparent 24%),
    radial-gradient(circle at 90% 11%, rgba(10, 150, 116, 0.08), transparent 18%),
    linear-gradient(180deg, #f8f8fc 0%, var(--paper) 32%, #f1f2f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: -0.012em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 760px;
  opacity: 0.42;
  background-image: radial-gradient(circle, rgba(68, 69, 100, 0.15) 1px, transparent 1.15px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #fff, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, #fff, transparent 92%);
  pointer-events: none;
}

::selection {
  color: var(--ink);
  background: rgba(91, 92, 226, 0.18);
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px rgba(91, 92, 226, 0.72);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #fbfbff;
  background: var(--accent-strong);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 0;
  pointer-events: none;
}

.nav {
  width: min(100% - 32px, var(--max));
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 10px 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 48px rgba(38, 40, 78, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  pointer-events: auto;
}

.nav-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.brand,
.back {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}

.brand {
  gap: 11px;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.brand:hover,
.brand:focus-visible {
  opacity: 0.82;
  transform: translateY(-1px);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(91, 92, 226, 0.18);
}

.brand span {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.back {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 13px;
  transition: background 0.2s ease-out, transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.back::before {
  content: "←";
  margin-right: 7px;
  font-size: 15px;
  transition: transform 0.2s ease-out;
}

.back:hover,
.back:focus-visible {
  background: #e2e3ff;
  box-shadow: 0 12px 26px rgba(70, 69, 198, 0.12);
  transform: translateY(-1px);
}

.back:hover::before,
.back:focus-visible::before {
  transform: translateX(-2px);
}

.locale-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.locale-switch[open] {
  z-index: 40;
}

.locale-trigger {
  min-width: 128px;
  min-height: 42px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: rgba(246, 247, 251, 0.86);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease-out, background 0.2s ease-out, transform 0.2s ease-out;
}

.locale-trigger::-webkit-details-marker {
  display: none;
}

.locale-trigger::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--muted);
  background:
    linear-gradient(var(--muted), var(--muted)) 50% 0 / 1.5px 100% no-repeat,
    linear-gradient(var(--muted), var(--muted)) 0 50% / 100% 1.5px no-repeat;
  opacity: 0.72;
}

.locale-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease-out;
}

.locale-trigger:hover,
.locale-trigger:focus-visible,
.locale-switch[open] .locale-trigger {
  color: var(--accent-strong);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.locale-switch[open] .locale-trigger::after {
  transform: translateY(2px) rotate(225deg);
}

.locale-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 184px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(38, 40, 78, 0.18), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

.locale-option {
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease-out, background 0.2s ease-out;
}

.locale-option:hover,
.locale-option:focus-visible {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.locale-option[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.locale-option[aria-current="page"]::after {
  content: "";
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

main {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.hero {
  position: relative;
  min-height: 322px;
  margin-bottom: 32px;
  padding-right: 256px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 190px;
  height: 190px;
  border-radius: 56px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.84), transparent 28%),
    linear-gradient(145deg, rgba(91, 92, 226, 0.2), rgba(10, 150, 116, 0.15));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 28px 70px rgba(70, 69, 198, 0.13);
  transform: rotate(-7deg);
}

.hero::after {
  content: "";
  position: absolute;
  top: 65px;
  right: 70px;
  width: 54px;
  height: 92px;
  border-right: 15px solid rgba(70, 69, 198, 0.78);
  border-bottom: 15px solid rgba(70, 69, 198, 0.78);
  transform: rotate(45deg);
}

.eyebrow {
  min-height: 34px;
  width: fit-content;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(38, 40, 78, 0.07), inset 0 0 0 1px rgba(91, 92, 226, 0.1);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.04em;
}

h1 {
  margin: 22px 0 0;
  font-size: clamp(48px, 6vw, 62px);
  line-height: 1.02;
  font-weight: 820;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.heading-line {
  display: block;
  max-width: 100%;
}

.heading-line:first-child {
  color: var(--accent-strong);
  background: linear-gradient(100deg, var(--ink) 4%, #30358f 48%, var(--accent) 76%, #2389b5 108%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.76;
  overflow-wrap: anywhere;
}

.meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  min-height: 36px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(38, 40, 78, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.1);
}

.pill:nth-child(2)::before {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(10, 150, 116, 0.1);
}

.pill:nth-child(3)::before {
  background: #c97918;
  box-shadow: 0 0 0 4px rgba(201, 121, 24, 0.1);
}

.doc {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.doc section {
  position: relative;
  padding: 36px 40px;
}

.doc section + section {
  box-shadow: inset 0 1px 0 var(--line);
}

.doc h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 780;
  letter-spacing: -0.035em;
}

.doc p,
.doc li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.84;
  overflow-wrap: anywhere;
}

.doc p {
  margin: 12px 0 0;
}

.doc ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.doc a {
  color: var(--accent-strong);
  font-weight: 660;
  text-decoration-color: rgba(70, 69, 198, 0.34);
  text-underline-offset: 3px;
  transition: color 0.2s ease-out, text-decoration-color 0.2s ease-out;
}

.doc a:hover,
.doc a:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.summary {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 0%, rgba(10, 150, 116, 0.1), transparent 32%),
    linear-gradient(145deg, var(--mint-soft), rgba(255, 255, 255, 0.96) 68%);
}

.summary::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(to bottom, var(--mint), var(--accent));
}

.footer {
  color: #f5f5fb;
  background:
    radial-gradient(circle at 82% 0%, rgba(91, 92, 226, 0.22), transparent 28%),
    #20212c;
}

.footer-inner {
  width: min(100% - 40px, var(--max));
  min-height: 104px;
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(245, 245, 251, 0.64);
  font-size: 13px;
}

.footer a {
  color: #f5f5fb;
  text-decoration: none;
  opacity: 0.74;
  transition: opacity 0.2s ease-out, color 0.2s ease-out;
}

.footer a:hover,
.footer a:focus-visible,
.footer a[aria-current="page"] {
  color: #ffffff;
  opacity: 1;
}

@media (max-width: 760px) {
  .header {
    padding: 8px 0;
  }

  .nav,
  main,
  .footer-inner {
    width: min(100% - 24px, var(--max));
  }

  .nav {
    min-height: 56px;
    padding: 7px 8px;
    border-radius: 18px;
  }

  .brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand span {
    display: none;
  }

  .locale-trigger {
    min-width: 104px;
    min-height: 42px;
    padding: 8px 10px;
    gap: 6px;
    font-size: 12px;
  }

  .back {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 12px;
  }

  main {
    padding: 56px 0 72px;
  }

  .hero {
    min-height: 0;
    margin-bottom: 28px;
    padding-right: 0;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  h1 {
    font-size: clamp(40px, 12vw, 52px);
  }

  .lead {
    font-size: 16px;
    line-height: 1.74;
  }

  .meta {
    gap: 8px;
  }

  .pill {
    width: 100%;
  }

  .doc {
    border-radius: var(--radius-lg);
  }

  .doc section {
    padding: 28px 24px;
  }

  .doc h2 {
    font-size: 21px;
  }

  .doc p,
  .doc li {
    font-size: 15px;
    line-height: 1.78;
  }

  .summary::before {
    top: 20px;
    bottom: 20px;
  }

  .footer-inner {
    min-height: 0;
    padding: 40px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 390px) {
  .locale-trigger {
    width: 42px;
    min-width: 42px;
    justify-content: center;
  }

  .locale-trigger::after {
    display: none;
  }

  .locale-current {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
