:root {
  --content-max: 1180px;
  --page-gutter: clamp(1.25rem, 4vw, 4rem);
  --page-bg: #fdfdfd;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --line: #dbe4ef;
  --line-strong: #c9d7e8;
  --ink: #101b36;
  --text: #3d495f;
  --heading: #4f5056;
  --copy: #5e6268;
  --muted: #6c7890;
  --quiet: #98a4b8;
  --link: #164679;
  --logo-blue: #2f96c7;
  --blue-deep: #155a95;
  --shadow: 0 20px 60px rgba(30, 65, 105, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--copy);
  background: var(--page-bg);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #e4ebf4;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(calc(100% - var(--page-gutter) * 2), var(--content-max));
  min-height: 4.5rem;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 8rem;
  min-width: 7.5rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.75rem, 1.7vw, 1.45rem);
  flex-wrap: wrap;
}

.nav-link,
.language-menu {
  color: var(--heading);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: #3f4147;
}

.language-menu {
  position: relative;
}

.language-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  list-style: none;
  cursor: pointer;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 0.24rem solid transparent;
  border-right: 0.24rem solid transparent;
  border-top: 0.32rem solid currentColor;
  opacity: 0.6;
}

.language-options {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 5;
  display: grid;
  min-width: 11rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.language-options a {
  padding: 0.6rem 0.75rem;
  border-radius: 0.45rem;
  color: var(--copy);
  text-decoration: none;
}

.language-options a:hover,
.language-options a[aria-current="true"] {
  background: #f3f7fb;
  color: var(--heading);
}

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(calc(100% - var(--page-gutter) * 2), var(--content-max));
  min-height: calc(100vh - 12rem);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.6rem) 0 clamp(3.5rem, 7vw, 5rem);
}

.login-panel {
  width: min(100%, 30rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.login-panel h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.14;
}

.login-action {
  min-width: 10.5rem;
  min-height: 2.75rem;
  margin-top: 1.85rem;
  padding: 0 1.25rem;
  border: 1px solid #d7e2ef;
  border-radius: 0.7rem;
  background: #eef3f8;
  color: #98a4b8;
  font: inherit;
  font-weight: 600;
  cursor: not-allowed;
}

.legal-page {
  width: min(calc(100% - var(--page-gutter) * 2), 62rem);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.6rem) 0 clamp(3.5rem, 7vw, 5rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  color: var(--heading);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.legal-kicker {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 620;
}

.legal-page h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  line-height: 1.14;
  font-weight: 700;
}

.legal-updated {
  margin: 1rem 0 0;
  color: var(--quiet);
  font-size: 0.96rem;
}

.legal-notice,
.cross-links {
  margin: 2rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.7);
}

.legal-notice p,
.cross-links p {
  margin: 0;
  color: var(--copy);
  line-height: 1.55;
}

.legal-notice p + p,
.cross-links p + p {
  margin-top: 0.55rem;
}

.cross-links a,
.legal-content a {
  color: var(--link);
}

.legal-content {
  margin-top: clamp(2.1rem, 4vw, 3.1rem);
}

.legal-content section + section {
  margin-top: 1.85rem;
}

.legal-content h2 {
  margin: 0 0 0.65rem;
  color: var(--heading);
  font-size: 1.12rem;
  line-height: 1.25;
  font-weight: 700;
}

.legal-content p {
  margin: 0;
  color: var(--copy);
  font-size: 1rem;
  line-height: 1.62;
}

.root-fallback {
  display: grid;
  place-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.root-fallback h1 {
  margin: 0 0 1rem;
  color: var(--heading);
}

.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 3.5rem;
}

.footer-inner {
  display: flex;
  justify-content: flex-end;
  gap: clamp(1.5rem, 4vw, 3.6rem);
  width: min(calc(100% - var(--page-gutter) * 2), var(--content-max));
  margin: 0 auto;
}

.footer-inner a {
  color: var(--heading);
  font-size: 0.98rem;
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .header-inner,
  .login-shell,
  .footer-inner {
    width: min(100% - 1.5rem, var(--content-max));
  }

  .header-inner {
    min-height: 4.4rem;
    padding: 0.75rem 0 0.9rem;
  }

  .brand {
    width: 7.6rem;
  }

  .site-nav {
    justify-content: flex-end;
    gap: 1rem;
  }

  .nav-link,
  .language-menu {
    font-size: 0.92rem;
  }

  .language-options {
    right: auto;
    left: 0;
  }

  .login-panel {
    text-align: center;
  }

  .footer-inner {
    justify-content: flex-start;
  }
}
