/*
  One stylesheet for every page on bathcards.com.

  The palette is the app's own, taken from install/privacy.html so that the
  site, the privacy notice and the product do not look like three different
  things. No web font: a font request is a third party watching whoever reads
  this page, and the point of the product is that nobody is watching.
*/

:root {
  --bg: #f3f3f3;
  --panel: #ffffff;
  --ink: #080808;
  --muted: #6e6e6e;
  --accent: #4838e8;
  --accent-ink: #ffffff;
  --line: #e0e0e0;
  --soft: #f7f7fb;
  --warn-bg: #fff8e6;
  --warn-line: #e8d9a8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --panel: #232323;
    --ink: #f0f0f0;
    --muted: #a0a0a0;
    --accent: #9d93ff;
    --accent-ink: #141414;
    --line: #343434;
    --soft: #1f1f24;
    --warn-bg: #2a2416;
    --warn-line: #4a4027;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---- shell ---------------------------------------------------------- */

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 680px; }

/* ---- masthead ------------------------------------------------------- */

header.top {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

nav.top-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 15px;
}

nav.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ---- type ----------------------------------------------------------- */

h1 {
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  font-weight: 680;
}

h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 650;
}

h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  font-weight: 620;
}

p { margin: 0 0 16px; }

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 32px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 600;
}

.muted { color: var(--muted); }
.small { font-size: 15px; }

/* ---- sections ------------------------------------------------------- */

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
section + section { border-top: 1px solid var(--line); }

section.hero {
  padding: 88px 0 72px;
  border-top: 0;
}

/* ---- buttons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover { border-color: var(--muted); filter: none; }

.btn[aria-disabled="true"] {
  background: var(--soft);
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
}

/* ---- grids ---------------------------------------------------------- */

.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- steps ---------------------------------------------------------- */

ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 32px 52px;
  border-left: 1px solid var(--line);
  margin-left: 16px;
}

ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 650;
}

/* ---- panels --------------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}

.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0 0 20px;
}

.note h3 { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

code, kbd, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

code { font-size: 0.9em; }

pre {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* ---- product figures ------------------------------------------------ */
/*
  Drawn in HTML rather than screenshotted. Two reasons, and the second is the
  one that decided it: a screenshot of the owner's own app is a screenshot of a
  real student's real course material, which is not the kind of thing that
  belongs in a public page or in this repository. The sample content below is
  invented.
*/

.shot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.shot-bar .pill {
  padding: 3px 10px;
  border-radius: 999px;
}

.shot-bar .pill.on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.shot-body { padding: 20px; }

/*
  In the three-column row the figures must be the same height, or the heading
  under each one sits at a different level and the row reads as broken rather
  than as three things of different lengths.
*/
.cols .shot { min-height: 290px; }

.plan-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.plan-row:last-child { border-bottom: 0; }

.plan-row .unit { font-weight: 600; }
.plan-row .count { color: var(--muted); font-variant-numeric: tabular-nums; }

.dial {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.dial .track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.dial .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.dial .label { width: 96px; font-weight: 600; }
.dial .pct { width: 44px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.card-face {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--soft);
  margin-bottom: 12px;
}

.card-face .q { font-weight: 600; margin: 0 0 10px; }
.card-face .a { color: var(--muted); margin: 0; }

.source-line {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ---- faq ------------------------------------------------------------ */

.faq { border-top: 1px solid var(--line); }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 620;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  flex: none;
}

.faq details[open] summary::after { content: "\2212"; }

.faq details > *:not(summary) { margin-top: 12px; }
.faq details p:last-child { margin-bottom: 0; }

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

footer.foot {
  border-top: 1px solid var(--line);
  padding: 36px 0 60px;
  color: var(--muted);
  font-size: 15px;
}

footer.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

footer.foot a { color: var(--muted); }
footer.foot .spacer { margin-left: auto; }

/* ---- narrow --------------------------------------------------------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 34px; }
  h2 { font-size: 23px; }
  .lede { font-size: 18px; }
  section { padding: 52px 0; }
  section.hero { padding: 56px 0 48px; }
  .cols, .cols-2 { grid-template-columns: 1fr; gap: 24px; }
  nav.top-nav { gap: 16px; font-size: 14px; }
  header.top .wrap { gap: 12px; }
  footer.foot .spacer { margin-left: 0; width: 100%; }
}
