/* owenmaths.com: the public site's look. The same paper, ink and year colours as the Teaching Hub
   (public/site.css), copied here because the public site is built and served on its own. Light only. */
:root {
  color-scheme: light;
  --paper: #fbfcfe;
  --sheet: #ffffff;
  --grid: #e8eef5;
  --grid-dark: #dce4ee;
  --rule: #d2dbe6;
  --ink: #17223a;
  --ink-2: #53607a;
  --faint: #7e8aa0;
  --blue: #2350c8;
  --blue-hover: #1a3e9e;
  --blue-wash: #eaf0fd;
  --hl: #ffe070;
  --y7: #f0694e;
  --y7-tint: #fde8e2;
  --y7-text: #93321a;
  --y8: #3a8ae6;
  --y8-tint: #e0ecfc;
  --y8-text: #174f93;
  --y9: #1fa57a;
  --y9-tint: #daf2e8;
  --y9-text: #0e6648;
  --y10: #8263ee;
  --y10-tint: #ece7fd;
  --y10-text: #4a31a4;
  --y11: #efa318;
  --y11-tint: #fdf1d5;
  --y11-text: #774c00;
  --shadow: 0 1px 2px rgba(23, 34, 58, 0.05), 0 8px 24px rgba(23, 34, 58, 0.07);
  --shadow-lift: 0 2px 6px rgba(23, 34, 58, 0.08), 0 18px 48px rgba(23, 34, 58, 0.14);
  --serif: "STIX Two Text", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --yc: var(--blue);
  --yt: var(--blue-wash);
  --yx: var(--blue-hover);
}
[data-y="7"] { --yc: var(--y7); --yt: var(--y7-tint); --yx: var(--y7-text); }
[data-y="8"] { --yc: var(--y8); --yt: var(--y8-tint); --yx: var(--y8-text); }
[data-y="9"] { --yc: var(--y9); --yt: var(--y9-tint); --yx: var(--y9-text); }
[data-y="10"] { --yc: var(--y10); --yt: var(--y10-tint); --yx: var(--y10-text); }
[data-y="11"] { --yc: var(--y11); --yt: var(--y11-tint); --yx: var(--y11-text); }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
main { flex: 1; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.005em; margin: 0; }
.muted { color: var(--ink-2); }
.faint { color: var(--faint); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; padding: 8px 14px; background: var(--sheet); border: 1.5px solid var(--blue); border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 24px; }
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 0.35em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; background: var(--paper); font: 600 0.85em/1.5 var(--sans); text-align: center; }

/* ---------- top bar and footer ---------- */
.top { background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--rule); backdrop-filter: blur(6px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 21px/1 var(--serif); }
.brand:hover { color: var(--ink); }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--blue); color: #fff; font: 600 19px/1 var(--serif); }
.nav { display: flex; gap: 6px; }
.nav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--blue); background: var(--blue-wash); }
.foot { margin-top: 56px; border-top: 1px solid var(--rule); background: var(--sheet); color: var(--ink-2); font-size: 14px; }
.foot-in { padding-top: 22px; padding-bottom: 28px; }
.foot p { margin: 0 0 6px; }
.foot b { color: var(--ink); }
.foot .faint { font-size: 12.5px; margin-top: 10px; }

main { padding-top: 26px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 7px; color: var(--faint); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn.quiet { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.btn.quiet:hover { border-color: var(--faint); color: var(--ink); background: var(--sheet); }

/* ---------- home ---------- */
.hero { padding: 26px 0 10px; max-width: 760px; }
.hero h1 { font-size: clamp(40px, 6vw, 60px); letter-spacing: -0.015em; }
.lede { margin: 12px 0 0; font-size: 20px; color: var(--ink-2); }
.intro { margin-top: 14px; color: var(--ink-2); max-width: 680px; }
.intro p { margin: 0 0 8px; }
.find { margin-top: 22px; }
.find input {
  width: min(560px, 100%); height: 52px; padding: 0 16px; border: 1.5px solid var(--rule); border-radius: 12px;
  background: var(--sheet); font: 16px var(--sans); color: var(--ink); box-shadow: var(--shadow);
}
.find input:focus { outline: none; border-color: var(--blue); }
.found { list-style: none; margin: 10px 0 0; padding: 6px; width: min(560px, 100%); background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.found .none { padding: 8px 10px; color: var(--ink-2); }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 34px 0 10px; }
.course {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 22px 18px 26px; overflow: hidden;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; color: var(--ink); text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s;
}
.course::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--yc); }
.course:hover { color: var(--ink); border-color: var(--yc); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.c-label { font: 600 26px/1.1 var(--serif); }
.c-full { font-size: 14px; color: var(--ink-2); }
.c-sub { font-size: 13px; color: var(--faint); }
.c-n { align-self: flex-start; margin-top: 10px; padding: 3px 10px; border-radius: 99px; background: var(--yt); color: var(--yx); font-size: 13px; font-weight: 600; }
.newest { margin-top: 34px; }
.newest h2 { font-size: 24px; margin-bottom: 10px; }
.soon { max-width: 640px; margin: 30px 0; }
.soon h1, .soon h2 { font-size: 28px; margin-bottom: 8px; }

/* ---------- lists of lessons ---------- */
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons li a, .found li a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.lessons li a:hover, .found li a:hover { background: var(--paper); color: var(--ink); }
.lessons li a:hover .l-t, .found li a:hover .l-t { color: var(--blue); text-decoration: underline; }
.l-t { font-weight: 600; line-height: 1.3; }
.l-m { font-size: 13px; color: var(--faint); }
.newest .lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 16px; }
.lessons.big { max-width: 760px; padding: 8px; }
.lessons.big .l-t { font-size: 17px; }

/* ---------- course and unit pages ---------- */
.page-h { margin: 6px 0 22px; }
.page-h h1 { font-size: clamp(32px, 4.4vw, 44px); }
.page-h .muted { margin: 8px 0 0; }
.kick { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--yx); }
.kick::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; background: var(--yc); vertical-align: 0; }
.strand { margin: 0 0 28px; }
.strand > h2 { display: flex; align-items: baseline; gap: 10px; font-size: 24px; margin-bottom: 12px; }
.sign { width: 20px; font-family: var(--serif); font-size: 26px; line-height: 1; text-align: center; color: var(--yc); }
.sign.it { font-style: italic; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.unit { padding: 14px 12px 10px; }
.unit h3 { font-size: 19px; margin: 0 6px 6px; }
.unit h3 a { display: flex; gap: 10px; color: var(--ink); text-decoration: none; }
.unit h3 a:hover { color: var(--blue); }
.u-no { color: var(--yx); }

/* ---------- a lesson ---------- */
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.lesson-side { display: flex; flex-direction: column; gap: 14px; }
.lesson-side h2 { font-size: 20px; margin-bottom: 10px; }
.lesson-side p { margin: 0 0 8px; font-size: 15px; }
.viewer { overflow: hidden; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow); }
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #fff; border-bottom: 1px solid var(--rule); }
.stage iframe { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; border: 0; transform-origin: 0 0; background: #fff; }
.stage:fullscreen { background: #000; border: 0; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.controls .grow { flex: 1; }
.shape { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.shape button {
  height: 32px; padding: 0 11px; border: 1px solid var(--rule); border-radius: 99px; background: var(--sheet);
  font: 600 13.5px/1 var(--sans); color: var(--ink); cursor: pointer;
}
.shape button:hover { border-color: var(--yc); background: var(--yt); color: var(--yx); }
.shape small { font-weight: 500; color: var(--faint); }
.dls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dl { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 10px 40px; border: 1px solid var(--rule); border-radius: 12px; color: var(--ink); text-decoration: none; position: relative; }
.dl::before {
  content: ""; position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10.5l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10.5l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dl span { font-weight: 600; }
.dl small { color: var(--faint); font-size: 12.5px; }
.dl:hover { border-color: var(--blue); background: var(--blue-wash); color: var(--ink); }
.dl.main { border-color: var(--blue); }
.how .faint { font-size: 13.5px; margin-top: 10px; }
.pn { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.pn a { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.pn a:hover { background: var(--paper); }
.pn small { color: var(--faint); font-size: 12.5px; font-weight: 600; }
.pn span { font-weight: 600; }

/* ---------- about ---------- */
.prose { max-width: 720px; padding: 26px 30px; }
.prose h1 { font-size: 40px; margin-bottom: 14px; }
.prose p { margin: 0 0 14px; font-size: 17px; }
.contact { font-weight: 600; }

@media (max-width: 980px) {
  .lesson { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .top-in { min-height: 56px; }
  .brand { font-size: 19px; }
  .units { grid-template-columns: minmax(0, 1fr); }
  .controls .btn { height: 38px; padding: 0 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero, .courses, .page-h, .units, .lesson { animation: rise 0.5s var(--ease) both; }
  .courses { animation-delay: 70ms; }
  .units, .lesson { animation-delay: 60ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
