/* Kaleidos Blog — static edition */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #1b2130;
  --muted: #5d6679;
  --border: #e1e5ef;
  --accent: #3f5fe0;
  --accent-2: #d93a50;
  --accent-soft: #e7ecff;
  --header: #1c2230;
  --header-text: #e9edf7;
  --code-bg: #f3f5fa;
  --shadow: 0 1px 2px rgba(20, 28, 48, .06), 0 6px 20px rgba(20, 28, 48, .06);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161f; --surface: #1a1f2b; --surface-2: #222838; --text: #e6e9f2; --muted: #9aa3b8;
    --border: #2c3344; --accent: #8aa2ff; --accent-2: #ff7a8c; --accent-soft: #252e4a;
    --header: #0d1017; --code-bg: #161a24; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161f; --surface: #1a1f2b; --surface-2: #222838; --text: #e6e9f2; --muted: #9aa3b8;
  --border: #2c3344; --accent: #8aa2ff; --accent-2: #ff7a8c; --accent-soft: #252e4a;
  --header: #0d1017; --code-bg: #161a24; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 99; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--header) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  color: var(--header-text); border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 1.25rem; letter-spacing: .01em; font-weight: 300; white-space: nowrap; }
.brand b { font-weight: 700; }
.brand .mark { flex: none; }
.main-nav { display: flex; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap; }
.main-nav a { color: #c5cce0; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .94rem; white-space: nowrap; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.main-nav a.active { color: #fff; background: rgba(109,140,255,.22); }
.header-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0;
  background: transparent; color: #c5cce0; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.lang-btn { color: #c5cce0; text-decoration: none; font-weight: 600; font-size: .85rem; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 5px 8px; margin-left: 4px; }
.lang-btn:hover { color: #fff; border-color: rgba(255,255,255,.45); }
.menu-btn { display: none; }

@media (max-width: 1120px) {
  .menu-btn { display: inline-grid; }
  .main-nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--header); border-bottom: 1px solid rgba(255,255,255,.08); display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; border-radius: 10px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; color: #eef1fa; padding: 64px 0 56px; margin-bottom: 8px; overflow: hidden;
  background:
    radial-gradient(600px 300px at 12% 10%, rgba(109,140,255,.35), transparent 60%),
    radial-gradient(500px 280px at 92% 90%, rgba(226,71,91,.28), transparent 60%),
    linear-gradient(135deg, #1c2230, #2a3346);
}
.hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 600; max-width: 820px; margin: 6px 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: #aab6ff; margin: 0; font-weight: 600; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search input {
  flex: 1; min-width: 0; font: inherit; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); outline: none;
}
.hero .hero-search input { border-color: transparent; }
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .88rem;
  text-decoration: none; background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.chip small { color: var(--muted); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.hero .chip { background: rgba(255,255,255,.08); color: #e6eaf6; border-color: rgba(255,255,255,.14); }
.hero .chip:hover { background: rgba(255,255,255,.16); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 11px 18px; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #fff;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- blocks & cards ---------- */
.block { margin: 40px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 1.45rem; }
.block-head a { text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.block-desc { margin: -8px 0 16px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
@media (max-width: 900px) { .featured { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,28,48,.08), 0 14px 30px rgba(20,28,48,.12); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-img { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { width: 100%; height: 100%; background: linear-gradient(135deg, #2a3346, #3f5fe0 60%, #d93a50); opacity: .55; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.card-body p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-big .card-img { aspect-ratio: 16 / 9; }
.card-big h3 { font-size: 1.45rem; }
.card-big .card-body { padding: 18px 20px 22px; }
.grid-2 .card-body p { -webkit-line-clamp: 2; }
.kicker { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.sec { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.sec-naturalstyle, .sec-dieta-mediterranea { color: #2f9e6e; }
.sec-guida-tv, .sec-app-review { color: var(--accent-2); }

.more-wrap { display: flex; justify-content: center; margin: 28px 0 8px; }

/* ---------- page heads ---------- */
.page-head { padding: 36px 0 20px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 6px 0 8px; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.notice {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 10px 14px; border-radius: 10px; font-size: .93rem;
}

/* ---------- post ---------- */
.post-head { padding: 36px 0 8px; }
.post-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin: 10px 0 12px; }
.post-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .93rem; }
.translation { margin-left: auto; font-weight: 600; text-decoration: none; background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

.prose { font-family: var(--serif); font-size: 1.13rem; line-height: 1.75; padding: 12px 0 8px; overflow-wrap: break-word; }
.prose > * { max-width: 100%; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--font); margin: 2em 0 .6em; }
.prose h2 { font-size: 1.5rem; } .prose h3 { font-size: 1.25rem; }
.prose p { margin: 0 0 1.15em; }
.prose img { display: block; margin: 1.5em auto; border-radius: 10px; max-height: 70vh; width: auto; }
.prose img.alignleft, .prose img.alignright { max-width: 50%; }
.prose a img { display: block; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.5em 0; padding: .4em 1.2em; border-left: 4px solid var(--accent); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: .95rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--border); padding: 8px 10px; }
.prose pre {
  font-family: var(--mono); font-size: .86rem; line-height: 1.55; background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 0; overflow-x: auto; margin: 1.4em 0; position: relative;
}
.prose pre code { display: block; padding: 16px 18px; background: transparent !important; white-space: pre; }
.prose :not(pre) > code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .1em .35em; border-radius: 5px; }
.copy-code {
  position: absolute; top: 8px; right: 8px; font: 600 .75rem var(--font); padding: 4px 9px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.prose pre:hover .copy-code, .copy-code:focus { opacity: 1; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.5em 0; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose iframe { max-width: 100%; }

.share { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 18px 0; border-top: 1px solid var(--border); margin-top: 24px; font-size: .93rem; }
.share span { color: var(--muted); }
.share a, .linklike { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font-weight: 600; }

/* ---------- comments ---------- */
.comments { margin: 28px 0 12px; }
.comments h2 { display: flex; align-items: center; gap: 10px; }
.count { font-size: .85rem; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 2px 10px; }
.comment-list, .replies { list-style: none; margin: 0; padding: 0; }
.comment-list > .comment { margin: 18px 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.comment { display: flex; gap: 12px; }
.c-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
.by-author > .c-avatar { background: linear-gradient(135deg, #3f5fe0, #d93a50); color: #fff; }
.c-main { min-width: 0; flex: 1; }
.c-meta { font-size: .9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.c-meta time { color: var(--muted); font-size: .84rem; }
.badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 6px; }
.c-text { margin-top: 4px; overflow-wrap: anywhere; }
.c-text p { margin: .4em 0; }
.replies { margin-top: 12px; border-left: 2px solid var(--border); padding-left: 14px; }
.replies .comment { margin: 12px 0; }
.replies .c-avatar { width: 30px; height: 30px; font-size: .85rem; }

.related { margin-top: 16px; }

/* ---------- search ---------- */
.results { list-style: none; padding: 0; margin: 8px 0 40px; }
.results li { border-bottom: 1px solid var(--border); }
.results a { display: flex; gap: 14px; padding: 14px 4px; text-decoration: none; color: inherit; }
.results a:hover h3 { color: var(--accent); }
.results img, .results .ph { width: 112px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.results h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.results p { margin: 0; color: var(--muted); font-size: .9rem; }
.results mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; }
@media (max-width: 520px) { .results img, .results .ph { width: 80px; height: 56px; } }

/* ---------- tools ---------- */
.tool { font-family: var(--font); font-size: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 1.6em 0; box-shadow: var(--shadow); }
.tool textarea, .tool input[type=text], .tool input[type=number], .tool select {
  width: 100%; font: .9rem var(--mono); padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.tool textarea { min-height: 180px; resize: vertical; }
.tool .tool-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.tool label { font-size: .9rem; color: var(--muted); }
.tool .ok { color: #2f9e6e; font-weight: 600; }
.tool .err { color: var(--accent-2); font-weight: 600; white-space: pre-wrap; }
.tool .out { font-family: var(--mono); font-size: .82rem; background: var(--code-bg); border-radius: 10px; padding: 12px; overflow: auto; max-height: 360px; word-break: break-all; white-space: pre-wrap; }
.tool .note { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.json-tree { font-family: var(--mono); font-size: .85rem; line-height: 1.6; }
.json-tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--border); }
.json-tree .k { color: var(--accent); } .json-tree .s { color: #2f9e6e; } .json-tree .n { color: var(--accent-2); }

/* ---------- footer ---------- */
.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.brand-footer { color: var(--text); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.copyright { font-size: .85rem; margin-top: 18px; }

.static { padding: 36px 0; }
.static h1 { font-family: var(--font); font-size: 2.2rem; }
.notfound { text-align: center; padding: 64px 0; }
.notfound h1 { font-size: 5rem; margin: 0; background: linear-gradient(135deg, #3f5fe0, #d93a50); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound .hero-search { margin: 24px auto; }
.notfound .row { justify-content: center; }

@media (max-width: 600px) {
  .hero { padding: 40px 0 36px; }
  .prose { font-size: 1.06rem; }
  .translation { margin-left: 0; }
  .brand { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- mappa del sito ---------- */
.sitemap-page .page-head .chips { margin-top: 18px; }
.sm-sec { margin: 34px 0; scroll-margin-top: 80px; }
.sm-sec h2 { font-size: 1.35rem; margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sm-sec h2 a { color: var(--text); text-decoration: none; }
.sm-sec h2 a:hover { color: var(--accent); }
.sm-sec h2 small { font-size: .82rem; font-weight: 500; color: var(--muted); }
.sm-sec > .chips { margin: 0 0 14px; }
.sm-sec .chip { font-size: .82rem; }
.sm-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sm-list li { display: grid; grid-template-columns: 9.5em 1fr; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--border); align-items: baseline; }
.sm-list li:first-child { border-top: 0; }
.sm-list li:hover { background: var(--surface-2); }
.sm-list time { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sm-list a { color: var(--text); text-decoration: none; font-weight: 500; }
.sm-list a:hover { color: var(--accent); }
@media (max-width: 560px) {
  .sm-list li { grid-template-columns: 1fr; gap: 2px; }
}
