/*
 * The project site's look: the application's default palette (Newsdesk,
 * from apps/web/src/looks.gen.css) and its fonts, served from this site.
 * Plain CSS, no build step: the site is built without installing anything.
 */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/Archivo-variable.woff2') format('woff2');
  font-weight: 500 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f3f0e8;
  --paper-alt: #e8e3d7;
  --surface: #fbfaf6;
  --deep: #161512;
  --line: #bdb5a5;
  --ink: #151310;
  --ink-alt: #3f3b34;
  --muted: #5a554b;
  --on-deep: #f3f0e8;
  --on-deep-muted: #c9c3b6;
  --deep-alt: #24221d;
  --line-on-deep: #4a463e;
  --brand: #8a3f0e;
  --brand-on-deep: #ffb347;
  --action: #151310;
  --on-action: #fbfaf6;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161512;
    --paper-alt: #22201b;
    --surface: #1d1b17;
    --line: #4a463e;
    --ink: #f3f0e8;
    --ink-alt: #d9d4c8;
    --muted: #b3ad9f;
    --brand: #ffb347;
    --action: #f3f0e8;
    --on-action: #161512;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand);
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 1rem;
}

.bar {
  max-width: 90rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.masthead {
  background: var(--deep);
  color: var(--on-deep);
}

.masthead .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  min-height: 3.5rem;
  padding-block: 0.5rem;
}

.wordmark {
  font: 800 1.25rem/1 var(--display);
  font-stretch: 112%;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--on-deep);
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  color: var(--on-deep);
}

.masthead nav a:hover,
.masthead nav a[aria-current='page'] {
  color: var(--brand-on-deep);
  text-decoration: underline;
}

main {
  margin: 0 auto;
  padding-block: 2.5rem 4rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

main.doc {
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

main.prose {
  max-width: 46rem;
}

main.wide {
  max-width: 72rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.15;
  margin: 2rem 0 0.75rem;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  font-stretch: 95%;
  margin-top: 0.25rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  font: 600 0.8rem/1.4 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-alt);
  max-width: 44rem;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-alt);
  padding: 0.05em 0.3em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--deep);
  color: var(--on-deep);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  overflow-wrap: normal;
}

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

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

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

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

th {
  font-family: var(--display);
}

li + li {
  margin-top: 0.35rem;
}

/* ---- the homepage ------------------------------------------------------ */

.hero {
  padding: 1.5rem 0 2.5rem;
  border-bottom: 2px solid var(--ink);
}

.hero h1 {
  max-width: 52rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  background: var(--action);
  color: var(--on-action);
  border: 2px solid var(--action);
  border-radius: 4px;
  font: 700 1rem/1 var(--display);
  text-decoration: none;
}

.button:hover {
  color: var(--on-action);
  background: var(--brand);
  border-color: var(--brand);
}

.button.quiet {
  background: transparent;
  color: var(--ink);
}

.button.quiet:hover {
  color: var(--on-action);
}

.grid {
  display: grid;
  gap: 1.25rem;
  margin: 2.5rem 0;
}

@media (min-width: 52rem) {
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.card h2 {
  margin-top: 0.5rem;
  font-size: 1.3rem;
}

.card.plain {
  background: var(--paper-alt);
  margin: 2.5rem 0;
}

.card.plain h2 {
  margin-top: 0;
}

.split {
  display: grid;
  gap: 1rem 3rem;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.ticks {
  padding-left: 1.25rem;
}

.cta {
  border-top: 2px solid var(--ink);
  padding-top: 0.5rem;
  max-width: 46rem;
}

/* ---- the docs ------------------------------------------------------------
   Three columns on a wide screen: the sections, the page, its contents.
   Narrower, the contents go; on a phone the sections fold into a menu above
   the page. */

.docs {
  max-width: 90rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2.5rem;
}

.sidebar,
.on-this-page {
  display: none;
}

.mobile-nav {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.mobile-nav summary {
  cursor: pointer;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font: 700 0.95rem/1 var(--display);
}

.mobile-nav nav {
  padding: 0 1rem 1rem;
}

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

  .mobile-nav {
    display: none;
  }

  .sidebar {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2rem 0.5rem 2rem 0;
    border-right: 1px solid var(--line);
  }
}

@media (min-width: 80rem) {
  .docs {
    grid-template-columns: 15rem minmax(0, 1fr) 13rem;
  }

  .on-this-page {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2.5rem 0 2rem;
    font-size: 0.875rem;
  }
}

.nav-title {
  margin: 1.25rem 0 0.35rem;
  font: 700 0.75rem/1.4 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar ul,
.mobile-nav ul,
.on-this-page ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li + li,
.mobile-nav li + li,
.on-this-page li + li {
  margin-top: 0;
}

.sidebar a,
.mobile-nav a {
  display: block;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink-alt);
  font-size: 0.95rem;
  line-height: 1.35;
}

.sidebar a:hover,
.mobile-nav a:hover {
  background: var(--paper-alt);
  color: var(--ink);
}

.sidebar a[aria-current='page'],
.mobile-nav a[aria-current='page'] {
  background: var(--paper-alt);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand);
}

.on-this-page a {
  display: block;
  padding: 0.2rem 0;
  color: var(--muted);
  text-decoration: none;
}

.on-this-page a:hover {
  color: var(--brand);
}

.on-this-page .level-3 a {
  padding-left: 0.75rem;
}

main.doc {
  min-width: 0;
  max-width: 48rem;
  padding: 2rem 0 4rem;
}

.breadcrumbs {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
}

main.doc h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-top: 0.5rem;
}

main.doc h2 {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

h2,
h3,
h4 {
  scroll-margin-top: 1rem;
}

.anchor {
  margin-left: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
}

h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.edit {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pager a:hover {
  border-color: var(--brand);
}

.pager span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.pager-next {
  text-align: right;
}

.notice {
  background: var(--paper-alt);
  border-left: 4px solid var(--brand);
  padding: 0.75rem 1rem;
}

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

/* ---- search -------------------------------------------------------------- */

.search {
  position: relative;
  flex: 1 1 14rem;
  max-width: 24rem;
  order: 3;
}

@media (min-width: 52rem) {
  .search {
    order: 0;
  }
}

.search input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 2.25rem 0 0.75rem;
  border: 1px solid var(--line-on-deep);
  border-radius: 4px;
  background: var(--deep-alt);
  color: var(--on-deep);
  font: inherit;
  font-size: 0.95rem;
}

.search input::placeholder {
  color: var(--on-deep-muted);
}

.search-key {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font: 0.75rem/1 var(--mono);
  color: var(--on-deep-muted);
  border: 1px solid var(--line-on-deep);
  border-radius: 3px;
  padding: 0.15rem 0.35rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: min(32rem, calc(100vw - 32px));
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  z-index: 20;
}

.search-result {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.search-result:hover,
.search-result.active {
  background: var(--paper-alt);
  color: var(--ink);
}

.search-section {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-title {
  font-weight: 700;
}

.search-excerpt {
  font-size: 0.85rem;
  color: var(--ink-alt);
}

.search-empty {
  margin: 0;
  padding: 0.75rem 0.9rem;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.5rem 0 2.5rem;
}

.foot p {
  margin: 0.25rem 0;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-bottom: 0.5rem;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

@media print {
  .masthead,
  .foot,
  .sidebar,
  .mobile-nav,
  .on-this-page,
  .pager,
  .edit {
    display: none;
  }
}

/* A file name in an eyebrow keeps its case, and a path in a table keeps
   its line: the table scrolls instead. */
.eyebrow a {
  text-transform: none;
}

td code {
  overflow-wrap: normal;
  white-space: nowrap;
}
