:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f4f5f7;
  --surface-strong: #e8f5ec;
  --border: #e2e4e8;
  --text: #111318;
  --muted: #5f6672;
  --accent: #1f7a3b;
  --accent-hover: #196c34;
  --accent-ink: #ffffff;
  --shadow: 0 18px 50px rgba(17, 19, 24, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0d1117;
    --surface: #161b22;
    --surface-strong: #14281b;
    --border: #2d333b;
    --text: #e6edf3;
    --muted: #9aa4b2;
    --accent: #39d353;
    --accent-hover: #56df6c;
    --accent-ink: #07150a;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--background);
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

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

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

.nav,
.page-shell,
.footer-inner {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 5px 16px rgba(45, 164, 78, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

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

.hero {
  padding: clamp(64px, 10vw, 116px) 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: center;
  gap: clamp(44px, 8vw, 88px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(48px, 8vw, 78px);
}

.lede {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.5vw, 21px);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.habit-pattern {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 14px;
  justify-content: center;
  padding: 46px 34px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.habit-pattern span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--background);
}

.habit-pattern span:nth-child(3n + 1),
.habit-pattern span:nth-child(7),
.habit-pattern span:nth-child(13),
.habit-pattern span:nth-child(19) {
  border-color: var(--accent);
  background: var(--accent);
}

.habit-pattern span:nth-child(4n) {
  border-color: var(--accent);
  background: var(--surface-strong);
}

.features {
  padding: 0 0 88px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.card h2,
.card h3 {
  margin-bottom: 10px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.page-main {
  padding: clamp(48px, 8vw, 80px) 0 88px;
}

.page-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.page-heading h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 6vw, 58px);
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.language-links a {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.article {
  max-width: 760px;
}

.article section + section {
  margin-top: 42px;
}

.article section[id] {
  scroll-margin-top: 96px;
}

.article h2 {
  margin-bottom: 14px;
  font-size: 27px;
}

.article h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.article p,
.article ul {
  margin-top: 0;
  margin-bottom: 16px;
}

.article ul {
  padding-left: 24px;
}

.article li + li {
  margin-top: 8px;
}

.article-divider {
  height: 1px;
  margin: 64px 0;
  border: 0;
  background: var(--border);
}

.notice {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--surface-strong);
}

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

.support-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 760px;
  margin-bottom: 48px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.support-cta h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.support-cta p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.not-found img {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.not-found h1,
.not-found p {
  margin: 0;
}

.not-found .button {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .nav,
  .page-shell,
  .footer-inner {
    width: min(100% - 28px, 960px);
  }

  .nav {
    min-height: 64px;
  }

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

  .nav-links {
    gap: 14px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .habit-pattern {
    width: min(100%, 360px);
    margin-inline: auto;
    transform: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .support-cta,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    justify-content: center;
    padding: 26px 0;
  }
}

@media (max-width: 420px) {
  .nav-links li:first-child {
    display: none;
  }

  .hero h1 {
    font-size: 46px;
  }

  .habit-pattern {
    grid-template-columns: repeat(5, 30px);
    gap: 11px;
    padding: 36px 20px;
  }

  .habit-pattern span {
    width: 30px;
    height: 30px;
  }
}

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

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