/* ═══ Info tabs: sections, "Come funziona", "Impostazioni" and "Assistenza" (shared by every project) ═══
   Owner, 2026-10-19 (live check): every section is a numbered subtitle OUTSIDE its card ("01 Come funziona"), and
   the card is the project's own (its class rides on .info-box), the same for every section of a project except
   Assistenza (its banner) and the AI card. Layout only here; each project's style.css gives .info-sub its font and
   colour (like its card titles) and sets --info-accent (the numbers, the step circles, the address in Assistenza).
   Neutral fallbacks follow the page's text colour, so the same markup fits the light and the dark pages. */
.info-sec { margin: 0 0 1.25rem; min-width: 0; }
.info-sub { display: flex; align-items: baseline; gap: .55rem; margin: 0 0 .6rem; font-size: 1.2rem; line-height: 1.2; }
.info-sub__n {
    flex: none; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .72rem; font-weight: 600;
    letter-spacing: .06em; font-style: normal; text-transform: none; color: var(--info-accent, var(--accent, currentColor));
}
.info-sub__t { min-width: 0; overflow-wrap: anywhere; }
.info-box { margin: 0; min-width: 0; }
/* A grid of sections (two side by side on wide screens in some projects): the cards fill the row height */
.info-grid > .info-sec { margin: 0; display: flex; flex-direction: column; }
.info-grid > .info-sec > .info-box { flex: 1 1 auto; margin: 0; }
/* The fallback card, for a page without a card of its own */
.info-box:not([class*="card"]):not([class*="block"]) {
    border: 1px solid rgba(128, 128, 128, .3); border-radius: 10px; padding: 1.1rem 1.25rem 1.2rem; background: rgba(128, 128, 128, .07);
}
.info-settings {
    border: 1px solid rgba(128, 128, 128, .3);
    border-radius: 10px;
    padding: 1.1rem 1.25rem 1.2rem;
    margin: 0 0 1rem;
    background: rgba(128, 128, 128, .07);
}
.info-settings h3 { margin: 0 0 .75rem; font-size: 1.05rem; line-height: 1.25; font-weight: 700; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.howto-steps li { display: flex; align-items: flex-start; gap: .75rem; line-height: 1.5; font-size: .95rem; }
.howto-steps b {
    flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
    border: 1.5px solid var(--info-accent, var(--accent, currentColor)); color: inherit; background: transparent;
    font-size: .8rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.howto-steps li > span { min-width: 0; padding-top: .18rem; overflow-wrap: anywhere; }
/* Inside a project card the card's own list and paragraph rules (.info-card ol, li) must not move the steps */
.info-sec .howto-steps, .info-sec .howto-states { margin-left: 0; padding-left: 0; list-style: none; }
.info-sec .howto-steps { margin-top: 0; }
.info-sec .howto-steps li { margin: 0; }
.howto-hint { margin: .85rem 0 0; font-size: .86rem; line-height: 1.55; opacity: .78; }
/* The states (was "Colori e stati"): one line of text, "Basso 1–3 · Medio 4–7 · Alto 8–10", the label bold in its own
   colour, the meaning in italic. It wraps like a line of text, a whole item at a time; it never becomes a column. */
.howto-states { list-style: none; margin: .85rem 0 0; padding: .7rem 0 0; border-top: 1px solid rgba(128, 128, 128, .22);
    display: flex; flex-flow: row wrap; align-items: baseline; gap: .3rem 1.1rem; font-size: .92rem; line-height: 1.5; }
.howto-states li { flex: none; white-space: nowrap; }
.howto-states b { font-weight: 700; }
.howto-states i { opacity: .8; }
@media (max-width: 560px) {
    .info-settings { padding: 1rem 1rem 1.05rem; }
    .info-sub { font-size: 1.1rem; }
    .howto-states { gap: .3rem .9rem; }
}

/* "Impostazioni": one row per switch (label + one line of help on the left, the switch on the right).
   The switch is a real button (role="switch", aria-checked): Enter and Space toggle it; the state is also
   written next to it (never colour alone). 44px target. */
.settings-intro { margin: -.25rem 0 .8rem; font-size: .9rem; line-height: 1.5; opacity: .82; }
.settings-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding: .7rem 0; border-top: 1px solid rgba(128, 128, 128, .22); min-width: 0; }
.settings-row:first-child { border-top: 0; padding-top: .2rem; }
.settings-row__txt { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.settings-row__l { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.settings-row__h { font-size: .84rem; line-height: 1.45; opacity: .78; overflow-wrap: anywhere; }
.settings-row__lock { font-size: .76rem; font-weight: 600; opacity: .7; }
.settings-loading, .settings-note { font-size: .88rem; opacity: .75; padding: .2rem 0; }
.mv-switch {
    flex: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px;
    padding: 0 .1rem; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
.mv-switch__track {
    position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px;
    background: rgba(128, 128, 128, .45); transition: background-color .18s ease;
}
.mv-switch__thumb {
    position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .18s ease;
}
.mv-switch[aria-checked="true"] .mv-switch__track { background: var(--accent, var(--azure, #2563eb)); }
.mv-switch[aria-checked="true"] .mv-switch__thumb { transform: translateX(20px); }
.mv-switch__state { min-width: 3.4em; font-size: .8rem; font-weight: 700; text-align: left; }
.mv-switch:focus-visible { outline: 2px solid var(--accent, var(--azure, currentColor)); outline-offset: 3px; border-radius: 8px; }
.mv-switch:disabled { cursor: not-allowed; opacity: .55; }
.mv-switch[aria-busy="true"] { cursor: wait; }
@media (prefers-reduced-motion: reduce) { .mv-switch__track, .mv-switch__thumb { transition: none; } }

/* "Contatti": one line and two links (mail, the contact page with the call booking). */
.info-contact p { margin: 0; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.contact-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.contact-link {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem;
    border: 1px solid rgba(128, 128, 128, .5); border-radius: 8px; color: inherit; font-weight: 600; font-size: .9rem;
    text-decoration: none; overflow-wrap: anywhere;
}
.contact-link:hover { border-color: currentColor; }
.contact-link:focus-visible { outline: 2px solid var(--accent, var(--azure, currentColor)); outline-offset: 2px; }

/* "Assistenza" (owner, 2026-10-24): a round button fixed at the bottom left of the Info page, in the project's accent
   (--info-accent, each project's style.css; a blue fallback). Its word slides out on hover and keyboard focus; on
   phones it stays a circle (no hover) and keeps clear of the home bar (safe-area). */
.mv-help-fab {
  position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: 0; height: 52px; min-width: 52px; padding: 0 14px; border-radius: 999px;
  background: var(--info-accent, #1d4ed8); color: #fff; text-decoration: none; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);
  transition: gap .2s ease, padding .2s ease, transform .15s ease, box-shadow .15s ease;
}
.mv-help-fab__i { flex: none; }
.mv-help-fab__t { max-width: 0; opacity: 0; white-space: nowrap; font: 600 .9rem/1 system-ui, sans-serif; transition: max-width .2s ease, opacity .2s ease; }
.mv-help-fab:hover, .mv-help-fab:focus-visible { gap: .5rem; padding-right: 18px; box-shadow: 0 8px 22px rgba(0, 0, 0, .28), 0 2px 4px rgba(0, 0, 0, .2); }
.mv-help-fab:hover .mv-help-fab__t, .mv-help-fab:focus-visible .mv-help-fab__t { max-width: 12rem; opacity: 1; }
.mv-help-fab:focus-visible { outline: 3px solid var(--info-accent, #1d4ed8); outline-offset: 3px; }
.mv-help-fab:active { transform: scale(.96); }
@media (hover: none) { .mv-help-fab:hover { gap: 0; padding-right: 14px; } .mv-help-fab:hover .mv-help-fab__t { max-width: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mv-help-fab, .mv-help-fab__t { transition: none; } }
@media print { .mv-help-fab { display: none; } }

/* The header chip of every project (mv_status_chip()): one short label, "● Online" in green, "● Offline" in grey.
   Same shape everywhere; it inherits the header's font. The text says the state too (never colour alone). */
.mv-status-chip {
    flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: 3px 10px; border-radius: 999px;
    border: 1px solid rgba(22, 163, 74, .45); background: rgba(22, 163, 74, .1); color: #15803d;
    font-size: .72rem; font-weight: 600; line-height: 1.3; letter-spacing: .02em; white-space: nowrap; text-transform: none;
}
.mv-status-chip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mv-status-chip.is-off { border-color: rgba(128, 128, 128, .45); background: rgba(128, 128, 128, .1); color: #6b7280; }
/* On a dark header (F1, NHP, MAS, Herald): the lighter green and grey keep the contrast */
.mv-status-chip--dark { color: #4ade80; border-color: rgba(74, 222, 128, .45); background: rgba(74, 222, 128, .1); }
.mv-status-chip--dark.is-off { color: #a1a1aa; border-color: rgba(161, 161, 170, .45); background: rgba(161, 161, 170, .1); }
/* While the live state is being read (mv_status_chip() with a slug): neutral, the dot pulses. */
.mv-status-chip.is-checking { border-color: rgba(128, 128, 128, .35); background: none; color: #6b7280; }
.mv-status-chip--dark.is-checking { color: #a1a1aa; border-color: rgba(161, 161, 170, .35); }
.mv-status-chip.is-checking i { animation: mv-chip-pulse 1.2s ease-in-out infinite; }
@keyframes mv-chip-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .mv-status-chip.is-checking i { animation: none; } }


/* Testing tab of every project (owner, 2026-10-24): the Endpoint menu as tall as the Method field next to it. Safari
   draws a native <select> at its own height and ignores the padding, so the menu drops the native look and takes the
   project's own padding and border like the field; the arrow is drawn here (grey, readable on dark and light themes).
   Only background longhands: the project's background colour stays. */
body #testing-preset {
  -webkit-appearance: none; appearance: none; padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 12px 8px;
}
/* Room at the end of the page so the «Assistenza» button never sits on the last card. */
body:has(.mv-help-fab) { padding-bottom: 76px; }

/* "Risorse" (owner, 2026-10-24 and 2026-10-25; mv_info_res_links()): the same tiles in every project, under the
   same grid of equal columns (as many 15rem columns as the card holds: three on a wide card, one on a phone). Each tile: icon, its group as a small
   label, name, what it is for, the action on the right; the project's accent (--info-accent) for icon and action. */
.res-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .85rem; }
.res-list > li { margin: 0; min-width: 0; }
.res-list > li:has(> [hidden]) { display: none; }
.res-item {
  display: flex; align-items: center; gap: .85rem; height: 100%; min-height: 72px; padding: .9rem 1rem;
  border: 1px solid rgba(128, 128, 128, .3); border-radius: 12px; background: rgba(128, 128, 128, .05);
  color: inherit; text-decoration: none; transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
a.res-item:hover { border-color: var(--info-accent, currentColor); background: rgba(128, 128, 128, .09); transform: translateY(-1px); }
a.res-item:focus-visible { outline: 2px solid var(--info-accent, currentColor); outline-offset: 2px; }
.res-item.is-off { opacity: .55; cursor: not-allowed; }
.res-item[aria-disabled="true"] { opacity: .55; pointer-events: none; }   /* a file still on its way (Herald's PROFILO) */
.res-item__ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--info-accent, currentColor); background: rgba(128, 128, 128, .1); }
.res-item__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.res-item__tag { font-style: normal; font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
.res-item__txt b { font-size: .95rem; font-weight: 700; line-height: 1.2; letter-spacing: .01em; }
.res-item__txt small { font-size: .8rem; line-height: 1.35; opacity: .72; }
.res-item__go { flex: none; font-size: .78rem; font-weight: 700; white-space: nowrap; color: var(--info-accent, currentColor); }
@media (max-width: 560px) { .res-list { grid-template-columns: minmax(0, 1fr); } .res-item { min-height: 64px; } }
/* Owner, 2026-10-25: every tile the same size, name and description on one line each (cut with … if a language
   runs long; the full text stays in the page for screen readers). */
.res-list { grid-auto-rows: 1fr; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Two columns in every project (2026-10-26): with as many columns as the card held (two on F1 and Herald, three on
   MAS, ST, NHP) a group broke across rows (README next to the API, LICENSE alone below). In pairs the groups keep to
   their rows: Docs · ReDoc, README · LICENSE, GitHub. One column on phones. */
@media (max-width: 560px) { .res-list { grid-template-columns: minmax(0, 1fr); } }
/* The action is a glyph (→ open, ↓ download, 🔒 login); its word is kept off-screen for screen readers. */
.res-item__go { font-size: 1.05rem; }
.res-item__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.res-item__txt b, .res-item__txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .res-item { transition: none; } a.res-item:hover { transform: none; } }

/* More air in Info and in the statistics (owner, 2026-10-24: "sembra tutto compatto"). The same in every project:
   "body" before each selector wins over the project's own spacing whatever the order of the stylesheets. */
body .info-sec { margin-bottom: 2rem; }
body .info-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-bottom: 2rem; }   /* one section per row: Resources always full width */
body .info-sub { margin-bottom: .85rem; }
body .info-sec > .info-box { padding: clamp(1.15rem, 2.4vw, 1.6rem) clamp(1.15rem, 2.8vw, 1.9rem); }
body .howto-steps { gap: 1rem; }
body .howto-steps li { line-height: 1.6; }
body .howto-hint { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(128, 128, 128, .22); }
body .howto-states { margin-top: 1.25rem; padding-top: 1rem; }
@media (min-width: 900px) { body .stat-grid { gap: 1.25rem; } }

