/* === Self-hosted fonts (SIL OFL) - nessuna chiamata a Google === */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorantgaramond-400-italic-53fac4.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorantgaramond-400-italic-e669a1.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorantgaramond-400-italic-b78847.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorantgaramond-400-italic-f37747.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/cormorantgaramond-400-italic-9ca58f.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-ec84a3.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-4ee8fc.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-f55b8d.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-eef1e4.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-983e90.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-395290.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/inter-400-normal-567244.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-ec84a3.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-4ee8fc.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-f55b8d.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-eef1e4.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-983e90.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-395290.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/inter-500-normal-567244.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-ec84a3.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-4ee8fc.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-f55b8d.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-eef1e4.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-983e90.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-395290.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/inter-600-normal-567244.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-400-normal-27e1b5.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-400-normal-b1b041.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-400-normal-fe1427.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-400-normal-ab7c1a.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-400-normal-ba1653.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-400-normal-480c06.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-500-normal-27e1b5.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-500-normal-b1b041.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-500-normal-fe1427.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-500-normal-ab7c1a.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-500-normal-ba1653.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/jetbrainsmono-500-normal-480c06.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-400-normal-7c5c58.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-400-normal-611be2.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-400-normal-ecea81.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-500-normal-7c5c58.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-500-normal-611be2.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-500-normal-ecea81.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-600-normal-7c5c58.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-600-normal-611be2.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/spacegrotesk-600-normal-ecea81.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   CATA · Editorial
   Foglio di stile sulle fondamenta SKYNETLAB.
   Palette: crema avorio (#F2EDE3) + nero profondo (#0A0A0A).
   Adattato al formato blog (lista analisi + articolo).
   ============================================================ */

/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Palette */
  --bg: #F2EDE3;
  --bg-elev: #EBE4D5;
  --bg-deep: #E2D9C5;
  --ink: #0A0A0A;
  --ink-soft: #2A2A2A;
  --ink-mute: #6E6A60;
  --line: #1A1A1A;
  --line-soft: rgba(10, 10, 10, 0.12);
  --accent: #0A0A0A;
  --live: #2E7D5E;   /* verde discreto */
  --warn: #B8694D;   /* rame caldo */

  /* Typography */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;

  /* Spacing */
  --container: 1180px;
  --reading: 760px;
  --gap-xl: 96px;
  --gap-lg: 64px;
  --gap-md: 32px;
  --gap-sm: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 237, 227, 0.88);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}



.brand-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  position: relative;
}

.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  transition: all 0.2s ease;
}

.lang-toggle button.is-active {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

em.serif {
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--ink-mute);
}

/* ---------- Hero (editoriale) ---------- */
.hero {
  padding: var(--gap-xl) 0 var(--gap-lg);
  border-bottom: 1px solid var(--line-soft);
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.04;
  margin-bottom: 24px;
  font-weight: 400;
  max-width: 14ch;
}

.hero h1 em {
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

.hero-lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 600px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.btn-arrow::after {
  content: '\2192';
  font-family: var(--font-mono);
  transition: transform 0.2s ease;
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- Sections ---------- */
section { padding: var(--gap-xl) 0; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gap-md);
  margin-bottom: var(--gap-lg);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 24px;
}

.section-header h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.05;
  max-width: 740px;
  font-weight: 400;
}

.section-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* ---------- Post list (analisi recenti) ---------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.post-card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease;
}

.post-card:hover { background: var(--bg-elev); }

.pc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.pc-ticker { color: var(--ink); font-weight: 500; }

.pc-title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
  font-weight: 500;
}

.pc-excerpt {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

.pc-foot {
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pc-foot::after {
  content: '\2192';
  transition: transform 0.2s ease;
}

.post-card:hover .pc-foot::after { transform: translateX(4px); }

/* ---------- Signal badge ---------- */
.signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}

.signal::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.signal-buy { color: var(--live); border-color: rgba(46, 125, 94, 0.4); }
.signal-sell { color: var(--warn); border-color: rgba(184, 105, 77, 0.4); }
.signal-hold { color: var(--ink-mute); }

/* ---------- Article (post singolo) ---------- */
.article {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 56px 32px var(--gap-xl);
}

.article-head {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}

.article-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 14px 0 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.article-body p,
.article-body ul,
.article-body ol {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 44px 0 16px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  margin: 28px 0 10px;
}

.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); font-weight: 500; }
.article-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  margin-bottom: 32px;
}
.article-back::before { content: '\2190'; }
.article-back:hover { color: var(--ink); }

/* ---------- Tag pill ---------- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 6px;
}

/* ---------- Quote ---------- */
.quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(22px, 2.6vw, 32px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  max-width: 760px;
  margin: 40px auto;
  text-align: center;
}

.quote::before, .quote::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--ink);
  margin: 24px auto;
}

/* ---------- Definition list (scheda dati) ---------- */
.deflist { width: 100%; border-collapse: collapse; margin: 24px 0; }
.deflist tr { border-bottom: 1px solid var(--line-soft); }
.deflist td { padding: 16px 0; vertical-align: top; font-size: 15px; color: var(--ink-soft); }
.deflist td:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  width: 200px;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: var(--gap-lg) 0 var(--gap-md);
  margin-top: var(--gap-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand .brand-mark {
  width: 32px;
  height: 32px;
  display: inline-block;
  color: var(--ink);
  flex-shrink: 0;
}

.footer-brand .brand-mark {
  color: var(--bg);
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 16px;
}

.footer-tag {
  font-size: 13px;
  color: rgba(242, 237, 227, 0.6);
  max-width: 320px;
  line-height: 1.5;
}

.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242, 237, 227, 0.5);
  margin-bottom: 18px;
  font-weight: 400;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  color: rgba(242, 237, 227, 0.85);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer ul a:hover { color: var(--bg); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(242, 237, 227, 0.1);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 237, 227, 0.5);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-legal a {
  color: rgba(242, 237, 227, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-legal a:hover { color: var(--bg); }
.footer-legal .dot {
  width: 3px;
  height: 3px;
  background: rgba(242, 237, 227, 0.35);
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Bilingual visibility ---------- */
[data-lang] { display: none; }
html[lang="it"] [data-lang="it"] { display: initial; }
html[lang="en"] [data-lang="en"] { display: initial; }

[data-lang][data-block] { display: none; }
html[lang="it"] [data-lang="it"][data-block] { display: block; }
html[lang="en"] [data-lang="en"][data-block] { display: block; }

[data-lang][data-flex] { display: none; }
html[lang="it"] [data-lang="it"][data-flex] { display: flex; }
html[lang="en"] [data-lang="en"][data-flex] { display: flex; }

/* ---------- Legal pages ---------- */
.legal-wrap {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.legal-wrap .eyebrow { margin-bottom: 20px; }

.legal-wrap h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.legal-wrap .legal-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.legal-wrap h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-top: 8px;
}

.legal-wrap h2 .legal-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-right: 14px;
  display: inline-block;
  vertical-align: 2px;
}

.legal-wrap h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  margin: 28px 0 10px;
}

.legal-wrap p,
.legal-wrap ul,
.legal-wrap ol {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.legal-wrap ul, .legal-wrap ol { padding-left: 22px; }
.legal-wrap li { margin-bottom: 8px; }
.legal-wrap li strong { color: var(--ink); font-weight: 500; }
.legal-wrap p strong { color: var(--ink); font-weight: 500; }

.legal-wrap a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.legal-wrap a:hover { color: var(--ink-soft); }

.legal-wrap .legal-callout {
  background: var(--bg-elev);
  border-left: 2px solid var(--ink);
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .post-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; }
}

@media (max-width: 640px) {
  :root { --gap-xl: 64px; --gap-lg: 40px; }
  .container { padding: 0 20px; }
  .header-inner { height: 64px; }
  .brand-text { font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .nav { display: none; }
  .article-head h1 { font-size: clamp(28px, 8vw, 40px); }
}

/* ============================================================
   REPORT + PAGINA ASSET
   ============================================================ */

/* ---------- Search box + autocomplete ---------- */
.search-wrap { max-width: 640px; }
.search-box { position: relative; }
.search-input {
  width: 100%;
  padding: 16px 22px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.2s ease;
}
.search-input:focus { box-shadow: 0 0 0 3px rgba(10,10,10,0.08); }
.search-input::placeholder { color: var(--ink-mute); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(10,10,10,0.12);
  display: none;
}
.search-results.open { display: block; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.search-item:last-child { border-bottom: 0; }
.search-item:hover, .search-item.active { background: var(--bg-elev); }
.si-ticker { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; min-width: 62px; }
.si-name { font-size: 14px; color: var(--ink-soft); flex: 1; }
.si-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.si-soon { color: var(--ink-mute); }
.search-empty { padding: 16px 18px; font-size: 14px; color: var(--ink-mute); }

/* ---------- Report CTA ---------- */
.report-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid var(--ink);
  background: var(--bg-elev);
  padding: 28px 32px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease;
}
.report-cta:hover { background: var(--bg-deep); }
.rc-text h3 { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.rc-text p { font-size: 14px; color: var(--ink-soft); }
.rc-arrow { font-family: var(--font-mono); font-size: 22px; }

/* ---------- Tree (orientamento) ---------- */
.tree { border: 1px solid var(--line-soft); }
.tree-market { border-bottom: 1px solid var(--line-soft); }
.tree-market:last-child { border-bottom: 0; }
.tree-market-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 20px 24px; background: var(--bg-elev);
}
.tm-name { font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.tm-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); white-space: nowrap; }
.tree-type { padding: 18px 24px; border-top: 1px solid var(--line-soft); }
.tt-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px; }
.tt-assets { display: flex; flex-direction: column; gap: 6px; }
.asset-pill {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  background: var(--bg-100);
  border: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s, background 0.18s;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}
.asset-pill .ap-t {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  min-width: 64px;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.asset-pill .ap-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-pill.ready:hover { border-color: var(--ink); background: var(--bg-elev); }
.asset-pill.ready::after {
  content: "→";
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--ink-mute);
  font-size: 14px;
  transition: transform 0.18s, color 0.18s;
}
.asset-pill.ready:hover::after { color: var(--ink); transform: translateX(2px); }
.asset-pill.ready { cursor: pointer; }
.asset-pill.ready:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.asset-pill.soon { color: var(--ink-mute); cursor: default; }
.asset-pill.soon .ap-tag { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }

/* ---------- Pagina asset ---------- */
.asset-header { padding: var(--gap-lg) 0 var(--gap-md); border-bottom: 1px solid var(--line-soft); }
.ah-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ah-ticker { font-family: var(--font-display); font-size: clamp(32px, 5vw, 54px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.ah-name { font-size: 18px; color: var(--ink-soft); }
.ah-meta { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }

.asset-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--gap-lg); align-items: start; padding: var(--gap-lg) 0 var(--gap-xl); }

.block-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 16px; }

.broker-sheet { border: 1px solid var(--line-soft); margin-bottom: var(--gap-lg); }
.bs-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.bs-row:last-child { border-bottom: 0; }
.bs-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.bs-v { font-family: var(--font-display); font-weight: 500; font-size: 16px; }

.report-body p, .report-body ul { font-size: 16px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 16px; }
.report-body ul { padding-left: 22px; }
.report-body li { margin-bottom: 8px; }
.report-body h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin: 40px 0 18px; color: var(--ink); }
.report-body h2:first-child { margin-top: 0; }
.report-body h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; margin: 28px 0 12px; }
.report-body table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 18px 0 28px; font-size: 15px; }
.report-body table th { text-align: left; padding: 12px 14px 12px 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); border-bottom: 1px solid var(--line-strong); font-weight: 500; }
.report-body table td { padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); line-height: 1.55; vertical-align: top; }
.report-body table td:first-child { font-weight: 500; color: var(--ink); width: 28%; }
.report-body table td:nth-child(2) { font-family: var(--font-mono); color: var(--ink); width: 18%; white-space: nowrap; }
.report-body table tr:last-child td { border-bottom: none; }
.report-body blockquote { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; color: var(--ink-mute); border-left: 2px solid var(--line-strong); padding: 4px 0 4px 14px; margin: 0 0 22px; }
.report-body strong { color: var(--ink); font-weight: 600; }

/* sidebar previsioni */
.forecast { border: 1px solid var(--ink); padding: 26px 24px; position: sticky; top: 92px; }
.forecast > h3 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 20px; }
.fc-item { margin-bottom: 20px; }
.fc-item:last-of-type { margin-bottom: 0; }
.fc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.fc-label { font-family: var(--font-display); font-size: 15px; font-weight: 500; }
.fc-dir { font-family: var(--font-mono); font-size: 18px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); }
.fc-pct { font-family: var(--font-mono); font-size: 14px; color: var(--ink-soft); }
.prob-bar { height: 6px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; }
.prob-fill { height: 100%; width: 0; background: var(--ink-mute); border-radius: 999px; }
.fc-buy .prob-fill { background: var(--live); }
.fc-sell .prob-fill { background: var(--warn); }
.fc-hold .prob-fill { background: var(--ink-mute); }
.fc-buy .fc-dir { color: var(--live); }
.fc-sell .fc-dir { color: var(--warn); }

/* ============================================================
   Tree mercati collassabile + ready list + pricing compact
   ============================================================ */

.tree-market-head {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.18s;
}
.tree-market-head:hover { background: var(--bg-elev); }
.tree-market-head .tm-name { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.tree-market-head .tm-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-mute); margin-left: auto; margin-right: 12px; }
.tree-market-head .tm-chev { font-size: 14px; color: var(--ink-mute); transition: transform 0.18s; display: inline-block; }
.tree-market.collapsed .tm-chev { transform: rotate(-90deg); }
.tree-market-body { max-height: 2000px; overflow: hidden; transition: max-height 0.22s ease-out, padding 0.22s; padding: 14px 22px 20px; }
.tree-market.collapsed .tree-market-body { max-height: 0; padding-top: 0; padding-bottom: 0; }
.tree-market { border: 1px solid var(--line-soft); background: var(--bg-100); margin-bottom: 8px; }
.tree-market-head { background: var(--bg-elev); }
.tree-market-head:hover { background: var(--line-soft); }

/* Sezione continente */
.tree-continent { margin-bottom: 36px; }
.tc-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.tc-body { display: flex; flex-direction: column; gap: 0; }

/* Pallino status mercato (verde = aperto adesso) */
.tm-status {
  display: inline-block;
  margin-left: 8px;
  font-size: 8px;
  color: var(--ink-mute);
  vertical-align: middle;
  line-height: 1;
  transition: color 0.2s;
}
.tm-status.open {
  color: #2e7d32;
  text-shadow: 0 0 6px rgba(46, 125, 50, 0.55);
}

/* Flash sull'asset trovato via ricerca */
@keyframes catFlash {
  0%   { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.0); border-color: var(--line-soft); }
  15%  { box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.35); border-color: #2e7d32; }
  30%  { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.0); border-color: var(--ink); }
  50%  { box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.35); border-color: #2e7d32; }
  70%  { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.0); border-color: var(--ink); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.0); border-color: var(--line-soft); }
}
.asset-pill.flash { animation: catFlash 2.2s ease-out 1; }

/* === Sistema "non letto": pallino coerente con stato mercato (.tm-status) === */
/* Solo su mercato e asset, NON su continente. Rosso tenue, carattere unicode. */
.tree-market.has-unread > .tree-market-head .tm-name::after,
.asset-pill.has-unread .ap-t::after {
  content: "\25cf";
  font-family: var(--font-mono);
  font-size: 11px;
  color: #b8523d;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  flex: 0 0 auto;
}
.asset-pill.has-unread:hover .ap-t::after {
  opacity: 0.5;
}

/* Item ricerca selezionato con tastiera */
.search-item.si-selected { background: var(--bg-elev); }

/* Riga schedule + navigatore sotto al banner "Lettura aggiornata" */
.schedule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.schedule-row .sched-next { display: inline-block; }
.schedule-row .sched-missed {
  display: inline-block;
  color: #c0392b;
  font-weight: 500;
}
.report-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.report-nav .rn-btn {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  padding: 4px 12px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.report-nav .rn-btn:hover:not(:disabled) { border-color: var(--ink); background: var(--bg-elev); }
.report-nav .rn-btn:disabled { color: var(--ink-mute); opacity: 0.4; cursor: not-allowed; }
.report-nav .rn-pos { letter-spacing: 0.1em; color: var(--ink-mute); }

/* Ready chips (lista report disponibili) */
.ready-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.ready-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  background: var(--bg-100);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.ready-chip:hover { border-color: var(--ink); background: var(--bg-elev); transform: translateY(-1px); }
.ready-chip .rc-ticker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-mute); }
.ready-chip .rc-name { font-family: var(--font-display); font-weight: 500; font-size: 16px; line-height: 1.2; }
.ready-chip .rc-market { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-mute); margin-top: 2px; text-transform: uppercase; }

/* Pricing compact cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border: 1px solid var(--line-soft);
  background: var(--bg-100);
  transition: border-color 0.18s, background 0.18s;
}
.pricing-card:hover { border-color: var(--ink-mute); }
.pricing-card .pcd-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pricing-card .pcd-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-mute); text-transform: uppercase; }
.pricing-card .pcd-price { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--ink-mute); text-transform: uppercase; }
.pricing-card .pcd-title { font-family: var(--font-display); font-weight: 500; font-size: 19px; line-height: 1.25; margin: 0 0 10px; }
.pricing-card .pcd-desc { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 16px; }
.pricing-card .pcd-cta { margin-top: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink); text-decoration: none; padding-top: 12px; border-top: 1px solid var(--line-soft); text-transform: uppercase; }
.pricing-card .pcd-cta:hover { color: var(--ink-mute); }
.pricing-card .pcd-cta::after { content: " →"; }

.accuracy { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.acc-val { font-family: var(--font-display); font-size: 34px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.acc-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }

.placeholder-val { color: var(--ink-mute); font-weight: 400; }

.asset-note {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.6;
  letter-spacing: 0.03em; color: var(--ink-mute);
  border-left: 2px solid var(--line-soft); padding: 12px 0 12px 16px; margin-top: var(--gap-md);
}

@media (max-width: 860px) {
  .asset-layout { grid-template-columns: 1fr; }
  .forecast { position: static; }
}

/* === Mobile: compatta asset-pill e mercato tree === */
@media (max-width: 640px) {
  /* Pillole asset compatte: ticker piccolo a sinistra, nome troncato a destra */
  .asset-pill {
    gap: 12px;
    padding: 10px 14px;
    font-size: 13px;
    min-height: 40px;
    overflow: hidden;
  }
  .asset-pill .ap-t {
    font-size: 10px;
    letter-spacing: 0.12em;
    min-width: 44px;
  }
  .asset-pill .ap-name,
  .asset-pill > span:not(.ap-t):not(.ap-tag) {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .asset-pill.ready::after {
    font-size: 12px;
    margin-left: 8px;
    flex: 0 0 auto;
  }
  /* Header mercato (NASDAQ etc.): meta su seconda riga, no overflow */
  .tree-market-head {
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 14px 16px;
  }
  .tm-name { font-size: 16px; }
  .tm-meta {
    font-size: 10px;
    white-space: normal;
    flex-basis: 100%;
  }
  /* Body mercato + tipo: meno aria interna su mobile */
  .tree-market-body { padding: 6px 12px 10px; }
  .tree-type {
    padding: 10px 0 4px;
    border-top: 0;
  }
  .tree-type + .tree-type {
    border-top: 1px solid var(--line-soft);
    margin-top: 4px;
    padding-top: 10px;
  }
  .tt-label { font-size: 10px; margin-bottom: 6px; letter-spacing: 0.12em; }
  .tt-assets { gap: 5px; }
}

/* === Brand Cortex nel footer (simmetrico a CATA) === */
.cortex-brand {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: 28px;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.cortex-brand:hover { opacity: 1; }
.cortex-brand .footer-brand { margin-bottom: 12px; }
.cortex-brand .footer-tag { margin-top: 0; }

/* === Brand SKYNETLAB nel footer (stessa struttura di Cortex) === */
.skynetlab-brand {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: 28px;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.skynetlab-brand:hover { opacity: 1; }
.skynetlab-brand .footer-brand { margin-bottom: 12px; }
.skynetlab-brand .footer-tag { margin-top: 0; }

/* === Asset live banner (data-banner) === */
.asset-banner {
  margin: 16px 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  background: var(--bg-elev);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.asset-banner[data-banner-state="ok"] { border-color: rgba(47, 125, 79, 0.35); }
.asset-banner[data-banner-state="error"] { border-color: rgba(184, 82, 61, 0.35); color: #b8523d; }
.asset-banner[data-banner-state="pending"] { opacity: 0.85; }

/* === Prezzo live header asset === */
.ah-price-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-left: auto;
  line-height: 1.1;
}
.ah-price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.18s ease, background-color 0.18s ease;
  padding: 2px 8px;
  border-radius: 4px;
}
.ah-change {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  padding-left: 8px;
}
.ah-change.up { color: #2f7d4f; }
.ah-change.down { color: #b8523d; }
.ah-change.flat { color: var(--ink-mute); }

/* Pulse breve quando il prezzo cambia */
@keyframes pulseUp {
  0% { background-color: rgba(47, 125, 79, 0.18); }
  100% { background-color: transparent; }
}
@keyframes pulseDown {
  0% { background-color: rgba(184, 82, 61, 0.18); }
  100% { background-color: transparent; }
}
.ah-price.pulse-up { animation: pulseUp 1.2s ease-out 1; }
.ah-price.pulse-down { animation: pulseDown 1.2s ease-out 1; }

@media (max-width: 640px) {
  .ah-price-block {
    margin-left: 0;
    margin-top: 6px;
    flex-basis: 100%;
  }
  .ah-price { font-size: 22px; padding: 1px 6px; }
  .ah-change { font-size: 10px; }
}


/* Indicatore LIVE pulsante + timestamp ultimo aggiornamento */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f7d4f;
  margin-right: 6px;
  vertical-align: middle;
  animation: liveBlink 1.6s ease-in-out infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(47, 125, 79, 0.45); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(47, 125, 79, 0); }
}
.ah-ts {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-top: 2px;
}


/* === FAQ accordion === */
.faq-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; max-width: 880px; }
.faq-item {
  border: 1px solid var(--line-soft);
  background: var(--bg);
  transition: border-color 0.18s ease;
}
.faq-item:hover { border-color: var(--ink-mute); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 28px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--ink-mute);
  transition: transform 0.18s ease, color 0.18s ease;
  flex: 0 0 auto;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; color: var(--ink); }
.faq-item[open] { border-color: var(--ink-mute); }
.faq-item .faq-body {
  padding: 0 28px 22px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.faq-item .faq-body p { margin: 0 0 10px; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }
.faq-item .faq-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .faq-item summary { padding: 16px 18px; font-size: 15px; }
  .faq-item .faq-body { padding: 0 18px 18px; font-size: 14px; }
}


/* ============================================================
   CERVELLO — report ricco analyst_brain (v5). Classi brain-*.
   Palette: bull = --live (verde), bear = --warn (rame),
   neutro = --ink-mute, ambiguo = ambra.
   ============================================================ */
.brain-headline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 .5rem;
  color: var(--ink);
}
.brain-tesi {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.brain-paradosso {
  background: var(--bg-elev);
  border-left: 3px solid var(--warn);
  padding: .6rem .9rem;
  margin: 0 0 1.4rem;
  font-size: .95rem;
}
.brain-drivers { margin: 1.4rem 0; }
.brain-drivers > h4,
.brain-verdict > h4,
.brain-livelli > h4,
.brain-fondamentali > h4 {
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 .7rem;
}
.brain-drivers .driver {
  border: 1px solid var(--line-soft);
  border-left-width: 3px;
  border-radius: 6px;
  padding: .6rem .8rem;
  margin: 0 0 .6rem;
  background: var(--bg);
}
.brain-drivers .driver.brain-bull { border-left-color: var(--live); }
.brain-drivers .driver.brain-bear { border-left-color: var(--warn); }
.brain-drivers .driver.brain-neutro { border-left-color: var(--ink-mute); }
.brain-drivers .driver.brain-ambiguo { border-left-color: #C9A227; }
.brain-drivers .drv-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
}
.brain-drivers .drv-val {
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--ink-soft);
  margin: .15rem 0;
}
.brain-drivers .drv-interp { margin: .25rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.brain-verdict {
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: .9rem 1rem;
  margin: 1.4rem 0;
  background: var(--bg-elev);
}
.brain-verdict h4 { color: var(--ink); }
.brain-livelli { margin: 1.4rem 0; }
.brain-livelli ul { list-style: none; padding: 0; margin: 0; }
.brain-livelli li {
  font-family: var(--font-mono);
  font-size: .9rem;
  padding: .35rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.brain-invalidate {
  font-size: .95rem;
  color: var(--warn);
  margin: 1rem 0;
}
.brain-narrative, .brain-eco { font-size: .92rem; color: var(--ink-mute); margin: .5rem 0; }
.brain-fondamentali {
  margin: 1.4rem 0;
  padding: .9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}
.brain-fondamentali p { margin: .3rem 0; font-size: .92rem; color: var(--ink-soft); }
.brain-macro {
  font-size: .95rem;
  border-top: 1px solid var(--line-soft);
  padding-top: .9rem;
  margin-top: 1.4rem;
  color: var(--ink-soft);
}


/* ============================================================
   CERVELLO v5.1 — blocco operativo "Come operare ora" + orizzonte primario
   ============================================================ */
.brain-operativo {
  margin: 1.4rem 0;
  padding: .9rem 1rem;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--live);
  border-radius: 6px;
  background: var(--bg-elev);
}
.brain-operativo > h4 {
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 .6rem;
}
.brain-operativo .op-orizzonte {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--ink-soft);
  margin-bottom: .4rem;
}
.brain-operativo .op-come { margin: .3rem 0 .6rem; font-size: .98rem; color: var(--ink); }
.brain-operativo .op-triggers { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0; }
.brain-operativo .op-trig {
  font-family: var(--font-mono);
  font-size: .82rem;
  padding: .2rem .55rem;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
}
.brain-operativo .op-in { color: var(--live); border-color: var(--live); }
.brain-operativo .op-out { color: var(--warn); border-color: var(--warn); }
.brain-operativo .op-contesto { margin: .4rem 0 0; font-size: .88rem; color: var(--ink-mute); }
/* riga orizzonte primario evidenziata nella tabella Forecasts EN */
.brain-forecasts tr.fc-primary { background: var(--bg-deep); font-weight: 600; }


/* ============================================================
   v6 ARTICOLO — corpo articolo a sinistra, box dati a destra
   ============================================================ */
.report-body .art-headline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.28;
  margin: 0 0 1.1rem;
  color: var(--ink);
}
.report-body .art-par {
  font-size: 1.05rem;
  line-height: 1.85;
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
}
aside .forecast { position: static; top: auto; }
aside .forecast + .forecast { margin-top: 20px; }
.box-rows { display: flex; flex-direction: column; }
.box-rows .bx-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.box-rows .bx-row:last-child { border-bottom: none; }
.box-rows .bx-k { color: var(--ink-mute); }
.box-rows .bx-v { font-family: var(--font-mono); color: var(--ink); text-align: right; }


/* ============================================================
   PWA — tasti Condividi / Installa (header home)
   ============================================================ */
.pwa-actions { display: flex; align-items: center; gap: 8px; margin-left: 14px; }
.pwa-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pwa-btn:hover { background: var(--bg-elev); border-color: var(--line); }
.pwa-btn.pwa-ok { color: var(--live); border-color: var(--live); }
.pwa-btn svg { display: block; }
@media (max-width: 720px) {
  .pwa-actions { margin-left: 8px; gap: 6px; }
  .pwa-btn { width: 34px; height: 34px; }
}
