:root {
  --bg: #ffffff;
  --bg-elevated: #f4ede3;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #6b1d2a;
  --accent-on: #f4ede3;
  --border: #d2d2d7;
  --link: #6b1d2a;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1917;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #6b1d2a;
    --accent-on: #f4ede3;
    --border: #424245;
    --link: #e2b3b8;
    color-scheme: dark;
  }
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f4ede3;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #6b1d2a;
  --accent-on: #f4ede3;
  --border: #d2d2d7;
  --link: #6b1d2a;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #1c1917;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --accent: #6b1d2a;
  --accent-on: #f4ede3;
  --border: #424245;
  --link: #e2b3b8;
  color-scheme: dark;
}

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

html:not(.i18n-ready) body {
  visibility: hidden;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--link);
}

a:hover {
  text-decoration-thickness: 1px;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-on);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  transform: translateY(-180%);
  z-index: 20;
  padding: 0.4rem 0.7rem;
  background: var(--accent);
  color: var(--accent-on);
  text-decoration: none;
  border-radius: 4px;
}

.skip:focus {
  transform: none;
}

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

.wrap {
  width: min(680px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 4rem;
  height: 4rem;
  border-radius: 22%;
  flex-shrink: 0;
}

.hero-mark {
  display: block;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 0 1.25rem;
  border-radius: 22%;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.05rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.hero {
  padding: 4.25rem 0 4.5rem;
}

h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.05;
}

.origin {
  margin: 0 0 1.35rem;
  max-width: 36em;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.45;
}

.lead {
  margin: 0;
  max-width: 36em;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.45;
}

.hero-actions {
  margin: 1.6rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.95rem;
  border: 0;
  border-radius: 980px;
  background: var(--accent);
  color: var(--accent-on);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.btn:disabled {
  cursor: default;
  opacity: 1;
  color: var(--accent-on);
}

.section {
  padding: 3.5rem 0 4rem;
  border-top: 1px solid var(--border);
}

h2 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.016em;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.features li {
  padding: 1.45rem 0 1.5rem;
  border-top: 1px solid var(--border);
}

.features h3 {
  margin: 0 0 0.28rem;
}

.features p {
  margin: 0;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.75rem;
  }
}

.paper {
  margin: 2.75rem 0 0;
  padding: 2.4rem 1.6rem;
  background: var(--bg-elevated);
  border-radius: 18px;
}

.paper p {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  border-top: 1px solid var(--border);
}

.rows a {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.25rem;
  padding: 1.15rem 1.35rem 1.15rem 0;
  color: var(--text);
  text-decoration: none;
}

.rows a::after {
  content: "›";
  position: absolute;
  right: 0;
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1;
}

.rows a:hover .row-title {
  color: var(--link);
}

.row-title {
  font-weight: 600;
  letter-spacing: -0.016em;
}

.row-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.prose {
  padding: 3.25rem 0 4rem;
}

.prose h1 {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
}

.prose h2 {
  margin: 2.4rem 0 0.7rem;
  font-size: 1.35rem;
}

.prose .lead {
  margin-bottom: 1.75rem;
}

.prose p {
  margin: 0 0 0.95rem;
  color: var(--text-secondary);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  color: var(--text-secondary);
}

.prose li + li {
  margin-top: 0.55rem;
}

.prose a {
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.contact {
  margin: 0 0 2.25rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.contact a {
  color: var(--text);
  text-decoration: none;
}

.contact a:hover {
  color: var(--link);
}

.faq h3 {
  margin: 1.6rem 0 0.3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
}

.faq h3:first-child {
  margin-top: 0;
}

.faq p {
  margin: 0;
}

.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 2.75rem 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.guide-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.guide-nav a:hover,
.guide-nav a[aria-current="page"] {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0 2.8rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--text);
}

.foot-sep {
  margin: 0 0.55rem;
  color: var(--border);
}

.langs {
  position: relative;
  margin: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.lang-toggle:hover,
.langs.is-open .lang-toggle {
  color: var(--text);
}

.lang-caret {
  width: 0.55rem;
  height: 0.4rem;
  flex-shrink: 0;
}

.langs.is-open .lang-caret {
  transform: rotate(180deg);
}

.langs svg:not(.lang-caret) {
  display: block;
  width: 1rem;
  height: 0.75rem;
  border-radius: 1px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  min-width: 9.75rem;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.lang-list a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.81rem;
  line-height: 1;
}

.lang-list a:hover,
.lang-list a[aria-selected="true"] {
  color: var(--text);
}

@media (max-width: 640px) {
  .lang-toggle .lang-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0 5rem;
}

.gate h1 {
  margin-bottom: 1.5rem;
}

.gate a {
  font-size: 1.05rem;
  text-decoration: none;
}

@media (min-width: 720px) {
  .hero {
    padding: 5.75rem 0 5.5rem;
  }

  .paper {
    padding: 3rem 2.4rem;
  }
}

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