/* Interactive product walkthrough · 2026-09-06 */

@media screen {
  .how-it-works {
    width: min(var(--content-wide), 100%);
    margin: 0 auto 54px;
    scroll-margin-top: 92px;
  }

  .hiw-intro {
    display: flex;
    gap: 28px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
  }

  .hiw-intro > div {
    max-width: 770px;
  }

  .hiw-intro h2 {
    margin: 0 0 10px;
    font-size: clamp(31px, 3vw, 38px);
    font-weight: 600;
    letter-spacing: -0.035em;
  }

  .hiw-intro > div > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
  }

  .hiw-demo-note {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
    margin: 0 0 4px;
    padding: 8px 11px;
    border: 1px solid #bcd0c4;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  .hiw-demo-note > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
  }

  .hiw-progress-nav {
    position: relative;
    z-index: 2;
  }

  .hiw-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--major-radius) var(--major-radius) 0 0;
    background: #f1f5f2;
    list-style: none;
  }

  .hiw-progress li {
    min-width: 0;
  }

  .hiw-progress li + li {
    border-left: 1px solid var(--line);
  }

  .hiw-progress button {
    display: flex;
    width: 100%;
    min-height: 74px;
    gap: 11px;
    align-items: center;
    padding: 12px 17px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
  }

  .hiw-progress button:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
  }

  .hiw-progress button[aria-current="step"] {
    background: #ffffff;
    color: var(--ink);
    box-shadow: inset 0 4px var(--green);
  }

  .hiw-progress button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
  }

  .hiw-progress-number {
    display: grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    place-items: center;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
  }

  .hiw-progress button[aria-current="step"] .hiw-progress-number,
  .hiw-progress button.is-complete .hiw-progress-number {
    border-color: var(--green);
    background: var(--green);
    color: #ffffff;
  }

  .hiw-progress button > span:last-child,
  .hiw-progress strong,
  .hiw-progress small {
    display: block;
    min-width: 0;
  }

  .hiw-progress strong {
    color: inherit;
    font-size: 14px;
    font-weight: 650;
  }

  .hiw-progress small {
    margin-top: 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hiw-stage {
    border: 1px solid var(--line);
    border-radius: 0 0 var(--major-radius) var(--major-radius);
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(25, 42, 32, 0.08);
  }

  .hiw-panel {
    padding: clamp(24px, 4vw, 42px);
    outline: none;
    animation: hiw-panel-reveal 180ms ease-out;
  }

  @keyframes hiw-panel-reveal {
    from {
      opacity: 0.58;
      transform: translateY(5px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hiw-stage-copy {
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(300px, 1.28fr);
    gap: 5px 36px;
    align-items: end;
    margin-bottom: 22px;
  }

  .hiw-step-label {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--green);
    font-size: 13px;
    font-weight: 650;
  }

  .hiw-stage-copy h3 {
    margin: 0;
    font-size: clamp(25px, 2.6vw, 31px);
    font-weight: 600;
    letter-spacing: -0.03em;
  }

  .hiw-stage-copy > p:last-child {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
  }

  .hiw-screen {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--neutral-paper);
  }

  .hiw-screen-bar {
    display: flex;
    min-height: 47px;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
  }

  .hiw-screen-bar strong {
    color: var(--ink);
    font-weight: 650;
  }

  .hiw-screen-state,
  .hiw-mini-eyebrow,
  .hiw-report-section-heading > div:first-child > span,
  .hiw-evidence-heading > div > span,
  .hiw-pattern-callout > span,
  .hiw-answer-evidence > span,
  .hiw-teach-next > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.025em;
  }

  .hiw-screen-state {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
  }

  .hiw-choose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    min-height: 355px;
  }

  .hiw-topic-picker {
    padding: 24px;
    background: #ffffff;
  }

  .hiw-screen-heading span,
  .hiw-screen-heading strong {
    display: block;
  }

  .hiw-screen-heading span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 12px;
  }

  .hiw-screen-heading strong {
    font-size: 20px;
    font-weight: 600;
  }

  .hiw-topic-list {
    display: grid;
    gap: 9px;
    margin-top: 17px;
  }

  .hiw-topic-list button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 68px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
  }

  .hiw-topic-list button:hover,
  .hiw-topic-list button[aria-pressed="true"] {
    border-color: #8eaa9a;
    background: var(--green-soft);
  }

  .hiw-topic-list button[aria-pressed="true"] {
    box-shadow: inset 4px 0 var(--green);
  }

  .hiw-topic-list button > span:first-child,
  .hiw-topic-list button strong,
  .hiw-topic-list button small {
    display: block;
  }

  .hiw-topic-list button strong {
    font-size: 14px;
    font-weight: 650;
  }

  .hiw-topic-list button small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
  }

  .hiw-topic-list button > span:last-child {
    color: var(--green);
    font-size: 18px;
  }

  .hiw-topic-preview {
    min-width: 0;
    padding: 25px;
    border-left: 1px solid var(--line);
    background: var(--green-soft);
  }

  .hiw-topic-preview > div {
    min-height: 100%;
  }

  .hiw-topic-preview > [data-hiw-topic-placeholder] {
    display: grid;
    align-content: center;
    justify-items: start;
  }

  .hiw-preview-marker {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 13px;
    border-radius: 50%;
    place-items: center;
    background: var(--green);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
  }

  .hiw-topic-preview [data-hiw-topic-placeholder] strong {
    max-width: 270px;
    font-size: 17px;
    font-weight: 600;
  }

  .hiw-topic-preview [data-hiw-topic-placeholder] p,
  .hiw-topic-preview [data-hiw-topic-summary] > p:not(.hiw-mini-eyebrow) {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }

  .hiw-topic-preview h4 {
    margin: 2px 0 5px;
    font-size: 21px;
    font-weight: 600;
  }

  .hiw-topic-preview ul {
    display: grid;
    gap: 0;
    margin: 16px 0;
    padding: 0;
    border-top: 1px solid #c8dbd0;
    list-style: none;
  }

  .hiw-topic-preview li {
    position: relative;
    padding: 8px 0 8px 18px;
    border-bottom: 1px solid #c8dbd0;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.35;
  }

  .hiw-topic-preview li::before {
    position: absolute;
    top: 12px;
    left: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    content: "";
  }

  .hiw-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hiw-preview-chips span {
    padding: 4px 7px;
    border: 1px solid #bcd0c4;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--green-dark);
    font-size: 10px;
    font-weight: 600;
  }

  .hiw-panel-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
  }

  .hiw-panel-actions > p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
  }

  .hiw-panel-actions .primary-button,
  .hiw-panel-actions .secondary-button {
    flex: 0 0 auto;
  }

  .hiw-share-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(250px, 0.72fr);
    min-height: 350px;
  }

  .hiw-live-state {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--green-dark);
    font-weight: 600;
  }

  .hiw-live-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
  }

  .hiw-share-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(25px, 4vw, 44px);
    background: var(--green-soft);
  }

  .hiw-share-copy h4 {
    margin: 3px 0 8px;
    font-size: clamp(25px, 3vw, 32px);
    font-weight: 600;
  }

  .hiw-share-copy > p:not(.hiw-mini-eyebrow) {
    max-width: 500px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
  }

  .hiw-demo-link {
    display: flex;
    min-width: 0;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 21px;
    padding: 13px 15px;
    border: 1px solid #aac3b5;
    border-radius: var(--control-radius);
    background: #ffffff;
  }

  .hiw-demo-link > span {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hiw-demo-link small {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    font-size: 10px;
    font-weight: 650;
  }

  .hiw-share-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
    border-top: 1px solid #c8dbd0;
  }

  .hiw-share-facts > span {
    padding-top: 14px;
  }

  .hiw-share-facts > span + span {
    padding-left: 18px;
    border-left: 1px solid #c8dbd0;
  }

  .hiw-share-facts strong,
  .hiw-share-facts small {
    display: block;
  }

  .hiw-share-facts strong {
    font-size: 14px;
    font-weight: 650;
  }

  .hiw-share-facts small {
    color: var(--muted);
    font-size: 11px;
  }

  .hiw-qr-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-left: 1px solid var(--line);
    background: #ffffff;
    text-align: center;
  }

  .hiw-qr-label {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
  }

  .hiw-qr {
    display: grid;
    width: 156px;
    height: 156px;
    margin-bottom: 13px;
    padding: 9px;
    border: 1px solid var(--line);
    place-items: center;
    background: #ffffff;
  }

  .hiw-qr svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .hiw-qr-card > strong {
    font-size: 13px;
    font-weight: 650;
  }

  .hiw-qr-card > small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
  }

  .hiw-replay {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: var(--green-dark);
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
  }

  .hiw-replay:hover {
    text-decoration: underline;
  }

  .hiw-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border-bottom: 1px solid #cbdcd2;
    background: var(--green-soft);
  }

  .hiw-summary-cards > div {
    display: flex;
    gap: 8px;
    align-items: baseline;
    min-height: 76px;
    padding: 17px 22px;
  }

  .hiw-summary-cards > div + div {
    border-left: 1px solid #cbdcd2;
  }

  .hiw-summary-cards strong {
    font-size: 27px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  .hiw-summary-cards span {
    color: var(--muted);
    font-size: 12px;
  }

  .hiw-student-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    padding: 7px 22px 12px;
    background: #ffffff;
  }

  .hiw-student-row {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    min-height: 55px;
    border-bottom: 1px solid var(--line);
  }

  .hiw-student-avatar {
    display: grid;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    place-items: center;
    background: var(--neutral-paper);
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 700;
  }

  .hiw-student-copy {
    min-width: 0;
  }

  .hiw-student-copy strong,
  .hiw-student-copy span {
    display: block;
  }

  .hiw-student-copy strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hiw-student-track {
    width: 100%;
    max-width: 170px;
    height: 3px;
    margin-top: 5px;
    overflow: hidden;
    background: var(--line);
  }

  .hiw-student-track i {
    display: block;
    width: var(--hiw-progress, 8%);
    height: 100%;
    background: var(--green);
    transition: width 320ms ease;
  }

  .hiw-student-status {
    min-width: 72px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--neutral-paper);
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    text-align: center;
  }

  .hiw-student-row[data-status="working"] .hiw-student-status {
    background: var(--gold-soft);
    color: var(--gold);
  }

  .hiw-student-row[data-status="complete"] .hiw-student-avatar,
  .hiw-student-row[data-status="complete"] .hiw-student-status {
    background: var(--green);
    color: #ffffff;
  }

  .hiw-report-screen {
    padding: 0;
    background: #ffffff;
  }

  .hiw-report-header {
    display: flex;
    gap: 22px;
    align-items: end;
    justify-content: space-between;
    padding: 20px 22px 0;
    border-bottom: 1px solid var(--line);
  }

  .hiw-report-header h4 {
    margin: 2px 0 3px;
    font-size: 24px;
    font-weight: 600;
  }

  .hiw-report-header > div:first-child > p:last-child {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 12px;
  }

  .hiw-report-tabs {
    display: flex;
    gap: 18px;
    align-items: end;
  }

  .hiw-report-tabs span {
    position: relative;
    padding: 10px 0 13px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
  }

  .hiw-report-tabs .is-active {
    color: var(--ink);
  }

  .hiw-report-tabs .is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    background: var(--green);
    content: "";
  }

  .hiw-report-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--green-soft);
  }

  .hiw-report-metrics > div {
    display: grid;
    grid-template-columns: 9px auto minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-height: 65px;
    padding: 12px 15px;
    background: transparent;
  }

  .hiw-report-metrics > div + div {
    border-left: 1px solid #cbdcd2;
  }

  .hiw-report-metrics > div > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  .hiw-report-metrics .tone-secure > span,
  .hiw-objective-bar .tone-secure,
  .hiw-result-legend .tone-secure {
    background: #367b58;
  }

  .hiw-report-metrics .tone-attention > span,
  .hiw-objective-bar .tone-attention,
  .hiw-result-legend .tone-attention {
    background: #bf6754;
  }

  .hiw-objective-bar .tone-developing,
  .hiw-result-legend .tone-developing {
    background: #dba033;
  }

  .hiw-report-metrics strong {
    font-size: 23px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  .hiw-report-metrics small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
  }

  .hiw-report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 18px;
    padding: 0 22px 22px;
  }

  .hiw-class-patterns,
  .hiw-evidence-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #ffffff;
  }

  .hiw-class-patterns {
    padding: 17px;
  }

  .hiw-report-section-heading {
    display: flex;
    gap: 16px;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 11px;
  }

  .hiw-report-section-heading h5,
  .hiw-evidence-heading h5 {
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.25;
  }

  .hiw-result-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 9px;
    justify-content: flex-end;
  }

  .hiw-result-legend span {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
  }

  .hiw-result-legend i {
    width: 7px;
    height: 7px;
    border-radius: 2px;
  }

  .hiw-objective-list {
    display: grid;
    border-top: 1px solid var(--line);
  }

  .hiw-objective-row {
    display: grid;
    grid-template-columns: minmax(145px, 0.82fr) minmax(170px, 1.18fr);
    gap: 11px;
    align-items: center;
    min-width: 0;
    min-height: 63px;
    padding: 9px 7px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

  .hiw-objective-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
  }

  .hiw-objective-bar {
    display: flex;
    width: 100%;
    height: 31px;
    min-width: 0;
    overflow: hidden;
    border-radius: 6px;
    background: var(--neutral-paper);
  }

  .hiw-objective-segment {
    position: relative;
    display: grid;
    flex: 0 0 var(--hiw-size);
    min-width: 0;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    cursor: pointer;
    touch-action: manipulation;
    transition: filter 140ms ease, box-shadow 140ms ease;
  }

  .hiw-objective-segment + .hiw-objective-segment {
    box-shadow: inset 2px 0 rgba(255, 255, 255, 0.72);
  }

  .hiw-objective-segment:focus-visible {
    z-index: 2;
    outline: 3px solid #173f2e;
    outline-offset: -3px;
  }

  @media (hover: hover) {
    .hiw-objective-segment:hover {
      z-index: 1;
      filter: brightness(1.09) saturate(1.05);
      box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
    }
  }

  .hiw-objective-bar .tone-developing {
    color: #17271f;
  }

  .hiw-objective-bar b {
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
  }

  .hiw-objective-hint {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
  }

  .report-outcome-tooltip.hiw-objective-tooltip {
    width: min(380px, calc(100vw - 24px));
  }

  .hiw-evidence-card {
    padding: 17px;
    background: #f7faf8;
  }

  .hiw-evidence-heading {
    display: flex;
    gap: 10px;
    align-items: start;
    justify-content: space-between;
  }

  .hiw-attention-badge {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f6dfda;
    color: #7f332e;
    font-size: 9px;
    font-weight: 650;
  }

  .hiw-student-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 13px 0;
  }

  .hiw-student-chips span {
    padding: 4px 7px;
    border-radius: 5px;
    background: #e8eeea;
    color: #45574e;
    font-size: 9px;
    font-weight: 600;
  }

  .hiw-pattern-callout {
    padding: 12px 13px;
    border-left: 4px solid #bf6754;
    background: #faefec;
  }

  .hiw-pattern-callout strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 650;
  }

  .hiw-pattern-callout p {
    display: grid;
    gap: 2px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
  }

  .hiw-pattern-callout b {
    color: var(--ink);
    font-size: 9px;
    font-weight: 650;
  }

  .hiw-answer-evidence,
  .hiw-teach-next {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .hiw-answer-evidence p,
  .hiw-teach-next p {
    margin: 3px 0 0;
    color: var(--ink);
    font-size: 10px;
    line-height: 1.45;
  }

  .hiw-teach-next p {
    color: var(--green-dark);
    font-weight: 600;
  }

  .hiw-final-actions > div {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .hiw-final-actions a {
    text-decoration: none;
  }
}

@media screen and (max-width: 980px) {
  .hiw-choose-layout,
  .hiw-share-layout,
  .hiw-report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hiw-topic-preview,
  .hiw-qr-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hiw-topic-preview {
    min-height: 235px;
  }

  .hiw-share-layout {
    min-height: 0;
  }

  .hiw-qr-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 4px 18px;
    justify-items: start;
    text-align: left;
  }

  .hiw-qr-label {
    grid-column: 1 / -1;
  }

  .hiw-qr {
    grid-row: 2 / 4;
    width: 132px;
    height: 132px;
    margin: 0;
  }

  .hiw-qr-card > strong {
    align-self: end;
  }

  .hiw-qr-card > small {
    align-self: start;
  }
}

@media screen and (max-width: 720px) {
  .how-it-works {
    margin-bottom: 34px;
  }

  .hiw-intro {
    display: grid;
    gap: 13px;
    align-items: start;
    margin-bottom: 18px;
  }

  .hiw-intro h2 {
    font-size: 30px;
  }

  .hiw-intro > div > p:last-child {
    font-size: 15px;
  }

  .hiw-demo-note {
    justify-self: start;
    white-space: normal;
  }

  .hiw-progress button {
    min-height: 62px;
    gap: 6px;
    justify-content: center;
    padding: 9px 5px;
    text-align: center;
  }

  .hiw-progress button > span:last-child {
    min-width: 0;
  }

  .hiw-progress-number {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }

  .hiw-progress strong {
    font-size: 11px;
  }

  .hiw-progress small {
    display: none;
  }

  .hiw-panel {
    padding: 20px 14px;
  }

  .hiw-stage-copy {
    display: block;
    margin-bottom: 17px;
  }

  .hiw-stage-copy h3 {
    margin-top: 3px;
    font-size: 25px;
  }

  .hiw-stage-copy > p:last-child {
    margin-top: 7px;
    font-size: 14px;
  }

  .hiw-screen-bar {
    align-items: start;
    padding: 10px 12px;
  }

  .hiw-topic-picker,
  .hiw-topic-preview,
  .hiw-share-copy,
  .hiw-qr-card {
    padding: 18px 14px;
  }

  .hiw-topic-list button {
    min-height: 66px;
  }

  .hiw-topic-preview {
    min-height: 0;
  }

  .hiw-demo-link {
    display: grid;
    gap: 7px;
  }

  .hiw-demo-link small {
    justify-self: start;
  }

  .hiw-qr-card {
    display: flex;
    text-align: center;
  }

  .hiw-qr {
    width: 144px;
    height: 144px;
  }

  .hiw-summary-cards > div {
    display: grid;
    gap: 0;
    min-height: 72px;
    align-content: center;
    padding: 10px;
  }

  .hiw-summary-cards strong {
    font-size: 24px;
  }

  .hiw-summary-cards span {
    font-size: 10px;
    line-height: 1.2;
  }

  .hiw-student-list {
    grid-template-columns: minmax(0, 1fr);
    padding: 6px 12px 10px;
  }

  .hiw-report-header {
    display: block;
    padding: 17px 14px 0;
  }

  .hiw-report-header h4 {
    font-size: 21px;
  }

  .hiw-report-tabs {
    justify-content: space-between;
  }

  .hiw-report-metrics {
    margin: 14px;
  }

  .hiw-report-metrics > div {
    grid-template-columns: 7px minmax(0, 1fr);
    gap: 3px 5px;
    align-content: center;
    padding: 9px;
  }

  .hiw-report-metrics strong {
    font-size: 19px;
  }

  .hiw-report-metrics small {
    grid-column: 1 / -1;
    font-size: 9px;
  }

  .hiw-report-grid {
    gap: 13px;
    padding: 0 14px 14px;
  }

  .hiw-class-patterns,
  .hiw-evidence-card {
    padding: 13px;
  }

  .hiw-report-section-heading {
    display: grid;
  }

  .hiw-result-legend {
    justify-content: flex-start;
  }

  .hiw-objective-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .hiw-objective-name {
    font-size: 12px;
  }

  .hiw-evidence-heading {
    display: grid;
  }

  .hiw-attention-badge {
    justify-self: start;
  }

  .hiw-panel-actions,
  .hiw-final-actions {
    align-items: stretch;
  }

  .hiw-panel-actions > p {
    max-width: 150px;
  }

  .hiw-final-actions {
    display: grid;
  }

  .hiw-final-actions > button {
    justify-self: start;
  }

  .hiw-final-actions > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hiw-final-actions > div .primary-button,
  .hiw-final-actions > div .secondary-button {
    width: 100%;
  }
}

@media screen and (max-width: 420px) {
  .hiw-progress button {
    display: grid;
    gap: 3px;
    justify-items: center;
  }

  .hiw-panel-actions:not(.hiw-final-actions) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hiw-panel-actions > p {
    max-width: none;
  }

  .hiw-panel-actions .primary-button,
  .hiw-panel-actions .secondary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-panel {
    animation: none;
  }

  .hiw-objective-segment,
  .hiw-student-track i {
    transition: none;
  }
}

@media print {
  .how-it-works {
    display: none !important;
  }
}

/* Faster tour: warm homepage surround, familiar product screens, readable evidence. */
@media screen {
  #builder-view[data-builder-mode] > .how-it-works { display: none; }
  .how-it-works .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .how-it-works {
    margin-top: 30px;
    padding: clamp(16px, 2.5vw, 28px);
    border: 1px solid #e7c99e;
    border-top: 5px solid #cf8c35;
    border-radius: 20px;
    background: #fff3e3;
  }
  .hiw-intro { gap: 24px; margin-bottom: 20px; }
  .hiw-intro > div { max-width: 700px; }
  .hiw-intro .eyebrow { color: #805117; font-weight: 700; }
  .hiw-intro h2 { font-size: clamp(27px, 2.8vw, 34px); }
  .hiw-intro-actions { flex: 0 0 auto; display: grid; gap: 8px; justify-items: end; }
  .hiw-intro-actions .secondary-button { background: #fffaf3; border-color: #a87431; color: #6a4210; }
  .hiw-intro-actions > span { color: #715532; font-size: 12px; }
  .hiw-progress-nav { scroll-margin-top: 0; }
  .hiw-progress { background: #f4ede3; border-color: #d8cebe; }
  .hiw-progress button { min-height: 64px; }
  .hiw-progress button[aria-current="step"] { box-shadow: inset 0 4px #cf8c35; }
  .hiw-progress button:focus-visible { outline-offset: -4px; }
  .hiw-panel { padding: 24px; }
  .hiw-stage-copy { gap: 4px 24px; }
  .hiw-stage-copy h3 { font-size: 27px; }
  .hiw-choose-layout { min-height: 305px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hiw-topic-picker, .hiw-topic-preview { padding: 20px; }
  .hiw-topic-preview li, .hiw-topic-list button small { font-size: 13px; }
  .hiw-preview-chips span { font-size: 12px; }
  .hiw-mini-eyebrow, .hiw-screen-state, .hiw-screen-bar, .hiw-live-state { font-size: 13px; }
  .hiw-share-layout { min-height: 290px; }
  .hiw-demo-link > span { white-space: normal; overflow-wrap: anywhere; }
  .hiw-qr-card > small, .hiw-qr-label, .hiw-demo-link small, .hiw-share-facts small { font-size: 12px; }
  .hiw-complete-layout { display: grid; grid-template-columns: 1fr 1fr; background: white; }
  .hiw-sample-question { padding: 18px 22px; border-right: 1px solid var(--line); }
  .hiw-sample-question > strong { display: block; margin: 8px 0 13px; font-size: 18px; line-height: 1.35; }
  [data-hiw-answers] { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  [data-hiw-answers] button { min-height: 44px; padding: 8px; font-size: 13px; border: 1px solid #a2b6a9; border-radius: 7px; background: white; cursor: pointer; }
  [data-hiw-answers] button[aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); box-shadow: inset 3px 0 var(--green); }
  [data-hiw-answer-note] { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
  .hiw-student-list { grid-template-columns: 1fr; }
  .hiw-student-row { min-height: 46px; }
  .hiw-student-status { font-size: 12px; }
  .hiw-replay { min-height: 32px; font-size: 12px; }
  .hiw-report-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hiw-report-header > div:first-child > p:last-child { font-size: 13px; }
  .hiw-report-sample-label { color: var(--muted); font-size: 12px; margin-bottom: 17px; }
  .hiw-report-section-heading { display: grid; gap: 8px; }
  .hiw-result-legend { justify-content: start; }
  .hiw-result-legend span { font-size: 12px; }
  .hiw-objective-row { grid-template-columns: 1fr; gap: 8px; }
  .hiw-objective-name { font-size: 14px; }
  .hiw-objective-bar b { font-size: 12px; }
  .hiw-objective-bar .tone-attention, .hiw-result-legend .tone-attention { background: #ad513f; }
  .hiw-objective-hint, .hiw-report-metrics small { font-size: 12px; }
  .hiw-evidence-heading { display: grid; }
  .hiw-attention-badge { justify-self: start; font-size: 12px; }
  .hiw-evidence-heading h5 { font-size: 17px; }
  .hiw-pattern-callout strong, .hiw-pattern-callout p, .hiw-answer-evidence p, .hiw-teach-next p { font-size: 14px; }
  .hiw-pattern-callout b, .hiw-student-chips span,
  .hiw-report-section-heading > div:first-child > span, .hiw-evidence-heading > div > span,
  .hiw-pattern-callout > span, .hiw-answer-evidence > span, .hiw-teach-next > span { font-size: 12px; }
  .hiw-teach-next { background: #e9f3ee; border: 0; border-left: 4px solid var(--green); padding: 12px; }
  .hiw-answer-evidence summary { min-height: 36px; padding: 7px 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-dark); }
  .hiw-answer-evidence summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
  .hiw-group-names { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
  .hiw-group-names p { font-size: 13px; color: var(--muted); margin: 4px 0; }
  .hiw-group-names strong { color: var(--ink); }
  .hiw-report-insight {
    margin-top: 14px;
    padding: 13px 14px;
    border-left: 4px solid #cf8c35;
    border-radius: 0 8px 8px 0;
    background: #fff5e5;
  }
  .hiw-report-insight > span,
  .hiw-full-report-prompt small {
    color: var(--muted);
    font-size: 12px;
  }
  .hiw-report-insight strong {
    display: block;
    margin-top: 3px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
  }
  .hiw-report-insight p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .hiw-evidence-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .hiw-attention-badge {
    justify-self: end;
    background: #e4f0e9;
    color: #285c42;
  }
  .hiw-report-explainer {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }
  .hiw-full-report-prompt {
    display: grid;
    gap: 10px;
    margin-top: 15px;
    padding: 14px;
    border: 1px solid #cbdcd2;
    border-radius: 10px;
    background: #ffffff;
  }
  .hiw-full-report-prompt strong {
    color: var(--ink);
    font-size: 15px;
  }
  .hiw-full-report-prompt p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .hiw-full-report-prompt a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-self: start;
    min-height: 36px;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 700;
    text-underline-offset: 3px;
  }
  .hiw-full-report-prompt a:hover { color: var(--green); }
  .hiw-full-report-prompt a:focus-visible {
    border-radius: 3px;
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }
  .hiw-panel-actions { flex-wrap: wrap; }
  .hiw-panel-actions .primary-button, .hiw-panel-actions .secondary-button { white-space: normal; }
}
@media screen and (max-width: 980px) {
  .hiw-intro { display: grid; gap: 16px; }
  .hiw-intro-actions { justify-items: start; }
  .hiw-report-grid, .hiw-choose-layout, .hiw-share-layout { grid-template-columns: 1fr; }
  .hiw-stage-copy { display: block; }
  .hiw-stage-copy > p:last-child { margin-top: 6px; }
  .hiw-topic-preview { min-height: 0; }
  .hiw-qr-card { display: flex; }
}
@media screen and (max-width: 720px) {
  .how-it-works { padding: 15px 10px 10px; border-radius: 15px; }
  .hiw-intro { padding: 0 6px; }
  .hiw-intro h2 { font-size: 28px; }
  .hiw-panel { display: flex; flex-direction: column; padding: 16px 10px; }
  .hiw-stage-copy { order: -2; }
  .hiw-panel-actions { order: -1; margin: 0 0 16px; gap: 8px; }
  .hiw-panel-actions > p { display: none; }
  .hiw-panel-actions:not(.hiw-final-actions) { display: flex; flex-wrap: nowrap; }
  .hiw-panel-actions .primary-button, .hiw-panel-actions .secondary-button { width: auto; padding: 9px 11px; font-size: 13px; flex: 1 1 0; }
  .hiw-final-actions { display: grid; }
  .hiw-final-actions > button { justify-self: start; }
  .hiw-final-actions > div { grid-template-columns: auto 1fr; gap: 8px; }
  .hiw-final-actions > div .primary-button, .hiw-final-actions > div .secondary-button { width: 100%; }
  .hiw-complete-layout { grid-template-columns: 1fr; }
  .hiw-sample-question { padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hiw-topic-picker, .hiw-topic-preview { padding: 14px; }
  .hiw-screen-bar { flex-wrap: wrap; gap: 8px; }
  .hiw-report-metrics { margin: 10px; }
  .hiw-report-metrics > div { padding: 8px; }
  .hiw-report-grid { padding: 0 10px 10px; }
  .hiw-report-metrics small { font-size: 12px; }
  .hiw-class-patterns, .hiw-evidence-card { padding: 12px; }
  .hiw-evidence-card { order: 0; }
  .hiw-final-actions { order: 0; margin: 16px 0 0; }
  .hiw-report-header > div:first-child > p:last-child { display: none; }
  .hiw-report-header { padding-bottom: 10px; }
  .hiw-report-sample-label { display: block; margin: 8px 0 0; }
  .hiw-progress button { display: grid; justify-items: center; gap: 3px; }
  .hiw-progress strong { font-size: 12px; }
}
