/* Teaching Mate - the public pages around the apps (server/site.js): landing pages, free courses, 404. Light: no
   script, the app's own font and colours. */
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/app/fonts/nunito-latin.woff2') format('woff2');
  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: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/app/fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}
/* Windows has no flag emoji: this font draws only the flags (as in the app), everything else falls through. */
@font-face {
  font-family: 'Twemoji Country Flags'; font-display: swap;
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.8/dist/TwemojiCountryFlags.woff2') format('woff2');
}
:root {
  --bg: #f4f5fb; --surface: #fff; --surface-2: #f0f1f9; --text: #1f2135; --muted: #5d6180; --line: #e1e3ef;
  --primary: #6c5ce7; --primary-2: #5847d8; --primary-soft: #ecebff; --accent: #ff8a3d; --good: #16935f;
  --shadow: 0 1px 2px rgba(25, 25, 60, .06), 0 6px 20px rgba(25, 25, 60, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151f; --surface: #1d1f2d; --surface-2: #262838; --text: #e9eaf4; --muted: #a3a6bf; --line: #33364a;
    --primary: #8b7ff0; --primary-2: #a197f5; --primary-soft: #2c2a4d; --good: #3ccf8e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 'Twemoji Country Flags', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--primary-2); }
@media (prefers-color-scheme: dark) { a { color: var(--primary-2); } }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: min(980px, 100%); margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 18px; padding-bottom: 56px; }

/* the top bar */
.top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 4px 14px; flex-wrap: wrap; flex: 1; justify-content: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 4px 2px; }
.nav a:hover, .nav a[aria-current] { color: var(--primary-2); }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--primary); }
@media (max-width: 720px) {
  .top { gap: 8px; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav a { white-space: nowrap; }
  .top .btn { margin-left: auto; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 800; text-decoration: none; }
.btn:hover { border-color: var(--primary); }
/* the light theme's purple in both themes: white on it is 4.6:1 */
.btn.primary { background: #6c5ce7; border-color: #6c5ce7; color: #fff; }
.btn.primary:hover { background: #5847d8; }
.btn.small { padding: 6px 14px; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }

/* text */
h1 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); line-height: 1.2; margin: 10px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 40px 0 10px; }
h3 { font-size: 1.12rem; margin: 22px 0 6px; }
h3 small { color: var(--muted); font-weight: 600; font-size: .9rem; }
p { margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--text); }
.muted { color: var(--muted); }
ul, ol { padding-left: 1.3em; margin: 0 0 14px; }
li { margin: 4px 0; }
q { quotes: '“' '”'; font-style: italic; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.note { background: var(--primary-soft); border-radius: 14px; padding: 14px 18px; margin: 18px 0; }
.note p:last-child { margin: 0; }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: '›'; margin: 0 6px 0 2px; }
.crumbs a { color: var(--muted); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 14px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.link-card { display: grid; gap: 4px; align-content: start; color: var(--text); text-decoration: none; }
.link-card:hover { border-color: var(--primary); }
.link-card b { color: var(--primary-2); font-size: 1.05rem; }
.link-card span { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.link-card small { color: var(--muted); }
.course-card .ci { font-size: 2rem; line-height: 1; color: var(--text); }

/* screenshots */
figure.shot { margin: 22px 0; }
figure.shot img { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
figure.shot figcaption { color: var(--muted); font-size: .92rem; margin-top: 8px; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 6px; } }

/* a free course */
.course-head { display: flex; gap: 16px; align-items: flex-start; }
.course-head .ci { font-size: 3.2rem; line-height: 1.1; margin-top: 10px; }
.course-head h1 { margin-bottom: 6px; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .92rem; font-weight: 700; }
.unit { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px 8px; margin: 12px 0; }
.unit ul { padding-left: 1.1em; }
.unit li p { margin: 2px 0 6px; }

/* read next, the footer */
.related h2 { font-size: 1.2rem; }
.foot { background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0 20px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; }
.foot-title { font-weight: 800; margin-bottom: 4px; }
.foot ul { list-style: none; padding: 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--primary-2); }
.studio { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; color: var(--muted); font-size: .9rem; }
.studio p { margin: 0; }
.sw-wordmark { flex: none; display: block; width: 90px; height: 48px; color: var(--muted); background: currentColor; -webkit-mask: url(/app/brand/silenos-works-wordmark.png) left center / contain no-repeat; mask: url(/app/brand/silenos-works-wordmark.png) left center / contain no-repeat; }
.sw-wordmark:hover { color: #e2456d; }
@media (max-width: 560px) { .studio { flex-direction: column; align-items: flex-start; } }
