:root {
  color-scheme: dark;
  --ink: #e9f7ff;
  --muted: #93adbd;
  --faint: #597587;
  --ground: #04101f;
  --ground-deep: #020914;
  --panel: rgba(7, 25, 41, .78);
  --panel-strong: rgba(8, 31, 51, .92);
  --line: rgba(145, 221, 255, .16);
  --line-strong: rgba(145, 221, 255, .34);
  --cyan: #72ddff;
  --blue: #56a7ff;
  --violet: #a88cff;
  --amber: #ffc75e;
  --good: #80f1c0;
  --warn: #ffd68a;
  --danger: #ff9b9b;
  --shadow: 0 26px 72px rgba(0, 0, 0, .32);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ground-deep); scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: radial-gradient(circle at 50% 0%, #09294a 0, #041522 30%, var(--ground-deep) 75%); color: var(--ink); font: 16px/1.5 Arial, Helvetica, sans-serif; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.shell { width: min(1160px, calc(100% - 46px)); margin: 0 auto; }
#signal-field { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .92; }
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 14% 14%, rgba(34, 175, 255, .18), transparent 30%), radial-gradient(circle at 84% 18%, rgba(154, 100, 255, .14), transparent 29%), radial-gradient(circle at 52% 78%, rgba(19, 218, 205, .06), transparent 34%); }
.grain { pointer-events: none; position: fixed; inset: 0; z-index: 1; opacity: .22; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.20'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.site-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: 121px; height: auto; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(72, 204, 255, .18)); }
.header-status { display: inline-flex; align-items: center; gap: 8px; color: #9eb8c8; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.header-method { color: #d9f6ff; }
.status-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--good); box-shadow: 0 0 0 5px rgba(128, 241, 192, .09), 0 0 18px rgba(128, 241, 192, .85); }
.hero { position: relative; z-index: 2; padding: clamp(70px, 11vw, 145px) 0 78px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #91bdd1; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow span { display: block; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); }
.eyebrow span:last-child { background: linear-gradient(90deg, var(--cyan), transparent); }
.eyebrow i { color: var(--amber); font-style: normal; }
h1 { max-width: 930px; margin: 20px auto 18px; font-size: clamp(40px, 6.3vw, 77px); font-weight: 400; letter-spacing: -.058em; line-height: .97; text-wrap: balance; }
h1 em { color: transparent; font-style: normal; background: linear-gradient(90deg, #a8ecff 4%, #a98bff 48%, #ffd77b 96%); -webkit-background-clip: text; background-clip: text; }
.hero-copy { max-width: 730px; margin: 0 auto; color: #a8bfcc; font-size: clamp(15px, 1.65vw, 18px); text-wrap: pretty; }
.search-console { max-width: 870px; margin: 42px auto 0; text-align: left; }
.search-box { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 74px; padding: 8px 9px 8px 20px; border: 1px solid rgba(148, 226, 255, .30); border-radius: 18px; background: linear-gradient(115deg, rgba(5, 31, 51, .90), rgba(7, 25, 42, .80)); box-shadow: 0 17px 45px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(218, 250, 255, .08); transition: border .18s ease, transform .18s ease, box-shadow .18s ease; }
.search-box:focus-within { border-color: rgba(115, 222, 255, .76); transform: translateY(-2px); box-shadow: 0 24px 55px rgba(0, 0, 0, .30), 0 0 0 4px rgba(86, 167, 255, .09); }
.search-icon { position: relative; width: 18px; height: 18px; border: 1.8px solid var(--cyan); border-radius: 50%; opacity: .9; }
.search-icon::after { content: ''; position: absolute; width: 8px; height: 1.8px; right: -6px; bottom: -3px; transform: rotate(48deg); background: var(--cyan); border-radius: 2px; }
#query { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
#query::placeholder { color: #7e9aac; }
#query[aria-invalid='true'] { color: #ffb0b0; }
.counter { color: #6e90a5; font-size: 11px; white-space: nowrap; }
.search-submit { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #ffe3a1, var(--amber)); color: #18202a; font-weight: 700; box-shadow: 0 9px 23px rgba(255, 191, 75, .17); transition: transform .15s ease, filter .15s ease; }
.search-submit b { font-size: 20px; line-height: 1; }
.search-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.search-submit:disabled { cursor: wait; opacity: .72; }
.search-subline { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 4px 0; color: #86a3b5; font-size: 12px; }
.depth-toggle { padding: 0; border: 0; background: transparent; color: #beeaff; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.depth-toggle[aria-pressed='true'] { color: var(--amber); }
.mode-lead { margin: 39px 0 13px; color: #7d9aab; font-size: 12px; letter-spacing: .04em; }
.mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mode-card { position: relative; min-height: 156px; padding: 17px 16px; overflow: hidden; border: 1px solid rgba(143, 211, 242, .15); border-radius: 13px; background: rgba(7, 25, 41, .54); color: var(--ink); text-align: left; transition: transform .17s ease, background .17s ease, border .17s ease; }
.mode-card::after { content: ''; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); opacity: 0; transform: scaleX(.35); transform-origin: left; transition: .17s ease; }
.mode-card:hover, .mode-card.is-active { transform: translateY(-3px); border-color: rgba(117, 221, 255, .48); background: linear-gradient(145deg, rgba(13, 53, 81, .82), rgba(8, 29, 45, .84)); }
.mode-card.is-active::after { opacity: 1; transform: scaleX(1); }
.mode-index { position: absolute; top: 15px; right: 16px; color: #608598; font-size: 10px; letter-spacing: .12em; }
.mode-glyph { display: block; width: 27px; height: 27px; margin-bottom: 22px; border: 1px solid rgba(152, 230, 255, .65); opacity: .95; }
.glyph-understand { border-radius: 50%; box-shadow: inset 0 0 0 7px rgba(114, 221, 255, .13); }
.glyph-compare { border-radius: 3px; transform: rotate(45deg); box-shadow: 7px -7px 0 -6px var(--violet); }
.glyph-decide { border-radius: 0 14px 0 14px; border-color: var(--amber); }
.glyph-find { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border-color: #8df0c5; }
.mode-card strong { display: block; margin-bottom: 4px; font-size: 17px; font-weight: 400; }
.mode-card small { display: block; color: #91adbc; font-size: 12px; line-height: 1.35; }
.trust-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 28px auto 0; color: #9bb7c6; font-size: 11px; }
.trust-strip span { display: inline-flex; align-items: center; gap: 7px; }
.trust-icon { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--cyan); border-radius: 50%; }
.trust-router { border-radius: 2px; transform: rotate(45deg); }
.trust-source { box-shadow: inset 0 0 0 2px rgba(114, 221, 255, .28); }
.trust-sign { border-color: var(--amber); clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); }
.trust-uncertainty { border-color: #b99cff; }
.results { position: relative; z-index: 2; display: none; padding: 0 0 76px; }
.results.is-visible { display: block; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(300px, .62fr); gap: 18px; align-items: start; }
.dossier, .side-card, .loading-card, .error-card { border: 1px solid rgba(148, 221, 255, .16); border-radius: 16px; background: linear-gradient(135deg, rgba(7, 26, 43, .93), rgba(5, 18, 31, .90)); box-shadow: var(--shadow), inset 0 1px 0 rgba(223, 252, 255, .04); }
.dossier { overflow: hidden; }
.dossier-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dossier-labels { display: flex; flex-wrap: wrap; gap: 7px; }
.meta-chip { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(141, 209, 237, .17); border-radius: 99px; color: #b7d8e8; background: rgba(113, 207, 255, .06); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.meta-chip.route { border-color: rgba(112, 221, 255, .29); color: #aeeeff; }
.meta-chip.solido { border-color: rgba(128, 241, 192, .35); color: var(--good); }
.meta-chip.parziale { border-color: rgba(255, 214, 138, .32); color: var(--warn); }
.meta-chip.insufficiente { border-color: rgba(255, 155, 155, .32); color: var(--danger); }
.meta-chip.grounded { border-color: rgba(176, 145, 255, .34); color: #d1c1ff; }
.meta-chip.fallback { color: #c6d6df; }
.dossier-stamp { text-align: right; color: #94c2d4; font-size: 10px; letter-spacing: .08em; white-space: nowrap; }
.dossier-stamp small { display: block; margin-top: 3px; color: #5d8194; letter-spacing: .03em; }
.dossier-body { padding: 25px 24px 22px; }
.dossier-query { margin: 0 0 7px; color: var(--cyan); font-size: 12px; letter-spacing: .02em; }
.answer-title { max-width: 780px; margin: 0; font-size: clamp(25px, 3vw, 36px); font-weight: 400; letter-spacing: -.038em; line-height: 1.07; }
.decision-lens { margin: 12px 0 0; color: #b2d2df; font-size: 14px; }
.answer-points { display: grid; gap: 14px; margin: 27px 0 0; padding: 0; list-style: none; counter-reset: answer; }
.answer-points li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 15px 0 15px; border-top: 1px solid rgba(148, 221, 255, .10); color: #d9edf6; }
.answer-points li::before { counter-increment: answer; content: counter(answer, decimal-leading-zero); color: var(--amber); font-size: 11px; letter-spacing: .08em; padding-top: 3px; }
.answer-copy { min-width: 0; }
.answer-sources { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.source-ref { padding: 2px 6px; border: 1px solid rgba(117, 221, 255, .28); border-radius: 7px; color: #a9efff; font-size: 10px; text-decoration: none; }
.source-ref:hover { background: rgba(112, 221, 255, .12); }
.empty-answer { color: #b4c9d5; }
.answer-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 25px; }
.answer-note { min-height: 150px; padding: 14px; border: 1px solid rgba(147, 219, 255, .12); border-radius: 11px; background: rgba(2, 13, 24, .38); }
.answer-note h3 { margin: 0 0 8px; color: #9deaff; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.answer-note p, .answer-note ul { margin: 0; color: #a9c2cf; font-size: 12px; line-height: 1.45; }
.answer-note ul { padding-left: 17px; }
.answer-note li + li { margin-top: 5px; }
.dossier-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 20px; border-top: 1px solid var(--line); color: #8ba9ba; font-size: 11px; }
.dossier-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.ghost-button { padding: 7px 9px; border: 1px solid rgba(148, 221, 255, .20); border-radius: 8px; background: rgba(104, 202, 255, .05); color: #c7ecf8; font-size: 11px; }
.ghost-button:hover { border-color: rgba(148, 221, 255, .50); background: rgba(104, 202, 255, .13); }
.side-column { display: grid; gap: 14px; }
.side-card { padding: 17px; }
.side-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.side-card-head h2 { margin: 0; font-size: 15px; font-weight: 400; letter-spacing: -.015em; }
.side-card-head span { color: #86a8b9; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metric { padding: 10px; border: 1px solid rgba(151, 224, 255, .10); border-radius: 9px; background: rgba(1, 12, 22, .33); }
.metric small { display: block; margin-bottom: 2px; color: #7795a8; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.metric strong { display: block; color: #d7eff8; font-size: 17px; font-weight: 400; }
.route-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.route-list > small { width: 100%; color: #7897a8; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.source-filter-row { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 9px; scrollbar-width: thin; }
.filter-chip { flex: 0 0 auto; padding: 5px 7px; border: 1px solid rgba(145, 220, 255, .14); border-radius: 99px; background: transparent; color: #9ab9c8; font-size: 10px; }
.filter-chip.is-active { border-color: rgba(114, 221, 255, .46); background: rgba(114, 221, 255, .10); color: #cbf5ff; }
.source-list { display: grid; gap: 8px; }
.source-item { display: block; padding: 12px; border: 1px solid rgba(145, 219, 255, .11); border-left: 2px solid rgba(114, 221, 255, .30); border-radius: 9px; background: rgba(1, 12, 22, .34); color: inherit; text-decoration: none; transition: border .15s ease, transform .15s ease, background .15s ease; }
.source-item:hover { transform: translateY(-1px); border-color: rgba(145, 219, 255, .37); background: rgba(13, 41, 60, .52); }
.source-item.role-fonte-primaria { border-left-color: var(--good); }
.source-item.role-istituzionale { border-left-color: var(--cyan); }
.source-item.role-editoriale { border-left-color: var(--violet); }
.source-item.role-operativa { border-left-color: var(--amber); }
.source-item.role-comunita, .source-item.role-riferimento { border-left-color: #8096a5; }
.source-top { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.source-id { color: var(--amber); font-size: 10px; padding-top: 2px; }
.source-title { color: #d8eff8; font-size: 12px; line-height: 1.28; }
.source-top .meta-chip { align-self: start; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.source-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0 0 32px; color: #779bab; font-size: 10px; }
.source-snippet { display: -webkit-box; margin: 8px 0 0 32px; overflow: hidden; color: #96b1bf; font-size: 11px; line-height: 1.38; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.empty-card { padding: 13px; border: 1px dashed rgba(146, 219, 255, .22); border-radius: 9px; color: #9ab4c1; font-size: 12px; }
.trace-grid { display: grid; gap: 8px; }
.trace-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid rgba(143, 214, 246, .08); }
.trace-row:last-child { padding-bottom: 0; border-bottom: 0; }
.trace-row small { color: #7695a7; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.trace-row strong { max-width: 65%; overflow: hidden; color: #c4e5ef; font-size: 11px; font-weight: 400; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.loading-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 20px; max-width: 780px; margin: 0 auto; padding: 26px; overflow: hidden; }
.loading-kicker, .error-kicker { display: block; margin-bottom: 8px; color: var(--cyan); font-size: 10px; letter-spacing: .13em; }
.loading-card strong { display: block; font-size: 20px; font-weight: 400; letter-spacing: -.02em; }
.loading-card p { margin: 8px 0 0; color: #9ab5c3; font-size: 13px; }
.scanline { position: absolute; inset: 0 auto 0 -15%; width: 22%; background: linear-gradient(90deg, transparent, rgba(126, 223, 255, .14), transparent); animation: scan 1.5s linear infinite; }
.loading-orbit { width: 54px; height: 54px; border: 1px solid rgba(114, 221, 255, .58); border-top-color: transparent; border-radius: 50%; animation: rotate 1s linear infinite; }
.loading-orbit::after { content: ''; display: block; width: 15px; height: 15px; margin: 18px; border: 1px solid var(--amber); border-radius: 50%; }
.error-card { max-width: 720px; margin: 0 auto; padding: 26px; }
.error-card h2 { margin: 0; font-size: 25px; font-weight: 400; letter-spacing: -.03em; }
.error-card p { margin: 8px 0 0; color: #a6bec9; }
.site-footer { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 13px; padding: 24px 0 34px; color: #708fa1; font-size: 11px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #d4f1fb; }
.site-footer span { width: 3px; height: 3px; border-radius: 50%; background: #5b7686; }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(610%); } }
@keyframes rotate { to { transform: rotate(360deg); } }
@media (max-width: 930px) { .result-layout { grid-template-columns: 1fr; } .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); } .source-card { grid-column: 1 / -1; } }
@media (max-width: 720px) { .shell { width: min(100% - 28px, 1160px); } .site-header { min-height: 72px; padding: 14px 0; } .brand img { width: 98px; } .header-status { font-size: 9px; } .hero { padding: 63px 0 55px; } .eyebrow { gap: 7px; font-size: 9px; letter-spacing: .12em; } h1 { margin-top: 16px; font-size: clamp(39px, 12vw, 59px); } .hero-copy { font-size: 15px; } .search-console { margin-top: 30px; } .search-box { grid-template-columns: 24px minmax(0, 1fr) auto; min-height: 64px; gap: 9px; padding: 7px 7px 7px 15px; border-radius: 14px; } .counter { display: none; } .search-submit { min-height: 49px; padding: 0 13px; } .search-submit span { display: none; } .search-submit b { font-size: 21px; } .search-subline { align-items: flex-start; font-size: 10px; } .mode-lead { margin-top: 31px; } .mode-grid { grid-template-columns: repeat(2, 1fr); } .mode-card { min-height: 132px; padding: 14px; } .mode-glyph { margin-bottom: 17px; } .trust-strip { justify-content: flex-start; margin-top: 23px; text-align: left; } .answer-notes { grid-template-columns: 1fr; } .answer-note { min-height: auto; } .dossier-top, .dossier-footer { align-items: flex-start; flex-direction: column; } .dossier-stamp { text-align: left; } .dossier-body { padding: 20px 16px 18px; } .answer-points li { grid-template-columns: 28px minmax(0, 1fr); } .answer-sources { grid-column: 2; justify-content: flex-start; } .dossier-footer { gap: 12px; } .dossier-actions { justify-content: flex-start; } .side-column { grid-template-columns: 1fr; } .source-card { grid-column: auto; } .loading-card { grid-template-columns: minmax(0, 1fr) 48px; padding: 20px; } .loading-orbit { width: 42px; height: 42px; } .loading-orbit::after { width: 12px; height: 12px; margin: 14px; } }
@media print { #signal-field, .backdrop, .grain, .site-header, .hero, .site-footer, .dossier-actions, .side-column { display: none !important; } body { background: #fff; color: #111; } .results { display: block !important; width: 100%; padding: 0; } .dossier { box-shadow: none; border: 1px solid #aaa; background: #fff; color: #111; } .dossier-top, .dossier-footer, .answer-points li { border-color: #ddd; } .dossier-query, .source-ref { color: #075a7a; } .answer-title, .answer-points li { color: #111; } .answer-note { border-color: #ddd; background: #fafafa; } .answer-note h3, .answer-note p, .answer-note ul, .dossier-footer { color: #444; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
