:root {
  color-scheme: light;
  --navy: #144573;
  --navy-deep: #103657;
  --orange: #f58220;
  --ink: #20384a;
  --muted: #627381;
  --paper: #ffffff;
  --canvas: #f1f5f6;
  --line: #e1e8eb;
  --line-strong: #ccd7dd;
  --blue-soft: #edf4f8;
  --orange-soft: #fff4e9;
  --green-soft: #eaf3ef;
  --shadow: 0 8px 26px rgba(24, 54, 74, 0.07);
  --font-sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select, input[type="checkbox"] { accent-color: var(--navy); }
button { color: inherit; }
a { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 4px;
  color: #fff;
  background: var(--navy);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  width: min(1480px, 100%);
  min-height: 84px;
  align-items: center;
  gap: 32px;
  margin: 0 auto;
  padding: 11px 28px;
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 20px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 40vw;
  height: auto;
  object-fit: contain;
}

.brand-divider {
  align-self: stretch;
  width: 1px;
  min-height: 39px;
  background: var(--line);
}

.product-lockup {
  display: grid;
  gap: 1px;
  white-space: nowrap;
}

.product-kicker, .eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.product-lockup strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.3;
}

.primary-nav {
  display: flex;
  height: 100%;
  align-self: stretch;
  align-items: stretch;
  margin-left: 15px;
}

.primary-nav a {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  padding: 0 15px;
  border-bottom: 3px solid var(--orange);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

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

.demo-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid #f4d2b2;
  border-radius: 3px;
  color: #805022;
  background: var(--orange-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.read-only-label {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.page-shell {
  width: min(1424px, 100%);
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 34px 28px 52px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.heading-copy { max-width: 780px; }
.page-heading .eyebrow { margin: 0 0 7px; color: #a85b1a; }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.page-intro {
  max-width: 74ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.heading-mark {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .09em;
}

.heading-mark-divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.demo-banner {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(24, 54, 74, .035);
}

.banner-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.demo-banner strong {
  display: block;
  margin-bottom: 1px;
  color: var(--navy);
  font-size: 12px;
}

.demo-banner p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.app-state {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.sample-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, .9fr) minmax(130px, .6fr);
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.summary-item {
  display: grid;
  min-width: 0;
  gap: 3px;
  align-content: center;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}
.summary-item:last-child { border-right: 0; }

.summary-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.summary-item strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
}

.summary-count strong { font-size: 19px; line-height: 1.15; }

.workspace {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}

.filter-panel, .results-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.filter-panel {
  display: block;
  padding: 0;
}

.filter-panel details { min-width: 0; }

.filter-disclosure-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-radius: 5px;
  cursor: pointer;
  list-style: none;
}

.filter-disclosure-summary::-webkit-details-marker { display: none; }
#filter-disclosure[open] > .filter-disclosure-summary { border-bottom: 1px solid var(--line); }
.filter-summary-copy { display: grid; min-width: 0; gap: 3px; }
.filter-summary-copy .eyebrow { margin: 0; }
.filter-summary-title {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.filter-summary-description { color: var(--muted); font-size: 10px; }
.filter-disclosure-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.filter-disclosure-action::before { content: "⌄"; color: var(--orange); font-size: 15px; }
.filter-disclosure-action::after { content: "Apri"; }
#filter-disclosure[open] .filter-disclosure-action::before { transform: rotate(180deg); }
#filter-disclosure[open] .filter-disclosure-action::after { content: "Chiudi"; }

.filter-content {
  display: grid;
  gap: 21px;
  min-width: 0;
  padding: 20px;
}

.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.filter-toolbar-label { color: var(--muted); font-size: 10px; font-weight: 650; }

.filter-heading, .results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-heading .eyebrow, .results-heading .eyebrow { margin-bottom: 4px; }
.filter-heading h2, .results-heading h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.text-button {
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 3px;
  color: var(--navy);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-button:hover { background: var(--blue-soft); }

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field > label, .filter-group legend {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.field input, .field select {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.field input::placeholder { color: #687b88; opacity: 1; }
.field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.filter-group {
  display: grid;
  gap: 11px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.filter-group legend { margin-bottom: 1px; padding: 0; }

.check-row {
  display: grid;
  grid-template-columns: 18px 37px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--ink);
  font-size: 11px;
  cursor: pointer;
}

.check-row input { width: 17px; height: 17px; margin: 0; }
.category-key {
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}

.field-note {
  margin: 0;
  padding: 9px 10px;
  border-left: 2px solid var(--orange);
  color: var(--muted);
  background: var(--orange-soft);
  font-size: 10px;
  line-height: 1.5;
}

.filter-footnote {
  display: flex;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footnote-rule {
  width: 3px;
  flex: 0 0 3px;
  border-radius: 2px;
  background: var(--orange);
}

.filter-footnote p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.filter-footnote code {
  color: var(--navy);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
}

.results-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.results-heading { align-items: end; }
.results-heading h2 { font-size: 21px; }

.results-count {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.category-caveat {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dce6ec;
  border-radius: 3px;
  color: #425b6d;
  background: var(--blue-soft);
  font-size: 11px;
  line-height: 1.5;
}

.results-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.notice-card {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 17px 18px 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(24, 54, 74, .025);
}

.notice-card:hover {
  border-color: #c8d6de;
  box-shadow: var(--shadow);
}

.card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.category-pill, .evidence-pill, .status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
}

.category-pill {
  color: #fff;
  background: var(--navy);
  letter-spacing: .07em;
}

.evidence-pill { color: #805022; background: var(--orange-soft); }
.evidence-pill.is-explicit { color: #355d4d; background: var(--green-soft); }
.evidence-pill.is-unavailable { color: #5c6a73; background: #eef1f2; }

.notice-card h3 {
  margin: -3px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card-field {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.card-field-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.card-field-value {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.location-values {
  display: grid;
  gap: 6px;
  margin-top: 3px;
}

.location-part {
  display: grid;
  gap: 1px;
}

.location-part > span,
.location-source > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.location-part > strong,
.location-source > strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.location-source {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding: 7px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  background: #fbfcfc;
}

.location-note {
  display: flex;
  margin-top: 6px;
  gap: 7px;
  align-items: start;
  padding: 8px 10px;
  border-left: 2px solid var(--orange);
  color: #68451f;
  background: #fff8f0;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}

.location-note.is-verified {
  border-left-color: var(--navy);
  color: var(--navy);
  background: var(--blue-soft);
}

.location-note-icon { flex: 0 0 auto; font-weight: 850; }

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
}

.status-pill { color: #385366; background: #edf2f5; }
.status-context { color: var(--muted); font-size: 10px; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-capture { color: var(--muted); font-size: 10px; }
.card-action-group { display: flex; flex-wrap: wrap; gap: 8px; }

.detail-button, .source-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--navy);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.detail-button:hover, .source-link:hover {
  border-color: var(--orange);
  background: #fffaf5;
}

.detail-button::after { content: "→"; color: var(--orange); font-size: 13px; }
.source-link::after { content: "↗"; color: var(--orange); font-size: 12px; }
.source-unavailable { color: var(--muted); font-size: 10px; }

.empty-state {
  display: grid;
  min-height: 230px;
  align-content: center;
  justify-items: center;
  padding: 30px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  text-align: center;
  background: #fcfdfd;
}

.empty-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
}

.empty-state h3 {
  max-width: 45ch;
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.empty-state p {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.results-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.notice-dialog {
  width: min(700px, calc(100vw - 28px));
  max-height: min(84vh, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 18px 70px rgba(12, 33, 48, .25);
}

.notice-dialog::backdrop { background: rgba(12, 33, 48, .52); }

.dialog-inner {
  display: grid;
  gap: 17px;
  padding: 24px;
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-heading h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.close-dialog {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--navy);
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}

.close-dialog:hover { border-color: var(--orange); background: var(--orange-soft); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  border-top: 1px solid var(--line);
}

.detail-field {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-field .card-field-value { font-size: 12px; }

.detail-disclaimer {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--orange);
  color: #604521;
  background: var(--orange-soft);
  font-size: 11px;
  line-height: 1.55;
}

.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  width: min(1424px, 100%);
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto;
  padding: 12px 28px;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 960px) {
  .header-inner { gap: 18px; padding-right: 20px; padding-left: 20px; }
  .primary-nav { margin-left: 0; }
  .page-shell { padding-right: 20px; padding-left: 20px; }
  .workspace { grid-template-columns: minmax(225px, 270px) minmax(0, 1fr); gap: 14px; }
  .filter-panel { padding: 0; }
  .filter-content, .results-panel { padding: 16px; }
  .sample-summary { grid-template-columns: minmax(180px, 1.3fr) minmax(150px, .9fr) minmax(110px, .55fr); }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 78px;
    flex-wrap: wrap;
    gap: 5px 16px;
    padding: 10px 17px;
  }
  .brand-lockup { gap: 12px; }
  .brand-logo { width: 158px; max-width: 43vw; }
  .brand-divider { min-height: 32px; }
  .product-kicker { font-size: 8px; }
  .product-lockup strong { font-size: 15px; }
  .primary-nav { order: 3; width: 100%; height: 37px; }
  .primary-nav a { min-height: 37px; padding: 0 9px; font-size: 11px; }
  .header-status { gap: 6px; }
  .read-only-label { max-width: 105px; font-size: 9px; line-height: 1.3; white-space: normal; }
  .demo-chip { min-height: 25px; padding: 3px 7px; font-size: 9px; }
  .page-shell { min-height: auto; padding: 25px 16px 38px; }
  .page-heading { align-items: start; gap: 13px; margin-bottom: 17px; }
  .heading-mark { gap: 8px; padding: 9px 10px; font-size: 11px; }
  h1 { font-size: clamp(26px, 7vw, 34px); }
  .page-intro { font-size: 12px; }
  .demo-banner { flex-wrap: wrap; align-items: start; }
  .demo-banner > div { flex: 1 1 calc(100% - 45px); }
  .app-state { flex: 0 1 100%; min-width: 0; margin-left: 0; padding-left: 37px; text-align: left; }
  .sample-summary { grid-template-columns: minmax(0, 1fr) minmax(94px, .55fr); }
  .summary-description { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-item { padding: 11px 13px; }
  .summary-count { border-right: 0; }
  .summary-count strong { font-size: 17px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .filter-disclosure-summary { padding: 15px; }
  .filter-content { gap: 17px; padding: 15px; }
  .filter-group { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .filter-group legend, .field-note { grid-column: 1 / -1; }
  .check-row { grid-template-columns: 18px 34px minmax(0, 1fr); font-size: 10px; }
  .results-panel { gap: 12px; padding: 14px; }
  .results-heading h2 { font-size: 17px; }
  .results-count { max-width: 130px; font-size: 10px; }
  .notice-card { gap: 11px; padding: 14px; }
  .notice-card h3 { font-size: 14px; }
  .card-fields { gap: 9px 13px; }
  .card-actions { align-items: start; }
  .source-capture { flex-basis: 100%; }
  .footer-inner { flex-direction: column; align-items: start; padding: 12px 16px; }
}

@media (max-width: 420px) {
  .heading-mark { flex-direction: column; gap: 5px; align-self: start; padding: 7px 9px; }
  .heading-mark-divider { width: 18px; height: 1px; }
  .header-status { margin-left: 0; }
  .card-fields, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .card-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .card-action-group { width: 100%; }
  .card-action-group > * { flex: 1 1 auto; }
  .dialog-inner { padding: 18px; }
  .dialog-heading h2 { font-size: 18px; }
}

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