/* Dashboard dei percorsi Unlike · grafica dal Design System Unlike Academy */

@font-face { font-family: "Open Sauce Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/open-sauce-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/open-sauce-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/open-sauce-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/open-sauce-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Open Sauce Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("assets/fonts/open-sauce-sans-800.woff2") format("woff2"); }
@font-face { font-family: "Noto Serif Display"; font-style: italic; font-weight: 400 900; font-stretch: 62.5% 100%; font-display: swap; src: url("assets/fonts/noto-serif-display-wdth-italic.woff2") format("woff2-variations"); }

:root {
  --paper: #F3F2EE;
  --paper-2: #E9E7E1;
  --surface: #FFFFFF;
  --ink: #3B3638;
  --ink-2: #5A5456;
  --ink-3: #8A8587;
  --line: #E2DED6;
  --pink: #CD2471;
  --pink-dark: #A81B5B;
  --pink-soft: #FBE9F1;
  --blue: #227CC0;
  --blue-soft: #E3EEF8;
  --purple: #5B38C4;
  --gradient: linear-gradient(95deg, #227CC0 0%, #5B38C4 50%, #CD2471 100%);
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(59, 54, 56, .06), 0 6px 20px rgba(59, 54, 56, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Open Sauce Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Noto Serif Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(205, 36, 113, .45); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.boot { padding: 40vh 16px 0; text-align: center; color: var(--ink-3); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }

/* ---------- barra in alto ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 242, 238, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-nav { margin-left: auto; display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { border-color: var(--ink-3); }
.chip svg { width: 16px; height: 16px; }
.chip.is-rules { border-color: rgba(205, 36, 113, .35); color: var(--pink-dark); background: var(--pink-soft); }
@media (max-width: 420px) { .chip .t-long { display: none; } .chip { padding: 0 10px; } .brand span { display: none; } }

/* ---------- testata del percorso ---------- */
.hero { padding: 28px 0 8px; }
.kicker { margin: 0 0 6px; color: var(--ink-2); font-weight: 600; }
.path-title { margin: 0; line-height: 1.02; }
.path-title .da { display: block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(30px, 8vw, 46px); letter-spacing: -.03em; color: var(--pink); }
.path-title .a { display: block; margin-top: 4px; font-weight: 800; font-size: clamp(24px, 6.4vw, 38px); letter-spacing: .01em; text-transform: uppercase; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.path-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }

.progress { margin: 18px 0 0; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.progress-top b { color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.bar { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--gradient); transition: width .5s var(--ease); }
.bar.small { height: 6px; }

.now {
  margin: 18px 0 0; display: flex; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  text-decoration: none;
}
.now-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); flex: 0 0 auto; box-shadow: 0 0 0 5px rgba(205, 36, 113, .15); }
.now small { display: block; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.now strong { display: block; font-size: 15px; line-height: 1.3; }
.now .chev { margin-left: auto; }

/* ---------- elenco tappe ---------- */
.sec-title { margin: 30px 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.mods { display: grid; gap: 10px; }
.mod-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; border: 1px solid transparent;
  transition: transform .15s var(--ease), border-color .2s var(--ease);
}
.mod-card:active { transform: scale(.99); }
.mod-card:hover { border-color: var(--line); }
.mod-label {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
  background: var(--paper); color: var(--ink);
}
.mod-main { flex: 1; min-width: 0; }
.mod-main h2, .mod-main h3 { margin: 4px 0 2px; font-size: 16px; line-height: 1.25; font-weight: 700; }
.mod-count { font-size: 13px; color: var(--ink-3); }
.mod-main .bar { margin-top: 8px; }
.chev { color: var(--ink-3); font-size: 22px; line-height: 1; flex: 0 0 auto; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em; background: var(--paper); color: var(--ink-2); }
.st-in_corso .badge { background: var(--pink); color: #fff; }
.st-in_corso .mod-label { background: var(--pink-soft); color: var(--pink-dark); }
.st-fatta .badge, .st-prima .badge { background: var(--blue-soft); color: var(--blue); }
.st-fatta .mod-label, .st-prima .mod-label { background: var(--blue-soft); color: var(--blue); }
.st-chiusa .badge { background: var(--paper-2); color: var(--ink-2); }
.st-futura { opacity: .62; }
.st-futura .badge { background: transparent; border: 1px dashed var(--ink-3); color: var(--ink-2); }

/* ---------- pagina della tappa ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 0; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; min-height: 40px; }
.mod-head { display: flex; gap: 14px; align-items: flex-start; margin: 8px 0 0; }
.mod-head .mod-label { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.mod-head h1 { margin: 6px 0 4px; font-size: clamp(22px, 5.6vw, 28px); line-height: 1.15; letter-spacing: -.02em; }
.mod-dates { margin: 0; color: var(--ink-3); font-size: 14px; }

.callout {
  display: flex; gap: 12px; margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); font-size: 15px;
}
.callout.arrow { background: var(--pink-soft); box-shadow: none; }
.callout.info { background: var(--blue-soft); box-shadow: none; }
.callout-ico { flex: 0 0 auto; font-size: 20px; line-height: 1.3; }
.callout-body strong { font-weight: 700; }

.lock-note { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-s); background: var(--paper-2); color: var(--ink-2); font-size: 14px; font-weight: 600; }

.res-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.res { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid transparent; }
.res.is-open { border-color: var(--line); }
.res-row { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 6px; }
.chk {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer; border-radius: 12px; padding: 0;
}
.chk i {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink-3);
  display: grid; place-items: center; transition: background .15s var(--ease), border-color .15s var(--ease);
}
.chk svg { width: 16px; height: 16px; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s var(--ease); }
.is-done .chk i { background: var(--pink); border-color: var(--pink); }
.is-done .chk svg { opacity: 1; transform: none; color: #fff; }
.chk:disabled { cursor: not-allowed; opacity: .45; }
.res-title {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; text-align: left; cursor: pointer; padding: 8px 6px; min-height: 44px;
}
.res-texts { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.res-type { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.res-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.is-done .res-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(138, 133, 135, .5); }
.res-meta { font-size: 12.5px; color: var(--ink-3); }
.res-meta .opt { color: var(--blue); font-weight: 700; }
.res .chev { transition: transform .2s var(--ease); padding-right: 4px; }
.res.is-open .chev { transform: rotate(90deg); }
.t-meeting .res-type { color: var(--pink-dark); }
.t-video .res-type { color: var(--blue); }

.res-body { padding: 0 16px 16px 58px; font-size: 15px; color: var(--ink); }
@media (max-width: 420px) { .res-body { padding-left: 16px; } }
.res-body p { margin: 0 0 10px; }
.res-text { margin: 0 0 12px; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; text-decoration: none; text-align: center; line-height: 1.2;
  transition: background .15s var(--ease), transform .06s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2C2729; }
.btn-accent { background: var(--pink); color: #fff; }
.btn-accent:hover { background: var(--pink-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn[aria-disabled="true"], .btn:disabled { background: var(--paper-2); color: var(--ink-3); cursor: not-allowed; }
.gate-note, .elena-note {
  margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-s); font-size: 14px;
  background: var(--paper); color: var(--ink-2);
}
.elena-note { background: var(--pink-soft); color: var(--pink-dark); font-weight: 600; }
.gate-note b { color: var(--ink); }

.fb { margin: 14px 0 0; }
.fb label, .note-box label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 12px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--paper); font-size: 15px; line-height: 1.45;
}
textarea:focus { outline: none; border-color: var(--pink); background: #fff; }
.saved { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--ink-3); min-height: 16px; }

.note-box { margin: 22px 0 0; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.note-box textarea { min-height: 110px; }

.next-mod { margin: 22px 0 0; display: flex; justify-content: flex-end; }

/* ---------- regole e note ---------- */
.page-title { margin: 10px 0 0; font-size: clamp(24px, 6vw, 32px); letter-spacing: -.02em; line-height: 1.15; }
.rules { margin: 16px 0 0; padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-size: 15.5px; line-height: 1.6; }
.rules strong { font-weight: 700; }
.notes-list { display: grid; gap: 10px; margin: 16px 0 0; }

/* ---------- accesso ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; padding: 28px 22px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.login-card img { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.login-card h1 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.login-card h1 em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--pink); letter-spacing: -.03em; }
.login-card p { color: var(--ink-2); margin: 10px 0 0; font-size: 15px; }
.field { margin: 18px 0 0; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; }
.field input:focus { outline: none; border-color: var(--pink); background: #fff; }
.login-card .btn { width: 100%; margin-top: 12px; }
.msg { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-s); font-size: 14px; }
.msg.ok { background: var(--blue-soft); color: #185d93; }
.msg.err { background: var(--pink-soft); color: var(--pink-dark); }
.demo-box { margin: 22px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line); }
.demo-box h2 { margin: 0 0 4px; font-size: 14px; }
.demo-box p { margin: 0 0 10px; font-size: 13.5px; }
.demo-btns { display: grid; gap: 8px; }
.demo-btns .btn { margin: 0; }

/* ---------- avvisi ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 16px;
  background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.demo-banner { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 6px 12px; }
.demo-banner a { color: #fff; font-weight: 700; }

.foot { margin: 40px 0 0; text-align: center; color: var(--ink-3); font-size: 13px; }
.foot button { border: 0; background: none; text-decoration: underline; cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 8px; }

@media (min-width: 900px) {
  .wrap, .top-in { max-width: 820px; }
  .mods { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
