/* Pagina di uno stile: intestazione, scelta di variante e stile, schede, tutti i caratteri */
.sv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sv-head { flex: none; display: flex; gap: 8px var(--sp-21); align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--sp-13); }
.sv-title { min-width: 0; flex: 1; }
.sv-title h2 { font-family: var(--f-display); font-size: var(--fs-4); font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.05; text-wrap: balance; }
.sv-title h2 span { color: var(--ink-muted); font-weight: 400; }
.sv-title .sub { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-muted); margin-top: 4px; overflow-wrap: anywhere; }
/* file estratto da un PDF o da un sito: lo si dice, perché mancano dei caratteri */
.sv-note { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: var(--star); }
.sv-note .ph { width: 14px; height: 14px; flex: none; }

.sv-bar { flex: none; display: flex; gap: 8px 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.pick { display: flex; flex-direction: column; gap: 4px; font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-muted); }
.pick em { font-style: normal; opacity: .75; margin-left: 4px; }
.sv-tabs { display: inline-flex; gap: 2px; border: 1px solid var(--sq-b, var(--sq-bc)); --sq-bc: var(--rule); border-radius: 6px; padding: 2px; margin-left: auto; }
.sv-tabs .n { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 11px; opacity: .7; margin-left: 4px; }

.sv-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sv-body.fill { overflow: hidden; }

/* Esploratore: carattere grande a sinistra (alto quanto lo spazio libero), griglia che scorre a destra; le due colonne
   stanno come 1 a φ (sezione aurea) */
.gx-host { height: 100%; transition: opacity .2s; }
.gx-host.waiting { opacity: .45; pointer-events: none; }   /* lo stile precedente, mentre si leggono i caratteri del nuovo */
.gx { height: 100%; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.618fr); grid-template-rows: minmax(0, 1fr); gap: var(--sp-21); outline: none; }
.gx-big { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--rule); background: var(--sheet); border-radius: 2px; overflow: hidden; }
.gx-stage { position: relative; flex: 1; min-height: 0; container-type: size; --gut: 92px; }
/* a sinistra la colonna con i nomi delle linee, a destra il disegno (lui solo prende i colori scelti in Colors).
   Il disegno è un quadrato di 1000 unità al centro della sua parte: ogni nome sta all'altezza della sua linea */
.gx-gutter { position: absolute; left: 0; top: 0; bottom: 0; width: var(--gut); background: var(--paper); border-right: 1px solid var(--rule); }
.gx-lab {
  position: absolute; left: 0; right: 0; top: calc(50cqh + (var(--y) / 1000 - .5) * min(100cqw - var(--gut), 100cqh));
  transform: translateY(-100%); padding: 0 8px 4px 10px;
  font: 12px/1.2 var(--f-ui); color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gx-lab.strong { color: var(--ink); }
.gx-lab.below { transform: none; padding: 4px 8px 0 10px; }   /* linee vicine: il nome sotto la sua */
.gx-canvas, .gx-glyph { position: absolute; left: var(--gut); right: 0; top: 0; bottom: 0; }
.gx-canvas { background: var(--sheet); }
.gx-glyph { container-type: size; overflow: hidden; pointer-events: none; }
.gx-svg { position: absolute; left: var(--gut); top: 0; width: calc(100% - var(--gut)); height: 100%; display: block; overflow: visible; }   /* le linee escono dal quadrato: a destra fino al bordo, a sinistra sotto i nomi */
/* lo stesso quadrato in cui l'SVG disegna il suo riquadro 1000 × 1000 (centrato, lato = il lato corto); --u = una unità */
.gx-sq { position: absolute; left: calc(50% - min(100cqw, 100cqh) / 2); top: calc(50% - min(100cqw, 100cqh) / 2); width: min(100cqw, 100cqh); aspect-ratio: 1; --u: calc(min(100cqw, 100cqh) / 1000); pointer-events: none; }
.gx-line { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }   /* 1 px come i trattini dei nomi a sinistra */
.gx-line.strong { stroke: var(--ink-muted); }
/* il margine interno (1em) allarga la zona in cui Safari disegna: le forme alternative (ornamenti, svolazzi) sono più grandi
   del carattere di partenza e senza questo spazio venivano tagliate. Il JavaScript ne tiene conto quando centra. */
.gx-char { position: absolute; padding: 1em; white-space: pre; line-height: normal; color: var(--spec-auto-ink); font-kerning: normal; visibility: hidden; }
.gx-char.placed { visibility: visible; }   /* il JavaScript lo mette sulla linea di base e al centro del disegno, poi lo mostra */
.gx-bl { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.gx-info { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--rule); background: var(--paper); }
.gx-what { text-align: center; font-size: 13px; line-height: 1.4; min-width: 0; }
.gx-what b { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-weight: 500; }
.gx-what span { color: var(--ink-muted); }
.gx-grp { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-nav { border: 1px solid var(--sq-b, var(--sq-bc)); --sq-bc: var(--rule); background: var(--sheet); color: var(--ink); width: 36px; height: var(--ctl-sm); border-radius: 6px; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.gx-nav:hover { --sq-bc: var(--proof-hover); }

.gx-list { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; }
.gx-sum { margin: 0 0 16px; font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
/* Le funzioni OpenType come schede: nome e sigla sopra, nel riquadro l'esempio prima → dopo (dopo nel blu del sito) */
.ot { margin: 0 0 var(--sp-21); }
.ot-h { margin: 0 0 var(--sp-13); font: 600 var(--fs-1)/1.3 var(--f-ui); }
.ot-h span { font: 400 11px var(--f-data); color: var(--ink-muted); margin-left: 6px; }
.ot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ot-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.ot-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; }
.ot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-tag { font: 12px var(--f-data); color: var(--ink-muted); }
.ot-box { display: flex; align-items: center; justify-content: center; gap: 8px; aspect-ratio: var(--phi); box-sizing: border-box; padding: 0 16px; overflow: hidden;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); transition: border-color .12s; }
.ot-card:hover .ot-box, .ot-card:focus-visible .ot-box { border-color: var(--proof-hover); }
.ot-card:focus-visible { outline: none; }
.ot-off, .ot-on { font-size: 34px; line-height: 1; white-space: pre; color: var(--spec-auto-ink); }
.ot-on { color: var(--proof); }
.ot-arrow { flex: none; display: grid; color: var(--ink-muted); }
.ot-arrow .ph { width: 12px; height: 12px; }
.gx-part { font-family: var(--f-display); font-size: var(--fs-2); margin: var(--sp-34) 0 4px; padding-top: 16px; border-top: 1px solid var(--ink); }

.gg { margin-bottom: var(--sp-21); }
.gg h4 { font-size: 13px; font-weight: 600; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.gg h4 span { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 400; color: var(--ink-muted); }
.gg-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.gc { aspect-ratio: 1; border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sheet); color: var(--spec-auto-ink); font-size: 21px; line-height: 1; padding: 0; cursor: pointer; display: grid; place-items: center; overflow: hidden; white-space: nowrap; font-kerning: none; }
.gc:hover { background: var(--proof-soft); }
.gc.on { background: var(--proof); color: var(--on-proof); }
.gg-more { margin-top: 8px; }
.gc .mk { display: inline-block; white-space: pre; }

/* Prova ai vari corpi */
.wf { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px var(--sp-13); align-items: baseline; padding-block: 8px; border-bottom: 1px solid var(--rule); }
.wf span { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.wf div { color: var(--spec-auto-ink); white-space: nowrap; overflow: hidden; }
.para { color: var(--spec-auto-ink); margin-top: 16px; font-size: var(--fs-1); line-height: var(--lh-prose); max-width: 65ch; }

@media (max-width: 1000px) {
  .sv-body.fill { overflow-y: auto; }
  .gx { height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .gx-stage { flex: none; height: 46vh; }
  .gx-list { overflow: visible; }
  .sv-tabs { margin-left: 0; }
}
@media (max-width: 760px) {
  .sv-title h2 { font-size: var(--fs-3); }
  .sv-body, .sv-body.fill { overflow: visible; }
  .pick .pick-dd { min-width: 0; width: 100%; }
}

/* Crediti: pulsante accanto al nome, pannello sopra la pagina dello stile */
.sv-head { position: relative; }
.sv-name { display: flex; gap: var(--sp-13); align-items: center; }
.sv-name h2 { min-width: 0; }
/* L'icona info accanto al nome: solo l'icona, senza bordo né fondo (pulsante Blueprint Ghost, come le frecce delle tendine),
   grigia, blu al passaggio del mouse e mentre le informazioni sono aperte. L'area cliccabile resta alta quanto i comandi piccoli.
   Apre le informazioni del font in un Popover come quello dei colori (bordo blu, fondo delle tendine: bb-setup.css, 3g) */
.sv-name .cred-btn {
  flex: none; width: var(--ctl-sm); height: var(--ctl-sm); padding: 0; justify-content: center;
  color: var(--ink-muted); background-color: transparent; border: 0; box-shadow: none;
}
.sv-name .cred-btn:is(:hover, [aria-expanded=true], [data-state=open]) { color: var(--proof-hover); background-color: transparent; }
.sv-name .cred-btn > span { margin: 0; }
.sv-name .cred-btn .ph { width: 16px; height: 16px; }
.cred-panel {
  width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - 120px)); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--sp-13) 16px 16px; border-color: var(--proof-hover); background-color: var(--menu-bg); color: var(--ink);
  font-family: var(--f-ui); font-size: 13px;
}
/* in cima il file e il suo peso (prima stavano accanto al nome), separati dai crediti da un filetto */
.cred-file { font-family: var(--f-data); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-muted); overflow-wrap: anywhere;
  padding-bottom: var(--sp-13); margin-bottom: var(--sp-13); border-bottom: 1px solid var(--rule); }
.cred-file b { color: var(--ink); font-weight: 500; }
.cred-pop-h { margin-bottom: 8px; font-family: var(--f-data); font-size: 12px; color: var(--ink-muted); }

/* Colori scelti per i testi di prova (Colors in alto): il carattere grande, la griglia e la prova */
.app.tinted .gx-canvas { background: var(--spec-paper, var(--sheet)); }
.app.tinted .gx-char { color: var(--spec-ink, var(--spec-auto-ink)); }
/* le linee di costruzione restano nei colori dell'interfaccia: non seguono il colore del carattere */
/* nella griglia dei caratteri solo i glifi prendono il colore del testo: le linee e il passaggio del mouse restano quelli dell'interfaccia */
.app.tinted .gc { background: var(--spec-paper, var(--sheet)); color: var(--spec-ink, var(--spec-auto-ink)); }
.app.tinted .gc:hover { background: var(--proof-soft); }
.app.tinted .gc.on { background: var(--proof); color: var(--on-proof); }
/* nella prova solo il testo prende il colore scelto: misure in pt, titoletti e righe restano dell'interfaccia */
.app.tinted .spec-sheet .wf div, .app.tinted .spec-sheet .para { color: var(--spec-ink, var(--spec-auto-ink)); }
.app.papered .spec-sheet { background: var(--spec-paper); padding: 4px 16px 16px; margin-inline: -16px; border-radius: 2px; }
