:root {
  --ink: #0f172a; --muted: #64748b; --sky: #0284c7; --sky-bright: #0ea5e9; --sky-soft: #e0f2fe;
  --bg: #f7f8fa; --card: #ffffff; --line: #e3e8ef; --note: #fff7e0; --note-ink: #7a5300;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f1f5f9; --muted: #94a3b8; --sky: #38bdf8; --sky-bright: #38bdf8; --sky-soft: #0c2a3d; --bg: #0b1220; --card: #111a2e; --line: #1e2a44; --note: #2a2208; --note-ink: #f5d27a; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", "Arial Hebrew", Arial, sans-serif; line-height: 1.75; -webkit-text-size-adjust: 100%; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 800; letter-spacing: 3px; font-size: 18px; color: var(--sky-bright); }
.site { font-size: 13px; color: var(--muted); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 36px 20px 80px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 76px; font-size: 14px; }
.toc h2 { font-size: 13px; letter-spacing: 0; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink); line-height: 1.4; }
.toc a::before { content: counter(t, decimal-leading-zero) "  "; color: var(--sky); font-weight: 700; font-size: 12px; }
.toc a:hover { background: var(--sky-soft); text-decoration: none; }
.toc-mobile { display: none; }

article { min-width: 0; }
.eyebrow { color: var(--sky); font-weight: 700; font-size: 14px; margin: 0 0 6px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.2; margin: 0 0 10px; font-weight: 800; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.intro { margin: 0 0 22px; color: var(--ink); }
.intro p { color: var(--muted); font-size: 15.5px; }
.operator { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 0 0 8px; font-size: 15px; }
section { padding-top: 34px; scroll-margin-top: 80px; }
h2.sec { display: flex; gap: 12px; align-items: baseline; font-size: 22px; line-height: 1.35; margin: 0 0 12px; font-weight: 800; }
h2.sec span { color: var(--sky); font-size: 14px; font-weight: 800; letter-spacing: 1px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-inline-start: 22px; }
li { margin: 0 0 6px; }
.note { background: var(--note); color: var(--note-ink); border-radius: 14px; padding: 12px 16px; font-size: 15px; margin: 14px 0; }
.foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 860px) {
  .wrap { display: block; padding-top: 24px; }
  .toc { display: none; }
  .toc-mobile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin: 0 0 8px; }
  .toc-mobile summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile ol { margin: 0; padding: 0 12px 12px; list-style: none; counter-reset: m; display: grid; gap: 2px; }
  .toc-mobile li { counter-increment: m; }
  .toc-mobile a { display: block; padding: 8px 8px; border-radius: 10px; color: var(--ink); }
  .toc-mobile a::before { content: counter(m, decimal-leading-zero) "  "; color: var(--sky); font-weight: 700; font-size: 12px; }
}
@media print { .top, .toc, .toc-mobile { display: none; } body { background: #fff; color: #000; } }

/* Site footer: HOP's own sky blue, so it stands apart from the pages above it. */
.site-footer { margin-top: 24px; background: #0369a1; color: #e0f2fe; }
.sf-inner { max-width: 1040px; margin: 0 auto; padding: 48px 20px 28px; }
.sf-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.sf-logo { display: flex; align-items: center; gap: 10px; color: #ffffff; font-weight: 800; letter-spacing: 3px; font-size: 22px; }
.sf-logo svg { width: 28px; height: 28px; }
.sf-brand p { margin: 12px 0 16px; color: #e0f2fe; font-size: 14.5px; line-height: 1.65; max-width: 30ch; }
.sf-soon { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-soon span { border: 1px dashed rgba(255, 255, 255, 0.5); color: #e0f2fe; border-radius: 10px; padding: 5px 12px; font-size: 12.5px; }
.site-footer h2 { margin: 0 0 12px; font-size: 13px; font-weight: 800; color: #ffffff; letter-spacing: 0.3px; opacity: 0.9; }
.site-footer ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 9px; }
.site-footer li { margin: 0; }
.site-footer a { color: #ffffff; font-size: 14.5px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; border-radius: 4px; }
.sf-mail { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; direction: ltr; }
.sf-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.28); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; font-size: 13px; color: #e0f2fe; }
@media (max-width: 760px) {
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .sf-brand, .sf-grid > nav:last-child { grid-column: 1 / -1; }
}
@media (prefers-color-scheme: dark) {
  .site-footer { background: #075985; border-top: 1px solid var(--line); }
}
@media print { .site-footer { display: none; } }

/* Pages with a footer keep it at the bottom even when the content is short. */
body.has-footer { min-height: 100vh; display: flex; flex-direction: column; }
body.has-footer > .site-footer { margin-top: auto; }
body.has-footer > main.home { flex: 1; display: grid; place-items: center; padding: 48px 20px; }
.home h1 { font-size: 40px; letter-spacing: 3px; color: var(--sky-bright); margin: 0; }
body.has-footer > .wrap { width: 100%; }

/* The pages no longer have a table of contents: one centered reading column. */
.wrap { grid-template-columns: minmax(0, 780px); justify-content: center; }
