/* ═══════════════════════════════════════════════════════════
   TRANSFORMATION LAB — Shared Styles
   ═══════════════════════════════════════════════════════════ */

/* Self-hosted, so the page makes no third-party requests. DM Sans 400 and 500 share one variable file. */
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/playfair-display-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/playfair-display-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400 500;font-display:swap;src:url(../fonts/dm-sans-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400 500;font-display:swap;src:url(../fonts/dm-sans-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}

*{box-sizing:border-box;margin:0;padding:0}
button,input,select,textarea{font-family:inherit}

:root{
  color-scheme:light;
  --gutter:clamp(2rem,5vw,5rem);
  --font-display:'Playfair Display',Georgia,serif;
  --font-body:'DM Sans',system-ui,sans-serif;

  /* DM Sans sizes: labels, secondary text, body, lead paragraph. Nothing else. */
  --text-xs:10.5px;
  --text-sm:12px;
  --text-md:13.5px;
  --text-lg:15px;

  /* One gutter between cards, so columns line up from one block to the next */
  --gap:12px;
  /* Two control heights: fields and buttons, and the small ones inside a matrix or card */
  --control:39px;
  --control-sm:30px;
  /* Height of the notices at the top of the window, set by app.js. The sticky bars sit below them. */
  --notices-h:0px;

  /* Surfaces and text. --gray is darker than the site's #8A8680 so small text stays readable. */
  --bg:#F5F2ED;
  --card:#FBF9F6;
  --sunken:#EFEBE4;
  --ink:#1A1A18;
  --gray:#6B6762;
  --border:#DDD8CF;
  --field-border:#87827A; /* 3:1 against every surface a field sits on */

  /* One accent: --blue fills shapes, --blue-ink is the readable text version */
  --blue:#2B4BFF;
  --blue-mid:#2340E0;
  --blue-ink:#2B4BFF;
  --lb:#ECEEF8;
  --blue-b:#CBD2F2;

  /* Colour that carries meaning: good, caution, risk */
  --green:#2A6E47;
  --lg:#E9F0E8;
  --green-b:#C3D6C6;
  --yellow:#8F5A0C;
  --ly:#F5ECD9;
  --yellow-b:#E3D2A8;
  --red:#A93A2A;
  --red-fill:#A93A2A;
  --red-mid:#8F2F21;
  --lr:#F6E5E0;
  --red-b:#E6C2B8;

  /* The three Horizons, with white text */
  --h1:#2A6E47;
  --h2:#2B4BFF;
  --h3:#5F4A9C
}

/* Screen only, so paper always prints light */
@media screen{
  html.dark{
    color-scheme:dark;
    --bg:#111110;
    --card:#1A1A18;
    --sunken:#161615;
    --ink:#ECEAE5;
    --gray:#A5A198;
    --border:#2E2D2A;
    --field-border:#73706A;
    --blue-mid:#4A66FF;
    --blue-ink:#93A5FF;
    --lb:#1A2038;
    --blue-b:#2A3566;
    --green:#7CC79A;
    --lg:#16251C;
    --green-b:#25402F;
    --yellow:#DDAA55;
    --ly:#2A2213;
    --yellow-b:#4A3B1B;
    --red:#EC8A78;
    --lr:#2C1815;
    --red-b:#53291F
  }
}

body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--ink);
  min-height:100vh;
  font-size:var(--text-md);
  line-height:1.6
}

/* ── NOTICES ────────────────────────────────────────────── */
/* Plain and in the flow, so they stay on screen on every page until they stop applying */
#notices{position:sticky;top:0;z-index:150}
/* Red: answers are or may be lost. Amber: a choice to make. */
#recovery-notice,#unreadable-notice,#save-failed-notice{background:var(--lr);border-bottom-color:var(--red-b)}
#conflict-notice{background:var(--ly);border-bottom-color:var(--yellow-b)}
.notice{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;
  background:var(--card);border-bottom:1px solid var(--border);
  padding:10px calc(var(--gutter) + 2.5rem) 10px var(--gutter);
  font-size:var(--text-md);color:var(--ink)
}
.notice p{flex:1 1 320px}
.notice .btn{min-height:30px;padding:0 12px;font-size:var(--text-sm)}

/* ── LOADING ────────────────────────────────────────────── */
#loading-note{display:none;position:fixed;left:0;right:0;top:2rem;text-align:center;font-size:var(--text-sm);color:var(--gray);pointer-events:none}
html.loading #loading-note{display:block}
html.loading .step-card{pointer-events:none}
html.loading #land-cta{cursor:default}
html.deep-link #landing{display:none}
.noscript-note{padding:12px var(--gutter);font-size:var(--text-md);color:var(--ink)}
.module-failed{padding:48px var(--gutter);display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.module-failed p{flex:0 0 100%;color:var(--ink)}

.file-warning{display:none;background:var(--lr);color:var(--red);border-bottom:1px solid var(--red-b);padding:12px 20px;font-size:var(--text-md);text-align:center}

/* ── LANDING ────────────────────────────────────────────── */
#landing{
  display:flex;flex-direction:column;min-height:100vh
}

/* The headline is the one loud thing on the page; everything below it stays quiet */
.land-hero{
  min-height:82vh;
  /* The top padding keeps the headline clear of the name above it on a short laptop screen */
  padding:5.5rem var(--gutter) 5vh;
  display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;
  text-align:left;
  position:relative
}
/* The right side stays clear of the night mode button, as in the module header */
.land-top{
  position:absolute;top:2rem;left:var(--gutter);right:max(var(--gutter),3.25rem);
  display:flex;justify-content:space-between;align-items:baseline
}
.lab-logo{font-family:var(--font-display);font-size:1.125rem;color:var(--ink)}
.land-home{font-size:var(--text-md);color:var(--gray);text-decoration:none}
.land-home:hover{color:var(--blue-ink);text-decoration:underline}
.land-hero h1{font-family:var(--font-display);font-weight:400;margin:0}
.hero-line{
  display:block;
  font-size:clamp(4rem,8.6vw,10rem);
  line-height:1;color:var(--ink)
}
.dot{color:var(--blue)}
.land-hero .land-sub{
  margin:2.5rem 0 2rem;max-width:52ch;text-wrap:pretty;
  font-size:clamp(.95rem,1.3vw,1.15rem);line-height:1.65;color:var(--gray)
}
/* .btn.land-cta also beats the shared .btn rules further down the file */
.btn.land-cta{
  background:var(--blue);color:white;
  min-height:48px;padding:0 1.75rem;border-radius:2px;
  font-size:var(--text-lg);font-weight:500
}
.btn.land-cta:hover{background:var(--blue-mid)}
.land-facts{margin-top:1.5rem;max-width:78ch;font-size:var(--text-md);line-height:1.6;color:var(--gray)}
.land-facts p + p{margin-top:.5rem}

/* Modules are a real sequence, so they read as a numbered list */
.land-modules{padding:0 var(--gutter);width:100%}
.step-card{
  display:grid;
  grid-template-columns:3rem minmax(13rem,20rem) minmax(0,1fr) 6.5rem 5rem;
  column-gap:1.5rem;align-items:baseline;
  padding:1.15rem 0;
  border-bottom:1px solid var(--border);
  cursor:pointer
}
.step-card:first-child{border-top:1px solid var(--border)}
.step-card:hover .step-title{color:var(--blue-ink)}
.step-num{grid-column:1;grid-row:1;font-family:var(--font-display);font-size:1.125rem;font-variant-numeric:lining-nums;color:var(--blue-ink)}
.step-title{grid-column:2;grid-row:1;font-family:var(--font-display);font-size:1.25rem;line-height:1.3;color:var(--ink)}
.step-sub{grid-column:3;grid-row:1;font-size:var(--text-md);line-height:1.5;color:var(--gray)}
.step-status{grid-column:4;grid-row:1;font-size:var(--text-sm);font-weight:500;color:var(--gray);text-align:right}
.step-status:empty{display:none}
.status-started .step-status{color:var(--yellow)}
.status-done .step-status{color:var(--green)}
.step-time{grid-column:5;grid-row:1;font-size:var(--text-sm);color:var(--gray);text-align:right}

.land-footer{padding:2.5rem var(--gutter);font-size:var(--text-sm);line-height:1.6;color:var(--gray)}
.land-credit{margin-top:6px}
.land-credit a,.app-credit a{color:inherit;font-weight:500}
.app-credit{padding:14px var(--gutter);font-size:var(--text-sm);color:var(--gray)}
#print-watermark{display:none}

/* ── APP SHELL ──────────────────────────────────────────── */
#app{display:none;min-height:100vh;flex-direction:column}

.app-header{
  background:var(--bg);
  border-bottom:1px solid var(--border);
  /* The right side stays clear of the night mode button on narrow windows */
  padding:0 max(var(--gutter),3.25rem) 0 var(--gutter);
  display:flex;align-items:center;gap:24px;
  height:58px;
  position:sticky;top:var(--notices-h);z-index:100
}
.app-title{font-size:inherit;font-weight:400}
.app-logo{font-family:var(--font-display);font-size:1.0625rem;color:var(--ink);cursor:pointer;text-decoration:none;white-space:nowrap}

.progress-bar{flex:1;height:2px;background:var(--border);overflow:hidden}
.progress-fill{width:0;height:100%;background:var(--blue-ink);transition:width .4s ease}
.step-indicator{font-size:var(--text-sm);font-weight:500;color:var(--gray);white-space:nowrap}
.save-status{font-size:var(--text-sm);color:var(--gray);white-space:nowrap}
.save-status.not-saved{color:var(--red);font-weight:500}

/* ── MODULE WRAPPER ─────────────────────────────────────── */
.module{display:none;flex-direction:column;min-height:calc(100vh - 58px)}
.module.active{display:flex}

.module-hero{padding:48px var(--gutter) 32px;background:transparent;border-bottom:1px solid var(--border)}

.module-tag{font-size:var(--text-sm);font-weight:500;color:var(--blue-ink);margin-bottom:.75rem}

.module-hero h2{font-family:var(--font-display);font-size:clamp(2rem,3.4vw,3rem);font-weight:400;color:var(--ink);margin-bottom:.75rem;line-height:1.1}
.module-hero p{font-size:var(--text-lg);color:var(--gray);line-height:1.6;max-width:700px}

.module-body{flex:1;padding:32px var(--gutter);max-width:calc(920px + 2 * var(--gutter));width:100%;overflow-wrap:anywhere}
.module-footer{
  background:var(--bg);
  border-top:1px solid var(--border);
  padding:14px var(--gutter);
  display:flex;align-items:center;gap:12px;
  /* Always on screen, so moving between modules never needs a scroll to the bottom */
  position:sticky;bottom:0;z-index:50
}

/* Playfair defaults to old-style numerals, which read oddly in "Step 1" */
.section-title,.ethics-hd-title,.horizon-title,.report-card h3,.pc-org,.module-hero h2{font-variant-numeric:lining-nums}

/* ── SECTION TITLE ──────────────────────────────────────── */
.section-title{font-family:var(--font-display);font-size:1.375rem;font-weight:400;color:var(--ink);margin:32px 0 12px}
.module-body > :first-child{margin-top:0}
.section-note{font-size:var(--text-md);color:var(--gray);margin-bottom:12px}
.fine-print{font-size:var(--text-sm);color:var(--gray)}
.nowrap{white-space:nowrap}

/* Read-only lines: what an earlier module said, and answers to questions since cut */
.from-module,.earlier-answers{font-size:var(--text-sm);color:var(--gray);line-height:1.45;overflow-wrap:anywhere}
.from-module{margin:0 0 10px}
.from-tag{color:var(--blue-ink);font-weight:500}
.earlier-answers{margin:12px 0}
.earlier-answers > div + div{margin-top:4px}
.earlier-answers span{color:var(--ink)}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn{
  display:inline-flex;align-items:center;gap:6px;
  min-height:39px;padding:0 22px;border-radius:2px;
  font-size:var(--text-md);font-weight:500;line-height:1.2;cursor:pointer;
  border:1px solid transparent;transition:background .15s,border-color .15s,color .15s
}
.btn-primary{background:var(--blue);color:white}
.btn-primary:hover{background:var(--blue-mid)}
.btn-secondary{background:transparent;color:var(--ink);border:1px solid var(--border)}
.btn-secondary:hover{border-color:var(--blue-ink);color:var(--blue-ink)}
.btn-ghost{background:transparent;color:var(--gray);padding:0 14px}
.btn-ghost:hover{color:var(--ink)}
.btn-lg{min-height:48px;padding:0 30px;font-size:var(--text-lg)}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none}

/* ── FORM ELEMENTS ──────────────────────────────────────── */
.field{margin-bottom:18px}
.field-tight{margin-bottom:var(--gap)}
.field-flush{margin-bottom:0}
.after-grid{margin-top:16px}
.field label,.field-label{display:block;font-size:var(--text-md);font-weight:500;color:var(--ink);margin-bottom:5px}
.field .hint{font-size:var(--text-sm);color:var(--gray);margin-bottom:7px;line-height:1.4}

/* Every field sits on the same surface; only its size changes */
input[type=text],
input[type=number],
textarea,
select{
  width:100%;padding:0 12px;
  border:1px solid var(--field-border);border-radius:2px;
  font-size:var(--text-md);color:var(--ink);background:var(--card);
  outline:none;
  transition:border-color .2s,box-shadow .2s
}
input[type=text],
input[type=number],
select{height:var(--control)}
select{padding-left:8px} /* the browser adds 4px inside a select */
input[type=text]:focus,
input[type=number]:focus,
textarea:focus,
select:focus{
  border-color:var(--blue-ink);box-shadow:0 0 0 1px var(--blue-ink)
}
textarea{display:block;padding:9px 12px;line-height:1.5;resize:vertical;min-height:80px}
/* Answer fields inside a card or matrix cell */
.porter-cell textarea,.bmc-cell textarea,.scenario-quad textarea,.ethics-card textarea,.kotter-step textarea,.horizon-body textarea{
  min-height:56px;padding:8px 10px;font-size:var(--text-sm)
}
/* Small fields, inside a matrix */
.uc-add input,.jmr-num input{height:var(--control-sm);padding:0 10px;font-size:var(--text-sm)}

/* ── SLIDERS ────────────────────────────────────────────── */
.slider-wrap{margin:6px 0 0}
input[type=range]{
  width:100%;-webkit-appearance:none;
  height:6px;border-radius:2px;
  background:var(--field-border);outline:none;cursor:pointer
}
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;width:20px;height:20px;
  border-radius:50%;background:var(--blue-ink);
  cursor:pointer;}
.slider-labels{display:flex;justify-content:space-between;font-size:var(--text-xs);color:var(--gray);margin-top:3px}
.slider-value{
  display:inline-block;
  background:var(--lb);color:var(--blue-ink);
  font-weight:500;padding:2px 9px;border-radius:2px;font-size:var(--text-sm);margin-top:5px
}

/* ── CHOICE CARDS ───────────────────────────────────────── */
.choice-grid{display:grid;gap:var(--gap);margin:10px 0}
.choice-grid.cols3{grid-template-columns:1fr 1fr 1fr}

.choice-card{
  border:1px solid var(--border);border-radius:2px;
  padding:12px 16px;cursor:pointer;
  transition:all .15s;background:var(--card)
}
/* Hover only points at a card; a filled card is a chosen one */
.choice-card:hover{border-color:var(--blue-ink)}
.choice-card.selected{background:var(--lb)}
.choice-card.selected .cc-title{color:var(--blue-ink)}
.cc-title{font-size:var(--text-md);font-weight:500;color:var(--ink);margin-bottom:2px}
.cc-desc{font-size:var(--text-sm);color:var(--gray);line-height:1.4}
/* One short word, centred: capability ratings and the gap blocks */
.cc-compact{min-height:var(--control);padding:4px;overflow-wrap:normal;display:flex;align-items:center;justify-content:center;text-align:center}
.cc-compact .cc-title{font-size:var(--text-sm);margin:0}
.cap-word{font-size:var(--text-sm);font-weight:500;line-height:1.3}
.cap-weak{color:var(--yellow)}
.cap-dev{color:var(--blue-ink)}
.cap-strong{color:var(--green)}
.choice-card.cap-weak.selected{background:var(--ly);--tick:var(--yellow)}
.choice-card.cap-dev.selected{background:var(--lb);--tick:var(--blue-ink)}
.choice-card.cap-strong.selected{background:var(--lg);--tick:var(--green)}

/* ── INDUSTRY CHIPS ─────────────────────────────────────── */
.ind-grid{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.ind-chip{
  min-height:var(--control-sm);padding:0 12px;border-radius:2px;
  border:1px solid var(--border);cursor:pointer;
  font-size:var(--text-sm);font-weight:500;background:var(--card);
  transition:all .15s;display:flex;align-items:center;gap:5px
}
.ind-chip:hover{border-color:var(--blue-ink)}
.ind-chip.selected{background:var(--lb);color:var(--blue-ink)}

/* ── FORCE ITEM ─────────────────────────────────────────── */
.force-item{
  background:var(--card);border:1px solid var(--border);
  border-radius:2px;padding:16px;margin-bottom:var(--gap)
}
.force-header{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}
.force-title{display:block;font-size:var(--text-md);font-weight:500;color:var(--ink)}
.force-sub{font-size:var(--text-sm);color:var(--gray)}

/* ── CALLOUTS ───────────────────────────────────────────── */
/* Same soft tint as the M2 stage cards. The colour says what kind of note it is:
   blue how a framework works, amber a caution or why it matters, green an opportunity, red a risk. */
.callout{
  --tone:var(--blue-ink);
  padding:14px 16px;border-radius:2px;
  border:1px solid var(--blue-b);background:var(--lb);color:var(--ink);
  font-size:var(--text-md);line-height:1.6;margin:12px 0
}
.callout > strong:first-child{display:block;margin-bottom:4px;color:var(--tone)}
.c-yellow{--tone:var(--yellow);background:var(--ly);border-color:var(--yellow-b)}
.c-green{--tone:var(--green);background:var(--lg);border-color:var(--green-b)}
.c-red{--tone:var(--red);background:var(--lr);border-color:var(--red-b)}

/* ── DIALOGS ────────────────────────────────────────────── */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9999;display:flex;align-items:center;justify-content:center}
.modal-box{background:var(--card);border:1px solid var(--border);border-radius:2px;padding:28px 32px;max-width:400px;width:90%}
.modal-title{font-family:var(--font-display);font-size:1.375rem;font-weight:400;font-variant-numeric:lining-nums;line-height:1.25;color:var(--ink);margin-bottom:6px}
.modal-sub{font-size:var(--text-md);color:var(--gray);margin-bottom:18px;line-height:1.5;overflow-wrap:anywhere}
.modal-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
/* Same tints as the quadrants they send a use case to */
.modal-option{height:var(--control);border:1px solid;border-radius:2px;font-size:var(--text-md);font-weight:500;cursor:pointer;transition:border-color .15s}
.modal-option.uc-q-do{border-color:var(--green-b)}
.modal-option.uc-q-plan{border-color:var(--blue-b)}
.modal-option.uc-q-defer{border-color:var(--yellow-b)}
.modal-option.uc-q-drop{border-color:var(--red-b)}
.modal-option:hover{border-color:currentColor}
.modal-box .btn{width:100%;justify-content:center;margin-top:8px}
.btn-danger{background:var(--red-fill);color:#fff}
.btn-danger:hover{background:var(--red-mid)}

/* ── CANVAS / CHART ─────────────────────────────────────── */
canvas{display:block;max-width:100%;height:auto}
.radar-sticky{position:sticky;top:calc(80px + var(--notices-h))}

/* ── REPORT STYLES ──────────────────────────────────────── */
.report-card{border-top:1px solid var(--border);padding:20px 0}
.rc-glance{border-top:none;padding-top:0}
/* Each section starts with where it came from, in blue, then its serif title */
.rc-from{font-size:var(--text-sm);font-weight:500;color:var(--blue-ink);margin-bottom:2px}
.report-card h3{
  font-family:var(--font-display);font-size:1.375rem;font-weight:400;color:var(--ink);
  padding-bottom:12px
}
#print-cover{display:none;overflow-wrap:anywhere}

.report-tag{display:inline-block;font-size:var(--text-sm);font-weight:500;line-height:1.4;padding:2px 10px;border:1px solid;border-radius:2px;margin-bottom:12px}
.tag-green{background:var(--lg);color:var(--green);border-color:var(--green-b)}
.tag-yellow{background:var(--ly);color:var(--yellow);border-color:var(--yellow-b)}
.tag-red{background:var(--lr);color:var(--red);border-color:var(--red-b)}
.tag-none{background:var(--sunken);color:var(--gray);border-color:var(--border)}

/* M8 at-a-glance summary. A tile takes the colour of its result, as the stage cards do. */
.glance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--gap);margin-bottom:var(--gap)}
.glance-tile,.glance-move{background:var(--card);border:1px solid var(--border);border-radius:2px;padding:16px}
.glance-label{display:block;font-size:var(--text-sm);color:var(--gray);margin-bottom:4px}
.glance-value{font-size:var(--text-lg);font-weight:500;color:var(--ink);line-height:1.35;overflow-wrap:anywhere}
.glance-sub{display:block;font-size:var(--text-sm);font-weight:400;color:var(--gray);margin-top:2px}
.glance-empty{font-size:var(--text-md);font-weight:400;font-style:italic;color:var(--gray)}
.glance-move{font-size:var(--text-md);color:var(--ink);line-height:1.5}
.glance-tile[data-tone=blue]{background:var(--lb);border-color:var(--blue-b)}
.glance-tile[data-tone=blue] .glance-value{color:var(--blue-ink)}
.glance-tile[data-tone=amber]{background:var(--ly);border-color:var(--yellow-b)}
.glance-tile[data-tone=amber] .glance-value{color:var(--yellow)}
.glance-tile[data-tone=green]{background:var(--lg);border-color:var(--green-b)}
.glance-tile[data-tone=green] .glance-value{color:var(--green)}
.glance-tile[data-tone=red]{background:var(--lr);border-color:var(--red-b)}
.glance-tile[data-tone=red] .glance-value{color:var(--red)}
.glance-tile[data-tone] .glance-label,.glance-tile[data-tone] .glance-sub{color:var(--ink)}
#g-usecases > div{font-size:var(--text-md)}
#g-usecases > div + div{margin-top:3px}

.report-row{
  display:flex;justify-content:space-between;align-items:flex-start;
  padding:7px 0;border-bottom:1px solid var(--border);
  font-size:var(--text-md);gap:12px
}
.report-row:last-child{border-bottom:none}
.report-row[hidden]{display:none}
.rr-label{color:var(--gray);flex:0 0 240px}
.grid-aside .rr-label{flex:0 1 auto}
.rr-text{flex:1;min-width:0;color:var(--ink);overflow-wrap:anywhere}
.rr-val{font-weight:500;color:var(--ink);text-align:right}
/* Written answers read from the left, in one column */
.rr-long{flex:1;min-width:0;font-weight:400;text-align:left;overflow-wrap:anywhere}
/* A wrapped gap keeps its last number with the name before it */
#r-competitor-gap{text-wrap:balance}
.rr-val[data-level]{white-space:nowrap}
.rr-val[data-level=high]{color:var(--red)}
.rr-val[data-level=medium]{color:var(--yellow)}
.rr-val[data-level=low]{color:var(--green)}
.rr-val[data-opportunity=high]{color:var(--green)}
.rr-val[data-opportunity=medium]{color:var(--yellow)}
.rr-val[data-cap=weak]{color:var(--yellow)}
.rr-val[data-cap=developing]{color:var(--blue-ink)}
.rr-val[data-cap=strong]{color:var(--green)}
.report-empty{color:var(--gray);font-size:var(--text-md)}
.report-note{font-size:var(--text-sm);color:var(--gray);margin-top:8px}
.uc-group + .uc-group{margin-top:10px}
.uc-group-title{font-size:var(--text-md);font-weight:500;color:var(--ink);margin-bottom:6px}
.uc-group .chip{margin-bottom:4px}
.bmc-shift-quote{font-size:var(--text-md);color:var(--ink);line-height:1.7;font-style:italic;margin-bottom:8px}
.maturity-summary{margin-bottom:8px}
.maturity-stage{font-size:var(--text-lg);font-weight:500;color:var(--ink);margin-bottom:4px}
/* A stage is the headline of this section; a line saying what's missing isn't */
.maturity-stage[data-stage="1"],.maturity-stage[data-stage="2"],.maturity-stage[data-stage="3"]{font-family:var(--font-display);font-size:1.75rem;font-weight:400;line-height:1.2;margin-bottom:6px}
.maturity-stage[data-stage="1"]{color:var(--yellow)}
.maturity-stage[data-stage="2"]{color:var(--blue-ink)}
.maturity-stage[data-stage="3"]{color:var(--green)}
.maturity-desc{font-size:var(--text-md);color:var(--gray);line-height:1.6;max-width:640px}
.report-actions{padding:24px 0 8px;display:flex;gap:12px;flex-wrap:wrap}
.report-actions .btn-ghost{padding-left:0}
.report-share{flex-basis:100%;font-size:var(--text-md);line-height:1.6;color:var(--gray)}
.report-elsewhere{margin-bottom:var(--gap);font-size:var(--text-md);line-height:1.6;color:var(--gray)}
.report-status{margin-left:auto;font-size:var(--text-sm);color:var(--gray);text-align:right}

/* M8 next 90 days: the same matrix look as the M3 priority table */
.report-table{width:100%;border-collapse:collapse;font-size:var(--text-sm);table-layout:fixed;background:var(--card);border:1px solid var(--border)}
.report-table thead th{text-align:left;font-weight:500;color:var(--gray);background:var(--sunken);padding:8px 10px;border-bottom:1px solid var(--border);vertical-align:bottom}
.report-table td,.report-table tbody th{padding:8px 10px;border-bottom:1px solid var(--border);vertical-align:top;font-weight:400;text-align:left;color:var(--ink);overflow-wrap:anywhere}
.report-table tr:last-child td,.report-table tr:last-child th{border-bottom:none}
.report-table td[data-level]{font-weight:500}
.report-table td[data-level=high]{color:var(--red)}
.report-table td[data-level=medium]{color:var(--yellow)}
.report-table td[data-level=low]{color:var(--green)}
.cell-missing{color:var(--gray)!important;font-style:italic}
.cell-note{font-size:var(--text-sm);color:var(--yellow);margin-top:2px}

.chip{
  display:inline-block;padding:4px 11px;border-radius:2px;
  font-size:var(--text-sm);font-weight:500;
  background:var(--lb);color:var(--blue-ink);border:1px solid var(--blue-b);
  max-width:100%
}
.chip-green{background:var(--lg);color:var(--green);border-color:var(--green-b)}
.chip-red{background:var(--lr);color:var(--red);border-color:var(--red-b)}

/* ── PORTER / FIVE FORCES ───────────────────────────────── */
.porter-grid{
  display:grid;
  grid-template-areas:
    ". top ."
    "left center right"
    "left center right"
    "left center right"
    ". bottom .";
  grid-template-columns:1fr 1.4fr 1fr;
  column-gap:var(--gap);
  margin:14px 0
}
.porter-cell{background:var(--card);border:1px solid var(--border);border-radius:2px;padding:16px;margin-bottom:var(--gap)}
.porter-cell.center{background:var(--lb);border-color:var(--blue-b);grid-area:center}
.porter-cell.top{grid-area:top}
.porter-cell.left{grid-area:left}
.porter-cell.right{grid-area:right}
.porter-cell.bottom{grid-area:bottom;margin-bottom:0}
.porter-cell.left,.porter-cell.center,.porter-cell.right{display:grid;grid-template-rows:subgrid}
.porter-label{font-size:var(--text-xs);font-weight:500;color:var(--blue-ink);margin-bottom:6px}
.porter-title{display:block;font-size:var(--text-md);font-weight:500;color:var(--ink);margin-bottom:8px}

/* ── JTBD ───────────────────────────────────────────────── */
.jtbd-card{position:relative;background:var(--card);border:1px solid var(--border);border-radius:2px;padding:16px;margin-bottom:12px}
.jtbd-num{font-family:var(--font-display);font-size:1.375rem;font-variant-numeric:lining-nums;color:var(--blue-ink);min-width:1.5rem;flex-shrink:0;line-height:1.3}
.jtbd-row{display:flex;gap:12px;align-items:flex-start}
.jtbd-body{flex:1;min-width:0}
/* In the corner, beside the first label, so all six jobs have fields of one width */
.jtbd-remove{position:absolute;top:16px;right:16px;min-height:0;padding:0;font-size:var(--text-sm)}
.add-job-row{display:flex;align-items:center;gap:12px;margin-top:4px}
.add-job-note{font-size:var(--text-sm);color:var(--gray)}

/* ── SCENARIO MATRIX ────────────────────────────────────── */
.scenario-setup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap);margin-bottom:20px}
.axis-field{background:var(--card);border:1px solid var(--border);border-radius:2px;padding:16px}
.axis-field .field label{font-size:var(--text-sm)}
.axis-field h4{font-size:var(--text-md);font-weight:500;margin-bottom:10px;color:var(--blue-ink)}
.scenario-matrix{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;background:var(--border);border:1px solid var(--border);
  border-radius:2px;overflow:hidden;margin:14px 0
}
/* Quadrants share rows, so the name fields line up however long the combination above them is */
.scenario-quad{background:var(--lb);padding:16px;display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
.sq-name{font-weight:500;margin-bottom:8px}
/* Frame around the 2×2: the user's axis extremes on each edge */
.scenario-frame{
  display:grid;grid-template-columns:120px 1fr 120px;
  grid-template-areas:". top ." "left matrix right" ". bottom ." ". axis1 .";
  gap:6px 10px;margin:14px 0;align-items:center
}
.scenario-frame .scenario-matrix{grid-area:matrix;margin:0}
.sx-label{font-size:var(--text-sm);font-weight:500;color:var(--ink);line-height:1.35;overflow-wrap:anywhere}
.sx-top{grid-area:top;text-align:center}
.sx-bottom{grid-area:bottom;text-align:center}
.sx-left{grid-area:left;text-align:right}
.sx-right{grid-area:right;text-align:left}
.sx-axis1{grid-area:axis1;text-align:center;font-weight:500;color:var(--gray)}
.sx-axis-name{display:block;font-weight:500;color:var(--gray)}
.sx-hint{color:var(--gray);font-weight:500;font-style:italic}
.sq-combo{font-size:var(--text-xs);color:var(--gray);margin:-2px 0 7px;line-height:1.35}
.sq-label{color:var(--blue-ink);font-size:var(--text-xs);font-weight:500;margin-bottom:5px}
/* A small tag of its own, so it doesn't run into the quadrant's label */
.sq-flag{margin-left:8px;padding:1px 6px;background:var(--card);border:1px solid var(--yellow-b);border-radius:2px}
.scenario-quad.sq-least{background:var(--ly)}
.sq-least .sq-label{color:var(--yellow)}

/* ── BMC ────────────────────────────────────────────────── */
/* The toggle stays in view while the canvas scrolls, so nobody types into the wrong one. It stops at the canvas. */
.bmc-mode{display:flex;align-items:center;gap:14px;margin-bottom:14px;flex-wrap:wrap;position:sticky;top:calc(58px + var(--notices-h));z-index:40;padding:10px 0;background:var(--bg)}
.bmc-mode-label{font-size:var(--text-md);color:var(--gray);font-style:italic}
.bmc-toggle{display:flex;border:1px solid var(--border);border-radius:2px;overflow:hidden;width:fit-content}
.bmc-toggle button{height:calc(var(--control) - 2px);padding:0 20px;border:none;font-size:var(--text-md);font-weight:500;cursor:pointer;background:var(--card);color:var(--gray);transition:all .15s}
.bmc-toggle button:not(.active):hover{color:var(--ink);background:var(--sunken)}
.bmc-toggle button.active{background:var(--blue);color:white}
.bmc-grid{display:grid;gap:1px;background:var(--border);border:1px solid var(--border);border-radius:2px;overflow:hidden;margin:14px 0}

/* Cells share rows, so fields line up however long the hint above them is. Key Partners runs down all three. */
.bmc-top{display:grid;grid-template-columns:1fr 2fr 1fr;gap:1px}
.bmc-row2{display:grid;grid-template-columns:1fr 1fr;gap:1px}
.bmc-cell{background:var(--card);padding:16px;display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:0}
.bmc-kp-cell{grid-row:span 9;display:flex;flex-direction:column}
.bmc-kp-cell textarea{flex:1;min-height:120px}
.bmc-title{display:block;font-size:var(--text-md);font-weight:500;margin-bottom:3px}
.bmc-hint{font-size:var(--text-sm);color:var(--gray);margin-bottom:8px;line-height:1.35}
/* Value Proposition and Customer Segments are the heart of the canvas */
.bmc-vp,.bmc-cs{background:var(--lb)}
.bmc-vp .bmc-title,.bmc-cs .bmc-title{color:var(--blue-ink)}

/* ── USE CASE MATRIX ────────────────────────────────────── */
.uc-backlog-add{margin-bottom:16px}
.uc-add-row{display:flex;gap:8px}
.uc-add-row input{flex:1}
.uc-backlog{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;min-height:32px}
.backlog-chip{cursor:pointer;margin-bottom:4px}
.backlog-chip:hover,.suggest-chip:hover{border-color:var(--blue-ink)}

.uc-matrix{
  display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1fr);
  gap:1px;background:var(--border);border:1px solid var(--border);
  border-radius:2px;overflow:hidden
}
.uc-axis{
  background:var(--sunken);padding:10px;text-align:center;
  font-size:var(--text-sm);font-weight:500;color:var(--gray)
}
/* Reads bottom to top, so "Higher impact →" points up the axis and "← Lower impact" down it */
.uc-axis-y{grid-row:span 4;padding:8px;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;transform:rotate(180deg)}
/* Soft tints, one job each. Quadrants share rows, so lists and fields line up across a row. */
.uc-q{padding:16px;display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
.uc-q-do{background:var(--lg);color:var(--green)}
.uc-q-plan{background:var(--lb);color:var(--blue-ink)}
.uc-q-defer{background:var(--ly);color:var(--yellow)}
.uc-q-drop{background:var(--lr);color:var(--red)}
.uc-q-title{font-size:var(--text-md);font-weight:500;margin-bottom:4px}
.uc-q-desc{font-size:var(--text-sm);line-height:1.4;margin-bottom:10px}
.uc-q-list{min-height:60px}
.uc-item{
  background:var(--card);border:1px solid var(--border);color:var(--ink);
  border-radius:2px;padding:8px 10px;margin-bottom:7px;
  font-size:var(--text-sm);
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:6px
}
.uc-item-text{flex:1;min-width:0;line-height:1.4;overflow-wrap:anywhere}
.uc-item-del{color:var(--gray);cursor:pointer;font-size:var(--text-md);line-height:1.2;flex-shrink:0;border:none;background:none;padding:0 2px}
.uc-item-del:hover{color:var(--red)}
.uc-add{display:flex;gap:6px;margin-top:8px}
.uc-add input{flex:1}
.uc-add button{flex:0 0 var(--control-sm);height:var(--control-sm);padding:0;font-size:var(--text-md);background:var(--blue);color:white;border:none;border-radius:2px;cursor:pointer;font-weight:500;transition:background .15s}
.uc-add button:hover{background:var(--blue-mid)}

/* ── JTBD PRIORITY MATRIX ───────────────────────────────── */
.jtbd-matrix-wrap{
  border:1px solid var(--border);border-radius:2px;overflow:hidden;margin:14px 0
}
.jtbd-matrix{width:100%;border-collapse:collapse;table-layout:fixed}
.jtbd-matrix thead{background:var(--sunken);border-bottom:1px solid var(--border)}
.jtbd-matrix th,.jtbd-matrix td{padding:10px 6px;vertical-align:middle;line-height:1.4}
.jtbd-matrix tr > :first-child{padding-left:16px}
.jtbd-matrix tr > :last-child{padding-right:16px}
.jtbd-matrix thead th:nth-child(2),.jtbd-matrix thead th:nth-child(3){width:172px}
.jtbd-matrix thead th:nth-child(4){width:102px}
.jmh-job{font-size:var(--text-sm);font-weight:500;color:var(--gray);text-align:left}
.jmh-num{font-size:var(--text-sm);font-weight:500;color:var(--gray);text-align:center}
.jmh-gap{font-size:var(--text-sm);font-weight:500;color:var(--gray);text-align:center}
.jtbd-matrix-row{
  border-bottom:1px solid var(--border);background:var(--card);
  transition:background .15s
}
.jtbd-matrix-row:last-child{border-bottom:none}
.jtbd-matrix-row:hover{background:var(--sunken)}
.jmr-job{font-size:var(--text-md);font-weight:400;text-align:left;color:var(--ink);overflow-wrap:anywhere}
.jmr-placeholder{color:var(--gray);font-style:italic}
.jmr-num{display:flex;justify-content:center}
.jmr-num input{width:68px;font-weight:500;text-align:center}
/* The score is tinted by how much of an opportunity it is */
.jmr-gap{
  height:var(--control-sm);margin:0 4px;
  display:flex;align-items:center;justify-content:center;
  font-size:var(--text-md);font-weight:500;color:var(--ink);
  background:var(--sunken);border:1px solid var(--border);border-radius:2px
}
/* A high score is an opportunity, so green as everywhere else. Low stays plain: nothing to act on. */
.jmr-gap[data-level=high]{background:var(--lg);border-color:var(--green-b);color:var(--green)}
.jmr-gap[data-level=medium]{background:var(--ly);border-color:var(--yellow-b);color:var(--yellow)}

/* ── ETHICS CANVAS ──────────────────────────────────────── */
/* Cards in a row share rows, so ratings and fields line up however long the question is */
.ethics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--gap);margin:14px 0 0}
.ethics-card{background:var(--card);border:1px solid var(--border);border-radius:2px;padding:16px;margin-bottom:var(--gap);display:grid;grid-row:span 4;grid-template-rows:subgrid}
.ethics-hd{color:var(--ink);margin-bottom:6px}
.ethics-hd-title{font-family:var(--font-display);font-size:1.125rem;font-weight:400}
.ethics-body{display:grid;grid-row:span 3;grid-template-rows:subgrid}
.ethics-body .hint{font-size:var(--text-sm);color:var(--gray);margin-bottom:10px;line-height:1.4}
.ethics-rating{display:flex;gap:6px;margin-bottom:10px}
/* The word is in its colour before it is chosen, as on the capability buttons */
.er-btn{
  flex:1;height:var(--control-sm);padding:0 8px;border-radius:2px;border:1px solid var(--border);
  font-size:var(--text-sm);font-weight:500;cursor:pointer;background:var(--card);
  transition:all .15s
}
.er-low{color:var(--green)}
.er-med{color:var(--yellow)}
.er-high{color:var(--red)}
.er-btn:hover{border-color:currentColor}
.er-btn.active-low{background:var(--lg)}
.er-btn.active-med{background:var(--ly)}
.er-btn.active-high{background:var(--lr)}

/* A choice reads as chosen without relying on colour: a heavier border and a tick */
.choice-card,.ind-chip,.er-btn{position:relative}
.choice-card.selected,.ind-chip.selected{--tick:var(--blue-ink)}
.er-btn.active-low{--tick:var(--green)}
.er-btn.active-med{--tick:var(--yellow)}
.er-btn.active-high{--tick:var(--red)}
.choice-card.selected,.ind-chip.selected,.er-btn[class*=active-]{border-color:var(--tick);box-shadow:inset 0 0 0 1px var(--tick)}
.choice-card.selected::after,.ind-chip.selected::after,.er-btn[class*=active-]::after{
  content:"\2713";
  content:"\2713" / "";
  position:absolute;top:-7px;right:-7px;width:16px;height:16px;border-radius:50%;
  background:var(--tick);color:var(--card);
  font-size:10px;font-weight:500;line-height:16px;text-align:center
}

.ethics-status{font-size:var(--text-md);padding:7px 0;border-bottom:1px solid var(--border)}
.grid-2 > .callout{margin:0}
.ethics-summary{margin-top:10px}
.ethics-flagged{color:var(--red);font-weight:500}
.ethics-clear{color:var(--green)}
.ethics-none{color:var(--gray)}

/* ── KOTTER ─────────────────────────────────────────────── */
/* Steps in a row share rows, so their fields line up however long the question is */
.kotter-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--gap);margin:14px 0 0}
.kotter-step{
  background:var(--card);border:1px solid var(--border);border-radius:2px;padding:16px;margin-bottom:var(--gap);
  display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;grid-row:span 5;grid-template-rows:subgrid
}
.kotter-num{grid-row:1 / -1;font-family:var(--font-display);font-size:1.375rem;font-variant-numeric:lining-nums;color:var(--blue-ink);min-width:1.5rem;line-height:1.2}
.kotter-body{grid-row:1 / -1;min-width:0;display:grid;grid-template-rows:subgrid}
.kotter-phase{font-size:var(--text-sm);font-weight:500;color:var(--blue-ink);margin-bottom:2px}
.kotter-title{display:block;font-size:var(--text-md);font-weight:500;color:var(--ink);margin-bottom:3px}
.kotter-desc{font-size:var(--text-sm);color:var(--gray);line-height:1.4;margin-bottom:8px}
.kotter-body > textarea,.kotter-body > .print-text{grid-row:5}

/* ── THREE HORIZONS ─────────────────────────────────────── */
/* One surface per card, and fields that line up: the cards share rows */
.horizons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:var(--gap);margin:14px 0}
.horizon-card{background:var(--card);border-radius:2px;overflow:hidden;border:1px solid var(--border);display:grid;grid-row:span 4;grid-template-rows:subgrid}
.horizon-hd{padding:16px;color:white}
.h1-hd{background:var(--h1)}
.h2-hd{background:var(--h2)}
.h3-hd{background:var(--h3)}
.horizon-label{font-size:var(--text-xs);font-weight:500;margin-bottom:4px}
.horizon-title{font-family:var(--font-display);font-size:1.25rem;font-weight:400}
.horizon-time{font-size:var(--text-sm);margin-top:3px}
.horizon-body{padding:16px;display:grid;grid-row:span 3;grid-template-rows:subgrid}
.horizon-focus{font-size:var(--text-sm);color:var(--gray);margin-bottom:8px;line-height:1.4}
.horizon-body > textarea,.horizon-body > .print-text{grid-row:3}

/* ── MATURITY TRACK ─────────────────────────────────────── */
.maturity-track{position:relative;margin:22px 0}
.maturity-bar{
  height:10px;
  background:linear-gradient(90deg,var(--yellow-b),var(--yellow-b),var(--green-b),var(--green-b),var(--green));
  border-radius:2px;position:relative
}
.maturity-pointer{
  position:absolute;top:-9px;left:15%;
  width:4px;height:28px;
  background:var(--ink);border-radius:2px;
  transition:left .5s ease
}
.maturity-pointer::after{
  content:attr(data-label);
  position:absolute;top:32px;left:50%;transform:translateX(-50%);
  white-space:nowrap;font-size:var(--text-sm);font-weight:500;color:var(--ink);
  background:var(--card);padding:2px 9px;border-radius:2px;
  border:1px solid var(--border)
}
.maturity-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap);margin-top:52px}
/* The owner likes these soft cards as they are: soft fill, thin matching border, coloured title. Keep them. */
.ml-card{border-radius:2px;padding:16px;border:1px solid var(--border);transition:all .2s}
.ml1{background:var(--ly);border-color:var(--yellow-b)}.ml1.active{border-color:var(--yellow);box-shadow:inset 0 0 0 1px var(--yellow)}
.ml2{background:var(--lb);border-color:var(--blue-b)}.ml2.active{border-color:var(--blue-ink);box-shadow:inset 0 0 0 1px var(--blue-ink)}
.ml3{background:var(--lg);border-color:var(--green-b)}.ml3.active{border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
.ml-title{font-size:var(--text-md);font-weight:500;margin-bottom:3px}
.ml1 .ml-title{color:var(--yellow)}.ml2 .ml-title{color:var(--blue-ink)}.ml3 .ml-title{color:var(--green)}
.ml-desc{font-size:var(--text-sm);color:var(--gray);line-height:1.4}

/* ── LAYOUT GRIDS ───────────────────────────────────────── */
.print-text{display:none}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap)}
.grid-2 > .force-item,.grid-3 > .force-item{margin-bottom:0;display:flex;flex-direction:column}
/* Sliders and rating buttons line up even when one heading wraps */
.grid-2 > .force-item > .force-header,.grid-3 > .force-item > .force-header{flex:1}
.grid-3 > .force-item > .choice-grid{margin:8px 0 0}
.grid-aside{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
.grid-aside-narrow{grid-template-columns:minmax(0,1fr) 280px}

/* ── SMALL SCREENS ──────────────────────────────────────── */
/* Built for desktop browsers: no phone layout, just a notice (see #desktop-note) */
/* The side padding keeps the text clear of the night mode button */
#desktop-note{
  display:none;
  background:var(--ly);color:var(--yellow);border-bottom:1px solid var(--yellow-b);
  padding:10px 3.25rem;font-size:var(--text-md);line-height:1.4;text-align:center
}
@media screen and (max-width:800px){
  #desktop-note{display:block}
}

strong{font-weight:500}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Bottom bar: Home and Back on the left, the next step on the right, the same in every module */
.module-footer > :last-child{margin-left:auto}
.module-footer > .report-status + :last-child{margin-left:0;flex-shrink:0}
.module-footer .btn-ghost{padding-left:0;border-left:none}

/* Module 6 tables */
.form-table input,.form-table select{font-size:var(--text-sm)}
.form-table input{padding:0 10px}
.form-table{width:100%;border-collapse:collapse;table-layout:fixed}
.form-table th,.form-table td{padding:0 8px 8px 0;vertical-align:top;font-weight:400;text-align:left}
.form-table tr > :last-child{padding-right:0}
.form-table input,.form-table select{display:block}
.form-table thead th{font-size:var(--text-sm);font-weight:500;color:var(--gray);padding-bottom:6px;vertical-align:bottom}
.val-table thead th{width:20%}
.val-table thead th:first-child{width:40%}
/* Wide enough for "A cost can't be negative" and "Different currencies" on one line */
.vc-table thead th:nth-child(1){width:18%}
.vc-table thead th:nth-child(2){width:15%}
.vc-table thead th:nth-child(3),.vc-table thead th:nth-child(4){width:16%}
.vc-table thead th:nth-child(5){width:16%}
.form-table .vc-name{font-size:var(--text-sm);color:var(--ink);overflow-wrap:anywhere;padding-top:10px}
.form-table .vc-net{font-size:var(--text-md);font-weight:500;color:var(--ink);font-variant-numeric:tabular-nums;padding-top:9px}
.uc-suggestions{margin-top:10px}
.uc-suggestions .from-module{margin-bottom:6px}
.suggest-chip{cursor:pointer;margin:0 6px 6px 0;text-align:left}
.vc-amount input{width:100%}
.vc-hint{font-size:var(--text-sm);color:var(--yellow);margin-top:3px}
#r-value-case:empty{display:none}
#r-value-case{margin-top:10px}
/* Keeps anything scrolled to clear of the bars. keepFocusedFieldClear() in app.js does this for a focused field. */
html{scroll-padding-top:calc(58px + var(--notices-h) + 1rem);scroll-padding-bottom:5rem}
::placeholder{color:var(--gray);opacity:1}

/* Same control as lars.ceo: a small fixed circle in the top right */
#theme-toggle{
  position:fixed;top:.8rem;right:.6rem;z-index:200;
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--bg);color:var(--gray);border:1px solid var(--border);
  font-size:14px;line-height:1;cursor:pointer
}
#theme-toggle:hover{color:var(--blue-ink);border-color:var(--blue-ink)}

/* --blue-ink stays readable on the dark background too */
a:focus-visible,button:focus-visible,[role=button]:focus-visible{outline:2px solid var(--blue-ink);outline-offset:2px}
input[type=range]:focus-visible{outline:2px solid var(--blue-ink);outline-offset:4px}
/* The toggle clips anything outside it, so its ring sits inside each button */
.bmc-toggle button:focus-visible{outline-offset:-2px}
.bmc-toggle button.active:focus-visible{outline-color:#fff;outline-offset:-4px}
/* Headings take focus when a page changes, but they aren't controls */
[tabindex="-1"]:focus{outline:none}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important}
}

/* ── PRINT ──────────────────────────────────────────────── */
@page{size:A4;margin:16mm}
@media print{
  /* White paper, whatever the screen theme is. The soft tints print: they carry meaning. */
  :root{--bg:#fff;--card:#fff}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}

  /* Hide chrome */
  #theme-toggle,
  #notices,
  #loading-note,
  .app-header,
  .module-footer,
  .app-credit,
  .land-hero,
  .report-actions,
  #landing{display:none!important}

  /* Faint diagonal mark. Fixed elements repeat on every printed page. */
  #print-watermark{
    display:block;position:fixed;top:50%;left:50%;
    transform:translate(-50%,-50%) rotate(-30deg);
    font-size:80pt;font-weight:500;color:var(--ink);opacity:.05;
    white-space:nowrap;pointer-events:none;z-index:999
  }

  body{background:var(--card)}
  #app{display:block!important}

  .module{display:none!important}
  .module.active{display:block!important;min-height:unset}

  .module-hero{
    background:var(--card)!important;
    border-bottom:2px solid var(--ink);
    padding:20px 0 14px
  }
  .module-hero h2{font-size:18pt}
  .module-body{padding:16px 0;max-width:100%}

  /* Long cards flow across pages, so no page sits half empty. Short ones stay whole. */
  .report-card{padding:14px 0}
  .rc-glance{padding-top:0}
  .rc-glance,.rc-next90,.rc-disruption,.rc-maturity,.rc-bmc{break-inside:avoid}
  .report-card h3{font-size:14pt;padding-bottom:8px;break-after:avoid}
  /* A CEO reading the PDF has never seen the modules, so where a section came from stays on screen */
  .rc-from,.from-tag{display:none}
  .report-row,.callout,.glance-tile,.uc-group,.report-table tr,.horizon-card,.kotter-step{break-inside:avoid}

  /* Horizons stack, for the width. Kotter stays in two columns with its rows lined up, as on screen. */
  .horizons{display:block}
  .horizon-card,.horizon-body{display:block}
  .horizon-card{margin-bottom:var(--gap)}
  .horizon-card:last-child{margin-bottom:0}
  .callout{padding:10px 14px;margin:8px 0}

  /* Answer fields print as their plain-text copies (see preparePrintText in app.js) */
  .print-ready textarea,.print-ready input[type=text]{display:none!important}
  .uc-add,#uc-backlog-input + button,.add-job-row,.jtbd-remove{display:none!important}
  .print-ready .print-text{
    display:block;white-space:pre-wrap;overflow-wrap:anywhere;
    font-size:var(--text-md);color:var(--ink);line-height:1.5;
    padding:6px 0;border-bottom:1px solid var(--border);margin-bottom:6px
  }
  .print-text.print-empty{color:var(--gray)}

  /* Keeps the last tile's right border inside the page edge */
  .glance-grid{margin-right:1px}

  /* An intro stays with what it introduces, and a heading with the rows and the total under it */
  .rc-horizons > .callout,.rc-kotter > .callout{break-after:avoid}
  #r-value-case{break-inside:avoid}

  /* Report header replaces the generic module heading on paper */
  #mod-7 .module-hero{display:none!important}
  #print-cover{display:block;border-bottom:2px solid var(--ink);padding:6px 0 14px;margin-bottom:14px}
  .pc-tag{font-size:var(--text-sm);font-weight:500;color:var(--blue-ink)}
  .pc-org{font-family:var(--font-display);font-size:26pt;font-weight:400;color:var(--ink);margin:4px 0 2px}
  .pc-meta{font-size:var(--text-md);color:var(--gray)}
  .pc-credit{font-size:var(--text-sm);color:var(--gray);margin-top:4px}
  .pc-credit a{color:inherit;font-weight:500;text-decoration:none}
}
