/* intro-tour.css — the shared grade picker and domain cards (tb-*), Mr. Neft the guide
   (pg-*), and the frame mode that shows only the activity inside the tour's live panel (html.is-framed).
   Tokens come from ds.css; domain colour comes from the d-* classes (--room, --room-ink, --room-soft). */

/* ── Frame mode: the lab inside the tour's live panel ── */
html.is-framed .lab-top,
html.is-framed .lab-footer,
html.is-framed .lang-banner,
html.is-framed .skip-link,
html.is-framed #introReturn,
html.is-framed #introNext,
html.is-framed #nsr-launcher,
html.is-framed .tour-dock {
  display: none !important; /* frame mode hides chrome the activity does not need */
}
html.is-framed body {
  padding: 0 !important; /* the return bar and dock reserve space the frame does not show */
}
html.is-framed .lab-main {
  padding-block: 0.75rem 1.5rem;
}

/* ── Grade picker ── */
.tb-picker {
  display: grid;
  gap: 0.6rem;
}
.tb-picker-label {
  margin: 0;
  font: 600 1.35rem/1.2 var(--font-display);
  color: var(--ink);
}
.tb-picker-btns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
.tb-pick {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  min-height: 4.5rem;
  padding: 0.55rem 0.4rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--dur-1) var(--ease-press),
    border-color var(--dur-2) var(--ease-out),
    background-color var(--dur-2) var(--ease-out);
}
.tb-pick:hover {
  border-color: var(--brand);
}
.tb-pick:active {
  transform: translateY(1px);
}
.tb-pick-short {
  font: 600 1.6rem/1 var(--font-display);
}
.tb-pick-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-2);
}
.tb-pick[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--shadow-lift);
}
.tb-pick[aria-pressed="true"] .tb-pick-name {
  color: var(--on-brand);
}
.tb-picker-hint {
  margin: 0;
}

/* ── The four domain cards ── */
.tb-domains {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}
.tb-domain {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--room) 28%, transparent);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-card, var(--shadow));
}
.tb-domain img {
  display: block;
  width: 100%;
  height: 7.5rem;
  object-fit: contain;
  background: var(--room-soft);
  border-bottom: 4px solid var(--room);
  padding: 0.5rem;
}
.tb-domain-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem 1rem;
}
.tb-domain h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font: 700 1rem/1.2 var(--font);
  color: var(--room-ink);
}
.tb-domain .in-ic {
  width: 2rem;
  height: 2rem;
  background: var(--room);
  color: #fff;
}
.tb-domain .in-ic svg {
  width: 1.1rem;
  height: 1.1rem;
}
.tb-domain p {
  margin: 0;
}
.tb-domain-title {
  display: grid;
  gap: 0.1rem;
}
.tb-domain-title strong {
  font: 600 1.15rem/1.2 var(--font-display);
}
.tb-domain .btn {
  justify-self: start;
  margin-top: 0.2rem;
}
@media (max-width: 1100px) {
  .tb-domains {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .tb-picker-btns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tb-domains {
    grid-template-columns: minmax(0, 1fr);
  }
  .tb-domain {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    grid-template-rows: none;
  }
  .tb-domain img {
    height: 100%;
    border-bottom: 0;
    border-right: 4px solid var(--room);
  }
}

/* ── Mr. Neft, the guide ── */
.pg {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--pearl-blue), var(--surface) 70%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card, var(--shadow));
}
.pg-avatar svg {
  width: 5.5rem;
  height: 5.5rem;
  display: block;
}
.pg-main {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}
.pg-name {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
}
.pg-name strong {
  font: 600 1.2rem/1.1 var(--font-display);
}
.pg-name span {
  color: var(--ink-2);
  font-size: 0.9rem;
}
.pg-bubble {
  position: relative;
  padding: 0.75rem 0.9rem;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.pg-bubble::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -0.6rem;
  border-style: solid;
  border-width: 0 0.6rem 0.6rem 0;
  border-color: transparent var(--line) transparent transparent;
}
.pg-bubble p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
}
.pg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pg-chip {
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--line-control, var(--line-strong));
  background: var(--surface);
  color: var(--brand-ink, var(--ink));
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.pg-chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.pg-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}
.pg-form input {
  min-height: 2.75rem;
  min-width: 0;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--line-control, var(--line-strong));
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}
.pg-form .btn {
  min-height: 2.75rem;
}
.pg-note {
  margin: 0;
}
.pg-thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.pg-thread:empty {
  display: none;
}
.pg-turn {
  display: grid;
  gap: 0.35rem;
}
.pg-q {
  justify-self: end;
  max-width: 90%;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius) var(--radius) 0 var(--radius);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}
.pg-a {
  padding: 0.6rem 0.8rem;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.pg-a p {
  margin: 0 0 0.4rem;
}
.pg-a p:last-child {
  margin-bottom: 0;
}
.pg-a.is-pending {
  color: var(--ink-2);
  font-style: italic;
}
.pg-hits {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}
.pg-hits span {
  display: block;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.pg-clear {
  justify-self: start;
}
.pg-hear {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid var(--line-control, var(--line-strong));
  background: var(--surface);
  color: var(--brand-ink, var(--ink));
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.pg-hear:hover,
.pg-hear.is-speaking {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.pg-hear svg {
  width: 1.1rem;
  height: 1.1rem;
}
.mn-art .mn-mouth {
  transform-origin: 60px 66px;
}
.mn-art.is-talking .mn-mouth {
  animation: mn-talk 0.32s var(--ease-in-out) infinite alternate;
}
@keyframes mn-talk {
  to {
    transform: scaleY(0.45);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mn-art.is-talking .mn-mouth {
    animation: none;
  }
}
@media (max-width: 480px) {
  /* A phone: the picture becomes a short banner so the words get the full card width. */
  .tb-domain {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .tb-domain img {
    height: 5.5rem;
    border-right: 0;
    border-bottom: 4px solid var(--room);
  }
}
@media (max-width: 560px) {
  .pg {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    padding: 0.85rem;
  }
  .pg-avatar svg {
    width: 3.75rem;
    height: 3.75rem;
  }
}

@media print {
  .pg {
    display: none !important; /* the guide panel is for the screen only */
  }
}

/* Re-addressed 2026-11-12: the edge pinned the previous build of this file under its new hash (see functions/access-practice-lab/[[path]].js). */
