/* Personalised Education: the small pages (sign in, a creation). The home page's look (Host Grotesk, white, bone grey,
   ink #232323, mint #a1ffcb, soft corners) without the kit, so the sign-in page loads before anyone is signed in. */
:root {
  --bg: #ffffff; --surface: #f3f3f3; --ink: #232323; --muted: #5c5c5c; --line: rgb(35 35 35 / .12);
  --accent: #a1ffcb; --bad: #b42318; --good: #17673f;
  --font: "Host Grotesk", system-ui, sans-serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 22px;
  --wrap: 1200px; --gut: clamp(24px, 5.5vw, 80px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-weight: 500; letter-spacing: -0.035em; margin: 0; }
h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; }
h2 { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }

/* the bar */
.bar { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.logo img { width: 22px; height: 22px; }
.bar nav { display: flex; gap: 22px; font-size: 15px; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 16px/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, opacity .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { background: transparent; color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, transparent); }
.btn:focus-visible, input:focus-visible, .linkish:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.field-label { display: block; font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid color-mix(in oklab, var(--ink) 22%, transparent); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: 400 18px/1 var(--font); }
.row .btn { height: 52px; }
#code { letter-spacing: .3em; font-family: "JetBrains Mono", ui-monospace, monospace; }
.small { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 12px 0 0; }
.note { margin: 14px 0 0; font-size: 15px; }
.note:empty { display: none; }
.note.bad { color: var(--bad); font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.label { font-size: 14px; color: var(--muted); }

/* sign in */
.signin { min-height: calc(100svh - 65px); display: grid; align-items: center; padding: 48px 0; }
.signin__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.signin__text { display: grid; gap: 20px; max-width: 34rem; }
.signin__lead { font-size: 19px; margin: 0; }
.signin__steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.signin__steps li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.signin__steps b { font-weight: 500; }
.signin__pic { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; }
.signin__pic img { width: 100%; height: 100%; object-fit: cover; }
.signin__chip { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: #fff; box-shadow: 0 18px 44px -20px rgb(0 0 0 / .45); font-size: 14px; }
.signin__chip i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e2fbee; color: var(--good); font-style: normal; font-weight: 700; }
.signin__chip b { display: block; font-weight: 500; }
@media (max-width: 860px) {
  .signin { min-height: 0; padding: 32px 0 48px; align-items: start; }
  .signin__grid { grid-template-columns: minmax(0, 1fr); }
  .signin__pic { aspect-ratio: 16 / 10; order: -1; }
  .signin__chip { display: none; }
}
@media (max-width: 520px) { .row { flex-direction: column; } .row .btn { width: 100%; } .bar nav { display: none; } }

/* a creation */
.made { padding: 48px 0 80px; }
.made__head { display: grid; gap: 12px; max-width: 46rem; }
.made__lead { font-size: 19px; margin: 0; }
.panel { margin-top: 32px; border-radius: var(--r-lg); background: var(--surface); padding: clamp(20px, 3vw, 36px); }
.progress { height: 10px; border-radius: 99px; background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.progress i { display: block; height: 100%; width: 3%; background: var(--ink); border-radius: 99px; transition: width .6s ease; }
.wa { margin: 12px 0 0; font-weight: 500; color: var(--good); }
.wa:empty { display: none; }
.stages { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: s; }
.stages li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--muted); font-size: 16px; }
.stages li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 500; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.stages li.done { color: var(--ink); }
.stages li.done::before { content: "✓"; background: var(--accent); box-shadow: none; }
.stages li.now { color: var(--ink); font-weight: 500; }
.stages li.now::before { background: var(--ink); color: #fff; box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 70%, transparent); }
.problem { margin-top: 24px; padding: 16px 18px; border-radius: var(--r-md); background: #fdecea; color: var(--bad); font-weight: 500; }
.result { margin-top: 32px; display: grid; gap: 20px; }
.result video { width: 100%; max-width: 1000px; border-radius: var(--r-lg); background: #111; aspect-ratio: 16 / 9; }
.pagegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pagegrid img { width: 100%; aspect-ratio: 1200 / 1091; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in; transition: transform .25s; }
.pagegrid img:hover { transform: scale(1.03); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.keep { margin-top: 32px; padding: 20px 22px; border-radius: var(--r-md); border: 1px solid var(--line); font-size: 15px; }
.keep__row { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.keep code { font: 400 14px/1.4 "JetBrains Mono", ui-monospace, monospace; background: var(--surface); padding: 10px 12px; border-radius: var(--r-sm); overflow-wrap: anywhere; }
.keep .btn { height: 40px; }
.keep__ends { margin-top: 10px; color: var(--muted); }
.keep__ends:empty { display: none; }

/* the reader */
.reader { position: fixed; inset: 0; z-index: 50; background: rgb(18 18 18 / .97); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 64px 16px 20px; }
.reader.open { display: flex; }
.reader img { max-width: min(1200px, 100%); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 12px; box-shadow: 0 20px 60px rgb(0 0 0 / .45); background: #fff; }
.reader .r-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: #f3f3f3; }
.reader .r-bar b { font: 500 18px/1.2 var(--font); letter-spacing: -0.01em; }
.reader button { background: rgb(255 255 255 / .12); color: #fff; border: 0; border-radius: 999px; cursor: pointer; font: inherit; }
.reader .close { width: 44px; height: 44px; font-size: 22px; }
.reader .r-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 26px; }
.reader .prev { left: 14px; } .reader .next { right: 14px; }
.reader button:hover { background: rgb(255 255 255 / .25); }
.reader button:disabled { opacity: .25; cursor: default; }
.reader .r-count { margin-top: 12px; color: #cfcfcf; font-size: 14px; }
@media (max-width: 700px) { .reader .r-nav { top: auto; bottom: 10px; transform: none; width: 46px; height: 46px; } .reader .r-count { margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
