/* PeakDevs: one stylesheet, system fonts, light and dark by the reader's setting. No outside file is loaded. */

:root {
  color-scheme: light dark;
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1c2127;
  --muted: #4f5965;
  --border: #d9dde2;
  --accent: #1f4e79;
  --accent-strong: #0f2a44;
  --accent-soft: #e7eef6;
  --code-bg: #eff1f3;
  --focus: #b45309;
  --mark-tile: #1f4e79;
  --mark-back: #8cb8e8;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d;
    --surface: #1b2027;
    --text: #e5e8ec;
    --muted: #a9b2bd;
    --border: #2f3641;
    --accent: #8cb8e8;
    --accent-strong: #3d6c99;
    --accent-soft: #1d2b3a;
    --code-bg: #20262e;
    --focus: #f6ad55;
    /* Lighter than the light scheme's navy, which sinks into the dark page; the front peak stays white. */
    --mark-tile: #2d6096;
    --mark-back: #9cc3ee;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 1;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.mark-tile {
  fill: var(--mark-tile);
}

.mark-back {
  fill: var(--mark-back);
  stroke: var(--mark-back);
  stroke-width: 2;
  stroke-linejoin: round;
}

.mark-line {
  fill: none;
  stroke: var(--mark-tile);
  stroke-width: 4.2;
  stroke-linejoin: round;
}

.mark-front {
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linejoin: round;
}

.site-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-links a {
  color: var(--text);
  text-decoration: none;
}

.site-links a:hover,
.site-links a[aria-current='page'] {
  color: var(--accent);
  text-decoration: underline;
}

main.wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 2rem;
  padding-top: 1.5rem;
}

.footer-links {
  flex-direction: column;
  margin: 1rem 0;
}

.fine-print {
  margin: 0;
  padding-bottom: 1.5rem;
  font-size: 0.875rem;
}

/* Text */

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  margin-top: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.1875rem;
}

.prose {
  max-width: var(--measure);
}

.prose li + li {
  margin-top: 0.25rem;
}

.lead {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: var(--measure);
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price {
  font-weight: 600;
}

.note {
  color: var(--muted);
}

code,
pre {
  font-family: ui-monospace, 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
  /* Diagram text shows as typed: no ligature turns --> into one arrow. */
  font-variant-ligatures: none;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.45;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--accent-soft);
}

kbd {
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.3em;
}

/* Home and app pages */

.hero {
  padding: 1rem 0 0.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 0.5rem;
}

.card h3 {
  margin-top: 0;
}

.button {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent-strong);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.help-list {
  padding-left: 1.1rem;
}

.help-summary {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
}

.screenshot {
  margin: 1.5rem 0;
}

.screenshot img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Help pages: the section's pages beside the text on a wide screen, above it on a phone */

.with-sidebar {
  display: grid;
  gap: 1.5rem 3rem;
}

/* A grid item would otherwise grow to its widest code block and widen the page on a phone. */
.with-sidebar > * {
  min-width: 0;
}

@media (min-width: 52rem) {
  .with-sidebar {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .with-sidebar > .section-nav {
    grid-column: 1;
    grid-row: 1;
  }

  .with-sidebar > article {
    grid-column: 2;
    grid-row: 1;
  }
}

.section-nav {
  font-size: 0.9375rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

@media (min-width: 52rem) {
  .section-nav {
    border-top: 0;
    padding-top: 0;
    align-self: start;
    border-right: 1px solid var(--border);
    padding-right: 1.5rem;
  }
}

.section-nav ul {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.section-nav li {
  margin: 0.2rem 0;
}

.section-nav a[aria-current='page'] {
  font-weight: 700;
  color: var(--text);
}

.section-nav-title {
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.section-nav-group {
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

@media print {
  .site-header nav,
  .section-nav,
  .skip-link {
    display: none;
  }
}
