/* Melisol pages: one small file, system fonts, light and dark. No external requests.
   The colours are the link pages' (services/melisol_api/src/link_page.ts, boards LinkPage and
   LinkPageD), so melisol.app reads as one site. Contrast on the background: text about 15:1,
   secondary text about 6:1, links about 12:1 in light and 8:1 in dark. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1d2340;
  --text2: #5a637a;
  --surface: #f4f6fa;
  --line: #dce1ea;
  --link: #262c6e;
  --ink: #262c6e;
  --on-ink: #ffffff;
  --draft: #fff4dc;
  --draft-line: #b37400;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1324;
    --text: #eef1f8;
    --text2: #a3abbe;
    --surface: #1e243d;
    --line: #2d3452;
    --link: #9aa3ff;
    --ink: #9aa3ff;
    --on-ink: #0f1324;
    --draft: #2b2412;
    --draft-line: #ffb020;
  }
}

*,
*::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: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.skip {
  position: absolute;
  left: -100vw;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
}

header,
main,
footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  padding-top: 1.25rem;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 1.5rem 0 1rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.5rem;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0 0 0.75rem;
}

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

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

.lead {
  font-size: 1.375rem;
  line-height: 1.45;
}

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

.panel {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.panel > :last-child,
.draft > :last-child {
  margin-bottom: 0;
}

/* The draft notice: shown until counsel has checked the page (README.md, Before publishing). */
.draft {
  background: var(--draft);
  border-left: 4px solid var(--draft-line);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
}

.store {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 1.25rem;
  margin: 0 0.5rem 0.75rem 0;
  border-radius: 1rem;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1rem;
  font-size: 1rem;
}

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

.table-wrap {
  overflow-x: auto;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  font-size: 1rem;
}

footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

footer li {
  margin: 0;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
