/* BellRung site: brand colors from the icon and Manrope titles (brand/README.md in the app repository). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
}
:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #16213A;
  --muted: #5A667A;
  --line: #DDE3EC;
  --title: #1B2A4A;
  --navy: #1B2A4A;
  --on-navy: #FFFFFF;
  --on-navy-muted: #AEB9CF;
  --amber: #FFB224;
  --link: #8C5A0B;
  --code-bg: #EDF1F7;
  --note-bg: #FFF6E0;
  --display: "Manrope", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1526;
    --surface: #16203A;
    --ink: #E6EBF3;
    --muted: #9AA6BA;
    --line: #26324A;
    --title: #E6EBF3;
    --link: #FFC24D;
    --code-bg: #1C2742;
    --note-bg: #231F18;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); }

/* Header: a navy band with a thin amber line */
header { background: var(--navy); border-bottom: 3px solid var(--amber); padding: 16px 0; }
.masthead { max-width: 66rem; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-navy); text-decoration: none; font: 800 1.45rem/1 var(--display); letter-spacing: -.01em; }
.brand img { height: 30px; width: auto; display: block; }
.brand:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 4px; }
.tagline { color: var(--on-navy-muted); font-size: .95rem; }

/* Body: the contents column sits on the left on wide screens */
main { max-width: 66rem; margin: 0 auto; padding: 36px 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 48px; }
main > * { min-width: 0; max-width: 44rem; }
@media (min-width: 960px) {
  main:has(> .contents) { grid-template-columns: 13rem minmax(0, 44rem); }
  main:has(> .contents) > * { grid-column: 2; }
  main > .contents { grid-column: 1; grid-row: 1 / span 400; align-self: start; position: sticky; top: 24px; flex-direction: column; border: 0; background: none; padding: 6px 0 0; }
  main > .contents::before { content: "On this page"; display: block; font: 700 .75rem/1.4 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
}

h1, h2, h3 { font-family: var(--display); color: var(--title); line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -.015em; margin: 0 0 14px; }
@media (max-width: 560px) { h1 { font-size: 1.85rem; } }
h2 { font-size: 1.45rem; font-weight: 800; margin: 44px 0 14px; scroll-margin-top: 20px; }
/* The rungs: two short amber bars under each section title, from the two rungs of the bell */
h2::after { content: ""; display: block; width: 28px; height: 4px; margin: 10px 0 8px; background: var(--amber); border-radius: 2px; box-shadow: 0 8px 0 var(--amber); }
h3 { font-size: 1.1rem; font-weight: 700; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
strong { font-weight: 600; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
.lead { font-size: 1.08rem; }
.updated { color: var(--muted); font-size: .92rem; }

.contents { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 14px 16px; margin: 6px 0 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .95rem; }
.contents a { color: var(--muted); text-decoration: none; }
.contents a:hover { color: var(--link); text-decoration: underline; }

.note { background: var(--note-bg); border-left: 4px solid var(--amber); padding: 12px 16px; border-radius: 0 10px 10px 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: 1px 6px; border-radius: 5px; }
ol, ul { padding-left: 1.3em; margin: 0 0 14px; }
li + li { margin-top: 6px; }

/* The rule sits inside the side padding, so it starts where the text does */
footer { max-width: 66rem; margin: 40px auto 0; padding: 0 20px 48px; color: var(--muted); font-size: .9rem; }
footer::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 24px; }
footer p { margin: 0 0 6px; max-width: 44rem; }
footer a { color: var(--muted); }
