.tas-page {
  --tas-ink: #211b43;
  --tas-muted: #655f7a;
  --tas-indigo: #26205f;
  --tas-indigo-deep: #15123f;
  --tas-violet: #7158ee;
  --tas-cyan: #38dbe8;
  --tas-coral: #ff755f;
  --tas-yellow: #ffd65a;
  --tas-cream: #fff8ea;
  --tas-card: rgba(255, 255, 255, .93);
  --tas-line: rgba(49, 39, 102, .13);
  color: var(--tas-ink);
  container: triangle-angle-sum / inline-size;
}

.tas-page *,
.tas-page *::before,
.tas-page *::after { box-sizing: border-box; }
.tas-page button,
.tas-page input { font: inherit; }
.tas-page button { cursor: pointer; }
.tas-page button:disabled { cursor: default; }
.tas-page svg,
.tas-page img { display: block; max-width: 100%; }
.tas-page button:focus-visible,
.tas-page input:focus-visible,
.tas-page [tabindex]:focus-visible { outline: 4px solid rgba(255, 216, 83, .86); outline-offset: 3px; }

/* The first screen is the adversarial game. */
.tas-hero {
  scroll-margin-top: calc(var(--topbar) + 12px);
  position: relative;
  min-height: calc(100svh - var(--topbar) - 38px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 36px;
  color: #fff;
  background: #211a62;
  box-shadow: 0 28px 78px rgba(30, 24, 88, .25);
  isolation: isolate;
}
.tas-hero-bg,
.tas-hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.tas-hero-bg { object-fit: cover; object-position: center; }
.tas-hero-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(17, 14, 57, .97) 0%, rgba(26, 22, 80, .91) 50%, rgba(24, 20, 76, .38) 78%, rgba(24, 20, 76, .12) 100%),
    linear-gradient(0deg, rgba(13, 10, 46, .48), transparent 52%);
}
.tas-game-shell { position: relative; z-index: 2; width: min(990px, 91%); padding: clamp(19px, 2.4vw, 32px); }
.tas-game-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 13px; }
.tas-mission-pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  color: #fff2a7; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 900; letter-spacing: .08em;
}
.tas-game-heading h1 { margin: 9px 0 4px; color: #fff; font-size: clamp(34px, 4vw, 58px); line-height: 1; letter-spacing: -.045em; text-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.tas-game-heading p { max-width: 670px; margin: 0; color: rgba(255, 255, 255, .84); font-size: clamp(13px, 1.2vw, 17px); line-height: 1.55; }
.tas-game-heading p strong { color: #78f5ff; }
.tas-skip-button {
  flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 15px;
  color: #fff; background: rgba(255, 255, 255, .1); font-size: 11px; font-weight: 800; backdrop-filter: blur(10px);
}
.tas-skip-button:hover { background: rgba(255, 255, 255, .18); }
.tas-game-hud { display: grid; grid-template-columns: .7fr 1.25fr 1fr .7fr .8fr; gap: 6px; margin-bottom: 8px; }
.tas-game-hud > span { min-width: 0; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 13px; background: rgba(12, 10, 43, .5); backdrop-filter: blur(10px); }
.tas-game-hud small,
.tas-game-hud b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tas-game-hud small { color: #aaa4cf; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.tas-game-hud b { margin-top: 2px; color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }
#tas-enemy-hp { color: #ff897b; letter-spacing: 1px; }
#tas-player-hp { color: #5be4ed; letter-spacing: 1px; }
#tas-combo { color: var(--tas-yellow); }

.tas-game-layout { display: grid; grid-template-columns: minmax(390px, 1.32fr) minmax(270px, .68fr); gap: 9px; }
.tas-game-board,
.tas-game-console { min-width: 0; border: 1px solid rgba(255, 255, 255, .14); border-radius: 23px; background: rgba(10, 9, 38, .69); backdrop-filter: blur(14px); }
.tas-game-board { padding: 7px 10px 9px; overflow: hidden; }
#tas-battle-svg { width: 100%; max-height: 425px; touch-action: none; }
.tas-arena-mat { fill: rgba(31, 27, 91, .62); stroke: rgba(117, 239, 248, .18); stroke-width: 2; }
.tas-enemy circle { fill: rgba(255, 113, 98, .18); stroke: #ff806e; stroke-width: 3; stroke-dasharray: 7 7; }
.tas-enemy text { font-size: 48px; text-anchor: middle; }
#tas-enemy-beam { fill: none; stroke: rgba(255, 91, 84, .46); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 10 14; animation: tas-beam-flow 1.4s linear infinite; }
#tas-shield-shape { fill: url(#tas-shield-fill); stroke: #69f4ff; stroke-width: 7; stroke-linejoin: round; transition: .35s ease; }
.tas-angle-arc { fill: none; stroke-width: 14; stroke-linecap: round; }
.tas-angle-arc.angle-a { stroke: #39dce8; }
.tas-angle-arc.angle-b { stroke: #ffd75d; }
.tas-angle-arc.angle-c { stroke: #ff7567; }
.tas-vertex { stroke: rgba(255, 255, 255, .88); stroke-width: 4; }
.tas-vertex.angle-a { fill: #39dce8; }
.tas-vertex.angle-b { fill: #ffd75d; }
.tas-vertex.angle-c { fill: #ff7567; }
.tas-angle-label { fill: #fff; font-size: 19px; font-weight: 900; text-anchor: middle; paint-order: stroke; stroke: #24205e; stroke-width: 6; stroke-linejoin: round; }
.tas-angle-label.unknown { fill: #ffd9d4; font-size: 22px; }
.tas-board-rule { fill: #bff9ff; font-size: 19px; font-weight: 900; text-anchor: middle; letter-spacing: .08em; }
#tas-player-blast { opacity: 0; }
#tas-player-blast path { fill: none; stroke: #ffe566; stroke-width: 12; stroke-linecap: round; filter: url(#tas-glow); }
#tas-player-blast circle { fill: #fff2a0; }
.tas-shot #tas-player-blast { animation: tas-player-shot .7s ease-out; }
.tas-shot .tas-enemy { transform-origin: 78px 82px; animation: tas-enemy-pop .7s ease; }
.tas-hit #tas-shield-group { transform-origin: center; animation: tas-shield-hit .45s ease; }
.tas-victory #tas-shield-group { transform-origin: center; animation: tas-victory 1s ease infinite alternate; }
.tas-defeat #tas-shield-group { opacity: .4; }
.tas-board-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 13px; margin-top: 4px; color: #aaa8ca; font-size: 9px; }
.tas-board-key span { display: inline-flex; align-items: center; gap: 5px; }
.tas-board-key i { width: 9px; height: 9px; border-radius: 50%; }
.tas-board-key i.a { background: var(--tas-cyan); }
.tas-board-key i.b { background: var(--tas-yellow); }
.tas-board-key i.c { background: var(--tas-coral); }

.tas-game-console { padding: 13px; }
.tas-enemy-card { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 15px; background: rgba(255, 117, 96, .1); }
.tas-enemy-card > span { font-size: 30px; }
.tas-enemy-card small { color: #ff9c8e; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.tas-enemy-card h2 { margin: 2px 0 0; color: #fff; font-size: 15px; line-height: 1.25; }
.tas-math-callout { margin: 8px 0; padding: 12px; border: 1px solid rgba(90, 235, 243, .14); border-radius: 15px; background: rgba(49, 43, 116, .43); }
.tas-math-callout > small { color: #9d99c6; font-size: 8px; font-weight: 800; }
.tas-math-callout p { display: flex; gap: 6px; margin: 5px 0; }
.tas-math-callout p b { flex: 1; padding: 7px; border-radius: 10px; color: #1f2754; background: #75edf3; font-size: 13px; text-align: center; }
.tas-math-callout p b:last-child { background: #ffe06c; }
.tas-math-callout > strong { display: block; color: #fff; font-size: 13px; text-align: center; }
.tas-timer { display: flex; align-items: center; gap: 8px; margin: 7px 1px; }
.tas-timer > span { flex: 0 0 auto; color: #b7b4d2; font-size: 8px; }
.tas-timer > i { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .11); }
.tas-timer b { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff7b67, #ffe266, #4ee3eb); transition: width .1s linear; }
.tas-answer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tas-answer-grid button { min-height: 59px; display: grid; place-content: center; gap: 3px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 13px; color: #fff; background: rgba(255, 255, 255, .07); transition: transform .18s ease, background .18s ease; }
.tas-answer-grid button:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255, 255, 255, .14); }
.tas-answer-grid button kbd { color: #8883b4; font: 700 8px/1 sans-serif; }
.tas-answer-grid button b { font-size: 17px; }
.tas-answer-grid button.correct { border-color: transparent; color: #142645; background: #63e7d1; box-shadow: 0 0 22px rgba(75, 236, 214, .34); }
.tas-answer-grid button.wrong { border-color: #ff796a; color: #ffb0a6; background: rgba(255, 90, 79, .16); }
.tas-game-tip { margin: 7px 0 0; color: #a9a5c5; font-size: 9px; text-align: center; }
.tas-game-tip b { color: #fff0a5; }
.tas-game-feedback { min-height: 57px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 7px; margin-top: 7px; padding: 7px 9px; border-radius: 13px; color: #c7c4db; background: rgba(255, 255, 255, .07); }
.tas-game-feedback > span { font-size: 23px; text-align: center; }
.tas-game-feedback p { margin: 0; font-size: 9px; line-height: 1.45; }
.tas-game-feedback b { display: block; color: #fff; font-size: 10px; }
.tas-game-feedback.success { color: #bff8e6; background: rgba(53, 200, 157, .18); }
.tas-game-feedback.danger { color: #ffd1ca; background: rgba(242, 90, 75, .17); }
.tas-restart-button { width: 100%; min-height: 43px; margin-top: 7px; border: 0; border-radius: 13px; color: #22204f; background: linear-gradient(135deg, #ffe060, #ffbd56); font-size: 11px; font-weight: 900; }

@keyframes tas-beam-flow { to { stroke-dashoffset: -48; } }
@keyframes tas-player-shot { 0% { opacity: 0; transform: translate(180px, 130px) scale(.3); } 20% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: none; } }
@keyframes tas-enemy-pop { 25% { transform: translate(-7px, 3px) rotate(-8deg); } 48% { transform: translate(9px, -3px) rotate(9deg); } }
@keyframes tas-shield-hit { 28% { transform: translateX(-8px); opacity: .6; } 55% { transform: translateX(7px); } }
@keyframes tas-victory { to { transform: scale(1.035); filter: brightness(1.25); } }

/* Course route and section rhythm. */
.tas-route { position: sticky; z-index: 7; top: calc(var(--topbar) + 7px); display: flex; align-items: center; gap: 6px; margin: 13px auto 0; padding: 7px; overflow-x: auto; border: 1px solid var(--tas-line); border-radius: 17px; background: rgba(255, 253, 247, .9); box-shadow: 0 9px 26px rgba(40, 31, 97, .09); backdrop-filter: blur(15px); scrollbar-width: none; }
.tas-route::-webkit-scrollbar { display: none; }
.tas-route > span { flex: 0 0 auto; padding: 0 9px; color: var(--tas-muted); font-size: 9px; font-weight: 800; }
.tas-route button { flex: 0 0 auto; min-height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; color: #40396b; background: transparent; font-size: 10px; font-weight: 850; }
.tas-route button:hover { border-color: rgba(80, 67, 174, .14); background: #f0edff; }
.tas-section { scroll-margin-top: calc(var(--topbar) + 76px); margin-top: 20px; padding: clamp(28px, 4.6vw, 58px); overflow: hidden; border: 1px solid var(--tas-line); border-radius: 34px; background: var(--tas-card); box-shadow: 0 20px 55px rgba(43, 32, 97, .08); }
.tas-section-head { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr); align-items: end; gap: 25px; margin-bottom: 27px; }
.tas-section-head > span { grid-column: 1 / -1; color: var(--tas-violet); font-size: 10px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.tas-section-head h2 { margin: -14px 0 0; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -.045em; }
.tas-section-head p { margin: 0; color: var(--tas-muted); font-size: 14px; line-height: 1.75; }
.tas-section-head strong { color: var(--tas-violet); }

/* Drag the triangle. */
.tas-shape { background: radial-gradient(circle at 90% 5%, rgba(81, 225, 236, .22), transparent 24rem), linear-gradient(145deg, #fffdfa, #f0edff); }
.tas-shape-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(285px, .7fr); gap: 13px; }
.tas-shape-stage,
.tas-angle-team { min-width: 0; border: 1px solid var(--tas-line); border-radius: 25px; background: rgba(255, 255, 255, .78); }
.tas-shape-stage { padding: 10px 14px 14px; }
#tas-shape-svg { width: 100%; max-height: 430px; touch-action: none; }
#tas-live-triangle { fill: rgba(111, 90, 235, .15); stroke: #6550d5; stroke-width: 7; stroke-linejoin: round; }
.tas-live-arc { fill: none; stroke-width: 17; stroke-linecap: round; opacity: .86; transition: opacity .2s, stroke-width .2s; }
.tas-live-arc.angle-a { stroke: var(--tas-cyan); }
.tas-live-arc.angle-b { stroke: var(--tas-yellow); }
.tas-live-arc.angle-c { stroke: var(--tas-coral); }
#tas-shape-svg[data-active-angle="a"] .tas-live-arc:not(.angle-a),
#tas-shape-svg[data-active-angle="b"] .tas-live-arc:not(.angle-b),
#tas-shape-svg[data-active-angle="c"] .tas-live-arc:not(.angle-c) { opacity: .18; }
#tas-shape-svg[data-active-angle] .tas-live-arc { stroke-width: 20; }
.tas-fixed-vertex { fill: #40346d; }
.tas-apex-handle { cursor: grab; }
.tas-apex-handle:active { cursor: grabbing; }
.tas-apex-handle circle { fill: var(--tas-violet); stroke: #fff; stroke-width: 5; filter: drop-shadow(0 7px 9px rgba(57, 42, 135, .28)); }
.tas-apex-handle path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#tas-shape-svg text { fill: var(--tas-ink); font-size: 18px; font-weight: 900; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 6; }
.tas-shape-stage > p { min-height: 47px; margin: 4px 0 0; padding: 12px 14px; border-radius: 14px; color: #4b4275; background: #f1effd; font-size: 11px; font-weight: 750; line-height: 1.6; text-align: center; }
.tas-angle-team { display: grid; align-content: center; gap: 7px; padding: 20px; }
.tas-angle-team > small { color: var(--tas-violet); font-size: 9px; font-weight: 900; }
.tas-angle-team h3 { margin: 0 0 7px; font-size: 22px; }
.tas-angle-team button { min-height: 67px; display: grid; grid-template-columns: 43px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--tas-line); border-radius: 15px; color: var(--tas-ink); background: #fff; text-align: left; }
.tas-angle-team button > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: var(--tas-cyan); font-style: normal; font-weight: 950; }
.tas-angle-team button:nth-of-type(2) > i { color: #4d3b0c; background: var(--tas-yellow); }
.tas-angle-team button:nth-of-type(3) > i { background: var(--tas-coral); }
.tas-angle-team button b,
.tas-angle-team button small { display: block; }
.tas-angle-team button b { font-size: 13px; }
.tas-angle-team button small { margin-top: 2px; color: var(--tas-muted); font-size: 9px; }
.tas-angle-team button.active { border-color: var(--tas-violet); box-shadow: inset 0 0 0 2px rgba(113, 88, 238, .12); }
.tas-angle-team blockquote { margin: 8px 0 0; padding: 14px; border-radius: 15px; color: #fff; background: var(--tas-indigo); }
.tas-angle-team blockquote b,
.tas-angle-team blockquote span { display: block; }
.tas-angle-team blockquote b { color: #83f4f6; font-size: 10px; }
.tas-angle-team blockquote span { margin-top: 4px; font-size: 14px; font-weight: 900; }

/* History. */
.tas-history { color: #fff; background: radial-gradient(circle at 90% 15%, rgba(65, 219, 231, .14), transparent 26rem), var(--tas-indigo-deep); border-color: rgba(255, 255, 255, .1); }
.tas-history .tas-section-head h2 { color: #fff; }
.tas-history .tas-section-head > span { color: #6fe8ef; }
.tas-history .tas-section-head p { color: #c2bfda; }
.tas-history-figure { position: relative; margin: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .13); border-radius: 26px; background: #2c2866; }
.tas-history-figure img { width: 100%; max-height: 600px; aspect-ratio: 16 / 8.7; object-fit: cover; object-position: center 68%; }
.tas-history-figure figcaption { position: absolute; right: 14px; bottom: 14px; max-width: 430px; padding: 10px 13px; border-radius: 13px; color: #fff; background: rgba(18, 14, 54, .73); backdrop-filter: blur(9px); font-size: 10px; line-height: 1.55; }
.tas-history-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 11px; }
.tas-history-timeline article { min-height: 210px; padding: 18px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px; background: rgba(255, 255, 255, .055); }
.tas-history-timeline article.featured { background: linear-gradient(145deg, rgba(72, 216, 226, .16), rgba(120, 92, 240, .12)); }
.tas-history-timeline i { font-style: normal; font-size: 29px; }
.tas-history-timeline small { display: block; margin-top: 10px; color: #73e2e9; font-size: 9px; font-weight: 900; }
.tas-history-timeline h3 { margin: 6px 0; color: #fff; font-size: 18px; line-height: 1.25; }
.tas-history-timeline p { margin: 0; color: #bbb8d1; font-size: 11px; line-height: 1.7; }
.tas-source-note { margin: 12px 0 0; color: #8d89ad; font-size: 9px; text-align: right; }
.tas-source-note a { color: #70e2e8; }

/* Tear-and-assemble discovery lab. */
.tas-tear { background: linear-gradient(145deg, #fff9e9, #f1efff); }
.tas-tear-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 12px; }
.tas-tear-stage,
.tas-tear-console { min-width: 0; border: 1px solid var(--tas-line); border-radius: 24px; background: rgba(255, 255, 255, .8); }
.tas-tear-stage { padding: 12px; }
.tas-lab-top { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 12px; color: #fff; background: var(--tas-indigo); font-size: 10px; }
.tas-lab-top b { color: #82edf3; }
#tas-tear-svg { width: 100%; max-height: 430px; }
.tas-paper-triangle { fill: #fff5c8; stroke: #4e438e; stroke-width: 5; stroke-dasharray: 10 8; transition: opacity .45s ease; }
.tas-piece { stroke: rgba(255, 255, 255, .9); stroke-width: 3; transition: opacity .4s ease, transform .5s ease; }
.tas-piece.angle-a { fill: var(--tas-cyan); }
.tas-piece.angle-b { fill: var(--tas-yellow); }
.tas-piece.angle-c { fill: var(--tas-coral); }
#tas-assembled-pieces,
.tas-straight-line,
.tas-straight-label { opacity: 0; transition: opacity .45s ease; }
.tas-straight-line { stroke: var(--tas-indigo); stroke-width: 8; stroke-linecap: round; }
.tas-straight-label { fill: var(--tas-ink); font-size: 16px; font-weight: 900; text-anchor: middle; }
#tas-tear-svg.assembled .tas-paper-triangle,
#tas-tear-svg.assembled #tas-original-pieces { opacity: .12; }
#tas-tear-svg.assembled #tas-assembled-pieces,
#tas-tear-svg.assembled .tas-straight-line,
#tas-tear-svg.assembled .tas-straight-label { opacity: 1; }
.tas-tear-stage > p { min-height: 44px; margin: 5px 0 0; padding: 10px 12px; border-radius: 13px; color: #4b4274; background: #f1effc; font-size: 11px; line-height: 1.6; text-align: center; }
.tas-tear-console { display: grid; align-content: center; gap: 11px; padding: 20px; }
.tas-flat-angle { display: grid; grid-template-columns: 70px 1fr; align-items: center; column-gap: 12px; padding: 14px; border-radius: 17px; background: #f1effc; }
.tas-flat-angle > i { grid-row: 1 / 3; width: 70px; height: 36px; border-radius: 70px 70px 0 0; border: 7px solid var(--tas-violet); border-bottom: 0; }
.tas-flat-angle b,
.tas-flat-angle small { display: block; }
.tas-flat-angle b { font-size: 18px; }
.tas-flat-angle small { color: var(--tas-muted); font-size: 9px; }
#tas-assemble { min-height: 52px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--tas-violet), #4baee1); box-shadow: 0 8px 0 #493aab, 0 14px 24px rgba(72, 55, 166, .18); font-size: 12px; font-weight: 900; }
.tas-tear-console ol { display: grid; gap: 6px; margin: 2px 0; padding: 0; list-style: none; }
.tas-tear-console li { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 12px; background: #faf9ff; }
.tas-tear-console li > i { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: #fff; background: var(--tas-violet); font-style: normal; font-weight: 900; }
.tas-tear-console li p { margin: 0; }
.tas-tear-console li b,
.tas-tear-console li span { display: block; }
.tas-tear-console li b { font-size: 11px; }
.tas-tear-console li span { color: var(--tas-muted); font-size: 8px; }
.tas-lab-caution { margin: 0; padding: 10px; border-radius: 12px; color: #725b2f; background: #fff3c8; font-size: 9px; line-height: 1.55; }

/* Parallel-line proof. */
.tas-proof { color: #fff; background: radial-gradient(circle at 10% 90%, rgba(55, 215, 225, .14), transparent 24rem), #221d5b; border-color: rgba(255, 255, 255, .1); }
.tas-proof .tas-section-head h2 { color: #fff; }
.tas-proof .tas-section-head > span { color: #77eaf0; }
.tas-proof .tas-section-head p { color: #c4c1dc; }
.tas-proof-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr); gap: 12px; }
.tas-proof-stage,
.tas-proof-console { min-width: 0; border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; background: rgba(10, 8, 41, .42); }
.tas-proof-stage { padding: 12px; }
.tas-proof-stage svg { width: 100%; max-height: 430px; }
.tas-proof-parallel { stroke: #61e7ee; stroke-width: 7; stroke-linecap: round; }
.tas-proof-parallel.top { opacity: .2; stroke-dasharray: 11 9; transition: opacity .3s; }
.tas-proof-triangle { fill: rgba(116, 90, 238, .16); stroke: #9d8cff; stroke-width: 6; stroke-linejoin: round; }
.tas-proof-angle { stroke: rgba(255, 255, 255, .68); stroke-width: 2; opacity: .1; transition: opacity .35s, transform .45s; }
.tas-proof-angle.copy-a { fill: var(--tas-cyan); }
.tas-proof-angle.copy-b { fill: var(--tas-yellow); }
.tas-proof-angle.angle-c { fill: var(--tas-coral); }
.tas-proof-stage text { fill: #fff; font-size: 20px; font-weight: 900; text-anchor: middle; }
.tas-proof-stage .tas-parallel-mark { fill: #61e7ee; font-size: 25px; }
.tas-proof-stage[data-step="1"] .tas-proof-parallel.top,
.tas-proof-stage[data-step="2"] .tas-proof-parallel.top,
.tas-proof-stage[data-step="3"] .tas-proof-parallel.top { opacity: 1; }
.tas-proof-stage[data-step="2"] .tas-proof-angle,
.tas-proof-stage[data-step="3"] .tas-proof-angle { opacity: .93; }
.tas-proof-stage[data-step="3"] .tas-proof-angle { filter: drop-shadow(0 0 11px rgba(255, 255, 255, .27)); }
.tas-proof-stage > p { min-height: 46px; margin: 5px 0 0; padding: 11px 13px; border-radius: 13px; color: #d5d2e8; background: rgba(255, 255, 255, .07); font-size: 10px; line-height: 1.6; text-align: center; }
.tas-proof-stage > p b { color: #72e7ee; }
.tas-proof-console { padding: 17px; }
.tas-proof-console > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tas-proof-console button { min-height: 67px; display: grid; place-items: center; gap: 3px; padding: 8px 4px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 13px; color: #c8c5dd; background: rgba(255, 255, 255, .055); font-size: 8px; font-weight: 800; }
.tas-proof-console button i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #201c50; background: #70e3e9; font-style: normal; font-weight: 950; }
.tas-proof-console button.active { border-color: #ffdf6b; color: #241f55; background: #ffdf6b; }
.tas-proof-console article { min-height: 180px; margin: 9px 0; padding: 16px; border-radius: 17px; background: rgba(255, 255, 255, .07); }
.tas-proof-console article small { color: #71e5eb; font-size: 9px; font-weight: 900; }
.tas-proof-console article h3 { margin: 6px 0; color: #fff; font-size: 20px; line-height: 1.25; }
.tas-proof-console article p { margin: 0; color: #bfbbd4; font-size: 10px; line-height: 1.7; }
.tas-proof-console blockquote { margin: 0; padding: 14px; border-radius: 14px; color: #d4d0e5; background: rgba(64, 218, 227, .11); font-size: 11px; text-align: center; }
.tas-proof-console blockquote b { color: #ffdf6b; font-size: 18px; }

/* Calculation lab. */
.tas-calculate { background: linear-gradient(145deg, #f2efff, #fff8e8); }
.tas-formula-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tas-formula-steps article { position: relative; min-height: 160px; padding: 19px; overflow: hidden; border: 1px solid var(--tas-line); border-radius: 20px; background: rgba(255, 255, 255, .78); }
.tas-formula-steps article > i { position: absolute; right: 10px; top: 1px; color: rgba(113, 88, 238, .08); font: 800 82px/1 Georgia, serif; }
.tas-formula-steps small { color: var(--tas-violet); font-size: 9px; font-weight: 900; }
.tas-formula-steps h3 { position: relative; margin: 12px 0 7px; font-size: clamp(18px, 2vw, 25px); }
.tas-formula-steps p { position: relative; margin: 0; color: var(--tas-muted); font-size: 11px; line-height: 1.55; }
.tas-calc-lab { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(300px, 1.05fr) minmax(250px, .7fr); gap: 9px; margin-top: 11px; }
.tas-calc-controls,
.tas-calc-result,
.tas-special-trick { min-width: 0; padding: 19px; border: 1px solid var(--tas-line); border-radius: 21px; background: rgba(255, 255, 255, .8); }
.tas-calc-controls > small { color: var(--tas-violet); font-size: 9px; font-weight: 900; }
.tas-calc-controls label { display: flex; justify-content: space-between; margin: 12px 0 4px; color: var(--tas-ink); font-size: 11px; font-weight: 850; }
.tas-calc-controls output { color: var(--tas-violet); font-size: 13px; }
.tas-calc-controls input { width: 100%; min-height: 34px; accent-color: var(--tas-violet); }
.tas-calc-controls > p { margin: 8px 0 0; color: var(--tas-muted); font-size: 9px; line-height: 1.5; }
.tas-calc-result { display: grid; align-content: center; text-align: center; }
.tas-formula-line { display: inline-grid; place-content: center; width: 104px; height: 104px; margin: 0 auto 12px; border: 7px solid #fff; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--tas-coral), #795be9); box-shadow: 0 13px 28px rgba(95, 66, 191, .22); }
.tas-formula-line b { font-size: 29px; }
.tas-formula-line small { font-size: 8px; }
.tas-calc-result > p { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin: 0 0 9px; }
.tas-calc-result > p i,
.tas-calc-result > p strong { padding: 6px 8px; border-radius: 9px; background: #eeebff; font-style: normal; font-size: 12px; }
.tas-calc-result > p em { color: var(--tas-muted); font-style: normal; }
.tas-calc-result > p strong { color: #fff; background: var(--tas-violet); }
.tas-calc-result > small { color: var(--tas-muted); font-size: 9px; line-height: 1.5; }
.tas-special-trick { display: grid; align-content: center; grid-template-columns: 42px 1fr; gap: 11px; color: #fff; background: var(--tas-indigo); }
.tas-special-trick > span { font-size: 31px; }
.tas-special-trick small { color: #77e7ed; font-size: 8px; font-weight: 900; }
.tas-special-trick h3 { margin: 5px 0; font-size: 17px; line-height: 1.3; }
.tas-special-trick p { margin: 0; color: #c3bfd6; font-size: 9px; line-height: 1.6; }

/* Winning with the knowledge. */
.tas-strategy { color: #fff; background: radial-gradient(circle at 95% 4%, rgba(255, 216, 90, .13), transparent 26rem), #171342; border-color: rgba(255, 255, 255, .1); }
.tas-strategy .tas-section-head h2 { color: #fff; }
.tas-strategy .tas-section-head > span { color: #ffe06b; }
.tas-strategy .tas-section-head p { color: #c4c1d6; }
.tas-strategy-figure { position: relative; margin: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); border-radius: 25px; }
.tas-strategy-figure img { width: 100%; aspect-ratio: 16 / 8.4; object-fit: cover; }
.tas-strategy-figure figcaption { position: absolute; left: 13px; bottom: 13px; max-width: 430px; padding: 9px 12px; border-radius: 12px; color: #fff; background: rgba(15, 11, 50, .74); backdrop-filter: blur(9px); font-size: 10px; }
.tas-strategy-game { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 10px; margin-top: 11px; }
.tas-gate-board,
.tas-strategy-game > aside { min-width: 0; padding: 18px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 21px; background: rgba(255, 255, 255, .055); }
.tas-gate-scene { position: relative; min-height: 245px; overflow: hidden; border-radius: 17px; background: linear-gradient(160deg, #383080, #20205c); }
.tas-gate-scene::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49%, rgba(89, 226, 234, .08) 50%, transparent 51%); background-size: 40px 40px; }
.tas-path-start,
.tas-path-gate,
.tas-path-goal { position: absolute; z-index: 2; }
.tas-path-start { left: 8%; bottom: 13%; font-size: 42px; transition: left .65s ease, bottom .65s ease; }
.tas-path-gate { left: 45%; bottom: 22%; color: #69ecf4; font: 800 125px/1 sans-serif; filter: drop-shadow(0 0 13px rgba(80, 225, 237, .45)); }
.tas-path-goal { right: 8%; top: 15%; font-size: 43px; }
.tas-gate-scene > i { position: absolute; left: 13%; right: 12%; bottom: 28%; height: 7px; border-radius: 99px; background: #66e5ed; transform: rotate(-12deg); transform-origin: left; opacity: .45; }
.tas-gate-board[data-choice="correct"] .tas-path-start { left: 82%; bottom: 68%; }
.tas-gate-board[data-choice="correct"] .tas-path-gate { color: #ffe06b; }
.tas-gate-board[data-choice="wrong"] .tas-path-gate { color: #ff7464; animation: tas-shield-hit .4s ease; }
.tas-gate-board > p { margin: 12px 0 0; color: #c9c6dc; font-size: 11px; text-align: center; }
.tas-gate-board > p b { color: #ffe06b; }
.tas-strategy-game > aside > small { color: #6fe2e9; font-size: 9px; font-weight: 900; }
.tas-strategy-game > aside h3 { margin: 5px 0 10px; color: #fff; font-size: 21px; }
.tas-strategy-game > aside > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tas-strategy-game button { min-height: 49px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 13px; color: #fff; background: rgba(255, 255, 255, .07); font-weight: 900; }
.tas-strategy-game button.correct { color: #192047; background: #65e5d0; }
.tas-strategy-game button.wrong { color: #ffb9ae; background: rgba(255, 102, 88, .15); }
#tas-strategy-result { min-height: 96px; margin: 8px 0; padding: 13px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
#tas-strategy-result b { color: #ffe16d; font-size: 12px; }
#tas-strategy-result p { margin: 5px 0 0; color: #bdb9d2; font-size: 9px; line-height: 1.6; }
.tas-strategy-game ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.tas-strategy-game li { padding: 7px 9px; border-radius: 10px; color: #bcb9d0; background: rgba(255, 255, 255, .04); font-size: 9px; }
.tas-strategy-game li b { margin-right: 6px; color: #6fe3ea; }
.tas-life-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.tas-life-grid article { min-height: 150px; padding: 16px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 19px; background: rgba(255, 255, 255, .055); }
.tas-life-grid span { font-size: 31px; }
.tas-life-grid h3 { margin: 8px 0 5px; color: #fff; font-size: 16px; }
.tas-life-grid p { margin: 0; color: #b9b6cb; font-size: 10px; line-height: 1.6; }

/* Boss and completion. */
.tas-boss { display: grid; grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr); align-items: center; gap: clamp(23px, 5vw, 66px); background: linear-gradient(140deg, #fff8e6, #eeeaff); }
.tas-boss-intro > span { color: var(--tas-violet); font-size: 10px; font-weight: 950; letter-spacing: .16em; }
.tas-boss-intro h2 { margin: 8px 0; font-size: clamp(30px, 4vw, 50px); line-height: 1.05; letter-spacing: -.04em; }
.tas-boss-intro p { margin: 0; color: var(--tas-muted); font-size: 12px; line-height: 1.7; }
.tas-boss-stars { display: flex; gap: 7px; margin-top: 15px; }
.tas-boss-stars i { display: grid; place-items: center; width: 47px; height: 47px; border: 2px solid rgba(101, 80, 207, .17); border-radius: 50%; color: #a49dc8; background: rgba(255, 255, 255, .6); font-style: normal; font-size: 26px; transition: .2s ease; }
.tas-boss-stars i.earned { color: #624611; background: #ffda5f; transform: rotate(-7deg) scale(1.06); }
.tas-boss-shell { min-width: 0; }
.tas-question,
.tas-quiz-complete { min-height: 325px; display: grid; align-content: center; padding: clamp(20px, 3vw, 34px); border: 1px solid var(--tas-line); border-radius: 24px; background: rgba(255, 255, 255, .88); box-shadow: 0 17px 36px rgba(49, 38, 106, .1); }
.tas-question > small,
.tas-quiz-complete > small { color: var(--tas-violet); font-size: 9px; font-weight: 900; }
.tas-question h3,
.tas-quiz-complete h3 { margin: 8px 0 15px; font-size: clamp(20px, 2.3vw, 29px); line-height: 1.3; }
.tas-options { display: grid; gap: 7px; }
.tas-options button { min-height: 53px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--tas-line); border-radius: 14px; color: var(--tas-ink); background: #fff; text-align: left; }
.tas-options button i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--tas-violet); background: #efecff; font-style: normal; font-weight: 950; }
.tas-options button.correct { border-color: transparent; color: #fff; background: #3a9d8c; }
.tas-options button.correct i { color: #3a9d8c; background: #fff; }
.tas-options button.wrong { border-color: #e38475; background: #fff0ed; }
.tas-question > p { min-height: 38px; margin: 8px 0; padding: 8px 10px; border-radius: 11px; color: var(--tas-muted); background: #f3f0fa; font-size: 10px; line-height: 1.55; }
.tas-question > p.success { color: #176457; background: #def5ea; }
.tas-question > p.wrong { color: #994133; background: #ffebe7; }
.tas-next-question { justify-self: end; min-height: 43px; padding: 0 16px; border: 0; border-radius: 13px; color: #fff; background: var(--tas-violet); font-size: 11px; font-weight: 900; }
.tas-quiz-complete { justify-items: center; text-align: center; }
.tas-quiz-complete > span { font-size: 58px; }
.tas-quiz-complete h3 { margin-bottom: 7px; }
.tas-quiz-complete p { max-width: 510px; margin: 0 0 13px; color: var(--tas-muted); font-size: 11px; line-height: 1.65; }
.tas-quiz-complete button { min-height: 43px; min-width: 165px; margin: 4px; padding: 0 13px; border: 1px solid var(--tas-line); border-radius: 13px; color: var(--tas-ink); background: #fff; font-size: 10px; font-weight: 850; }
.tas-quiz-complete button:last-child { border-color: transparent; color: #fff; background: var(--tas-violet); }
.tas-home-mission { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 17px; margin-top: 23px; padding: 23px 27px; border: 1px solid var(--tas-line); border-radius: 24px; background: linear-gradient(135deg, #fffef8, #efedff); box-shadow: 0 13px 32px rgba(43, 34, 93, .07); }
.tas-home-mission > span { font-size: 48px; }
.tas-home-mission small { color: var(--tas-violet); font-size: 9px; font-weight: 900; }
.tas-home-mission h2 { margin: 4px 0; font-size: 21px; }
.tas-home-mission p { margin: 0; color: var(--tas-muted); font-size: 11px; line-height: 1.65; }
.tas-home-mission > b { padding: 13px 16px; border-radius: 15px; color: #fff; background: var(--tas-indigo); font: 800 18px/1.2 Georgia, serif; white-space: nowrap; }
.tas-complete-row { display: flex; justify-content: center; margin: 18px 0; }
.tas-complete-row .complete-button { min-width: min(420px, 100%); min-height: 52px; border-radius: 16px; }
.tas-footer { margin-top: 12px; }

@container triangle-angle-sum (max-width: 1000px) {
  .tas-game-shell { width: 96%; }
  .tas-game-layout { grid-template-columns: minmax(345px, 1.18fr) minmax(255px, .82fr); }
  .tas-section-head { grid-template-columns: 1fr; gap: 10px; }
  .tas-section-head h2 { margin-top: -14px; }
  .tas-shape-grid,
  .tas-tear-grid,
  .tas-proof-grid,
  .tas-strategy-game { grid-template-columns: 1fr; }
  .tas-calc-lab { grid-template-columns: 1fr 1fr; }
  .tas-special-trick { grid-column: 1 / -1; }
  .tas-life-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .tas-hero { min-height: 0; border-radius: 28px; }
  .tas-hero-bg { object-position: 69% center; }
  .tas-hero-shade { background: linear-gradient(180deg, rgba(19, 15, 61, .9), rgba(18, 15, 58, .96)); }
  .tas-game-shell { width: 100%; padding: 15px; }
  .tas-game-heading { align-items: start; margin-bottom: 8px; }
  .tas-game-heading h1 { margin-top: 7px; font-size: 34px; }
  .tas-game-heading p { font-size: 12px; }
  .tas-skip-button { display: none; }
  .tas-game-hud { gap: 4px; }
  .tas-game-hud > span { padding: 5px 6px; border-radius: 10px; }
  .tas-game-hud small { font-size: 7px; letter-spacing: 0; }
  .tas-game-hud b { font-size: 11px; }
  .tas-game-layout { grid-template-columns: 1fr; gap: 7px; }
  .tas-game-board,
  .tas-game-console { border-radius: 19px; }
  .tas-game-board { padding: 4px 6px; }
  #tas-battle-svg { height: min(34svh, 290px); max-height: none; }
  .tas-game-console { padding: 9px; }
  .tas-enemy-card { padding: 6px 8px; }
  .tas-enemy-card h2 { font-size: 14px; }
  .tas-math-callout { margin: 5px 0; padding: 8px; }
  .tas-math-callout p { margin: 3px 0; }
  .tas-math-callout p b { padding: 5px; }
  .tas-answer-grid button { min-height: 52px; }
  .tas-game-tip { display: none; }
  .tas-game-feedback { min-height: 48px; margin-top: 5px; }
  .tas-route { top: calc(var(--topbar) + 5px); margin-top: 9px; }
  .tas-route > span { display: none; }
  .tas-section { margin-top: 17px; padding: 24px 17px; border-radius: 26px; }
  .tas-section-head { margin-bottom: 18px; }
  .tas-section-head h2 { font-size: 32px; }
  .tas-section-head p { font-size: 13px; }
  .tas-shape-grid,
  .tas-history-timeline,
  .tas-tear-grid,
  .tas-proof-grid,
  .tas-calc-lab,
  .tas-strategy-game,
  .tas-boss { grid-template-columns: 1fr; }
  #tas-shape-svg,
  #tas-tear-svg,
  .tas-proof-stage svg { max-height: 330px; }
  .tas-history-figure img,
  .tas-strategy-figure img { aspect-ratio: 4 / 3; }
  .tas-history-figure figcaption,
  .tas-strategy-figure figcaption { position: static; max-width: none; border-radius: 0; }
  .tas-history-timeline article { min-height: 150px; }
  .tas-formula-steps { grid-template-columns: 1fr; }
  .tas-formula-steps article { min-height: 125px; }
  .tas-special-trick { grid-column: auto; }
  .tas-life-grid { grid-template-columns: 1fr 1fr; }
  .tas-boss { gap: 18px; }
  .tas-question,
  .tas-quiz-complete { min-height: 300px; }
  .tas-home-mission { grid-template-columns: 52px 1fr; padding: 17px; }
  .tas-home-mission > span { font-size: 40px; }
  .tas-home-mission > b { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}

@media (max-width: 480px) {
  .tas-game-shell { padding: 11px; }
  .tas-mission-pill { min-height: 23px; font-size: 8px; }
  .tas-game-heading h1 { font-size: 29px; }
  .tas-game-heading p { display: -webkit-box; overflow: hidden; font-size: 10px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tas-game-hud { margin-bottom: 5px; }
  .tas-game-hud > span { padding: 4px; }
  .tas-game-hud small { font-size: 6.5px; }
  .tas-game-hud b { font-size: 9.5px; }
  #tas-battle-svg { height: min(28svh, 230px); }
  .tas-board-key { justify-content: start; gap: 4px 9px; font-size: 8px; }
  .tas-board-key span:last-child { display: none; }
  .tas-enemy-card > span { font-size: 24px; }
  .tas-enemy-card h2 { font-size: 12px; }
  .tas-math-callout > small,
  .tas-math-callout > strong { display: none; }
  .tas-math-callout p { margin: 0; }
  .tas-timer { margin: 4px 1px; }
  .tas-answer-grid button { min-height: 46px; }
  .tas-answer-grid button b { font-size: 15px; }
  .tas-game-feedback { grid-template-columns: 28px 1fr; padding: 5px 7px; }
  .tas-game-feedback > span { font-size: 19px; }
  .tas-game-feedback p { font-size: 8px; }
  .tas-section-head h2 { font-size: 28px; }
  .tas-angle-team { padding: 14px; }
  .tas-history-timeline { grid-template-columns: 1fr; }
  .tas-proof-console > div { grid-template-columns: 1fr; }
  .tas-proof-console button { min-height: 48px; grid-template-columns: 28px 1fr; justify-content: start; }
  .tas-proof-console article { min-height: 145px; }
  .tas-life-grid { grid-template-columns: 1fr; }
  .tas-life-grid article { min-height: 115px; }
  .tas-gate-scene { min-height: 210px; }
  .tas-boss-stars i { width: 42px; height: 42px; }
  .tas-home-mission h2 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .tas-page *,
  .tas-page *::before,
  .tas-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
