@font-face { font-family: "OpenDyslexic"; src: url("assets/fonts/OpenDyslexic-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "OpenDyslexic"; src: url("assets/fonts/OpenDyslexic-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

/* Colours: "Carta e inchiostro" (the site's palette since 2026-11-22): warm white paper, blue-black ink, a deep teal for
   headings; the tale covers bring the colour. Every colour on the site comes from these variables: other palettes
   (palettes/*.css: terra, sera, cielo, quaderno) override them, so any change must keep working in all of them. */
:root {
  --ink: #26313d;
  --muted: rgba(38, 49, 61, 0.74);
  --unread: rgba(38, 49, 61, 0.42);
  --cream: #f1ede6;                /* band sections (.cream-bg), page background */
  --panel: rgba(253, 251, 247, 0.94);
  --sky-top: #fdfbf7;              /* main sections (.sky-bg): paper */
  --sky-low: #f8f4ed;
  --hero-top: #fdfbf7;
  --accent: #17616b;               /* headings, claim, read words */
  --orange: #c1502a;               /* the palette's warm colour */
  --mistake: #d43a3a;
  --radius: 18px;
  /* roles */
  --brand: #c1502a;                /* "Leggimi" in the top bar */
  --action: #26313d;               /* main buttons, mic */
  --on-action: #fdfbf7;            /* text on --action */
  --on-accent: #fdfbf7;            /* text on --accent (flip card, playing instrument) */
  --sound: #c1502a;                /* wavy underline of sound words */
  --bar: rgba(253, 251, 247, 0.94);
  --card: #ffffff;
  --cloud: transparent;
  --claim-shadow: none;
  /* the landscape drawings, repainted in these colours (html[data-land="recolor"], set by palette.js; "terra" keeps
     the drawings' own colours) */
  --land-1: #dde3e7;
  --land-2: #aebdb3;
  --land-3: #7f9387;
  /* footer: a dark band under every page (newsletter + links) */
  --footer-bg: #26313d; --footer-ink: #f1ede6; --footer-muted: rgba(241, 237, 230, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Nunito", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2 { font-family: "Love Ya Like A Sister", "Nunito", cursive; font-weight: 400; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 58px; padding: 0 16px; background: var(--bar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(35, 48, 61, 0.08); box-shadow: 0 2px 14px rgba(35, 48, 61, 0.06); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-icon { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand-title { color: var(--brand); font-family: "Love Ya Like A Sister", cursive; font-size: 1.6rem; line-height: 1.15; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 22px; flex: none; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.topnav a:hover { color: var(--accent); }
/* the page you're on: the accent colour, with a short line under it */
.topnav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.topnav-toggle { display: none; font: inherit; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--ink); padding: 4px; cursor: pointer; }
/* five links + name + badge need ~690px: below 740px they go into the ☰ panel */
@media (max-width: 740px) {
  .topnav { display: none; }
  /* the menu button opens the links as a small panel under the bar */
  .topbar.nav-open .topnav { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 58px; right: 12px; min-width: 180px;
    background: var(--bar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 14px; padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); }
  .topbar.nav-open .topnav a { padding: 10px 12px; border-radius: 10px; }
  .topnav-toggle { display: block; }
  .topbar-right { gap: 10px; }
  .brand-icon { width: 30px; height: 30px; border-radius: 7px; }
  .brand-title { font-size: 1.3rem; }
}
.appstore-badge { display: inline-block; line-height: 0; border-radius: 9px; }
.appstore-badge img { height: 100%; width: auto; }
.appstore-badge-small { height: 30px; border-radius: 7px; }
.appstore-badge-large { height: 56px; }
.appstore-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn { display: inline-block; font-weight: 800; text-decoration: none; background: var(--action); color: var(--on-action); border: 0; border-radius: 999px; padding: 14px 24px; cursor: pointer; }
.btn-ghost { background: transparent; border: 2px solid var(--accent); color: var(--accent); font-family: inherit; }

/* ---------- title screen ---------- */
/* A transparent layer over the first pinned scene (#f-phone): it scrolls away with the page while the scene
   stays, so the devices lie right below the payoff on the first screen. */
main { position: relative; }
.hero { position: absolute; left: 0; right: 0; top: 0; z-index: 1; height: 100vh; height: 100svh; overflow: hidden; pointer-events: none;
  text-align: center; padding: max(70px, 9svh) 16px 0; }
.hero-content { position: relative; }
.hero .tagline { margin: 10px auto 0; white-space: pre-line; font-family: "Love Ya Like A Sister", "Nunito", cursive; font-weight: 400;
  font-size: clamp(2rem, 6vw, 4rem); line-height: 1.1; color: var(--accent); text-shadow: var(--claim-shadow); }
/* the first scene keeps the title screen's deeper sky at the top */
#f-phone .pin { background: linear-gradient(to bottom, var(--hero-top) 0%, var(--sky-top) 45%, var(--sky-low) 100%); }

.cloud { position: absolute; width: 140px; height: 44px; border-radius: 44px; background: var(--cloud); }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 60px; height: 60px; left: 24px; top: -30px; }
.cloud::after { width: 46px; height: 46px; left: 72px; top: -20px; }
.cloud-1 { left: 6%; top: 15%; }
.cloud-2 { left: 74%; top: 34%; transform: scale(0.7); opacity: 0.8; }
@media (max-width: 520px) { .cloud-1 { left: -12%; top: 30%; } .cloud-2 { top: 9%; } }

/* ---------- feature sections: tall section, sticky full-screen .pin ---------- */
.feat { position: relative; height: var(--len, 220vh); }
.pin { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.sky-bg { background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-low) 100%); }
.cream-bg { background: var(--cream); }
.f-copy { position: absolute; left: 50%; top: 78px; transform: translateX(-50%); width: min(calc(100vw - 32px), 820px); text-align: center; z-index: 5; }
.f-copy h2 { margin: 0; font-size: clamp(2rem, 7vw, 3.6rem); color: var(--accent); line-height: 1.1; text-wrap: balance; }
.f-copy p { margin: 10px auto 0; max-width: 46ch; font-size: clamp(1rem, 3.4vw, 1.3rem); color: var(--ink); text-wrap: balance; }
.js .f-copy-2 { opacity: 0; } /* revealed by its scene's animation; visible without JS */

.tale-text { font-family: "OpenDyslexic", "Nunito", sans-serif; }
.w { color: var(--unread); }
.w.sound-word { cursor: pointer; text-decoration: underline wavy var(--sound); text-underline-offset: 6px; }

/* 1. the opening scene. Wide screens: the iPad, with the iPhone overlapping its right side (a twin box above the
   hills). Portrait screens: the iPhone alone, in the iPad's place. */
.layer { position: absolute; left: 0; bottom: 0; width: 100%; pointer-events: none; }
.layer img { display: block; width: 100%; height: auto; min-height: 55vh; min-height: 55dvh; object-fit: cover; object-position: 50% 100%; }
/* palettes with their own landscape colours: the drawing becomes a mask (same crop as the image), filled with --land-N */
html[data-land="recolor"] .layer img { visibility: hidden; }
html[data-land="recolor"] .layer { -webkit-mask-size: cover; mask-size: cover; -webkit-mask-position: 50% 100%; mask-position: 50% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
html[data-land="recolor"] .layer-1 { -webkit-mask-image: url("assets/img/layers/1.png"); mask-image: url("assets/img/layers/1.png"); background: var(--land-1); }
html[data-land="recolor"] .layer-2 { -webkit-mask-image: url("assets/img/layers/2.png"); mask-image: url("assets/img/layers/2.png"); background: var(--land-2); }
html[data-land="recolor"] .layer-3 { -webkit-mask-image: url("assets/img/layers/3.png"); mask-image: url("assets/img/layers/3.png"); background: var(--land-3); }
/* the app's page colour fades in behind the dive, so the zoomed screen becomes one seamless page */
.pin-cream { position: absolute; inset: 0; background: #f8f8f8; opacity: 0; }
.phone-stage { position: absolute; inset: 0; }
.devices, .phone-float { position: absolute; left: 50%; top: 60%; }
.devices-wide, .phone-float { width: min(78vw, 627px, calc((100dvh - 340px) * 1.51)); aspect-ratio: 2760 / 2040; }
.devices-portrait { width: min(56vw, calc(62dvh * 1350 / 2760)); aspect-ratio: 1350 / 2760; display: none; }
.devices > .device { position: absolute; inset: 0; }
.phone-float { pointer-events: none; }
.float-iphone { position: absolute; left: 80%; bottom: -30%; width: 27%; }
@media (max-aspect-ratio: 1/1) {
  .devices-wide, .phone-float { display: none; }
  .devices-portrait { display: block; }
}
.app-frames { display: block; width: 100%; height: 100%; object-fit: cover; }
/* where the page's text sits in each recording (the camera dives into it) */
.zoom-target { position: absolute; pointer-events: none; }
.ipad-zoom-target { left: 3%; top: 6%; width: 60%; height: 26%; }
.iphone-zoom-target { left: 4%; top: 11%; width: 88%; height: 21%; }
/* the recorded status bar (time, date, "Read Me Aloud"; on the iPhone also the Dynamic Island), covered with the
   page's colour once the tale is open; measured on the frames */
.status-mask { position: absolute; left: 0; right: 0; top: 0; background: #f8f8f8; opacity: 0; pointer-events: none; }
.devices-wide .status-mask { height: 3.6%; }
.devices-portrait .status-mask { height: 6.9%; }

/* Devices: Apple's product bezels (Apple Design Resources: iPad (A16) Silver, iPhone 17 White) with the screen
   underneath, placed in the bezel's transparent opening (measured on the PNGs: iPad 2360 × 1640 at 200, 200 in
   2760 × 2040; iPhone 1206 × 2622 at 72, 69 in 1350 × 2760). */
.device { position: relative; }
.device-ipad { aspect-ratio: 2760 / 2040; }
.device-iphone { aspect-ratio: 1350 / 2760; }
.device-screen { position: absolute; overflow: hidden; background: #f8f8f8; }
.device-ipad .device-screen { left: 7.246%; top: 9.804%; width: 85.507%; height: 80.392%; border-radius: 2.03% / 2.93%; }
.device-iphone .device-screen { left: 5.333%; top: 2.5%; width: 89.333%; height: 95%; border-radius: 15.75% / 7.25%; }
.device-bezel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.app-video, .app-shot, .device-screen img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 2. giant words */
.giant { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(calc(100vw - 40px), 1100px); margin: 0;
  font-size: clamp(2.2rem, 7.6vw, 5.4rem); line-height: 1.35; font-weight: 700; text-align: center; text-wrap: balance; }
.giant-source { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; color: var(--muted); font-style: italic; margin: 0; }

/* 3. the stumble: an iPhone playing recording B, between the copy and the bottom of the screen */
.stumble-stage { position: absolute; left: 0; right: 0; top: clamp(220px, 31dvh, 300px); bottom: 3dvh; display: flex; justify-content: center; perspective: 900px; }
.stumble-phone { height: 100%; max-width: calc(100vw - 32px); }

/* 4. characters that play */
.characters { position: absolute; inset: 0; }
.character { position: absolute; width: min(17vw, 95px); margin-left: calc(min(17vw, 95px) / -2); margin-top: calc(min(17vw, 95px) / -2);
  cursor: pointer; background: none; border: 0; padding: 0; }
.character img { width: 100%; transform-origin: 50% 50%; filter: drop-shadow(0 8px 14px rgba(35, 48, 61, 0.18)); }
.sounds-card { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); width: min(calc(100vw - 32px), 760px);
  background: var(--card); border-radius: var(--radius); padding: 18px 22px; box-shadow: 0 10px 30px rgba(35, 48, 61, 0.12); }
.sounds-sentence { margin: 0; font-size: clamp(1.05rem, 3.6vw, 1.45rem); line-height: 1.7; text-align: center; }
.sounds-sentence .w { color: var(--ink); }

/* 5. the tale covers: a pile, then a grid (positions and size set in sections.js) */
.cover-pile { position: absolute; inset: 0; }
.cover { position: absolute; display: block; aspect-ratio: 3 / 4; border-radius: 6% / 4.5%; box-shadow: 0 10px 24px rgba(35, 48, 61, 0.22);
  will-change: transform; }

/* 6. flip card */
.flip-stage { position: absolute; inset: 0; perspective: 1000px; }
.flip-card { position: absolute; left: 50%; top: 57%; width: min(calc(100vw - 40px), 760px); height: min(36vh, 260px); margin-left: calc(min(calc(100vw - 40px), 760px) / -2);
  transform: translateY(-50%); transform-style: preserve-3d; }
.flip-face { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 6%; border-radius: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font-size: clamp(1.2rem, 4.4vw, 2.3rem); line-height: 1.5; box-shadow: 0 14px 40px rgba(35, 48, 61, 0.15); }
.flip-a { background: var(--card); color: var(--ink); }
.flip-b { background: var(--accent); color: var(--on-accent); transform: rotateX(180deg); }

/* 8. safety cards */
.safe-cards { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: min(calc(100vw - 32px), 1000px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; perspective: 900px; }
.safe-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 12px 30px rgba(35, 48, 61, 0.12); text-align: center; transform-origin: 50% 100%; }
.safe-card .icon { font-size: 2.2rem; }
.mini-phone { width: 74px; margin: 0 auto 4px; }
@media (max-width: 600px) {
  /* stacked cards: the phone sits beside the text */
  .safe-card.has-shot { display: grid; grid-template-columns: 58px 1fr; column-gap: 14px; text-align: left; align-items: center; }
  .safe-card.has-shot .mini-phone { grid-row: span 2; width: 58px; margin: 0; }
  .safe-card.has-shot h3 { margin-top: 0; }
}
.safe-card h3 { margin: 8px 0 6px; font-size: 1.15rem; }
.safe-card p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .safe-cards { gap: 10px; } .safe-card { padding: 14px; } .safe-card p { font-size: 0.9rem; } }

/* 9. the author */
.author { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: min(calc(100vw - 32px), 760px); text-align: center; }
/* Davide's self-portrait: the pencil drawing as a mask (davide-ink.webp: how dark each pencil mark is), filled with the
   palette's colour, as if drawn with that pencil. --pencil can set its own colour; otherwise the local accent. */
.portrait { width: clamp(170px, 22vw, 240px); aspect-ratio: 934 / 877; margin: 0 auto 10px; background: var(--pencil, var(--accent));
  -webkit-mask: url("assets/img/davide-ink.webp") center / contain no-repeat; mask: url("assets/img/davide-ink.webp") center / contain no-repeat; }
.author h2 { margin: 0; font-size: clamp(1.9rem, 6.4vw, 3.2rem); color: var(--accent); line-height: 1.15; text-wrap: balance; }
.author p { margin: 12px auto 18px; color: var(--muted); }
.instruments { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.instrument { display: inline-block; text-decoration: none; font: inherit; font-weight: 800; background: var(--card); color: var(--ink); border: 2px solid var(--accent); border-radius: 999px; padding: 10px 20px; cursor: pointer; }
.instrument.playing { background: var(--accent); color: var(--on-accent); }

/* ---------- demo ---------- */
.finale { position: relative; z-index: 1; background: var(--cream); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 104px 0 32px; }
.demo { padding: 0 16px; width: 100%; max-width: 760px; margin: 0 auto; text-align: center; }
.demo h2 { font-size: clamp(2.2rem, 8vw, 3.5rem); color: var(--accent); margin: 0; }
.demo-intro { color: var(--muted); margin: 8px 0 88px; }
.demo-card { background: var(--card); border: 1px solid rgba(35, 48, 61, 0.1); border-radius: var(--radius); padding: 24px 20px; position: relative; box-shadow: 0 10px 30px rgba(35, 48, 61, 0.08); }
.giant-pig { position: absolute; right: 4%; bottom: 4%; width: clamp(100px, 16vw, 220px); padding: 0; border: 0; background: none; cursor: pointer; }
.giant-pig img { display: block; width: 100%; }
.demo-sentence { font-size: clamp(1.15rem, 4.2vw, 1.6rem); }
.demo-sentence .w { cursor: pointer; transition: color 0.2s, transform 0.2s; display: inline-block; }
.demo-sentence .w.read { color: var(--accent); }
.demo-sentence .w.next { color: var(--ink); }
.demo-sentence .w.hint { color: var(--ink); transform: scale(1.25); }
.demo-sentence .w.wrong { color: var(--mistake); }
.demo-syllables[hidden] { display: none; }
.demo-syllables { margin: 18px auto 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.demo-syllables-word { font-family: "OpenDyslexic", sans-serif; font-weight: 700; font-size: clamp(1.8rem, 8vw, 3rem); background: var(--cream); border-radius: 16px; padding: 0.1em 0.5em; }
.demo-syllables-word span:nth-child(odd) { color: #1d6fd8; }
.demo-syllables-word span:nth-child(even) { color: #d8431d; }
.demo-controls { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mic { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 800; font-size: 1.05rem; background: var(--action); color: var(--on-action); border: 0; border-radius: 999px; padding: 14px 26px; cursor: pointer; }
.mic svg { width: 24px; height: 24px; fill: currentColor; }
.mic[aria-pressed="true"] { background: var(--mistake); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(212, 58, 58, 0.2); } }
.demo-status { min-height: 1.5em; color: var(--muted); margin: 0; }
.demo-debug { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; color: var(--accent); margin: 0; word-break: break-word; }
.demo-privacy { color: var(--muted); font-size: 0.85rem; margin-top: 16px; }
.end { text-align: center; padding: 36px 16px 0; }

/* ---------- static layout: without JS (no "js" class on <html>), and with reduced motion (sections.js adds
   body.reduced), the scenes are plain blocks, one after the other, everything visible: stills instead of the moving
   pictures, both sides of the language card. ---------- */
:is(html:not(.js) body, body.reduced) .hero { position: relative; height: auto; padding-bottom: 24px; background: linear-gradient(to bottom, var(--hero-top), var(--sky-top)); }
:is(html:not(.js) body, body.reduced) .devices, :is(html:not(.js) body, body.reduced) .phone-float { transform: translate(-50%, -50%); }
:is(html:not(.js) body, body.reduced) .feat { height: auto; }
:is(html:not(.js) body, body.reduced) .pin { position: relative; height: auto; min-height: 0; padding: 110px 0 40px; overflow: visible; }
:is(html:not(.js) body, body.reduced) :is(.f-copy, .giant, .safe-cards, .author) { position: relative; left: auto; top: auto; transform: none; margin: 0 auto; }
:is(html:not(.js) body, body.reduced) .f-copy-2 { opacity: 1; }
:is(html:not(.js) body, body.reduced) :is(.phone-stage, .characters) { position: relative; height: 70vh; }
:is(html:not(.js) body, body.reduced) .stumble-stage { position: relative; top: auto; bottom: auto; height: 70vh; margin-top: 24px; }
:is(html:not(.js) body, body.reduced) .sounds-card { position: relative; left: auto; bottom: auto; transform: none; margin: 20px auto 0; }
:is(html:not(.js) body, body.reduced) .w { color: var(--ink); }
:is(html:not(.js) body, body.reduced) .giant-source { position: relative; bottom: auto; margin-top: 18px; }
:is(html:not(.js) body, body.reduced) .giant-pig { position: relative; right: auto; bottom: auto; display: block; margin: 18px auto 0; }
:is(html:not(.js) body, body.reduced) .giant { color: var(--ink); }
:is(html:not(.js) body, body.reduced) .cover-pile { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px;
  max-width: 1100px; margin: 24px auto 0; padding: 0 16px; }
:is(html:not(.js) body, body.reduced) .cover { position: static; width: 100%; }
/* the language card: both faces, one above the other */
:is(html:not(.js) body, body.reduced) .flip-stage { position: relative; inset: auto; }
:is(html:not(.js) body, body.reduced) .flip-card { position: relative; left: auto; top: auto; margin: 28px auto 0; transform: none; height: auto; display: grid; gap: 16px; padding: 0 16px; width: min(100%, 760px); box-sizing: border-box; }
:is(html:not(.js) body, body.reduced) .flip-face { position: relative; inset: auto; transform: none; min-height: 140px; }
/* controls that need JS */
html:not(.js) :is(.topnav-toggle, .p-copy-btn, .demo-controls) { display: none; }
.demo-noscript { margin: 18px 0 0; color: var(--muted); }

/* palette picker (palette.js): prototype only */
.palette-picker { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: flex; align-items: center; gap: 8px; background: rgba(20, 24, 30, 0.82); color: #fff; border-radius: 999px; padding: 6px 8px 6px 14px;
  font: 700 0.8rem "Nunito", system-ui, sans-serif; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.palette-picker select { font: inherit; border: 0; border-radius: 999px; padding: 4px 8px; background: #fff; color: #1f2630; }

/* homepage: the line for teachers under the final App Store button */
.teachers-teaser { display: inline-block; margin-top: 18px; color: var(--accent); font-weight: 800; text-decoration: none; }
.teachers-teaser:hover { text-decoration: underline; }
/* the quieter contact line under it, and the one in the author scene */
.end-contact { margin-top: 10px; color: var(--muted); font-weight: 700; text-decoration: none; }
.end-contact:hover, .author-contact a:hover { text-decoration: underline; }
.author-contact { margin: 14px 0 0; }
.author-contact a { color: var(--accent); font-weight: 800; text-decoration: none; }
.end { display: flex; flex-direction: column; align-items: center; }

/* ---------- teachers page (insegnanti.html) ---------- */
.t-page main { padding-top: 58px; }
.t-wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 0 max(16px, env(safe-area-inset-right, 0px)); }
.t-section { padding: 64px 0; }
.t-section h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: clamp(1.9rem, 5.5vw, 3rem); color: var(--accent); line-height: 1.1; text-wrap: balance; }
.t-section h2 img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.t-lead { margin: 0 0 28px; max-width: 60ch; font-size: clamp(1rem, 2.6vw, 1.2rem); color: var(--muted); }

/* hero: text beside the iPad, on the landscape */
.t-hero { position: relative; overflow: hidden; padding: 48px 0 0; }
.t-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; padding-bottom: 210px; }
.t-hero h1 { margin: 0; font-size: clamp(2.4rem, 6.5vw, 4.2rem); line-height: 1.05; color: var(--accent); text-shadow: var(--claim-shadow); text-wrap: balance; }
.t-hero p { margin: 14px 0 24px; font-size: clamp(1.05rem, 2.6vw, 1.3rem); max-width: 34ch; }
.t-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.t-device { max-width: 560px; justify-self: center; width: 100%; }
.t-hero .layer { z-index: 0; }
/* a short strip of landscape: the whole drawings, squeezed in height, under the text and the iPad */
.t-hero .layer img { min-height: 0; height: 300px; object-fit: fill; }
html[data-land="recolor"] .t-hero .layer { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
@media (max-width: 760px) { .t-hero .layer img { height: 170px; } }
.t-hero .t-front { z-index: 2; }
@media (max-width: 760px) { .t-hero-grid { grid-template-columns: 1fr; padding-bottom: 110px; } .t-device { max-width: 420px; } }

/* cards (why it works) */
.t-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.t-card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 10px 26px rgba(35, 48, 61, 0.1); }
.t-card h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ink); }
.t-card p { margin: 0; color: var(--muted); }

/* how to use it: three steps */
.t-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.t-step { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 26px rgba(35, 48, 61, 0.1); }
.t-step h3 { margin: 0 0 6px; font-size: 1.2rem; color: var(--accent); }
.t-step p { margin: 0; color: var(--muted); }
.t-devices { margin: 18px 0 0; font-weight: 700; }
@media (max-width: 760px) { .t-steps { grid-template-columns: 1fr; } }

/* the class sheet: a page preview beside its description */
.t-sheet-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.t-sheet { background: #fff; color: #23303d; aspect-ratio: 210 / 297; max-width: 340px; width: 100%; justify-self: center; border-radius: 6px; padding: 9% 10%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); transform: rotate(-2deg); display: flex; flex-direction: column; gap: 6%; font-size: clamp(0.62rem, 1.4vw, 0.8rem); }
.t-sheet-head { display: flex; align-items: center; gap: 8px; }
.t-sheet-head img { width: 26%; max-width: 54px; border-radius: 22%; }
.t-sheet-head b { font-family: "Love Ya Like A Sister", cursive; font-weight: 400; font-size: 1.7em; line-height: 1.05; color: var(--accent); }
.t-sheet ul { margin: 0; padding-left: 1.2em; display: grid; gap: 0.5em; }
.t-sheet-qr { margin-top: auto; align-self: flex-end; width: 28%; aspect-ratio: 1; border-radius: 6px;
  background: repeating-linear-gradient(90deg, #23303d 0 6%, transparent 6% 12%), repeating-linear-gradient(0deg, #23303d 0 6%, #fff 6% 12%);
  opacity: 0.85; }
.t-soon { display: inline-block; margin-left: 10px; font-size: 0.85rem; color: var(--muted); }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
@media (max-width: 760px) { .t-sheet-grid { grid-template-columns: 1fr; } }

/* free access form */
.t-form { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: 0 10px 26px rgba(35, 48, 61, 0.1);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; max-width: 760px; }
.t-field { display: grid; gap: 6px; min-width: 0; }
.t-field.wide, .t-check, .t-form-foot { grid-column: 1 / -1; }
.t-field label, .t-field legend { font-weight: 700; font-size: 0.92rem; }
.t-field input:not([type="checkbox"]), .t-field textarea { font: inherit; color: #23303d; background: #fff; border: 1.5px solid rgba(35, 48, 61, 0.25); border-radius: 10px; padding: 10px 12px; width: 100%; }
.t-field input:focus-visible, .t-field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.t-field fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
/* device choices as chips: the whole chip is the tap target, highlighted when checked (Safari draws checkboxes
   badly when they get the text fields' width/padding, so checkboxes are excluded from that rule above) */
.t-field fieldset label { font-weight: 700; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; user-select: none;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--unread); background: var(--card); color: var(--ink); }
.t-field fieldset label:has(input:checked) { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.t-field fieldset label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.t-field fieldset input[type="checkbox"], .t-check input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.t-field fieldset label:has(input:checked) input { accent-color: var(--on-accent); }
.t-check { display: flex; gap: 10px; align-items: flex-start; }
.t-check input { margin-top: 4px; }
.t-check-note { grid-column: 1 / -1; margin: -8px 0 0 30px; font-size: 0.82rem; color: var(--muted); }
.t-form-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.t-form-foot p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.t-form-status { grid-column: 1 / -1; margin: 0; font-weight: 700; color: var(--accent); }
@media (max-width: 600px) { .t-form { grid-template-columns: 1fr; padding: 18px; } }

/* FAQ */
.t-faq { display: grid; gap: 10px; max-width: 760px; }
.t-faq details { background: var(--card); border-radius: 14px; padding: 14px 18px; box-shadow: 0 6px 16px rgba(35, 48, 61, 0.08); }
.t-faq summary { cursor: pointer; font-weight: 800; }
.t-faq p { margin: 10px 0 0; color: var(--muted); }

/* who's behind it */
.t-author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; max-width: 820px; }
.t-author .portrait { margin: 0; width: clamp(150px, 20vw, 210px); }
.t-author p { margin: 0 0 12px; font-size: 1.1rem; }
.t-author a { color: var(--accent); font-weight: 800; }
@media (max-width: 600px) { .t-author { grid-template-columns: 1fr; text-align: center; } .t-author .portrait { margin: 0 auto; } }

/* ---------- press kit page (press.html); reuses the teachers page's sections and hero ---------- */
.p-hero-devices { position: relative; }
.p-hero-ipad { width: 88%; display: block; }
.p-hero-iphone { position: absolute; right: 0; bottom: -10%; width: 26%; }
.p-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .p-two { grid-template-columns: 1fr; } }
.p-facts { margin: 0; background: var(--card); border-radius: var(--radius); box-shadow: 0 10px 26px rgba(35, 48, 61, 0.1); overflow: hidden; }
.p-fact { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; padding: 12px 18px; border-top: 1px solid rgba(127, 127, 127, 0.18); }
.p-fact:first-child { border-top: 0; }
.p-fact dt { font-weight: 800; }
.p-fact dd { margin: 0; overflow-wrap: anywhere; }
.p-fact a { color: var(--accent); font-weight: 700; }
.p-check { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 6px; background: #fff1c9; color: #6b4d00; font-size: 0.75rem; font-weight: 800; }
@media (max-width: 520px) { .p-fact { grid-template-columns: 1fr; gap: 2px; } }
.p-texts { display: grid; gap: 16px; }
.p-copy { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 10px 26px rgba(35, 48, 61, 0.1); }
.p-copy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.p-copy-head h3 { margin: 0; font-size: 1.1rem; color: var(--accent); }
.p-copy-btn { font: inherit; font-weight: 800; font-size: 0.85rem; background: transparent; color: var(--accent); border: 2px solid var(--accent); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.p-copy-body p, .p-story p, .p-dev-text p { margin: 0 0 10px; }
.p-copy-body p { color: var(--muted); }
.p-features { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.p-group { margin: 34px 0 12px; font-size: 1.15rem; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.p-item { margin: 0; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: 0 8px 20px rgba(35, 48, 61, 0.1); }
.p-item a { display: flex; align-items: center; justify-content: center; height: 170px; border-radius: 10px; background: rgba(127, 127, 127, 0.08); }
.p-item a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.p-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.p-item figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
.p-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.p-covers img { width: 100%; border-radius: 6px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16); }
.p-dev-links { display: flex; flex-wrap: wrap; gap: 16px; }
.p-dev-links a { color: var(--accent); font-weight: 800; }

/* ---------- homepage: section progress on the right (progress.js) ---------- */
.progress { position: fixed; z-index: 45; right: max(18px, calc(env(safe-area-inset-right, 0px) + 12px)); top: 50%; transform: translateY(-50%);
  height: min(60vh, 460px); width: 22px; }
.progress-track { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--unread); opacity: 0.55; }
.progress-fill { position: absolute; left: 50%; top: 0; width: 3px; margin-left: -1.5px; height: 100%; border-radius: 3px; background: var(--accent);
  transform-origin: 50% 0; transform: scaleY(0); }
.progress-dot { position: absolute; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; border: 0; background: none; cursor: pointer; }
.progress-dot::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); transition: transform 0.2s, background 0.2s; }
.progress-dot.passed::before { background: var(--accent); }
.progress-dot.current::before { transform: scale(1.35); }
.progress-dot:hover::before, .progress-dot:focus-visible::before { transform: scale(1.5); }
.progress-dot:focus-visible { outline: none; }
/* the section's name, to the left of the dot, on hover or keyboard focus */
.progress-dot span { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
  background: var(--card); color: var(--ink); font: 700 0.8rem "Nunito", system-ui, sans-serif; padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); opacity: 0; transition: opacity 0.15s; }
.progress-dot:hover span, .progress-dot:focus-visible span { opacity: 1; }
@media (max-width: 640px) { .progress { right: 6px; height: 46vh; width: 16px; } .progress-dot { width: 16px; height: 16px; margin: -8px 0 0 -8px; } .progress-dot::before { inset: 4px; } }
@media (prefers-reduced-motion: reduce) { .progress-dot::before { transition: none; } }
.progress-debug { position: fixed; z-index: 95; right: 50px; bottom: 12px; background: rgba(20, 24, 30, 0.85); color: #fff;
  font: 600 0.85rem ui-monospace, Menlo, monospace; padding: 6px 12px; border-radius: 8px; pointer-events: none; }

/* ----- Footer (every page; built by common.js): newsletter signup + links ----- */
.site-footer { position: relative; z-index: 2; background: var(--footer-bg); color: var(--footer-ink); padding: 56px 16px 28px; }
.sf-wrap { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
.sf-news-title { font-family: "Love Ya Like A Sister", cursive; font-weight: 400; font-size: clamp(26px, 3.2vw, 34px); margin: 0 0 8px; color: var(--footer-ink); }
.sf-news-text { margin: 0 0 16px; color: var(--footer-muted); max-width: 46ch; }
.sf-news-row { display: flex; gap: 8px; max-width: 460px; }
.sf-news-row input { flex: 1; min-width: 0; font: inherit; padding: 12px 18px; border-radius: 999px; border: 2px solid var(--footer-muted); background: transparent; color: var(--footer-ink); }
.sf-news-row input::placeholder { color: var(--footer-muted); }
.sf-news-row input:focus { outline: none; border-color: var(--footer-ink); }
.sf-news-row button { font: inherit; font-weight: 800; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer; background: var(--footer-ink); color: var(--footer-bg); }
.sf-news-row button:disabled { opacity: 0.6; cursor: default; }
.sf-hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.sf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sf-news-status { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; }
.sf-news-consent { margin: 4px 0 0; font-size: 13px; color: var(--footer-muted); }
.site-footer a { color: var(--footer-ink); }
.sf-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sf-links h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--footer-muted); margin: 6px 0 12px; }
.sf-links a { display: block; text-decoration: none; padding: 4px 0; font-weight: 700; }
.sf-links a:hover, .sf-news-consent a:hover { text-decoration: underline; }
.sf-copy { max-width: 1040px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--footer-muted); font-size: 13px; color: var(--footer-muted); }
@media (max-width: 760px) {
  .site-footer { padding: 44px 16px 24px; }
  .sf-wrap { grid-template-columns: 1fr; gap: 36px; }
  .sf-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.progress { transition: opacity 0.25s; }
.progress.progress-away { opacity: 0; pointer-events: none; }

/* ----- Accessibility page (accessibility/it/ and /en/; text in accessibility.js) ----- */
.a-hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); }
.a-hero-grid h1 { margin-top: 4px; }
.t-hero p.a-intro { max-width: 52ch; font-size: clamp(1.02rem, 2.4vw, 1.18rem); }
.a-switch { margin: 0 !important; font-size: 0.95rem !important; }
.a-switch a { color: var(--accent); font-weight: 800; }
.a-device { max-width: 250px; }
.a-shot { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18)); }
.a-block { color: var(--ink); } /* re-read --ink inside each band (Sera's light bands redefine it) */
.a-block .t-cards.a-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.a-block .t-card h3 + p::first-letter { text-transform: uppercase; } /* "Term: text" → the text starts a sentence */
.a-text { max-width: 66ch; margin: 0 0 14px; font-size: 1.08rem; line-height: 1.6; }
.a-text a, .a-block .t-card a { color: var(--accent); font-weight: 800; }
.a-block h2 + .a-text { margin-top: 14px; }
.a-block h2 + .t-cards { margin-top: 22px; }
.a-block .t-card p.a-solo { color: var(--ink); }
.a-block .t-card strong { color: var(--ink); }
.a-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.a-pair .t-section h2, .a-pair h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
.a-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 18px 0 0; max-width: 900px; }
.a-keys div { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; padding: 12px 16px; box-shadow: 0 6px 16px rgba(35, 48, 61, 0.08); }
.a-keys dt, .a-keys dd { margin: 0; }
.a-keys kbd { display: inline-block; min-width: 2.6em; text-align: center; font: 800 1rem "Nunito", system-ui, sans-serif; color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, var(--card)); border: 1.5px solid var(--unread); border-bottom-width: 3px; border-radius: 8px; padding: 4px 8px; }
@media (max-width: 760px) {
  .a-hero-grid { grid-template-columns: 1fr; }
  .a-device { max-width: 180px; }
  .a-pair { grid-template-columns: 1fr; gap: 40px; }
  .a-block .t-cards.a-two { grid-template-columns: 1fr; }
}

/* ----- Text pages: privacy, contact, 404 (a short hero on the landscape, then the text in one column) ----- */
.doc-hero-text { position: relative; z-index: 1; padding-bottom: 190px; }
.doc-hero-text h1 { margin-top: 4px; }
@media (max-width: 760px) { .doc-hero-text { padding-bottom: 110px; } }
.doc { max-width: 70ch; color: var(--ink); }
.doc p { margin: 0 0 1em; font-size: 1.06rem; line-height: 1.65; }
.t-section .doc h2 { display: block; margin: 1.8em 0 0.4em; font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.2; }
.t-section .doc h2:first-child { margin-top: 0; }
.doc a { color: var(--accent); font-weight: 800; }
.doc-form { max-width: 640px; }
.t-form { color: var(--ink); } /* re-read --ink inside the card (Sera's light bands redefine it) */
.cover[data-on-pile="1"] { cursor: pointer; } /* a tap on the pile deals the whole grid (sections.js) */

/* ----- CookieScript banner and cookie button (injected by cdn.cookie-script.com, see common.js), restyled to the site:
   the footer's colours (set in every palette), Nunito, pill buttons like the newsletter's. Its own CSS uses ID
   selectors, hence !important. ----- */
#cookiescript_injected {
  left: 16px !important; right: 16px !important; bottom: 16px !important; width: auto !important; max-width: 820px !important; margin: 0 auto !important;
  background: var(--footer-bg) !important; color: var(--footer-ink) !important; border-radius: var(--radius) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28) !important; padding: 18px 22px 12px !important; box-sizing: border-box !important;
}
#cookiescript_injected, #cookiescript_injected *, #cookiescript_badge, #cookiescript_badge * { font-family: "Nunito", system-ui, sans-serif !important; }
#cookiescript_injected #cookiescript_description, #cookiescript_injected #cookiescript_description span { color: var(--footer-ink) !important; font-size: 14px !important; line-height: 1.5 !important; }
#cookiescript_injected a, #cookiescript_injected #cookiescript_readmore { color: var(--footer-ink) !important; font-weight: 700 !important; text-decoration: underline !important; }
#cookiescript_injected #cookiescript_close { color: var(--footer-muted) !important; font-size: 26px !important; top: 8px !important; right: 12px !important; }
#cookiescript_injected #cookiescript_close:hover { color: var(--footer-ink) !important; }
#cookiescript_injected #cookiescript_buttons { gap: 8px !important; }
#cookiescript_injected #cookiescript_accept, #cookiescript_injected #cookiescript_reject, #cookiescript_injected #cookiescript_save {
  border-radius: 999px !important; font-weight: 800 !important; font-size: 14px !important; letter-spacing: 0 !important; text-transform: none !important;
  padding: 10px 22px !important; min-width: 150px !important; height: auto !important; line-height: 1.3 !important; box-sizing: border-box !important; transition: opacity 0.15s !important; }
#cookiescript_injected #cookiescript_accept, #cookiescript_injected #cookiescript_save { background: var(--footer-ink) !important; color: var(--footer-bg) !important; border: 2px solid var(--footer-ink) !important; }
#cookiescript_injected #cookiescript_reject { background: transparent !important; color: var(--footer-ink) !important; border: 2px solid var(--footer-muted) !important; }
#cookiescript_injected #cookiescript_accept:hover, #cookiescript_injected #cookiescript_save:hover, #cookiescript_injected #cookiescript_reject:hover { opacity: 0.85 !important; }
#cookiescript_injected .cookiescript_checkbox_text, #cookiescript_injected #cookiescript_manage, #cookiescript_injected #cookiescript_manage span {
  color: var(--footer-ink) !important; font-size: 13px !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; }
#cookiescript_injected #cookiescript_manageicon path, #cookiescript_injected #cookiescript_manageicon .cookiescript_gear { fill: var(--footer-ink) !important; }
#cookiescript_injected .mdc-checkbox__background { border-color: var(--footer-ink) !important; border-radius: 4px !important; }
#cookiescript_injected .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background { background: var(--footer-ink) !important; border-color: var(--footer-ink) !important; }
#cookiescript_injected .mdc-checkbox__checkmark-path { stroke: var(--footer-bg) !important; }
#cookiescript_injected #cookiescript_copyright, #cookiescript_injected #cookiescript_copyright a { color: var(--footer-muted) !important; font-size: 10px !important; font-weight: 400 !important; text-decoration: none !important; }
/* the details (cookie list), opened with "Mostra dettagli" */
#cookiescript_injected #cookiescript_cookietablewrap, #cookiescript_injected #cookiescript_cookietablewrap * { color: var(--footer-ink) !important; background-color: transparent !important; border-color: var(--footer-muted) !important; }
#cookiescript_injected #cookiescript_cookietablewrap .cookiescript_active, #cookiescript_injected #cookiescript_cookietablewrap [class*="cookiescript_active"] { background-color: color-mix(in srgb, var(--footer-ink) 14%, transparent) !important; }
#cookiescript_injected #cookiescript_cookietablewrap table th { color: var(--footer-muted) !important; }
@media (max-width: 760px) {
  #cookiescript_injected { left: 8px !important; right: 8px !important; bottom: 8px !important; padding: 16px 16px 10px !important; }
  #cookiescript_injected #cookiescript_accept, #cookiescript_injected #cookiescript_reject, #cookiescript_injected #cookiescript_save { min-width: 0 !important; flex: 1 !important; }
}
/* the round cookie button that reopens the settings */
#cookiescript_badge { background: var(--footer-bg) !important; color: var(--footer-ink) !important; border-radius: 999px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22) !important; left: 14px !important; bottom: 14px !important; }
#cookiescript_badge #cookiescript_badgesvg .cookiescriptlogo, #cookiescript_badge #cookiescript_badgesvg path, #cookiescript_badge #cookiescript_badgesvg circle { fill: var(--footer-ink) !important; }
#cookiescript_badge #cookiescript_badgetext { color: var(--footer-ink) !important; font-weight: 700 !important; font-size: 13px !important; text-transform: none !important; letter-spacing: 0 !important; }
/* the details panel ("Mostra dettagli"): a card in the site's light colours (dark in Sera, like its other cards) */
#cookiescript_injected_fsd, #cookiescript_injected_fsd * { font-family: "Nunito", system-ui, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; }
#cookiescript_injected_fsd #cookiescript_fsd_wrapper { background: var(--card) !important; color: var(--ink) !important; border-radius: var(--radius) !important; overflow: hidden !important; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3) !important; }
#cookiescript_injected_fsd .cookiescript_fsd_header, #cookiescript_injected_fsd .cookiescript_fsd_main, #cookiescript_injected_fsd .cookiescript_fsd_footer { background: var(--card) !important; color: var(--ink) !important; border-color: var(--unread) !important; }
#cookiescript_injected_fsd .cookiescript_fsd_tabs_content, #cookiescript_injected_fsd .cookiescript_fsd_tabs > div.cookiescript_active { background: color-mix(in srgb, var(--ink) 6%, var(--card)) !important; }
#cookiescript_injected_fsd .cookiescript_fsd_tabs > div { background: var(--card) !important; color: var(--muted) !important; font-weight: 700 !important; border-color: var(--unread) !important; }
#cookiescript_injected_fsd .cookiescript_fsd_tabs > div.cookiescript_active { color: var(--accent) !important; }
#cookiescript_injected_fsd .cookiescript_fsd_title { color: var(--ink) !important; font-weight: 800 !important; }
#cookiescript_injected_fsd div, #cookiescript_injected_fsd span, #cookiescript_injected_fsd td, #cookiescript_injected_fsd th, #cookiescript_injected_fsd label { color: var(--ink) !important; border-color: var(--unread) !important; }
#cookiescript_injected_fsd a, #cookiescript_injected_fsd .cookiescript_fsd_cookies_control, #cookiescript_injected_fsd .cookiescript_fsd_cookies_control * { color: var(--accent) !important; font-weight: 700 !important; }
#cookiescript_injected_fsd #cookiescript_close { color: var(--muted) !important; }
#cookiescript_injected_fsd #cookiescript_buttons { gap: 8px !important; }
#cookiescript_injected_fsd #cookiescript_accept, #cookiescript_injected_fsd #cookiescript_reject, #cookiescript_injected_fsd #cookiescript_save {
  border-radius: 999px !important; font-weight: 800 !important; font-size: 14px !important; height: auto !important; line-height: 1.3 !important; padding: 10px 22px !important; box-sizing: border-box !important; }
#cookiescript_injected_fsd #cookiescript_accept, #cookiescript_injected_fsd #cookiescript_reject { background: transparent !important; color: var(--accent) !important; border: 2px solid var(--accent) !important; }
#cookiescript_injected_fsd #cookiescript_save { background: var(--action) !important; color: var(--on-action) !important; border: 2px solid var(--action) !important; }
#cookiescript_injected_fsd .mdc-checkbox__background { border-color: var(--accent) !important; border-radius: 4px !important; }
#cookiescript_injected_fsd .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background { background: var(--accent) !important; border-color: var(--accent) !important; }
#cookiescript_injected_fsd .mdc-checkbox__checkmark-path { stroke: var(--on-accent) !important; }
