/* PleaseInterruptMe shared system: "Saved by the Call".
   Loaded by every page. Public pages load it alone; app screens load it after
   Bootstrap, then app.css bridges Bootstrap's components onto these tokens.
   Element resets use :where() so Bootstrap's reboot still wins where it is loaded.
   Fonts are self-hosted, OFL. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-800-normal.a6db50e8ed42.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-600-normal.b6dba4db308f.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.82a5516b3709.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.833b135521b5.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #121013;
  --ink-raise: #1c181d;
  --ink-lift: #2a252b;
  --paper: #f7f3ec;
  --paper-dim: #cfc7ba;
  --amber: #e9b872;
  --go: #ff5a1f;
  --go-hover: #ff7642;
  --alarm: #ffa47f;
  --cc-bg: #000;
  --cc-fg: #fff;
  --edge: rgba(247, 243, 236, 0.28);
  --edge-strong: rgba(247, 243, 236, 0.55);

  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --block: clamp(2.5rem, 5vw, 4rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  scrollbar-color: var(--amber) var(--ink);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.55;
  caret-color: var(--go);
  overflow-x: hidden;
}

::selection { background: var(--go); color: var(--ink); }

:where(img) { display: block; max-width: 100%; height: auto; }
:where(h1, h2, h3, h4, p, ol, ul, figure) { margin: 0; }

:where(a) { color: inherit; }
a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50;
  background: var(--go); color: var(--ink); padding: 0.6rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ---------- Title-card type ---------- */

.title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 7.4vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.title__hot { display: block; color: var(--go); }
.title--section { font-size: clamp(2.4rem, 5.2vw, 4.25rem); line-height: 0.96; }
.title--page { font-size: clamp(2.5rem, 5.4vw, 4.25rem); line-height: 0.94; }

.lede { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--paper); max-width: 31ch; }
.section-lede { font-size: 1.25rem; max-width: 46ch; margin-top: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 3.25rem; padding: 0.85em 1.45em;
  border: 2px solid transparent; border-radius: 3px;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--go { background: var(--go); color: var(--ink); }
.btn--go:hover { background: var(--go-hover); color: var(--ink); text-decoration: none; }
.btn--small { min-height: 2.6rem; font-size: 1rem; padding: 0.6em 1.05em; }
.btn--block { display: flex; width: 100%; }
.btn--play { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn--play:hover { background: rgba(247, 243, 236, 0.12); color: var(--paper); }
.btn--ink, .btn--row { background: var(--ink); color: var(--paper); }
.btn--ink:hover, .btn--row:hover { background: var(--ink-lift); color: var(--paper); text-decoration: none; }

.btn[aria-pressed="true"].btn--play { background: var(--paper); color: var(--ink); }
.btn[aria-pressed="true"].btn--row { background: var(--paper); color: var(--ink); }
.btn .icon--pause { display: none; }
.btn[aria-pressed="true"] .icon--play { display: none; }
.btn[aria-pressed="true"] .icon--pause { display: block; }
.btn[data-state="loading"] { opacity: 0.75; cursor: progress; }

/* ---------- Masthead ---------- */

.masthead {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem var(--gutter);
}
.masthead--over { position: absolute; inset: 0 0 auto 0; }
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1;
  text-decoration: none; color: var(--paper);
}
.brand:hover { color: var(--paper); }
.brand .icon { color: var(--go); }
.masthead__links { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.75rem); font-size: 1.05rem; }
.masthead__links a:not(.btn) { text-decoration: none; color: var(--paper); white-space: nowrap; }
.masthead__links a:not(.btn):hover { text-decoration: underline; }

.masthead__who { color: var(--paper-dim); font-size: 0.98rem; }

/* ---------- Footer ---------- */

.foot { padding: 3rem var(--gutter) 3.5rem; }
.foot__inner {
  max-width: 90rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
}
.foot__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot__links a { color: var(--paper-dim); text-decoration: none; }
.foot__links a:hover { color: var(--paper); text-decoration: underline; }
.foot__fine { width: 100%; color: var(--paper-dim); font-size: 0.95rem; }

/* ---------- Closed captions (signature) ---------- */

.cc__line {
  display: inline;
  background: var(--cc-bg); color: var(--cc-fg);
  padding: 0.12em 0.45em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  font-family: var(--text); font-weight: 400;
}
.cc__line:empty { display: none; }

/* Ringing: a call is on its way. The phone glyph buzzes in bursts, like the
   landing hero still; reduced motion keeps it still. */
.ringing-wrap { margin-bottom: 1.5rem; }
.ringing { display: flex; align-items: center; gap: 1rem; }
.ringing__phone { width: 3.25rem; height: 3.25rem; fill: var(--go); flex: none; animation: buzz 1.8s linear infinite; }
.ringing .cc__line { font-size: 1.15rem; line-height: 1.45; }
@keyframes buzz {
  0%, 40%, 100% { transform: translate(0, 0) rotate(0); }
  5%, 15%, 25%, 35% { transform: translate(-2px, 1px) rotate(-6deg); }
  10%, 20%, 30% { transform: translate(2px, -1px) rotate(6deg); }
}

/* ---------- Disclosure (FAQ) ---------- */

.faq__list { margin-top: 2.5rem; display: grid; gap: 0.25rem; }
.faq__list details { padding: 1rem 0; }
.faq__list summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  cursor: pointer; list-style: none;
  font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.2;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__icon { color: var(--go); width: 1.1em; height: 1.1em; align-self: center; transition: transform 200ms var(--ease-out); }
.faq__list details[open] .faq__icon { transform: rotate(45deg); }
.faq__list details > p, .faq__answer { margin-top: 0.75rem; max-width: 60ch; color: var(--paper-dim); }
.faq__answer p { margin-top: 0.6rem; }
.faq__answer strong { color: var(--paper); }
.faq__answer a { color: var(--paper); }

/* ---------- Reading pages (legal, help, blog) ---------- */

.read { max-width: 50rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) var(--section); }
.read__head { display: grid; gap: 1rem; margin-bottom: var(--block); }
.read__meta { color: var(--amber); font-size: 1rem; }
.read__meta a { color: var(--amber); }
.read__lede { color: var(--paper); max-width: 46ch; font-size: 1.25rem; }

.prose { max-width: 65ch; }
.prose > * + * { margin-top: 1rem; }
.prose p, .prose li { color: var(--paper); }
.prose h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 2.75rem 0 0.85rem; text-wrap: balance;
}
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 2rem 0 0.6rem; }
.prose > h2:first-child, .prose section:first-child > h2:first-child, .prose > section:first-child h2 { margin-top: 0; }
.prose section > * + * { margin-top: 1rem; }
.prose section + section { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.45rem; }
.prose li::marker { color: var(--amber); }
.prose strong { font-weight: 700; }
.prose a { color: var(--paper); text-decoration: underline; }
.prose blockquote { margin: 1.5rem 0; padding: 0 0 0 1.1rem; color: var(--amber); font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.3; border-left: 1px solid var(--amber); }
.prose img { border-radius: 2px; margin: 1.5rem 0; }
.prose hr { border: 0; height: 0; margin: 2.5rem 0; }

.read__cta { margin-top: var(--block); display: grid; justify-items: start; gap: 0.85rem; }
.read__cta-line { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1; letter-spacing: -0.025em; }
.read__small { color: var(--paper-dim); font-size: 1rem; }

.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2rem, 4vw, 2.75rem); }
.posts__title {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance;
}
.posts__title a { text-decoration: none; }
.posts__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.posts__meta { color: var(--amber); font-size: 0.98rem; margin-top: 0.5rem; }
.posts__desc { margin-top: 0.5rem; max-width: 60ch; color: var(--paper-dim); }
.posts__pages { margin-top: var(--block); display: flex; gap: 0.75rem; }
.share { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.5rem; }
.d-none { display: none !important; }

/* ---------- Flash messages ---------- */

.flash { position: relative; z-index: 20; padding: 0 var(--gutter); max-width: 90rem; margin: 0 auto 1rem; }
.alert {
  position: relative;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: var(--paper); color: var(--ink);
  padding: 0.9rem 1.1rem; margin: 0; border: 0; border-radius: 3px;
  font-weight: 700; line-height: 1.4;
}
.alert + .alert { margin-top: 0.5rem; }
.alert a { color: var(--ink); }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.btn-close {
  appearance: none; border: 0; background: none; color: var(--ink); opacity: 1;
  width: auto; height: auto; padding: 0.25rem; margin: 0; flex: none;
  font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: none;
}
.btn-close::before {
  content: ""; display: block; width: 1.1rem; height: 1.1rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.75 4h2.5v6.75H20v2.5h-6.75V20h-2.5v-6.75H4v-2.5h6.75z' transform='rotate(45 12 12)'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.75 4h2.5v6.75H20v2.5h-6.75V20h-2.5v-6.75H4v-2.5h6.75z' transform='rotate(45 12 12)'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-close:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; box-shadow: none; }

/* ---------- Forms ----------
   Styled on Bootstrap's class names so one vocabulary works on public pages
   (no Bootstrap) and app screens (Bootstrap loaded first). */

.field { display: grid; gap: 0.45rem; }
.field ~ .field { margin-top: 1.35rem; }
.form-label { display: block; margin: 0; font-weight: 700; font-size: 1rem; color: var(--paper); }
.form-control, .form-select {
  display: block; width: 100%; min-height: 3.25rem;
  padding: 0.7rem 0.95rem;
  background-color: var(--ink-raise); color: var(--paper);
  border: 2px solid var(--edge); border-radius: 3px;
  font-family: var(--text); font-size: 1.125rem; line-height: 1.4;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
  box-shadow: none;
}
.form-control::placeholder { color: #9a929b; opacity: 1; }
.form-control:hover, .form-select:hover { border-color: var(--edge-strong); }
.form-control:focus, .form-select:focus {
  background-color: var(--ink-raise); color: var(--paper);
  border-color: var(--paper); outline: 3px solid var(--amber); outline-offset: 2px; box-shadow: none;
}
.form-control:disabled, .form-control[readonly] { background-color: var(--ink); color: var(--paper-dim); border-style: dashed; }
.form-control.is-invalid, .form-select.is-invalid, .is-invalid .form-control { border-color: var(--go); background-image: none; padding-right: 0.95rem; }
.form-control.is-invalid:focus { border-color: var(--go); box-shadow: none; }
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--paper);
  -webkit-box-shadow: 0 0 0 100px var(--ink-raise) inset;
  caret-color: var(--go);
}
.form-text { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--paper-dim); }
.form-text ul { margin: 0.35rem 0 0; padding-left: 1.1rem; list-style: disc; }
.form-text li + li { margin-top: 0.15rem; }

.invalid-feedback { display: none; margin: 0; font-size: 0.98rem; font-weight: 700; line-height: 1.4; color: var(--alarm); }
.invalid-feedback.d-block, .is-invalid ~ .invalid-feedback { display: block; }
.invalid-feedback ul, .errorlist { margin: 0; padding: 0; list-style: none; }

.form-error {
  display: grid; gap: 0.35rem;
  padding: 0.85rem 1rem; margin-bottom: 1.5rem;
  background: var(--paper); color: var(--ink); border-radius: 3px;
  font-weight: 700; line-height: 1.4;
}
.form-error ul { margin: 0; padding: 0; list-style: none; font-weight: 400; }

/* ---------- Public stage: still beside a task (auth, onboarding) ---------- */

.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 78rem; margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) var(--section);
}
.stage__still { position: sticky; top: 2rem; margin: 0; }
.stage__still img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.stage__still .cc__line {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
  white-space: nowrap; font-size: 1.15rem; line-height: 1.45;
}
.stage__task { display: grid; gap: 1.25rem; max-width: 30rem; padding-top: clamp(0rem, 3vw, 2.5rem); }
.stage__task .lede { max-width: 30ch; }
.stage__form { margin-top: 1rem; }
.stage__submit { margin-top: 1.75rem; }
.stage__aside { color: var(--paper-dim); font-size: 1rem; }
.stage__aside p + p { margin-top: 0.5rem; }
.stage__aside a { color: var(--paper); }

.stage--solo { grid-template-columns: minmax(0, 1fr); max-width: 44rem; }
.stage--solo .stage__task { max-width: 36rem; padding-top: clamp(1rem, 6vw, 5rem); }
.stage--solo .lede { max-width: 40ch; }
.stage--solo .lede a { overflow-wrap: anywhere; }

/* A single centred task or message with no still (errors, notices). */
.page-solo { max-width: 90rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) var(--section); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .masthead__links a:not(.btn):not([data-keep]) { display: none; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stage__still { position: relative; top: auto; order: -1; }
  .stage__still img { aspect-ratio: 16 / 9; object-position: 50% 35%; max-height: 34svh; }
  .stage__task { max-width: 34rem; padding-top: 0; }
}

@media (max-width: 700px) {
  body { font-size: 1.0625rem; }
  .masthead { padding: 0.9rem var(--gutter); gap: 1rem; }
  .brand { font-size: 1.15rem; }
  .masthead__who { display: none; }
  .masthead .btn--small { min-height: 2.5rem; font-size: 0.95rem; padding: 0.55em 0.75em; }
  .title--page { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .stage { padding-top: 0.25rem; gap: 1.5rem; }
  .stage__still { margin-inline: calc(-1 * var(--gutter)); }
  .stage__still img { border-radius: 0; max-height: 26svh; aspect-ratio: 2 / 1; }
  .stage__still .cc__line { font-size: 1rem; bottom: 0.75rem; }
  .foot__links { gap: 0.5rem 1.1rem; }
}

@media (max-width: 520px) {
  .masthead__links:has(.btn) .masthead__login { display: none; }
}

@media (max-width: 390px) {
  .masthead { gap: 0.6rem; }
  .brand { font-size: 1.02rem; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .form-control, .form-select { transition: none; }
  .ringing__phone { animation: none; }
}

/* ---------- Error pages ---------- */

.oops { display: grid; justify-items: start; gap: 1.25rem; max-width: 44rem; padding-top: clamp(1rem, 6vw, 4.5rem); }
.oops__cue { font-size: 1.15rem; }
.oops__title { max-width: 16ch; }
.oops__lede { max-width: 46ch; color: var(--paper-dim); }
.oops__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
