/* BOC — shared styles. Local only: no remote fonts or assets. */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #545b64;
  --border: #e2e4e8;
  --accent: #1f5f8b;
  --accent-hover: #174a6d;
  --notice-bg: #fff7e6;
  --notice-border: #c77700;
  --notice-text: #4a3000;
  --radius: 10px;
  --max-width: 46rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1b1f23;
    --text: #e8eaed;
    --muted: #a5adb7;
    --border: #2e343a;
    --accent: #7cb8e4;
    --accent-hover: #a3cdec;
    --notice-bg: #2b2210;
    --notice-border: #e0a03a;
    --notice-text: #f5deb3;
  }
}

*,
*::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: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a:hover {
  color: var(--accent-hover);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 10;
}

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 28px;
  height: 28px;
}

.brand small {
  font-weight: 400;
  color: var(--muted);
}

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

.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

/* Main */
main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 2.4rem);
  margin-top: 0;
}

h2 {
  font-size: 1.35rem;
  padding-top: 0.5rem;
}

h3 {
  font-size: 1.1rem;
}

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

li + li {
  margin-top: 0.35rem;
}

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

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--border);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

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

.cards h3 {
  margin: 0 0 0.4rem;
}

.cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Notices */
.notice {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: var(--notice-bg);
  color: var(--notice-text);
  border: 1px solid var(--notice-border);
  border-left-width: 6px;
  border-radius: var(--radius);
}

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

.notice-title {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

.notice a {
  color: inherit;
}

.draft-banner {
  margin-top: 0;
}

/* Table of contents */
.toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  main {
    padding-top: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

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

  body {
    background: #fff;
    color: #000;
  }
}
