/* Help pages only. Inherits every colour, font and the .wrap/.btn/.masthead
   rules from /style.css — this file adds the documentation layout on top and
   must not redefine anything the marketing page already owns. */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--action); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.help-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 72px;
}

/* Sidebar */
.help-nav { position: sticky; top: 24px; font-size: 15px; }
/* Desktop: the disclosure is always open and its summary is decoration we
   don't need, so hide the control and let the list stand on its own. */
.help-nav-disclosure > summary { display: none; }
.help-nav h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute);
  margin: 22px 0 8px;
}
.help-nav h4:first-child { margin-top: 0; }
.help-nav ul { list-style: none; margin: 0; padding: 0; }
.help-nav li { margin: 0; }
.help-nav a {
  display: block; padding: 5px 10px; margin-left: -10px; border-radius: 6px;
  color: var(--ink-soft); text-decoration: none; line-height: 1.35;
}
.help-nav a:hover { background: var(--paper-2); color: var(--primary-text); }
.help-nav a[aria-current="page"] {
  background: var(--paper-2); color: var(--primary-text); font-weight: 700;
  box-shadow: inset 2px 0 0 var(--primary);
}

/* Body */
.help-body { max-width: 74ch; }
.help-body h1 { font-size: 38px; margin-bottom: 10px; }
.help-body h2 { font-size: 25px; margin: 40px 0 12px; scroll-margin-top: 24px; }
.help-body h3 { font-size: 19px; margin: 28px 0 8px; }
.help-body p, .help-body li { color: var(--ink-soft); }
.help-body p { margin: 0 0 16px; }
.help-summary { font-size: 19px; color: var(--ink-mute); margin-bottom: 28px; }

.help-body ol, .help-body ul { margin: 0 0 18px; padding-left: 22px; }
.help-body li { margin-bottom: 9px; }
.help-body ol { counter-reset: step; list-style: none; padding-left: 0; }
.help-body ol > li {
  counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px;
}
.help-body ol > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
/* Nested lists inside a step are plain bullets, not a second number ring. */
.help-body ol ul { list-style: disc; padding-left: 20px; margin: 8px 0 0; }
.help-body ol ul > li { padding-left: 0; margin-bottom: 5px; }
.help-body ol ul > li::before { content: none; }

.help-body img {
  display: block; max-width: 100%; height: auto;
  margin: 18px 0 24px; border: 1px solid #e3e6ea; border-radius: 8px;
}

.help-body code {
  background: var(--paper-2); padding: 2px 6px; border-radius: 4px;
  font-size: .87em; color: var(--primary-text);
}
.help-body pre {
  background: var(--ink); color: #e8ebee; padding: 16px 18px;
  border-radius: 8px; overflow-x: auto; margin: 0 0 20px; font-size: 14px;
}
.help-body pre code { background: none; color: inherit; padding: 0; }

.help-body table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.help-body th, .help-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e3e6ea; }
.help-body th { font-family: var(--font-head); font-weight: 800; color: var(--ink); }
.help-body td { color: var(--ink-soft); vertical-align: top; }

/* A blockquote is the house style for a caution or an aside. */
.help-body blockquote {
  margin: 0 0 22px; padding: 14px 18px;
  background: var(--paper-2); border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0;
}
.help-body blockquote p:last-child { margin-bottom: 0; }

/* Content behind a per-council feature flag. Deliberately quieter than a
   blockquote caution: it marks something a council may not have switched on,
   which is not a warning. */
.help-optional-note {
  margin: 0 0 22px; padding: 12px 16px;
  background: var(--paper-2); border: 1px dashed #c9ced6; border-radius: 6px;
  font-size: 15px; color: var(--ink-mute);
}
.help-optional-note strong {
  font-family: var(--font-body); font-size: 12px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute);
  display: block; margin-bottom: 4px;
}
.help-optional { margin-bottom: 22px; }

.help-body hr { border: 0; border-top: 1px solid #e3e6ea; margin: 40px 0 20px; }
.help-foot { font-size: 15px; color: var(--ink-mute); }

/* In-page contents */
.help-toc {
  background: var(--paper-2); border-radius: 8px; padding: 16px 20px; margin: 0 0 32px;
}
.help-toc h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute); margin-bottom: 8px;
}
.help-toc ul { list-style: none; margin: 0; padding: 0; }
.help-toc li { margin-bottom: 4px; font-size: 15px; }

/* Index page cards */
.help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; margin: 0 0 32px; }
.help-card {
  display: block; padding: 18px 20px; border: 1px solid #e3e6ea; border-radius: 10px;
  text-decoration: none; background: var(--panel);
}
.help-card:hover { border-color: var(--primary); }
.help-card strong { display: block; font-family: var(--font-head); font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.help-card span { font-size: 15px; color: var(--ink-mute); }

/* Phones: parents and pupils read this on a phone, and a teacher may check it
   on the way into class, so the sidebar stops being sticky and sits on top. */
@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .help-nav { position: static; }
  /* Collapse the page list behind a disclosure, so the page someone actually
     opened is the first thing on screen rather than 15 links they scroll past. */
  .help-nav-disclosure > summary {
    display: block; cursor: pointer; list-style: none;
    padding: 11px 14px; border: 1px solid #e3e6ea; border-radius: 8px;
    font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink);
    background: var(--paper-2);
  }
  .help-nav-disclosure > summary::-webkit-details-marker { display: none; }
  .help-nav-disclosure > summary::after { content: " ▾"; color: var(--ink-mute); }
  .help-nav-disclosure[open] > summary { margin-bottom: 6px; }
  .help-nav-disclosure[open] > summary::after { content: " ▴"; }
  .help-body h1 { font-size: 30px; }
  .help-body h2 { font-size: 22px; }
}

/* ── The combined print page (print-en.html / print-ga.html) ─────────────── */
.help-print { grid-template-columns: 1fr; padding-top: 32px; }
.print-cover { margin-bottom: 48px; }
.print-cover h1 { font-size: 40px; margin-bottom: 10px; }
.print-page { margin-top: 56px; }
.print-page:first-of-type { margin-top: 0; }

@media print {
  .masthead, .skip-link, footer, .help-nav, .help-toc { display: none !important; }
  .help-layout { display: block; padding: 0; }
  .help-body { max-width: none; }
  /* One page per topic, so the printed guide reads like a handbook rather
     than a single run-on document. */
  .print-page { break-before: page; margin-top: 0; }
  .print-page:first-of-type { break-before: auto; }
  .help-body h2, .help-body h3 { break-after: avoid; }
  .help-body table, .help-body blockquote, .help-body pre, .help-body img { break-inside: avoid; }
  .help-body a { color: inherit; text-decoration: underline; }
  .help-body pre { background: #f4f5f7; color: #0e1116; border: 1px solid #e3e6ea; }
}

/* API reference (/help/api), rendered from docs/openapi.yaml by build-help.mjs. */
.api-download { margin: 0 0 20px; }
.api-op { margin: 0 0 40px; padding-top: 8px; border-top: 1px solid var(--paper-2); }
.api-op h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 6px; }
.api-op h3 code { background: none; padding: 0; font-size: 1em; overflow-wrap: anywhere; }
.api-op h4 { margin: 20px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
.api-summary { font-weight: 600; margin: 0 0 8px; }
.api-method { font-size: 13px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 4px; background: var(--ink-mute); color: #fff; }
.api-method-get { background: #1f6f43; }
.api-method-post { background: #1d4f91; }
.api-method-put, .api-method-patch { background: #8a5a00; }
.api-method-delete { background: #9b2226; }
.api-auth { font-size: 15px; }
.api-params td:first-child { white-space: nowrap; }
.api-req { font-size: 12px; font-weight: 600; color: #9b2226; }
.api-type { font-size: 13px; color: var(--ink-mute); }
.api-response { margin: 0 0 14px; }
.api-response h5 { margin: 0 0 6px; font-size: 15px; font-weight: 500; }
.api-status { font-weight: 700; padding: 1px 7px; border-radius: 4px; background: #e6e6e6; color: #222; }
.api-status-ok { background: #d5ecdd; color: #14502f; }
.api-status-err { background: #f3dcdc; color: #6e1519; }
.api-mime { font-size: 13px; color: var(--ink-mute); }
.api-body { margin: 0 0 8px 8px; }
.api-fields, .api-oneof { margin: 6px 0 6px 0; padding-left: 20px; }
.api-fields li { margin: 4px 0; }
.api-enum { margin-top: 2px; }
.api-schemes dt { margin-top: 12px; font-weight: 600; }
.api-schemes dd { margin: 2px 0 0 0; }
