/* Tanglaw Teacher's Guide. The page is a teacher's folder: every chapter is an AHA card with the
   stacked yellow / red / blue folder tabs, Migo walks the reader through, the status is a report card
   graded with Tanglaw's own mastery bands, and the pilot is written as an ILAW plan. */

@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('fonts/Baloo2-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('fonts/Baloo2-800-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('fonts/Poppins-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('fonts/Poppins-600-latin.woff2') format('woff2'); }

:root {
  --paper: #FDF8EC; --card: #FFFFFF; --card-2: #FAF3E0; --card-3: #F5ECD2;
  --ink: #27200F; --ink-2: #5C5340; --ink-3: #8A8068;
  --yellow: #F7AF01; --yellow-deep: #D99A00; --yellow-tint: #FDEFC4;
  --red: #EC272B; --red-deep: #C71B1F; --red-tint: #FBDADA;
  --blue: #1861A6; --blue-deep: #124B82; --blue-tint: #DCE9F7;
  --grey-tint: #EFE8D6; --night: #17130A;
  --b: 3px solid var(--ink); --pop: 0 6px 0 var(--ink); --pop-sm: 0 4px 0 var(--ink);
  --display: 'Baloo 2', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--body);
  background-image: radial-gradient(rgba(39,32,15,.09) 1.6px, transparent 2px); background-size: 28px 28px; }
img { max-width: 100%; display: block; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.02; text-wrap: balance; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.eyebrow { font: 600 13px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-deep); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons, stickers, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border: var(--b); border-radius: 999px; background: var(--yellow); color: var(--ink);
  font: 800 19px/1 var(--display); text-decoration: none; box-shadow: var(--pop); transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); }
.btn.white { background: var(--card); }
.btn svg { width: 20px; height: 20px; }
.sticker { display: inline-block; padding: 8px 16px; border: var(--b); border-radius: 14px; background: var(--yellow); box-shadow: var(--pop-sm);
  font: 800 18px/1.1 var(--display); transform: rotate(-3deg); }
.sticker.blue { background: var(--blue); color: #fff; } .sticker.red { background: var(--red-deep); color: #fff; } .sticker.white { background: var(--card); }
.ui { display: inline-block; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font: 600 14.5px/1.65 var(--body); white-space: nowrap; box-shadow: 0 2px 0 var(--ink); }
.ui.y { background: var(--yellow); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: var(--b); padding-top: env(safe-area-inset-top, 0px); }
.bar .wrap { display: flex; align-items: center; gap: 18px; height: 72px; }
.bar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.bar .brand img { height: 40px; width: auto; }
.bar .brand span { font: 800 16px/1 var(--display); color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--ink-3); }
.bar nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav ol { list-style: none; margin: 0; padding: 0 4px; display: flex; gap: 4px; }
.bar nav a { display: block; padding: 7px 12px; border-radius: 999px; font: 600 14px/1 var(--body); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.bar nav a:hover { background: var(--card-3); color: var(--ink); }
.bar nav a.on { background: var(--ink); color: var(--paper); }
.bar .btn { padding: 10px 18px; font-size: 16px; box-shadow: var(--pop-sm); }

/* ---------- hero ---------- */
.hero { padding-block: 64px 40px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 56px; align-items: center; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(44px, 6vw, 78px); font-weight: 800; letter-spacing: -.012em; margin-top: 22px; }
.hero h1 .under { position: relative; white-space: nowrap; color: var(--red-deep); }
.hero h1 .under svg { position: absolute; left: -2%; bottom: -.18em; width: 104%; height: .32em; overflow: visible; }
.hero .lede { font-size: 20px; color: var(--ink-2); margin-top: 26px; max-width: 32em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero .facts span { padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font: 600 14px/1.3 var(--body); }
.stage { position: relative; justify-self: center; width: min(100%, 360px); padding: 26px 0 0; }
.stage .phone { transform: rotate(3deg); margin: 0 auto; max-width: 310px; }
/* stickers sit on the phone's frame, never over the screen's content */
.stage .s1 { position: absolute; left: -34px; top: 8px; z-index: 3; }
.stage .s2 { position: absolute; right: -34px; top: 560px; z-index: 3; transform: rotate(4deg); }
.stage .hello { position: relative; z-index: 4; display: flex; align-items: center; gap: 16px; margin-top: 26px; padding-left: 4px; }
.hello .mascot { width: 96px; height: 96px; flex: none; }
.bubble { position: relative; background: var(--card); border: var(--b); border-radius: 20px; padding: 12px 16px; box-shadow: var(--pop-sm); font: 600 15px/1.4 var(--body); max-width: 230px; }
.hello .bubble { transform: rotate(-2deg); }
.hello .bubble::after { content: ""; position: absolute; left: -13px; top: 50%; margin-top: -11px; width: 22px; height: 22px; background: var(--card); border-left: var(--b); border-bottom: var(--b); transform: rotate(45deg); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.stage .s1, .stage .s2, .stage .hello { animation: pop .6s cubic-bezier(.16,1,.3,1) both; }
.stage .s2 { animation-delay: .15s; } .stage .hello { animation-delay: .35s; }

/* ---------- phones ---------- */
.phone { position: relative; width: 100%; max-width: 330px; padding: 11px; background: var(--ink); border-radius: 42px; box-shadow: 0 18px 40px rgba(39,32,15,.22), var(--pop); }
.phone::before { content: ""; position: absolute; left: 50%; top: 18px; width: 86px; height: 22px; margin-left: -43px; border-radius: 12px; background: var(--ink); z-index: 2; }
.phone img { width: 100%; border-radius: 32px; padding-top: 30px; background: var(--paper); }
.phone.crop img { padding-top: 0; }
.phone.crop::before { display: none; }
.phone.crop { border-radius: 30px; padding: 9px; } .phone.crop img { border-radius: 22px; }

/* ---------- the loop (folder tabs in a row) ---------- */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-block: 30px 10px; }
.loop a { position: relative; display: grid; gap: 6px; padding: 22px 22px 20px; background: var(--card); border: var(--b); border-radius: 26px; box-shadow: var(--pop); color: var(--ink); text-decoration: none; transition: transform .15s; }
.loop a:hover { transform: translateY(-4px) rotate(-.6deg); }
.loop .k { display: inline-grid; place-items: center; width: 48px; height: 48px; border: var(--b); border-radius: 15px; font: 800 26px/1 var(--display); transform: rotate(-7deg); box-shadow: var(--pop-sm); }
.loop b { font: 800 30px/1 var(--display); margin-top: 10px; }
.loop span { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.loop a:not(:last-child)::after { content: ""; position: absolute; right: -19px; top: 44px; width: 20px; height: 3px; background: var(--ink); }
.k.y { background: var(--yellow); } .k.r { background: var(--red-deep); color: #fff; } .k.b { background: var(--blue); color: #fff; } .k.i { background: var(--ink); color: var(--paper); }

/* ---------- film band ---------- */
.film { margin-top: 70px; background: var(--night); color: var(--paper); border-block: var(--b); padding-block: 64px; position: relative; overflow: hidden; }
.film::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 420px at 18% 10%, rgba(247,175,1,.20), transparent 70%); pointer-events: none; }
.film .wrap { position: relative; display: grid; grid-template-columns: .8fr 1.6fr; gap: 48px; align-items: center; }
.film .wrap > * { min-width: 0; }
.film h2 { font-size: clamp(38px, 4.6vw, 58px); }
.film h2 em { font-style: normal; color: var(--yellow); }
.film p.t { color: #D8CDB2; margin-top: 18px; font-size: 17px; }
.film .eyebrow { color: var(--yellow); }
.film .dl { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: 15px; }
.film .dl a { color: var(--paper); }
.tv { padding: 14px; background: #2B2314; border: 3px solid #000; border-radius: 30px; box-shadow: 0 8px 0 #000; transform: rotate(-1deg); }
.tv video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000; }

/* ---------- chapters as folders ---------- */
.chapters { padding-block: 90px 20px; display: grid; gap: 90px; }
.intro-h { text-align: center; display: grid; gap: 14px; justify-items: center; }
.intro-h h2 { font-size: clamp(40px, 5.4vw, 66px); }
.intro-h p { color: var(--ink-2); max-width: 38em; font-size: 18px; }
.folder { position: relative; }
.folder .tabs { position: relative; height: 54px; margin: 0 40px; }
.folder .tabs i { position: absolute; height: 54px; border: var(--b); border-bottom: 0; border-radius: 28px 28px 0 0; }
.folder .tabs i:nth-child(1) { left: 60px; right: 60px; top: 0; background: var(--yellow); }
.folder .tabs i:nth-child(2) { left: 30px; right: 30px; top: 14px; background: var(--red); }
.folder .tabs i:nth-child(3) { left: 0; right: 0; top: 28px; background: var(--blue); }
.folder .tabs .label { position: absolute; left: 96px; top: -26px; z-index: 2; }
.folder .body { position: relative; background: var(--card); border: var(--b); border-radius: 36px; box-shadow: var(--pop); padding: 44px 48px; display: grid; grid-template-columns: 1fr 340px; gap: 48px; }
.folder .body > * { min-width: 0; }
.folder.flip .body { grid-template-columns: 340px 1fr; }
.folder.flip .shots { order: -1; }
.ch-n { display: flex; align-items: center; gap: 14px; }
.ch-n b { display: grid; place-items: center; width: 62px; height: 62px; border: var(--b); border-radius: 18px; background: var(--yellow); box-shadow: var(--pop-sm); font: 800 36px/1 var(--display); transform: rotate(-6deg); }
.ch-n span { font: 600 14px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--blue-deep); }
#class .ch-n b, #results .ch-n b, #offline .ch-n b { background: var(--red-deep); color: #fff; transform: rotate(4deg); }
#test .ch-n b, #plan .ch-n b { background: var(--blue); color: #fff; }
.folder h2 { font-size: clamp(36px, 4.4vw, 54px); margin-top: 14px; }
.folder .text { display: grid; gap: 22px; align-content: start; }
.folder .text > p { max-width: 60ch; color: var(--ink-2); font-size: 18px; }
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; }
ol.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border: var(--b); border-radius: 12px; background: var(--yellow); font: 800 19px/1 var(--display); transform: rotate(-5deg); }
ol.steps li:nth-child(3n+2)::before { background: var(--red-deep); color: #fff; transform: rotate(4deg); }
ol.steps li:nth-child(3n)::before { background: var(--blue); color: #fff; transform: rotate(-2deg); }
.shots { display: grid; gap: 26px; justify-items: center; align-content: start; }
.shots .phone:nth-child(2) { transform: rotate(-2.5deg); }
.shots .phone:nth-child(1) { transform: rotate(1.5deg); }
figcaption { font-size: 14px; color: var(--ink-2); text-align: center; margin-top: 12px; max-width: 300px; }
figure { margin: 0; display: grid; justify-items: center; }

/* chapters with two screens: the phones sit side by side, the second a step lower */
.folder.two .body, .folder.flip.two .body { grid-template-columns: 1fr 1fr; }
.folder.two .shots { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.folder.two .shots .phone { max-width: 270px; }
.folder.two .shots figure:nth-child(2) { margin-top: 70px; }
.folder.two .shots figure:nth-child(2) .phone { transform: rotate(-2deg); }

/* Migo's tips */
.tip { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: end; }
.tip .mascot { width: 74px; height: 74px; }
.tip .bubble { max-width: none; border-radius: 22px 22px 22px 6px; padding: 14px 18px; font-weight: 400; font-size: 15.5px; background: var(--yellow-tint); }
.tip .bubble b { display: block; font: 800 19px/1.2 var(--display); margin-bottom: 2px; }

/* ways to check */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.way { border: var(--b); border-radius: 24px; padding: 20px; display: grid; gap: 10px; align-content: start; background: var(--card-2); }
.way svg { width: 54px; height: 54px; }
.way .who { font: 600 12px/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-deep); }
.way > b { font: 800 26px/1 var(--display); }
.way p { font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* ---------- report card ---------- */
.rc-band { padding-block: 100px 40px; }
.reportcard { position: relative; max-width: 1000px; margin: 0 auto; background: #FFFDF6; border: var(--b); border-radius: 10px; box-shadow: var(--pop), 14px 14px 0 -3px var(--card-3), 14px 14px 0 0 var(--ink); padding: 44px 50px 40px; transform: rotate(-.4deg); }
.reportcard::before { content: ""; position: absolute; inset: 12px; border: 2px solid var(--ink); border-radius: 4px; pointer-events: none; }
.rc-head { text-align: center; display: grid; gap: 6px; padding-bottom: 20px; border-bottom: 3px double var(--ink); }
.rc-head .small { font: 600 12.5px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.rc-head h2 { font-size: clamp(34px, 4.4vw, 52px); letter-spacing: .04em; }
.rc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 26px; padding-block: 18px; font-size: 15px; }
.rc-fields span { border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.rc-fields b { font-weight: 600; color: var(--ink-2); margin-right: 6px; }
.rc-table { overflow-x: auto; }
.rc-table table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.rc-table th { font: 600 12.5px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; text-align: left; padding: 10px 12px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--card-2); }
.rc-table td { padding: 12px; border-bottom: 1.5px solid #D9CFB6; vertical-align: top; }
.rc-table td:first-child { font-weight: 600; width: 32%; }
.rc-table td:nth-child(2) { width: 170px; }
.rc-table tr.group td { font: 800 18px/1.2 var(--display); background: transparent; border-bottom: 2px solid var(--ink); padding-top: 22px; }
.band { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--ink); font: 600 13px/1.3 var(--body); white-space: nowrap; }
.band.m { background: var(--blue-tint); color: var(--blue-deep); } .band.a { background: var(--yellow-tint); color: #7A5200; }
.band.n { background: var(--red-tint); color: var(--red-deep); } .band.t { background: var(--grey-tint); color: var(--ink-2); }
.rc-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; font-size: 14px; color: var(--ink-2); align-items: center; }
.rc-foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; margin-top: 30px; align-items: end; }
.rc-foot > * { min-width: 0; }
.verdict { border: var(--b); border-radius: 18px; padding: 18px 22px; background: var(--yellow-tint); }
.verdict b { display: block; font: 800 24px/1.15 var(--display); margin-bottom: 4px; }
.sign { position: relative; text-align: center; font-size: 13.5px; color: var(--ink-2); }
.sign svg { width: 220px; height: 70px; margin: 0 auto -12px; }
.sign .line { border-top: 1.5px solid var(--ink); padding-top: 6px; }
.stamp { position: absolute; right: -6px; top: -64px; transform: rotate(12deg); border: 3px solid var(--red-deep); color: var(--red-deep); border-radius: 12px; padding: 6px 12px; font: 800 17px/1.1 var(--display); text-align: center; background: rgba(255,253,246,.7); }

/* ---------- pilot plan as ILAW ---------- */
.pilot { padding-block: 90px 30px; display: grid; gap: 36px; }
.ilaw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ilaw > div { background: var(--card); border: var(--b); border-radius: 26px; box-shadow: var(--pop); padding: 22px; display: grid; gap: 10px; align-content: start; }
.ilaw .k { width: 52px; height: 52px; display: grid; place-items: center; border: var(--b); border-radius: 15px; font: 800 28px/1 var(--display); transform: rotate(-6deg); box-shadow: var(--pop-sm); }
.ilaw b { font: 800 24px/1.1 var(--display); }
.ilaw ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }

/* ---------- faq ---------- */
.faq { padding-block: 70px 30px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: start; }
.faq > * { min-width: 0; }
.faq .side { position: sticky; top: 110px; display: grid; gap: 18px; }
.faq .side h2 { font-size: clamp(36px, 4.4vw, 54px); }
.faq .side .mascot { width: 130px; height: 130px; }
.qa { display: grid; gap: 14px; }
details { background: var(--card); border: var(--b); border-radius: 22px; box-shadow: var(--pop-sm); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 22px; font: 800 20px/1.25 var(--display); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 2.5px solid var(--ink); border-radius: 50%; font: 800 22px/1 var(--display); background: var(--yellow); }
details[open] summary::after { content: "–"; }
details p { padding: 0 22px 20px; color: var(--ink-2); font-size: 16px; max-width: 64ch; }

/* ---------- footer ---------- */
footer { margin-top: 80px; background: var(--ink); color: var(--paper); padding-block: 44px calc(44px + env(safe-area-inset-bottom, 0px)); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
footer .partners { display: flex; align-items: center; gap: 22px; }
footer .partners img.aha { height: 54px; } footer .partners img.emb { height: 64px; }
footer .partners span { font: 800 30px/1 var(--display); }
footer p { font-size: 14px; color: #D8CDB2; }

/* ---------- small screens ---------- */
@media (max-width: 1040px) {
  .bar nav { display: none; }
  .bar .wrap { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 44px; }
  .stage { width: min(100%, 340px); }
  .film .wrap { grid-template-columns: 1fr; }
  .folder .body, .folder.flip .body { grid-template-columns: 1fr; padding: 36px 28px; }
  .folder.flip .shots { order: 0; }
  .folder.two .body, .folder.flip.two .body { grid-template-columns: 1fr; }
  .folder.two .shots { max-width: 640px; width: 100%; justify-self: center; }
  .shots { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; }
  .loop, .ilaw { grid-template-columns: repeat(2, 1fr); }
  .loop a::after { display: none; }
  .faq { grid-template-columns: 1fr; }
  .faq .side { position: static; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .bar .brand span { display: none; }
  .bar .brand img { height: 34px; }
  .stage .s1 { left: -6px; } .stage .s2 { right: -6px; top: auto; bottom: 150px; }
  .folder.two .shots figure:nth-child(2) { margin-top: 0; }
  .loop, .ilaw, .ways { grid-template-columns: 1fr; }
  .folder .tabs { margin: 0 18px; } .folder .tabs .label { left: 40px; }
  .folder .body, .folder.flip .body { padding: 30px 20px; border-radius: 28px; }
  .reportcard { padding: 34px 22px 30px; transform: none; }
  .rc-fields { grid-template-columns: 1fr; }
  .rc-foot { grid-template-columns: 1fr; }
  .stamp { top: -50px; right: 0; }
  .tip { grid-template-columns: 56px 1fr; } .tip .mascot { width: 56px; height: 56px; }
}
.mascot { display: block; } .mascot svg { width: 100%; height: 100%; overflow: visible; }
@media (max-width: 680px) {
  .hero h1 .under { white-space: normal; text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: .12em; text-underline-offset: .14em; }
  .hero h1 .under svg { display: none; }
}
ol.steps li > span, .bubble, .way p { min-width: 0; overflow-wrap: anywhere; }
