/* --------------------------------------------------------------------------
   Prana Breath legal pages.
   Seed colour: #68548D (DefaultSeedColor in the app).
   Generated pages live in html/pranabreath.app/ - see content/pranabreath.app.
   -------------------------------------------------------------------------- */

:root {
  --brand:        #68548D;
  --brand-strong: #4E3F6C;
  --brand-soft:   #8B76B3;
  --brand-wash:   #F5F2FA;
  --brand-line:   #E2DAEF;

  --bg:        #FBFAFD;
  --surface:   #FFFFFF;
  --text:      #221D2B;
  --text-mute: #635C71;
  --line:      #E6E2ED;

  --radius: 14px;
  --maxw:   1120px;
  --shadow: 0 1px 2px rgba(34, 29, 43, .05), 0 8px 24px rgba(34, 29, 43, .05);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:        #B9A6DC;
    --brand-strong: #CBBCE8;
    --brand-soft:   #8B76B3;
    --brand-wash:   #241F2E;
    --brand-line:   #3A3247;

    --bg:        #141119;
    --surface:   #1C1824;
    --text:      #EDEAF2;
    --text-mute: #A69FB4;
    --line:      #2E2839;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

/* Keep the footer at the bottom of short pages (the landing page). */
body > .layout, body > main { flex: 1 0 auto; }
body > .footer { flex: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--brand); text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); text-decoration-color: currentColor; }

:where(a, summary, button):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* --- top bar ------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #68548D 0%, #4E3F6C 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12), 0 6px 18px rgba(78, 63, 108, .18);
}

.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 650; letter-spacing: .2px;
  font-size: 1.05rem;
}
.brand:hover { color: #fff; }

.brand-mark {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 26%, transparent 26%),
    radial-gradient(circle at 50% 50%, transparent 0 44%,
                    rgba(255, 255, 255, .6) 44% 55%, transparent 55%),
    radial-gradient(circle at 50% 50%, transparent 0 76%,
                    rgba(255, 255, 255, .32) 76% 88%, transparent 88%);
}

.topnav { display: flex; gap: 6px; flex-wrap: wrap; }
.topnav a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-size: .92rem; font-weight: 550;
  padding: 7px 13px; border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}
.topnav a:hover { color: #fff; background: rgba(255, 255, 255, .13); }
.topnav a.is-current { color: #fff; background: rgba(255, 255, 255, .2); }

/* --- layout -------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 64px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  /* The top bar wraps to two rows below this width. */
  html { scroll-padding-top: 120px; }
  .doc h2, .doc h3 { scroll-margin-top: 120px; }
}

/* --- table of contents --------------------------------------------------- */

.toc-pane { position: sticky; top: 84px; }
@media (max-width: 900px) { .toc-pane { position: static; } }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 6px 10px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 120px);
  overflow: auto;
}
@media (max-width: 900px) { .toc { max-height: none; } }

.toc summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 14px;
  font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-mute);
  display: flex; align-items: center; justify-content: space-between;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: ""; width: 8px; height: 8px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}
.toc details[open] summary::after { transform: translateY(2px) rotate(-135deg); }

.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > details > ul { padding: 0 6px; }
.toc li ul { margin-left: 10px; }

.toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .89rem;
  line-height: 1.4;
  color: var(--text-mute);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover { background: var(--brand-wash); color: var(--brand-strong); }
.toc a.is-active {
  color: var(--brand-strong);
  background: var(--brand-wash);
  border-left-color: var(--brand);
  font-weight: 600;
}

/* --- document ------------------------------------------------------------ */

.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 52px 52px;
}
@media (max-width: 640px) { .doc { padding: 28px 22px 34px; border-radius: 12px; } }

.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -.02em;
  font-weight: 700;
}

.doc .lede {
  margin: 0 0 26px;
  font-size: 1.08rem;
  color: var(--text-mute);
  max-width: 62ch;
}

.doc h2 {
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 1.32rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  font-weight: 650;
  color: var(--brand-strong);
  scroll-margin-top: 84px;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 1.06rem;
  font-weight: 650;
  scroll-margin-top: 84px;
}

.doc p { margin: 0 0 16px; max-width: 72ch; }
.doc strong { font-weight: 650; color: var(--text); }

.doc ul, .doc ol { margin: 0 0 18px; padding-left: 22px; max-width: 72ch; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--brand-soft); }

/* Pull-quote treatment for the health disclaimer and any similar callout. */
.doc blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--brand);
  background: var(--brand-wash);
  border-radius: 0 10px 10px 0;
  color: var(--text);
}
.doc blockquote p:last-child { margin-bottom: 0; }

/* --- meta card ----------------------------------------------------------- */

.meta {
  margin: 0 0 8px;
  padding: 18px 20px;
  background: var(--brand-wash);
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 24px;
}
.meta > div { min-width: 0; }
.meta dt {
  font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 2px;
}
.meta dd { margin: 0; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }

/* --- footer -------------------------------------------------------------- */

.backtotop { margin: 22px 0 0; text-align: right; font-size: .88rem; }
.backtotop a { text-decoration: none; color: var(--text-mute); }
.backtotop a:hover { color: var(--brand); }

.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  align-items: center; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px;
  font-size: .88rem; color: var(--text-mute);
}
.footer p { margin: 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* --- landing page -------------------------------------------------------- */

.hero { padding: 72px 0 8px; text-align: center; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.9rem);
  letter-spacing: -.02em;
}
.hero p { margin: 0 auto; max-width: 54ch; color: var(--text-mute); font-size: 1.08rem; }

.cards {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 40px 0 80px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--brand-soft); color: inherit; }
.card h2 { margin: 0 0 8px; font-size: 1.2rem; color: var(--brand-strong); }
.card p { margin: 0; color: var(--text-mute); font-size: .95rem; }

/* --- inline code and tables ---------------------------------------------- */
/* Used sparingly: the OAuth scope name and the scope table in the privacy
   policy. Kept quiet so a technical detail does not shout over the prose. */

.doc code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  overflow-wrap: anywhere;
  padding: .12em .38em;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.doc table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: .95rem;
  display: block;
  overflow-x: auto;
}

.doc th, .doc td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.doc th { color: var(--text-mute); font-weight: 600; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; }
.doc tbody tr:last-child td { border-bottom: 0; }

@media print {
  .topbar, .toc-pane, .backtotop, .footer, .skip { display: none !important; }
  .layout { grid-template-columns: 1fr; padding: 0; }
  .doc { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; font-size: 12pt; }
}
