/* checkOne — stile allineato al brand Leviahub (www.leviahub.com)
 * Token: accento arancione #ff7415, scuri #12181b/#374952, chiaro #f5f8fb,
 * bottoni scuri uppercase letter-spaced, font Montserrat. Tema chiaro (brand) + scuro.
 */

/* TEMA CHIARO = look del sito Leviahub (default) */
:root, [data-theme="light"] {
  --bg: #f5f8fb;          /* --light-grey */
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --text: #12181b;        /* --p-grey */
  --slate: #374952;       /* --grey */
  --muted: #758696;
  --accent: #ff7415;      /* --orange */
  --accent-press: #e0640f;
  --dark: #1a1b1f;        /* bottoni brand */
  --dark-hover: #32343a;
  --dark-active: #43464d;
  --star: #ff7415;
  --star-off: #d7dee7;
  --border: #e4ebf3;
  --danger: #ea384c;
  --shadow: 0 10px 30px rgba(18,24,27,.08);
}
[data-theme="dark"] {
  --bg: #0e1316;          /* ~ --dark-grey #090c0e */
  --panel: #161b1f;
  --panel-2: #1f262b;
  --text: #f5f8fb;
  --slate: #8fa8b4;
  --muted: #8fa8b4;
  --accent: #ff7415;
  --accent-press: #ff8a3d;
  --dark: #f5f8fb;        /* su scuro i bottoni "dark" diventano chiari */
  --dark-hover: #e1e8ef;
  --dark-active: #cdd6df;
  --star: #ff7415;
  --star-off: #3a4650;
  --border: #28333a;
  --danger: #ff5c6c;
  --shadow: 0 10px 30px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px; border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.brand-name strong { color: var(--accent); font-weight: 800; }
.brand-by { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.brand-by .levia-logo { height: 16px; width: auto; display: block; }
[data-theme="dark"] .brand-by .levia-logo { filter: brightness(1.15); }
.controls { display: flex; gap: 8px; align-items: center; }
select, .icon-btn {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; cursor: pointer; font-size: 14px; font-family: inherit;
}
.icon-btn { font-size: 16px; line-height: 1; }

.container { max-width: 720px; margin: 0 auto; padding: 34px 18px 60px; }
.view { animation: fade .35s ease; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 22px; padding: 30px; margin-bottom: 18px; box-shadow: var(--shadow);
}
h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; font-weight: 800; letter-spacing: -1px; }
h2 { font-size: 24px; margin: 0 0 10px; font-weight: 800; letter-spacing: -.5px; }
h3 { font-size: 16px; margin: 0 0 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.lead { color: var(--muted); font-size: 16px; }
.note { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* bottoni in stile Leviahub: scuri, UPPERCASE, letter-spacing */
.btn-primary {
  background: var(--dark); color: var(--bg);
  border: 0; border-radius: 6px;
  padding: 14px 28px; font-size: 13px; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: 2px; font-family: inherit;
  margin-top: 14px; transition: background .2s, transform .1s;
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { background: var(--dark-hover); }
.btn-primary:active { background: var(--dark-active); transform: scale(.99); }
/* CTA accentata arancione per il passo chiave (avvio analisi) */
.btn-primary.accent { background: var(--accent); color: #fff; }
.btn-primary.accent:hover { background: var(--accent-press); }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 11px 20px; cursor: pointer; font-size: 12px;
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; font-family: inherit;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* analisi in corso */
.steps { list-style: none; padding: 0; margin: 20px 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); }
.steps li.active { color: var(--text); font-weight: 600; }
.steps li.done { color: var(--accent); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--star-off); flex: none; }
.steps li.active .dot { background: var(--accent); animation: pulse 1s infinite; }
.steps li.done .dot { background: var(--accent); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.progress { height: 8px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* risultato */
.result-head { text-align: center; }
.stars { font-size: 46px; letter-spacing: 8px; margin-bottom: 6px; }
.stars .on { color: var(--star); }
.stars .off { color: var(--star-off); }
.score-badge {
  display: inline-block; margin-top: 12px; padding: 7px 16px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 30px; font-weight: 700; font-size: 14px;
}
.specs { width: 100%; border-collapse: collapse; }
.specs td { padding: 10px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.specs td:first-child { color: var(--muted); width: 46%; }
.specs td:last-child { font-weight: 600; }

/* form */
form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); margin-top: 10px; text-transform: uppercase; letter-spacing: .5px; }
input, textarea {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; font-size: 14px;
  font-family: inherit; text-transform: none; letter-spacing: normal;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.consent { flex-direction: row; align-items: flex-start; gap: 8px; margin-top: 16px; text-transform: none; letter-spacing: normal; font-size: 13px; }
.consent input { margin-top: 3px; }
.captcha { text-transform: none; letter-spacing: normal; font-size: 13px; }
.captcha strong { color: var(--accent); font-size: 16px; }
.captcha input { max-width: 130px; }
.hp { position: absolute; left: -9999px; }

.debug { margin-top: 16px; }
.debug summary { cursor: pointer; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.debug .specs td { font-size: 13px; }
.debug .specs td:last-child { font-family: ui-monospace, "Cascadia Code", monospace; font-weight: 500; }

.foot {
  max-width: 720px; margin: 0 auto; padding: 22px 18px;
  display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.foot a { color: var(--accent); text-decoration: none; text-transform: none; letter-spacing: normal; }

@media (max-width: 560px) {
  form .grid2 { grid-template-columns: 1fr; }
  h1 { font-size: 27px; }
  .container { padding-top: 24px; }
}
