/* St Rita's College Exam Timer — help page. Same palette as the timer. */

:root {
  --bg: #f6efe6;
  --surface: #fffdf9;
  --surface-2: #f1e6d7;
  --ink: #2b1306;
  --ink-2: #6e4e36;
  --line: #e2d1bb;
  --brand: #4a2208;
  --brand-ink: #fff6e6;
  --gold: #c58d2c;
  --gold-2: #f0c060;
  --link: #8a4b12;
  --note-bg: #fdecc8;
  --note-ink: #8a4300;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140904; --surface: #211108; --surface-2: #2d190c; --ink: #f8eedf; --ink-2: #cfb497;
    --line: #432817; --brand: #2a1305; --link: #f0c060; --note-bg: #3d2606; --note-ink: #f5c46a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #140904; --surface: #211108; --surface-2: #2d190c; --ink: #f8eedf; --ink-2: #cfb497;
  --line: #432817; --brand: #2a1305; --link: #f0c060; --note-bg: #3d2606; --note-ink: #f5c46a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, 0.45vw + 11px, 22px); scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  line-height: 1.55;
}
a { color: var(--link); text-underline-offset: .18em; }
img { max-width: 100%; height: auto; display: block; }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }

/* Header */
.hbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .55rem max(1rem, env(safe-area-inset-right)) .55rem max(1rem, env(safe-area-inset-left));
  background: var(--brand);
  color: var(--brand-ink);
  border-bottom: .25rem solid var(--gold);
}
.crest { width: auto; height: 3rem; }
.brand { flex: 1; min-width: 0; }
.school { font-weight: 700; font-size: 1.25rem; line-height: 1.15; }
.subtitle { color: var(--gold-2); font-weight: 600; font-size: .95rem; }
.back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.75rem;
  padding: .4rem 1rem .4rem .7rem;
  border-radius: .7rem;
  background: var(--gold);
  color: #2b1306;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.back svg { width: 1.2em; height: 1.2em; }
.back:focus-visible, a:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 52rem);
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem 1rem 4rem;
}
.toc { position: sticky; top: 5.5rem; align-self: start; font-size: .95rem; }
.toc-title { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .4rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .3rem .8rem; color: var(--ink-2); text-decoration: none; border-left: 3px solid transparent; margin-left: -2px; }
.toc a:hover { color: var(--ink); border-left-color: var(--gold); }

/* Content */
.content { min-width: 0; }
.lead { font-size: 1.12rem; margin: 0 0 1.5rem; }
section { padding: 1.4rem 0 .6rem; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; padding-top: 0; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: .2rem 0 .8rem; }
p { margin: 0 0 .9rem; }
ol, ul { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }

figure { margin: 0 0 1rem; }
figure img { border-radius: .7rem; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(43, 19, 6, .12); }
figcaption { font-size: .88rem; color: var(--ink-2); margin-top: .4rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Numbered legend matching the gold badges in the screenshots */
ol.steps { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .5rem; }
ol.steps li { display: flex; gap: .7rem; align-items: flex-start; margin: 0; }
.n {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--gold);
  color: #2b1306;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  font-weight: 800;
  font-size: .9rem;
  line-height: 1.5rem;
  text-align: center;
  margin-top: .05rem;
}

table { width: 100%; border-collapse: collapse; margin: 0 0 1.1rem; background: var(--surface); border-radius: .7rem; overflow: hidden; border: 1px solid var(--line); font-size: .96rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td:last-child:not(:only-child) { width: auto; }
table.keys td:first-child { width: 9rem; white-space: nowrap; }
kbd { display: inline-block; padding: .05rem .45rem; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: .35rem; background: var(--surface); }

.note { padding: .7rem .9rem; border-radius: .7rem; background: var(--note-bg); color: var(--note-ink); }

.hfoot { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* Narrow: side by side with the timer, or a phone */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 1rem; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .3rem; border-left: 0; }
  .toc a { border: 1px solid var(--line); border-radius: 99px; padding: .25rem .75rem; margin: 0; background: var(--surface); }
  .pair { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .subtitle { display: none; }
  .back span { display: none; }
  .back { padding: .4rem .6rem; }
  table.keys td:first-child { width: auto; }
}

@media print {
  .hbar { position: static; }
  .toc, .back { display: none; }
  .layout { display: block; padding: 0; }
  section { break-inside: avoid-page; }
  figure img { box-shadow: none; }
}
