/* biqib.com home page.
   Palette: the app's Daylight theme - deep green primary, one warm amber
   accent for the buttons a visitor is meant to press, white and soft green
   tints. Both colours can be changed from the editor (--brand, --accent). */
:root {
  --brand: #30694e;
  --accent: #f59e0b;
  --ink: #14261e;
  --muted: #4b5f55;
  --line: #dbe7e0;
  --paper: #ffffff;
  --paper-alt: #f3f8f5;
  --tint: color-mix(in srgb, var(--brand) 10%, white);
  --tint-2: color-mix(in srgb, var(--brand) 18%, white);
  --radius: 18px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
:root[lang="ta"] { --font: "Noto Sans Tamil", system-ui, sans-serif; }
:root[lang="si"] { --font: "Noto Sans Sinhala", system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
:root[lang="ta"] h1, :root[lang="si"] h1 { line-height: 1.32; font-size: clamp(1.7rem, 4vw, 2.8rem); }
:root[lang="ta"] h2, :root[lang="si"] h2 { line-height: 1.35; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1px solid transparent; transition: transform .08s ease, filter .15s ease; }
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(.96); }
.btn-accent { background: var(--accent); color: #1a1207; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-light { background: #fff; color: var(--brand); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .92rem; }

/* header: one menu on every page (site.js renderHeader) */
#site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: box-shadow .2s ease, border-color .2s ease; }
#site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(20, 38, 30, .08); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand img { height: 48px; width: auto; }
.brand-words { display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1; }
.brand-name { font-weight: 800; font-size: 1.32rem; letter-spacing: -.02em; }
.brand-under { font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); }
/* Tamil and Sinhala are not written in capitals, and spacing the letters
   out pulls a conjunct apart - so neither is applied to those scripts. */
:root[lang="ta"] .brand-under, :root[lang="si"] .brand-under { letter-spacing: normal; text-transform: none; font-size: .72rem; }
@media (max-width: 480px) { .brand img { height: 42px; } .brand-name { font-size: 1.18rem; } .brand-under { font-size: .58rem; letter-spacing: .14em; } }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; }
.site-nav { display: none; align-items: center; gap: 4px; margin-left: 28px; }
.nav-link { position: relative; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: 10px; transition: color .15s ease, background .15s ease; }
.nav-link:hover { color: var(--ink); background: var(--paper-alt); }
.nav-link[aria-current="page"] { color: var(--brand); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand); }
.auth { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon { width: 18px; height: 18px; }

.lang-wrap { position: relative; display: none; }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.lang-toggle:hover { background: var(--paper-alt); }
.lang-toggle .caret { font-size: .7rem; color: var(--muted); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(20, 38, 30, .14); display: grid; gap: 2px; }
.lang-menu[hidden] { display: none; }
.lang-option { text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
.lang-option:hover { background: var(--paper-alt); }
.lang-option[aria-checked="true"] { color: var(--brand); font-weight: 700; }
.lang-option[aria-checked="true"]::after { content: "  ✓"; }

.menu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.menu-toggle .bars { display: grid; gap: 4px; }
.menu-toggle .bars span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu-panel { border-top: 1px solid var(--line); background: var(--paper); box-shadow: 0 18px 40px rgba(20, 38, 30, .12); max-height: calc(100vh - 68px); overflow-y: auto; animation: panel-in .18s ease; }
.menu-panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.panel-nav { display: grid; padding: 8px 0; }
.panel-link { display: block; padding: 14px 4px; font-size: 1.1rem; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.panel-link[aria-current="page"] { color: var(--brand); }
.panel-langs { display: flex; gap: 6px; padding: 16px 0 4px; flex-wrap: wrap; }
.lang-btn { flex: 1; min-height: 44px; border: 1px solid var(--line); background: var(--paper-alt); border-radius: 12px; padding: 0 10px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.panel-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 0 20px; }
.panel-auth .btn { width: 100%; justify-content: center; }
body.menu-open { overflow: hidden; }
main [id] { scroll-margin-top: 80px; }

@media (max-width: 599px) { .auth .signin { display: none; } }
@media (min-width: 1024px) {
  .site-nav { display: flex; }
  .lang-wrap { display: block; }
  .menu-toggle, .menu-panel { display: none !important; }
}

/* the founder's photo beside the signature (About) */
.prose .signature.with-picture { display: flex; align-items: center; gap: 16px; }
.prose .signature p { margin: 0; }
.signature-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--brand); flex-shrink: 0; }

/* hero */
.hero { padding: 48px 0 32px; background: radial-gradient(60rem 30rem at 10% -10%, var(--tint-2), transparent 60%), linear-gradient(180deg, var(--paper-alt), var(--paper)); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.note { font-size: .9rem; color: var(--muted); }
.hero-art img { margin: 0 auto; max-height: 380px; }
@media (min-width: 880px) { .hero { padding: 72px 0 56px; } .hero-grid { grid-template-columns: 1.1fr 1fr; } }

/* blocks */
.block { padding: 60px 0; }
.block-alt { background: var(--paper-alt); }
.intro { color: var(--muted); max-width: 46rem; margin-bottom: 1.5rem; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.25rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 rgba(20,38,30,.03); }
.card p { margin: 0; color: var(--muted); }
.card-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps p { margin: 0; color: var(--muted); }
.step-no { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } .steps li { flex-direction: column; } }
.split { display: grid; gap: 28px; align-items: center; }
.split-copy p { color: var(--muted); }
.split-art img { margin: 0 auto; max-height: 360px; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(20,38,30,.35); }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split.image-left .split-art { order: -1; } }
.quote blockquote { margin: 0 0 12px; font-size: 1.02rem; }
.quote figcaption { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.quote figcaption img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* gallery of screens */

/* call to action */
.cta { background: var(--brand); color: #fff; padding: 60px 0; text-align: center; }
.cta p { opacity: .92; max-width: 42rem; margin: 0 auto 1.25rem; }

/* footer: four columns on a dark green, the logo in white */
#site-footer { background: var(--ink-green, #12302326); background: linear-gradient(180deg, #24513c, #17382a); color: rgba(255,255,255,.82); padding: 48px 0 28px; }
.footer-grid { display: grid; gap: 28px 24px; }
.footer-brand p { margin: 12px 0 10px; max-width: 34rem; font-size: .92rem; line-height: 1.6; }
.brand-footer { color: #fff; }
/* The mark is a green square, so it sits on a white tile against the band. */
.brand-footer img { height: 52px; background: #fff; border-radius: 14px; padding: 3px; box-sizing: border-box; }
.brand-footer .brand-name { color: #fff; font-size: 1.5rem; }
.brand-footer .brand-under { color: var(--accent); font-size: .66rem; }
@media (max-width: 480px) { .brand-footer img { height: 46px; } .brand-footer .brand-name { font-size: 1.32rem; } }
.footer-mail { display: block; color: #fff; text-decoration: none; font-size: .92rem; margin-top: 4px; }
.footer-mail:hover { text-decoration: underline; }
.footer-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-col h3 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); font-weight: 700; }
.footer-col a { color: rgba(255,255,255,.86); text-decoration: none; font-size: .95rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col a[aria-current="page"] { color: #fff; font-weight: 700; }
.footer-cta { margin-top: 6px; color: #1a1207; }
.footer-cta:hover { text-decoration: none; }
.footer-base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; font-size: .84rem; color: rgba(255,255,255,.6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.1fr; } }

/* the animated moments (interactions band) */
.moments { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 620px) { .moments { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .moments { grid-template-columns: repeat(4, 1fr); } }
.moment { appearance: none; text-align: left; font: inherit; color: inherit; cursor: zoom-in; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.moment:hover, .moment:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(20,38,30,.12); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.moment-stage { padding: 16px; background: linear-gradient(180deg, var(--tint), var(--paper)); min-height: 250px; display: flex; align-items: flex-start; justify-content: center; }
.moment-stage .scene { width: 100%; margin: 0; }
.moment-words { margin-top: auto; padding: 14px 16px 18px; font-size: .92rem; color: var(--muted); }
.moment-words strong { display: block; color: var(--ink); margin-bottom: 3px; }

/* today's plan */
.scene-plan .plan-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.plan-row { display: flex; align-items: center; gap: 10px; font-size: .92rem; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.plan-row.in, .scene-plan.static .plan-row { opacity: 1; transform: none; }
.plan-tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); color: transparent; font-size: .7rem; flex-shrink: 0; transition: background .3s ease, border-color .3s ease, color .3s ease; }
.plan-row.done .plan-tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.plan-name { flex: 1; color: var(--ink); }
.plan-row.done .plan-name { color: var(--muted); text-decoration: line-through; }
.plan-minutes { color: var(--muted); font-size: .85rem; }
.plan-bar { height: 7px; border-radius: 999px; background: var(--paper-alt); overflow: hidden; margin-top: 4px; }
.plan-bar-fill { display: block; height: 100%; width: 4%; border-radius: 999px; background: var(--brand); transition: width .8s ease; }

/* a lesson being read aloud */
.scene-lesson .lesson-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.lesson-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--ink); }
.lesson-speaker { color: var(--brand); display: inline-flex; }
.lesson-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lesson-step { font-size: .92rem; line-height: 1.7; color: var(--ink); opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.lesson-step.in, .scene-lesson.static .lesson-step { opacity: 1; transform: none; }
.lesson-step .step-n { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--tint-2); color: var(--brand); font-size: .72rem; font-weight: 700; margin-right: 6px; vertical-align: middle; }
.lesson-step .word { border-radius: 4px; padding: 0 1px; transition: background .12s linear, color .12s linear; }
.lesson-step .word.said { background: var(--accent); color: #1a1207; }
.lesson-step.reading { color: var(--ink); }

/* the screenshots */
.gallery { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 1.25rem; }
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.shot { appearance: none; font: inherit; text-align: left; color: inherit; cursor: zoom-in; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.shot:hover, .shot:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(20,38,30,.12); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--line); background: var(--tint); }
.shot-words { padding: 14px 16px; font-size: .92rem; color: var(--muted); }
.shot-words strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* the zoom viewer */
.zoom { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(10, 24, 18, .72); backdrop-filter: blur(4px); animation: zoom-in .16s ease; }
@keyframes zoom-in { from { opacity: 0; } to { opacity: 1; } }
.zoom-frame { position: relative; width: min(920px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); border-radius: var(--radius); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.zoom-body { display: flex; justify-content: center; }
.zoom-body .scene { width: 100%; max-width: 620px; font-size: 1.05rem; }
.zoom-shot { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.zoom-caption { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: .95rem; }
.zoom-caption strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 2px; }
.zoom-close, .zoom-arrow { position: absolute; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; cursor: pointer; font: inherit; line-height: 1; }
.zoom-close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 1rem; }
.zoom-arrow { top: 50%; transform: translateY(-50%); width: 42px; height: 42px; font-size: 1.5rem; }
.zoom-arrow.prev { left: -8px; }
.zoom-arrow.next { right: -8px; }
.zoom-close:hover, .zoom-arrow:hover { background: var(--paper-alt); }
body.zoomed { overflow: hidden; }
@media (max-width: 640px) {
  .zoom { padding: 10px; }
  .zoom-arrow.prev { left: 4px; }
  .zoom-arrow.next { right: 4px; }
}

/* the Subscribe band */
.subscribe { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; text-align: center; }
.subscribe h2 { margin: 0 0 .5rem; }
.subscribe-text { color: var(--muted); margin: 0 auto 1.25rem; max-width: 42rem; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.subscribe-form .field { min-height: 46px; min-width: 240px; flex: 1 1 240px; max-width: 320px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; color: var(--ink); }
.subscribe-form .field:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.subscribe-form .btn { flex: 0 0 auto; }
.subscribe-said { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.subscribe-said.good { color: var(--brand); }
.subscribe-said.bad { color: #a4471c; }
.subscribe-note { margin: 10px auto 0; max-width: 40rem; font-size: .85rem; color: var(--muted); }


/* ---------------------------------------------------------- scenes */
.scene { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 18px 40px -24px rgba(20,38,30,.35); min-height: 240px; }

/* tutor: a chat */
.scene-tutor { display: flex; flex-direction: column; gap: 12px; }
.bubble { position: relative; max-width: 88%; padding: 10px 14px 12px; border-radius: 16px; font-size: .96rem; }
.bubble .who { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.bubble p { margin: 0; }
.bubble-q { align-self: flex-end; background: var(--tint-2); border-bottom-right-radius: 4px; }
.bubble-q .typed { min-height: 1.5em; }
.bubble-q .typed::after { content: "▍"; color: var(--brand); animation: blink 1s steps(1) infinite; }
.bubble-a { align-self: flex-start; background: var(--paper-alt); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-a p + p { margin-top: 6px; }
.bubble-a .reveal { opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease; }
.bubble-a .reveal.shown { opacity: 1; transform: none; }
.dots { display: inline-flex; gap: 5px; padding: 12px 14px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite; }
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }

/* maths: steps appearing in turn, looping */
.scene-maths .maths-problem { font-weight: 800; font-size: 1.25rem; padding: 8px 12px; background: var(--tint); border-radius: 10px; display: inline-block; }
.maths-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; counter-reset: step; }
.maths-steps li { position: relative; padding: 10px 12px 10px 44px; border-radius: 10px; background: var(--paper-alt); border-left: 4px solid var(--accent); font-size: 1.02rem; counter-increment: step; opacity: 0; animation: stepin 10s infinite; animation-delay: calc(var(--i) * 1.8s); }
.maths-steps li::before { content: counter(step); position: absolute; left: 12px; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 800; display: grid; place-items: center; }
.scene-maths.static .maths-steps li { animation: none; opacity: 1; }
@keyframes stepin { 0% { opacity: 0; transform: translateY(8px); } 6% { opacity: 1; transform: none; } 80% { opacity: 1; } 90%, 100% { opacity: 0; } }

/* marking: ticks landing on a sheet, then the comment */
.scene-marking { display: grid; gap: 12px; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 12px; background-image: repeating-linear-gradient(180deg, transparent 0 27px, #eef3f0 27px 28px); }
.sheet-row { display: flex; align-items: center; gap: 12px; }
.sheet-line { flex: 1; height: 8px; border-radius: 4px; background: #cfd9d3; }
.sheet-row:nth-child(2) .sheet-line { width: 70%; flex: none; }
.tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: #22a06b; opacity: 0; transform: scale(.4); animation: land 8s infinite; animation-delay: calc(.6s + var(--i) * .9s); }
.tick.cross { background: #dc2626; }
.score { justify-self: end; font-weight: 800; color: var(--brand); opacity: 0; animation: fadein 8s infinite; animation-delay: 4.6s; }
.comment { background: #fff7e6; border: 1px solid #fcd49a; border-radius: 12px; padding: 10px 14px; font-size: .95rem; opacity: 0; animation: fadein 8s infinite; animation-delay: 5.2s; }
.scene-marking.static .tick, .scene-marking.static .score, .scene-marking.static .comment { animation: none; opacity: 1; transform: none; }
@keyframes land { 0% { opacity: 0; transform: scale(.4); } 6% { opacity: 1; transform: scale(1.15); } 9% { transform: scale(1); } 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes fadein { 0% { opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* walkthrough */
.wt-grid { display: grid; gap: 18px; margin-top: 1.25rem; }
.wt-steps { display: grid; gap: 8px; }
.wt-step { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 12px 14px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.wt-step[aria-pressed="true"] { border-color: var(--brand); background: var(--tint); }
.wt-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tint-2); color: var(--brand); flex: none; }
.wt-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 18px 40px -24px rgba(20,38,30,.35); }
.wt-panel p { color: var(--muted); font-size: 1.05rem; }
.wt-big { width: 68px; height: 68px; border-radius: 18px; background: var(--tint-2); color: var(--brand); display: grid; place-items: center; }
.wt-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: auto; }
.wt-fill { display: block; height: 100%; width: 0; background: var(--accent); }
.wt-fill.run { animation: fill 4s linear forwards; }
@keyframes fill { to { width: 100%; } }
@media (min-width: 880px) { .wt-grid { grid-template-columns: 1fr 1.3fr; } }

@media (prefers-reduced-motion: reduce) {
  .bubble-q .typed::after, .dots span, .wt-fill.run { animation: none; }
}
noscript p { padding: 24px 20px; text-align: center; }

/* Prose pages (About, Contact): one readable column, generous line height. */
.prose .container.narrow { max-width: 720px; }
.prose h2 { margin-bottom: 0.6rem; }
.prose p { line-height: 1.7; margin: 0 0 1rem; }
.prose .signature { margin-top: 1.25rem; }
.prose .btn { margin-top: 0.5rem; }

/* Privacy and Terms (services/policies.py, drawn by drawPolicy) */
.policy h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
.policy h2 { margin-top: 2rem; font-size: 1.25rem; }
.policy a { color: var(--brand); }
.policy-callout { border: 1px solid var(--line); background: var(--paper-alt); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 12px; }
.policy-callout.warn { border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .06); }
.policy-callout p { margin: 0; color: var(--muted); }
.policy-callout .policy-callout-title { color: var(--ink); font-weight: 700; margin-bottom: .3rem; }
.policy-note { background: var(--paper-alt); border-radius: 10px; padding: 12px 14px; }

/* the contact form (services/contact_form.py) - the same measure as a
   prose block, so the page has one left edge */
.block.contact .container.narrow { max-width: 720px; }
.contact-form { display: grid; gap: 12px; margin-top: 1.25rem; text-align: left; }
.contact-row { display: grid; gap: 12px; }
@media (min-width: 620px) { .contact-row { grid-template-columns: 1fr 1fr; } .contact-row:has(> :only-child) { grid-template-columns: 1fr; } }
.contact-form .field { min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font: inherit; color: var(--ink); width: 100%; }
.contact-form .field-long { min-height: 130px; padding: 12px 16px; line-height: 1.6; resize: vertical; }
.contact-form .field:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-send { display: flex; justify-content: flex-start; }
.contact-said { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.contact-said.good { color: var(--brand); }
.contact-said.bad { color: #a4471c; }
.contact-note { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
