


.svp {
  --p-bg: rgba(246, 246, 246, .86);
  --p-ink: #1d1d1f;
  --p-ink2: rgba(60, 60, 67, .78);
  --p-ink3: rgba(60, 60, 67, .72);
  --p-line: rgba(0, 0, 0, .09);
  --p-btn: rgba(0, 0, 0, .06);
  --p-btn-h: rgba(0, 0, 0, .10);
  --p-orange: #F5863A;
  --p-blue: #007aff;
  --p-red: #ff3b30;
  font: 13px/1.32 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -.003em;
  width: 22.5em;
  color: var(--p-ink);
  background: var(--p-bg);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  backdrop-filter: blur(30px) saturate(1.8);
  border-radius: 1em;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18), 0 22px 60px -10px rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(255, 255, 255, .5);
  padding: 1.15em 1.2em 1.1em;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .svp {
    --p-bg: rgba(38, 38, 40, .86);
    --p-ink: #f5f5f7;
    --p-ink2: rgba(235, 235, 245, .7);
    --p-ink3: rgba(235, 235, 245, .55);
    --p-line: rgba(255, 255, 255, .09);
    --p-btn: rgba(255, 255, 255, .10);
    --p-btn-h: rgba(255, 255, 255, .16);
    --p-orange: #F5863A;
    --p-blue: #0a84ff;
    --p-red: #ff453a;
    box-shadow: 0 0 0 .5px rgba(0, 0, 0, .8), 0 30px 80px -10px rgba(0, 0, 0, .7), inset 0 0 0 .5px rgba(255, 255, 255, .12);
  }
}
:root[data-theme="dark"] .svp {
  --p-bg: rgba(38, 38, 40, .86);
  --p-ink: #f5f5f7;
  --p-ink2: rgba(235, 235, 245, .7);
  --p-ink3: rgba(235, 235, 245, .55);
  --p-line: rgba(255, 255, 255, .09);
  --p-btn: rgba(255, 255, 255, .10);
  --p-btn-h: rgba(255, 255, 255, .16);
  --p-orange: #F5863A;
  --p-blue: #0a84ff;
  --p-red: #ff453a;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .8), 0 30px 80px -10px rgba(0, 0, 0, .7), inset 0 0 0 .5px rgba(255, 255, 255, .12);
}
.svp b, .svp strong { font-weight: 600; }
.svp svg { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svp .sv-h { display: flex; align-items: center; gap: .55em; font-size: 1.16em; font-weight: 650; }
.svp .sv-h svg { width: 1.3em; height: 1.3em; }
.svp .sv-sub { color: var(--p-ink2); font-size: .92em; margin: .3em 0 0; }
.svp .sv-sec { font-size: .8em; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--p-ink3); margin: 1.25em 0 .55em; }
.svp .sv-row { display: grid; grid-template-columns: 1.6em 1fr; gap: .15em .55em; align-items: start; margin: 0 0 .7em; }
.svp .sv-row > svg { color: var(--p-ink2); margin-top: .05em; }
.svp .sv-row .t { font-size: 1.08em; }
.svp .sv-row .s { grid-column: 2; color: var(--p-ink2); font-size: .88em; line-height: 1.3; }
.svp .sv-row.claude > svg { color: var(--p-blue); }
.svp .sv-sug { display: flex; align-items: center; justify-content: space-between; font-weight: 650; font-size: 1.08em; margin: .9em 0 .2em; }
.svp .sv-mini { background: var(--p-btn); border-radius: .5em; padding: .3em .8em; font-weight: 500; font-size: .95em; border: 0; }
.svp .sv-line { display: flex; align-items: center; gap: .6em; margin: .75em 0 0; font-size: 1.04em; }
.svp .sv-step { display: inline-grid; width: 1.35em; height: 1.85em; border-radius: .35em; background: var(--p-btn); place-items: center; color: var(--p-ink2); font-size: .7em; line-height: .9; }
.svp .sv-check { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: .3em; background: var(--p-blue); color: #fff; }
.svp .sv-check svg { width: .85em; height: .85em; stroke-width: 2.6; }
.svp .sv-indent { color: var(--p-ink2); padding-left: 1.9em; margin-top: .3em; }
.svp .sv-max { display: flex; justify-content: space-between; align-items: center; gap: .6em; }
.svp .sv-val { display: inline-flex; align-items: center; gap: .6em; font-variant-numeric: tabular-nums; }
.svp .sv-why { color: var(--p-ink2); font-size: .86em; line-height: 1.3; margin: 0 0 .2em; }
.svp .sv-go {
  display: block; width: 100%; margin: 1em 0 .6em;
  border: 0; border-radius: 999px; padding: .62em 1em;
  background: var(--p-btn); color: var(--p-ink);
  font: 500 1.1em/1.2 inherit; cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}
.svp .sv-go:hover { background: var(--p-btn-h); }
.svp.invite .sv-go { box-shadow: 0 0 0 2px var(--p-orange), 0 0 30px -4px var(--p-orange); animation: sv-pulse 2.4s ease-in-out infinite; }
@keyframes sv-pulse { 50% { box-shadow: 0 0 0 4px rgba(245, 134, 58, .35), 0 0 40px -2px var(--p-orange); } }
.svp .sv-foot { color: var(--p-ink2); font-size: .82em; line-height: 1.35; margin: 0; }
.svp .sv-last { color: var(--p-ink2); font-size: .9em; margin: 0 0 .8em; padding: .55em .7em; border-radius: .6em; background: var(--p-btn); }
.svp .sv-run { background: rgba(245, 134, 58, .14); border-radius: .8em; padding: .85em .9em .9em; }
.svp .sv-dot { flex: none; width: .53em; height: .53em; border-radius: 50%; background: #F5863A; }
.svp .sv-run-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5em; }
.svp .sv-count { font: 600 1.6em/1 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.svp .sv-btns { display: flex; justify-content: space-between; gap: .6em; margin-top: .75em; }
.svp .sv-btns button { border: 0; border-radius: .5em; padding: .35em .8em; font: 500 .98em/1.2 inherit; background: var(--p-btn); color: var(--p-ink); cursor: pointer; }
.svp .sv-btns .red { background: var(--p-red); color: #fff; }
.svp .bump { animation: sv-bump .5s ease; }
@keyframes sv-bump { 30% { color: var(--p-orange); } }

/* stati: idle (normale), run (resta acceso), done (tornato normale) */
.svp [data-only] { display: none; }
.svp[data-state="idle"] [data-only~="idle"],
.svp[data-state="run"] [data-only~="run"],
.svp[data-state="done"] [data-only~="done"] { display: block; }
.svp[data-state="idle"] .sv-row[data-only~="idle"],
.svp[data-state="run"] .sv-row[data-only~="run"],
.svp[data-state="done"] .sv-row[data-only~="done"] { display: grid; }

/* ---------- la barra dei menu del Mac ---------- */
.menubar {
  display: flex; align-items: center; gap: 1.1em;
  height: 2.05em; padding: 0 .9em;
  font: 500 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: #1d1d1f;
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  white-space: nowrap; overflow: hidden;
}
.menubar .app { font-weight: 700; }
.menubar .gap { flex: 1; }
.menubar .ic { display: inline-flex; align-items: center; gap: .3em; }
.menubar svg { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* il segno «not»: la «n» alta quanto le cifre (0,705 em in SF); da spento la «o» è un anello del
   colore della barra, da acceso un punto arancione pieno, e basta (il tempo sta nel pannello) */
.menubar .not { padding: .22em .45em; margin: 0 -.45em; border-radius: .35em; }
.menubar .not svg { width: 2.01em; height: .945em; fill: currentColor; stroke: none; }
.menubar .not .o-on { display: none; fill: #F5863A; }
.menubar .not.on .o-on { display: inline; }
.menubar .not.on .o-off { display: none; }
.menubar .not.open { background: rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .menubar { color: #f5f5f7; background: rgba(28, 28, 32, .55); }
  :root:not([data-theme="light"]) .menubar .not.open { background: rgba(255, 255, 255, .2); }
}
:root[data-theme="dark"] .menubar { color: #f5f5f7; background: rgba(28, 28, 32, .55); }
:root[data-theme="dark"] .menubar .not.open { background: rgba(255, 255, 255, .2); }

/* ---------- il telefono e le notifiche ---------- */
.phone {
  --w: 300px;
  width: var(--w); aspect-ratio: 9 / 19.2;
  border-radius: calc(var(--w) * .16);
  padding: calc(var(--w) * .035);
  background: linear-gradient(145deg, #3a3b40, #121316 40%, #2a2b30);
  box-shadow: 0 0 0 1.5px #5a5b60 inset, var(--shadow-lg);
  position: relative;
}
.phone-screen {
  position: relative; height: 100%; border-radius: calc(var(--w) * .13); overflow: hidden;
  background: radial-gradient(120% 70% at 30% 10%, #2b3a6b 0%, transparent 60%), radial-gradient(90% 60% at 90% 90%, #6b3b2b 0%, transparent 60%), #0b0d16;
  color: #fff; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  container-type: inline-size;
}
.phone-island { position: absolute; top: 3.2cqw; left: 50%; transform: translateX(-50%); width: 30cqw; height: 9cqw; border-radius: 99px; background: #000; z-index: 2; }
.phone-clock { text-align: center; margin-top: 15cqw; }
.phone-clock .d { font-size: 5.2cqw; font-weight: 600; opacity: .85; }
.phone-clock .h { font: 300 25cqw/1 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 1cqw; }
.phone-notes { position: absolute; left: 4cqw; right: 4cqw; bottom: 10cqw; display: flex; flex-direction: column-reverse; gap: 2.6cqw; }
.note {
  display: grid; grid-template-columns: 10.5cqw minmax(0, 1fr) auto; gap: .2cqw 2.6cqw; align-items: start;
  padding: 3.4cqw 3.5cqw; border-radius: 6.5cqw;
  background: rgba(245, 245, 250, .2);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18);
  font-size: 3.9cqw; line-height: 1.28;
  transform-origin: 50% 100%;
}
.note .ico { grid-row: span 2; width: 10.5cqw; height: 10.5cqw; border-radius: 2.6cqw; background: #2f8f83; display: grid; place-items: center; }
.note .ico svg { width: 6cqw; height: 6cqw; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note .ti { font-weight: 650; letter-spacing: -.016em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note .when { font-size: 3.3cqw; opacity: .65; }
.note .bo { grid-column: 2 / 4; opacity: .92; }
.note.hot .ico { background: #d9562b; }
.note.ask .ico { background: #b7791f; }
.js .note.pending { opacity: 0; transform: translateY(20px) scale(.92); }
.note { transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }

/* ---------- il tabellone delle partenze ---------- */
.board {
  --cell: 1.05em;
  background: #0d0e10; color: #F5863A;
  border-radius: 14px; padding: 18px 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), var(--shadow-lg);
  font: 700 clamp(14px, 1.6vw, 20px)/1 var(--font-mono);
  letter-spacing: .02em;
}
.board-head { display: flex; justify-content: space-between; color: rgba(255, 255, 255, .45); font: 600 .62em/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.board-row { display: flex; gap: 1.1em; padding: .42em 0; border-top: 1px solid rgba(255, 255, 255, .06); align-items: center; }
.board-row .time { color: #fff; }
.board-row .what { flex: 1; }
.board-row .st { font-size: .7em; color: rgba(255, 255, 255, .5); }
.board-row.now .st { color: #4ad482; }
.flap { display: inline-block; min-width: .62em; text-align: center; position: relative; }

/* ---------- il MacBook (--c: 0 aperto, 1 chiuso) ----------
   Tre pezzi fratelli sotto una sola prospettiva, senza preserve-3d annidati:
   WebKit li disegna nell'ordine del DOM (tastiera, retro, schermo). */
.mbp {
  --w: min(860px, 90vw);
  --c: 0;
  --open: 12deg;            /* il coperchio aperto pende un po' indietro */
  position: relative;
  width: var(--w);
  aspect-ratio: 16 / 10.4;
  margin: 0 auto;
  perspective: calc(var(--w) * 2.2);
  perspective-origin: 50% -55%;
}
.mbp-base, .mbp-face, .mbp-cover { position: absolute; }
.mbp-base {
  left: -2.2%; right: -2.2%; top: 100%;
  height: 100%;
  transform-origin: 50% 0;
  transform: rotateX(90deg);
  border-radius: calc(var(--w) * .004) calc(var(--w) * .004) calc(var(--w) * .035) calc(var(--w) * .035);
  background: linear-gradient(180deg, #a9abb2 0%, #cfd1d6 6%, #d7d9dd 60%, #c2c4ca 100%);
  box-shadow: inset 0 0 0 calc(var(--w) * .002) rgba(255,255,255,.4), 0 calc(var(--w) * .02) calc(var(--w) * .05) rgba(0,0,0,.35);
}
.mbp-keys {
  position: absolute; left: 7.5%; right: 7.5%; top: 7%; height: 47%;
  border-radius: calc(var(--w) * .006);
  background: #1d1e22;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(6.66% - .35%), transparent calc(6.66% - .35%) 6.66%), repeating-linear-gradient(180deg, #000 0 calc(16.66% - 1.2%), transparent calc(16.66% - 1.2%) 16.66%);
  -webkit-mask-composite: source-in;
  mask: repeating-linear-gradient(90deg, #000 0 calc(6.66% - .35%), transparent calc(6.66% - .35%) 6.66%) intersect, repeating-linear-gradient(180deg, #000 0 calc(16.66% - 1.2%), transparent calc(16.66% - 1.2%) 16.66%);
}
.mbp-pad { position: absolute; left: 30%; right: 30%; top: 59%; bottom: 6%; border-radius: calc(var(--w) * .01); background: #c9cbd0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.mbp-face, .mbp-cover {
  inset: 0;
  transform-origin: 50% 100%;
  border-radius: calc(var(--w) * .028) calc(var(--w) * .028) calc(var(--w) * .006) calc(var(--w) * .006);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.mbp-face {
  transform: rotateX(calc(var(--open) - var(--c) * (90deg + var(--open))));
  background: #0b0b0d;
  padding: calc(var(--w) * .015) calc(var(--w) * .015) calc(var(--w) * .021);
  box-shadow: inset 0 0 0 calc(var(--w) * .0018) #45464c;
}
.mbp-cover {
  transform: rotateX(calc(var(--open) - var(--c) * (90deg + var(--open)))) rotateY(180deg);
  background: linear-gradient(175deg, #e3e4e8, #c4c6cc 60%, #b3b5bc);
  box-shadow: inset 0 0 0 calc(var(--w) * .002) rgba(255,255,255,.55);
}
.mbp-screen {
  position: relative; height: 100%; border-radius: calc(var(--w) * .008); overflow: hidden;
  container-type: inline-size;
  background: var(--wall);
}
.mbp-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 40%);
}
.mbp-dark { position: absolute; inset: 0; background: #000; opacity: calc(var(--c) * 1.4 - .25); pointer-events: none; z-index: 5; }
.mbp-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 13%; height: 3.4cqw; background: #0b0b0d; border-radius: 0 0 1.2cqw 1.2cqw; z-index: 3; }
.mbp-screen .menubar { font-size: 1.32cqw; height: 3.4cqw; position: relative; z-index: 2; }

/* finestra del Terminale sul desktop finto */
.term {
  position: absolute; left: 4cqw; top: 8.5cqw; width: 50cqw;
  border-radius: 1.3cqw; overflow: hidden;
  background: rgba(22, 23, 27, .92);
  box-shadow: 0 2cqw 5cqw rgba(0,0,0,.45), inset 0 0 0 .1cqw rgba(255,255,255,.12);
  font: 500 1.28cqw/1.6 var(--font-mono); color: #d8dbe2;
}
.term-bar { height: 3cqw; display: flex; align-items: center; gap: .7cqw; padding: 0 1.2cqw; background: rgba(255,255,255,.05); color: rgba(255,255,255,.45); font: 600 1.1cqw/1 -apple-system, sans-serif; }
.term-bar i { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: #ff5f57; display: block; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin: 0 auto; transform: translateX(-2cqw); }
.term-body { padding: 1.4cqw 1.8cqw 1.8cqw; white-space: pre; }
.term .p { color: #8be28b; } .term .d { color: rgba(255,255,255,.45); } .term .a { color: #F5863A; } .term .ok { color: #8be28b; }
.term .bar { display: inline-block; width: 18cqw; height: 1cqw; border-radius: 1cqw; background: rgba(255,255,255,.12); vertical-align: middle; overflow: hidden; }
.term .bar b { display: block; height: 100%; width: var(--pct, 58%); background: #F5863A; transition: width .4s ease; }
.mbp-screen .svp { position: absolute; right: 2.2cqw; top: 3.9cqw; font-size: 1.12cqw; z-index: 1; }
