/* Stair Calculator's web pages: its page on rthink.co, privacy policy and terms. The colours are the
   app's (docs/design/DESIGN_SYSTEM.md section 1: ground, surface, ink, line, accent) and the type is
   the app's: IBM Plex Sans, with IBM Plex Mono for figures. */
:root {
  color-scheme: light;
  --ground: #f4f6f9;
  --surface: #ffffff;
  --ink: #161b22;
  --ink2: #3e4752;
  --muted: #56606b;
  --line: #d3d9e0;
  --line-soft: #e3e8ed;
  --accent: #1f5fd1;
  --accent-soft: #e8effc;
  --accent-soft-ink: #1a4fb0;
  --issue: #b42318;
  --pass: #15703f;
  --max-width: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink2);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 95, 209, .3);
}

a:hover {
  border-bottom-color: var(--accent);
}

a:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 120ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: 20px;
}

.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.back,
.wordmark {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border-bottom: 0;
  font-size: 15px;
  font-weight: 600;
}

.back:hover,
.wordmark:hover {
  color: var(--ink);
}

.wordmark {
  gap: 0;
  letter-spacing: .01em;
}

.brand-accent {
  color: var(--accent);
}

.hero {
  padding-block: 46px 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 3.1rem);
  line-height: 1.08;
}

.updated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

main {
  display: grid;
  gap: 12px;
  padding-bottom: 72px;
}

.lead,
.legal-section,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.lead {
  margin-bottom: 4px;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
}

.lead p:last-child,
.legal-section > :last-child,
.card > :last-child {
  margin-bottom: 0;
}

.legal-section,
.card {
  padding: 20px 22px;
}

h2 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

h3 {
  margin: 18px 0 8px;
  font-size: 17px;
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

li::marker {
  color: var(--muted);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

.figure {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.store {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 22px;
  padding: 0 20px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
}

.tagline {
  margin: 14px 0 0;
  color: var(--ink2);
  font-size: 19px;
}

.note {
  padding: 14px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
}

.foot {
  padding-block: 30px 40px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-bottom: 20px;
}

.foot-links a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  border-bottom: 0;
  font-size: 15px;
  font-weight: 600;
}

.foot-links a:hover {
  color: var(--accent);
}

.foot-mark {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
}

.foot-copy {
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-block: 34px 24px;
  }

  .lead,
  .legal-section,
  .card {
    padding: 16px;
  }

  h2 {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link {
    transition: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  .top,
  .foot,
  .skip-link,
  .store {
    display: none;
  }

  .hero {
    padding-block: 0 20px;
  }

  .lead,
  .legal-section,
  .card {
    break-inside: avoid;
    border-color: #bbb;
  }

  a {
    color: #111;
    text-decoration: underline;
    border-bottom: 0;
  }
}
