/* BP Notebook public pages. One stylesheet, no web fonts, no scripts.
   Large type and high contrast for older readers; works at 200% zoom;
   follows the system light/dark setting. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f2f5f9;
  --text: #14191f;
  --muted: #3d4752;
  --brand: #234a70;
  --link: #1d4f86;
  --link-visited: #5a3d86;
  --border: #c5ced8;
  --notice-bg: #fff6e0;
  --notice-border: #8a6100;
  --focus: #b35c00;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #1b232c;
    --text: #eef2f6;
    --muted: #c3ccd6;
    --brand: #a9cdf2;
    --link: #9ccaff;
    --link-visited: #d2b8ff;
    --border: #3a4654;
    --notice-bg: #2b2414;
    --notice-border: #e0b44a;
    --focus: #ffb35c;
  }
}

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

html {
  font-size: 112.5%; /* 18px body at the default browser size */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--link);
  border: 2px solid var(--focus);
  z-index: 10;
}

.skip-link:focus {
  top: 0.5rem;
}

.site-header,
.site-footer {
  background: var(--surface);
  border-color: var(--border);
  border-style: solid;
  border-width: 0;
}

.site-header {
  border-bottom-width: 1px;
}

.site-footer {
  border-top-width: 1px;
  margin-top: 3rem;
  color: var(--muted);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

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

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

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.5rem 0; /* tall tap targets */
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 3px;
}

main {
  display: block;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2rem;
  margin: 1.5rem 0 0.5rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

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

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--link-visited);
}

a:hover {
  text-decoration-thickness: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

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

.notice {
  background: var(--notice-bg);
  border-left: 6px solid var(--notice-border);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.notice > :last-child {
  margin-bottom: 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.toc h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 1.15rem;
}

.toc ol {
  margin-bottom: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.cards li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.cards .card-title {
  margin: 0 0 0.5rem;
  padding-top: 0;
  border-top: 0;
  font-size: 1.15rem;
}

.cards p:last-child {
  margin-bottom: 0;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.stores li {
  margin: 0;
}

.store-badge {
  display: inline-block;
  min-height: 3.25rem;
  padding: 0.7rem 1.25rem;
  border: 2px solid var(--text);
  border-radius: 0.5rem;
  color: var(--text);
  font-weight: 700;
}

.store-badge small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
}

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

th {
  background: var(--surface);
}

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

details {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  margin: 0 0 0.75rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.25rem 0;
}

details[open] summary {
  margin-bottom: 0.5rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  a {
    color: inherit;
  }
}
