/* jreonline.com. Uses the 5-role JREonline Style Set (Resources/Branding/jreonline-fonts.mnd, FNT11)
   streamed by Product/website/tools/build.py, with Clan Morrison tartan color tokens. */

@font-face {
  font-family: "JREonline Heading";
  src: url("/fonts/JREonlineHeading.a6c80354a6.woff2") format("woff2");
  font-style: normal;
  font-weight: 350;
  font-display: swap;
}
@font-face {
  font-family: "JREonline Body";
  src: url("/fonts/JREonlineBody.e986d2ce7c.woff2") format("woff2");
  font-style: normal;
  font-weight: 350;
  font-display: swap;
}
@font-face {
  font-family: "JREonline Mono";
  src: url("/fonts/JREonlineMono.14290c9caf.woff2") format("woff2");
  font-style: normal;
  font-weight: 350;
  font-display: swap;
}
@font-face {
  font-family: "JREonline Subhead";
  src: url("/fonts/JREonlineSubhead.33f545c7bf.woff2") format("woff2");
  font-style: normal;
  font-weight: 520;
  font-display: swap;
}
@font-face {
  font-family: "JREonline Legal";
  src: url("/fonts/JREonlineLegal.e3d4cb402c.woff2") format("woff2");
  font-style: normal;
  font-weight: 440;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --font-serif: "JREonline Heading", Georgia, serif;
  --font-sans: "JREonline Body", system-ui, sans-serif;
  --font-mono: "JREonline Mono", ui-monospace, monospace;
  --font-subhead: "JREonline Subhead", "JREonline Heading", Georgia, serif;
  --font-legal: "JREonline Legal", "JREonline Body", system-ui, sans-serif;

  --surface: #f7f5f3;
  --paper: #ffffff;
  --line: #d9d2cc;
  --ink: #1b181d;
  --ink-muted: #6b6970;   /* 4.9:1 on surface */
  --brand: #1474b4;        /* Balmoral blue: fills and rules; 4.6:1 on surface */
  --brand-text: #0d4d7c;   /* brand as text: 8.1:1 on surface */
  --accent: #dc0000;        /* thread red: rules only, not body text */
  --accent-ink: #c80000;    /* 6.1:1 on paper */
  --settled: #006818;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #161417;
    --paper: #201d22;
    --line: #36313a;
    --ink: #f2ede7;
    --ink-muted: #b4abb3;
    --brand: #9dbee0;      /* 9.5:1 on night surface */
    --brand-text: #9dbee0;
    --accent: #dc0000;
    --accent-ink: #ff8a7e;
    --settled: #7ccba0;
  }
}

/* Tokens only these pages use, from the same kit; all four are the same in Night. They sit in a block of their own
   because sos/tools/build_sos.py copies the two blocks above into the emergency page's stylesheet, which must not
   change when these pages do. */
:root {
  --brand-deep: #0d4d7c;   /* the footer band: white on it 8.9:1 */
  --brand-mid: #4672a1;    /* a hairline on brand-deep */
  --thread: #e0e0e0;       /* the bar and secondary text on brand-deep: 6.7:1 */
  --on-brand: #ffffff;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 350;
  font-feature-settings: "cv05" 1;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

/* The page's one measure: the header, the content, and the footer share its edges. */
.wrap {
  width: 100%;
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

a {
  color: var(--brand-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  top: 1rem;
  left: -100rem;
  padding: 0.5rem 1rem;
  background: var(--paper);
}
.skip:focus { left: 1rem; }

/* Header: the wordmark and the three pages. */
.site-header { border-bottom: 1px solid var(--line); }
.site-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--brand-text);
  text-decoration: none;
}
.wordmark-jre { font-family: var(--font-subhead); font-weight: 520; }

.nav ul {
  display: flex;
  gap: clamp(1.25rem, 4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 440;
  text-decoration: none;
}
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--brand); }

/* Title block: the bar, an eyebrow, the title, and a deck. The bar appears here and in the footer, nowhere else. */
.title-block { padding: clamp(3rem, 11vh, 6.5rem) 0 clamp(2.5rem, 8vh, 4.5rem); }

.bar {
  width: 3rem;
  height: 3px;
  margin: 0 0 1.25rem;
  border: 0;
  background: var(--accent);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 440;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

h1 {
  max-width: 21ch;
  margin: 0 0 1.75rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 1.25rem + 3.4vw, 3.375rem);
  font-weight: 350;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0 0 1.1rem; text-wrap: pretty; }

.lead {
  max-width: 38rem;
  margin-bottom: 0;
  font-size: 1.1875rem;
  line-height: 1.55;
}

/* A section: its label in the rail, its text in a 38rem reading column, a hairline above. The label sits level
   with the column's first line. */
.section {
  display: grid;
  grid-template-columns: 13rem minmax(0, 38rem);
  column-gap: clamp(2rem, 7vw, 5.5rem);
  align-items: baseline;
  padding: clamp(2.25rem, 6vh, 3.25rem) 0;
  border-top: 1px solid var(--line);
}
.section > .eyebrow { margin-bottom: 0; }
.column > :last-child { margin-bottom: 0; }

h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 350;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.column > * + h3 { margin-top: 2.25rem; }

h4 {
  margin: 1.9rem 0 0.6rem;
  font-size: 1.0625rem;
  font-weight: 520;
  line-height: 1.4;
}

.column ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
}
.column li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}
.column li::marker { color: var(--ink-muted); }

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand);
}

.more {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 440;
}

/* Facts: rules, not boxes. A heavy rule at the head and the foot, hairlines between the rows. */
.facts {
  margin: 0 0 1.5rem;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.facts > div {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: baseline;
  padding: 0.7rem 0;
}
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt {
  font-size: 0.75rem;
  font-weight: 440;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.facts dd { margin: 0; }
address { font-style: normal; }

.num {
  font-family: var(--font-mono);
  font-size: 0.9375em;
}

/* A statement: one sentence under a rule in the brand color. */
.statement {
  margin: 0;
  padding-top: 1.1rem;
  border-top: 2px solid var(--brand);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
}

/* Footer: the brand as a dark band, the same in Day and Night. */
.site-footer {
  margin-top: clamp(3rem, 9vh, 5.5rem);
  background: var(--brand-deep);
  color: var(--on-brand);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 2.25rem 3rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}
.site-footer .bar {
  margin-bottom: 1rem;
  background: var(--thread);
}
.site-footer .wordmark {
  margin-bottom: 1.1rem;
  color: var(--on-brand);
}
.site-footer .eyebrow { color: var(--thread); }
.site-footer p { margin-bottom: 0.75rem; }
.site-footer a {
  color: var(--on-brand);
  text-decoration-color: var(--thread);
}
.site-footer a[aria-current="page"] { text-decoration-thickness: 2px; }
.site-footer :focus-visible { outline-color: var(--on-brand); }
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer li { margin-bottom: 0.35rem; }
.footer-legal p {
  margin: 0;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--brand-mid);
  color: var(--thread);
  font-size: 0.8125rem;
}

@media (max-width: 50rem) {
  .section {
    grid-template-columns: minmax(0, 38rem);
    row-gap: 0.9rem;
  }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-id { grid-column: 1 / -1; }
}

@media (max-width: 34rem) {
  .facts > div {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.15rem;
  }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
