/* AI Monitor by Analytrix — brand "Bianco e viola". Colori dei dati: blu per Google e le AI Overview, lime per gli assistenti AI. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/static/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/static/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/static/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url(/static/fonts/sora-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url(/static/fonts/sora-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  /* brand */
  /* --brand: viola scuro per testo, link e voci attive (contrasto AA); --brand-fill: viola pieno per pulsanti, con testo bianco */
  --brand: #5746AF; --brand-dark: #44378F; --brand-soft: #F1EDFE; --brand-line: #DCD3FB;
  --brand-fill: #6E56CF; --brand-fill-hover: #7C66DC; --on-brand: #FFFFFF;
  --accent: #6E56CF; --accent-dark: #5746AF; --accent-soft: #F1EDFE;
  /* dati */
  --search: #2563EB; --search-dark: #1D4ED8; --search-soft: #EFF4FF;
  /* --ai per grafici e segni; --ai-strong per fondi con testo bianco; --ai-dark per il testo (contrasto AA) */
  --ai: #65A30D; --ai-strong: #4D7C0F; --ai-dark: #3F6212; --ai-soft: #ECFCCB; --ai-band: #D9F99D;
  /* neutri caldi */
  --ink: #18181B; --text: #3F3F46; --muted: #5B5B63; --faint: #85858E;
  --line: #E7E7E4; --line-soft: #F0F0EE; --line-strong: #D9D9D5;
  --bg: #FAFAF9; --card: #FFFFFF; --side: #FFFFFF; --side-2: #EFEFEC; --side-text: #3F3F46; --side-muted: #85858E;
  --good: #0E7A52; --good-bg: #E8F8F1; --bad: #B42318; --bad-bg: #FEECEB;
  --warn: #8A5A00; --warn-bg: #FFF7E6; --warn-line: #F5DFA6;
  --radius: 12px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Sora", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* layout */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--side) 243px, var(--line) 243px, var(--line) 244px, var(--bg) 244px); }
.side { background: var(--side); color: var(--side-text); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 28px 32px 48px; max-width: 1480px; width: 100%; }

.brand { display: block; padding: 22px 20px 18px; border-bottom: 1px solid var(--side-2); text-decoration: none; }
.brand-logo { display: block; height: 24px; width: auto; }
.brand .brand-kicker { margin-top: 10px; }
.login-brand { display: inline-block; text-decoration: none; }
.by-analytrix { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.by-analytrix img { height: 14px; width: auto; display: block; }
.brand-kicker { font-size: 11px; letter-spacing: .18em; color: var(--side-muted); font-weight: 600; }
.brand-name { font-size: 19px; font-weight: 600; color: #fff; margin-top: 2px; }
.brand-kicker.dark { color: var(--faint); } .brand-name.dark { color: var(--ink); }
.lockup { display: inline-flex; align-items: center; gap: 10px; }
.lockup svg { height: 28px; width: auto; flex: none; display: block; }
.lockup-name { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.lockup.on-dark .lockup-name { color: #fff; }
.lockup.lockup-lg svg { height: 36px; width: auto; }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px 18px; color: var(--side-muted); font-size: 12px; }
.side-foot img { height: 15px; width: auto; display: block; }
.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--side-text); font-size: 14.5px; }
.nav-item.sub { padding-left: 26px; }
.nav .nav-item.sub { color: var(--side-text); }
.nav .nav-item.sub.active { color: var(--brand); }
.nav-item:hover { background: var(--line-soft); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.soon { color: #5B6B82; cursor: default; }
.nav-item.soon:hover { background: none; }
.nav-item .ico { display: inline-block; width: 18px; color: var(--side-muted); }
.nav-item.active .ico { color: var(--brand); }
.nav-group { margin: 16px 0 4px; padding: 0 14px; font-size: 11px; letter-spacing: .16em; font-weight: 600; }
.nav-group .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.nav-group.search { color: var(--search); } .nav-group.search .dot { background: var(--search); }
.nav-group.ai { color: var(--ai-dark); } .nav-group.ai .dot { background: var(--ai); }
.nav-sep { border-top: 1px solid var(--side-2); margin: 14px -12px 10px; }
.me { display: flex; gap: 10px; align-items: center; padding: 16px 16px 10px; border-top: 1px solid var(--side-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; }
.me-name { color: var(--ink); font-weight: 500; font-size: 14px; } .me-role { color: var(--side-muted); font-size: 12px; }

.top { background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; gap: 16px; flex-wrap: wrap; }
.top-left, .top-right { display: flex; align-items: center; gap: 14px; }
.pill-select, .pill-static, .month-pick select { background: var(--line-soft); color: var(--ink); border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.pill-select option, .month-pick select option { color: var(--ink); }
select.pill-select, .month-pick select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2352525B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 12px; }
.top-domain { color: var(--muted); font-size: 14px; font-family: var(--mono); }
.month-pick { display: flex; align-items: center; gap: 8px; }
.muted-on-blue { color: var(--muted); font-size: 14px; }
.icon-btn { background: var(--line-soft); color: var(--ink); border: 0; border-radius: 8px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; }
.logout { margin: 0; }

.notice { padding: 10px 24px; font-size: 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.notice-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.notice-info { background: var(--brand-soft); color: var(--brand); }
.notice-ico { font-size: 12px; font-weight: 700; }

/* intestazione pagina */
.page-head { margin-bottom: 20px; }
.kicker { font-size: 12px; letter-spacing: .16em; font-weight: 600; color: var(--ink); }
.kicker.search { color: var(--search); } .kicker.ai { color: var(--ai-dark); }
.kicker .sq { display: inline-block; width: 7px; height: 7px; background: currentColor; margin-right: 8px; vertical-align: 1px; }
h1 { font-family: var(--display); font-size: 28px; font-weight: 600; margin: 6px 0 2px; letter-spacing: -.02em; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--ink); letter-spacing: 0; }
.sub { color: var(--muted); }

/* card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-note { font-size: 12px; color: var(--faint); }
.card-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ai-dark); text-decoration: none; }
.empty-state { color: var(--muted); text-align: center; padding: 48px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two-col.wide-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.col-card { border-top: 3px solid var(--search); }
.col-card.ai { border-top-color: var(--ai); }
.col-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line-soft); padding-bottom: 14px; margin-bottom: 4px; }
.col-head h2 { margin: 0; }
.col-link { font-size: 13px; font-weight: 600; color: var(--search); text-decoration: none; }
.ai .col-link { color: var(--ai-dark); } .col-link.soon { color: var(--faint); font-weight: 500; }
.empty-col { color: var(--muted); padding: 24px 0; }

/* righe chiave-valore */
.kv { display: grid; grid-template-columns: 1fr auto minmax(90px, auto); gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.kv-label { color: var(--text); font-size: 14px; }
.kv-value { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.kv-side { color: var(--muted); font-size: 13px; text-align: right; }
.big { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.big.xl { font-size: 28px; }
.big.muted { color: var(--faint); font-size: 18px; }
.chip { font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 5px; font-weight: 500; white-space: nowrap; }
.chip-good { background: var(--good-bg); color: var(--good); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-neutral { background: var(--line-soft); color: var(--muted); }
.bad-text { color: var(--bad); }
.warn-text { color: var(--warn); font-family: "Inter", sans-serif; }
.help { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--line-soft); color: var(--muted); font-size: 10px; font-weight: 600; cursor: help; margin-left: 4px; vertical-align: 1px; font-family: "Inter", sans-serif; letter-spacing: 0; text-transform: none; transition: background .12s, color .12s; }
.help:hover, .help:focus-visible, .help[aria-describedby] { background: var(--brand-soft); color: var(--brand); outline: none; }
.help:focus-visible { box-shadow: 0 0 0 2px var(--brand-line); }
.chip[data-tip] { cursor: help; }
.chip[data-tip]:focus-visible { outline: 2px solid var(--brand-line); outline-offset: 1px; }
/* riquadro di spiegazione (static/js/tips.js) */
.tip-pop { position: fixed; z-index: 1000; max-width: 300px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: #F4F4F5;
  font: 400 13px/1.45 "Inter", system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
  box-shadow: 0 6px 20px rgba(24, 24, 27, .18); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .1s; }
.tip-pop.open { opacity: 1; visibility: visible; }
.tip-pop strong { display: block; font-weight: 600; color: #fff; margin-bottom: 3px; }
.kpi-label .help { vertical-align: 0; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; margin-left: 6px; }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpi-label { color: var(--text); font-size: 14px; }
.kpi-value { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.kpi-value .big { font-size: 30px; }
.kpi-side { color: var(--muted); font-size: 13px; }

/* lettura del mese */
.reading { border-left: 3px solid var(--accent); }
.reading-head { display: flex; justify-content: space-between; align-items: center; }
.reading-head h2 { margin: 0 0 10px; font-size: 15px; }
.reading-body p { margin: 0 0 10px; }
.tips { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 6px; display: grid; gap: 8px; }
.tip { color: var(--text); font-size: 14px; }
.tip-tag { font-family: var(--mono); font-size: 11px; background: var(--line-soft); padding: 2px 7px; border-radius: 4px; margin-right: 10px; color: var(--muted); }
.reading-foot { color: var(--faint); font-size: 12px; margin-top: 12px; }

/* grafici e liste */
.chart-block { margin-top: 18px; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--text); }
.chart-note { font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 6px; }
.chart { width: 100%; height: 170px; }
.chart.tall { height: 240px; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.lg-without { background: #C9D6E8; } .lg-with { background: var(--search); }
.list-block { margin-top: 18px; }
.list-title { font-size: 13px; font-weight: 600; color: var(--text); padding-bottom: 6px; }
.list-title.caps { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.list-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.list-row.is-client { font-weight: 600; }
.list-row .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.list-row > :last-child { flex: none; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 10px; }
.sw-client { background: var(--ai); } .sw-other { background: #A9B6C8; }
.sw-c1 { background: #334155; } .sw-c2 { background: #8696AD; } .sw-c3 { background: #C2CCD9; }
.sub-label { color: var(--text); font-size: 13px; margin: 12px 0 8px; }
.mini-label { color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; }
.grid-2.lists { gap: 32px; }
.divider { border-top: 1px solid var(--line-soft); margin: 18px 0 4px; }
.split-bar { height: 10px; background: #C9D6E8; border-radius: 5px; overflow: hidden; }
.split-bar span { display: block; height: 100%; background: var(--search); }
.split-legend { display: flex; justify-content: space-between; font-size: 13px; margin-top: 8px; gap: 12px; }
.note { font-size: 13px; color: var(--muted); background: var(--bg); padding: 8px 10px; border-radius: 8px; }

/* login */
.login-page { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 380px; display: grid; gap: 14px; }
.login-sub { color: var(--muted); margin: 0; }
.login-card label { display: grid; gap: 6px; font-size: 14px; color: var(--text); }
.login-card input { font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; }
.login-card input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.btn-primary, .btn-secondary { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 11px; cursor: pointer; text-align: center; text-decoration: none; }
.btn-primary { background: var(--brand-fill); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-fill-hover); }
.btn-secondary { background: var(--line-soft); color: var(--ink); width: 100%; }
.form-error { background: var(--bad-bg); color: var(--bad); padding: 10px 12px; border-radius: 8px; font-size: 14px; }

@media (max-width: 1100px) {
  .two-col, .two-col.wide-left, .kpi-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .grid-2, .grid-2.lists { grid-template-columns: minmax(0, 1fr); }
  .conv-row { grid-template-columns: minmax(90px, 110px) 1fr auto; }
  .conv-row .conv-kev { display: none; }
  .model-row { grid-template-columns: minmax(90px, 110px) 1fr 40px 56px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; background: var(--bg); }
  .top { padding: 10px 16px; }
  .top-domain { display: none; }
  .top-left, .top-right { flex-wrap: wrap; min-width: 0; }
  .top select { max-width: 100%; }
  .content { padding: 20px 16px 40px; }
  .side { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group, .nav-sep, .me { display: none; }
  .kv { grid-template-columns: 1fr auto; }
  .kv-side { grid-column: 1 / -1; text-align: left; }
}

/* barra filtri */
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 16px; margin-bottom: 20px; font-size: 14px; }
.filters-kicker { font-size: 11px; letter-spacing: .16em; color: var(--faint); font-weight: 600; }
.filters-label { color: var(--text); }
.filters-note { margin-left: auto; color: var(--faint); font-size: 12px; }
.seg { display: inline-flex; background: var(--line-soft); border-radius: 8px; padding: 2px; }
.seg a { padding: 5px 11px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; }
.seg a.on { background: var(--brand-fill); color: var(--on-brand); }
.seg-right { float: right; margin: -30px 0 10px; }
.rank-filter { margin: 12px 0 10px; }

/* tabelle */
.table-card { padding: 0; overflow: hidden; }
.table-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.table-head h2 { margin: 0 6px 0 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 11px; font-size: 13px; text-decoration: none; color: var(--text); }
.tab.on { border-color: var(--search); background: var(--search-soft); color: var(--search-dark); font-weight: 600; }
.search-form { margin-left: auto; }
.search-form input, .inline-form select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; min-width: 220px; background: #fff; }
.inline-form select { min-width: 0; }
.btn-ghost { border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 11px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.table-summary { display: flex; gap: 24px; flex-wrap: wrap; padding: 10px 20px; background: var(--bg); border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 600; text-align: right;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: right; vertical-align: top; }
table.data .left { text-align: left; } table.data .center { text-align: center; }
table.data th:first-child, table.data td:first-child { padding-left: 20px; }
table.data tr:hover td { background: #FAFBFD; }
.kw-cell details summary { cursor: pointer; list-style: none; }
.kw-cell details summary::-webkit-details-marker { display: none; }
.kw-cell details summary::before { content: "▸"; color: var(--faint); margin-right: 8px; font-size: 11px; }
.kw-cell details[open] summary::before { content: "▾"; }
.kw-plain { padding-left: 19px; display: inline-block; }
.sources { margin: 8px 0 2px 18px; padding-left: 18px; color: var(--muted); font-size: 13px; }
.sources li { padding: 2px 0; word-break: break-all; }
.sources li.is-client { color: var(--search-dark); font-weight: 600; }
.empty-row { text-align: center !important; color: var(--muted); padding: 28px !important; }
.table-foot { display: flex; justify-content: space-between; padding: 12px 20px; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 14px; align-items: center; }
.pager a { color: var(--search); text-decoration: none; font-weight: 600; }
.tag { font-size: 11px; background: var(--line-soft); color: var(--muted); padding: 1px 7px; border-radius: 4px; margin-left: 8px; font-weight: 500; }
.tag-blue { background: var(--search-soft); color: var(--search-dark); }
.tag-solid { background: var(--search); color: #fff; font-weight: 700; }
.yn { font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.yn.yes-blue { background: var(--search-soft); color: var(--search-dark); }
.yn.yes-green { background: var(--good-bg); color: var(--good); }
.yn.no { background: var(--line-soft); color: var(--faint); }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 5px; font-weight: 600; white-space: nowrap; }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-neutral { background: var(--line-soft); color: var(--muted); }

/* classifica domini */
.rank { clear: both; margin-top: 8px; }
.rank-row { display: grid; grid-template-columns: 24px 20px minmax(170px, 2.2fr) minmax(40px, .8fr) 58px 56px; gap: 10px; align-items: center;
  padding: 9px 4px; border-top: 1px solid var(--line-soft); font-size: 14px; cursor: pointer; }
.rank-row.is-client { background: var(--search-soft); border-radius: 8px; font-weight: 600; color: var(--search-dark); }
.rank-n { color: var(--faint); text-align: right; font-size: 12px; }
.rank-domain { display: flex; align-items: center; min-width: 0; }
.rank-domain .d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-domain .tag { flex: none; }
.rank-bar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 3px; }
.rank-delta { text-align: right; color: var(--faint); font-size: 12px; }
.compare-them { color: var(--bad); } .compare-me { color: var(--good); }
.page-row { border-top: 1px solid var(--line-soft); padding: 10px 0; }
.page-row summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-size: 14px; }
.page-row summary::-webkit-details-marker { display: none; }
.page-row summary .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-row summary .url::before { content: "▸ "; color: var(--faint); font-size: 11px; }
.page-row[open] summary .url::before { content: "▾ "; }
.page-meta { display: flex; gap: 10px; align-items: center; }
.page-kws { color: var(--muted); font-size: 13px; padding: 8px 0 2px 16px; }

/* andamento */
.chart.xtall { height: 340px; }
.lg-dashed { background: rgba(37,99,235,.14); border: 1px dashed var(--search); }
.chips-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.chip-note { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px; color: var(--text); }
.chip-note b { color: var(--search); margin-right: 6px; }

/* assistenti AI */
.nav-item.sub.ai.active { box-shadow: inset 3px 0 0 var(--ai); }
.chips-filter { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chips-filter a { border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 11px; font-size: 13px; text-decoration: none; color: var(--text); font-weight: 500; }
.chips-filter a.on { border-color: var(--ai); background: var(--ai-soft); color: var(--ai-dark); font-weight: 600; }
.band-scale { margin: 14px 0 6px; }
.band-track { position: relative; height: 8px; background: var(--line-soft); border-radius: 4px; }
.band-range { position: absolute; top: 0; height: 100%; background: var(--ai-band); border-radius: 4px; }
.band-dot { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--ai); border-radius: 2px; transform: translateX(-1px); }
.band-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); margin-top: 4px; }
.share-row, .model-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) 1.4fr 58px 108px; white-space: nowrap; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.share-row.is-client { font-weight: 600; }
.share-row .rank-bar, .model-row .rank-bar { height: 8px; }
.share-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.compact td, table.data.compact th { padding: 9px 8px; }
table.data.compact th:first-child, table.data.compact td:first-child { padding-left: 0; }
.heat { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 14px; }
.heat th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px; text-align: center; }
.heat th.left, .heat td.left { text-align: left; }
.heat td { padding: 0; }
.topic-name { padding-right: 10px !important; white-space: nowrap; }
.cell { display: block; text-align: center; padding: 8px 4px; border-radius: 5px; font-family: var(--mono); font-size: 13px; text-decoration: none; border: 2px solid transparent; }
.cell.sel { border-color: var(--ink); }
.cell.empty { background: var(--bg); color: var(--faint); }
a.cell:hover { border-color: rgba(15,27,46,.4); }
.heat-months .cell { padding: 5px 2px; font-size: 12px; }
.heat-legend { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-top: 10px; }
.heat-grad { width: 180px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(124,58,237,.1), rgba(124,58,237,.85)); }
.ai-note { color: var(--ai-dark); font-weight: 500; }
.question { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.q-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; }
.q-domains { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dom-chip { background: var(--line-soft); border-radius: 5px; padding: 3px 9px; font-size: 13px; color: var(--text); }
.dom-chip.is-client { background: var(--ai-strong); color: #fff; font-weight: 600; }
.dom-row { display: grid; grid-template-columns: 24px minmax(150px, 1fr) auto 64px; gap: 12px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.dom-row.is-client { background: var(--ai-soft); border-radius: 8px; font-weight: 600; color: var(--ai-dark); }
.dom-row > .mono:last-child { text-align: right; }
.dom-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dom-models { display: flex; gap: 4px; }
.mtag { font-size: 10px; background: var(--line-soft); color: var(--muted); padding: 2px 6px; border-radius: 4px; white-space: nowrap; font-weight: 500; }
.tag-ai { background: var(--ai-strong); color: #fff; font-weight: 700; }
.multiples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.multiple { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.multiple-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; }
.chart.small-chart { height: 110px; }
.lg-band { background: var(--ai-band); } .lg-ring { background: #fff; border: 2px solid var(--ai); border-radius: 50%; }
@media (max-width: 1100px) { .multiples { grid-template-columns: repeat(2, 1fr); } }
.btn-primary.inline { display: inline-block; padding: 10px 16px; margin-top: 6px; }
.small-h { font-size: 15px !important; }

/* ---- gerarchia: un numero principale per pagina o colonna ---- */
.good-text { color: var(--good); }
.hero { display: grid; grid-template-columns: minmax(220px, 1fr) 2.2fr; gap: 28px; align-items: center; border-top: 3px solid var(--search); }
.hero.ai { border-top-color: var(--ai); }
.hero-main h2 { margin-bottom: 10px; }
.hero-num { font-family: var(--display); font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.hero-num.xl { font-size: 56px; }
.hero-num.muted { color: var(--faint); }
.hero-unit { font-size: 16px; color: var(--text); }
.hero-chg { font-size: 15px; font-weight: 600; }
.hero-main .hero-chg { margin-top: 10px; font-size: 17px; }
.hero-foot { color: var(--muted); font-size: 13px; margin-top: 4px; }
.hero-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.hero-chart .chart { height: 210px; }
.headline { display: flex; align-items: baseline; gap: 10px 12px; flex-wrap: wrap; margin: 18px 0 6px; }
.chart.mini { height: 120px; margin-top: 6px; }
.small-legend { font-size: 12px; gap: 14px; margin-top: 2px; }
.legend.wrap { flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; }
.lg-band { background: var(--ai-band); }

.boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.box { background: var(--bg); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.box-label { font-size: 13px; color: var(--text); }
.box-value { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.box-value.muted { color: var(--faint); }
.box-line { display: flex; align-items: center; gap: 10px; }
.box-of { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.box .box-value:not(.mono) { font-family: var(--display); letter-spacing: -.01em; font-size: 18px; font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile h2 { font-size: 14px; color: var(--text); font-weight: 600; margin-bottom: 10px; }
.tile-value { display: flex; align-items: center; gap: 10px; }
.tile-num { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.tile-num.muted { color: var(--faint); font-size: 20px; }
.tile-foot { color: var(--muted); font-size: 13px; margin-top: 8px; }

.bar-row { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 48px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.bar-row.wide { grid-template-columns: minmax(130px, 1.1fr) 1.5fr 44px 64px; }
.bar-row.is-client { font-weight: 600; }
.bar-row .rank-bar { height: 10px; border-radius: 5px; }
.bar-row .rank-bar i { border-radius: 5px; }
.bar-row > .mono { text-align: right; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-chg { text-align: right; }
.bar-axis { margin-left: calc(min(130px, 25%) + 12px); }
.mdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.row-val { display: flex; gap: 8px; align-items: center; }

/* lettura del mese su una riga, si apre al clic */
.reading-line { padding: 0; border-left: 3px solid var(--accent); }
.reading-line summary { display: flex; gap: 16px; align-items: center; padding: 16px 22px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.reading-line summary::-webkit-details-marker { display: none; }
.reading-label { font-size: 13px; font-weight: 600; color: var(--text); flex: none; }
.reading-text { flex: 1 1 420px; font-size: 16px; }
.reading-more { font-size: 14px; font-weight: 600; color: var(--brand); flex: none; }
.reading-line[open] .reading-more { visibility: hidden; }
.reading-full { padding: 0 22px 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.reading-full p { margin: 0 0 10px; }

details.method { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
details.method summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 500; }
.method-grid { display: flex; gap: 28px; margin: 12px 0 10px; }
.method-grid > div { display: flex; flex-direction: column; }
.split-bar.big-split { height: 16px; border-radius: 8px; margin-top: 4px; }
.split-legend .lg { vertical-align: -1px; }

.quality { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.q-cell { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.q-model { font-weight: 600; font-size: 14px; margin-bottom: 2px; }

table.data.presence th.m-col, table.data.presence td.m-col { width: 92px; }
table.data.presence th.m-col { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--text); }
table.data.presence .presence-col { width: 34%; }
table.data.presence tr.is-client td { background: var(--ai-soft); color: var(--ai-dark); font-weight: 600; }
.pres { display: grid; grid-template-columns: 1fr 44px; gap: 10px; align-items: center; }
.pres .rank-bar { height: 8px; }
.pres b { text-align: right; font-weight: 500; }
.dom-cell { white-space: nowrap; }
.table-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.page-cited { border-top: 1px solid var(--line-soft); padding: 10px 0; }
.page-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.page-line .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.page-line .page-meta { flex: none; }
.page-topics { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.page-topics .tag { margin-left: 0; }
.topic-chip { font-size: 12px; background: var(--ai-soft); color: var(--ai-dark); padding: 2px 8px; border-radius: 999px; }
.topic-chip .mono { opacity: .7; margin-left: 2px; }

.topic-trends { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.topic-trend { display: grid; grid-template-columns: minmax(120px, 1fr) 1.4fr 44px 60px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.topic-trend .topic-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.topic-last { text-align: right; font-size: 15px; }
.spark { width: 100%; height: 36px; display: block; background: linear-gradient(to top, var(--line-soft) 1px, transparent 1px); }

@media (max-width: 1100px) {
  .hero, .tiles, .topic-trends { grid-template-columns: 1fr; }
  .quality { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .boxes { grid-template-columns: 1fr; }
  .bar-row.wide { grid-template-columns: minmax(100px, 1fr) 1fr 40px; }
  .bar-row.wide .bar-chg { display: none; }
}

.dash-note { font-size: 12px; color: var(--muted); margin-top: 6px; padding-left: 26px; position: relative; }
.dash-note::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; border-top: 2px dashed var(--faint); }
.period-seg { margin-left: 4px; }
.period-seg a { padding: 6px 10px; }
.aio-loss { color: #D9431F; }
.aio-gain { color: var(--good); }
.cols { width: 100%; height: 36px; display: block; border-bottom: 1px solid var(--line); }
.tile-dom { font-weight: 600; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.battle td { padding-top: 9px; padding-bottom: 9px; }
.movers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
details.domains-all summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; flex-wrap: wrap; }
details.domains-all summary::-webkit-details-marker { display: none; }
details.domains-all summary h2 { margin: 0; }
details.domains-all summary h2::before { content: "▸ "; color: var(--muted); }
details.domains-all[open] summary h2::before { content: "▾ "; }
details.domains-all[open] summary { margin-bottom: 14px; }
.pages-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
@media (max-width: 900px) { .movers, .pages-grid { grid-template-columns: minmax(0, 1fr); } }

/* Scomposizione della variazione dei click: impression e CTR, con segno */
.eff { display: grid; gap: 10px; margin: 6px 0 4px; }
.eff-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.eff-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.eff-bar i { display: block; height: 100%; border-radius: 5px; }
.eff-bar i.neg { background: var(--bad); }
.eff-bar i.pos { background: var(--good); }
@media (max-width: 560px) { .eff-row { grid-template-columns: 1fr auto; } .eff-bar { grid-column: 1 / -1; order: 3; } }

/* Filtri della tabella keyword */
.kw-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex: 1; }
.kw-filters .sel { display: grid; gap: 3px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kw-filters .sel.off { opacity: .45; }
.kw-filters select { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 28px 7px 10px; }
.kw-filters input[type=search] { flex: 1; min-width: 160px; }
.kw-filters input[type=search] { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }

/* Domande del topic: una riga per domanda */
table.qtable td { vertical-align: top; }
table.qtable .q-text { min-width: 260px; max-width: 460px; font-weight: 500; line-height: 1.4; }
table.qtable .q-site { white-space: nowrap; }
table.qtable .q-rivals { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 240px; }
.cite-pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; margin-right: 4px; }
.cite-good { background: var(--ai-strong); color: #fff; }
.cite-mid { background: var(--ai-soft); color: var(--ai-dark); }
.cite-none { background: var(--line-soft); color: var(--muted); }
.q-more { display: inline-block; }
.q-more summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; padding: 3px 6px; border-radius: 5px; }
.q-more summary::-webkit-details-marker { display: none; }
.q-more[open] summary { color: var(--ink); }
.q-more-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.dom-chip.plat { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }

/* Sito contro primo concorrente, per topic */
.duel-legend { display: flex; gap: 14px; color: var(--muted); margin: -4px 0 10px; }
.duel-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.duels { display: grid; gap: 14px; }
.duel-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.duel-topic { font-weight: 600; }
.duel-verdict { font-size: 12px; }
.duel-row { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 10px; font-size: 12px; margin-top: 3px; }
.duel-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-bar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.duel-bar i { display: block; height: 100%; border-radius: 4px; }
.duel-bar i.me { background: var(--ai); }
.duel-bar i.them { background: #A1A1AA; }
.duel-row b { text-align: right; }

/* Panoramica: visite e conversioni dagli assistenti (Google Analytics) */
.card.conv { margin-top: 16px; }
.conv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0 18px; }
.conv-tiles .tile-foot { margin-top: 4px; }
.conv-detail { gap: 28px; }
.conv-row { grid-template-columns: 140px 1fr auto auto; }
.conv-kev { min-width: 90px; text-align: right; font-size: 12px; }
.conv-empty { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 820px) { .conv-tiles { grid-template-columns: 1fr; } }

.conv-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 6px; }
.conv-filters .sel { display: grid; gap: 3px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.conv-filters select { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 28px 7px 10px; }

/* Panoramica: il mese in pochi numeri */
.kpis { display: grid; gap: 12px; margin: 0 0 16px; }
.kpis-5 { grid-template-columns: repeat(5, 1fr); }
.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpi { display: grid; align-content: start; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 14px; color: inherit; text-decoration: none; border-top: 3px solid var(--search); transition: box-shadow .15s; }
.kpi:hover { box-shadow: 0 2px 10px rgba(24, 24, 27, .07); }
.kpi.ai { border-top-color: var(--ai); }
.kpi.conv { border-top-color: #A3E635; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-num { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.kpi-num.muted { color: var(--faint); font-size: 22px; }
.kpi-foot { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.mini-title { font-size: 12.5px; color: var(--muted); margin: 14px 0 2px; }
.model-row { grid-template-columns: minmax(110px, 140px) 1fr 44px 64px; }
.model-row .row-chg { text-align: right; }
.conv-line { font-size: 14px; margin: 6px 0 16px; color: var(--text); }
@media (max-width: 1250px) { .kpis-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .kpis-5, .kpis-3 { grid-template-columns: 1fr 1fr; } }
.tag-warn { background: #FEF3C7; color: #92400E; }
/* righe lista: il nome si accorcia con i puntini, il valore resta intero */
.list-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movers .row-val { flex: none; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .rank-row { grid-template-columns: 20px 18px minmax(0, 1fr) 52px 48px; gap: 8px; }
  .rank-row > :nth-child(4) { display: none; }
}

@media (max-width: 760px) { .report section { min-width: 0; } .report .tiles, .report .boxes { grid-template-columns: minmax(0, 1fr); } }

.bar-axis-row { padding-top: 2px; }
.bar-axis-row .band-axis { margin: 0; }

/* fonte dei dati in basso a destra; tabelle della carta conversioni */
.src-label { padding-top: 14px; text-align: right; font-size: 11px; color: var(--faint); }
.hero > .src-label { grid-column: 1 / -1; padding-top: 0; margin-top: -14px; }
table.conv-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.conv-table th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
table.conv-table td { padding: 8px; text-align: right; border-bottom: 1px solid var(--line-soft, #F1F1F3); font-size: 14px; }
table.conv-table .left { text-align: left; }
table.conv-table th:first-child, table.conv-table td:first-child { padding-left: 0; width: 34%; }
table.conv-table .bar-col { width: 26%; }
table.conv-table th:nth-child(3), table.conv-table th:nth-child(4), table.conv-table th:nth-child(5) { width: 14%; }
table.conv-table.pages th:first-child, table.conv-table.pages td:first-child { width: auto; }
table.conv-table.pages th:nth-child(2) { width: 70px; } table.conv-table.pages th:nth-child(3) { width: 64px; }
table.conv-table .rank-bar { display: block; }
table.conv-table .nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.url-cell .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.url-cell .tag { flex: none; }
@media (max-width: 760px) { table.conv-table .bar-col { display: none; } table.conv-table th:first-child, table.conv-table td:first-child { width: 40%; } }
.rank.rank-ai .rank-row.is-client { background: var(--ai-soft); color: var(--ai-dark); }
/* etichette delle schede: la "?" resta in alto a destra e non va a capo da sola */
.kpi .kpi-label, .box .box-label { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kpi .kpi-label .help, .box .box-label .help { flex: none; margin-left: 0; margin-top: 1px; }

/* Panoramica: le due analisi di aimonitor in evidenza, i dati di contorno sotto */
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.color-key { font-size: 12.5px; gap: 16px; padding-bottom: 6px; }
.lg-key-search { background: var(--search); } .lg-key-ai { background: var(--ai); }
.kpi-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.kpi-lg { padding: 18px 22px 16px; gap: 8px; border-top-width: 4px; }
.kpi-lg .kpi-label { font-size: 14.5px; color: var(--text); font-weight: 600; }
.kpi-lg .kpi-num { font-size: 44px; }
.kpi-lg .kpi-foot { font-size: 13.5px; }
.kpis-sm .kpi { padding: 12px 14px; gap: 4px; }
.kpis-sm .kpi-num { font-size: 22px; }
.kpis-sm .kpi-foot { font-size: 12px; }
.kpis-1 { grid-template-columns: minmax(0, 1fr); }
/* provenienza del dato in fondo alla scheda */
.kpi-src { justify-self: start; margin-top: 6px; font-size: 11px; color: var(--faint); letter-spacing: .01em; display: inline-flex; align-items: center; gap: 5px; }
.kpi-src-own { color: var(--brand); background: var(--brand-soft); padding: 2px 8px 2px 6px; border-radius: 999px; font-weight: 600; cursor: help; }
.kpi-src-own img { width: 12px; height: 12px; }
.kpi-lg .kpi-src { margin-top: 10px; font-size: 11.5px; }
@media (max-width: 900px) { .kpi-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .kpis-sm.kpis-3 { grid-template-columns: 1fr; } }

/* Panoramica: colori. Blu = Google e AI Overview, lime acceso = assistenti AI (come la legenda);
   grigio = dati di contorno, presi dagli strumenti del cliente */
:root { --ai-key: #A3E635; }
.lg-key-ai { background: var(--ai-key); }
.kpi-lg.ai, .col-card.ai { border-top-color: var(--ai-key); }
.kpi.kpi-base { border-top-color: var(--line-strong); background: #F6F6F4; }
.kpi.kpi-base:hover { background: #F2F2EF; }
.kpi-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.kpi-actions .kpi-src { margin-top: 0; }
.btn-report { font-size: 13px; font-weight: 600; text-decoration: none; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: border-color .12s, background .12s; }
.kpi-lg.search .btn-report { color: var(--search-dark); } .kpi-lg.search .btn-report:hover { border-color: var(--search); background: var(--search-soft); }
.kpi-lg.ai .btn-report { color: var(--ai-dark); } .kpi-lg.ai .btn-report:hover { border-color: var(--ai-key); background: var(--ai-soft); }
.kpi-lg:hover { box-shadow: none; }

/* Riepilogo AI Overview: tre rilevazioni in evidenza, i click da Google sotto su fondo grigio */
.kpi-hero-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.kpi-hero-3 .kpi-lg .kpi-num { font-size: 38px; }
.hero.hero-base { background: #F6F6F4; border-top-color: var(--line-strong); }
.hero-base .hero-num { font-size: 36px; }
.hero-base .kpi-actions { margin-top: 14px; }
.card-link.search-link { color: var(--search-dark); }
@media (max-width: 1100px) { .kpi-hero-3 { grid-template-columns: minmax(0, 1fr); } }
.eff-row { grid-template-columns: minmax(150px, 230px) 1fr auto; }
.eff-total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; color: var(--ink); }
.kpi-trend { height: 92px; margin: 4px -6px 0; }
.scope-notes { margin: -4px 0 14px; }

/* Andamento AI Overview: rilevazioni aimonitor su bianco con bordo blu, click da Google su grigio */
.card.trend-own { border-top: 3px solid var(--search); }
.card.trend-base { border-top: 3px solid var(--line-strong); background: #F6F6F4; }
.trend-own .card-head, .trend-base .card-head { align-items: flex-start; gap: 12px; }
.trend-own .card-head .kpi-src, .trend-base .card-head .kpi-src { margin-top: 2px; flex: none; }
.lg-band-search { background: #DCE7FD; }
.sub-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-report.search-btn { color: var(--search-dark); font-size: 12.5px; padding: 6px 11px; }
.btn-report.search-btn:hover { border-color: var(--search); background: var(--search-soft); }
.ctr-card { margin-top: 0; }
.trend-own .card-head, .trend-base .card-head { flex-wrap: nowrap; justify-content: space-between; }

/* Keyword e pagine */
.view-seg a { font-size: 13px; }
.kw-table th { white-space: nowrap; }
.kw-table th.lost-col, .kw-table td.lost-col { text-align: right; }
.sources-title { font-size: 11.5px; color: var(--muted); margin: 6px 0 2px; }
.table-head > div { min-width: 0; }
.page-list { margin-top: 4px; }
.kw-table td.kw-cell { min-width: 240px; }
.kw-table td .pill { white-space: nowrap; }
.table-card .page-list { padding: 0 20px 8px; }
.table-card.trend-own .table-head > .kpi-src { margin-left: auto; }
.table-card .source { padding: 0 20px 14px; }
.kw-status { margin-left: 6px; font-size: 11px; padding: 1px 7px; vertical-align: 1px; white-space: nowrap; }
.kw-table td.kw-cell { min-width: 280px; }

/* Keyword e pagine: schede sopra la tabella */
.kw-cards { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.kw-card { display: flex; flex-direction: column; gap: 6px; }
.kw-card .card-head { margin-bottom: 2px; align-items: baseline; }
.kw-card .kpi-actions { margin-top: auto; padding-top: 10px; }
.kw-card .list-row { font-size: 13.5px; }
.kw-total { font-size: 13.5px; color: var(--muted); } .kw-total .kpi-num { font-size: 30px; color: var(--ink); margin-right: 4px; }
.stack-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line-soft); margin: 6px 0 4px; }
.stack-bar i { display: block; height: 100%; }
.sb-cited { background: #1D4ED8; } .sb-aio { background: #93B4F8; } .sb-none { background: #D4D4D8; }
.stack-legend { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.stack-legend a { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 7px; }
.stack-legend a:hover { color: var(--search-dark); }
.stack-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.imp-cell { white-space: nowrap; }
.imp-bar { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--line-soft); margin-right: 8px; vertical-align: 1px; overflow: hidden; }
.imp-bar i { display: block; height: 100%; background: #93B4F8; }
@media (max-width: 1100px) { .kw-cards { grid-template-columns: 1fr; } }

/* Concorrenti */
.kpi-domain { font-size: 24px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; }
.rank-cols { display: grid; grid-template-columns: 1fr 70px 110px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 10px 0 2px; padding: 0 4px; }
.rank-cols span:nth-child(n+2) { text-align: right; }
.rank-hint { margin: 6px 0 0; }
.h2h .card-head { justify-content: space-between; flex-wrap: wrap; }
.h2h-cols { gap: 28px; }
.h2h-num { font: 600 30px/1 "Inter", sans-serif; margin-bottom: 2px; }
.h2h .list-title { margin-bottom: 6px; }

.rank-two { align-items: stretch; }
.rank-two > .card { display: flex; flex-direction: column; }
.rank-two .chart.tall { flex: 1; min-height: 300px; height: auto; }
.btn-small { font-size: 12px; padding: 4px 10px; }
.rank-foot { margin: 10px 0 0; }

/* Assistenti AI: rilevazioni aimonitor con bordo lime */
.card.trend-own.ai-own, .table-card.trend-own.ai-own { border-top-color: var(--ai-key); }
.btn-report.ai-btn { color: var(--ai-dark); font-size: 12.5px; padding: 6px 11px; }
.btn-report.ai-btn:hover { border-color: var(--ai-key); background: var(--ai-soft); }
.kpi-lg.ai .kpi-domain .dot, .kpi-domain .model-dot { vertical-align: 4px; }
.col-link.ai-link { color: var(--ai-dark); }

.sb-ai-always { background: #4D7C0F; } .sb-ai-some { background: #BEF264; }
.stack-legend.static span { display: flex; align-items: center; gap: 7px; }
.opp-row { gap: 10px; }
.opp-meta { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; flex: none; }
.h2h .duels { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px 28px; }

/* Andamento assistenti: per assistente e per topic affiancati, alti uguali */
.and-pair > .card { margin-top: 0; }
.multiples-stack { grid-template-columns: 1fr !important; gap: 10px; }
.multiples-stack .small-chart { height: 92px; }
.rank-two .topic-trends { grid-template-columns: 1fr !important; }
.rank-two .topic-trend { grid-template-columns: minmax(110px, 1fr) 150px 44px 56px; }

/* Domande: topic che si aprono */
.topic-head-row, .topic-row > summary { display: grid; grid-template-columns: minmax(200px, 1fr) auto 90px; gap: 16px; align-items: center; }
.topic-head-row { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.topic-head-row .mcols span { font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.mcols { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 8px; justify-items: center; }
.topic-row { border-bottom: 1px solid var(--line-soft); }
.topic-row > summary { list-style: none; cursor: pointer; padding: 12px 4px; }
.topic-row > summary::-webkit-details-marker { display: none; }
.topic-row > summary .topic-title::before { content: "▸"; display: inline-block; width: 14px; color: var(--faint); transition: transform .12s; }
.topic-row[open] > summary .topic-title::before { transform: rotate(90deg); }
.topic-row > summary:hover { background: var(--ai-soft); }
.topic-title { font-weight: 500; }
.mbox { width: 72px; height: 22px; border-radius: 6px; display: block; cursor: help; }
.mbox.empty { background: var(--line-soft); cursor: default; }
.topic-vis { font-weight: 600; font-size: 15px; }
.right { text-align: right; justify-self: end; }
.topic-qs { padding: 0 4px 14px 18px; }
.topic-qs .qtable th.m-col, .topic-qs .qtable td.m-col { width: 96px; }
.topics-card .heat-legend { margin-top: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mbox { width: 26px; height: 16px; border-radius: 4px; }
.mbox.none { background: #E4E4E7; }
.mbox.legend-box { display: inline-block; vertical-align: -3px; cursor: default; }
.mcols { grid-auto-columns: 84px; }

/* fonti esterne: badge grigio con icona, stessa forma di Rilevazione aimonitor */
.kpi-src-ext { color: var(--muted); background: #EDEDEA; padding: 2px 8px 2px 6px; border-radius: 999px; font-weight: 600; cursor: help; }
.kpi-src-ext img { width: 12px; height: 12px; }
.kpi.kpi-base .kpi-src-ext { background: #E7E7E3; }
.rows-pick a { display: inline-block; padding: 1px 7px; border-radius: 6px; margin-left: 2px; text-decoration: none; color: var(--text); }
.rows-pick a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.table-foot a { color: var(--search-dark); }

/* Panoramica, visite e conversioni: menu nell'intestazione, numeri nel carattere del testo */
.conv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.conv-pick label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.conv-pick select { font: inherit; font-size: 13.5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 30px 6px 10px; max-width: 260px; }
.card.conv .conv-line { margin: 4px 0 18px; padding: 12px 14px; background: var(--ai-soft); border-radius: 10px; font-size: 14.5px; }
table.conv-table td.num { font-family: "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ricerche di brand: viola del marchio per le rilevazioni aimonitor; i dati di Google restano blu e nei box grigi */
:root { --brandsec: #6E56CF; --brandsec-dark: #5746AF; --brandsec-soft: #F1EDFE; }
.nav-group.bsec { color: var(--brandsec-dark); } .nav-group.bsec .dot { background: var(--brandsec); }
.nav-item.sub.bsec.active { box-shadow: inset 3px 0 0 var(--brandsec); }
.kicker.bsec { color: var(--brandsec-dark); }
.card.trend-own.brand-own { border-top-color: var(--brandsec); }
.btn-report.brand-btn { color: var(--brandsec-dark); font-size: 12.5px; padding: 6px 11px; }
.btn-report.brand-btn:hover { border-color: var(--brandsec); background: var(--brandsec-soft); }
.src-tag { font-size: 10.5px; font-family: var(--mono); padding: 1px 5px; border-radius: 4px; background: var(--line-soft); color: var(--muted); }
.kpi-lg.bsec, .col-card.bsec { border-top-color: var(--brandsec); }
.kpi-lg.bsec .btn-report { color: var(--brandsec-dark); } .kpi-lg.bsec .btn-report:hover { border-color: var(--brandsec); background: var(--brandsec-soft); }
.lg-key-brand { background: var(--brandsec); }
.bsec .col-link, .col-link.brand-link { color: var(--brandsec-dark); }
.section-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 6px 0 10px; }
.section-title h2 { font-size: 17px; margin: 0; }
.lg-theme-new { background: var(--brandsec); } .lg-theme-stable { background: #fff; border: 1px solid var(--line-strong); }
.lg-theme-gone { background: repeating-linear-gradient(135deg, #fff 0 2px, var(--line-strong) 2px 3px); border: 1px solid var(--line-strong); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 8px; }
.theme-card { border-top: 3px solid var(--theme); padding: 16px 18px 18px; }
.theme-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.theme-head h3 { font-size: 14.5px; margin: 0; flex: 1; }
.theme-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--theme); flex: none; }
.theme-n { font-size: 20px; font-family: var(--display); font-weight: 600; color: var(--ink); }
.theme-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-chip { font-size: 13.5px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: default; }
.theme-chip.new { background: var(--brandsec); border-color: var(--brandsec); color: #fff; font-weight: 500; }
.theme-chip.dropped { color: var(--faint); text-decoration: line-through; background: transparent; border-style: dashed; }
.theme-term { font-size: 11px; opacity: 0.75; }
.theme-mini { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.theme-mini-row { display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: baseline; }
.theme-mini-row .lbl { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.theme-mini-row .lbl b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
@media (max-width: 700px) { .theme-mini-row { grid-template-columns: 1fr; } }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1200px) { .three-col { grid-template-columns: minmax(0, 1fr); } }

/* dati da altre piattaforme: riquadri bianchi come gli altri; la piattaforma si riconosce dall'etichetta,
   nel suo colore: Search Console blu, Google Analytics arancio, API Google giallo. Le rilevazioni aimonitor restano viola. */
.kpi.kpi-base { border-top-color: var(--line-strong); background: var(--card); }
.kpi.kpi-base:hover { background: #FCFCFB; }
.card.trend-base { border-top: 3px solid var(--line-strong); background: var(--card); }
.kpi-src-ext, .kpi.kpi-base .kpi-src-ext { color: var(--muted); background: #EFEFEC; }
.kpi-src-gsc, .kpi.kpi-base .kpi-src-gsc { color: #1D4ED8; background: #E8EFFE; }
.kpi-src-ga4, .kpi.kpi-base .kpi-src-ga4 { color: #B45309; background: #FEF1E4; }
.kpi-src-gads, .kpi.kpi-base .kpi-src-gads { color: #8A6100; background: #FDF4D9; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .kpis-4 { grid-template-columns: 1fr; } }
.rank-bar .sw-brand { background: var(--brandsec); }
table.data td.bar-col { width: 30%; }
table.data td.bar-col .rank-bar { display: block; height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
@media (max-width: 760px) { table.data .bar-col { display: none; } }

/* etichette della fonte: solo una nota piccola in grigio chiaro, senza sfondo (meno rumore) */
.kpi-src-own, .kpi-src-ext, .kpi.kpi-base .kpi-src-ext,
.kpi-src-gsc, .kpi.kpi-base .kpi-src-gsc, .kpi-src-ga4, .kpi.kpi-base .kpi-src-ga4, .kpi-src-gads, .kpi.kpi-base .kpi-src-gads {
  color: var(--faint); background: none; padding: 0; font-weight: 500; font-size: 11px; letter-spacing: .01em; }
.kpi-lg .kpi-src-own, .kpi-lg .kpi-src-ext { font-size: 11px; }
.kpi-src img { width: 11px; height: 11px; opacity: .55; }
/* nella sezione brand anche i dati di Search Console e delle API Google sono in viola */
.kpi.kpi-bsec { border-top-color: var(--brandsec); }
/* pulsante del report nella barra laterale */
.side-report { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 16px 4px; padding: 9px 12px;
  border-radius: 10px; background: var(--brand-fill); color: var(--on-brand); font-weight: 600; font-size: 14px; text-decoration: none; }
.side-report:hover { background: var(--brand-fill-hover); }

/* ---------------------------------------------------------------------------
   Tendine: un solo stile per dashboard e area team (bianche, bordo leggero,
   freccia disegnata, hover e focus viola). Le regole con !important servono
   perché diverse tendine hanno ancora "background: #fff" che azzererebbe la freccia.
   --------------------------------------------------------------------------- */
select:not(.title-select) {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-color: #fff; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding-right: 34px !important;
  box-shadow: 0 1px 2px rgba(24, 24, 27, .05);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236E56CF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.5 8 9.5 11 6.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 16px !important;
}
select:not(.title-select):hover { border-color: #BDB9CC; background-color: #FDFCFF; }
select:not(.title-select):focus, select:not(.title-select):focus-visible {
  outline: none; border-color: var(--brand-fill); box-shadow: 0 0 0 3px rgba(110, 86, 207, .16);
}
select:not(.title-select):disabled { opacity: .55; cursor: not-allowed; }
select option { color: var(--ink); background: #fff; }

/* barra in alto: progetto e mese come pillole */
.top .pill-select, .top .month-pick select, .top .pill-static {
  border-radius: 999px; font-weight: 600; font-size: 14px; padding-top: 7px; padding-bottom: 7px; height: 36px;
}
.top .pill-static { background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 1px 2px rgba(24, 24, 27, .05); padding-left: 14px; padding-right: 14px; display: inline-flex; align-items: center; }
.top .pill-select { padding-left: 34px; max-width: 320px; text-overflow: ellipsis; }
.top .month-pick select { padding-left: 36px; }
.top .pill-select {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236E56CF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.5 8 9.5 11 6.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236E56CF' stroke-width='1.5' stroke-linejoin='round'%3E%3Crect x='2.5' y='2.5' width='4.5' height='4.5' rx='1.2'/%3E%3Crect x='9' y='2.5' width='4.5' height='4.5' rx='1.2'/%3E%3Crect x='2.5' y='9' width='4.5' height='4.5' rx='1.2'/%3E%3Crect x='9' y='9' width='4.5' height='4.5' rx='1.2'/%3E%3C/svg%3E") !important;
  background-position: right 10px center, left 12px center !important; background-size: 16px, 15px !important;
}
.top .month-pick select {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236E56CF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.5 8 9.5 11 6.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236E56CF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='3.5' width='11' height='10' rx='2'/%3E%3Cpath d='M2.5 6.8h11M5.5 2v3M10.5 2v3'/%3E%3C/svg%3E") !important;
  background-position: right 10px center, left 13px center !important; background-size: 16px, 15px !important;
}
.month-vs { font-size: 12.5px; color: var(--muted); background: var(--line-soft); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.month-vs b { font-weight: 600; color: var(--text); }

/* tabelle con «mostra di più» e pagine */
.expand-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 4px; font-size: 13px; flex-wrap: wrap; }
.expand-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand); border: 0; border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.expand-btn:hover { background: #E7E0FD; }
.expand-btn .chev { width: 8px; height: 8px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.expand-btn .chev.up { transform: translateY(2px) rotate(-135deg); }
.expand-pager { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.expand-pager button { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--brand);
  font-size: 17px; line-height: 1; cursor: pointer; }
.expand-pager button:hover:not(:disabled) { border-color: var(--brand-fill); background: var(--brand-soft); }
.expand-pager button:disabled { color: var(--line-strong); cursor: default; }
table.data tr[hidden] { display: none; }
.table-card > .src-label { padding: 10px 20px 14px; }

/* configurazione del progetto (cliente) */
.flash { border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; background: #ECFDF3; color: #05603A; border: 1px solid #ABEFC6; }
.flash-error { background: #FEF3F2; color: #B42318; border-color: #FECDCA; }
.wiz-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 4px 0 18px; flex-wrap: wrap; }
.wiz-steps li a { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.wiz-n { width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--line-soft); color: var(--muted); font-size: 12px; }
.wiz-steps li.ok a { color: var(--ink); }
.wiz-steps li.ok .wiz-n { background: #ECFDF3; color: #067647; }
.wiz-steps li.on a { border-color: var(--brand-fill); color: var(--brand); box-shadow: 0 0 0 3px rgba(110, 86, 207, .12); }
.wiz-steps li.on .wiz-n { background: var(--brand-fill); color: #fff; }
.wiz-card { max-width: 760px; padding: 26px 28px; }
.wiz-card h2 { font-size: 20px; margin: 0 0 6px; }
.wiz-card > p, .wiz-card form > p { max-width: 640px; }
.wiz-text { width: 100%; font: inherit; font-size: 15px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; margin-top: 10px; resize: vertical; box-sizing: border-box; }
.wiz-text:focus { outline: none; border-color: var(--brand-fill); box-shadow: 0 0 0 3px rgba(110, 86, 207, .16); }
.wiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.wiz-actions:has(> :only-child) { justify-content: flex-end; }
.wiz-btn { margin-top: 0; }
.wiz-btn:disabled { opacity: .5; cursor: not-allowed; }
.wiz-facts { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 18px 0 0; font-size: 14px; }
.wiz-facts dt { color: var(--muted); } .wiz-facts dd { margin: 0; color: var(--ink); }
.wiz-google { margin-top: 18px; display: grid; gap: 10px; justify-items: start; }
.btn-google { display: inline-flex; align-items: center; gap: 12px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink); font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(24, 24, 27, .06); }
.btn-google:hover { border-color: #BDB9CC; background: #FDFCFF; }
.wiz-google p { max-width: 560px; }
.wiz-account { display: flex; align-items: flex-end; gap: 16px; margin: 16px 0 6px; flex-wrap: wrap; }
.wiz-account label { display: grid; gap: 6px; }
.wiz-account select, .wiz-field select { font: inherit; font-size: 14px; padding: 9px 12px; min-width: 340px; max-width: 100%; }
.wiz-field { display: grid; gap: 7px; margin-top: 18px; font-size: 14px; }
.wiz-field > span:first-child { font-weight: 600; color: var(--ink); }
.wiz-field .req { font-weight: 500; font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.wiz-field .faint { font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.empty-act { margin-top: 10px; }
