/* ==========================================================================
   Giusto Peso Per Sempre — veste dei libri da leggere online
   Si carica DOPO book.css (stessi libri di deboraconti.com) e li allinea al sito:
   stessa palette calda, stessi caratteri (nessun font esterno), stesso marchio.
   Tutto ciò che serve alla lettura (indice, segnalibro, temi Giorno/Seppia/Notte,
   dimensione del testo) resta quello di book.css.
   ========================================================================== */
:root {
  --paper: #f4f6ef; --paper-2: #e7ece0; --ink: #1c241f; --muted: #5d6a61; --line: #d9e1d3;
  --accent: #3e6b4c; --accent-soft: #cfe0c8; --deep: #1f2b24; --figure-bg: #fbfcf8;
  --sunset: linear-gradient(90deg, #a9c49d, #3e6b4c);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="sepia"] { --paper: #f3e7d3; --paper-2: #eadbc2; --ink: #3a2d20; --muted: #7d6a55; --line: #dcc9ab; }
:root[data-theme="night"] { --paper: #151c18; --paper-2: #1d2621; --ink: #e2e9e1; --muted: #9aa99d; --line: #2c3830; --accent: #9fc493; --accent-soft: #2f4a38; --deep: #d6e4d0; --figure-bg: #e6ebe3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --paper: #151c18; --paper-2: #1d2621; --ink: #e2e9e1; --muted: #9aa99d; --line: #2c3830; --accent: #9fc493; --accent-soft: #2f4a38; --deep: #d6e4d0; --figure-bg: #e6ebe3; }
}

/* Titoli come sul sito: serif, maiuscole/minuscole normali */
.hero h1, .ch-head h1, .toc > h2, .about h2 { font-family: var(--serif); font-weight: 400; text-transform: none; letter-spacing: -.01em; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); }
.toc > h2, .about h2 { font-size: 2rem; }
.kicker, .b-title { letter-spacing: .1em; }

/* Bottoni come sul sito */
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #2c4f38; }
.book { box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 30px 50px -18px rgba(31,43,36,.55), 0 10px 20px -10px rgba(0,0,0,.3); }

/* Marchio del sito nella barra: torna alla home */
.gp-home { display: inline-flex; align-items: center; flex: none; margin-right: .2rem; padding-right: .7rem; border-right: 1px solid var(--line); }
.gp-home img { width: 26px; height: auto; display: block; }
.bar { gap: .7rem; }
.bar > .brand { margin-right: auto; }

/* Invito al corso (fine di ogni pagina) */
.gp-cta { max-width: 42rem; margin: 3rem auto 2.5rem; padding: 1.4rem 1.5rem; border-radius: 14px; background: var(--paper-2); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
.gp-cta p { margin: 0 0 .9rem; }
.gp-cta a { display: inline-block; padding: .7rem 1.2rem; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
.gp-cta a:hover { background: #2c4f38; }
@media (max-width: 640px) { .gp-cta { margin: 2rem 1rem 2rem; } }

/* Piè di pagina */
.foot { font-family: var(--sans); }

/* Elementi del «Libro del Giusto Peso Per Sempre» */
.text .visual { margin: 1.8em 0; padding: 1.3em 1.4em; border-radius: 12px; background: var(--paper-2); font-style: italic; }
.text .visual p:last-child { margin-bottom: 0; }
.text .exercise { margin: 1.8em 0; padding: 1.3em 1.4em; border: 1.5px dashed var(--accent); border-radius: 12px; }
.text .write { display: grid; gap: 1.6em; margin: .6em 0 1.6em; }
.text .write span { display: block; border-bottom: 1px solid var(--line); }
.text .sep { text-align: center; letter-spacing: .5em; color: var(--muted); }
.text .sign { text-align: right; font-family: var(--serif); }
.text .colophon { margin-top: 2em; font-family: var(--sans); font-size: .82em; color: var(--muted); line-height: 1.6; }
.text figure img { background: #fff; border-radius: 8px; }
:root[data-theme="night"] .text figure img { filter: invert(.88) hue-rotate(180deg); background: #fff; }
@media print { .text .write span { border-color: #999; } }

/* Acquisto su Amazon: niente giallo, verde foresta discreto come il resto del sito */
.btn.amazon, .tbtn.buy { background: transparent; border: 1px solid var(--deep); color: var(--deep); }
.btn.amazon:hover, .tbtn.buy:hover { background: var(--deep); color: var(--paper); filter: none; }
.buybox.end { border-color: var(--accent); }
