/* ============================================================
   Marco Milanello — extras: diagnosi, Milo, bookmark, indice
   ============================================================ */

/* ---- Margin thread index (desktop) ---- */
.thread-index { display: none; }
@media (min-width: 1180px) {
  .thread-index { display: flex; flex-direction: column; align-items: center; gap: 0;
    position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 40; }
}
.thread-index .ti-line { width: 1.5px; height: 26px; background: var(--line); position: relative; overflow: hidden; }
.thread-index .ti-line i { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .4s; display: block; }
.thread-index .ti-line.full i { transform: scaleY(1); }
.ti-node { position: relative; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.ti-node::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: var(--paper); transition: all .3s; }
.ti-node.on::before { width: 10px; height: 10px; border-color: var(--accent); background: var(--accent); }
.ti-node .ti-lab { position: absolute; right: 26px; top: 50%; transform: translateY(-50%) translateX(4px);
  font-family: var(--sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; color: var(--accent);
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.55rem;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.ti-node:hover .ti-lab { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---- Bookmark CTA (paper tab, right edge) ---- */
.bookmark { position: fixed; right: 0; top: 58%; z-index: 45;
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  color: #fff; background: var(--accent);
  padding: 0.9rem 0.5rem; border-radius: 8px 0 0 8px;
  box-shadow: -4px 4px 14px -6px rgba(108,61,32,0.5);
  transform: translateX(110%); transition: transform .5s cubic-bezier(0.16,1,0.3,1), background .2s;
}
.bookmark:hover { background: var(--accent-deep); }
.bookmark.show { transform: translateX(0); }
@media (max-width: 720px) { .bookmark { display: none; } }
@media (prefers-reduced-motion: reduce) { .bookmark { transition: none; } }

/* ---- Connect-the-system game (focus merge) ---- */
.fm-lines.game .ink { cursor: grab; }
.fm-hint { display: none; }
@media (min-width: 720px) {
  .fm-hint { display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--ink-3);
    margin: 0.4rem 0 0.2rem; transition: opacity .4s; }
  .fm-hint .hdot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--paper); }
  .fm-hint.off { opacity: 0; }
}
.fm-node { cursor: pointer; }
.fm-node circle { transition: r .2s, fill .2s; }
.fm-node:hover .halo { opacity: 1; }
.fm-node .halo { opacity: 0; transition: opacity .2s; }
.fm-card.lit { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(151,88,47,0.25), 0 18px 40px -24px rgba(151,88,47,0.65); }
.fm-card .fm-statement .em { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 0% 1.5px; background-position: 0 100%; transition: background-size .9s cubic-bezier(0.16,1,0.3,1); padding-bottom: 2px; }
.fm-card.lit .fm-statement .em { background-size: 100% 1.5px; }

/* ---- Diagnosi section ---- */
.diagnosi { background: var(--paper-2); border-block: 1px solid var(--line-soft); }
@media (min-width: 980px) {
  .diagnosi .wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0 clamp(2.5rem, 4vw, 4rem); align-items: start; }
  .diagnosi .shead { display: block; margin-bottom: 0; }
  .diagnosi .shead__motif { margin-top: 2.2rem; }
  .diagnosi .diag-card { margin-top: 0; max-width: none; }
}
.diag-card { position: relative; max-width: 760px; margin-top: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  box-shadow: 0 22px 48px -32px rgba(33,27,20,0.45); }
.diag-steps { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.6rem; }
.diag-steps .ds { width: 26px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.diag-steps .ds.on { background: var(--accent); }
.diag-steps .ds-lab { margin-left: auto; font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; color: var(--ink-3); }

.diag-q h3 { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 500; margin-bottom: 1.2rem; }
.diag-opts { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 640px) { .diag-opts { grid-template-columns: 1fr 1fr; } }
.diag-opt { text-align: left; font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 11px; background: var(--paper);
  transition: border-color .2s, background .2s, transform .15s; display: flex; align-items: center; gap: 0.7rem; }
.diag-opt .od { flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--ink-3); transition: all .2s; position: relative; }
.diag-opt:hover { border-color: rgba(151,88,47,0.5); transform: translateY(-1px); }
.diag-opt.sel { border-color: var(--accent); background: rgba(151,88,47,0.05); }
.diag-opt.sel .od { border-color: var(--accent); }
.diag-opt.sel .od::after { content: ''; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--accent); }

.diag-sliders { display: flex; flex-direction: column; gap: 1.4rem; }
.dsl label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.55rem; }
.dsl label output { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.dsl input[type=range] { width: 100%; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%)); outline-offset: 6px; }
.dsl input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(33,27,20,0.25); cursor: grab; }
.dsl input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(33,27,20,0.25); cursor: grab; }

.diag-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; }
.diag-back { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--ink-3); transition: color .2s; }
.diag-back:hover { color: var(--accent); }
.diag-back[disabled] { opacity: 0; pointer-events: none; }

/* result */
.diag-res .dr-kick { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.diag-res h3 { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 500; margin: 0.7rem 0 1rem; }
.diag-res .dr-body { font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.dr-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1rem; margin: 1.4rem 0;
  padding: 1.1rem 1.3rem; border: 1px solid rgba(151,88,47,0.3); border-radius: 12px; background: rgba(151,88,47,0.045); }
.dr-num .v { font-family: var(--serif); font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 600; color: var(--accent); line-height: 1; }
.dr-num .k { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-2); max-width: 30ch; }
.dr-milo { display: flex; gap: 0.8rem; margin: 1.3rem 0; padding: 1rem 1.1rem; border-radius: 12px;
  background: var(--paper-2); border: 1px dashed rgba(151,88,47,0.35); }
.dr-milo .mfa { flex-shrink: 0; width: 34px; height: 34px; }
.dr-milo p { font-family: var(--serif); font-style: italic; font-size: 0.98rem; line-height: 1.55; color: var(--ink); }
.dr-milo .typing { display: inline-flex; gap: 4px; }
.dr-milo .typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: miloDots 1.2s infinite; }
.dr-milo .typing i:nth-child(2) { animation-delay: .2s; }
.dr-milo .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes miloDots { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.diag-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.dr-note { margin-top: 1rem; font-family: var(--sans); font-size: 0.72rem; color: var(--ink-3); }
.diag-restart { font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--ink-3); margin-top: 0.4rem; }
.diag-restart:hover { color: var(--accent); }

/* fade between steps */
.diag-pane { animation: diagIn .4s cubic-bezier(0.16,1,0.3,1); }
@keyframes diagIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .diag-pane { animation: none; } }

/* ---- Milo ---- */
.milo { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.milo__btn { position: relative; width: 64px; height: 64px; border-radius: 50%; cursor: pointer;
  filter: drop-shadow(0 6px 14px rgba(33,27,20,0.3)); transition: transform .25s cubic-bezier(0.16,1,0.3,1); }
.milo__btn:hover { transform: translateY(-3px) rotate(-3deg); }
.milo__btn svg { width: 100%; height: 100%; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .milo__btn .bob { animation: miloBob 4.5s ease-in-out infinite; transform-origin: center; }
  @keyframes miloBob { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(2deg); } }
}
.milo__bubble { max-width: 210px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px 12px 2px 12px;
  padding: 0.6rem 0.85rem; font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: var(--ink);
  box-shadow: 0 10px 26px -16px rgba(33,27,20,0.5);
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; pointer-events: none; }
.milo__bubble.show { opacity: 1; transform: none; pointer-events: auto; }

.milo__panel { position: fixed; right: 18px; bottom: 96px; z-index: 81;
  width: min(360px, calc(100vw - 28px)); max-height: min(480px, calc(100vh - 130px));
  display: none; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 70px -30px rgba(33,27,20,0.55); }
.milo__panel.open { display: flex; }
.milo__head { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-soft); background: var(--paper-2); }
.milo__head .mt { flex: 1; min-width: 0; }
.milo__head b { font-family: var(--serif); font-size: 1rem; color: var(--ink); display: block; }
.milo__head small { font-family: var(--sans); font-size: 0.68rem; color: var(--ink-3); letter-spacing: 0.04em; }
.milo__head .mx { font-size: 1.1rem; color: var(--ink-3); padding: 0.2rem 0.4rem; border-radius: 6px; }
.milo__head .mx:hover { color: var(--accent); background: rgba(151,88,47,0.08); }
.milo__msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; scrollbar-width: thin; }
.mmsg { max-width: 86%; padding: 0.6rem 0.85rem; font-size: 0.9rem; line-height: 1.5; border-radius: 12px; white-space: pre-wrap; }
.mmsg.bot { align-self: flex-start; background: var(--paper-2); border: 1px solid var(--line-soft); color: var(--ink); border-radius: 12px 12px 12px 3px; }
.mmsg.usr { align-self: flex-end; background: rgba(151,88,47,0.1); border: 1px solid rgba(151,88,47,0.22); color: var(--ink); border-radius: 12px 12px 3px 12px; }
.mmsg.bot .typing { display: inline-flex; gap: 4px; padding: 2px 0; }
.mmsg.bot .typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: miloDots 1.2s infinite; }
.mmsg.bot .typing i:nth-child(2) { animation-delay: .2s; }
.mmsg.bot .typing i:nth-child(3) { animation-delay: .4s; }
.milo__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.7rem; }
.milo__chips button { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(151,88,47,0.35); border-radius: 999px; padding: 0.32rem 0.7rem; background: var(--paper); transition: background .2s; }
.milo__chips button:hover { background: rgba(151,88,47,0.08); }
.milo__form { display: flex; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid var(--line-soft); background: var(--paper-2); }
.milo__form input { flex: 1; min-width: 0; font-family: var(--sans); font-size: 0.9rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 0.95rem; outline: none; }
.milo__form input:focus { border-color: var(--accent); }
.milo__form button { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 1rem; transition: background .2s; }
.milo__form button:hover { background: var(--accent-deep); }
.milo__foot { text-align: center; font-family: var(--sans); font-size: 0.62rem; color: var(--ink-3); padding: 0 0.8rem 0.6rem; background: var(--paper-2); }
@media (max-width: 720px) { .milo { right: 12px; bottom: 12px; } .milo__btn { width: 56px; height: 56px; } .milo__panel { bottom: 84px; right: 12px; } }

/* dot burst easter egg */
.mm-dot { position: fixed; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); z-index: 95; pointer-events: none; }

/* ---- Experience: education + languages cards ---- */
.xp-meta { display: grid; grid-template-columns: 1fr; gap: 1rem 1.2rem; margin-top: clamp(1.8rem, 3.5vw, 2.6rem); }
@media (min-width: 720px) { .xp-meta { grid-template-columns: 1fr 1fr; } }
.xpm-col { border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); padding: 1.3rem 1.5rem; transition: border-color .25s, transform .25s, box-shadow .25s; }
.xpm-col:hover { border-color: rgba(151,88,47,0.4); transform: translateY(-2px); box-shadow: 0 18px 40px -28px rgba(33,27,20,0.4); }
.xpm-lab { display: block; font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.xp-meta p { font-size: 0.92rem; line-height: 1.6; color: var(--ink-2); }
.xp-meta b { color: var(--ink); font-weight: 600; }

/* ---- Milo behaviours (purposeful motion) ---- */
.milo { opacity: 0; transform: translateY(26px); }
.milo.milo-in { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(0.16,1,0.3,1), transform .7s cubic-bezier(0.34,1.4,0.64,1); }
@keyframes miloNod { 0%,100% { transform: rotate(0); } 30% { transform: rotate(7deg) translateY(2px); } 65% { transform: rotate(-3deg); } }
.milo-nod .milo__btn svg { animation: miloNod .7s cubic-bezier(0.34,1.2,0.64,1); }
@keyframes miloHop { 0%,100% { transform: translateY(0); } 35% { transform: translateY(-12px) rotate(-4deg); } 60% { transform: translateY(2px); } 80% { transform: translateY(-4px); } }
.milo-hop .milo__btn { animation: miloHop .75s cubic-bezier(0.34,1.3,0.64,1); }
.milo-sleep .m-pupil { transform: scaleY(0.18) translateY(3px) !important; transition: transform .5s; }
.milo__zzz { position: absolute; right: 54px; top: -6px; font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--ink-3); opacity: 0; pointer-events: none; transition: opacity .5s; }
.milo-sleep .milo__zzz { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .milo-sleep .milo__zzz { animation: zFloat 2.6s ease-in-out infinite; }
  @keyframes zFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
}
.m-pupil { transition: transform .25s; }
@media (prefers-reduced-motion: reduce) {
  .milo { opacity: 1; transform: none; }
  .milo-nod .milo__btn svg, .milo-hop .milo__btn { animation: none; }
}

/* ---- Diagnosi v2: textarea + email gate ---- */
.diag-ta { width: 100%; font-family: var(--sans); font-size: 0.95rem; color: var(--ink); line-height: 1.55;
  background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 0.8rem 0.95rem; resize: vertical; min-height: 86px; outline: none; }
.diag-ta:focus { border-color: var(--accent); }
.dg-tease { position: relative; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); overflow: hidden; }
.dg-tease h4 { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 0.55rem 0 0.35rem; }
.dg-tease p { font-size: 0.92rem; line-height: 1.65; color: var(--ink-2); }
.dg-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; pointer-events: none;
  background: linear-gradient(180deg, rgba(250,247,242,0) 0%, var(--paper) 92%); }
.diag-gate { margin-top: 0.2rem; border: 1px solid rgba(151,88,47,0.35); border-radius: 14px; padding: 1.25rem 1.35rem;
  background: rgba(151,88,47,0.045); }
.diag-gate h4 { font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.diag-gate > p { font-size: 0.92rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 0.9rem; }
.dg-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dg-row input[type=email] { flex: 1; min-width: 200px; font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.6rem 1rem; outline: none; }
.dg-row input[type=email]:focus { border-color: var(--accent); }
.dg-consent { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.7rem; font-family: var(--sans); font-size: 0.76rem; color: var(--ink-3); cursor: pointer; line-height: 1.45; }
.dg-consent input { margin-top: 2px; accent-color: var(--accent); }
.dg-err { margin-top: 0.5rem; font-family: var(--sans); font-size: 0.78rem; color: #B3422F; min-height: 1em; }
.dg-hp { position: absolute; left: -9999px; opacity: 0; height: 0; pointer-events: none; }
.dg-ok p { font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--ink); }
.dg-prev { margin-top: 0.8rem; }
.dg-prev summary { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.dg-report { margin-top: 0.7rem; padding: 1rem 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.dg-report h4 { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; color: var(--ink); margin: 0.9rem 0 0.35rem; letter-spacing: 0; text-transform: none; }
.dg-report h4:first-child { margin-top: 0; }
.dg-report p { font-size: 0.88rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 0.5rem; }

/* ---- Appunti (blog) cards ---- */
.posts-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 1.4rem 1.5rem; transition: border-color .25s, transform .25s, box-shadow .25s; }
.post-card:hover { border-color: rgba(151,88,47,0.4); transform: translateY(-3px); box-shadow: 0 18px 40px -28px rgba(33,27,20,0.4); }
.pc-art { width: 112px; height: 84px; margin-bottom: 0.9rem; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.pc-meta .cat { color: var(--accent); }
.pc-meta .when { color: var(--ink-3); }
.post-card h3 { font-family: var(--serif); font-size: 1.18rem; font-weight: 500; line-height: 1.28; margin-top: 0.55rem; color: var(--ink); text-wrap: balance; }
.pc-read { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.pc-go { color: var(--accent); transition: transform .2s; }
.post-card:hover .pc-go { transform: translateX(4px); }
.pc-new { position: absolute; top: 1.15rem; right: 1.15rem; font-family: var(--sans); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(151,88,47,0.45); border-radius: 999px; padding: 0.18rem 0.55rem; background: rgba(151,88,47,0.05); }

/* ---- Pencil cursor (Contatti + Pre-diagnosi) ---- */.pencil-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
body.pencil-on #contact, body.pencil-on #contact *,
body.pencil-on #diagnosi, body.pencil-on #diagnosi * { cursor: none; }
.pencil-cursor { position: fixed; left: 0; top: 0; z-index: 96; pointer-events: none; opacity: 0; transition: opacity .2s; }

/* ---- XP map: 5 roles → the M ---- */
.xp-map { display: none; }
@media (min-width: 1180px) {
  .xp-map { display: none; }
}
.xp-map svg { width: 100%; height: auto; overflow: visible; }
.xp-map #xpm-path { opacity: 0.9; }
.xpm-n { fill: var(--paper); stroke: var(--accent); stroke-width: 2; opacity: 0; transform: scale(0.3); transform-origin: center; transform-box: fill-box; transition: opacity .4s, transform .5s cubic-bezier(0.34,1.56,0.64,1); }
.xpm-n.on { opacity: 1; transform: scale(1); }
.xp-map.complete .xpm-n { fill: var(--accent); }
.xpm-cap { text-align: center; margin-top: 0.5rem; font-family: var(--serif); font-style: italic; font-size: 0.82rem; color: var(--ink-3); opacity: 0; transition: opacity .6s .4s; }
.xp-map.complete .xpm-cap { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .xpm-n { opacity: 1; transform: none; } }

/* ---- Manifesto writes itself ---- */
.manifesto .mw { opacity: 0.13; transition: opacity .3s; }
.manifesto .mw.on { opacity: 1; }
.manifesto.in .m-rule { transform: scaleX(0); }
.manifesto.in.written .m-rule { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .manifesto .mw { opacity: 1; } .manifesto.in .m-rule { transform: scaleX(1); } }

/* ---- Logo flight ---- */
.logo-fly { will-change: transform; }
