/* AusSci site styles. Year colours are appended by tools/build.py from tools/colour.py. */

@font-face {
  font-family: 'Atkinson Next';
  src: url('fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Next';
  src: url('fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Next';
  src: url('fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2') format('woff2');
  font-weight: 200 800; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Next';
  src: url('fonts/atkinson-hyperlegible-next-latin-ext-wght-italic.woff2') format('woff2');
  font-weight: 200 800; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #fbfcf9;
  --surface: #eff3ee;
  --ink: #15231d;
  --ink-2: #3a4943;
  --ink-3: #56645e;
  --rule: #d3dcd6;
  --accent: #1b5e46;
  --accent-2: #0f3f2d;
  --focus: #1b5e46;
  --shell: 62rem;
  --measure: 38rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1512;
    --surface: #151f1a;
    --ink: #e4ebe6;
    --ink-2: #bdcac3;
    --ink-3: #9aa8a1;
    --rule: #2c3a34;
    --accent: #8fd3b2;
    --accent-2: #b8e8cf;
    --focus: #8fd3b2;
  }
}

/* Text size tool: the whole scale is in rem, so changing the root size scales everything. */
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.size-1 { font-size: 125%; }
html.size-2 { font-size: 137.5%; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Atkinson Next', 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  font-variant-numeric: lining-nums;
}
img, svg { max-width: 100%; }
p { margin: 0 0 1rem; }
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.shell { width: min(100% - 2rem, var(--shell)); margin-inline: auto; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; border-radius: 3px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 0.75rem; color: var(--paper); }

/* ---------- Header ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .shell { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.75rem; padding: 0.8rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.333rem; letter-spacing: -0.02em; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; margin-right: auto; }
.site-nav a { color: var(--ink-2); font-weight: 700; font-size: 0.889rem; text-decoration: none; padding: 0.3rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.tools { display: flex; gap: 0.5rem; }
.tool { font: inherit; font-size: 0.778rem; font-weight: 700; color: var(--ink-2); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 0.3rem 0.8rem; cursor: pointer; }
.tool:hover { color: var(--ink); border-color: var(--ink-3); }
.tool[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.site-nav .short { display: none; }

/* ---------- Year strip (every page except the front page) ---------- */
.year-strip { background: var(--surface); border-bottom: 1px solid var(--rule); }
.year-strip ol { list-style: none; margin: 0 auto; padding: 0.55rem 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.year-strip a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.3rem; height: 2.1rem; padding: 0 0.55rem;
  background: var(--paper); color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 0.889rem; letter-spacing: -0.01em;
  border: 1px solid var(--rule); border-bottom: 4px solid var(--y-stripe); border-radius: 3px;
}
.year-strip a:hover { border-color: var(--y-stripe); }
.year-strip a[aria-current="page"] { background: var(--y-tint); color: var(--y-deep); border-color: var(--y-stripe); }

/* ---------- Front page ---------- */
.hero { padding: 3rem 0 0.5rem; }
.hero h1 { font-size: 2.667rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.06; max-width: 19ch; margin-bottom: 1rem; }
.lead { font-size: 1.167rem; line-height: 1.45; color: var(--ink-2); max-width: 34rem; }

.years-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.2rem 0 0.9rem; }
.years-head h2 { font-size: 1.333rem; font-weight: 800; }
.years-head p { margin: 0; color: var(--ink-3); font-size: 0.833rem; }
.years { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.years-f9 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.years-10, .years-senior { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stage { margin-top: 1.1rem; }
.stage-title { font-size: 1rem; font-weight: 800; margin: 0; }
.stage-note { margin: 0.1rem 0 0.7rem; font-size: 0.833rem; line-height: 1.4; color: var(--ink-3); }
.yr-subj { font-size: 1.444rem; font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; min-height: 3.3rem; }
.yr-subj.long { font-size: 1.167rem; }
.yr-subject .yr-name { margin-top: 0.4rem; }
.year-note { margin: 1.8rem 0 0; padding: 0.9rem 1.1rem; background: var(--surface); border-left: 0.3rem solid var(--y-stripe); border-radius: 0 3px 3px 0; }
.subject-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; max-width: 46rem; }
.subject-list li { padding: 1rem 1.1rem; background: var(--y-tint); border-top: 0.45rem solid var(--y-stripe); border-radius: 3px; display: grid; gap: 0.2rem; }
.subject-list a { font-size: 1.222rem; font-weight: 800; color: var(--y-deep); text-decoration: none; }
.subject-list a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.subject-list span { font-size: 0.833rem; color: var(--y-deep); }
.yr {
  display: flex; flex-direction: column; height: 100%; min-height: 11.5rem;
  padding: 0.8rem 0.9rem 0.9rem;
  background: var(--y-tint); color: var(--y-deep); text-decoration: none;
  border-top: 0.5rem solid var(--y-stripe); border-radius: 3px;
}
.yr:hover { color: var(--y-deep); }
.yr:hover .yr-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.yr-num { font-size: 3.333rem; font-weight: 800; line-height: 0.95; letter-spacing: -0.045em; }
.yr-num.long { font-size: 2.2rem; line-height: 1.45; letter-spacing: -0.03em; }
.yr-name { font-weight: 800; font-size: 0.889rem; margin-top: 0.55rem; }
.yr-focus { font-size: 0.833rem; line-height: 1.35; margin-top: 0.2rem; }
.yr-status { margin-top: auto; padding-top: 0.6rem; font-size: 0.778rem; font-weight: 700; opacity: 0.85; }

.about-lessons { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem 3rem; margin: 3.5rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.about-lessons h2 { font-size: 1.333rem; font-weight: 800; }
.about-lessons ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; max-width: var(--measure); }
.about-lessons li { padding-left: 1.1rem; position: relative; }
.about-lessons li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--accent); }
.sister { margin: 2.5rem 0 0; padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: 3px; max-width: 46rem; }
.sister p { margin: 0; }

/* ---------- Inner pages ---------- */
.crumbs { font-size: 0.833rem; color: var(--ink-3); margin: 1.4rem 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.crumbs li + li::before { content: '›'; margin-right: 0.3rem; color: var(--ink-3); }
.crumbs a { font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.page-head { padding: 1.4rem 0 1.6rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: 2.667rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.6rem; }
.page-head .lead { margin: 0; }

.year-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem 2rem; align-items: end; padding: 1.4rem 0 1.6rem; border-bottom: 1px solid var(--rule); }
.badge {
  background: var(--y-tint); color: var(--y-deep);
  border-top: 0.6rem solid var(--y-stripe); border-radius: 3px;
  font-size: 6rem; font-weight: 800; line-height: 1; letter-spacing: -0.05em;
  min-width: 8.5rem; padding: 0.75rem 1.2rem 0.95rem; text-align: center;
}
.year-head h1 { font-size: 2.667rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.5rem; }
.year-head .lead { margin: 0; }

.content { max-width: var(--measure); }
.content h2 { font-size: 1.333rem; font-weight: 800; margin: 2.6rem 0 0.4rem; }
.content > p:first-child { margin-top: 1.8rem; }
.section-note { color: var(--ink-2); margin: 0 0 1rem; }

.cd { border-left: 0.3rem solid var(--y-stripe); padding: 0.2rem 0 0.2rem 1.2rem; margin: 1.4rem 0 1.8rem; }
.cd-code { font-weight: 800; font-size: 0.889rem; letter-spacing: 0.03em; color: var(--y-deep); margin: 0 0 0.3rem; }
.cd blockquote { margin: 0; font-size: 1.111rem; line-height: 1.5; }
.cd-lessons { margin: 0.8rem 0 0; }
.soon { margin: 0.8rem 0 0; font-size: 0.889rem; color: var(--ink-3); }
.content h3 { font-size: 1.111rem; font-weight: 800; margin: 1.8rem 0 0.2rem; }
.also { margin: 0.5rem 0 0; font-size: 0.889rem; }

.lesson { display: block; margin-top: 0.6rem; padding: 0.8rem 1rem; border: 1px solid var(--rule); border-radius: 3px; text-decoration: none; color: var(--ink); }
.lesson:hover { border-color: var(--ink-3); color: var(--ink); }
.lesson-title { display: block; font-weight: 800; color: var(--accent); }
.lesson:hover .lesson-title { text-decoration: underline; }
.lesson-meta { display: block; font-size: 0.833rem; color: var(--ink-3); margin-top: 0.15rem; }
.lesson-text { display: block; font-size: 0.889rem; color: var(--ink-2); margin-top: 0.35rem; }

.links-list { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.links-list li { margin: 0.35rem 0; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-weight: 700; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager .next { margin-left: auto; text-align: right; }

.source { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.778rem; color: var(--ink-3); max-width: var(--measure); }
.source p { margin: 0 0 0.6rem; }
.source.bare { margin-top: 1rem; padding-top: 0; border-top: 0; }
.after-table { margin-top: 1.4rem; }

/* Senior table */
.courses { width: 100%; border-collapse: collapse; margin: 1.6rem 0 0; font-size: 0.944rem; }
.courses caption { text-align: left; font-weight: 800; font-size: 1.333rem; padding-bottom: 0.6rem; }
.courses th, .courses td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--rule); }
.courses thead th { font-size: 0.778rem; color: var(--ink-3); padding-top: 0; }
.courses tbody th { font-weight: 800; white-space: nowrap; }
.courses td.course { font-weight: 700; }
.courses .state { display: block; font-weight: 400; font-size: 0.778rem; color: var(--ink-3); white-space: normal; }

/* ---------- Footer ---------- */
.site-foot { margin-top: 4.5rem; background: var(--surface); border-top: 1px solid var(--rule); padding: 2.2rem 0 2.6rem; font-size: 0.833rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 1.6rem 2.5rem; }
.site-foot h2 { font-size: 0.889rem; font-weight: 800; color: var(--ink); margin: 0 0 0.55rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.foot-years { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.foot-site li { margin-bottom: 0.25rem; }
.site-foot p { margin: 0 0 0.6rem; }
.foot-base { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--ink-3); }

/* ---------- Not found ---------- */
.notfound { padding: 3rem 0 1rem; max-width: var(--measure); }
.notfound h1 { font-size: 2.667rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 1rem; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1020px) {
  .years-f9, .years-10, .years-senior { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-head .shell { gap: 0.45rem 1rem; padding: 0.7rem 0 0.6rem; }
  .tools { order: 2; margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; gap: 0.1rem 1.2rem; }
  .site-nav .full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .site-nav .short { display: inline; }
  .years-head { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .hero { padding-top: 2rem; }
  .hero h1, .page-head h1, .year-head h1, .notfound h1 { font-size: 2.111rem; }
  .years-f9, .years-10 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .years-senior, .subject-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-lessons { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .year-head { grid-template-columns: minmax(0, 1fr); }
  .badge { justify-self: start; font-size: 4.333rem; min-width: 6.5rem; }
  .courses thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .courses, .courses tbody, .courses tr, .courses th, .courses td { display: block; width: 100%; }
  .courses tr { border-bottom: 1px solid var(--rule); padding: 0.85rem 0; }
  .courses th, .courses td { border: 0; padding: 0.15rem 0; }
  .courses td::before { content: attr(data-label); display: block; font-size: 0.722rem; font-weight: 700; color: var(--ink-3); }
}
@media (max-width: 480px) {
  .years-f9, .years-10, .years-senior { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .years { gap: 0.55rem; }
  .subject-list { grid-template-columns: minmax(0, 1fr); }
  .yr { min-height: 10rem; }
  .yr-num { font-size: 2.778rem; }
  .yr-num.long { font-size: 1.889rem; line-height: 1.47; }
}

@media print {
  .site-head .tools, .year-strip, .site-foot nav, .skip { display: none !important; }
  .yr, .badge { border: 1px solid #999; }
  a { color: inherit; }
}

/* Year colours: generated by tools/build.py from tools/colour.py */
[data-y="0"] { --y-stripe: #cfa529; --y-tint: #fdf3d9; --y-deep: #503900; }
[data-y="1"] { --y-stripe: #b4a625; --y-tint: #f7f5da; --y-deep: #463e00; }
[data-y="2"] { --y-stripe: #95a733; --y-tint: #f1f7dd; --y-deep: #3a4200; }
[data-y="3"] { --y-stripe: #72a746; --y-tint: #ebf9e1; --y-deep: #2b4611; }
[data-y="4"] { --y-stripe: #49a45a; --y-tint: #e5fae6; --y-deep: #174921; }
[data-y="5"] { --y-stripe: #00a06d; --y-tint: #e0fbed; --y-deep: #004a2f; }
[data-y="6"] { --y-stripe: #00997f; --y-tint: #dcfcf3; --y-deep: #004b3d; }
[data-y="7"] { --y-stripe: #00918e; --y-tint: #dafcfa; --y-deep: #004a49; }
[data-y="8"] { --y-stripe: #00869b; --y-tint: #d9fbff; --y-deep: #004954; }
[data-y="9"] { --y-stripe: #007aa4; --y-tint: #dbf9ff; --y-deep: #00465d; }
[data-y="10"] { --y-stripe: #006da9; --y-tint: #def8ff; --y-deep: #004264; }
[data-y="11"] { --y-stripe: #075ea9; --y-tint: #e3f6ff; --y-deep: #163e68; }
@media (prefers-color-scheme: dark) {
  [data-y="0"] { --y-stripe: #dab249; --y-tint: #2e2511; --y-deep: #f1dca9; }
  [data-y="1"] { --y-stripe: #c3b74a; --y-tint: #2a2712; --y-deep: #e6e1ab; }
  [data-y="2"] { --y-stripe: #aabb55; --y-tint: #252915; --y-deep: #dae5b0; }
  [data-y="3"] { --y-stripe: #8dbe66; --y-tint: #202a18; --y-deep: #cce9b9; }
  [data-y="4"] { --y-stripe: #6dc079; --y-tint: #1a2b1d; --y-deep: #c0ebc4; }
  [data-y="5"] { --y-stripe: #48bf8e; --y-tint: #152c21; --y-deep: #b4edd0; }
  [data-y="6"] { --y-stripe: #10bda2; --y-tint: #112c26; --y-deep: #aceedd; }
  [data-y="7"] { --y-stripe: #00b8b5; --y-tint: #0e2c2b; --y-deep: #a7edea; }
  [data-y="8"] { --y-stripe: #00b2c5; --y-tint: #0e2b2f; --y-deep: #a7ecf6; }
  [data-y="9"] { --y-stripe: #00aad2; --y-tint: #112a33; --y-deep: #abe9ff; }
  [data-y="10"] { --y-stripe: #31a0db; --y-tint: #152935; --y-deep: #b3e6ff; }
  [data-y="11"] { --y-stripe: #5296df; --y-tint: #1a2837; --y-deep: #bde2ff; }
}
