/* Top 1% Habits: shared styles for the website. No external fonts, scripts or trackers. */

:root {
  --paper: #FAF7F0;
  --ink: #1A1A1A;
  --green: #2E9E5B;
  --green-dark: #1F7A44;   /* hover only */
  --muted: #5B5850;
  --rule: #E3DED2;
  --card: #FFFEFA;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Links */
a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--green-dark); }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header and footer */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}
.brand {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.pct { color: var(--green); }
.site-nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.95rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0.25rem 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin-bottom: 0.5rem; }

/* Text */
main { padding-bottom: 1rem; }

h1 {
  margin: 2rem 0 0.5rem;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 {
  margin: 2.4rem 0 0.4rem;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h3 {
  margin: 1.8rem 0 0.25rem;
  font-size: 1.08rem;
  line-height: 1.35;
}
p { margin: 0.6rem 0; }
ul, ol { margin: 0.6rem 0; padding-left: 1.3rem; }
li { margin: 0.35rem 0; }
strong { font-weight: 700; }

.lead { font-size: 1.15rem; margin: 0.4rem 0 1rem; }
.meta {
  display: inline-block;
  margin: 0.25rem 0 0.75rem;
  padding: 0.15rem 0.7rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Callout box */
.box {
  margin: 1.25rem 0;
  padding: 0.9rem 1.25rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--green);
}
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.box h2 { margin-top: 0; font-size: 1.15rem; }

/* Table (plans) */
.table-wrap { margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.6rem 0.5rem 0.6rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font-size: 0.85rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--ink); }

/* Button */
.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--green);
}
.btn.soon { cursor: default; }
.btn.soon:hover { color: inherit; transform: none; box-shadow: inherit; }
.btn:hover { color: var(--paper); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--green); }

/* Landing page: one screen */
body.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.hero {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1.25rem;
}
.hero h1 { margin: 0; font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1.05; }
.hero .sub {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.hero .tagline { margin: 1.5rem 0 1.75rem; font-size: 1.3rem; line-height: 1.4; max-width: 28rem; }
.hero .cta-note { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.9rem; }
.home .site-footer { margin-top: 0; }

/* Support page */
.jump { margin: 0.6rem 0 0; }
.faq h3 { margin-top: 2rem; }

@media (max-width: 30rem) {
  h1 { font-size: 1.8rem; }
}
