/* MS Code Lab company site. One stylesheet, no scripts, no outside requests. */
:root {
  --ink: #1c1a3b;
  --ink-soft: #4b4870;
  --paper: #faf6ec;
  --card: #fffdf7;
  --line: #e4dcc8;
  --brand: #3d2fd0;
  --brand-ink: #ffffff;
  --sun: #f6c443;
  --leaf: #1f7a4d;
  --radius: 14px;
  --wide: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Lexend', system-ui, sans-serif; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; text-wrap: balance; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.mark { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.mark b { color: var(--brand); }
.top nav { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .98rem; }
.top nav a:hover { text-decoration: underline; }

.btn {
  display: inline-block; font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1rem; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); background: var(--card);
  box-shadow: 0 3px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.small { padding: 8px 16px; font-size: .95rem; }
.top nav a.btn { color: var(--brand-ink); }
.top nav a.btn:hover { text-decoration: none; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; gap: 28px; }
.tag { display: inline-block; font-family: 'Lexend', sans-serif; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; background: var(--sun); color: var(--ink); padding: 5px 12px; border-radius: 999px; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 62ch; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.note { font-size: .95rem; color: var(--ink-soft); }
.shot { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 0 var(--ink); background: var(--card); }
.shot img { display: block; width: 100%; height: auto; }
figure { margin: 0; }
figcaption { font-size: .95rem; color: var(--ink-soft); margin-top: 16px; }

/* Sections */
section { padding: 56px 0; }
section.band { background: var(--card); border-block: 1px solid var(--line); }
.head { display: grid; gap: 12px; margin-bottom: 32px; max-width: 64ch; }
.head p { color: var(--ink-soft); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tool-shot { margin: 0 0 36px; }
/* Six cards as two full rows of three, not four and two. */
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.band .card { background: var(--paper); }
.card p { color: var(--ink-soft); }
.status { justify-self: start; font-family: 'Lexend', sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); }
.status.live { background: #c9f0d8; }
.status.soon { background: var(--paper); border-style: dashed; }
.card.soon { border-style: dashed; }
.steps { counter-reset: step; }
.steps .card::before {
  counter-increment: step; content: counter(step); font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.1rem;
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper);
}
ul.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 70ch; }
ul.checks li { padding-left: 34px; position: relative; }
ul.checks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; background: var(--leaf); color: #fff; border-radius: 50%; font-size: .85rem; font-weight: 700; margin-top: 2px; }
ul.checks strong { font-family: 'Lexend', sans-serif; }

/* Sign-in menu in the header: one entry for each open course. */
.signin { position: relative; }
.signin summary { list-style: none; cursor: pointer; color: var(--brand-ink); }
.signin summary::-webkit-details-marker { display: none; }
.signin .menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 0 4px 0 var(--ink); padding: 6px; display: grid; }
.top nav .signin .menu a { padding: 10px 12px; border-radius: 8px; }
.top nav .signin .menu a:hover { background: var(--paper); text-decoration: none; }

/* The course family. Each course has its own colour, used as an accent only. */
.c-trail { --c: #3d2fd0; } .c-maker { --c: #1b6fc2; } .c-blocks { --c: #a84a14; } .c-apps { --c: #1f7a4d; } .c-robots { --c: #a3276b; } .c-cipher { --c: #0b6b78; } .c-net { --c: #8a5a00; }
h3.group { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 36px 0 14px; }
.head + h3.group { margin-top: 0; }
.courses { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.course { background: var(--paper); border: 2px solid var(--ink); border-top: 10px solid var(--c); border-radius: var(--radius); display: grid; align-content: start; overflow: hidden; scroll-margin-top: 84px; }
.course .shot { border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; box-shadow: none; }
.course-body { padding: 22px; display: grid; gap: 12px; align-content: start; }
.hero .tag { justify-self: start; }
.course h3 { font-size: 1.6rem; }
.kind { font-family: 'Lexend', sans-serif; font-weight: 700; color: var(--c, var(--ink)) !important; }
.course-body p { color: var(--ink-soft); }
.facts { margin: 4px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: .92rem; }
.facts dd { margin: 0; color: var(--ink-soft); }
.course .actions { margin-top: 6px; }
.fine { font-size: .9rem; }
.card.soon { border-top: 10px solid var(--c, var(--ink)); border-top-style: solid; scroll-margin-top: 84px; }
.card.soon .facts div { grid-template-columns: 8em 1fr; }

/* Footer */
footer { padding: 36px 0 56px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* Plain pages (privacy) */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 760px; display: grid; gap: 18px; }
.doc h2 { font-size: 1.45rem; margin-top: 18px; }
.doc ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.callout { background: #fff3c9; border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px 18px; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: 'Lexend', sans-serif; }
.table-wrap { overflow-x: auto; }

@media (max-width: 640px) {
  .top nav { gap: 14px; }
  .top nav a.hide-small { display: none; }
  .hero { padding-top: 40px; }
  section { padding: 44px 0; }
}

/* A short observation from the classroom, set apart from the sections around it. */
.aside { margin-top: 32px; display: grid; gap: 12px; justify-items: start; padding: 22px 24px; background: var(--card); border: 2px solid var(--ink); border-left: 10px solid var(--sun); border-radius: var(--radius); }
.aside p { font-family: 'Lexend', sans-serif; font-size: clamp(1.1rem, 2.2vw, 1.35rem); line-height: 1.45; max-width: 60ch; }

/* Course pictures share one shape, so the cards line up whatever size the picture was taken at. */
.course .shot img { aspect-ratio: 16 / 10; object-fit: cover; }

/* Narrow cards: facts wrap inside the card instead of running past its edge. */
.card, .course { min-width: 0; }
.facts div { grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); }
.card.soon .facts div { grid-template-columns: minmax(0, 8em) minmax(0, 1fr); }
.facts dd, .facts dt { min-width: 0; overflow-wrap: anywhere; }
