/* uselastbell.com. One stylesheet for every page.
   Colours, type and spacing are the LastBell web app's own tokens
   (packages/ui/src/tokens, apps/web/src/theme). Inter is served from this
   site, as the web app bundles it: nothing is fetched from anywhere else. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* A local stand-in with Inter's proportions, so nothing moves when Inter arrives. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, 'Inter Variable', 'Inter', 'Inter Fallback', system-ui, 'Segoe UI', sans-serif;
  --font-features: 'cv11', 'ss01', 'calt';

  --bg-page: #ffffff;
  --bg-sunken: #f7f8fa;
  --bg-hover: #eef0f3;
  --text-primary: #0b1220;
  --text-secondary: #5b6472;
  --text-tertiary: #878f9b;
  --border-subtle: #e6e8ec;
  --border-strong: #d5d9e0;
  --border-focus: #2f5bd0;
  --accent-base: #12284c;
  --accent-hover: #1b3a6b;
  --accent-tint: #eef2f8;
  --accent-text: #1b3a6b;
  --on-accent: #ffffff;
  --ok-fill: #0e7a53;
  --ok-text: #ffffff;
  --ok-tint: #e8f5ef;
  --ok-tint-text: #0e7a53;
  --plain-border: #d5d9e0;
  --plain-text: #5b6472;
  --logo-edge: none;

  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-xxl: 24px;
  --sp-x3: 32px;
  --sp-x4: 40px;
  --sp-x5: 48px;
  --sp-x6: 64px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --gutter: 16px;
  --page: 1040px;
  --measure: 40rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #0b0f17;
    --bg-sunken: #111723;
    --bg-hover: #1a2231;
    --text-primary: #e8ecf2;
    --text-secondary: #a3acb9;
    --text-tertiary: #6d7684;
    --border-subtle: #1f2733;
    --border-strong: #2d3746;
    --border-focus: #7fa2e8;
    --accent-base: #e8ecf2;
    --accent-hover: #ffffff;
    --accent-tint: #16233f;
    --accent-text: #7fa2e8;
    --on-accent: #0b1220;
    --ok-fill: #4cc38a;
    --ok-text: #04130d;
    --ok-tint: #0f2a20;
    --ok-tint-text: #5fd3a0;
    --plain-border: #2d3746;
    --plain-text: #a3acb9;
    --logo-edge: 0 0 0 1px #2d3746;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  font-feature-settings: var(--font-features);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus {
  outline: none;
}

/* One focus ring everywhere: 2px, 2px away, as in the app. */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--accent-tint);
  color: var(--text-primary);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}

.skip:focus-visible {
  top: var(--sp-sm);
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header and footer ---------- */

.head {
  border-bottom: 1px solid var(--border-subtle);
}

.head .wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  margin-right: auto;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.logo {
  display: block;
  flex: none;
  border-radius: 22.5%;
  box-shadow: var(--logo-edge);
}

.nav {
  display: flex;
  gap: var(--sp-xl);
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text-primary);
}

.foot {
  margin-top: var(--sp-x6);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-md) var(--sp-xxl);
  padding-top: var(--sp-xxl);
  padding-bottom: calc(var(--sp-xxl) + env(safe-area-inset-bottom, 0px));
}

.foot .brand {
  font-size: 0.9375rem;
  margin-right: auto;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xl);
}

.foot nav a {
  color: var(--text-secondary);
  font-weight: 400;
}

.foot nav a:hover {
  color: var(--text-primary);
}

/* ---------- Home ---------- */

.hero {
  padding: var(--sp-x5) 0 var(--sp-x4);
}

.hero .wrap {
  display: grid;
  gap: var(--sp-x4);
  align-items: center;
}

.eyebrow {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: var(--sp-md);
}

h1 {
  font-size: 2.25rem;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin-top: var(--sp-lg);
  max-width: 34rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.55;
}

.apps {
  margin-top: var(--sp-xxl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 6px var(--sp-md);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.tag b {
  color: var(--text-primary);
  font-weight: 600;
}

.section {
  padding: var(--sp-x5) 0;
  border-top: 1px solid var(--border-subtle);
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: var(--measure);
  text-wrap: balance;
}

.section > .wrap > p {
  margin-top: var(--sp-md);
  max-width: var(--measure);
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 0 var(--sp-x4);
  margin-top: var(--sp-xxl);
}

.grid > li {
  padding: var(--sp-xl) 0;
  border-top: 1px solid var(--border-subtle);
}

.grid > li:first-child {
  border-top: 0;
}

.grid p {
  margin-top: var(--sp-xs);
  color: var(--text-secondary);
}

.also {
  margin-top: var(--sp-lg);
  color: var(--text-secondary);
}

.facts {
  display: grid;
  gap: var(--sp-xxl);
  margin-top: var(--sp-xxl);
}

.facts dt {
  font-size: 1.0625rem;
  font-weight: 600;
}

.facts dd {
  margin-top: var(--sp-xs);
  color: var(--text-secondary);
}

.contact {
  font-size: 1.0625rem;
}

/* ---------- The picture: drawn, not a screenshot ---------- */

.picture {
  display: grid;
  gap: var(--sp-lg);
  padding: var(--sp-lg);
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
}

.screen {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}

.screen__app {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Parent app: a name and the two stops of the day line. */
.child {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.child__circle {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-text);
  font-weight: 600;
}

.child__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-right: auto;
}

.pill {
  padding: 6px var(--sp-md);
  border-radius: 999px;
  background: var(--accent-base);
  color: var(--on-accent);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.line {
  position: relative;
  margin: var(--sp-sm) 0 0 17px;
  padding-left: 27px;
}

.line::before {
  content: '';
  position: absolute;
  left: 0;
  top: -6px;
  bottom: 14px;
  border-left: 2px solid var(--border-subtle);
}

.stop {
  position: relative;
  padding: var(--sp-sm) 0;
}

.stop__ring {
  position: absolute;
  left: -36px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-page);
  border: 1.5px solid var(--plain-border);
  color: var(--plain-text);
}

.stop__ring--ok {
  background: var(--ok-fill);
  border-color: var(--ok-fill);
  color: var(--ok-text);
}

.stop__ring svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop b {
  display: block;
  font-weight: 500;
}

.stop__detail {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Staff app: one list and its rows. */
.list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border-subtle);
}

.list__title {
  font-size: 1.25rem;
  font-weight: 600;
}

.list__count {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 52px;
  border-bottom: 1px solid var(--border-subtle);
}

.row:last-child {
  border-bottom: 0;
}

.row__name {
  margin-right: auto;
  font-weight: 500;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--plain-border);
  color: var(--plain-text);
}

.chip--ok {
  background: var(--ok-fill);
  border-color: var(--ok-fill);
  color: var(--ok-text);
}

.chip svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Text pages: privacy, terms, support, 404 ---------- */

.doc {
  padding: var(--sp-x5) 0 0;
}

.doc .wrap {
  max-width: calc(44rem + 2 * var(--gutter));
}

.doc h1 {
  font-size: 2rem;
}

.doc .meta {
  margin-top: var(--sp-sm);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.doc .intro {
  margin-top: var(--sp-xl);
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.doc h2 {
  margin-top: var(--sp-x4);
  font-size: 1.25rem;
}

.doc h3 {
  margin-top: var(--sp-xxl);
}

.doc p,
.doc ul {
  margin-top: var(--sp-md);
}

.doc ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.doc li + li {
  margin-top: var(--sp-xs);
}

.doc li::marker {
  color: var(--text-tertiary);
}

.toc {
  margin-top: var(--sp-xxl);
  padding: var(--sp-lg) var(--sp-xl);
  background: var(--bg-sunken);
  border-radius: var(--r-lg);
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  list-style: decimal;
  columns: 1;
}

.toc li {
  margin-top: var(--sp-xs);
  color: var(--text-tertiary);
}

.faq {
  margin-top: var(--sp-lg);
}

.faq details {
  border-top: 1px solid var(--border-subtle);
}

.faq details:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  min-height: 56px;
  padding: var(--sp-md) 0;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.5px solid var(--text-tertiary);
  border-bottom: 1.5px solid var(--text-tertiary);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}

.faq details p {
  margin: 0 0 var(--sp-lg);
  color: var(--text-secondary);
}

.cards {
  display: grid;
  gap: var(--sp-lg);
  margin-top: var(--sp-xxl);
}

.cards > li {
  padding: var(--sp-xl);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
}

.cards p {
  margin-top: var(--sp-xs);
  color: var(--text-secondary);
}

.cards .doc-p {
  margin-top: var(--sp-md);
}

.notfound {
  padding: var(--sp-x6) 0;
}

.notfound p {
  margin-top: var(--sp-md);
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.notfound .home {
  display: inline-block;
  margin-top: var(--sp-xxl);
}

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  :root {
    --gutter: 24px;
  }

  .picture {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 840px) {
  :root {
    --gutter: 32px;
  }

  h1 {
    font-size: 3rem;
  }

  .doc h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  .hero {
    padding: var(--sp-x6) 0 var(--sp-x5);
  }

  .section {
    padding: var(--sp-x6) 0;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid > li:nth-child(2) {
    border-top: 0;
  }
}

@media (min-width: 1100px) {
  .hero .wrap {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--sp-x5);
  }

  .picture {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .head,
  .foot,
  .skip {
    display: none;
  }
}

.doc .cards h2 {
  margin-top: 0;
  font-size: 1.0625rem;
  letter-spacing: 0;
}

.doc ul.cards {
  list-style: none;
  padding-left: 0;
}

.doc ul.cards li + li {
  margin-top: 0;
}
