/* Zanzito — pages under /zanzito/
   Same tokens and shapes as the barbaro.it home page (index.html) and as
   /scalesyllabus/style.css, from which this file starts. What is added here is
   what Zanzito's pages need and the others do not: the warning box, tables,
   code blocks, the manual's table of contents, and a print sheet — the manual
   is also printed to the PDF that ships inside the app. */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
    --bg:#000;
    --bg-card:#111;
    --bg-card-hover:#1a1a1a;
    --text:#fff;
    --text-muted:#999;
    --accent:#fed136;
    --accent-dim:rgba(254,209,54,.15);
    --border:#222;
    --radius:8px;
    --max-w:960px;
    --max-w-text:820px;
    /* Ripiego per chi ha JavaScript spento: la pagina misura la barra da sé e
       riscrive questa variabile (in fondo a `index.html`). Da sola sarebbe una
       stima, perché l'altezza dipende da quante righe prende il menu — 64 su
       una, 98 su due, 140 su tre — e da quanto sono lunghe le sue parole. */
    --nav-h:64px;
    --sec-pad:48px;
    --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:var(--font);line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:var(--accent);text-decoration:none;transition:opacity .2s}
a:hover{opacity:.8}

/* NAV */
nav{position:sticky;top:0;z-index:100;background:rgba(0,0,0,.85);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.nav-inner{max-width:var(--max-w);margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.nav-brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:1.1rem;color:var(--text)}
.nav-brand img{height:28px}
.nav-links{display:flex;gap:24px;list-style:none;flex-wrap:wrap}
.nav-links a{color:var(--text-muted);font-size:.9rem;text-transform:uppercase;letter-spacing:.5px;transition:color .2s}
.nav-links a:hover,.nav-links a:focus{color:var(--accent);opacity:1}
.nav-links a.current{color:var(--accent)}

/* HERO */
.hero{max-width:var(--max-w);margin:0 auto;padding:64px 24px 40px;text-align:center}
.hero .app-icon{width:104px;height:104px;border-radius:23%;box-shadow:0 12px 32px rgba(0,0,0,.6);margin-bottom:20px}
.hero h1{font-size:2.6rem;font-weight:700;margin-bottom:8px}
.hero h1 span{color:var(--accent)}
.hero p.subtitle{color:var(--text-muted);font-size:1.15rem;margin-bottom:28px}
.hero-badges{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.badge{background:var(--accent-dim);color:var(--accent);font-size:.8rem;padding:5px 14px;border-radius:20px;font-weight:500}
/* The three of them are links to #download. A pill that leads somewhere has to
   say so on hover, or it stays a label that happens to move the page. */
a.badge{transition:background .2s,color .2s}
a.badge:hover,a.badge:focus-visible{background:var(--accent);color:var(--bg);opacity:1}
a.badge:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* SECTIONS */
/* Lo stacco per l'ancora **sottrae il respiro che la sezione ha già**: sono i
   suoi 48 px di padding a portare il titolo giù, e sommarglieli lo posava a
   128 px dal bordo invece che sotto la barra. Quel che si vuole è il titolo,
   non la scatola: barra + un filo d'aria, meno il padding. */
section{max-width:var(--max-w);margin:0 auto;padding:var(--sec-pad) 24px;scroll-margin-top:calc(var(--nav-h) + 12px - var(--sec-pad))}
.section-title{font-size:1.5rem;font-weight:700;margin-bottom:32px;padding-bottom:12px;border-bottom:2px solid var(--accent);display:inline-block}
.lead{max-width:var(--max-w-text);color:var(--text-muted);font-size:1rem}
.lead + .lead{margin-top:16px}
.lead strong{color:var(--text);font-weight:600}

/* BOOK LINKS — the ASIN travels, the domain is rewritten at load (see the
   script at the bottom of index.html). Nowrap so "Paperback ↗" never breaks. */
.book-link{max-width:var(--max-w-text);margin-top:24px;color:var(--text-muted);font-size:.95rem}
.book-link em{color:var(--text)}
.book-link a{white-space:nowrap}
.panel .book-link{margin-top:14px}

/* CARDS GRID */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px}
.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:24px;transition:background .2s,border-color .2s}
.card:hover{background:var(--bg-card-hover);border-color:#333}
.card h3{font-size:1.1rem;margin-bottom:8px}
.card p{color:var(--text-muted);font-size:.9rem}
.card .card-icon{font-size:1.6rem;margin-bottom:12px}

/* PANEL — a single wide card, like the product box on the home page */
.panel{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:32px}
.panel h3{font-size:1.2rem;margin-bottom:12px}
.panel p{color:var(--text-muted);font-size:.95rem;max-width:var(--max-w-text)}
.panel p + p{margin-top:14px}
.panel ul{list-style:none;margin-top:16px;display:flex;flex-direction:column;gap:10px}
.panel ul li{color:var(--text-muted);font-size:.95rem;padding-left:22px;position:relative}
.panel ul li::before{content:"•";position:absolute;left:6px;color:var(--accent)}
.panel ul li strong{color:var(--text);font-weight:600}

/* AVAILABILITY */
.store-grid{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;align-items:flex-start;margin-top:8px}
/* Ogni card è il bersaglio di una pastiglia. Qui non c'è niente da sottrarre:
   il bordo della card **è** la sua cima, e quello che si vuole vedere. */
.store-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:18px 24px;text-align:center;min-width:170px;scroll-margin-top:calc(var(--nav-h) + 12px)}
.store-card strong{display:block;font-size:.95rem;margin-bottom:4px}
.store-card span{color:var(--text-muted);font-size:.8rem;text-transform:uppercase;letter-spacing:.5px}
/* The card that is out. `align-items:flex-start` above is what keeps the other two
   from growing with it: without it the grid stretches every card to the tallest. */
.store-card--open{border-color:var(--accent)}
.store-card--open span{color:var(--accent)}
.store-hint{color:var(--text-muted);font-size:.8rem;margin:12px 0 0}
/* Block, so a card without a QR (the Mac one) still breaks the line after its
   status word instead of putting the link beside it. */
.store-card--open a{font-size:.9rem;display:block;margin-top:12px}
/* The quiet zone is inside the SVG, so the white plate needs no padding of its own. */
.store-qr{display:block;width:132px;height:132px;margin:16px auto 0;border-radius:4px;background:#fff}

/* SCREENSHOTS */
.shots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 20px;max-width:960px;margin:0 auto}
.shot{margin:0;text-align:center}
.shot img{display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:var(--radius);background:#03080d}
.shot figcaption{color:var(--text-muted);font-size:.85rem;margin-top:10px}
.shot-wide{max-width:540px;margin:32px auto 0;text-align:center}
.shot-wide img{display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:var(--radius)}
.shot-wide figcaption{color:var(--text-muted);font-size:.85rem;margin-top:10px}
.licence-key{display:flex;gap:28px;align-items:center;margin-top:20px}
.licence-key img{width:180px;height:auto;flex:0 0 auto;border:1px solid var(--border);border-radius:var(--radius)}
.licence-key p{margin:0}

/* FOOTER */
footer{text-align:center;padding:28px 24px;border-top:1px solid var(--border);color:var(--text-muted);font-size:.8rem}
.footer-links{margin-bottom:10px}
.footer-links a{margin:0 10px;font-size:.85rem}

/* LEGAL PAGES */
.legal{max-width:var(--max-w-text);margin:0 auto;padding:40px 24px 56px}
.legal h1{font-size:2rem;margin-bottom:6px}
.legal .updated{color:var(--text-muted);font-size:.88rem;margin-bottom:28px}
.legal h2{font-size:1.1rem;text-transform:uppercase;letter-spacing:.05em;color:var(--accent);margin-top:36px;margin-bottom:12px}
.legal p{color:var(--text-muted);margin-bottom:12px}
.legal p strong{color:var(--text);font-weight:600}
.legal ul{padding-left:20px;margin-bottom:16px}
.legal li{color:var(--text-muted);margin-bottom:8px}
.legal .summary{background:var(--bg-card);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--radius);padding:20px 24px;margin-bottom:8px}
.legal .summary p{margin-bottom:0;color:var(--text)}
.legal .identity{color:var(--text-muted);font-size:.9rem;margin-bottom:24px}

/* WARNING BOX — used sparingly, so that when it is there it gets read.
   Same shape as the summary box, with the warning colour on the edge. */
:root{--warn:#ff8a3d}
.note{background:var(--bg-card);border:1px solid var(--border);border-left:3px solid var(--warn);border-radius:var(--radius);padding:16px 20px;margin:20px 0}
.note p{color:var(--text);margin-bottom:10px}
.note p:last-child{margin-bottom:0}
section .note{max-width:var(--max-w-text)}

/* LEGAL PAGES AND MANUAL — what the base sheet does not cover */
.legal h3{font-size:1.02rem;color:var(--text);margin-top:26px;margin-bottom:10px}
.legal h4{font-size:.95rem;color:var(--text);margin-top:20px;margin-bottom:8px}
.legal ol{padding-left:22px;margin-bottom:16px}
.legal li strong{color:var(--text);font-weight:600}
.legal h2,.legal h3,.legal h4{scroll-margin-top:calc(var(--nav-h) + 16px)}
/* A table wider than the phone scrolls inside its own box, not the page. */
.table-wrap{overflow-x:auto;margin:16px 0}
table{width:100%;border-collapse:collapse;font-size:.9rem}
th,td{text-align:left;padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:top;color:var(--text-muted)}
th{color:var(--text);font-weight:600;white-space:nowrap}
td strong{color:var(--text);font-weight:600}
/* A table of keys: the names in the first column do not wrap. */
.keys td:first-child{white-space:nowrap}
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;font-size:.86em;background:var(--bg-card);border:1px solid var(--border);border-radius:4px;padding:1px 5px;color:var(--accent);overflow-wrap:anywhere}
pre{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin:12px 0 18px;overflow-x:auto;line-height:1.45}
pre code{background:none;border:none;padding:0;color:var(--text);font-size:.84rem;overflow-wrap:normal;white-space:pre}

/* TABLE OF CONTENTS of the manual */
.toc{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:18px 24px;margin:8px 0 8px}
.toc ol{list-style:none;padding-left:0;margin:0;columns:2 260px;column-gap:32px}
.toc li{margin-bottom:6px;break-inside:avoid;font-size:.93rem}
.toc ol ol{columns:auto;padding-left:16px;margin-top:6px}
.toc ol ol li{font-size:.88rem}

/* The app icon on the manual's first page: on screen the navigation already
   says where you are, so it is shown on paper only (see the print sheet). */
.print-cover{display:none;text-align:center;margin-bottom:10mm}
.print-cover img{width:32mm;height:32mm}

/* FIGURES of the manual — screenshots of the app, one or two side by side.
   The files are 540 px wide (status bar cut off); on screen they are shown at
   240 px, so they stay sharp on a 2x display. */
.figures{display:flex;flex-wrap:wrap;gap:18px;justify-content:center;margin:18px 0 22px}
.figures figure{margin:0;flex:0 1 240px;text-align:center}
.figures img{display:block;width:100%;max-width:240px;height:auto;margin:0 auto;border:1px solid var(--border);border-radius:var(--radius);background:#0f1418}
.figures figcaption{color:var(--text-muted);font-size:.82rem;margin-top:8px}
.figures figure.wide{flex:0 1 420px}
.figures figure.wide img{max-width:420px}

/* RESPONSIVE */
/* Il menu va a capo sotto i 720, non ai 600 del resto: la barra raddoppia lì,
   e chi salta a un'ancora la trova addosso finché questa riga non c'è. */
@media(max-width:719px){
    :root{--nav-h:98px}
}
@media(max-width:600px){
    :root{--sec-pad:32px}
    .hero{padding:44px 16px 32px}
    .hero h1{font-size:1.8rem}
    .hero p.subtitle{font-size:1rem}
    .hero .app-icon{width:84px;height:84px}
    .nav-links{gap:16px}
    section{padding:var(--sec-pad) 16px}
    .panel{padding:24px}
    .legal{padding:28px 16px 44px}
    .legal h1{font-size:1.5rem}
    .shots{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px}
    .licence-key{flex-direction:column;align-items:flex-start}
    .licence-key img{width:150px}
}

/* PRINT — the manual is printed to the PDF bundled with the app (see the note
   at the top of manual.html). On paper the page is black on white, the site's
   navigation is dropped, and a link shows where it goes only when the address
   is the information (external links in the manual). */
@media print{
    :root{--bg:#fff;--bg-card:#f6f6f6;--text:#000;--text-muted:#222;--accent:#000;--border:#bbb;--warn:#000}
    @page{size:A4;margin:18mm 16mm}
    html{scroll-behavior:auto}
    body{background:#fff;color:#000;font-size:10.5pt;line-height:1.45}
    nav,footer,.no-print{display:none}
    .legal{max-width:none;padding:0}
    .legal h1{font-size:22pt}
    .legal h2{font-size:12.5pt;color:#000;margin-top:22pt;border-bottom:1px solid #000;padding-bottom:3pt;break-after:avoid}
    .legal h3,.legal h4{break-after:avoid}
    .legal p,.legal li{color:#000;orphans:3;widows:3}
    a{color:#000;text-decoration:underline}
    .legal a[href^="http"]::after{content:" (" attr(href) ")";font-size:.85em;word-break:break-all}
    code{color:#000;border-color:#ccc}
    pre{break-inside:avoid;border-color:#bbb}
    pre code{color:#000;font-size:8.5pt;white-space:pre-wrap}
    table{font-size:9pt}
    tr{break-inside:avoid}
    th,td{color:#000}
    .note,.legal .summary{break-inside:avoid;border-left-color:#000}
    .toc{break-after:page}
    .print-cover{display:block}
    /* A pair of screenshots is about a third of a page: kept together, never split. */
    .figures{break-inside:avoid;margin:10pt 0 12pt;gap:10mm}
    .figures figure{flex:0 0 48mm}
    .figures img{max-width:48mm;border-color:#999}
    .figures figcaption{color:#000;font-size:8.5pt}
    .figures figure.wide{flex:0 0 100mm}
    .figures figure.wide img{max-width:100mm}
}
