/* Product icons and interface previews share the existing cards and copy. */
.products-section .product-grid { align-items: stretch; }
.products-section .product-card {
  --product-accent: #4d8050;
  --product-soft: #edf5e5;
  --product-stroke: #dce7d5;
  --product-stage: linear-gradient(155deg, #edf5e4, #f9faf2);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border-color: var(--product-stroke);
  border-radius: 22px;
  background: #fffefa;
  box-shadow: 0 9px 28px #233d250a;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.products-section .product-teacher {
  --product-accent: #527e8c;
  --product-soft: #eaf3f6;
  --product-stroke: #dce7eb;
  --product-stage: linear-gradient(155deg, #eaf3f7, #f6faf9);
}
.products-section .product-device {
  --product-accent: #94703f;
  --product-soft: #faf0df;
  --product-stroke: #e8dfd0;
  --product-stage: linear-gradient(155deg, #faf0e0, #fdf9f0);
}
.product-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; margin-bottom: 12px; }
.products-section .product-heading-row .product-kicker { margin: 0; color: var(--product-accent); font-size: 11px; line-height: 1.7; letter-spacing: 1.2px; }
.product-role-icon { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border: 1px solid var(--product-stroke); border-radius: 11px; background: var(--product-soft); color: var(--product-accent); }
.product-role-icon svg { width: 19px; height: 19px; }
.products-section .product-card h3 { font-size: 23px; }
.products-section .product-card .product-description { min-height: 76px; margin-top: 10px; color: #24392a; font-size: 14px; line-height: 1.8; }

/* Student and teacher cards show their original interface demonstrations. */
.product-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: none;
  min-width: 0;
  height: 220px;
  margin: 20px -8px 0;
  padding: 0 12px 12px;
  border: 1px solid var(--product-stroke);
  border-radius: 17px;
  background: var(--product-stage);
}
.product-stage-student, .product-stage-teacher { grid-template-rows: minmax(0, 1fr); align-items: center; padding-top: 12px; }
.product-stage > .product-scene { display: block; width: calc(100% + 24px); max-width: none; height: 100%; min-height: 0; margin-left: -12px; border-radius: 16px 16px 0 0; object-fit: contain; object-position: center bottom; }
.products-section .product-stage .product-demo {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 144px;
  margin: 0;
  padding: 11px 12px;
  overflow: visible;
  border-color: var(--product-stroke);
  border-radius: 12px;
  background: #fffffff2;
  box-shadow: 0 5px 16px #2b463b0d;
}
.products-section .product-demo .preview-topline { gap: 8px; margin: 0; color: #94a08a; font-size: 9px; line-height: 1.45; }
.products-section .product-demo .preview-topline > :first-child { color: var(--product-accent); font-weight: 600; }
.products-section .product-demo.preview-student-dialogue { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 9px 10px 9px 52px; }
.products-section .preview-student-dialogue .preview-topline { align-self: stretch; }
.products-section .preview-student-dialogue .voice-orb { top: 44px; left: 11px; width: 30px; height: 30px; gap: 2px; border-color: #dbe7ce; background: #eaf2dd; box-shadow: 0 0 0 4px #f0f5e999; }
.products-section .preview-student-dialogue .voice-orb i { width: 2px; height: 7px; }
.products-section .preview-student-dialogue .voice-orb i:nth-child(2), .products-section .preview-student-dialogue .voice-orb i:nth-child(4) { height: 13px; }
.products-section .preview-student-dialogue .voice-orb i:nth-child(3) { height: 20px; }
.products-section .preview-student-dialogue .chat-line { max-width: 100%; padding: 5px 8px; border-color: #e5ecdd; font-size: 10px; line-height: 1.5; }
.products-section .preview-student-dialogue .chat-line.is-reply { align-self: flex-end; margin-top: 0; background: #edf4e3; }
.products-section .product-demo.preview-teacher { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; align-items: center; gap: 7px 8px; }
.products-section .product-demo.preview-teacher .preview-topline { grid-column: 1 / -1; }
.products-section .product-demo .mini-prompt { grid-column: 1 / -1; padding: 7px 9px; border-color: #e3ebee; background: #fbfdfe; color: #69818b; font-size: 10px; line-height: 1.5; }
.products-section .product-demo .mini-chips { gap: 4px; margin: 0; }
.products-section .product-demo .mini-chips span { padding: 2px 5px; border-color: #e0e9ed; color: #7a929c; font-size: 9px; line-height: 1.4; }
.products-section .product-demo .mini-action { margin: 0; padding: 5px 8px; border-radius: 6px; background: #658c97; font-size: 9px; line-height: 1.5; white-space: nowrap; }

.product-stage-device > .product-scene { object-position: center; }
.product-device-note { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 47px; padding: 10px 12px; border: 1px solid #eadfcb; border-radius: 12px; background: #fffdf8d9; color: #5f4b2f; font-size: 12px; line-height: 1.65; text-align: center; }
.product-device-note > svg { flex: none; width: 22px; height: 22px; }
.product-waveform { display: flex; flex: none; align-items: center; justify-content: center; gap: 3px; width: 24px; height: 23px; }
.product-waveform i { display: block; width: 2px; height: 8px; border-radius: 3px; background: #b19662; }
.product-waveform i:nth-child(2), .product-waveform i:nth-child(4) { height: 15px; }
.product-waveform i:nth-child(3) { height: 21px; }

.products-section .product-features { gap: 0; margin-top: 20px; }
.products-section .product-features li { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 47px; padding: 9px 0; color: #263b2d; font-size: 13px; line-height: 1.65; }
.products-section .product-features li + li { border-top: 1px solid var(--product-stroke); }
.products-section .product-features li::before { content: none; }
.products-section .product-features .feature-icon { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--product-soft); color: var(--product-accent); }
.products-section .product-features .feature-icon svg { width: 16px; height: 16px; }
.products-section .product-features li > span:last-child { min-width: 0; overflow-wrap: anywhere; }

.product-detail-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; padding: 14px; border: 1px solid var(--product-stroke); border-radius: 14px; background: var(--product-stage); }
.product-detail-code { display: block; flex: 0 1 180px; min-width: 0; padding: 4px; border-radius: 10px; background: #fff; }
.product-detail-code img { display: block; width: 100%; height: auto; }
.product-detail-code:focus-visible { outline: 3px solid var(--product-accent); outline-offset: 4px; }
.product-detail-copy { flex: 1 1 120px; min-width: 0; text-align: center; }
.product-detail-copy strong { display: block; color: #5f4b2f; font-size: 15px; line-height: 1.6; }
.products-section .product-detail-copy p { margin: 6px 0 0; color: #76654c; font-size: 12px; line-height: 1.8; }

/* At tablet widths, each demonstration sits beside the existing text. */
@media (min-width: 761px) and (max-width: 1000px) {
  .products-section .product-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .products-section .product-card { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-rows: auto auto auto 1fr; column-gap: 28px; padding: 26px; }
  .products-section .product-heading-row { grid-column: 1; grid-row: 1; margin-bottom: 9px; }
  .products-section .product-card h3 { grid-column: 1; grid-row: 2; }
  .products-section .product-card .product-description { grid-column: 1; grid-row: 3; min-height: 0; margin-top: 10px; }
  .products-section .product-stage { grid-column: 2; grid-row: 1 / 5; align-self: center; width: 100%; height: 220px; margin: 0; }
  .products-section .product-features { grid-column: 1; grid-row: 4; align-self: end; margin-top: 18px; }
  .products-section .product-detail-entry { grid-column: 1 / -1; grid-row: 5; }
}

@media (max-width: 760px) {
  .products-section .product-grid { gap: 24px; }
  .products-section .product-card { padding: 22px; }
  .product-heading-row { margin-bottom: 11px; }
  .products-section .product-card .product-description { min-height: 0; margin-top: 10px; }
  .products-section .product-stage { height: 220px; margin-top: 22px; }
  .products-section .product-stage .product-demo { height: 144px; }
  .products-section .preview-student-dialogue .chat-line { font-size: 11px; }
  .products-section .preview-student-dialogue .voice-orb { top: 49px; }
  .products-section .product-demo .mini-prompt { font-size: 11px; }
  .products-section .product-features { margin-top: 18px; }
}

@media (max-width: 360px) {
  .products-section .product-card { padding: 18px; }
  .products-section .product-card h3 { font-size: 22px; }
  .products-section .product-stage { margin-right: -6px; margin-left: -6px; padding-right: 10px; padding-left: 10px; }
  .product-stage > .product-scene { width: calc(100% + 20px); margin-left: -10px; }
  .products-section .product-demo.preview-student-dialogue { padding-right: 8px; padding-left: 45px; }
  .products-section .preview-student-dialogue .voice-orb { left: 8px; width: 26px; height: 26px; }
  .products-section .preview-student-dialogue .chat-line { padding: 5px 6px; font-size: 10px; }
  .products-section .product-demo .mini-prompt { font-size: 10px; }
  .products-section .product-demo .mini-chips span { padding: 2px 4px; }
  .product-device-note { gap: 7px; padding-right: 7px; padding-left: 7px; font-size: 11px; }
  .products-section .product-features li { font-size: 12px; }
}

@media (hover: hover) and (pointer: fine) {
  .products-section .product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px #233d2512; }
}
@media (prefers-reduced-motion: reduce) {
  .products-section .product-card { transition: none; }
  .products-section .product-card:hover { transform: none; }
}
