/* Canadian Council of Chief Judges — cccj.ca
   No build step. No JavaScript. Edit this file directly. */

:root {
  --paper:      #FFFFFF;
  --surface:    #F7F8FA;
  --ink:        #191C22;
  --ink-2:      #4E5764;
  --ink-3:      #6B7482;
  --rule:       #E1E4EA;
  --rule-2:     #C9CED7;
  --accent:     #1B3A57;
  --accent-ink: #1B3A57;
  --plate:      transparent;
  --plate-pad:  0;
  --focus:      #B4551F;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #14171C;
    --surface:    #1B1F26;
    --ink:        #E8EAEE;
    --ink-2:      #AEB6C2;
    --ink-3:      #8A93A1;
    --rule:       #2A2F38;
    --rule-2:     #3B424D;
    --accent:     #7FB0DA;
    --accent-ink: #9BC4E8;
    --plate:      #FFFFFF;
    --plate-pad:  10px 14px;
    --focus:      #E8A06A;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Spectral, Georgia, "Times New Roman", serif;
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); line-height: 1.18; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.6rem); line-height: 1.3; }
h3 { font-size: 1.05rem; line-height: 1.35; }
p  { margin: 0; }

a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible,
.skip:focus { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--ink);
  padding: 12px 18px; border: 1px solid var(--rule-2); border-radius: 3px;
  z-index: 10;
}
.skip:focus { left: 16px; top: 16px; }

.shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 88px;
}
@media (max-width: 600px) { .shell { padding: 0 18px 60px; } }

/* ---- masthead ---- */
.masthead {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 32px 0 26px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: block; line-height: 0; background: var(--plate); border-radius: 4px; padding: var(--plate-pad, 0); }
.brand img { display: block; width: 281px; max-width: 100%; height: auto; }
.lang {
  font-size: .875rem; letter-spacing: .02em; white-space: nowrap;
  padding-top: 6px;
}

/* ---- hero ---- */
.hero { padding: 46px 0 8px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { max-width: 20ch; }
.standfirst {
  font-family: Spectral, Georgia, serif;
  font-size: 1.2rem; line-height: 1.55; color: var(--ink-2);
  max-width: 60ch;
}

/* ---- sections ---- */
main { display: flex; flex-direction: column; gap: 52px; }
section { display: flex; flex-direction: column; gap: 18px; }
section p, section > ul { max-width: 68ch; }
section > ul.courts { max-width: none; }

.figure-note {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  font-family: Spectral, Georgia, serif;
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 60ch;
}

.eyebrow {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}

.aims { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.aims > li {
  display: grid; grid-template-columns: 22px 1fr; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.aims > li:first-child { border-top: 1px solid var(--rule); }
.aims .bullet { color: var(--accent-ink); font-weight: 600; line-height: 1.65; }
.aims .partners { margin: 10px 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: .95rem; display: flex; flex-direction: column; gap: 4px; }
.aims .partners li::marker { color: var(--ink-3); }

/* ---- courts ---- */
.courts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.courts li { background: var(--surface); }
.courts a {
  display: flex; flex-direction: column; gap: 3px;
  padding: 15px 18px; height: 100%;
  text-decoration: none; color: var(--ink);
}
.courts a:hover { background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule-2); }
.courts a:hover .court-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.court-name { font-weight: 600; font-size: .98rem; color: var(--accent-ink); }
.court-host { font-size: .8rem; color: var(--ink-3); word-break: break-word; }

/* ---- footer ---- */
footer {
  margin-top: 64px; padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: .86rem; color: var(--ink-3);
  display: flex; flex-direction: column; gap: 5px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
