/* K9solutions, night edition
   Idea: a calm control room after dark. Deep navy from the logo's background, a glow taken from the
   Siamese cat's sapphire eyes, and the cream of its coat for warmth. Products float on glass;
   one 3D display in the hero is the only showpiece, everything else stays quiet and precise. */

@font-face { font-family: "Unbounded"; src: url("/assets/fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin-wght-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }

:root {
  --void: #070b18;
  --deep: #0d142c;
  --glass: rgba(150, 180, 255, .055);
  --glass-hi: rgba(150, 180, 255, .09);
  --line: rgba(160, 190, 255, .14);
  --line-hi: rgba(110, 205, 255, .55);
  --text: #eaf0ff;
  --muted: #9aa6c8;
  --eye: #4cc8ff;
  --eye-deep: #1a8fd6;
  --cream: #f3e6d6;
  --ok: #6fe3a6;
  --bad: #ff9a8b;

  --display: "Unbounded", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: 1.95rem;
  --step-4: clamp(2.2rem, 4.6vw, 3.6rem);

  --r-sm: 8px;
  --r: 14px;
  --glow: 0 0 0 1px var(--line-hi), 0 10px 40px -12px rgba(76, 200, 255, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--void); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 400 var(--step-0)/1.6 var(--body);
  background:
    radial-gradient(900px 520px at 85% -8%, rgba(76, 200, 255, .16), transparent 70%),
    radial-gradient(700px 480px at -10% 30%, rgba(243, 230, 214, .06), transparent 70%),
    var(--void);
  background-attachment: fixed;
  position: relative;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--eye); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--eye); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(76, 200, 255, .35); color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; margin: 0; color: var(--text); }
p { margin: 0; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
@media (max-width: 480px) { .wrap { padding: 0 18px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--eye); color: var(--void); padding: 8px 14px; border-radius: var(--r-sm); z-index: 30; font-weight: 700; }
.skip:focus { top: 12px; }

/* Top */
.announce { border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); text-align: center; padding: 8px 0; background: rgba(13, 20, 44, .6); }
.masthead { position: sticky; top: 0; z-index: 15; background: rgba(7, 11, 24, .72); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 14px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font: 600 1.15rem/1 var(--display); letter-spacing: -.01em; }
.wordmark img { box-shadow: 0 0 0 1px var(--line-hi), 0 0 18px rgba(76, 200, 255, .35); }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: color .15s, background-color .15s; }
.mainnav a:hover { color: var(--text); background: var(--glass-hi); }
.mainnav a[aria-current="page"] { color: var(--text); background: var(--glass-hi); box-shadow: inset 0 0 0 1px var(--line); }

/* Buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 650 1rem/1 var(--body); padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; background: linear-gradient(180deg, #6fd6ff, var(--eye)); color: #03111d; text-decoration: none; cursor: pointer; box-shadow: 0 8px 28px -10px rgba(76, 200, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -10px rgba(76, 200, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-lg { padding: 16px 26px; font-size: 1.0625rem; }
.btn-quiet { background: var(--glass); color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-quiet:hover { background: var(--glass-hi); border-color: var(--line-hi); box-shadow: none; }
.btn-block { width: 100%; }
.buy .btn-quiet { margin-top: 10px; }
.btn-disabled, .btn-disabled:hover { background: var(--glass); color: var(--muted); border-color: var(--line); box-shadow: none; transform: none; cursor: default; }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover { transition: none; transform: none; } }

/* Hero */
.hero { padding: 72px 0 84px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: var(--step-4); max-width: 13ch; font-weight: 650; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 46ch; margin-top: 20px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.assurances { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: var(--step--1); font-weight: 600; }
.assurances li { display: inline-flex; align-items: center; gap: 8px; }
.assurances li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--eye); box-shadow: 0 0 10px var(--eye); }

.holo { position: relative; height: 500px; perspective: 1200px; }
.holo-ring { position: absolute; left: 50%; top: 66%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; border: 1.5px solid rgba(76, 200, 255, .7); box-shadow: 0 0 80px rgba(76, 200, 255, .35), inset 0 0 80px rgba(76, 200, 255, .2); transform: rotateX(76deg); }
.holo-ring-2 { width: 360px; height: 360px; margin: -180px 0 0 -180px; border-color: rgba(243, 230, 214, .35); box-shadow: none; transform: rotateX(76deg); }
.holo-card { position: absolute; margin: 0; width: 250px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-hi); background: var(--deep); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 40px -10px rgba(76, 200, 255, .35); transform-style: preserve-3d; }
.holo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.holo-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .18), transparent 40%); pointer-events: none; }
.holo-card-1 { left: -2%; top: 150px; transform: rotateY(26deg) rotateZ(-3deg); }
.holo-card-2 { left: 50%; margin-left: -150px; top: 30px; z-index: 2; width: 300px; transform: translateZ(60px); }
.holo-card-3 { right: -2%; top: 190px; transform: rotateY(-26deg) rotateZ(3deg); }
.holo-cat { position: absolute; left: 50%; bottom: 40px; width: 84px; height: 84px; margin-left: -42px; border-radius: 50%; z-index: 3; box-shadow: 0 0 0 1px var(--line-hi), 0 0 30px rgba(76, 200, 255, .55); }
@media (prefers-reduced-motion: no-preference) {
  .holo-card, .holo-cat, .holo-ring { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .holo-card-2 { animation-delay: .08s; } .holo-card-3 { animation-delay: .16s; } .holo-cat { animation-delay: .35s; }
  .holo-card-2 { animation-name: rise, float; animation-duration: .9s, 7s; animation-delay: .08s, 1.2s; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(.2, .7, .2, 1), ease-in-out; animation-direction: normal, alternate; }
  @keyframes rise { from { opacity: 0; translate: 0 28px; } }
  @keyframes float { to { translate: 0 -10px; } }
}
@media (max-width: 900px) {
  .hero { padding: 44px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .holo { height: 360px; max-width: 520px; width: 100%; margin: 0 auto; }
  .holo-card { width: 180px; } .holo-card-2 { width: 220px; margin-left: -110px; }
  .holo-card-1 { top: 120px; } .holo-card-3 { top: 140px; }
  .holo-ring { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
  .holo-ring-2 { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
  .holo-cat { bottom: 20px; }
}
@media (max-width: 480px) {
  .holo { height: 300px; }
  .holo-card { width: 132px; } .holo-card-2 { width: 168px; margin-left: -84px; }
  .holo-ring { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .holo-ring-2 { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
  .holo-card-1 { top: 105px; } .holo-card-3 { top: 120px; }
  .holo-cat { width: 64px; height: 64px; margin-left: -32px; }
}

/* Drawn paper previews (used only when a product has no photo) */
.sheet { background: #f7f8fc; border-radius: 4px; aspect-ratio: 8.5 / 11; padding: 9%; color: #4d3d36; overflow: hidden; display: flex; flex-direction: column; gap: 6%; font-family: var(--body); font-size: 15px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6); }
.sheet i, .sheet b { display: block; height: 5px; border-radius: 2px; background: #d9dce6; }
.sheet i.s { width: 60%; }
.sheet b { background: #4d3d36; width: 45%; height: 6px; }
.sheet-lg { max-width: 460px; margin: 0 auto; width: 100%; font-size: 24px; }
.sheet-lg i, .sheet-lg b { height: 9px; }
.ss-title { font: 600 .66em/1.2 var(--display); color: #1d2235; }
.ss-grid { display: grid; grid-template-columns: repeat(4, 1fr); font-size: .5em; font-variant-numeric: tabular-nums; border: 1px solid #d9dce6; }
.ss-grid span { padding: 3px 4px; border-right: 1px solid #d9dce6; border-bottom: 1px solid #d9dce6; text-align: right; white-space: nowrap; color: #1d2235; }
.ss-grid span:nth-child(4n+1) { text-align: left; }
.ss-grid span:nth-child(4n) { border-right: 0; }
.ss-grid .h { background: var(--eye-deep); color: #fff; font-weight: 700; border-color: var(--eye-deep); }
.ss-grid .t { background: var(--cream); font-weight: 700; border-bottom: 0; }
.ss-bars { display: flex; align-items: flex-end; gap: 8%; flex: 1; min-height: 20px; padding: 0 4%; border-bottom: 1px solid #d9dce6; margin-top: auto; }
.ss-bars i { flex: 1; background: var(--eye-deep); border-radius: 1px 1px 0 0; }
.ss-bars .b1 { height: 70%; } .ss-bars .b2 { height: 40%; } .ss-bars .b3 { height: 74%; } .ss-bars .b4 { height: 76%; } .ss-bars .b5 { height: 60%; }
.rs-name { font: 600 .95em/1 var(--display); color: #1d2235; }
.rs-role { font-size: .5em; color: var(--eye-deep); font-weight: 600; margin-top: -3%; }
.rs-cols { display: grid; grid-template-columns: 1fr 2.2fr; gap: 9%; border-top: 2px solid #1d2235; padding-top: 9%; flex: 1; }
.rs-side, .rs-main { display: flex; flex-direction: column; gap: 7px; }
.rs-side b { width: 70%; margin-top: 8px; }
.rs-main b { margin-top: 6px; }
.rs-main b:first-child, .rs-side b:first-child { margin-top: 0; }
.ac-title, .gn-title { font: 600 .72em/1.2 var(--display); color: #1d2235; text-align: center; }
.gn-title { text-align: left; }
.ac-maze, .md { width: 100%; color: #1d2235; }
.ac-start { fill: var(--eye-deep); }
.ac-home { fill: #4d3d36; }
.ac-row { display: flex; justify-content: space-around; align-items: center; margin-top: auto; }
.ac-row span { width: 18%; aspect-ratio: 1; border: 2px dashed #1d2235; }
.ac-row .ac-circle { border-radius: 50%; }
.ac-row .ac-star { border-radius: 2px; transform: rotate(45deg) scale(.8); }
.ac-row .ac-tri { border: 0; width: 0; height: 0; aspect-ratio: auto; border-left: 18px solid transparent; border-right: 18px solid transparent; border-bottom: 30px solid var(--cream); }
.sheet-mandala { justify-content: center; }
.gn-lines { display: flex; flex-direction: column; gap: 9px; }

/* Sections */
.section { padding: 72px 0; }
.section-tight { padding-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head h2 { font-size: var(--step-3); }
.section-band { background: linear-gradient(180deg, rgba(13, 20, 44, .75), rgba(13, 20, 44, .35)); border-block: 1px solid var(--line); }
.page-head { padding: 60px 0 32px; }
.page-head h1 { font-size: var(--step-4); }
.crumbs { padding-top: 28px; font-size: var(--step--1); color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--line-hi); box-shadow: var(--glow); }
@media (prefers-reduced-motion: no-preference) { .card:hover { transform: translateY(-3px); } }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-photo { aspect-ratio: 4 / 3; background: var(--deep); overflow: hidden; border-bottom: 1px solid var(--line); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: no-preference) { .card-link:hover .card-photo img { transform: scale(1.04); } }
.card-desk { background: var(--deep); padding: 28px 20%; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card-desk .sheet { width: 100%; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.card-body p { color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: auto; padding-top: 10px; }
.price { font: 600 1rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--cream); }
.format { font-size: var(--step--1); color: var(--muted); text-align: right; }
.card[hidden] { display: none; }

.shop-search { margin-top: 26px; max-width: 480px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font: 600 .95rem/1 var(--body); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.chip:hover { color: var(--text); border-color: var(--line-hi); }
.chip[aria-pressed="true"] { background: rgba(76, 200, 255, .14); color: var(--text); border-color: var(--line-hi); box-shadow: 0 0 18px -6px rgba(76, 200, 255, .7); }
.empty { margin-top: 20px; color: var(--muted); }

.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.cat { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .15s; }
.cat:hover { border-color: var(--line-hi); }
.cat-n { font-weight: 500; color: var(--eye); font-variant-numeric: tabular-nums; }

/* How buying works */
.steps { display: grid; grid-template-columns: 1fr 2.4fr; gap: 32px 48px; align-items: start; }
.steps h2 { font-size: var(--step-3); }
.steps ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; }
.steps li { counter-increment: step; color: var(--muted); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 600 .95rem/1 var(--display); color: var(--eye); letter-spacing: .04em; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-hi); }
.steps strong { display: block; color: var(--text); font-size: var(--step-1); font-weight: 650; margin-bottom: 6px; }
@media (max-width: 900px) { .steps, .steps ol { grid-template-columns: 1fr; } }

/* Journal */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px 36px; }
.posts-list { grid-template-columns: 1fr; max-width: 780px; }
.post-item { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.post-item time, .article-date { font-size: var(--step--1); color: var(--eye); font-weight: 600; letter-spacing: .02em; }
.post-item h2, .post-item h3 { font-size: 1.25rem; font-weight: 600; }
.post-item h2 a, .post-item h3 a { color: var(--text); text-decoration: none; }
.post-item h2 a:hover, .post-item h3 a:hover { color: var(--eye); }
.post-item p { color: var(--muted); }

.article { padding: 8px 0 80px; }
.article h1 { font-size: var(--step-4); margin-top: 20px; }
.article .article-date { display: block; margin-top: 14px; }
.article-image { margin-top: 28px; border-radius: var(--r); }
.article-back { margin-top: 44px; }
.prose { margin-top: 28px; font-size: 1.1rem; line-height: 1.75; max-width: 66ch; color: #d6def3; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; margin-top: 2em; color: var(--text); }
.prose h3 { font-size: 1rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--eye); }
.prose strong { color: var(--text); }
.prose img { border-radius: var(--r); }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 2px solid var(--eye); color: var(--muted); }

/* Product page */
.product { padding: 20px 0 32px; }
.product-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.product-visual { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 48px 12%; position: sticky; top: 92px; }
.product-visual.has-photo { padding: 10px; }
.product-photo { width: 100%; border-radius: calc(var(--r) - 6px); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: none; cursor: pointer; aspect-ratio: 4 / 3; opacity: .7; transition: opacity .15s, border-color .15s; }
.thumb:hover { opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--eye); opacity: 1; box-shadow: 0 0 14px -4px rgba(76, 200, 255, .8); }
.product-info h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.product-info .lede { font-size: var(--step-1); }
.product-price { font: 600 var(--step-3)/1 var(--display); margin-top: 26px; font-variant-numeric: tabular-nums; color: var(--cream); }
.buy { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.buy-note { font-size: var(--step--1); color: var(--muted); }
.facts { margin: 34px 0 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--glass); }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 12px; padding: 13px 16px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.h-small { font-family: var(--display); font-weight: 600; font-size: .95rem; margin-top: 32px; }
.included { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.included li { padding-left: 28px; position: relative; }
.included li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--eye); border-bottom: 2px solid var(--eye); transform: rotate(-45deg); }
.product-info .prose { font-size: 1.04rem; }
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; gap: 32px; }
  .product-visual { position: static; }
}

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--glass); padding: 18px 20px; transition: border-color .15s; }
.faq details + details { margin-top: 10px; }
.faq details[open] { border-color: var(--line-hi); }
.faq summary { cursor: pointer; font: 600 1.02rem/1.35 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--body); font-weight: 300; font-size: 1.6rem; line-height: .8; color: var(--eye); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 64ch; }

/* Forms */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.contact-grid form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-grid label { display: grid; gap: 6px; font-weight: 600; font-size: .975rem; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 400 1rem/1.4 var(--body); color: var(--text); background: rgba(7, 11, 24, .6); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #6f7a9c; }
select option { background: var(--deep); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--eye); outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(76, 200, 255, .2); }
textarea { resize: vertical; min-height: 140px; }
.shop-search input { padding: 14px 20px; border-radius: 999px; background: rgba(13, 20, 44, .8); }
.contact-grid .btn { justify-self: start; }
.contact-aside .h-small:first-child { margin-top: 0; }
.contact-aside p { color: var(--muted); margin-top: 4px; }
.contact-card h2 { font-size: var(--step-2); }
.contact-card > p { margin-top: 14px; color: var(--muted); }
.form-status { font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--bad); }
@media (max-width: 800px) { .contact-grid, .field-row { grid-template-columns: 1fr; } }

/* Footer */
.footer { margin-top: 40px; padding-top: 60px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(13, 20, 44, .4), rgba(13, 20, 44, .9)); color: var(--muted); }
.footer a { color: var(--text); text-decoration: none; }
.footer a:hover { color: var(--eye); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; }
.signup h2 { font-size: var(--step-2); }
.signup p { margin-top: 10px; max-width: 46ch; }
.signup form { margin-top: 18px; display: grid; gap: 12px; max-width: 500px; }
.signup-row { display: flex; gap: 8px; }
.signup-alt { margin-top: 18px; }
.signup-alt .btn { white-space: normal; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--eye); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links h2 { font: 600 .8rem/1 var(--display); color: var(--eye); letter-spacing: .04em; margin-bottom: 14px; }
.footer-links div { display: flex; flex-direction: column; gap: 9px; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid var(--line); margin-top: 52px; padding-block: 20px 28px; font-size: var(--step--1); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.linklike:hover { color: var(--eye); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .signup-row { flex-direction: column; } .footer-links { grid-template-columns: 1fr 1fr; } }

/* Misc */
.round-logo { border-radius: 50%; }
.notfound { text-align: center; padding: 90px 0; }
.notfound img { margin: 0 auto 22px; box-shadow: 0 0 0 1px var(--line-hi), 0 0 30px rgba(76, 200, 255, .5); }
.notfound .lede { margin-inline: auto; }
.notfound p:last-child { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Cookie consent */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 25; max-width: 780px; margin: 0 auto; background: rgba(13, 20, 44, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--text); border: 1px solid var(--line-hi); border-radius: var(--r); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .7), 0 0 30px -12px rgba(76, 200, 255, .5); padding: 18px 20px; display: flex; gap: 16px 24px; align-items: center; flex-wrap: wrap; }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 320px; font-size: .975rem; color: #d6def3; }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .masthead { position: static; }
  .masthead-row { padding-block: 12px; gap: 8px; }
  .mainnav a { padding: 6px 10px; }
}

/* Catch the yarn */
.game-section { padding-top: 24px; }
.game-how { color: var(--muted); }
.game { position: relative; border: 1px solid var(--line); border-radius: var(--r); background:
  radial-gradient(600px 300px at 50% 120%, rgba(76, 200, 255, .16), transparent 70%),
  linear-gradient(180deg, rgba(13, 20, 44, .9), rgba(7, 11, 24, .9)); overflow: hidden; }
.game.is-playing { border-color: var(--line-hi); box-shadow: var(--glow); }
.game canvas { display: block; width: 100%; height: 380px; touch-action: none; cursor: none; }
.game:not(.is-playing) canvas { cursor: default; }
.game canvas:focus-visible { outline: 2px solid var(--eye); outline-offset: -4px; }
.game-hud { position: absolute; top: 14px; left: 18px; right: 18px; display: flex; gap: 20px; font-size: var(--step--1); color: var(--muted); pointer-events: none; z-index: 1; }
.game-hud strong { font: 600 1rem/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.game-lives { margin-left: auto; color: #ff9ec7; letter-spacing: 3px; font-size: 1.05rem; }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; background: rgba(7, 11, 24, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 2; }
.game-overlay[hidden] { display: none; }
.game-title { font: 650 var(--step-2)/1.2 var(--display); }
.game-msg { color: var(--muted); max-width: 44ch; margin-bottom: 6px; }
@media (max-width: 480px) { .game canvas { height: 340px; } }

/* Lesson plans */
.lesson-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.lesson-card .card-body { padding: 20px; gap: 10px; }
.lesson-card h3 { font-size: 1.1rem; }
.lesson-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .8rem; font-weight: 600; color: var(--eye); background: rgba(76, 200, 255, .1); border: 1px solid rgba(76, 200, 255, .28); padding: 4px 10px; border-radius: 999px; }
.lesson-empty { max-width: 640px; }
.lesson-empty h2 { font-size: var(--step-2); }
.lesson-empty p { margin-top: 12px; color: var(--muted); }
.lesson-grid { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
.lesson-main h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-top: 16px; }
.lesson-side { position: sticky; top: 92px; }
.lesson-side .product-price { margin-top: 0; }
.lesson-side .facts { margin-top: 22px; }
.lesson-terms { margin-top: 16px; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr; gap: 28px; } .lesson-side { position: static; } }
.lesson-note { margin-top: 14px; color: var(--muted); font-size: .975rem; max-width: 60ch; padding-left: 14px; border-left: 2px solid var(--eye); }
.lesson-terms .h-small { margin-top: 18px; }
.lesson-terms .buy-note { margin-top: 6px; }
.teachers-section { padding: 8px 0 24px; }
.teachers { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s; background: linear-gradient(110deg, rgba(76, 200, 255, .1), rgba(243, 230, 214, .05)); }
.teachers:hover { border-color: var(--line-hi); box-shadow: var(--glow); }
.teachers h2 { font-size: var(--step-2); }
.teachers p { margin-top: 8px; color: var(--muted); max-width: 56ch; }

/* Lesson plans by grade */
.divisions { display: grid; gap: 34px; }
.division { display: grid; grid-template-columns: 220px 1fr; gap: 16px 32px; align-items: start; padding-top: 26px; border-top: 1px solid var(--line); }
.division:first-child { border-top: 0; padding-top: 0; }
.division-head h2 { font-size: var(--step-2); }
.division-head p { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.grade-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.grade-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); color: var(--text); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.grade-tile:hover { border-color: var(--line-hi); box-shadow: var(--glow); }
@media (prefers-reduced-motion: no-preference) { .grade-tile:hover { transform: translateY(-2px); } }
.grade-num { font: 650 2rem/1 var(--display); color: var(--eye); text-shadow: 0 0 18px rgba(76, 200, 255, .45); }
.grade-name { font-weight: 650; margin-top: 8px; }
.grade-count { font-size: var(--step--1); color: var(--muted); }
.grade-tile.is-empty .grade-num { color: var(--muted); text-shadow: none; }
.page-head-tight { padding-top: 24px; }
.grade-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.grade-strip a { min-width: 42px; text-align: center; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); text-decoration: none; font: 600 .9rem/1 var(--display); }
.grade-strip a:hover { color: var(--text); border-color: var(--line-hi); }
.grade-strip a[aria-current="page"] { color: var(--void); background: var(--eye); border-color: var(--eye); }
@media (max-width: 800px) { .division { grid-template-columns: 1fr; } }
.was { opacity: .55; font-size: .7em; margin-right: .2em; }
.sale-tag { display: inline-block; font: 600 .8rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase; background: var(--coral, #FF7A6B); color: #fff; padding: 6px 10px; border-radius: 999px; margin: 0 0 10px; }
.free-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 24px; border-radius: 16px; background: rgba(76, 200, 255, .12); border: 1px solid rgba(76, 200, 255, .35); }
.free-banner p { margin: 0; }
.reviews { margin-top: 48px; }
.review { margin: 18px 0 0; padding: 18px 20px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.review blockquote { margin: 6px 0 10px; }
.review figcaption { font-size: .9rem; opacity: .75; }
.stars { color: #ffd75e; letter-spacing: 2px; margin: 0; }
.review-form { margin-top: 48px; }
.review-form .check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.review-form .check input { width: auto; margin-top: 4px; }

/* Subjects and course groups */
.subject-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.subject-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); color: var(--text); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.subject-tile:hover { border-color: var(--line-hi); box-shadow: var(--glow); }
@media (prefers-reduced-motion: no-preference) { .subject-tile:hover { transform: translateY(-2px); } }
.subject-icon { font-size: 1.8rem; line-height: 1; }
.subject-name { font: 650 1.05rem/1.2 var(--display); }
.subject-tile.is-empty { opacity: .6; }
.subject-strip, .course-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.subject-strip a, .course-jump a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); text-decoration: none; font: 600 .85rem/1 var(--display); }
.subject-strip a:hover, .course-jump a:hover { color: var(--text); border-color: var(--line-hi); }
.subject-strip a[aria-current="page"] { color: var(--void); background: var(--eye); border-color: var(--eye); }
.subject-strip a.is-empty { opacity: .55; }
.course-group { margin-top: 34px; scroll-margin-top: 90px; }
.course-group:first-child { margin-top: 0; }
.course-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.course-head h2 { font-size: var(--step-1); }
.course-head p { color: var(--muted); font-size: var(--step--1); margin: 0; }
.course-code { display: inline-block; font: 650 .8rem/1 var(--display); letter-spacing: .05em; color: var(--void); background: var(--eye); padding: 6px 9px; border-radius: 8px; margin-right: 8px; vertical-align: middle; }
.js-shop > .free-banner { margin-bottom: 26px; }

/* Grading assistant (/tools/grading-assistant/) */
.grader-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px 40px; align-items: start; }
.grader-main { display: grid; gap: 20px; }
.grader-step { display: grid; gap: 14px; }
.grader-step h2 { font-size: var(--step-1); display: flex; align-items: center; gap: 12px; }
.grader-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grader-step label, .grader-send label:not(.check) { display: grid; gap: 6px; font-weight: 600; font-size: .975rem; }
.grader-step .btn-quiet, .grader-file { padding: 10px 16px; font-size: .92rem; white-space: normal; text-align: center; line-height: 1.25; }
.grader-file { cursor: pointer; font-weight: 650; }
.grader-file:focus-within { outline: 2px solid var(--eye); outline-offset: 3px; }
.grader-step textarea.is-drop { outline: 2px dashed var(--eye); outline-offset: 2px; }
.grader-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 650 .9rem/1 var(--display); color: var(--void); background: var(--eye); box-shadow: 0 0 14px rgba(76, 200, 255, .45); flex: none; }
.grader-count { font-size: var(--step--1); color: var(--muted); margin-top: -6px; min-height: 1.2em; text-align: right; }
.grader-count.is-near { color: var(--bad); }
.grader-redact { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.grader-aside { position: sticky; top: 92px; }
.grader-aside-p { color: var(--muted); margin-top: 6px; font-size: .97rem; }
.grader-send { display: grid; gap: 16px; }
.grader-send .h-small { margin-top: 0; }
.grader-turnstile:empty { display: none; }
.grader-turnstile { min-height: 65px; }
.grader-notice { padding: 16px 20px; border-radius: var(--r); background: rgba(243, 230, 214, .07); border: 1px solid rgba(243, 230, 214, .28); color: var(--cream); margin-bottom: 24px; }
.grader-notice strong { color: var(--text); }
.grader-soon h2 { font-size: var(--step-2); }
.grader-soon > p { margin-top: 14px; color: var(--muted); }
.grader-soon .included { margin-top: 16px; }
.grader-privacy h2 { font-size: var(--step-2); }
.grader-privacy .prose { margin-top: 12px; font-size: 1rem; }
.footer-soon .opt { font-size: .85em; }

.grader-results { margin-top: 40px; scroll-margin-top: 90px; outline: none; }
.grader-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.grader-results-head h2 { font-size: var(--step-3); }
.grader-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.grader-suggestion { margin: 14px 0 20px; padding: 14px 18px; border-radius: var(--r-sm); border-left: 3px solid var(--eye); background: rgba(76, 200, 255, .08); }
.grader-flag { padding: 16px 20px; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 14px; }
.grader-flag ul { margin: 8px 0 0; padding-left: 1.2em; }
.grader-flag li + li { margin-top: 4px; }
.grader-flag > p + p { margin-top: 6px; }
.grader-flag-title { font: 650 1rem/1.3 var(--display); }
.grader-flag.is-review { background: rgba(255, 154, 139, .08); border-color: rgba(255, 154, 139, .45); }
.grader-flag.is-review .grader-flag-title { color: var(--bad); }
.grader-flag.is-warn { background: rgba(255, 215, 94, .08); border-color: rgba(255, 215, 94, .45); }
.grader-flag.is-warn .grader-flag-title { color: #ffd75e; }
.grader-flag.is-ok { background: rgba(111, 227, 166, .07); border-color: rgba(111, 227, 166, .35); }
.grader-flag.is-ok .grader-flag-title { color: var(--ok); }
.grader-overall { margin-top: 6px; }
.grader-comment { margin: 10px 0 12px; font-size: 1.06rem; max-width: 70ch; }
.grader-label { font: 600 .78rem/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--eye); margin-top: 16px; }
.grader-overall .grader-label { margin-top: 0; }
.grader-level { font: 650 var(--step-2)/1.15 var(--display); color: var(--text); margin-top: 8px; white-space: nowrap; }
.grader-level.is-mismatch { color: var(--bad); }
.grader-crits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 18px; margin-top: 18px; }
.grader-crit > p:not(.grader-label) { margin-top: 6px; color: #d6def3; }
.grader-crit-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.grader-crit-head h3 { font-size: var(--step-1); margin-bottom: 8px; }
.grader-crit-head .grader-level { margin-top: 0; font-size: var(--step-1); }
.grader-quote { margin: 8px 0 0; padding: 4px 0 4px 14px; border-left: 2px solid var(--eye); color: var(--cream); font-style: italic; }
.grader-quote.is-missing { border-left-color: var(--bad); }
.grader-missing { font-size: var(--step--1); color: var(--bad) !important; }
.grader-conf.is-low { color: var(--bad); background: rgba(255, 154, 139, .1); border-color: rgba(255, 154, 139, .4); }
.grader-conf.is-medium { color: #ffd75e; background: rgba(255, 215, 94, .08); border-color: rgba(255, 215, 94, .35); }
.grader-conf.is-high { color: var(--ok); background: rgba(111, 227, 166, .08); border-color: rgba(111, 227, 166, .35); }
.grader-meta { margin-top: 18px; }
@media (max-width: 960px) {
  .grader-grid { grid-template-columns: minmax(0, 1fr); }
  .grader-aside { position: static; }
}
@media (max-width: 560px) {
  .grader-redact { grid-template-columns: 1fr; }
  .grader-crit-head { flex-direction: column; gap: 4px; }
  .grader-level { white-space: normal; }
}
@media print {
  .masthead, .footer, .announce, .grader-form, .grader-notice, .grader-actions, .grader-privacy, .page-head { display: none !important; }
  body, body::before { background: #fff !important; color: #000; }
  .grader-results, .grader-results * { color: #000 !important; background: none !important; box-shadow: none !important; }
}
.grader-aside-first { margin-top: 0; }
/* Grading assistant: credits */
.grader-credits { margin-bottom: 16px; }
.grader-credits > h2 { margin: 0 0 10px; }
.grader-credits .grader-actions { margin: 8px 0 4px; }
.grader-packs { display: grid; gap: 8px; margin: 6px 0 10px; }
.grader-pack { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; }
.grader-pack span { color: var(--eye); font-weight: 650; }
.grader-newkey { margin-bottom: 20px; border: 1px solid var(--eye); }
.grader-key-big { font: 650 1.12rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; word-break: break-all; padding: 12px 14px; border-radius: 12px; background: rgba(76, 200, 255, .08); user-select: all; }

/* Free teacher tools */
.teachers-section .wrap { display: grid; gap: 16px; }
.teachers-tools { background: linear-gradient(110deg, rgba(111, 227, 166, .08), rgba(76, 200, 255, .05)); }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--line-hi); box-shadow: var(--glow); transform: translateY(-2px); }
.tool-card h2 { font-size: var(--step-1); }
.tool-card p { color: var(--muted); flex: 1; }
.tool-card .btn { align-self: flex-start; }
.tool-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font: 700 1.3rem/1 var(--display); color: var(--void); background: linear-gradient(180deg, #6fd6ff, var(--eye)); box-shadow: 0 0 18px rgba(76, 200, 255, .45); }
.tool-more { margin-top: 26px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.tool-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .tool-grid-2 { grid-template-columns: 1fr; } }
.tool-box { display: grid; gap: 14px; }
.tool-box h2 { font-size: var(--step-1); }
.tool-box h3.h-small { margin: 6px 0 -4px; }
.tool-box label { display: grid; gap: 6px; font-weight: 600; font-size: .975rem; }
.tool-result { font-weight: 600; color: var(--text); padding: 12px 14px; border-radius: var(--r-sm); background: rgba(76, 200, 255, .08); border: 1px solid var(--line); }
.tool-details summary { cursor: pointer; color: var(--eye); font-weight: 600; }
.tool-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .95rem; }
.tool-table th, .tool-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tool-table th { color: var(--muted); font-weight: 600; }
.tool-foot { margin-top: 20px; max-width: 90ch; }
.timer-display { text-align: center; align-content: center; min-height: 360px; background: linear-gradient(180deg, rgba(76, 200, 255, .07), rgba(13, 20, 44, .4)); }
.timer-display:fullscreen { min-height: 100vh; border-radius: 0; background: var(--void); padding: 6vh 6vw; }
.timer-now { font: 650 var(--step-2)/1.2 var(--display); color: var(--eye); }
.timer-clock { font: 700 clamp(4rem, 14vw, 9rem)/1 var(--display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.timer-display:fullscreen .timer-clock { font-size: 28vh; }
.timer-display:fullscreen .timer-now { font-size: 6vh; }
.timer-display.is-low .timer-clock { color: var(--cream); }
.timer-bar { height: 10px; border-radius: 999px; background: var(--glass-hi); overflow: hidden; }
.timer-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--eye-deep), var(--eye)); transition: width .25s linear; }
.timer-next { color: var(--muted); }
.timer-controls { justify-content: center; }
.timer-keys { margin-top: 4px; }
.timer-plan { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; counter-reset: chunk; }
.timer-plan li { counter-increment: chunk; }
.timer-row::before { content: counter(chunk); color: var(--muted); font-weight: 600; min-width: 1.2em; }
.tool-box label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.timer-row { display: grid; grid-template-columns: auto 1fr 84px auto auto; gap: 8px; align-items: center; }
.timer-row .timer-del { padding: 10px 14px; font-size: .9rem; }
@media (max-width: 520px) { .timer-row { grid-template-columns: auto 1fr 70px auto; } .timer-row .opt { display: none; } }

/* 404: "Off the shelf" */
.notfound { padding: 70px 0 20px; }
.shelf-game { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: linear-gradient(180deg, rgba(243, 230, 214, .05), rgba(13, 20, 44, .5)); }
.shelf-head h2 { font-size: var(--step-2); }
.shelf-how { color: var(--muted); margin-top: 6px; }
.shelf-hud { display: flex; gap: 22px; margin: 16px 0 12px; font-weight: 600; color: var(--muted); }
.shelf-hud strong { color: var(--text); font-variant-numeric: tabular-nums; }
.shelf-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; padding: 0 6px; }
.shelf-spot { position: relative; height: 104px; border: 0; background: transparent; border-bottom: 10px solid #6b4a32; box-shadow: 0 14px 0 -8px rgba(0, 0, 0, .35); cursor: pointer; color: inherit; overflow: visible; touch-action: manipulation; }
.shelf-spot:nth-child(n + 5) { margin-top: 18px; }
.shelf-spot:disabled { cursor: default; }
.shelf-spot:focus-visible { outline: 2px solid var(--eye); outline-offset: 2px; border-radius: 8px 8px 0 0; }
.shelf-item { display: block; font-size: 52px; line-height: 1; transform: translateY(30px) scale(.4); opacity: 0; transition: transform .14s ease-out, opacity .14s; }
.shelf-spot.has-item .shelf-item { transform: translateY(0) scale(1); opacity: 1; }
.shelf-spot.is-gone .shelf-item { transform: translateY(20px) scale(.6); opacity: 0; }
.shelf-spot.is-miss { animation: shelf-shake .18s; }
.shelf-key { position: absolute; left: 6px; bottom: 4px; font: 600 .7rem/1 var(--body); color: rgba(234, 240, 255, .35); }
.shelf-fx { position: absolute; left: 50%; top: 0; transform: translateX(-50%); font: 700 1.2rem/1 var(--display); color: var(--ok); animation: shelf-up .7s ease-out forwards; pointer-events: none; }
.shelf-fx.is-bad { color: var(--bad); }
.shelf-fall { position: absolute; left: 50%; top: 18px; font-size: 52px; line-height: 1; pointer-events: none; animation: shelf-fall .9s ease-in forwards; }
@keyframes shelf-up { to { transform: translate(-50%, -34px); opacity: 0; } }
@keyframes shelf-fall { 0% { transform: translate(-50%, 0) rotate(0); } 100% { transform: translate(calc(-50% + var(--spin) * 40px), 220px) rotate(calc(var(--spin) * 200deg)); opacity: 0; } }
@keyframes shelf-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.shelf-overlay { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; padding: 24px; border-radius: var(--r); background: rgba(7, 11, 24, .82); backdrop-filter: blur(3px); }
.shelf-overlay[hidden] { display: none; }
.shelf-title { font: 700 var(--step-3)/1.1 var(--display); }
.shelf-msg { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.shelf-overlay .btn { justify-self: center; }
@media (max-width: 560px) { .shelf-spot { height: 84px; } .shelf-item, .shelf-fall { font-size: 40px; } .shelf-board { gap: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .shelf-item, .timer-bar span { transition: none; } .shelf-spot.is-miss { animation: none; } }
@media (hover: none) { .shelf-key { display: none; } }
@media (max-width: 430px) { .mainnav { gap: 2px; } .mainnav a { padding: 6px 8px; font-size: .94rem; } }

/* Product photos on lesson cards and pages */
.lesson-photo { aspect-ratio: 16 / 9; }
.lesson-cover { margin: 4px 0 28px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--deep); }
.lesson-cover img { display: block; width: 100%; height: auto; }
.holo-lesson img { aspect-ratio: 16 / 9; }
.section-intro { color: var(--muted, #9aa6c8); margin: -6px 0 20px; max-width: 760px; }

/* Lesson pages: look inside gallery */
.look-inside { margin: 2rem 0; }
.look-inside h2 { margin-bottom: .25rem; }
.look-inside-note { color: var(--muted); margin: 0 0 1rem; }
.inside-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.inside-page { margin: 0; }
.inside-page.is-portrait { grid-column: span 2; max-width: 520px; }
.inside-page a { display: block; border: 1px solid var(--line, rgba(0,0,0,.12)); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); transition: transform .15s ease; }
.inside-page a:hover, .inside-page a:focus-visible { transform: translateY(-2px); }
.inside-page img { display: block; width: 100%; height: auto; }
.inside-page figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
@media (min-width: 900px) { .inside-grid { grid-template-columns: 1fr 1fr .62fr; } .inside-page.is-portrait { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { .inside-page a { transition: none; } }

.anywhere-note { margin: 16px 0 0; color: var(--muted); max-width: 860px; }
.anywhere-note strong { color: var(--text); }

/* Report card comment builder */
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
@media (max-width: 520px) { .skill-grid { grid-template-columns: 1fr; } }
.comment-results { align-content: start; }
.next-student { display: flex; align-items: flex-end; }

/* ===== rubric-builder (tool) ===== */
/* Rubric builder (/tools/rubric-builder/). Every class starts with rb-.
   .rb-page is added to <html> by rubric-builder.js, so the print rules below only apply on this page. */
.rb-layout { display: grid; gap: 18px; }
.rb-app [hidden] { display: none !important; }
.rb-section-head { display: grid; gap: 6px; }
.rb-app label { align-content: start; }
.rb-app textarea.rb-short { min-height: 88px; }
.rb-app textarea.rb-ldesc { min-height: 150px; }

/* Criteria editor */
.rb-crit-list { display: grid; gap: 16px; }
.rb-crit { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(7, 11, 24, .38); }
.rb-crit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rb-crit-num { font-size: 1.02rem; }
.rb-crit-max { font: 400 .9rem/1.4 var(--body); letter-spacing: 0; }
.rb-crit-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-sm { padding: 8px 14px; font-size: .875rem; }
.rb-sm:disabled, .rb-x:disabled { opacity: .4; cursor: default; transform: none; }
.rb-sm:disabled:hover, .rb-x:disabled:hover { background: var(--glass); border-color: var(--line); }
.rb-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rb-level { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--glass); }
.rb-level-top { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.rb-noscore .rb-level-top { grid-template-columns: minmax(0, 1fr) auto; }
.rb-noscore .rb-pts { display: none; }
.rb-app .rb-level label, .rb-app .rb-fill label { gap: 4px; font-size: .85rem; }
.rb-app .rb-level input, .rb-app .rb-level textarea { padding: 8px 10px; font-size: .95rem; }
.rb-label { color: var(--muted); }
.rb-app .rb-crit > .field-row .rb-label { color: var(--text); }
.rb-x { width: 38px; height: 38px; padding: 0; font-size: 1.25rem; line-height: 1; }
.rb-app input.rb-bad { border-color: var(--bad); }
.rb-fill { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px dashed var(--line); }
.rb-fill .btn { padding: 12px 18px; font-size: .92rem; }
@media (max-width: 760px) {
  .rb-fill { grid-template-columns: 1fr; }
  .rb-fill .btn { justify-self: start; }
  .rb-crit { padding: 14px; }
}
@media (max-width: 480px) {
  .rb-levels { grid-template-columns: 1fr; }
  .rb-crit-tools { width: 100%; }
  .rb-crit-tools .rb-sm { flex: 1 1 auto; padding: 8px 10px; }
}

/* The rubric itself: a white "sheet", the same as it prints */
.rb-out-head { display: grid; gap: 12px; }
.rb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-sm); }
.rb-sheet, .rb-check-sheet { background: #fff; color: #111; padding: 28px; }
.rb-sheet { width: fit-content; min-width: 100%; }
.rb-sheet-title { color: #111; font-size: 1.35rem; margin-bottom: 8px; }
.rb-sheet-desc { color: #333; margin-bottom: 14px; max-width: 90ch; white-space: pre-line; }
.rb-check-name { margin: 6px 0 10px; font-weight: 600; color: #111; white-space: pre-wrap; }
.rb-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .9rem; line-height: 1.45; color: #111; }
.rb-table th, .rb-table td { border: 1px solid #7d8597; padding: 8px 10px; text-align: left; vertical-align: top; }
.rb-table thead th { background: #e8ecf3; font-weight: 700; }
.rb-table tbody th, .rb-table tfoot th, .rb-table tfoot td { background: #f4f6fa; }
.rb-table tbody th { font-weight: 400; }
.rb-table tfoot th, .rb-table tfoot td { font-weight: 700; }
.rb-col-crit { width: 20%; }
.rb-col-comments { width: 16%; }
.rb-th-title, .rb-row-title, .rb-cell-title { display: block; font-weight: 700; }
.rb-th-pts { display: block; font-weight: 400; font-size: .86em; color: #444; }
.rb-row-desc { display: block; margin-top: 2px; font-size: .88em; color: #333; white-space: pre-line; }
.rb-row-max { display: block; margin-top: 4px; font-size: .86em; font-style: italic; color: #444; }
.rb-cell-title { margin-bottom: 2px; }
.rb-cell-desc { display: block; white-space: pre-line; }
.rb-table td.rb-empty { background: #f7f7f7; }
.rb-check-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rb-check-list li { display: flex; gap: 8px; }
.rb-box { flex: none; font-size: 1.15em; line-height: 1.25; }
.rb-print-only { display: none; }
@media (max-width: 480px) { .rb-sheet { padding: 18px; } }

/* Printing: only the rubric (or the checklist), black on white */
@page rb-land { size: landscape; margin: 12mm; }
@page rb-port { size: portrait; margin: 12mm; }
@media print {
  .rb-page .masthead, .rb-page .footer, .rb-page .announce, .rb-page .page-head, .rb-page .consent, .rb-page .skip, .rb-noprint { display: none !important; }
  .rb-page body, .rb-page body::before { background: #fff !important; color: #000; }
  .rb-page .rb-app { padding: 0; }
  .rb-page .rb-app .wrap { max-width: none; padding: 0; }
  .rb-out { display: block; padding: 0; border: 0; background: none; box-shadow: none; }
  .rb-scroll { overflow: visible; border-radius: 0; }
  .rb-sheet, .rb-check-sheet { padding: 0; color: #000; }
  .rb-land { page: rb-land; }
  .rb-port { page: rb-port; }
  .rb-sheet-title { color: #000; font-size: 15pt; }
  .rb-sheet-desc, .rb-check-name { color: #000; font-size: 10pt; }
  .rb-table { min-width: 0; font-size: 9.5pt; color: #000; }
  .rb-table th, .rb-table td { border-color: #000; }
  .rb-table thead th, .rb-table tbody th, .rb-table tfoot th, .rb-table tfoot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rb-table thead { display: table-header-group; }
  .rb-table tr { break-inside: avoid; }
  .rb-th-pts, .rb-row-desc, .rb-row-max { color: #222; }
  .rb-print-check .rb-out { display: none !important; }
  .rb-print-check .rb-print-only { display: block; }
}

/* ===== learning-goals (tool) ===== */
/* Learning goals and success criteria builder (/tools/learning-goals/) */
.lg-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
.lg-left, .lg-right { display: grid; gap: 18px; min-width: 0; }
.lg-sec[hidden], .lg-show[hidden], .lg-print[hidden] { display: none; }
@media (max-width: 860px) {
  .lg-tool { grid-template-columns: minmax(0, 1fr); }
  .lg-left { display: contents; }
  .lg-in { order: 1; }
  .lg-right { order: 2; }
  .lg-verbs { order: 3; }
  .lg-bank { order: 4; }
}
.tool-box textarea.lg-exp { min-height: 96px; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chips .chip { padding: 9px 14px; font-size: .92rem; line-height: 1.2; }
.lg-verb-groups { display: grid; gap: 14px; }
.lg-verb-group { display: grid; gap: 8px; }
.lg-verb { padding: 7px 12px; font-size: .9rem; }

.tool-box h3.lg-sub { font: 650 .82rem/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 0; }
.lg-actions .btn { padding: 10px 16px; font-size: .92rem; }
.lg-label { font: 650 .82rem/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--eye); }

.lg-goals, .lg-crit, .lg-flat, .lg-bank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lg-goals { gap: 16px; }
.lg-goal { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(7, 11, 24, .35); }
.lg-empty { color: var(--muted); }
.lg-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.tool-box textarea.lg-text { min-height: 0; padding: 9px 12px; line-height: 1.45; resize: vertical; overflow: hidden; }
.lg-item-goal textarea.lg-text { font-weight: 650; font-size: 1.05rem; }
.lg-tools { display: flex; gap: 4px; }
.lg-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); color: var(--text); font: 600 1rem/1 var(--body); cursor: pointer; transition: border-color .15s, background-color .15s; }
.lg-icon:hover { border-color: var(--line-hi); background: var(--glass-hi); }
.lg-icon:disabled { opacity: .35; cursor: default; border-color: var(--line); background: var(--glass); }
.tool-box .lg-add { justify-self: start; padding: 9px 16px; font-size: .92rem; }
.lg-undo { margin-left: 4px; }
@media (max-width: 520px) {
  .lg-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .lg-tools { justify-content: flex-end; }
  .lg-goal { padding: 12px; }
  .lg-actions .btn { flex: 1 1 auto; }
}

/* Criteria bank */
.lg-bank-scroll { display: grid; gap: 8px; max-height: 460px; overflow: auto; padding-right: 4px; }
.lg-bank-item { display: flex; gap: 8px; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--glass); color: var(--text); font: 400 .95rem/1.4 var(--body); cursor: pointer; transition: border-color .15s, background-color .15s; }
.lg-bank-item::before { content: "+"; color: var(--eye); font-weight: 700; }
.lg-bank-item:hover { border-color: var(--line-hi); background: var(--glass-hi); }

/* Self-assessment preview */
.lg-check-wrap { overflow-x: auto; }
.lg-check-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lg-check-table th, .lg-check-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lg-check-table th { color: var(--muted); font-weight: 600; }
.lg-check-table th:not(:first-child), .lg-box-cell { text-align: center; width: 5.5em; }
@media (max-width: 520px) {
  .lg-check-table { font-size: .88rem; }
  .lg-check-table th, .lg-check-table td { padding: 8px 4px; }
  .lg-check-table th:not(:first-child), .lg-box-cell { width: 3.4em; font-size: .78rem; }
}
.lg-box { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 4px; vertical-align: middle; }

/* Projector view */
.lg-show { display: flex; flex-direction: column; gap: 3vh; padding: 5vh 6vw 3vh; background: var(--void); color: var(--text); overflow: auto; }
.lg-show:fullscreen { width: 100%; height: 100%; }
.lg-show::backdrop { background: var(--void); }
.lg-show.is-fixed { position: fixed; inset: 0; z-index: 1000; }
.lg-noscroll, .lg-noscroll body { overflow: hidden; }
.lg-show-body { flex: 1; display: flex; flex-direction: column; gap: 2.4vh; max-width: 1500px; margin: 0 auto; width: 100%; }
.lg-show-kicker { font: 650 clamp(1rem, 1vw + 1.4vh, 1.8rem)/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--eye); }
.lg-show-goal { font: 650 clamp(1.8rem, 2vw + 3vh, 4.4rem)/1.2 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.lg-show-sub { font: 650 clamp(1rem, 1vw + 1.4vh, 1.8rem)/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 1vh; }
.lg-show-list { margin: 0; padding: 0 0 0 1.2em; display: grid; gap: 1.6vh; font: 500 clamp(1.3rem, 1.3vw + 2vh, 3.1rem)/1.3 var(--body); }
.lg-show-list li::marker { color: var(--eye); }
.lg-show-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.lg-show-count { margin-right: auto; color: var(--muted); font-weight: 600; }
.lg-show.is-light { background: #fff; color: #000; }
.lg-show.is-light .lg-show-goal { color: #000; }
.lg-show.is-light .lg-show-kicker, .lg-show.is-light .lg-show-list li::marker { color: #0b5f99; }
.lg-show.is-light .lg-show-sub, .lg-show.is-light .lg-show-count { color: #333; }
.lg-show.is-light .btn-quiet { color: #000; border-color: #999; background: #f2f2f2; }

/* Print: only the goals and criteria, black on white */
.lg-print { display: none; }
@media print {
  @page { margin: 1.6cm; }
  body.lg-printing > *:not(main) { display: none !important; }
  body.lg-printing main > *:not(.lg-print) { display: none !important; }
  body.lg-printing, body.lg-printing main { background: #fff !important; color: #000 !important; }
  body.lg-printing::before { display: none !important; }
  html:has(> body.lg-printing) { background: #fff !important; }
  body.lg-printing .lg-print { display: block !important; }
  .lg-print, .lg-print * { color: #000 !important; background: none !important; box-shadow: none !important; text-shadow: none !important; }
  .lg-print h1, .lg-print h2 { font-family: var(--body); letter-spacing: 0; }
  .lg-p-title { font-size: 16pt; font-weight: 700; margin: 0 0 14pt; }
  .lg-p-kicker { font: 700 12pt/1.2 var(--body); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4pt; }
  .lg-p-goal { break-inside: avoid; page-break-inside: avoid; margin: 0 0 22pt; }
  .lg-p-sub { font-size: 13pt; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 14pt 0 6pt; }
  .lg-p-list { margin: 0; padding-left: 1.2em; }

  /* Poster: one goal per page, big type */
  .lg-print-poster .lg-p-goal + .lg-p-goal { break-before: page; page-break-before: always; }
  .lg-print-poster .lg-p-goaltext { font: 700 30pt/1.25 var(--body); margin: 0 0 18pt; }
  .lg-print-poster .lg-p-sub { font-size: 18pt; }
  .lg-print-poster .lg-p-list { font-size: 24pt; line-height: 1.35; }
  .lg-print-poster .lg-p-list li { margin-bottom: 12pt; }

  /* Handout: goals, self-check table and next step */
  .lg-print-handout { font-size: 12pt; line-height: 1.45; }
  .lg-print-handout .lg-p-goaltext { font: 700 15pt/1.35 var(--body); margin: 0 0 8pt; }
  .lg-p-name { margin: 0 0 16pt; display: flex; gap: 6pt; align-items: flex-end; }
  .lg-p-line { display: block; flex: 1; min-width: 6cm; border-bottom: 1px solid #000; height: 22pt; }
  .lg-p-next .lg-p-line { margin-top: 6pt; }
  .lg-p-table { width: 100%; border-collapse: collapse; font-size: 12pt; }
  .lg-p-table th, .lg-p-table td { border: 1px solid #000; padding: 6pt; text-align: left; vertical-align: middle; }
  .lg-p-table th:not(:first-child), .lg-p-box { text-align: center; width: 2.6cm; }
  .lg-print .lg-box { border: 1.5pt solid #000; width: 14pt; height: 14pt; border-radius: 2pt; }
  .lg-p-look, .lg-p-next { break-inside: avoid; page-break-inside: avoid; margin-top: 16pt; }
}

/* ===== semester-calendar (tool) ===== */
/* Semester calendar planner (/tools/semester-calendar/). Everything is prefixed sc-. */
.sc { display: grid; gap: 18px; }
.sc-meet { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px 12px; margin: 0; }
.sc-meet legend { font-weight: 600; font-size: .975rem; padding: 0 6px; }
.sc-meet-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tool-box label.sc-meet-day { font-weight: 500; }
.sc-cycle { display: grid; gap: 14px; }
.sc-cycle[hidden] { display: none; }

/* Rows in the days-off and units lists */
.sc-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.sc-break-head { display: none; }
.sc-break-head[hidden] { display: none !important; }
.sc-break-row { display: grid; grid-template-columns: 1fr 1fr auto; grid-template-areas: "from to del" "label kind kind" "out out out"; gap: 8px 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(7, 11, 24, .35); }
.sc-f-from { grid-area: from; }
.sc-f-to { grid-area: to; }
.sc-f-label { grid-area: label; }
.sc-f-kind { grid-area: kind; }
.sc-break-row .sc-del { grid-area: del; align-self: end; }
.sc-outside { grid-area: out; font-size: .82rem; line-height: 1.25; }
.sc-outside[hidden] { display: none; }
.sc-break-row.sc-is-out input, .sc-break-row.sc-is-out select { opacity: .55; }
@media (min-width: 900px) {
  .sc-break-head, .sc-break-row { grid-template-columns: 170px 170px minmax(0, 1fr) 230px 7.5em 92px; grid-template-areas: "from to label kind out del"; align-items: center; }
  .sc-break-head { display: grid; gap: 10px; padding: 0 13px; margin-bottom: -6px; font-size: .82rem; font-weight: 600; color: var(--muted); }
  .sc-break-row { padding: 6px 12px; gap: 10px; }
  .sc-break-row .sc-del { align-self: center; }
  .sc-break-row .sc-mini > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sc-break-head + .sc-list { gap: 6px; }
}
.tool-box label.sc-mini { gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); min-width: 0; }
.sc-mini input, .sc-mini select { padding: 9px 10px; font-size: .95rem; min-width: 0; }
.sc-del, .sc-mini-btn { padding: 9px 13px; font-size: .9rem; }
.sc-mini-btn:disabled { opacity: .35; cursor: default; }
.sc-unit-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) 76px auto auto auto auto; gap: 8px; align-items: center; }
.sc-unit-row input { padding: 9px 10px; font-size: .95rem; min-width: 0; }
.sc-unit-num { color: var(--muted); font-weight: 600; min-width: 1.2em; text-align: right; }
.sc-unit-word { font-size: .9rem; }
@media (max-width: 560px) {
  .sc-break-row { grid-template-columns: 1fr 1fr; grid-template-areas: "from to" "label label" "kind del" "out out"; }
  .sc-unit-row { grid-template-columns: auto minmax(0, 1fr) 70px auto auto auto; }
  .sc-unit-row .sc-unit-num, .sc-unit-row .sc-unit-word { display: none; }
  .sc-unit-row .sc-del { grid-column: 3 / -1; }
  .sc-unit-row .sc-unit-name { grid-column: 2 / -1; }
  .sc-unit-row .sc-unit-classes { grid-column: 2; }
}

/* Unit colours: left borders in the table, tints in the month view */
.sc-u0 { --sc-c: #4cc8ff; }
.sc-u1 { --sc-c: #f3e6d6; }
.sc-u2 { --sc-c: #6fe3a6; }
.sc-u3 { --sc-c: #ff9a8b; }
.sc-u4 { --sc-c: #b9a2ff; }
.sc-u5 { --sc-c: #ffd27a; }
.sc-k-review { --sc-c: #ffffff; }
.sc-k-extra { --sc-c: #6f7a9c; }
.sc-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--sc-c, var(--muted)); flex: none; }
.sc-swatch.sc-cell-off { background: repeating-linear-gradient(45deg, rgba(255, 154, 139, .55) 0 3px, transparent 3px 6px); border: 1px solid rgba(255, 154, 139, .5); }
.sc-swatch.sc-cell-skip { background: transparent; border: 1px dashed var(--line-hi); }
.sc-swatch.sc-k-extra { background: transparent; border: 1px solid var(--sc-c); }

/* Fit summary */
.tool-result.sc-fit-ok { border-color: rgba(111, 227, 166, .55); background: rgba(111, 227, 166, .08); }
.tool-result.sc-fit-over { border-color: rgba(255, 154, 139, .6); background: rgba(255, 154, 139, .09); }
.sc-unit-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.sc-unit-dates li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sc-unit-dates:empty { display: none; }
.sc-bad { color: var(--bad); font-weight: 600; }

/* Output */
.sc-out-head { display: grid; gap: 4px; }
.sc-out-sub { color: var(--muted); }
.sc-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.sc-views { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-toolbar label.check[hidden] { display: none; }
.sc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-sm); }
.sc-table-wrap[hidden], .sc-months[hidden] { display: none; }
.sc-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .93rem; }
.sc-table th, .sc-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sc-table thead th { position: sticky; top: 0; background: var(--deep); color: var(--muted); font-weight: 600; white-space: nowrap; }
.sc-table tbody tr:last-child td { border-bottom: 0; }
.sc-c-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-c-day, .sc-c-cycle, .sc-c-no { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-c-no { font-weight: 650; }
.sc-table th:nth-child(1) { min-width: 9.5em; }
.sc-c-unit { min-width: 8em; }
.sc-c-lesson { white-space: nowrap; }
.sc-c-note { min-width: 16em; width: 46%; }
.sc-row-class td:first-child { box-shadow: inset 4px 0 0 var(--sc-c, transparent); }
.sc-row-class.sc-k-flex .sc-c-lesson, .sc-row-class.sc-k-review .sc-c-unit { color: var(--cream); font-weight: 600; }
.sc-row-class.sc-k-extra .sc-c-unit { color: var(--muted); font-style: italic; }
.sc-row-off td { background: rgba(255, 154, 139, .06); }
.sc-row-off .sc-c-off { color: var(--bad); font-weight: 600; }
.sc-row-skip td { color: #6f7a9c; font-size: .88rem; padding-block: 4px; }
.sc-row-over td { color: var(--bad); font-weight: 600; background: rgba(255, 154, 139, .09); }
.sc-note { padding: 6px 9px; font-size: .92rem; background: rgba(7, 11, 24, .35); border-color: transparent; }
.sc-note:hover { border-color: var(--line); }
.sc-note-print { display: none; }
.sc-short { display: inline-block; margin: 0 0 4px; font-size: .8rem; font-weight: 600; color: var(--cream); background: rgba(243, 230, 214, .1); border: 1px solid rgba(243, 230, 214, .3); padding: 2px 8px; border-radius: 999px; }

/* Month calendar */
.sc-month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.sc-month { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-size: .78rem; }
.sc-month caption { font: 600 1rem/1.3 var(--display); text-align: left; padding: 0 3px 6px; color: var(--text); }
.sc-month th { color: var(--muted); font-weight: 600; font-size: .75rem; padding: 2px 0; text-align: center; }
.sc-cell { height: 52px; vertical-align: top; padding: 3px 4px; border-radius: 6px; background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.sc-cell-blank { background: none; border-color: transparent; }
.sc-cell-out { opacity: .35; }
.sc-cell-top { display: flex; justify-content: space-between; gap: 2px; line-height: 1.2; }
.sc-cell-n { font-weight: 650; }
.sc-cell-cyc { color: var(--muted); font-size: .68rem; }
.sc-cell-what { display: block; margin-top: 3px; line-height: 1.15; font-size: .7rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.sc-cell.sc-k-lesson, .sc-cell.sc-k-flex, .sc-cell.sc-k-review { background: color-mix(in srgb, var(--sc-c) 16%, transparent); border-color: color-mix(in srgb, var(--sc-c) 55%, transparent); }
.sc-cell.sc-k-flex { border-style: dashed; }
.sc-cell.sc-k-extra { border-color: var(--line-hi); border-style: dotted; }
.sc-cell.sc-k-extra .sc-cell-what { color: var(--muted); }
.sc-cell-off { background: repeating-linear-gradient(45deg, rgba(255, 154, 139, .12) 0 5px, transparent 5px 10px); border-color: rgba(255, 154, 139, .35); }
.sc-cell-off .sc-cell-what { color: var(--bad); font-weight: 500; }
.sc-cell-skip { background: none; border-style: dashed; color: #6f7a9c; }
.sc-cell-short .sc-cell-n::after { content: " \2022"; color: var(--cream); }
.sc-legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.sc-legend li { display: flex; align-items: center; gap: 6px; }
.sc-legend-note { flex-basis: 100%; }
@media (max-width: 480px) {
  .sc-month-grid { grid-template-columns: 1fr; }
  .sc-cell { height: 48px; }
}

/* Print: only the schedule, black on white */
@media print {
  .masthead, .footer, .announce, .page-head, .consent, .skip, .sc-noprint { display: none !important; }
  body, body::before { background: #fff !important; color: #000 !important; }
  body::before { display: none !important; }
  .section, .section-tight { padding: 0 !important; }
  .wrap { max-width: none !important; padding: 0 !important; }
  .sc-output { border: 0 !important; padding: 0 !important; background: none !important; }
  .sc-output, .sc-output * { color: #000 !important; background: none !important; box-shadow: none !important; text-shadow: none !important; }
  .sc-out-head h2 { font-size: 16pt; }
  .sc-table-wrap { overflow: visible !important; border: 0 !important; }
  .sc-table { min-width: 0 !important; font-size: 9.5pt; }
  .sc-table th, .sc-table td { border: 1px solid #000 !important; padding: 3px 5px !important; }
  .sc-table thead th { position: static; font-weight: 700; }
  .sc-table tr { break-inside: avoid; }
  .sc-row-class td:first-child { box-shadow: none !important; }
  .sc-row-off .sc-c-off, .sc-row-over td { font-style: italic; }
  .sc-note { display: none !important; }
  .sc-note-print { display: inline; }
  .sc-short { border: 0 !important; padding: 0 !important; font-style: italic; display: block; }
  .sc-short + .sc-note + .sc-note-print:empty { display: none; }
  .sc-month-grid { display: block; }
  .sc-month { break-inside: avoid; margin-bottom: 12pt; font-size: 8pt; border-spacing: 0; border-collapse: collapse; }
  .sc-month caption { font-size: 11pt; }
  .sc-cell { border: 1px solid #000 !important; border-radius: 0; height: 40pt; opacity: 1 !important; }
  .sc-cell-blank { border: 0 !important; }
  .sc-cell-out .sc-cell-n { color: #777 !important; }
  .sc-cell-off .sc-cell-what { font-style: italic; }
  .sc-cell-what { -webkit-line-clamp: 3; }
  .sc-legend { color: #000; }
  .sc-legend .sc-swatch { display: none; }
}

/* ===== group-maker (tool) ===== */
/* Group maker and random student picker (/tools/group-maker/) */
.gm-root [hidden] { display: none !important; }
.gm-privacy { padding: 14px 18px; margin-bottom: 18px; border-radius: var(--r); background: rgba(111, 227, 166, .07); border: 1px solid rgba(111, 227, 166, .35); color: #d6def3; max-width: 90ch; }
.gm-privacy strong { color: var(--ok); }
.gm-list { min-height: 180px; }
.gm-away { display: grid; gap: 8px; }
.gm-away .h-small { margin-top: 2px; }
.gm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-chip { padding: 8px 14px; font-size: .95rem; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-chip[aria-pressed="true"] { color: var(--muted); background: rgba(255, 154, 139, .08); border: 1px dashed rgba(255, 154, 139, .55); box-shadow: none; text-decoration: line-through; text-decoration-color: rgba(255, 154, 139, .8); }
.gm-chip[aria-pressed="true"]::after { content: "away"; margin-left: 8px; font-size: .75rem; font-weight: 700; color: var(--bad); text-decoration: none; display: inline-block; }
.gm-small { padding: 8px 14px; font-size: .88rem; }

/* Wheel */
.gm-stage { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 18px 12px; border-radius: var(--r); background: linear-gradient(180deg, rgba(76, 200, 255, .07), rgba(13, 20, 44, .4)); outline: none; }
.gm-wheel-box { width: 100%; display: flex; justify-content: center; }
.gm-wheel { display: block; width: min(100%, 440px); height: auto; aspect-ratio: 1; cursor: pointer; touch-action: manipulation; }
.gm-root.is-spinning .gm-wheel { cursor: progress; }
.gm-winner { font: 650 clamp(1.6rem, 4.4vw, 2.6rem)/1.15 var(--display); color: var(--cream); min-height: 1.2em; max-width: 100%; overflow-wrap: anywhere; letter-spacing: -.01em; }
.gm-winner.is-note { font: 600 1.05rem/1.4 var(--body); color: var(--muted); letter-spacing: 0; }
.gm-stage-actions { justify-content: center; }
.gm-fs-only { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .gm-winner.is-new { animation: gm-pop .45s cubic-bezier(.2, .9, .3, 1.3) both; }
  @keyframes gm-pop { from { opacity: 0; transform: scale(.6); } }
}
@media (prefers-reduced-motion: reduce) {
  .gm-winner.is-new { animation: gm-fade .3s ease-out both; }
  @keyframes gm-fade { from { opacity: 0; } }
}
.gm-stage:fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5vh; padding: 3vh 4vw; border-radius: 0; background: radial-gradient(70vw 60vh at 50% 110%, rgba(76, 200, 255, .16), transparent 70%), var(--void); }
.gm-stage:fullscreen .gm-wheel { width: min(72vh, 92vw); }
.gm-stage:fullscreen .gm-winner { font-size: clamp(2rem, 8vh, 6rem); }
.gm-stage:fullscreen .gm-winner.is-note { font-size: 3vh; }
.gm-stage:fullscreen .gm-nofs { display: none; }
:fullscreen .btn.gm-fs-only { display: inline-flex; }
:fullscreen p.gm-fs-only { display: block; }

.gm-picked { display: grid; gap: 8px; }
.gm-picked-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gm-picked-head .h-small { margin: 0; }
.gm-picked-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; counter-reset: gm-pick; }
.gm-picked-list li { counter-increment: gm-pick; padding: 4px 11px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--line); font-size: .92rem; }
.gm-picked-list li::before { content: counter(gm-pick) ". "; color: var(--muted); }

/* Group maker */
.gm-groups-wrap { display: grid; gap: 18px; margin-top: 18px; }
.gm-field-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gm-pair-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px 14px; align-items: end; }
.gm-pair-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.gm-pairs-h { font-weight: 650; font-size: .95rem; margin-bottom: 6px; }
.gm-pair-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.gm-pair { display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--line); font-size: .92rem; max-width: 100%; }
.gm-pair span { overflow-wrap: anywhere; }
.gm-pair-x { background: none; border: 0; padding: 4px 8px; border-radius: 999px; font: 600 .8rem/1 var(--body); color: var(--bad); cursor: pointer; }
.gm-pair-x:hover { background: rgba(255, 154, 139, .12); }
@media (max-width: 800px) {
  .gm-field-3 { grid-template-columns: 1fr; }
  .gm-pair-row { grid-template-columns: 1fr 1fr; }
  .gm-pair-btns { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .gm-pair-row, .gm-pairs { grid-template-columns: 1fr; }
}

.gm-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.gm-groups-stage { outline: none; }
.gm-print-title { display: none; }
.gm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.gm-group { padding: 14px 16px 16px; border-radius: var(--r); background: rgba(7, 11, 24, .45); border: 1px solid var(--line); border-top: 4px solid #4cc8ff; }
.gm-group:nth-child(10n + 2) { border-top-color: #ffd75e; }
.gm-group:nth-child(10n + 3) { border-top-color: #6fe3a6; }
.gm-group:nth-child(10n + 4) { border-top-color: #ff9a8b; }
.gm-group:nth-child(10n + 5) { border-top-color: #c3a6ff; }
.gm-group:nth-child(10n + 6) { border-top-color: #ffb86b; }
.gm-group:nth-child(10n + 7) { border-top-color: #7ee8e0; }
.gm-group:nth-child(10n + 8) { border-top-color: #ff9ec7; }
.gm-group:nth-child(10n + 9) { border-top-color: #b8e86f; }
.gm-group:nth-child(10n + 10) { border-top-color: #f3e6d6; }
.gm-group.is-locked { box-shadow: 0 0 0 1px var(--line-hi), 0 0 22px -8px rgba(76, 200, 255, .6); }
.gm-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gm-group-head h3 { font-size: 1.05rem; }
.gm-lock { padding: 6px 12px; font-size: .82rem; }
.gm-lock[aria-pressed="true"] { background: rgba(76, 200, 255, .16); border-color: var(--line-hi); color: var(--text); }
.gm-lock[aria-pressed="true"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--eye); box-shadow: 0 0 8px var(--eye); }
.gm-members { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.gm-members li { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.gm-name { font-weight: 650; font-size: 1.06rem; overflow-wrap: anywhere; }
.gm-role { font-size: .78rem; font-weight: 600; color: var(--eye); background: rgba(76, 200, 255, .1); border: 1px solid rgba(76, 200, 255, .28); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }

.gm-groups-stage:fullscreen { display: flex; flex-direction: column; gap: 3vh; padding: 4vh 4vw; overflow: auto; background: var(--void); }
.gm-groups-stage:fullscreen .gm-print-title { display: block; font: 650 4.5vh/1.1 var(--display); color: var(--text); }
.gm-groups-stage:fullscreen .gm-groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 2.5vh 2vw; }
.gm-groups-stage:fullscreen .gm-group { padding: 2.2vh 1.6vw; }
.gm-groups-stage:fullscreen .gm-group-head h3 { font-size: clamp(1.2rem, 3.4vh, 2.4rem); }
.gm-groups-stage:fullscreen .gm-name { font-size: clamp(1.15rem, 3.2vh, 2.3rem); }
.gm-groups-stage:fullscreen .gm-role { font-size: clamp(.8rem, 1.9vh, 1.3rem); }
.gm-groups-stage:fullscreen .gm-lock { display: none; }
.gm-groups-stage:fullscreen .gm-stage-actions { justify-content: center; margin-top: auto; }

@media print {
  .masthead, .footer, .announce, .page-head, .consent, .skip, .gm-noprint { display: none !important; }
  body, body::before { background: #fff !important; color: #000 !important; }
  .gm-root { padding: 0 !important; }
  .gm-groups-wrap { margin: 0; }
  .gm-results { background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
  .gm-print-title { display: block; font: 700 24pt/1.1 var(--display); color: #000; margin-bottom: 14pt; }
  .gm-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12pt; }
  .gm-group, .gm-group.is-locked { background: none !important; border: 2px solid #000 !important; box-shadow: none !important; break-inside: avoid; page-break-inside: avoid; padding: 10pt 12pt; }
  .gm-group-head h3 { font-size: 18pt; color: #000; }
  .gm-members { gap: 4pt; margin-top: 8pt; }
  .gm-name { font-size: 16pt; color: #000; }
  .gm-role { font-size: 11pt; color: #000; background: none; border: 1px solid #000; }
}

/* Keep tool panels inside the screen on phones (wide tables scroll inside them) */
.tool-grid > *, .tool-box > * { min-width: 0; }
/* Tables in articles */
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2em 0; font-size: .95em; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--glass-hi); }
