/* Compatibility layer for the real tools — not a second design system.
   The tools now sit in the platform's own frame (.platform > .side-rail + .platform-body) and their
   blocks carry the platform's own components (.p-panel, .p-grid, .p-tile, .button), so platform.css and
   refinements.css do the designing. What is left here is only what those sheets never had to cover:
   form controls, tables and a few widgets that exist solely inside the tools. */

body[data-native] #main,body[data-native] .chapter-nav{display:none!important}
body[data-native]>.header{height:auto;min-height:64px;z-index:40}
body[data-native] .header .nav{position:static;display:flex;background:none;border:0;padding:0;box-shadow:none;width:auto;height:auto}
body[data-native] .header .account{position:static}
body[data-native] .footer{position:relative;z-index:2}
.native-shell{position:relative;z-index:2;margin:118px 0 80px;min-height:60vh}
.native-shell *{box-sizing:border-box;min-width:0}
/* Each tool's own sheet is emitted nested inside .native-shell{…}, so its selectors weigh (0,2,0) and
   outrank anything scoped with a single class. The frame has to state its containment louder than the
   guest can: a tool lays out inside the platform's column, never across the viewport. */
.native-shell .page-view.native-view *{max-width:100%}
.native-shell .page-view.native-view :is([class*="-wrap"],[class*="-shell"],[class*="-container"],[class*="-page"],[class*="-stage"]){
  width:auto;max-width:100%;margin-inline:0;padding-inline:0;
}
/* Legacy page wrappers are containers, never surfaces — the platform frame is the surface now. */
.native-view :is([class*="-page"],[class*="-stage"],[class*="-shell"],[class*="-section"],[class*="-wrap"]){background:none;border:0;padding:0;min-height:0}
.native-view>:is(section,article)+:is(section,article){margin-top:34px}

/* Type: follow the platform's scale rather than inventing a second one. */
/* Legacy heading sizes are structural, so they survive the strip and come back as 60px display type in
   the middle of a page. The platform has one heading scale; these win on order over the page's own. */
.page-view.native-view :is(h1,h2,h3,h4,h5){letter-spacing:-.5px;line-height:1.25;margin:0 0 12px;font-weight:500}
.page-view.native-view :is(h1,h2){font-size:21px}
.page-view.native-view :is(h3,h4,h5){font-size:16px}
.native-view :is(p,li,dd,label,figcaption,small){color:var(--muted);font-size:11px;line-height:1.9}
.native-view p{max-width:70ch}
.native-view :is(strong,b){color:var(--text)}
.native-view img{border-radius:10px}
.native-view hr{border:0;border-top:1px solid var(--line);margin:28px 0}

/* Controls the platform sheets do not define, matched to .button's proportions. */
.native-view :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){
  font:inherit;font-size:11px;color:var(--text);background:var(--soft,#ffffff08);
  border:1px solid var(--line);border-radius:10px;padding:11px 13px;width:100%;
  transition:border-color .2s cubic-bezier(.23,1,.32,1);
}
.native-view :is(input,select,textarea):focus{border-color:#97b5ff65;outline:none}
.native-view :is(input,textarea)::placeholder{color:var(--muted);opacity:.7}
.native-view input:is([type=checkbox],[type=radio],[type=range]){width:auto;accent-color:var(--blue,#97b5ff)}
.native-view :is(button,.button,a.button,[role=button]):active{transform:scale(.97)}
.native-view :is(button,.button){transition:transform .16s cubic-bezier(.23,1,.32,1),border-color .2s,background-color .2s}
.native-view :is(button,a,input,select,textarea):focus-visible{outline:2px solid #97b5ff;outline-offset:3px}

/* Tables: the tools are full of them and the platform never needed one. */
.native-view table{border-collapse:collapse;width:100%;font-size:11px}
.native-view :is(td,th){padding:11px 12px;border-bottom:1px solid var(--line);text-align:left}
.native-view th{color:var(--text);font-size:9px;letter-spacing:.1em;text-transform:uppercase}
.native-view td{color:var(--muted)}
.native-view tbody tr{transition:background-color .15s cubic-bezier(.23,1,.32,1)}
.native-view tbody tr:hover{background:#ffffff06}
.native-view [class*="table-wrap"]{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
/* Whatever the tool calls its own table wrapper, it needs to scroll horizontally when the table
   is wider than the platform column — otherwise the table either clips or forces the whole page wide. */
.native-view :has(>table){overflow-x:auto}
.native-view table{min-width:max-content}

/* Overlays. */
.native-view :is(dialog,[role=dialog]){background:var(--solid,#0f1117);border:1px solid var(--line);border-radius:15px;padding:25px;max-width:min(560px,92vw);color:var(--text)}
.native-view dialog::backdrop{background:#04050988;backdrop-filter:blur(6px)}
.native-view [class*="toast"]{border:1px solid var(--line);border-radius:12px;padding:12px 15px}

[data-google-signin-slot]{display:inline-flex;min-height:44px;align-items:center;font-size:10px;color:var(--muted)}
.google-signin{display:inline-flex;align-items:center;gap:10px;background:#fff;color:#202124;border-radius:9px;min-height:44px;padding:12px 18px;border:1px solid #dadce0;font-size:12px;font-weight:600}
.account-cloud-link{display:block;margin:18px 0}

@media(max-width:760px){
  .native-shell{margin-top:96px}
  .native-view :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px}
  .native-view [class*="-grid"]{grid-template-columns:1fr!important}
  .native-view :is(td,th){padding:8px;font-size:10px}
  body[data-native] .header .nav{display:none}
}

/* Separación devuelta a las listas heredadas.
   Sus bordes eran pintura y se eliminaron, y esas páginas se apoyaban en ellos para separar filas,
   filtros y celdas de dato: sin borde, "Álgebra" y "Piso 2" quedan pegados. Se restituye la separación
   como la resuelve la plataforma —espacio y una línea de un píxel— en vez de devolver las cajas. */
.page-view.native-view :is([class*="-filter"],[class*="-segmented"],[class*="-tabs"],[class*="-chips"],[class*="-toggle"]){
  display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0}
.page-view.native-view :is([class*="-filter"],[class*="-segmented"],[class*="-tabs"],[class*="-chips"],[class*="-toggle"])>:is(button,a,label){
  border:1px solid var(--line);border-radius:25px;padding:9px 14px;font-size:10px;color:var(--muted);
  background:none;min-height:0;transition:border-color .2s cubic-bezier(.23,1,.32,1),color .2s}
.page-view.native-view :is([class*="-filter"],[class*="-segmented"],[class*="-chips"])>:is(button,a)[aria-pressed=true],
.page-view.native-view :is([class*="-filter"],[class*="-segmented"],[class*="-chips"])>:is(button,a).active{
  background:var(--text);color:var(--bg);border-color:var(--text)}

/* Celdas de dato: número grande, etiqueta pequeña, separadas por aire. */
.page-view.native-view :is([class*="-stat"],[class*="-kpi"]):not([class*="-stats"]){
  display:flex;flex-direction:column;gap:6px;padding:14px 0}
.page-view.native-view :is([class*="-stat"],[class*="-kpi"]) b,
.page-view.native-view :is([class*="-stat"],[class*="-kpi"]) strong{font-size:19px;letter-spacing:-.6px;font-weight:500}

/* Pares de metadatos que el marcado pone uno junto a otro sin separador propio. */
.page-view.native-view :is([class*="-card-top"],[class*="-card-body"],[class*="-slot"],[class*="-rooms"],[class*="-schedule"]){
  display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px}
.page-view.native-view :is([class*="-course"],[class*="-floor"],[class*="-time"],[class*="-room"],[class*="-range"]){white-space:nowrap}
.page-view.native-view :is([class*="-kicker"],[class*="-eyebrow"]){
  display:inline-block;color:var(--blue,#97b5ff);font-size:9px;font-weight:600;letter-spacing:.16em;text-transform:uppercase}
.page-view.native-view [class*="-card"]+[class*="-card"]{margin-top:0}
