/* HabitHouse content pages (Support, Privacy, Terms, AI and safety). One reading layout,
   shared by every page: a title block, a sticky table of contents on wide screens, and a
   comfortable measure for the text. Same palette and type as the landing page. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #F4EFE3;
  --surface: #FFFFFF;
  --text: #1A1714;
  --body: #3F3831;
  --text-secondary: #6B6256;
  --text-muted: #8A8275;
  --line: rgba(26, 23, 20, 0.12);
  --terra: #C9622D;
  --terra-deep: #A24E24;
  --green: #70B070;
  --purple: #8A5FA5;
  --radius-md: 12px;
  --radius-lg: 16px;
}
html { overflow-x: clip; scroll-padding-top: 24px; }
body {
  font-family: "Inter", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--terra); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra-deep); }

.page { max-width: 1072px; margin: 0 auto; padding: 8px 24px 72px; }

/* ---- title block ---- */
.page__head { max-width: 760px; padding: 24px 0 40px; }
.page__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.page__head h1 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.6px;
  margin-bottom: 18px;
}
.page__lede { font-size: 19px; line-height: 1.55; color: var(--text-secondary); max-width: 640px; }
.page__meta { margin-top: 18px; font-size: 13px; color: var(--text-muted); }

/* ---- body: contents + article ---- */
.page__body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.page__toc { position: sticky; top: 24px; }
.page__toc-label { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.page__toc ol { list-style: none; }
.page__toc li + li { margin-top: 2px; }
.page__toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-secondary);
  text-decoration: none;
}
.page__toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.55); }
.page__toc a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.85); font-weight: 500; }
.page__toc summary { display: none; }

.page__article { max-width: 70ch; color: var(--body); font-size: 17px; }
.page__article > :first-child { margin-top: 0; }
.page__article h2 {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 27px;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--text);
  margin: 52px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.page__article h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.page__article h3 {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
  margin: 30px 0 8px;
}
.page__article p { margin: 0 0 16px; }
.page__article p.intro, .page__article > p:first-of-type { color: var(--text); }
.page__article ul { padding-left: 22px; margin: 0 0 18px; }
.page__article li { margin-bottom: 8px; }
.page__article li::marker { color: var(--text-muted); }
.page__article strong { color: var(--text); font-weight: 600; }
.page__article address { font-style: normal; }
.page__article .contact-email { font-family: "Outfit", sans-serif; font-weight: 600; font-size: 20px; color: var(--terra); }
/* A quiet callout: fill and radius, never a stroke down the side. */
.page__note {
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 8px 0 24px;
}
.page__note p:last-child { margin-bottom: 0; }

/* ---- footer bar, the same arrangement as the landing page ---- */
.page-footer { max-width: 1072px; margin: 0 auto; padding: 0 24px 56px; }
.page-footer__bar {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "links social" "address copyright";
  gap: 26px 32px;
  align-items: start;
  font-size: 14px;
}
.page-footer__links { grid-area: links; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.page-footer__links a { color: var(--text-secondary); text-decoration: none; }
.page-footer__links a:hover { color: var(--text); }
.page-footer__social { grid-area: social; display: flex; gap: 10px; }
.page-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}
.page-footer__social a:hover { background: #FFFFFF; }
.page-footer__social svg { display: block; }
.page-footer__address { grid-area: address; font-style: normal; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.page-footer__copyright { grid-area: copyright; align-self: end; text-align: right; font-size: 13px; color: var(--text-muted); }

@media (max-width: 900px) {
  .page__body { grid-template-columns: 1fr; gap: 28px; }
  .page__toc { position: static; }
  .page__toc details { background: rgba(255, 255, 255, 0.7); border-radius: var(--radius-md); padding: 4px 14px; }
  .page__toc summary { display: block; cursor: pointer; padding: 10px 0; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); list-style: none; }
  .page__toc summary::-webkit-details-marker { display: none; }
  .page__toc-label { display: none; }
  .page__toc ol { padding: 0 0 10px; }
}
@media (max-width: 600px) {
  .page { padding: 0 20px 56px; }
  .page__head { padding: 12px 0 28px; }
  .page__lede { font-size: 17px; }
  .page__article { font-size: 16px; }
  .page__article h2 { font-size: 24px; margin-top: 40px; padding-top: 22px; }
  .page-footer__bar { grid-template-columns: 1fr; grid-template-areas: "links" "social" "address" "copyright"; gap: 20px; }
  .page-footer__copyright { text-align: left; }
}
@media print {
  .site-header, .page__toc, .page-footer__social { display: none; }
  body { background: #fff; }
}
