/* =====================================================================
   Blueprint Marketplace Hevolus — foglio di stile
   Token di brand copiati dal sito delivery (design/delivery-extra.css.txt):
   Ink (grafite) + Electric (violet → cyan) + Lime. Tema SOLO CHIARO.
   I componenti Radzen prendono i colori dalle variabili --rz-*.
   Il foglio è diviso per area — base, layout, pagine, catalogo, scheda, interno — e index.html
   li carica in quest'ordine: una regola spostata da un file all'altro può cambiare quale vince.
   ===================================================================== */

:root {
  --brand-ink: #1b1c2b;
  --brand-ink-2: #262844;
  --brand-ink-3: #33355f;
  --brand-violet: #6d5efc;
  --brand-violet-2: #8b7dff;
  --brand-violet-ink: #5a4fe0;
  --brand-cyan: #12b6cf;
  --brand-magenta: #e05aa8;
  --brand-lime: #b9ee2e;
  --brand-lime-ink: #5a7a00;
  --brand-rainbow: linear-gradient(90deg, var(--brand-lime), var(--brand-cyan) 38%, var(--brand-violet) 72%, var(--brand-magenta));

  --bg: #fbfbfd;
  --surface: #ffffff;
  --fg: var(--brand-ink);
  --muted: #5f6176;
  --hairline: rgba(27, 28, 43, .12);
  --shadow: 0 1px 2px rgba(20, 21, 43, .06), 0 8px 24px rgba(20, 21, 43, .08);
  --shadow-hover: 0 2px 6px rgba(20, 21, 43, .10), 0 18px 44px rgba(20, 21, 43, .16);
  --radius: .9rem;

  /* stati delle schede e delle issue */
  --st-idea: #6d5efc;           --st-idea-bg: #efecff;
  --st-promossa: #0e7490;       --st-promossa-bg: #e0f6fa;
  --st-costruzione: #c98a12;    --st-costruzione-bg: #fdf6dd;
  --st-pronta: #16a34a;         --st-pronta-bg: #eaf7ee;
  --st-produzione: #1b1c2b;     --st-produzione-bg: #e6e7f2;
  --st-sumisura: #b4537a;       --st-sumisura-bg: #fbe9f1;
  --st-scartata: #6b7280;       --st-scartata-bg: #eef0f3;
  --st-usecase: #2563a8;        --st-usecase-bg: #e8f0fb;

  /* Radzen */
  --rz-primary: var(--brand-violet);
  --rz-primary-dark: var(--brand-violet-ink);
  --rz-primary-light: var(--brand-violet-2);
  --rz-secondary: var(--brand-ink-3);
  --rz-info: var(--brand-cyan);
  --rz-success: #16a34a;
  --rz-warning: #c98a12;
  --rz-danger: #dc2626;
  --rz-text-color: var(--brand-ink);
  --rz-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --rz-border-radius: .6rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--brand-violet-ink); text-decoration-color: rgba(90, 79, 224, .35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .6rem; color: var(--brand-ink); }
h1 { font-size: 2.1rem; }
h1::after { content: ""; display: block; width: 4.5rem; height: .32rem; margin: .7rem 0 0; border-radius: 1rem;
  background: linear-gradient(90deg, var(--brand-violet), var(--brand-magenta)); }
.hero h1::after { display: none; }
h2 { font-size: 1.45rem; border-top: 2px solid var(--hairline); padding-top: 1.4rem; margin-top: 2.2rem; }
h2.prima, section > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
/* Blazor porta il focus sull'h1 a ogni cambio di pagina (FocusOnNavigate, per i lettori di schermo): niente riquadro. */
h1:focus { outline: none; }
h3 { font-size: 1.1rem; margin-top: 1.4rem; }
p { margin: 0 0 1rem; }
code { font-family: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas, monospace; font-size: .9em;
  background: #f1f1f7; padding: .1em .35em; border-radius: .3rem; }
pre { background: #141528; color: #ece9e4; padding: 1rem 1.1rem; border-radius: .7rem; overflow: auto; font-size: .9rem; line-height: 1.5; }
pre code { background: transparent; padding: 0; color: inherit; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.2rem; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
blockquote { margin: 0 0 1rem; padding: .6rem 1rem; border-left: 4px solid var(--brand-violet-2); background: #f6f5ff; border-radius: 0 .5rem .5rem 0; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }
.muted { color: var(--muted); }

/* ---- Avvio ---- */
.avvio { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: .8rem; color: var(--muted); }
.avvio__marchio { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; color: var(--brand-ink); }
.avvio__barra { width: 220px; height: .4rem; border-radius: 1rem; background: #e6e6f0; overflow: hidden; margin: 0 auto; }
.avvio__barra span { display: block; height: 100%; width: 40%; border-radius: 1rem; background: var(--brand-rainbow); animation: avvio 1.2s ease-in-out infinite alternate; }
@keyframes avvio { from { transform: translateX(-60%); } to { transform: translateX(250%); } }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fdeaea; color: #7f1d1d; padding: .8rem 1.2rem; box-shadow: 0 -1px 4px rgba(0,0,0,.1); z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---- Pulsanti ---- */
.btn { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--brand-ink); background: var(--brand-ink); color: #fff; border-radius: 2rem; padding: .6rem 1.3rem; font: 700 .92rem/1 inherit; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--brand-ink); border-color: var(--hairline); }
.btn--ghost:hover { background: #f1f1f7; color: var(--brand-ink); box-shadow: none; }
.btn--voto { background: var(--brand-violet); border-color: var(--brand-violet); }
.btn--voto:hover { background: var(--brand-violet-ink); }
.btn--voto.on { background: var(--brand-lime); border-color: var(--brand-lime); color: var(--brand-ink); }
.btn--piccolo { padding: .4rem .9rem; font-size: .82rem; }

/* ---- Badge di stato ---- */
.stato { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 1rem; font-size: .74rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.stato::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.stato--idea { color: var(--st-idea); background: var(--st-idea-bg); }
.stato--promossa { color: var(--st-promossa); background: var(--st-promossa-bg); }
.stato--in-costruzione { color: var(--st-costruzione); background: var(--st-costruzione-bg); }
.stato--pronta { color: var(--st-pronta); background: var(--st-pronta-bg); }
.stato--in-produzione { color: var(--st-produzione); background: var(--st-produzione-bg); }
.stato--su-misura { color: var(--st-sumisura); background: var(--st-sumisura-bg); }
.stato--scartata { color: var(--st-scartata); background: var(--st-scartata-bg); }
.stato--use-case { color: var(--st-usecase); background: var(--st-usecase-bg); }
.stato--nessuno { color: var(--muted); background: #eef0f3; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 1rem; font-size: .76rem; font-weight: 600; background: #f1f1f7; color: #4c4e66; white-space: nowrap; }
.chip--bozza { background: #fdf6dd; color: #8a5a00; }
.chip--prossima { background: var(--brand-lime); color: var(--brand-ink); }
.chip--cliente { background: var(--st-sumisura-bg); color: var(--st-sumisura); }
.chip--produzione { background: #e3f6ea; color: #17733a; }
.stato-catalogo { background: #e3f6ea; color: #17733a; }
.stato-nuovo { background: #ecebff; color: #6d5efc; }
.stato-disponibile { background: #e1effd; color: #1d5fa8; }
.stato-scheda { background: #ececf1; color: #5b5d73; }
.stato-claude-code { background: #fdf0d5; color: #8a5a00; }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---- Issue ---- */
.issue { display: grid; gap: .4rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.issue__testa { display: flex; justify-content: space-between; gap: .7rem; align-items: flex-start; flex-wrap: wrap; }
.issue__num { color: var(--muted); font-size: .8rem; font-family: "SFMono-Regular", Consolas, monospace; }
.issue h3 { margin: 0; font-size: 1.02rem; }
.issue h3 a { color: var(--brand-ink); text-decoration: none; }
.issue__sommario { color: #4c4e66; font-size: .92rem; margin: 0; }
.issue__meta { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.issue__incoerenze { font-size: .8rem; color: #8a5a00; }
.filtri { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.filtri button { font: 600 .82rem inherit; border: 1px solid var(--hairline); background: var(--surface); color: var(--brand-ink); border-radius: 1rem; padding: .3rem .8rem; cursor: pointer; }
.filtri button.on { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }
.griglia-issue { display: grid; gap: .8rem; margin: 0 0 2rem; }

/* ---- Markdown delle pagine di contenuto ---- */
.md h1 { font-size: 2rem; }
.md h2 { font-size: 1.4rem; }
.md ul, .md ol { padding-left: 1.4rem; }
.md li { margin: .25rem 0; }
.md table { display: block; overflow-x: auto; }
.md img { max-width: 100%; height: auto; }
