/* TWON.org Charter — standalone stylesheet */
:root {
  --bg: #fbfbfa;
  --paper: #ffffff;
  --text: #1d2d35;
  --muted: #5f6b73;
  --border: #e6e4e1;
  --link: #1d2d35;
  --pill: #1d2d35;
  --pillText: #ffffff;

  --sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --serif: Georgia, "Times New Roman", serif;

  --radius: 18px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover {
  opacity: 0.9;
}

.page {
  max-width: 1260px;
  margin: 0 auto;
  padding: 44px 36px 80px;
}

.layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 76px;
  align-items: start;
}

/* Intro (left) */
.intro {
  position: sticky;
  top: 24px;
  align-self: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pillText);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow);
}
.pill svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.kicker {
  margin: 32px 0 0;
  font-family: var(--sans);
  letter-spacing: 0.15em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 4px 0 12px;
  font-size: 82px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text);
}

.meta {
  margin: 12px 0 0;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 14px;
  opacity: 0.8;
}

/* Content (right) */
.content {
  background: transparent;
  padding-top: 24px;
}

.section {
  padding: 36px 0 8px;
  border-top: 1px solid var(--border);
}
.section:first-child {
  border-top: none;
  padding-top: 0;
}

.section__title {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section p {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.65;
}

/* Standardized Sub-headers */
.section h3 {
  margin: 36px 0 10px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
}

/* Small Caps Fell Swoop for Waymarks and Acts */
#the-waymarks-of-now h3 + p,
#the-acts-of-now h3 + p {
  font-family: var(--sans);
  font-variant: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 12px;
}

/* Refined Words of Return Styling */

/* The Primary Phrase: Tightened and Aligned */
.return-statement {
  margin: 32px 0; /* Reduced from 48px to settle closer to the text */
  padding: 8px 0 8px 24px; /* Reduced indent from 40px to 24px for a tighter lock */
  border-left: 2px solid var(--text);
  font-style: italic; /* Matching the visual in your screenshot */
  line-height: 1.6;
}

.words-of-return-lead {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 44px;
  margin: 0 !important;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* The Practice: Script-style / Liturgical */
.communal-practice {
  margin: 50px 0;
  padding-left: 40px;
}

.practice-group {
  margin-bottom: 32px;
  font-size: 24px;
  line-height: 1.4;
}

.practice-group .call {
  display: block;
  color: var(--muted);
  font-style: italic;
  font-size: 20px;
}

.practice-group .response {
  display: block;
  font-weight: 800;
  padding-left: 20px; /* Stagger the response */
  color: var(--text);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

/* Drawer menu */
.drawerOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 40;
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(520px, 90vw);
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 22px 26px;
  overflow: auto;
  transform: translateX(-102%);
  transition: transform 0.18s ease;
  z-index: 50;
}
.drawer.open {
  transform: translateX(0);
}
.drawerOverlay.open {
  display: block;
}

.drawer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.drawer__close {
  border: none;
  background: var(--pill);
  color: var(--pillText);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 6px;
}

.drawer__close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.drawer__bookTitle {
  margin: 0 0 4px;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.drawer__subtitle {
  margin: 0 0 24px;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.toc {
  padding: 6px 0 0;
}
.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc__item {
  margin: 16px 0;
}

.toc__link {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  text-decoration: underline;
}

.toc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toc__toggle {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(29, 45, 53, 0.2);
  background: transparent;
  cursor: pointer;
}

.toc__toggle::before {
  content: "▾";
  display: block;
  font-size: 18px;
  line-height: 34px;
  text-align: center;
}

.toc__toggle[aria-expanded="false"]::before {
  content: "▸";
}

.toc__subs {
  list-style: none;
  padding: 10px 0 0 18px;
  margin: 0;
}
.toc__sub {
  margin: 8px 0;
}
.toc__sub a {
  font-family: var(--serif);
  font-size: 18px;
}

.page-footer {
  margin-top: 80px;
  padding-bottom: 60px;
}

.page-footer__line {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  color: var(--muted);
}

.page-footer__line strong {
  color: var(--text);
}

.page-footer__fine {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

/* Final Governance & Records Layout */
.governance-layout {
  display: block !important;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative; /* Ensures a stable stacking context */
}

.governance-layout .intro {
  position: relative !important; /* This stops it from floating over the text */
  width: 100% !important;
  float: none !important;
  border: none !important;
  margin-bottom: 60px !important;
  padding: 0 !important;
  z-index: 1;
}

.governance-layout .content {
  position: relative !important;
  width: 100% !important;
  float: none !important;
  z-index: 1;
}

/* Responsive */
@media (max-width: 980px) {
  #openDrawer {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    left: auto !important;
    width: 60px !important;
    height: 60px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background: rgba(29, 45, 53, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 35;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  #openDrawer span {
    display: none !important;
  }

  #openDrawer svg {
    width: 26px;
    height: 26px;
    margin: 0;
  }

  .page {
    padding: 22px 18px 70px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .intro {
    position: static;
  }
  .title {
    font-size: 54px;
  }
  .section p {
    font-size: 20px;
  }
}
