@font-face {
  font-family: Inter;
  src: url("assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #19272e;
  --muted: #53616a;
  --paper: #f6f7f4;
  --line: #ccd2ce;
  --blue: #244bc6;
  --lime: #d8f386;
  --stage: #19252c;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scrollbar-color: #929e9e var(--paper);
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible,
.topic:focus-within {
  outline: 3px solid #728af2;
  outline-offset: 3px;
}
::selection {
  background: #d7e6ff;
}
i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}
i svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wrap {
  width: min(1456px, 100%);
  padding-inline: clamp(18px, 4.6vw, 76px);
  margin: auto;
}
.mast {
  border-bottom: 1px solid var(--line);
}
.mast-inner {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 17px;
}
.brand {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
  font-weight: 730;
  font-size: 21px;
  letter-spacing: -0.04em;
}
.brand svg {
  width: 27px;
  height: 27px;
  stroke: var(--blue);
  stroke-width: 2;
  fill: none;
}
.mast-sub,
.reference {
  font-size: 13px;
}
.mast-sub {
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}
.reference {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  min-height: 44px;
}
.reference:hover {
  text-decoration: underline;
}
.reference svg {
  width: 15px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: clamp(30px, 5.2vh, 57px) 28px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(48px, 5.6vw, 84px);
  font-weight: 570;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.families {
  display: flex;
  gap: 4px;
  background: #e9ece7;
  border: 1px solid #d8ddd7;
  border-radius: 12px;
  padding: 4px;
}
.family {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  color: #4c595e;
  font-size: 14px;
  font-weight: 570;
  background: none;
}
.family canvas {
  width: 33px;
  height: 23px;
}
.family:hover {
  background: #dfe4de;
}
.family[aria-pressed="true"] {
  background: #24353d;
  color: white;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(295px, 1fr);
  min-height: clamp(475px, 63svh, 680px);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
}
.viewer {
  flex-direction: column;
  min-width: 0;
  display: flex;
  background: var(--stage);
}
.stage {
  position: relative;
  width: 100%;
  min-height: clamp(330px, 52svh, 600px);
  flex: 1;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 48% 44%,
    #344650 0%,
    #24333c 44%,
    #18242b 86%
  );
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.31;
  background-image: radial-gradient(#80929b 0.7px, transparent 0.9px);
  background-size: 21px 21px;
}
.stage canvas {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  touch-action: pan-y;
}
.stage canvas[hidden] {
  display: none;
}
#model {
  cursor: grab;
}
#model:active {
  cursor: grabbing;
}
#model:focus-visible {
  outline-offset: -4px;
}
.spec {
  position: absolute;
  top: 26px;
  left: 26px;
  color: #e9eff0;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  pointer-events: none;
}
.spec-dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 100%;
}
.view-reset,
.zoom {
  border: 1px solid #65737c;
  border-radius: 8px;
  background: #22313a;
  color: #e3ecef;
}
.view-reset {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.viewer-bottom {
  position: absolute;
  bottom: 16px;
  left: 23px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.zoom {
  display: flex;
  pointer-events: auto;
}
.zoom button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 42px;
  color: inherit;
  border: 0;
  background: none;
}
.zoom button + button {
  border-left: 1px solid #56666d;
}
.zoom button:disabled {
  opacity: 0.35;
}
.zoom button:hover:enabled,
.view-reset:hover {
  background: #41515b;
}
.gesture {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #d3dfe4;
  font-size: 12px;
}
.gesture i svg {
  width: 21px;
  height: 21px;
}
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
#leader,
#measure {
  stroke: var(--lime);
  fill: none;
  stroke-width: 1.35;
}
#pin {
  fill: var(--lime);
  stroke: #28372d;
  stroke-width: 1.5;
}
.tag {
  position: absolute;
  white-space: nowrap;
  background: var(--lime);
  color: #293619;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  pointer-events: none;
}
.lesson {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(22px, 2.7vw, 43px);
  background: #fcfcf9;
}
.lesson-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 640;
  min-height: 42px;
  padding: 0 4px;
  cursor: pointer;
}
.topic {
  background: transparent;
  border: 0;
}
.topic i:last-of-type svg {
  width: 14px;
}
.count {
  font-size: 12px;
  color: var(--muted);
}
.progress {
  display: flex;
  gap: 4px;
  margin: 7px 0 clamp(28px, 5.1vh, 52px);
}
.progress span {
  flex: 1;
  height: 3px;
  background: #dce1db;
  border-radius: 2px;
}
.progress span.done {
  background: var(--blue);
}
h2 {
  font-size: clamp(33px, 3.6vw, 56px);
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.03;
  text-wrap: balance;
}
.explain {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  margin-top: 13px;
  color: #43515a;
}
.example {
  display: flex;
  align-items: center;
  gap: 16px;
  border-block: 1px solid var(--line);
  padding: 16px 0;
  margin: 24px 0 0;
}
.example canvas {
  width: 76px;
  height: 63px;
  flex-shrink: 0;
}
h3 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}
.example p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 3px;
}
#actions {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
#actions:empty {
  display: none;
}
.lesson-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 28px;
}
.lesson-nav button {
  min-height: 46px;
  border-radius: 7px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.prev {
  background: none;
  color: var(--ink);
  width: 46px;
  border: 1px solid #bac3c4;
}
.prev:disabled {
  opacity: 0.45;
}
.next {
  flex: 1;
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 8px 17px;
  gap: 12px;
  font-weight: 580;
  font-size: 14px;
}
.next:hover {
  background: #183ba9;
}
.under {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  padding: 14px 1px 22px;
}
.under > span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.under svg {
  width: 14px;
  height: 14px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 880px) {
  .wrap {
    padding-inline: 22px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1.27fr) minmax(280px, 1fr);
  }
  .lesson {
    padding: 20px;
  }
  .family {
    padding-inline: 10px;
  }
  .heading {
    padding-block: 26px 22px;
  }
  .example {
    gap: 9px;
  }
  .example canvas {
    width: 64px;
  }
}
@media (max-width: 700px) {
  .wrap {
    padding-inline: 16px;
  }
  .mast-inner {
    height: 52px;
    gap: 12px;
  }
  .brand {
    font-size: 18px;
  }
  .brand svg {
    width: 23px;
    height: 23px;
  }
  .mast-sub {
    font-size: 12px;
    padding-left: 12px;
  }
  .reference {
    font-size: 12px;
    gap: 4px;
  }
  .heading {
    display: block;
    padding-top: 21px;
    padding-bottom: 13px;
  }
  h1 {
    font-size: 44px;
  }
  .families {
    display: flex;
    width: 100%;
    margin-top: 14px;
    padding: 3px;
    gap: 2px;
  }
  .family {
    flex: 1;
    padding: 3px 5px;
    gap: 4px;
    min-height: 42px;
    font-size: 13px;
  }
  .family canvas {
    width: 29px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 12px;
  }
  .viewer .stage {
    height: clamp(255px, 37svh, 390px);
    min-height: 0;
    flex: none;
  }
  .lesson {
    padding: 12px 18px 17px;
  }
  .progress {
    margin: 1px 0 16px;
  }
  .topic {
    font-size: 13px;
    min-height: 41px;
  }
  .count {
    font-size: 12px;
  }
  h2 {
    font-size: 35px;
  }
  .explain {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.45;
  }
  .example {
    padding: 10px 0;
    margin-top: 16px;
    gap: 13px;
  }
  .example canvas {
    height: 46px;
    width: 60px;
  }
  .lesson-nav {
    padding-top: 16px;
  }
  .spec {
    top: 19px;
    left: 15px;
    font-size: 11px;
  }
  .view-reset {
    top: 6px;
    right: 6px;
    border-color: transparent;
    background: none;
  }
  .viewer-bottom {
    bottom: 8px;
    left: 13px;
    right: 8px;
  }
  .gesture {
    font-size: 11px;
  }
  .zoom button {
    height: 42px;
    width: 42px;
  }
  .tag {
    font-size: 11px;
  }
  .under {
    font-size: 11px;
    align-items: flex-start;
  }
  .under > span:last-child {
    white-space: nowrap;
  }
  #actions {
    margin-top: 10px;
  }
}
@media (max-width: 355px) {
  .mast-sub {
    display: none;
  }
  .wrap {
    padding-inline: 11px;
  }
  .family canvas {
    width: 23px;
  }
  .under {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
#turn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 620;
  color: #253022;
  background: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 7px;
  pointer-events: auto;
}
#turn:disabled {
  opacity: 0.78;
}
#turn[hidden],
.gesture[hidden] {
  display: none;
}
#measure {
  paint-order: stroke;
  filter: drop-shadow(0 1px 1px #101e25);
  stroke-width: 2.25;
}
.spec {
  background: #1d2b33;
  padding: 5px 8px;
  border-radius: 4px;
  top: 16px;
  left: 15px;
}
.family span {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .view-reset {
    background: #22313a;
    border: 1px solid #65737c;
    top: 8px;
    right: 8px;
  }
  .spec {
    top: 12px;
    left: 8px;
  }
  .family {
    padding-inline: 3px;
    gap: 3px;
  }
  .family canvas {
    width: 24px;
  }
  .gesture {
    gap: 5px;
  }
}
@media (max-width: 355px) {
  .family {
    font-size: 12px;
  }
  .family canvas {
    width: 18px;
  }
}

[hidden] {
  display: none !important;
}
.mast.guide-open {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--paper);
}
#size-panel {
  background: #f5f7f3;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
#size-panel summary {
  list-style: none;
  min-height: 51px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px clamp(14px, 2vw, 26px);
  cursor: pointer;
}
#size-panel summary::-webkit-details-marker {
  display: none;
}
#size-panel summary:focus-visible {
  outline: 3px solid #728af2;
  outline-offset: -4px;
}
.adjust-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 640;
  font-size: 14px;
}
#size-summary {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
#size-panel summary > i svg {
  width: 15px;
}
#size-panel[open] summary > i {
  transform: rotate(180deg);
}
.size-content {
  padding: 0 clamp(14px, 2vw, 26px) 16px;
}
#size-choices {
  display: grid;
  gap: 13px;
}
.card-field {
  border: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.card-field legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.choice-card {
  position: relative;
  cursor: pointer;
  display: flex;
  min-width: 0;
}
.choice-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice-card > span,
#topic-cards button {
  border: 1px solid #b7c1c4;
  border-radius: 7px;
  background: #fff;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  gap: 7px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  line-height: 1.2;
}
.choice-card input:checked + span,
#topic-cards button[aria-pressed="true"] {
  border-color: var(--blue);
  color: #193b9e;
  background: #e9efff;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.choice-card input:focus-visible + span,
#topic-cards button:focus-visible {
  outline: 3px solid #718cf4;
  outline-offset: 2px;
}
.choice-card:hover > span,
#topic-cards button:hover {
  border-color: var(--blue);
}
#head-values {
  margin: 14px 0 0;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 25px;
}
#head-values div {
  display: grid;
  gap: 3px;
}
#head-values dt {
  font-size: 11px;
  color: var(--muted);
}
#head-values dd {
  margin: 0;
  font-size: 14px;
  font-weight: 620;
}
#topic-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 12px;
}
#topic-cards button {
  text-align: left;
}
@media (max-width: 700px) {
  #size-panel {
    border-bottom: 1px solid var(--line);
  }
  .size-content {
    padding-bottom: 13px;
  }
  .choice-card > span {
    padding: 5px 10px;
  }
  .card-row {
    gap: 5px;
  }
}
@media (forced-colors: active) {
  .choice-card input:checked + span,
  #topic-cards button[aria-pressed="true"] {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
}
