/* Primo Atto — design system condiviso */
:root {
  color-scheme: light;
  --ink: #181714;
  --body: #3d3a34;
  --muted: #6b665c;
  --muted-2: #8b8579;
  --paper: #f7f4ec;
  --surface: #fffcf6;
  --surface-2: #f1ece1;
  --surface-3: #e8e2d5;
  --line: #ded7ca;
  --line-strong: #c9c0b0;
  --accent: #9e2f25;
  --accent-strong: #7c211a;
  --accent-soft: #f3e3de;
  --green: #3d5a46;
  --green-soft: #e7ede3;
  --amber: #7a5312;
  --amber-soft: #f6ebd6;
  --danger: #9e2f25;
  --white: #fff;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(24, 23, 20, .04);
  --shadow-md: 0 1px 2px rgba(24, 23, 20, .04), 0 18px 44px -28px rgba(24, 23, 20, .38);
  --shadow-lg: 0 1px 2px rgba(24, 23, 20, .05), 0 28px 70px -34px rgba(24, 23, 20, .46);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --header-h: 72px;
  --page: 1280px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }
a { color: inherit; }
img, svg { max-width: 100%; }

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: transform .16s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Header condiviso */
.site-header,
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 236, .9);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}

.school-banner {
  width: min(100% - 48px, var(--page));
  margin: 34px auto 0;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 88% 10%, rgba(158, 47, 37, .1), transparent 35%),
    var(--surface-2);
}

.school-banner h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: -.035em;
}

.school-banner p:not(.section-kicker) {
  max-width: 720px;
  margin: 0;
  color: var(--body);
}

@media (max-width: 720px) {
  .school-banner {
    width: min(100% - 28px, var(--page));
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }
}

.header-inner {
  width: 100%;
  max-width: var(--page);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.top {
  min-height: var(--header-h);
  padding: 0 max(24px, calc((100vw - var(--page)) / 2 + 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.035em;
}

.brand-mark,
.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.mark { font-size: 29px; border-radius: 9px; }

.brand-word {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
}

.beta {
  margin-left: 2px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  font-family: var(--font-sans);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.nav-link {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.saved-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.saved-link:hover { background: var(--surface-2); color: var(--ink); }

.count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.top-note {
  color: var(--muted);
  font-size: 12px;
}

/* Menu mobile */
.mobile-menu { display: none; position: relative; }
.mobile-menu summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::before {
  content: "";
  width: 16px;
  height: 10px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 16px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 4.25px / 16px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 8.5px / 16px 1.5px no-repeat;
}
.mobile-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.mobile-menu-panel a,
.mobile-menu-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}
.mobile-menu-panel a:hover,
.mobile-menu-panel button:hover { background: var(--surface-2); color: var(--ink); }

/* Bottoni e link */
.btn,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.btn:hover,
.primary:hover { background: #2c2924; }
.btn:active,
.primary:active { transform: translateY(1px); }

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.btn-accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.text-button:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--filled {
  fill: currentColor;
  stroke: currentColor;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

/* Form */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--body);
  font-size: 13px;
  font-weight: 600;
}

.field-label,
.field > span:first-child {
  display: block;
}

.optional {
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.input,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}

textarea {
  min-height: 120px;
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
}

.input:hover,
input:hover,
select:hover,
textarea:hover { border-color: var(--muted-2); }

.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(158, 47, 37, .13);
}

input::placeholder,
textarea::placeholder { color: var(--muted); opacity: 1; }

.hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.error:empty { display: none; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(44px, 7vw, 88px) 0 clamp(28px, 4vw, 40px);
}

.hero-copy { min-width: 0; }

.hero-eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 10ch;
  margin: 22px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(50px, 7.2vw, 88px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .96;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.hero-lede {
  max-width: 55ch;
  margin: 26px 0 0;
  color: var(--body);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 620px;
  margin-top: 32px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(158, 47, 37, .12), var(--shadow-sm);
}

.hero-search-icon {
  position: absolute;
  left: 21px;
  color: var(--muted);
  pointer-events: none;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  height: 50px;
  padding: 0 12px 0 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
}
.hero-search input:focus { box-shadow: none; }

.hero-search .btn {
  height: 50px;
  padding: 0 24px;
  border-radius: 10px;
}

.hero-hints {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--body);
  font-size: 12px;
  font-weight: 500;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.chip:hover { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }

/* Pannello di fiducia */
.hero-panel {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
}

.hero-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}
.live-dot.is-warn { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.live-dot.is-off { background: var(--muted-2); box-shadow: 0 0 0 4px var(--surface-2); }

.hero-panel h2 {
  margin: 22px 0 8px;
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.hero-panel > p:not(.panel-foot) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
  overflow: hidden;
}
.hero-stat {
  min-width: 0;
  padding: 14px 12px;
  background: var(--paper);
}
.hero-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
}
.hero-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.trust-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.45;
}
.trust-list .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--green);
}
.trust-list strong { display: block; color: var(--ink); font-weight: 600; }

.panel-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* Barra dei principi */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.trust-item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.trust-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.trust-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Catalogo */
.catalog-section {
  padding-top: clamp(36px, 5vw, 56px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.section-head > div { min-width: 0; }
.section-head > p {
  max-width: 40ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.catalog-status {
  max-width: 78ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.catalog-status strong { color: var(--body); font-weight: 600; }

.section-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
  max-width: 360px;
  text-align: right;
}
.section-meta > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.section-meta .text-button { font-size: 12px; }

.workspace {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 26px;
}

/* Filtri */
.filters {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  min-width: 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.filter-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

@media (min-width: 901px) {
  .filter-panel {
    max-height: calc(100vh - var(--header-h) - 36px);
    max-height: calc(100dvh - var(--header-h) - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }
  .filter-panel::-webkit-scrollbar { width: 8px; }
  .filter-panel::-webkit-scrollbar-track { background: transparent; }
  .filter-panel::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border: 2px solid var(--surface);
    border-radius: 999px;
  }
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.filter-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.filter-head .text-button { font-size: 12px; }

.filter-group {
  margin: 0 0 20px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.filter-group:last-of-type { border-bottom: 0; }
.filter-group legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.filter-group .field { margin-bottom: 0; }
.filter-group .hint { margin-bottom: 10px; }

.range-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}
.mini-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.mini-field input { min-height: 40px; padding: 0 10px; }
.range-dash {
  padding-bottom: 11px;
  color: var(--muted-2);
  font-size: 12px;
}

.advanced-age {
  margin: -8px 0 20px;
  padding-bottom: 0;
}
.advanced-age summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  list-style-position: inside;
}
.advanced-age .field { margin-top: 12px; }

.field-grid {
  display: grid;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  color: var(--body);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}
.check-row input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.check-row strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.check-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.filter-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.filter-actions .btn { width: 100%; }
.filter-actions .load { min-height: 38px; font-size: 12px; }
.filter-actions .apply-filters { display: none; }

.filter-toggle { display: none; }

/* Risultati */
.results { min-width: 0; }

.results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.tabs .count { min-width: 19px; height: 19px; background: rgba(24, 23, 20, .06); }

.results-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.sort select {
  width: auto;
  min-height: 38px;
  max-width: 190px;
  padding: 0 30px 0 10px;
  border-color: var(--line);
  background: var(--surface);
  font-size: 12px;
}

.filter-open {
  display: none;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.filter-open[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

.results-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}
.results-summary h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.results-summary > span {
  color: var(--muted);
  font-size: 11px;
}

.results-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}
.active-filters:empty { display: none; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body);
  font-size: 11px;
  font-weight: 500;
}
.filter-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.filter-chip button:hover { background: var(--accent-soft); color: var(--accent); }

/* Dashboard salvati */
.saved-dashboard {
  margin: 20px 0 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.saved-dashboard[hidden] { display: none; }
.saved-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.saved-dashboard h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.saved-dashboard p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.saved-dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.saved-dashboard-actions .btn { min-height: 36px; font-size: 12px; }

/* Card */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--category { background: var(--surface-2); color: var(--body); }
.badge--role { background: transparent; border: 1px solid var(--line); color: var(--body); }
.badge--verified { background: var(--green-soft); color: var(--green); }
.badge--partial { background: var(--amber-soft); color: var(--amber); }
.badge--reviewed { background: var(--surface-2); color: var(--muted); }
.badge--warning { background: var(--amber-soft); color: var(--amber); }

.bookmark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.bookmark:hover { background: var(--surface-2); color: var(--ink); }
.bookmark[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: #d9b3a9;
  color: var(--accent);
}
.bookmark .icon { width: 17px; height: 17px; }

.card-project {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}
.card h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(27px, 2.4vw, 33px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.04;
}

.age {
  margin: 0 0 15px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.5;
}
.age strong { color: var(--ink); font-weight: 600; }
.age-meta { color: var(--muted); }

.card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 14px;
  margin: 0 0 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.4;
}
.fact .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--muted); }
.fact-label {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fact-value { display: block; overflow-wrap: anywhere; }
.fact-value.urgent { color: var(--accent); font-weight: 600; }
.fact-value.expired { color: var(--muted); text-decoration: line-through; }

.card-status {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.card-status .urgent { color: var(--accent); font-weight: 600; }
.card-status .expired { color: var(--muted); text-decoration: line-through; }
.card-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 11px;
  line-height: 1.45;
}
.card-warning .icon { width: 14px; height: 14px; margin-top: 1px; }

.card-source {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.card-source .icon { width: 14px; height: 14px; margin-top: 1px; }
.card-source strong { color: var(--body); font-weight: 600; }

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.details-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.details-button:hover { color: var(--accent); }
.details-button .icon { width: 14px; height: 14px; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-actions .text-button { font-size: 11px; }
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.source-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.source-link .icon { width: 12px; height: 12px; }

/* Skeleton, vuoto, errore */
.skeleton-card {
  min-height: 330px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.sk-line {
  height: 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: var(--surface-2);
  animation: sk-pulse 1.4s ease-in-out infinite;
}
.sk-line.short { width: 32%; }
.sk-line.medium { width: 58%; }
.sk-line.title { width: 76%; height: 28px; margin: 24px 0 18px; }
.sk-line.fact { width: 90%; height: 34px; }
.sk-line.footer { width: 45%; margin-top: 42px; }
@keyframes sk-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

.empty,
.catalog-error {
  grid-column: 1 / -1;
  padding: 56px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}
.empty h3,
.catalog-error h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.empty p,
.catalog-error p {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.empty .btn,
.catalog-error .btn { margin-top: 18px; }

/* Come funziona */
.how-section {
  margin-top: clamp(64px, 8vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.how-section .section-head { border-bottom: 0; padding-bottom: 0; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.how-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.how-number {
  display: block;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 32px;
  font-style: italic;
  line-height: 1;
}
.how-card h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.how-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: clamp(64px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, .7fr));
  gap: 40px;
  padding: 48px 0 36px;
}
.footer-brand-block p {
  max-width: 40ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.footer-col h2 {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col a,
.footer-col button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--body);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.footer-col a:hover,
.footer-col button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.footer-bottom p { max-width: 76ch; margin: 0; }
.footer-bottom span { flex: none; }

/* Dialogo dettaglio */
dialog { color: var(--ink); }

.detail-dialog {
  inset: 0 0 0 auto;
  width: min(680px, 100%);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.detail-dialog::backdrop {
  background: rgba(20, 19, 16, .45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.detail-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 236, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.detail-topbar .text-button { font-size: 12px; }
.detail-scroll {
  flex: 1;
  min-height: 0;
  padding: 26px 24px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detail-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.detail-project {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.detail-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
}
.detail-age {
  margin: 0 0 20px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.5;
}
.detail-age strong { color: var(--ink); font-weight: 600; }
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
  overflow: hidden;
}
.detail-fact {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
}
.detail-fact dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.detail-fact dd {
  margin: 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.detail-fact dd strong { color: var(--ink); font-weight: 600; }
.detail-fact dd .urgent { color: var(--accent); font-weight: 600; }
.detail-fact dd .expired { color: var(--muted); }

.detail-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.detail-section h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.detail-section p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.7;
}
.detail-section p + p { margin-top: 8px; }
.detail-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.detail-section li {
  position: relative;
  padding-left: 17px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}
.detail-section li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.detail-section a { color: var(--accent); text-underline-offset: 3px; }

.source-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.source-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.source-card-head strong { font-size: 13px; font-weight: 600; }
.source-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.source-card .badge { flex: none; }

.detail-note {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--body);
  font-size: 12px;
  line-height: 1.6;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(247, 244, 236, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.detail-actions .btn-primary { flex: 1; }
.detail-actions .icon-btn { width: 44px; height: 44px; border-radius: var(--r-sm); }

.source-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}
.source-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.55;
}
.source-list li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.source-list li a:hover { color: var(--accent); text-decoration: underline; }
.source-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.4;
  transform: translateX(-50%);
}
.toast[hidden] { display: none; }

/* Blog: header e navigazione condivisi anche con le pagine articolo */
.blog-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.blog-nav a {
  padding: 8px 11px;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.blog-nav a:hover,
.blog-nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }

/* Layout pagina */
#main,
.page-shell {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* Allineamenti blog e admin che usano il vecchio header `.top` */
.top .brand { flex: none; }

@media (max-width: 1100px) {
  .hero { gap: 40px; }
  .workspace { grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .card h3 { font-size: 32px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .site-nav { display: none; }
  .mobile-menu { display: block; }
  .header-inner { gap: 16px; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { max-width: 12ch; }
  .hero-panel { max-width: 620px; }
  .trust-strip { grid-template-columns: 1fr; gap: 14px; }
  .workspace { display: block; padding-top: 20px; }
  .filters {
    position: static;
    display: none;
    margin-bottom: 18px;
  }
  .filters.is-open { display: block; }
  .filter-panel { padding: 18px; }
  .filter-open { display: inline-flex; }
  .filter-actions .apply-filters { display: inline-flex; }
  .results-tools .sort { display: none; }
  .results-top { align-items: stretch; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; justify-content: center; }
  .results-tools { margin-left: 0; width: 100%; justify-content: space-between; }
  .results-tools .sort { display: flex; margin-left: auto; }
  .section-head { display: block; }
  .section-meta {
    align-items: flex-start;
    max-width: none;
    margin-top: 14px;
    text-align: left;
  }
  .how-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand-block { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .header-actions .btn { display: none; }
  .header-actions .saved-link { display: none; }
  .hero { padding-top: 38px; }
  .hero h1 { font-size: clamp(44px, 12vw, 62px); }
  .hero-lede { margin-top: 20px; }
  .hero-search { flex-wrap: wrap; padding: 6px; }
  .hero-search input { flex: 1 1 100%; padding-right: 14px; }
  .hero-search .btn { flex: 1 1 100%; }
  .hero-search-icon { top: 20px; }
  .hero-panel { padding: 22px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-stat { padding: 12px 9px; }
  .hero-stat strong { font-size: 26px; }
  .catalog-section .section-head > p { display: none; }
  .results-tools { flex-wrap: wrap; }
  .results-tools .sort { width: 100%; justify-content: space-between; }
  .sort select { max-width: none; flex: 1; }
  .results-summary { display: block; }
  .results-summary > span { display: block; margin-top: 4px; }
  .card { padding: 20px; }
  .card-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: 8px; }
  .detail-dialog { width: 100%; border-left: 0; }
  .detail-topbar { padding: 10px 18px; }
  .detail-scroll { padding: 22px 18px 28px; }
  .detail-actions { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-title { font-size: 38px; }
}

@media (max-width: 480px) {
  #main,
  .page-shell { padding: 0 18px; }
  .header-inner { padding: 0 18px; }
  .top { padding: 0 18px; }
  .brand-word { font-size: 22px; }
  .brand-mark { width: 31px; height: 31px; font-size: 21px; }
  .hero h1 { font-size: 44px; }
  .hero-panel { padding: 18px; border-radius: var(--r-lg); }
  .trust-item span { font-size: 11px; }
  .card h3 { font-size: 29px; }
  .card-bottom { align-items: flex-start; flex-direction: column; }
  .card-actions { width: 100%; justify-content: space-between; }
  .detail-actions .btn { padding: 0 12px; font-size: 12px; }
}

@media (max-width: 380px) {
  .card-facts { grid-template-columns: 1fr; }
  .detail-summary { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Schede casting indicizzabili e pagine informative */
.casting-main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 64px;
}
.casting-main > .breadcrumb {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.casting-main > .breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.casting-main > .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.casting-main > .breadcrumb span {
  margin: 0 7px;
  color: var(--muted-2);
}
.casting-main > .breadcrumb span[aria-current="page"] { margin-left: 0; }
.casting-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: end;
  padding: clamp(38px, 6vw, 68px) 0 34px;
  border-bottom: 1px solid var(--line);
}
.casting-header h1 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
}
.casting-deck {
  max-width: 64ch;
  margin: 18px 0 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
}
.casting-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.casting-source-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.casting-source-card strong {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}
.casting-source-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.casting-source-card .btn { width: 100%; }
.casting-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.casting-section > h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -.03em;
}
.casting-section-intro {
  max-width: 70ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.casting-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.casting-role {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.casting-role h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.casting-role-age {
  margin: 8px 0 18px;
  color: var(--body);
  font-size: 14px;
}
.casting-role dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.casting-role dt,
.casting-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.casting-role dd,
.casting-facts dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
.casting-role h4 {
  margin: 20px 0 8px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.casting-role ul {
  margin: 0;
  padding-left: 18px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.55;
}
.casting-role li + li { margin-top: 5px; }
.casting-role-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.casting-role-actions a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-underline-offset: 3px;
}
.casting-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}
.casting-facts > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.casting-callout {
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}
.casting-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.casting-related a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.2;
  text-decoration: none;
}
.casting-related a:hover { border-color: var(--line-strong); }
.casting-related span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.45;
}
.article-catalog-cta {
  margin: 36px 0 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.article-catalog-cta h2 {
  margin: 10px 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.article-catalog-cta p {
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}
.article-catalog-cta .btn { margin: 4px 8px 4px 0; }

@media (max-width: 760px) {
  .casting-main { width: min(100% - 36px, 1040px); }
  .casting-header { grid-template-columns: 1fr; gap: 22px; }
  .casting-roles,
  .casting-related { grid-template-columns: 1fr; }
  .casting-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .casting-role dl,
  .casting-facts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
  }
  .detail-actions .btn-primary {
    order: 1;
    grid-column: 1 / -1;
  }
  .detail-actions .btn-ghost {
    order: 2;
    min-width: 0;
  }
  .detail-actions .icon-btn { order: 3; }
}
