
@property --grad-c1 { syntax: '<color>'; inherits: true; initial-value: #d8705d; }
@property --grad-c2 { syntax: '<color>'; inherits: true; initial-value: #ca8094; }
@property --grad-c3 { syntax: '<color>'; inherits: true; initial-value: #ee9e83; }
@property --grad-c4 { syntax: '<color>'; inherits: true; initial-value: #f5d6c6; }

:root{
  --bg:#eef1f6;
  --bg-deep:#e6eaf1;
  --ink:#0b0c0e;
  --muted:#666e7a;
  --line:rgba(11,12,14,.09);
  --surface:#ffffff;
  --mint:#a9ddc4;
  --mint-deep:#00c16a;
  --blue:#bcd7ef;
  --blue-deep:#0047dd;
  --lavender:#d2c6f2;
  --lavender-deep:#b09fe8;
  --peach:#f6cda1;
  --peach-deep:#eeab6f;
  --pill-bg:#eef0f4;
  --pill-text:#454b54;
  --dot-base:#c7cdd7;
  --dot-active:#0b0c0e;
  --radius-lg:28px;
  --radius-md:20px;
  --radius-sm:999px;
  --container:1280px;
  --font-display:"Lexend","Inter",system-ui,sans-serif;
  --font-body:"Inter",system-ui,sans-serif;
  --ease:cubic-bezier(.22,.68,0,1);
  --grad-c1:#d8705d;
  --grad-c2:#ca8094;
  --grad-c3:#ee9e83;
  --grad-c4:#f5d6c6;
  transition:--grad-c1 1.1s ease,--grad-c2 1.1s ease,--grad-c3 1.1s ease,--grad-c4 1.1s ease;
}

html{scroll-behavior:smooth;scroll-padding-top:92px;background:var(--bg)}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  position:relative;
  min-height:100%;
}
body::before{
  content:"";
  position:fixed;
  top:50%;left:50%;
  width:min(620px,64vw);height:min(620px,64vw);
  border-radius:50%;
  background:
    radial-gradient(circle at 35% 45%,var(--grad-c1) 0%,transparent 60%),
    radial-gradient(circle at 60% 65%,var(--grad-c2) 0%,transparent 55%),
    radial-gradient(circle at 50% 30%,var(--grad-c3) 0%,transparent 60%),
    radial-gradient(circle at 70% 35%,var(--grad-c4) 0%,transparent 50%);
  filter:blur(78px);
  transform:translate(-50%,-50%) scale(.68);
  animation:untoolPulse 11s ease-in-out infinite alternate;
  opacity:.72;
  z-index:0;
  pointer-events:none;
}
body::after{
  content:"";
  position:fixed;inset:0;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  opacity:.38;
  pointer-events:none;
  z-index:1;
}
@keyframes untoolPulse{0%{transform:translate(-50%,-50%) scale(.55);opacity:.56}55%{transform:translate(-50%,-50%) scale(1);opacity:.86}100%{transform:translate(-46%,-53%) scale(.82);opacity:.68}}

#dotgrid{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:1;filter:blur(.65px);opacity:.55}
.hero-background{display:none!important}
.portfolio-nav,.case-main,.prototype-live,.toast{position:relative;z-index:3}

.skip-link{position:fixed;left:16px;top:-70px;z-index:200;background:var(--ink);color:#fff;padding:10px 16px;border-radius:var(--radius-sm);font-weight:700;text-decoration:none;transition:top .2s var(--ease)}
.skip-link:focus{top:16px}

/* Header — same visual grammar as UntoolDesign */
.portfolio-nav{
  position:sticky;top:0;z-index:80;
  background:rgba(238,241,246,.72);
  backdrop-filter:blur(14px) saturate(1.4);
  -webkit-backdrop-filter:blur(14px) saturate(1.4);
  border-bottom:1px solid transparent;
  transition:border-color .3s var(--ease),background .3s ease;
}
.portfolio-nav.scrolled{border-bottom-color:var(--line)}
.portfolio-nav-inner{max-width:var(--container);margin:0 auto;padding:22px 32px;display:flex;align-items:center;justify-content:space-between;gap:28px}
.portfolio-brand{display:flex;align-items:center;gap:7px;color:var(--ink);font-family:var(--font-body);font-size:1.18rem;font-weight:500;letter-spacing:-.01em;text-decoration:none;white-space:nowrap}
.portfolio-logo-icon{animation:untoolSpin 8s linear infinite;flex:none}
@keyframes untoolSpin{to{transform:rotate(360deg)}}
.brand-divider{opacity:.75;margin-left:1px}
.portfolio-links{display:flex;align-items:center;gap:28px;margin-left:auto;overflow:visible}
.portfolio-links a{position:relative;padding:4px 0;color:var(--ink);font-size:.96rem;font-weight:500;text-decoration:none;white-space:nowrap}
.portfolio-links a::after{content:"";position:absolute;left:0;bottom:0;width:0;height:1.5px;background:var(--ink);transition:width .3s var(--ease)}
.portfolio-links a:hover::after{width:100%}
.portfolio-cta{display:inline-flex;align-items:center;justify-content:center;background:var(--ink);color:#fff;padding:13px 22px;border-radius:var(--radius-sm);font-size:.9rem;font-weight:600;text-decoration:none;box-shadow:0 1px 2px rgba(11,12,14,.08);transition:transform .35s var(--ease),box-shadow .35s var(--ease)}
.portfolio-cta:hover{transform:none;box-shadow:0 4px 12px -8px rgba(11,12,14,.32)}
.portfolio-menu-toggle,.portfolio-mobile-menu{display:none}

.case-container,.prototype-intro,.prototype-note{max-width:var(--container)}
.case-container{padding-left:32px;padding-right:32px}

/* Hero */
.case-hero{padding:112px 0 120px}
.case-eyebrow{padding:8px 14px;border:1px solid var(--line);background:rgba(255,255,255,.72);color:var(--ink);font-size:.76rem;font-weight:600;letter-spacing:.02em;text-transform:none;border-radius:var(--radius-sm);box-shadow:0 8px 28px -22px rgba(11,12,14,.45)}
.case-eyebrow::before{background:var(--ink);width:7px;height:7px}
.case-hero-grid{grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr);gap:64px;align-items:center;margin-top:32px}
.case-hero h1{font-family:var(--font-display);font-size:clamp(48px,5.6vw,78px);font-weight:600;line-height:1.03;letter-spacing:-.045em;max-width:870px;color:var(--ink)}
.case-hero h1 .gradient{background:none;color:var(--ink);-webkit-text-fill-color:currentColor}
.case-lede{font-size:clamp(1.05rem,1.8vw,1.36rem);line-height:1.58;color:var(--muted);max-width:760px;margin-top:28px}
.case-hero-actions{margin-top:36px;gap:12px}
.case-cta{padding:13px 24px;font-size:.94rem;font-weight:600;transition:transform .35s var(--ease),box-shadow .35s var(--ease)}
.case-cta.primary{background:var(--ink);color:#fff;box-shadow:0 1px 2px rgba(11,12,14,.08)}
.case-cta.secondary{background:rgba(255,255,255,.68);color:var(--ink);border:1px solid var(--line);backdrop-filter:blur(12px)}
.case-cta:hover{transform:none;box-shadow:0 4px 12px -8px rgba(11,12,14,.28)}
.case-facts{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:28px;background:rgba(255,255,255,.72);border:1px solid rgba(255,255,255,.78);border-radius:52px;corner-shape:squircle;--corner-shape:squircle;box-shadow:0 30px 60px -34px rgba(20,60,45,.4);overflow:hidden}
.case-facts::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(188,215,239,.26),rgba(210,198,242,.18) 48%,rgba(246,205,161,.18));pointer-events:none}
.case-fact{position:relative;padding:22px 20px;border:1px solid var(--line);background:rgba(255,255,255,.82);border-radius:30px;box-shadow:none;min-height:122px;display:flex;flex-direction:column;justify-content:flex-end;transition:transform .35s var(--ease),background .3s ease}
.case-fact:hover{transform:translateY(-5px);background:#fff}
.case-fact span{font-size:.69rem;color:var(--muted);font-weight:600;letter-spacing:.05em;margin-bottom:8px}
.case-fact strong{font-family:var(--font-display);font-size:.95rem;line-height:1.42;color:var(--ink);font-weight:600}
.case-fact:nth-child(1){box-shadow:inset 0 5px 0 var(--blue-deep)}
.case-fact:nth-child(2){box-shadow:inset 0 5px 0 var(--lavender-deep)}
.case-fact:nth-child(3){box-shadow:inset 0 5px 0 var(--mint-deep)}
.case-fact:nth-child(4){box-shadow:inset 0 5px 0 var(--peach-deep)}

/* Thesis / quote panel */
.case-thesis{margin:0 0 105px;padding:52px 58px;border:none;border-radius:68px;corner-shape:squircle;--corner-shape:squircle;background:#181715;color:#fff;box-shadow:0 30px 60px -34px rgba(11,12,14,.55)}
.case-thesis::after{width:420px;height:420px;right:-120px;top:-250px;background:radial-gradient(circle,rgba(255,255,255,.13),transparent 68%)}
.case-thesis-grid{grid-template-columns:.82fr 1.18fr;gap:54px;align-items:center}
.case-thesis .kicker{font-size:.7rem;color:#fff;opacity:.62;letter-spacing:.1em}
.case-thesis h2{font-family:var(--font-display);font-size:clamp(2rem,3.5vw,3.2rem);font-weight:600;letter-spacing:-.035em;line-height:1.08}
.case-thesis p{font-size:1.05rem;line-height:1.7;color:rgba(255,255,255,.78)}
.case-flowline{margin-top:24px;font-size:.75rem;color:#fff;opacity:.9;gap:10px}
.case-flowline i{color:rgba(255,255,255,.38)}

/* Sections */
.case-section{padding:100px 0;border-top:1px solid var(--line)}
.case-section.first{padding-top:28px;border-top:0}
.case-section-head{grid-template-columns:245px 1fr;gap:54px;margin-bottom:44px;align-items:start}
.case-index{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:rgba(255,255,255,.62);font-size:.72rem;font-weight:600;color:var(--ink);letter-spacing:.045em;text-transform:uppercase}
.case-question{font-size:.88rem;font-weight:600;color:var(--muted);margin:13px 4px 0;line-height:1.5}
.case-section h2,.prototype-intro h2{font-family:var(--font-display);font-size:clamp(2rem,3.4vw,3rem);font-weight:600;letter-spacing:-.035em;line-height:1.08;color:var(--ink)}
.case-section-intro{font-size:1.03rem;line-height:1.72;color:var(--muted);max-width:870px}
.case-grid-2{gap:24px}.case-grid-3{gap:24px}

.case-card,.reframe-card,.lane{background:rgba(255,255,255,.84);border:1px solid rgba(255,255,255,.88);box-shadow:0 1px 2px rgba(11,12,14,.05);border-radius:58px;corner-shape:squircle;--corner-shape:squircle;transition:transform .45s var(--ease),box-shadow .45s var(--ease),background .35s ease}
.case-card{padding:31px}
.case-card.small{padding:31px;min-height:220px}
.case-card:hover,.reframe-card:hover,.lane:hover{transform:translateY(-7px);box-shadow:0 26px 44px -22px rgba(11,12,14,.24);background:#fff}
.case-card h3{font-family:var(--font-display);font-size:1.2rem;font-weight:600;letter-spacing:-.02em;color:var(--ink);margin-bottom:10px}
.case-card p{font-size:.96rem;line-height:1.62;color:var(--muted)}
.case-card .num{width:auto;height:auto;display:inline-flex;background:var(--pill-bg);color:var(--ink);border-radius:var(--radius-sm);padding:7px 11px;font-size:.73rem;font-weight:600;margin-bottom:34px}
.case-grid-3 .case-card.small:nth-child(1){box-shadow:inset 0 6px 0 var(--blue-deep),0 1px 2px rgba(11,12,14,.05)}
.case-grid-3 .case-card.small:nth-child(2){box-shadow:inset 0 6px 0 var(--lavender-deep),0 1px 2px rgba(11,12,14,.05)}
.case-grid-3 .case-card.small:nth-child(3){box-shadow:inset 0 6px 0 var(--peach-deep),0 1px 2px rgba(11,12,14,.05)}

.case-equation{padding:32px 38px;margin-bottom:24px;border:1px solid var(--line);border-radius:var(--radius-sm);background:rgba(255,255,255,.70);box-shadow:0 12px 32px -24px rgba(11,12,14,.32)}
.case-equation strong{font-family:var(--font-display);font-size:1.12rem;font-weight:600;color:var(--ink)}
.case-equation span{font-size:.9rem;color:var(--muted);max-width:500px}

/* Reframe */
.reframe{gap:20px;grid-template-columns:1fr 58px 1fr}
.reframe-card{padding:36px;min-height:270px;display:flex;flex-direction:column;justify-content:flex-end}
.reframe-card.before{opacity:1;background:rgba(255,255,255,.72)}
.reframe-card.after{background:linear-gradient(145deg,rgba(169,221,196,.88),rgba(255,255,255,.88));border-color:rgba(127,199,167,.48)}
.reframe-label{font-size:.72rem;color:var(--muted);font-weight:600;letter-spacing:.08em;margin-bottom:16px}
.reframe-card strong{font-family:var(--font-display);font-size:1.55rem;font-weight:600;line-height:1.28;color:var(--ink)}
.reframe-card p{font-size:.94rem;line-height:1.65;color:var(--muted)}
.reframe-arrow{width:54px;height:54px;background:var(--ink);font-size:1.2rem}

/* Principles / explorations */
.principle-card{min-height:270px;overflow:hidden}
.principle-card::after{display:none}
.principle-tag,.choice-badge,.metric-chip{font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:none}
.principle-tag{background:var(--pill-bg);color:var(--pill-text);padding:7px 11px;margin-bottom:30px}
#strategy .case-card:nth-child(1),#strategy .case-card:nth-child(4){box-shadow:inset 0 6px 0 var(--mint-deep),0 1px 2px rgba(11,12,14,.05)}
#strategy .case-card:nth-child(2),#strategy .case-card:nth-child(5){box-shadow:inset 0 6px 0 var(--blue-deep),0 1px 2px rgba(11,12,14,.05)}
#strategy .case-card:nth-child(3),#strategy .case-card:nth-child(6){box-shadow:inset 0 6px 0 var(--lavender-deep),0 1px 2px rgba(11,12,14,.05)}
.explore-card{min-height:300px}
.explore-card.chosen{background:linear-gradient(155deg,rgba(188,215,239,.82),rgba(255,255,255,.93));border-color:rgba(0,71,221,.16);box-shadow:0 18px 40px -28px rgba(0,71,221,.45)}
.choice-badge{right:24px;top:24px;background:var(--ink);padding:7px 11px}
.tradeoff{margin-top:auto;padding-top:20px;border-top:1px solid var(--line);font-size:.78rem;color:var(--muted)}
.tradeoff b{color:var(--ink)}
.case-card .micro{font-size:.7rem;color:var(--muted);font-weight:600;letter-spacing:.06em;text-transform:uppercase}

/* Architecture */
.arch-flow{gap:14px}
.arch-flow::before{top:34px;left:7%;right:7%;background:rgba(11,12,14,.15)}
.arch-step{padding:22px 8px 24px;background:rgba(255,255,255,.76);border:1px solid rgba(255,255,255,.85);border-radius:36px;corner-shape:squircle;--corner-shape:squircle;transition:transform .35s var(--ease),box-shadow .35s var(--ease)}
.arch-step:hover{transform:translateY(-5px);box-shadow:0 22px 34px -24px rgba(11,12,14,.3)}
.arch-step .bubble{width:66px;height:66px;border-radius:50%;background:var(--ink);border:4px solid var(--surface);color:#fff;box-shadow:0 0 0 1px var(--ink);font-family:var(--font-display);font-size:.8rem}
.arch-step h4{font-family:var(--font-display);font-size:.84rem;margin-top:2px;color:var(--ink)}
.arch-step p{font-size:.72rem;color:var(--muted);padding:0 5px}
.arch-step:nth-child(2) .bubble,.arch-step:nth-child(5) .bubble{background:var(--blue-deep);box-shadow:0 0 0 1px var(--blue-deep)}
.arch-step:nth-child(3) .bubble,.arch-step:nth-child(6) .bubble{background:#927bd7;box-shadow:0 0 0 1px #927bd7}

/* Interaction */
.dual-lane{gap:24px}
.lane{padding:34px 36px}
.lane-title{font-family:var(--font-display);font-size:1rem;font-weight:600;margin-bottom:24px}
.lane-dot{background:var(--blue-deep)}.lane.system .lane-dot{background:var(--mint-deep)}
.lane li{font-size:.92rem;line-height:1.6;color:var(--muted)}
.lane li::before{color:var(--ink)}

/* Prototype — same portfolio shell, product UI remains recognisably PiazzaTi */
.prototype-live{padding:110px 0 115px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:rgba(255,255,255,.12)}
.prototype-intro{padding:0 32px;margin-bottom:34px;align-items:end}
.prototype-intro p{font-size:.95rem;line-height:1.65;color:var(--muted);max-width:480px}
.prototype-live .dashboard-container{max-width:1380px;height:900px;min-height:900px;padding:28px;border-radius:72px;corner-shape:squircle;--corner-shape:squircle;background:rgba(255,255,255,.62);border:1px solid rgba(255,255,255,.88);box-shadow:0 30px 60px -34px rgba(20,60,45,.45);gap:16px;backdrop-filter:blur(16px)}
.prototype-live .brand-header{padding:2px 10px 12px;border-bottom:1px solid var(--line)}
.prototype-live .brand-logo{font-family:var(--font-display);font-size:1.25rem;color:var(--ink)}
.prototype-live .brand-motto{font-family:var(--font-body);font-size:.76rem;color:var(--muted)}
.prototype-live .page-header,.prototype-live .fairness-banner,.prototype-live .stepper-nav,.prototype-live .conversation-shell{border-color:rgba(11,12,14,.06);box-shadow:0 1px 2px rgba(11,12,14,.03)}
.prototype-live .page-header,.prototype-live .conversation-shell{corner-shape:squircle;--corner-shape:squircle;}
.prototype-live .fairness-banner{background:rgba(188,215,239,.32)}
.prototype-live .shield{background:rgba(188,215,239,.72);color:var(--blue-deep)}
.prototype-live .step-tab.active{background:var(--ink);color:#fff}
.prototype-live .step-tab.active .step-indicator{background:#fff;color:var(--ink)}
.prototype-live .step-tab.completed .step-indicator{background:var(--mint-deep)}
.prototype-live .conversation-shell{background:rgba(255,255,255,.42)}
.prototype-live .chat-card,.prototype-live .profile-card{border-radius:30px;box-shadow:0 8px 24px -20px rgba(11,12,14,.28)}
.prototype-live .msg.user,.prototype-live .send-btn{background:var(--ink)}
.prototype-live .progress-fill{background:#8b5cf6}
.prototype-live .btn-final{background:var(--ink)}
.prototype-note{padding:0 32px;margin-top:20px;font-size:.75rem;color:var(--muted)}


/* Prototype refinements: scrollable chat, readable live profile rail, PiazzaTi progress */
.prototype-live .chat-log{scrollbar-width:thin;scrollbar-color:rgba(11,12,14,.28) transparent}
.prototype-live .chat-log::-webkit-scrollbar{width:6px}
.prototype-live .chat-log::-webkit-scrollbar-track{background:transparent}
.prototype-live .chat-log::-webkit-scrollbar-thumb{background:rgba(11,12,14,.22);border-radius:999px}
.prototype-live .chat-log::-webkit-scrollbar-thumb:hover{background:rgba(11,12,14,.36)}
.prototype-live .profile-head h3{font-size:16px}
.prototype-live .profile-head span{font-size:11px}
.prototype-live .progress-label{font-size:11px}
.prototype-live .progress-value{font-size:11px}
.prototype-live .phase-title strong{font-size:13px}
.prototype-live .phase-title span{font-size:11px;line-height:1.5}
.prototype-live .memory-section h4{font-size:11.5px}
.prototype-live .memory-section h4 span{font-size:10px}
.prototype-live .memory-row{font-size:11px;line-height:1.5;padding:7px 0}
.prototype-live .empty-memory{font-size:10.5px;line-height:1.55}
.prototype-live .privacy-note{font-size:10.5px;line-height:1.5}
.prototype-live .btn-soft,.prototype-live .btn-final{font-size:11px}

/* Validation / impact / reflection */
.validation-status{padding:8px 12px;background:rgba(246,205,161,.48);color:#7f4b1d;border-color:rgba(238,171,111,.52);font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:none}
.validation-status::before{background:var(--peach-deep)}
.hypothesis{padding:20px 0;border-bottom:1px solid var(--line)}
.hypothesis b{font-family:var(--font-display);font-size:.92rem;font-weight:600;color:var(--ink)}
.hypothesis span{font-size:.86rem;line-height:1.6;color:var(--muted)}
.metric-chips{gap:9px}.metric-chip{background:var(--pill-bg);border:0;color:var(--pill-text);padding:8px 12px}
.impact-card{min-height:270px}
.impact-card .impact-title{font-size:.72rem;color:var(--muted);font-weight:600;letter-spacing:.07em}
.impact-card strong{font-family:var(--font-display);font-size:1.28rem;font-weight:600;color:var(--ink)}
.impact-card ul{font-size:.88rem;line-height:1.75;color:var(--muted);padding-left:20px}
#impact .case-card:nth-child(1){box-shadow:inset 0 6px 0 var(--blue-deep),0 1px 2px rgba(11,12,14,.05)}
#impact .case-card:nth-child(2){box-shadow:inset 0 6px 0 var(--mint-deep),0 1px 2px rgba(11,12,14,.05)}
#impact .case-card:nth-child(3){box-shadow:inset 0 6px 0 var(--peach-deep),0 1px 2px rgba(11,12,14,.05)}
.open-question{padding:20px 0;border-bottom:1px solid var(--line)}
.open-question .qnum{width:32px;height:32px;border-radius:50%;background:var(--ink);color:#fff;font-size:.7rem}
.open-question b{font-family:var(--font-display);font-size:.9rem;font-weight:600;color:var(--ink)}
.open-question span{font-size:.84rem;line-height:1.6;color:var(--muted)}

.case-footer{padding:75px 0 100px}
.case-footer-card{padding:48px 52px;border:1px solid rgba(255,255,255,.9);border-radius:68px;corner-shape:squircle;--corner-shape:squircle;background:rgba(255,255,255,.82);box-shadow:0 30px 60px -34px rgba(20,60,45,.4);gap:34px}
.case-footer-card h3{font-family:var(--font-display);font-size:clamp(1.6rem,2.5vw,2.2rem);font-weight:600;color:var(--ink)}
.case-footer-card p{font-size:.95rem;line-height:1.7;color:var(--muted)}
.case-footer-card a{padding:13px 22px;background:var(--ink);font-size:.88rem;font-weight:600}

/* Untool-style reveal */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
.reveal.in{opacity:1;transform:none}

@media(max-width:1120px){
  .portfolio-links{gap:18px}.portfolio-links a{font-size:.86rem}.portfolio-cta{padding:12px 18px}
  .case-hero-grid,.case-thesis-grid{grid-template-columns:1fr}.case-facts{max-width:760px}.case-section-head{grid-template-columns:1fr;gap:18px}.case-question{margin-left:0}.case-hero{padding-top:86px}
  .arch-flow{grid-template-columns:repeat(3,1fr);row-gap:16px}.arch-flow::before{display:none}
  .prototype-live .dashboard-container{height:1060px;min-height:1060px;border-radius:54px}
}
@media(max-width:850px){
  .portfolio-links,.portfolio-cta{display:none}
  .portfolio-menu-toggle{display:flex;width:42px;height:42px;align-items:center;justify-content:center;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.62)}
  .portfolio-menu-toggle span,.portfolio-menu-toggle span::before,.portfolio-menu-toggle span::after{content:"";display:block;width:19px;height:2px;background:var(--ink);position:relative;transition:.3s var(--ease)}
  .portfolio-menu-toggle span::before{position:absolute;top:-6px}.portfolio-menu-toggle span::after{position:absolute;top:6px}
  body.case-menu-open .portfolio-menu-toggle span{background:transparent}body.case-menu-open .portfolio-menu-toggle span::before{top:0;transform:rotate(45deg)}body.case-menu-open .portfolio-menu-toggle span::after{top:0;transform:rotate(-45deg)}
  .portfolio-mobile-menu{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:0;padding:6px 24px 22px;background:rgba(238,241,246,.96);border-bottom:1px solid var(--line);opacity:0;transform:translateY(-8px);pointer-events:none;transition:.3s var(--ease)}
  .portfolio-mobile-menu a{padding:14px 4px;border-bottom:1px solid var(--line);font-size:.95rem;font-weight:500;text-decoration:none;color:var(--ink)}
  body.case-menu-open .portfolio-mobile-menu{opacity:1;transform:none;pointer-events:auto}
}
@media(max-width:760px){
  body::before{width:95vw;height:95vw;filter:blur(65px)}
  .portfolio-nav-inner{padding:16px 18px}.portfolio-brand{font-size:1rem}.portfolio-logo-icon{width:24px;height:24px}
  .case-container{padding:0 18px}.case-hero{padding:68px 0 80px}.case-hero h1{font-size:clamp(2.7rem,12vw,4.2rem)}.case-lede{font-size:1.02rem}.case-facts{grid-template-columns:1fr;padding:18px;border-radius:36px}.case-fact{min-height:104px;border-radius:24px}
  .case-thesis{padding:34px 30px;margin-bottom:68px;border-radius:38px}.case-thesis-grid{gap:28px}.case-thesis p{font-size:.96rem}
  .case-section{padding:72px 0}.case-section.first{padding-top:12px}.case-grid-2,.case-grid-3,.dual-lane{grid-template-columns:1fr;gap:16px}.case-card,.reframe-card,.lane{border-radius:34px}.case-card,.case-card.small{padding:26px}.case-card.small{min-height:0}
  .case-equation{border-radius:34px;align-items:flex-start;flex-direction:column;padding:26px}.case-equation span{text-align:left}
  .reframe{grid-template-columns:1fr}.reframe-arrow{transform:rotate(90deg);justify-self:center}.reframe-card{min-height:0;padding:28px}
  .arch-flow{grid-template-columns:repeat(2,1fr);gap:12px}.arch-step{border-radius:28px}.arch-step .bubble{width:58px;height:58px}
  .prototype-intro{padding:0 18px;align-items:flex-start;flex-direction:column}.prototype-intro p{text-align:left}.prototype-live{padding:76px 0 80px}.prototype-live .dashboard-container{padding:12px;height:1200px;min-height:1200px;border-radius:34px}.prototype-note{padding:0 18px}
  .case-footer{padding:50px 0 70px}.case-footer-card{grid-template-columns:1fr;padding:32px;border-radius:38px}.case-footer-card a{justify-self:start}
}
@media(max-width:480px){
  .arch-flow{grid-template-columns:1fr}.case-hero-actions{flex-direction:column;align-items:stretch}.case-cta{justify-content:center}.case-thesis{border-radius:30px}.case-section h2,.prototype-intro h2{font-size:2rem}.case-section-head{margin-bottom:32px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.reveal{opacity:1;transform:none;transition:none}.portfolio-logo-icon,body::before{animation:none}}


/* ==========================================================
   NEUTRAL BORDERS — remove coloured edge accents
   ========================================================== */
/* Portfolio cards: no coloured top-edge stripes */
.case-fact:nth-child(1),
.case-fact:nth-child(2),
.case-fact:nth-child(3),
.case-fact:nth-child(4),
.case-grid-3 .case-card.small:nth-child(1),
.case-grid-3 .case-card.small:nth-child(2),
.case-grid-3 .case-card.small:nth-child(3),
#strategy .case-card:nth-child(1),
#strategy .case-card:nth-child(2),
#strategy .case-card:nth-child(3),
#strategy .case-card:nth-child(4),
#strategy .case-card:nth-child(5),
#strategy .case-card:nth-child(6),
#impact .case-card:nth-child(1),
#impact .case-card:nth-child(2),
#impact .case-card:nth-child(3){
  box-shadow:0 1px 2px rgba(11,12,14,.05);
}

/* Highlighted cards keep their fill, but use a neutral edge */
.reframe-card.after,
.explore-card.chosen{
  border-color:rgba(11,12,14,.09);
}

/* Status chips: colour can communicate state without a coloured outline */
.validation-status{border-color:transparent}

/* Architecture markers: remove coloured outline rings */
.arch-step .bubble,
.arch-step:nth-child(2) .bubble,
.arch-step:nth-child(3) .bubble,
.arch-step:nth-child(5) .bubble,
.arch-step:nth-child(6) .bubble{
  box-shadow:0 0 0 1px rgba(11,12,14,.12);
}

/* Keep interactive product UI clean: neutral default borders; state is carried by fill/text */
.prototype-live .quick-btn:hover,
.prototype-live .quick-btn.selected,
.prototype-live .chat-input:focus,
.prototype-live .upload-chat,
.prototype-live .privacy-note,
.prototype-live .autosave,
.prototype-live .autosave:hover{
  border-color:rgba(11,12,14,.10);
}



/* =========================================================
   USER REFINEMENTS — 2026-09-04
   ========================================================= */

/* Numbered markers: neutral, high-contrast black circles */
.case-card .num{
  width:52px;
  height:52px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#000;
  color:#fff;
  border:0;
  box-shadow:none;
  font-family:var(--font-display);
  font-size:1.08rem;
  font-weight:700;
  line-height:1;
  margin-bottom:30px;
}

.arch-step .bubble,
.arch-step:nth-child(2) .bubble,
.arch-step:nth-child(3) .bubble,
.arch-step:nth-child(4) .bubble,
.arch-step:nth-child(5) .bubble,
.arch-step:nth-child(6) .bubble{
  width:66px;
  height:66px;
  border-radius:50%;
  background:#000;
  color:#fff;
  border:0;
  box-shadow:none;
  font-family:var(--font-display);
  font-size:1.05rem;
  font-weight:700;
}

/* PiazzaTi purple highlight — strategic reframe */
.reframe-card.after{
  background:linear-gradient(145deg,#6d28d9 0%,#8b5cf6 58%,#a78bfa 100%);
  border:0;
  box-shadow:0 22px 46px -28px rgba(109,40,217,.58);
}
.reframe-card.after:hover{
  background:linear-gradient(145deg,#6d28d9 0%,#8b5cf6 58%,#a78bfa 100%);
}
.reframe-card.after .reframe-label,
.reframe-card.after strong,
.reframe-card.after p{
  color:#fff;
}
.reframe-card.after .reframe-label{opacity:.78}
.reframe-card.after p{opacity:.9}

/* PiazzaTi purple highlight — chosen Direction C */
.explore-card.chosen{
  background:linear-gradient(145deg,#6d28d9 0%,#8b5cf6 58%,#a78bfa 100%);
  border:0;
  box-shadow:0 22px 46px -28px rgba(109,40,217,.58);
}
.explore-card.chosen:hover{
  background:linear-gradient(145deg,#6d28d9 0%,#8b5cf6 58%,#a78bfa 100%);
}
.explore-card.chosen .micro,
.explore-card.chosen h3,
.explore-card.chosen p,
.explore-card.chosen .tradeoff,
.explore-card.chosen .tradeoff b{
  color:#fff;
}
.explore-card.chosen .micro,
.explore-card.chosen p,
.explore-card.chosen .tradeoff{opacity:.9}
.explore-card.chosen .tradeoff{border-top-color:rgba(255,255,255,.28)}
.explore-card.chosen .choice-badge{
  background:#fff;
  color:#5b21b6;
}


/* =========================================================
   RESEARCH VALIDATION + INLINE PROFILE EDITING
   ========================================================= */
.validation-evidence-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.evidence-card{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(11,12,14,.08);
  border-radius:34px;
  corner-shape:squircle;--corner-shape:squircle;
  padding:28px;
  box-shadow:0 1px 2px rgba(11,12,14,.04);
}
.evidence-card .evidence-source{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
  font-size:.72rem;
  color:var(--muted);
}
.evidence-card .evidence-source b{
  font-family:var(--font-display);
  font-size:.76rem;
  color:var(--ink);
}
.evidence-card .evidence-stat{
  font-family:var(--font-display);
  font-size:clamp(1.45rem,2.6vw,2.25rem);
  line-height:1.02;
  letter-spacing:-.035em;
  color:var(--ink);
  margin-bottom:12px;
}
.evidence-card p{
  font-size:.88rem;
  line-height:1.65;
  color:var(--muted);
  margin:0;
}
.evidence-card a{
  display:inline-flex;
  margin-top:18px;
  font-size:.78rem;
  font-weight:600;
  color:var(--ink);
  text-decoration:underline;
  text-underline-offset:3px;
}
.validation-synthesis{
  margin-top:18px;
  padding:30px 32px;
  border-radius:38px;
  corner-shape:squircle;--corner-shape:squircle;
  background:#0b0c0e;
  color:#fff;
  display:grid;
  grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);
  gap:28px;
  align-items:start;
}
.validation-synthesis .micro{color:rgba(255,255,255,.62);margin-bottom:8px}
.validation-synthesis h3{
  font-family:var(--font-display);
  font-size:1.35rem;
  font-weight:600;
  line-height:1.2;
  margin:0;
  color:#fff;
}
.validation-synthesis p{
  font-size:.92rem;
  line-height:1.7;
  color:rgba(255,255,255,.78);
  margin:0;
}
.validation-caveat{
  margin-top:14px;
  font-size:.78rem;
  line-height:1.6;
  color:var(--muted);
}

/* Correction modal */
.profile-edit-modal{
  position:fixed;
  inset:0;
  z-index:300;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(11,12,14,.34);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .25s var(--ease),visibility .25s var(--ease);
}
.profile-edit-modal.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.profile-edit-dialog{
  width:min(720px,100%);
  max-height:min(78vh,760px);
  overflow:auto;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(11,12,14,.08);
  border-radius:46px;
  corner-shape:squircle;--corner-shape:squircle;
  padding:30px;
  box-shadow:0 34px 80px -30px rgba(11,12,14,.48);
  transform:translateY(12px) scale(.985);
  transition:transform .25s var(--ease);
}
.profile-edit-modal.open .profile-edit-dialog{transform:none}
.profile-edit-dialog-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:22px;
}
.profile-edit-dialog-head h3{
  font-family:var(--font-display);
  font-size:1.42rem;
  line-height:1.12;
  margin:0 0 8px;
}
.profile-edit-dialog-head p{
  font-size:.86rem;
  line-height:1.55;
  color:var(--muted);
  margin:0;
}
.profile-edit-close{
  flex:0 0 auto;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--pill-bg);
  color:var(--ink);
  font-size:1.15rem;
}
.profile-edit-groups{display:grid;gap:18px}
.profile-edit-group-title{
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:700;
  color:var(--muted);
  margin-bottom:9px;
}
.profile-edit-options{display:flex;flex-wrap:wrap;gap:8px}
.profile-edit-option{
  border:0;
  border-radius:999px;
  background:var(--pill-bg);
  color:var(--pill-text);
  padding:9px 13px;
  font-size:.78rem;
  font-weight:600;
  transition:transform .2s var(--ease),background .2s ease,color .2s ease;
}
.profile-edit-option:hover{background:#000;color:#fff;transform:translateY(-1px)}
.profile-edit-empty{font-size:.88rem;color:var(--muted);padding:14px 0}

/* Inline editor inside the right profile rail */
.memory-row{
  align-items:center;
  position:relative;
}
.memory-row.editing{
  display:block;
  padding:10px 0 12px;
}
.memory-row.editing .memory-label{
  display:block;
  margin-bottom:8px;
  font-weight:650;
  color:var(--ink);
}
.memory-inline-editor{display:grid;gap:7px}
.memory-inline-editor input,
.memory-inline-editor textarea,
.memory-inline-editor select{
  width:100%;
  border:0;
  outline:0;
  border-radius:11px;
  background:#f1f3f6;
  color:var(--ink);
  padding:9px 10px;
  font:inherit;
  font-size:9.5px;
  line-height:1.4;
  box-shadow:inset 0 0 0 1px rgba(11,12,14,.07);
}
.memory-inline-editor textarea{min-height:76px;resize:vertical}
.memory-inline-actions{display:flex;gap:6px;justify-content:flex-end}
.memory-inline-actions button{
  border:0;
  border-radius:999px;
  padding:7px 10px;
  font-size:8.5px;
  font-weight:700;
}
.memory-inline-save{background:#000;color:#fff}
.memory-inline-cancel{background:#eef0f4;color:#454b54}
.memory-editing-note{
  font-size:8.5px;
  color:var(--muted);
  line-height:1.45;
  margin:0 0 4px;
}
.profile-card.edit-mode .profile-head h3::after{
  content:' · modifica';
  color:var(--muted);
  font-weight:500;
}

@media(max-width:760px){
  .validation-evidence-grid{grid-template-columns:1fr}
  .validation-synthesis{grid-template-columns:1fr;border-radius:32px;padding:26px}
  .profile-edit-dialog{border-radius:34px;padding:24px}
}

