/*
 * The scripture.tips site. Palette, artwork and panel as on the app's pages
 * (apps/web/src/app/globals.css, docs/branding.md): the artwork fills the window, and the
 * content sits on a plain paper panel over it.
 */
:root {
  --sky-mid: #209bd6;
  --deep: #0054a5;
  --pale: #c6e9fa;
  --sky-legacy: #62d1f7;
  --paper: #fdfcf8;
  --ink: #1d232a;
  --muted: #5b6672;
  --rule: #dfe3e6;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sky-legacy);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

/* A fixed layer rather than `background-attachment: fixed`, which phones ignore. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--sky-legacy) url("/assets/clouds-and-birds.ab71ed2c0265.svg") no-repeat 15% 100% / cover;
}

@media (max-aspect-ratio: 1 / 1) {
  body::before {
    background-size: auto 145%;
    background-position: 0% 100%;
  }
}

a {
  color: var(--deep);
}

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

.site-header {
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  background: rgb(255 255 255 / 0.85);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
}

.site-header nav {
  display: flex;
  gap: 0.5rem;
}

.site-header nav a {
  background: rgb(255 255 255 / 0.85);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  overflow-wrap: anywhere;
  padding: 1.5rem 1.5rem 3rem;
  background: var(--paper);
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1.5rem rgb(0 40 80 / 0.15);
}

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

.site-footer {
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  background: rgb(255 255 255 / 0.85);
  border-radius: 0.4rem;
  padding: 0.25rem 0.6rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.7rem;
  line-height: 1.25;
}

h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.2rem;
}

h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

code {
  background: #eef1f3;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
}

pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  background: #eef1f3;
  border-radius: 0.5rem;
  overflow-wrap: normal;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  text-align: start;
  vertical-align: top;
}

.info-updated,
.version,
.summary,
.crumbs {
  color: var(--muted);
  font-size: 0.9rem;
}

h1 .version,
h2 .version {
  font-weight: 400;
}

/* Screenshots: never wider than the text, with room kept for them while they load. */
figure {
  margin: 1.25rem 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
}

figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* The help: the search, then the topic, then the contents; side by side on a wide screen. */
.help {
  display: grid;
  gap: 1.5rem;
}

.help > * {
  min-width: 0;
}

@media (min-width: 60rem) {
  .help:not(.help-contents) {
    grid-template-columns: 16rem 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 2.5rem;
  }

  .help:not(.help-contents) .help-search {
    grid-column: 1;
    grid-row: 1;
  }

  .help:not(.help-contents) .help-topic {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .help:not(.help-contents) .help-nav {
    grid-column: 1;
    grid-row: 2;
  }
}

.help-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.help-search input {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
}

.search-status {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-status:empty {
  display: none;
}

.search-results {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.search-results li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.search-results a {
  font-weight: 600;
}

.search-results p {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
}

.search-results .where {
  color: var(--muted);
  font-size: 0.85rem;
}

.help-nav h3,
.toc h3 {
  margin: 1rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.help-nav ul,
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-nav li a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  text-decoration: none;
}

.help-nav li a[aria-current] {
  background: var(--pale);
  color: var(--ink);
  font-weight: 600;
}

.help-product {
  margin: 0;
  font-weight: 700;
}

.toc li {
  padding: 0.3rem 0;
}

.toc .summary {
  display: block;
}

.help-outdated {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem;
  background: #fff4d6;
  border: 1px solid #e0b93f;
  border-radius: 0.5rem;
}

.help-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

.help-versions ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-versions a[aria-current] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.pager a {
  max-width: 48%;
}

.pager span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.pager [rel="next"] {
  text-align: end;
}

.crumbs {
  margin: 0 0 0.5rem;
}
