/* APTIS mobile-only UI layer; no change to audio, routes, questions or data. */
@media(max-width:700px){
  .v30-body,.v30-body *, .v45-wrap, .v45-wrap * {box-sizing:border-box}
  .v30-body .v30-main{min-width:0;max-width:100%;padding:10px 10px 78px!important}
  .v30-body .v30-main h1{font-size:21px;line-height:1.4;margin:0 0 8px}
  .v30-body .v30-main h2{font-size:17px;line-height:1.4;overflow-wrap:anywhere}
  .v30-body .v30-main .panel{padding:11px;margin-block:9px;max-width:100%}
  .v30-body .v40-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .v30-body .v40-skill{min-width:0;overflow-wrap:anywhere}
  .v30-body .v41-grid,.v30-body .v40-tests,.v30-body .v42-writing-grid,.v30-body .v44-grid,.v30-body .v45-grid,.v30-body .v46-grid,.v30-body .v461-grid,.v631-grid{display:grid;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .v30-body .v41-card,.v30-body .v40-test,.v30-body .v44-card,.v30-body .v45-card,.v30-body .v46-card,.v30-body .v461-card,.v631-card{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .v631-card{padding:11px}
  .v631-card small,.v631-card .v631-topic small,.v631-card .v631-heading small,.v30-body .v45-vi,.av63-vi{font-size:0.8em;line-height:1.45;color:#526575;display:block;margin-top:3px}
  .v632-parts{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .v632-parts a{min-width:0!important;min-height:43px;text-align:center;padding:6px 3px;font-size:12px;display:flex;align-items:center;justify-content:center}
  .v632-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .v632-actions>*{min-width:0}
  .v632-main,.v632-action{min-height:44px;white-space:normal;line-height:1.35;text-align:center;overflow-wrap:anywhere}
  .v45-wrap{max-width:100%;width:100%;min-width:0;padding:0 8px;overflow-x:clip}
  .v45-wrap .v45-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:8px}
  .v45-wrap .v45-head h2{margin:0;font-size:17px;line-height:1.4}
  .v45-wrap .v45-panel{min-width:0;max-width:100%;padding:10px!important}
  .v45-wrap .v45-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .v45-wrap .v45-switch a{min-width:0;min-height:44px;text-align:center;display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere}
  .v45-wrap .v45-audio{min-width:0;max-width:100%;overflow:hidden}
  .v45-wrap audio{display:block;width:100%;max-width:100%;min-width:0}
  .v45-wrap .v45-choice,.v45-wrap .v45-match{max-width:100%;overflow-wrap:anywhere}
  .v45-wrap input,.v45-wrap select,.v30-body .v30-main input,.v30-body .v30-main select{max-width:100%}
  .av63-guide{max-width:100%;padding:8px}
  .av63-guide .av63-columns{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:370px){
 .v632-parts{gap:3px}
 .v632-parts a{font-size:11px;padding:5px 2px}
 .v45-wrap .v45-panel{padding:8px!important}
}

/* V6.4.5 live exact: student admin desktop + mobile; CSS loaded externally for CSP compliance */
    /* V6.4.5: controls for full-width admin on desktop and tablets */
    .v644-student-cards{display:none}
    .v645-student-table{width:100%;border-collapse:separate;border-spacing:0}
    .v645-student-table th{position:sticky;top:0;z-index:1;background:#edf5f6;white-space:nowrap}
    .v645-student-table td{vertical-align:top}
    .v645-student-table td:nth-child(2){min-width:190px;overflow-wrap:anywhere}
    .v645-student-actions{min-width:180px;max-width:250px;display:flex;flex-wrap:wrap;gap:6px}
    .v645-student-actions a{display:inline-block;border:1px solid #bed8d4;border-radius:7px;padding:7px 9px;font-size:.82rem;font-weight:600;color:#08675e;text-decoration:none;line-height:1.2}
    .v645-student-actions a:hover,.v645-student-actions a:focus{background:#e3f3ef}
    .v645-student-actions a.v645-approve{background:#08776c;color:#fff;border-color:#08776c}
    .v645-student-actions a.v645-approve:hover,.v645-student-actions a.v645-approve:focus{background:#075e55}
    .v645-student-table-wrap{max-width:100%;overflow-x:auto}
    .v645-student-table td:last-child{min-width:220px;line-height:2.5}
    .v645-student-table td:last-child a{display:inline-block;padding:3px 7px;border-radius:6px;border:1px solid #b9d9d0;text-decoration:none;white-space:nowrap;color:#075e55;font-weight:600;line-height:1.8;margin:2px}
    .v645-student-table td:last-child a[href*="approve"]{background:#08776c;border-color:#08776c;color:white}

    @media(min-width:901px){#student-edit{max-width:900px;margin:24px auto;padding:14px;background:#fff;border-radius:12px;scroll-margin-top:24px}}
    @media(max-width:900px){
      .v644-student-table{display:none!important}
      .v644-student-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:12px 0 18px}
      .v644-student-card{min-width:0;border:1px solid #cfe0e2;border-top:3px solid #08776c;border-radius:14px;background:#fff;padding:14px;box-shadow:0 3px 12px #173d4b09}
      .v644-student-card h3{margin:0 0 5px;font-size:1.04rem;overflow-wrap:anywhere}
      .v644-student-card p{margin:4px 0;overflow-wrap:anywhere}
      .v644-student-card .v644-sub{font-size:.82rem;color:#586a76}
      .v644-student-card .v644-status{display:inline-block;border-radius:999px;background:#e7f4ef;color:#075e54;padding:4px 9px;font-size:.78rem;font-weight:700;margin:8px 0}
      .v644-student-card .v644-status.pending{background:#fff2d9;color:#825209}
      .v644-student-card dl{display:grid;grid-template-columns:100px minmax(0,1fr);gap:7px;margin:8px 0 12px;font-size:.88rem}
      .v644-student-card dt{color:#607582}.v644-student-card dd{margin:0;min-width:0;overflow-wrap:anywhere}
      .v644-student-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
      .v644-student-actions a{display:flex;align-items:center;justify-content:center;min-height:42px;text-align:center;padding:8px;border:1px solid #b5d5ce;border-radius:9px;text-decoration:none;color:#075f57;font-weight:650;font-size:.86rem;overflow-wrap:anywhere}
      .v644-student-actions a.v644-primary{background:#08776c;color:white;border-color:#08776c}
      #student-edit{scroll-margin-top:95px;max-width:100%;min-width:0}
      #student-edit .panel{max-width:100%;min-width:0}
    }
