/*
 * Tempo pra Rezar — the website's one stylesheet.
 *
 * The tokens mirror the app's design system, so the site is visibly the same hand:
 * the violet roles from mobile/src/theme/accents.ts, neutrals and status colours
 * from neutrals.ts, spacing, radii, shadows and motion from tokens.ts. The site
 * wears the default accent only, and only in light: there is no dark mode here,
 * so the page is violet on white whatever the device asks for. The app's rule
 * holds here too: a raw colour, radius or duration outside the token block is a
 * bug.
 *
 * fonts · tokens · base · layout · header and footer · controls · cards ·
 * sections · signature pieces (prayer mark, phone, week strip) ·
 * legal documents · error page · print · landing
 */

/* ── Fonts ─────────────────────────────────────────────────────────────────
 * Nunito, self-hosted and subset to Latin (SIL Open Font License 1.1, see
 * /assets/fonts/OFL.txt). Self-hosting is a privacy choice as much as a speed
 * one: the site makes no request to anyone but itself.
 */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/nunito-400.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/nunito-600.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/nunito-800.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/nunito-900.woff2") format("woff2");
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Accent roles, violet (accents.ts). */
  --fill: #7C3AED;
  --on-fill: #FFFFFF;
  --on-fill-track: rgba(255, 255, 255, 0.26);
  --ink: #6D28D9;
  --soft: #EDE9FE;
  --soft-pressed: #DDD6FE;
  --ground: #F5F3FF;
  --halo: rgba(139, 92, 246, 0.14);
  --halo-strong: rgba(139, 92, 246, 0.28);
  /* Site only, since the app has no hover: a primary button under the pointer (7.10:1 with white). */
  --fill-hover: #6D28D9;

  /* Neutrals (neutrals.ts). */
  --surface: #FFFFFF;
  --surface-sunken: #F3F1F8;
  --surface-elevated: #FFFFFF;
  --text: #1B1727;
  --text-muted: #6B6680;
  --text-faint: #9A95AD;
  --border: #EAE7F1;
  --border-strong: #D8D4E3;
  --divider: #F0EDF5;

  /*
   * Status never follows the accent: green is a prayer said, yellow part of a day.
   * A check drawn on the green takes the on-fill, dark as in neutrals.ts
   * (6.54:1 on the green).
   */
  --success: #22C55E;
  --success-on-fill: #052E16;
  --success-ink: #15803D;
  --success-soft: #DCFCE7;
  --warning: #F59E0B;

  /* The phone drawn on the landing page: hardware, so not the theme's surfaces. */
  --device: #16131F;
  --device-edge: #2C2739;

  /* Elevation (tokens.ts): card rests on the ground, raised is lifted, floating is above all. */
  --shadow-card: 0 1px 2px rgba(27, 23, 39, 0.04), 0 4px 12px rgba(27, 23, 39, 0.05);
  --shadow-raised: 0 6px 18px rgba(27, 23, 39, 0.10);
  --shadow-floating: 0 12px 32px rgba(27, 23, 39, 0.16);

  /* Shape: actions and chips are pills, cards lg, tiles md, sheets xl, small things sm. */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* 4 pt grid. */
  --s-xxs: 2px;
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 20px;
  --s-xxl: 24px;
  --s-xxxl: 32px;
  --s-huge: 40px;
  --s-giant: 56px;

  /* Motion: short, strong ease-out; the breath is the one slow loop. */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-breath: cubic-bezier(0.37, 0, 0.63, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 300ms;
  --t-breath: 3600ms;

  /* Layout. */
  --gutter: clamp(16px, 5vw, 32px);
  --content: 1120px;
  --measure: 720px;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2.5px;
}

strong,
b {
  font-weight: 800;
}

/* --ink, the darker accent step, so the ring holds on tinted surfaces too. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

::selection {
  background: var(--soft-pressed);
}

[id] {
  scroll-margin-top: var(--s-xxl);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: currentColor;
}

.skip-link {
  position: absolute;
  top: var(--s-md);
  left: var(--s-md);
  z-index: 100;
  padding: var(--s-md) var(--s-xl);
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--on-fill);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-base) var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  gap: var(--s-lg);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* ── Header and footer ───────────────────────────────────────────────────── */
.site-header {
  padding-block: var(--s-lg);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-md);
  min-height: 44px;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--s-xxs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s-md);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    background-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--soft);
  color: var(--ink);
}

/* On a phone the icon alone names the site; the name stays for screen readers. */
@media (max-width: 519px) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site-nav a {
    padding-inline: var(--s-sm);
    font-size: 0.875rem;
  }
}

.site-footer {
  margin-top: var(--s-giant);
  padding-block: var(--s-huge);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer .container {
  display: grid;
  gap: var(--s-xl);
}

/*
 * Above the one line saying who makes the app: the two legal pages, and the
 * cookie button (consent.css), which shows only once a tag is configured.
 */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs) var(--s-xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  min-height: 44px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

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

.footer-note {
  max-width: 64ch;
  font-size: 0.875rem;
}

/* ── Controls ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 48px;
  padding-inline: var(--s-xxl);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  font: 800 1rem/1.25 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    background-color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  min-height: 56px;
  padding-inline: var(--s-xxxl);
}

.btn-primary {
  background: var(--fill);
  color: var(--on-fill);
}

.btn-primary:hover {
  background: var(--fill-hover);
}

/* The cookie banner's two buttons (consent.js), equal in size and colour. */
.btn-tonal {
  background: var(--soft);
  color: var(--ink);
}

.btn-tonal:hover {
  background: var(--soft-pressed);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding-inline: var(--s-md);
  border-radius: var(--r-pill);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2;
}

.chip .icon {
  width: 16px;
  height: 16px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  padding: var(--s-xxl);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.card-tinted {
  border-color: transparent;
  background: var(--soft);
  box-shadow: none;
}

.card-accent {
  border-color: transparent;
  background: var(--fill);
  color: var(--on-fill);
  box-shadow: var(--shadow-raised);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--soft);
  color: var(--ink);
}

.icon-tile .icon {
  width: 24px;
  height: 24px;
}

.feature h3 {
  margin-top: var(--s-lg);
  font-size: 1.125rem;
}

.feature p {
  margin-top: var(--s-sm);
  color: var(--text-muted);
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section {
  padding-block: clamp(56px, 9vw, 104px);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.eyebrow {
  margin-bottom: var(--s-md);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.lead {
  margin-top: var(--s-lg);
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
}

.display {
  font-size: clamp(2.375rem, 1.35rem + 4.4vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.display em {
  color: var(--ink);
  font-style: normal;
}

.hero {
  padding-block: clamp(32px, 7vw, 88px) clamp(56px, 9vw, 104px);
}

.hero .container {
  display: grid;
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

@media (min-width: 880px) {
  .hero .container {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-md);
  margin-top: var(--s-xxxl);
}

.steps {
  display: grid;
  gap: var(--s-lg);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--s-lg);
  border-radius: 50%;
  background: var(--fill);
  color: var(--on-fill);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  font-size: 1.125rem;
}

.steps p {
  margin-top: var(--s-sm);
  color: var(--text-muted);
}

/* ── Signature pieces ────────────────────────────────────────────────────── */

/*
 * The prayer mark: components/ui/PrayerMark.tsx in CSS. Praying hands on the
 * accent disc inside two halos, breathing on the app's 3.6 s loop, and still
 * under Reduce Motion as the app's is. Markup:
 *   <div class="prayer-mark" aria-hidden="true">
 *     <span class="pm-halo"></span><span class="pm-halo-strong"></span>
 *     <span class="pm-core"><svg class="icon"><use href="/assets/icons.svg#pray"/></svg></span>
 *     <i class="pm-ray"></i><i class="pm-ray"></i><i class="pm-ray"></i><i class="pm-ray"></i>
 *   </div>
 * Size it with --mark (the disc's diameter).
 */
.prayer-mark {
  --mark: 120px;
  display: grid;
  place-items: center;
  width: calc(var(--mark) * 2.2);
  height: calc(var(--mark) * 2.2);
}

.prayer-mark > * {
  grid-area: 1 / 1;
}

.pm-halo,
.pm-halo-strong,
.pm-core {
  border-radius: 50%;
}

.pm-halo {
  width: calc(var(--mark) * 1.9);
  height: calc(var(--mark) * 1.9);
  background: var(--halo);
  animation: pm-breath-outer var(--t-breath) var(--ease-breath) infinite alternate;
}

.pm-halo-strong {
  width: calc(var(--mark) * 1.42);
  height: calc(var(--mark) * 1.42);
  background: var(--halo-strong);
  animation: pm-breath-inner var(--t-breath) var(--ease-breath) infinite alternate;
}

.pm-core {
  display: grid;
  place-items: center;
  width: var(--mark);
  height: var(--mark);
  background: var(--fill);
  color: var(--on-fill);
}

.pm-core .icon {
  width: 50%;
  height: 50%;
}

.pm-ray {
  width: 5px;
  height: 18px;
  border-radius: 2.5px;
  background: var(--fill);
  transform: rotate(var(--ray)) translateX(calc(var(--mark) * 1.1)) rotate(90deg);
}

.pm-ray:nth-of-type(1) {
  --ray: 0deg;
}

.pm-ray:nth-of-type(2) {
  --ray: -30deg;
}

.pm-ray:nth-of-type(3) {
  --ray: -150deg;
}

.pm-ray:nth-of-type(4) {
  --ray: -180deg;
}

@keyframes pm-breath-outer {
  to {
    opacity: 0.7;
    transform: scale(1.08);
  }
}

@keyframes pm-breath-inner {
  to {
    transform: scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-halo,
  .pm-halo-strong {
    animation: none;
  }
}

/* A phone, drawn rather than photographed. Put the screen's content in .phone-screen. */
.phone {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 300 / 620;
  margin-inline: auto;
  padding: 10px;
  border-radius: 48px;
  background: var(--device);
  box-shadow:
    var(--shadow-floating),
    inset 0 0 0 1.5px var(--device-edge);
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--ground);
}

.phone-screen::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 86px;
  height: 25px;
  border-radius: var(--r-pill);
  background: var(--device);
  transform: translateX(-50%);
}

/*
 * The week strip: components/ui/WeekStrip.tsx, a small bar chart. Colour is the
 * verdict and height is the share: full is green to the top with a dark check
 * (the success on-fill, as in WeekStrip.tsx), partial is yellow (half height
 * here; the app sizes it to the share of prayers said, never below 18%), empty
 * and future are the track alone, and today wears a border in the accent and the
 * app's 13 px label. The app's red sliver for a missed day has no rule here,
 * because no page draws one.
 *   <div class="week">
 *     <div class="week-day" data-state="full"><span class="week-bar"><span class="week-fill">
 *       <svg class="icon"><use href="/assets/icons.svg#check"/></svg></span></span>Seg</div>
 *     …
 *     <div class="week-day" data-state="partial" data-today><span class="week-bar">
 *       <span class="week-fill"></span></span>Dom</div>
 *   </div>
 * Inside .card-accent the tracks turn translucent white and today's border white.
 */
.week {
  display: flex;
  justify-content: space-between;
  gap: var(--s-xs);
}

.week-day {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  /* Without this a day cannot shrink below its bar, and seven overflow a narrow card. */
  min-width: 0;
  gap: var(--s-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.week-day[data-today] {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 800;
}

.week-bar {
  display: flex;
  align-items: flex-end;
  width: 36px;
  max-width: 100%;
  height: 56px;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--soft);
}

.week-day[data-today] .week-bar {
  border: 2px solid var(--fill);
}

.week-fill {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: var(--r-sm);
  background: var(--success);
  color: var(--success-on-fill);
}

.week-day[data-today] .week-fill {
  border-radius: calc(var(--r-sm) - 2px);
}

.week-fill .icon {
  width: 16px;
  height: 16px;
}

.week-day[data-state="partial"] .week-fill {
  height: 50%;
  background: var(--warning);
}

.card-accent .week-bar {
  background: var(--on-fill-track);
}

/*
 * Every label full white, unlike the app's muted white (3.96:1, under 4.5:1 for
 * 12 px text). Today still stands out by its white border, weight and size.
 */
.card-accent .week-day {
  color: var(--on-fill);
}

.card-accent .week-day[data-today] .week-bar {
  border-color: var(--on-fill);
}

/* ── Legal documents ─────────────────────────────────────────────────────────
 * Markup contract for /privacidade/ and /termos/:
 *   <article class="doc">
 *     <header class="doc-header"><p class="eyebrow">…</p><h1>…</h1>
 *       <p class="doc-meta">Última atualização: …</p></header>
 *     <section class="doc-summary" aria-labelledby="resumo"><h2 id="resumo">Em resumo</h2><ul>…</ul></section>
 *     <nav class="toc" aria-labelledby="indice"><h2 id="indice">Nesta página</h2><ol><li><a href="#…">…</a></li></ol></nav>
 *     <div class="doc-body"><section id="…"><h2>1. …</h2><p>…</p>…</section>…</div>
 *   </article>
 * Tables go inside <div class="table-wrap" role="region" aria-label="…" tabindex="0">;
 * a plain-language aside is <div class="callout">…</div>.
 */
.doc {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(24px, 5vw, 56px) var(--gutter) 0;
}

.doc-header h1 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 2.875rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.doc-meta {
  margin-top: var(--s-md);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 700;
}

.doc-summary {
  margin-top: var(--s-xxxl);
  padding: var(--s-xxl);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.doc-summary h2 {
  font-size: 1.125rem;
}

.doc-summary ul {
  display: grid;
  gap: var(--s-md);
  margin: var(--s-lg) 0 0;
  padding: 0;
  list-style: none;
}

.doc-summary li {
  position: relative;
  padding-left: 32px;
}

.doc-summary li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success-soft);
}

.doc-summary li::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--success-ink);
  border-bottom: 2px solid var(--success-ink);
  transform: rotate(45deg);
}

.toc {
  margin-top: var(--s-xxl);
  padding: var(--s-xl) var(--s-xxl);
  border-radius: var(--r-lg);
  background: var(--soft);
}

.toc h2 {
  color: var(--ink);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: var(--s-md) 0 0;
  padding-left: 1.4em;
  columns: 2 16rem;
  column-gap: var(--s-xxxl);
}

.toc li {
  padding-block: var(--s-xxs);
  break-inside: avoid;
}

.toc li::marker {
  color: var(--ink);
  font-weight: 800;
}

.toc a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Under a finger each link becomes a 44 px row (a 24 px line plus 10 px above and below), like every other nav control. */
@media (pointer: coarse), (max-width: 519px) {
  .toc li {
    padding-block: 0;
  }

  .toc a {
    display: block;
    padding-block: 10px;
  }
}

.doc-body {
  margin-top: var(--s-xs);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
}

.doc-body h2 {
  margin: 2.4em 0 0.6em;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.doc-body h3 {
  margin: 1.6em 0 0.4em;
  font-size: 1.0625rem;
}

.doc-body p + p,
.doc-body p + ul,
.doc-body p + ol,
.doc-body ul + p,
.doc-body ol + p {
  margin-top: 0.85em;
}

.doc-body ul,
.doc-body ol {
  margin: 0;
  padding-left: 1.4em;
}

.doc-body li + li {
  margin-top: 0.4em;
}

.doc-body li::marker {
  color: var(--ink);
}

.table-wrap {
  margin-block: var(--s-xl);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.table-wrap th,
.table-wrap td {
  padding: var(--s-md) 14px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--surface-sunken);
  font-weight: 800;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.callout {
  margin-block: var(--s-xl);
  padding: var(--s-lg) var(--s-xl);
  border-radius: var(--r-md);
  background: var(--soft);
}

.callout > * + * {
  margin-top: 0.6em;
}

/* ── Error page ──────────────────────────────────────────────────────────── */
.not-found {
  display: grid;
  justify-items: center;
  gap: var(--s-lg);
  padding-block: clamp(40px, 10vw, 120px);
  text-align: center;
}

.not-found .prayer-mark {
  --mark: 72px;
}

/* ── Print: the legal pages are the ones people print or save as PDF ─────── */
@media print {
  :root {
    --ground: #FFFFFF;
    --surface: #FFFFFF;
    --soft: #FFFFFF;
    --text: #000000;
    --text-muted: #333333;
    --ink: #000000;
    --shadow-card: none;
  }

  .skip-link,
  .site-nav,
  .toc,
  .site-footer .footer-links {
    display: none;
  }

  .doc-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}

/* ── Landing ── */
/*
 * The home page only: the hero with the "Hora de rezar" screen drawn inside the
 * phone, the story beside the app's own advice, the steps and the iPhone note,
 * the feature grid, and the closing card that holds the contact (#contato).
 *
 * The screen inside the phone is laid out in container units, so the miniature
 * keeps the app's proportions wherever the phone shrinks. --pt is one point of a
 * 375 pt wide iPhone, and each size in .lock is the app's own number (theme/type.ts,
 * theme/tokens.ts, features/lock/BlockScreen.tsx) times --pt. Radii stay tokens.
 */

.hero-copy .lead {
  max-width: 36rem;
}

.hero-availability {
  margin-top: var(--s-xxl);
}

/* On a phone the hero's one button takes the whole row, within reach of a thumb. */
@media (max-width: 519px) {
  .hero .actions .btn {
    flex: 1 1 auto;
  }
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

/* The prayer mark's halo at page scale, so the phone sits in the same light. */
.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(100%, 480px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--halo);
}

/* In one column the halo can be no wider than the phone, and reads as two crescents. */
@media (max-width: 879px) {
  .hero-art::before {
    display: none;
  }
}

/* Stacked sections share one gap rather than adding two. */
.hero + .section,
.section + .section {
  padding-top: 0;
}

.hero .phone-screen {
  container-type: inline-size;
}

.lock {
  --pt: calc(100cqi / 375);
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: calc(56 * var(--pt)) calc(16 * var(--pt)) calc(50 * var(--pt));
  background: var(--soft);
  color: var(--text);
  text-align: center;
}

/* The clock in the status bar, centred in the space left of the notch. */
.lock-status {
  position: absolute;
  top: 10px;
  left: 0;
  width: calc(50% - 43px);
  font-size: calc(16 * var(--pt));
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 25px;
}

.lock-home {
  position: absolute;
  bottom: calc(8 * var(--pt));
  left: 50%;
  width: calc(134 * var(--pt));
  height: calc(5 * var(--pt));
  border-radius: var(--r-pill);
  background: var(--text);
  transform: translateX(-50%);
}

.lock-head {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(12 * var(--pt));
  padding-top: calc(16 * var(--pt));
}

.lock .prayer-mark {
  --mark: calc(96 * var(--pt));
}

.lock-title {
  font-size: calc(26 * var(--pt));
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: calc(32 * var(--pt));
}

.lock-slot {
  color: var(--text-muted);
  font-size: calc(16 * var(--pt));
  line-height: calc(23 * var(--pt));
}

.lock-card {
  display: grid;
  gap: calc(4 * var(--pt));
  padding: calc(16 * var(--pt));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.lock-card-title {
  font-size: calc(16 * var(--pt));
  font-weight: 800;
  line-height: calc(23 * var(--pt));
}

.lock-card-note,
.lock-escape {
  font-size: calc(13 * var(--pt));
  line-height: calc(18 * var(--pt));
}

.lock-card-note {
  color: var(--text-muted);
}

.lock-actions {
  display: grid;
  gap: calc(12 * var(--pt));
  padding-top: calc(16 * var(--pt));
}

.lock-snooze {
  display: grid;
  gap: calc(8 * var(--pt));
}

.lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--pt));
  border-radius: var(--r-pill);
  font-size: calc(16 * var(--pt));
  font-weight: 800;
  line-height: 1.25;
}

.lock-btn .icon {
  width: calc(20 * var(--pt));
  height: calc(20 * var(--pt));
}

.lock-btn-primary {
  height: calc(56 * var(--pt));
  background: var(--fill);
  color: var(--on-fill);
}

.lock-btn-secondary {
  height: calc(48 * var(--pt));
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
}

.lock-pips {
  display: flex;
  justify-content: center;
  gap: calc(8 * var(--pt));
}

.lock-pips i {
  width: calc(8 * var(--pt));
  height: calc(8 * var(--pt));
  border-radius: var(--r-pill);
  background: var(--fill);
}

.lock-caption {
  color: var(--text-muted);
  font-size: calc(12 * var(--pt));
  font-weight: 700;
  line-height: calc(16 * var(--pt));
}

.lock-escape {
  padding-block: calc(8 * var(--pt));
  color: var(--text-faint);
}

/* Two columns from 880 px, one below: the words beside what they point at. */
.split {
  display: grid;
  align-items: center;
  gap: var(--s-xxxl);
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
}

.split .section-head {
  margin-bottom: 0;
}

/*
 * The app's own advice (learn/articles.ts), set large on the accent. Its second
 * line stays full white: the app's muted white is 3.96:1 on the fill, under 4.5:1.
 */
.pull {
  padding: clamp(var(--s-xxl), 4vw, var(--s-huge));
  border-radius: var(--r-xl);
}

.pull-quote {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pull-note {
  margin-top: var(--s-lg);
}

/*
 * The one qualified line about pausing apps, under the steps: an icon beside its
 * words. Where the words would be squeezed beside it, they wrap below it, as in
 * a feature card.
 */
.note {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--s-lg);
  margin-top: var(--s-lg);
}

.note > div {
  flex: 1 1 18rem;
  min-width: 0;
}

.note .icon-tile {
  background: var(--surface);
}

.note h3 {
  font-size: 1.125rem;
}

.note p {
  max-width: 64ch;
  margin-top: var(--s-xs);
  color: var(--text-muted);
}

/* Features: three columns at most, so six cards make two even rows. */
.features {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.feature-week .week {
  margin-block: var(--s-xs);
}

/* Full white for the same reason as .pull-note. */
.card-accent.feature p {
  color: var(--on-fill);
}

.closing {
  padding: clamp(var(--s-xl), 5vw, var(--s-giant));
  border-radius: var(--r-xl);
}

.closing .prayer-mark {
  justify-self: center;
}

/*
 * The contact: the closing card's #contato here, and the address itself on
 * /suporte/. As in .note, the words drop below the icon where the address would
 * not fit whole beside it, so a phone never splits the address.
 */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-md) var(--s-lg);
  margin-top: var(--s-xxl);
  padding: var(--s-lg);
}

.contact-card > div {
  flex: 1 1 15rem;
  min-width: 0;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contact-card a {
  font-weight: 800;
  overflow-wrap: anywhere;
}
