:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #111111;
  background: #ffffff;
  --navy: #16345b;
  --slate: #eef2f7;
}

* { box-sizing: border-box; }
body { margin: 0; }

.home {
  min-height: 100svh;
}

.shell {
  width: min(68rem, calc(100% - 3rem));
  margin-inline: auto;
}

header { padding-block: 1.5rem; }
a { color: var(--navy); text-underline-offset: 0.2em; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(1.5rem, 5vw, 3.5rem);
}

h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

p {
  max-width: 34ch;
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 1.65vw, 1.3rem);
  line-height: 1.55;
}

.guide-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 1rem;
  color: #ffffff;
  background: var(--navy);
  font-weight: 650;
  text-decoration: none;
}

.guide-button:hover { text-decoration: underline; }

.crowd {
  display: block;
  width: 100%;
  height: auto;
  background: var(--slate);
  border-radius: clamp(1.5rem, 4vw, 2.75rem);
}

.home-section {
  padding-block: clamp(1.6rem, 4vw, 2.75rem);
  border-top: 1px solid var(--slate);
}

.home-section h2 {
  margin: 0 0 1rem;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.025em;
}

.habit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.habit-grid h3 { margin: 0; font-size: 1.125rem; }
.habit-grid p { margin-top: 0.4rem; font-size: 1rem; }

.home-guide-links, .guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-guide-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  line-height: 1.35;
}

footer {
  border-top: 1px solid var(--slate);
  padding-block: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

nav a, .document a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.document {
  max-width: 44rem;
  padding-block: 2.25rem;
}

.document h1 { max-width: none; font-size: clamp(2rem, 5vw, 3rem); }
.document p { max-width: 54ch; }
.document h2 { margin: 2rem 0 0.6rem; color: var(--navy); font-size: 1.35rem; }
.document h2 + p, .guide-list p { margin-top: 0; }
.document article li { margin-block: 0.55rem; line-height: 1.55; }
.document aside { margin-top: 2rem; border-top: 1px solid var(--slate); padding-top: 0.75rem; }
.guide-list h2 { margin-top: 1.45rem; }

.invite-code {
  width: fit-content;
  max-width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--slate);
}

.invite-code h2 { margin: 0 0 0.5rem; }

.invite-code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.invite-code code { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.05em; }

.invite-copy {
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--navy);
  border-radius: 0.75rem;
  background: white;
  color: var(--navy);
  font: inherit;
  font-weight: 650;
}

.invite-page a.guide-button { display: inline-flex; }

@media (max-width: 45rem) {
  .hero { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .crowd { width: min(100%, 20rem); }
  .habit-grid { grid-template-columns: minmax(0, 1fr); }
}
