/* Vertical Velocity Studio. The look follows the book's cover: deep navy, and one cyan line
   that rises out of a tangle. Headings in Barlow Semi Condensed and text in Source Sans 3, the
   fonts of the printed cards (SIL Open Font License, see /fonts). */

@font-face {
    font-family: 'Barlow Semi Condensed';
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/BarlowSemiCondensed-SemiBold-eeb5c79e726cd03f976e08d3436cfe42.woff2') format('woff2');
}

@font-face {
    font-family: 'Barlow Semi Condensed';
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/BarlowSemiCondensed-Bold-6bc13aab656444b99af6ce6134b51505.woff2') format('woff2');
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 200 900;
    font-display: swap;
    src: url('/fonts/SourceSans3-Variable-70db894e04f27d788257794d423a50e0.woff2') format('woff2');
}

:root {
    color-scheme: dark;
    --bg: #070d1f;
    --bg-deep: #050916;
    --surface: rgba(140, 180, 255, 0.05);
    --surface-strong: rgba(140, 180, 255, 0.09);
    --border: rgba(140, 180, 255, 0.16);
    --border-strong: rgba(140, 200, 255, 0.32);
    --text: #e6edfb;
    --muted: #9eabc8;
    --faint: #8794b3;
    --cyan: #63d3e8;
    --cyan-light: #b8f1fb;
    --teal: #45c9b1;
    --glow: rgba(99, 211, 232, 0.35);
    --danger: #ff8a7a;
    --ok: #6fe0b3;
    /* The parts of the book, as on the printed cards, lifted for a dark page */
    --part-1: #e2665a;
    --part-2: #5b97ea;
    --part-3: #e0b44f;
    --part-4: #4fb88d;
    --part-bonus: #a183e6;
    /* DORA's speed and stability, and Westrum's three cultures */
    --speed: #6aa6f2;
    --stability: #f19a55;
    --pathological: #e2665a;
    --bureaucratic: #e0b44f;
    --generative: #45c9b1;
    --radius: 14px;
    --radius-small: 8px;
    --heading: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
    --body: 'Source Sans 3', system-ui, sans-serif;
}

[data-part="THE_PROBLEM"] { --band: var(--part-1); }
[data-part="THE_SOLUTION"] { --band: var(--part-2); }
[data-part="ENABLERS"] { --band: var(--part-3); }
[data-part="MEASUREMENT_AND_SCALE"] { --band: var(--part-4); }
[data-part="BONUS"] { --band: var(--part-bonus); }

[data-type="PATHOLOGICAL"] { --culture: var(--pathological); }
[data-type="BUREAUCRATIC"] { --culture: var(--bureaucratic); }
[data-type="GENERATIVE"] { --culture: var(--generative); }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* A link to a section (#cards, #start) stops below the sticky header, not under it */
[id] { scroll-margin-top: 5.5rem; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 700px at 85% -10%, rgba(64, 120, 220, 0.22), transparent 60%),
        radial-gradient(900px 600px at -10% 30%, rgba(69, 201, 177, 0.08), transparent 60%),
        linear-gradient(180deg, #0a1430 0%, var(--bg) 40%, var(--bg-deep) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--heading);
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 0.5rem;
    letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--cyan-light); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.6rem;
}

.sub { color: var(--muted); font-size: 1.15rem; }
.small { font-size: 0.92rem; color: var(--muted); }
.note { font-size: 0.9rem; color: var(--muted); }
.muted { color: var(--faint); }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.88rem; }

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.72rem 1.4rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-light), var(--cyan) 45%, var(--teal));
    color: #04121c;
    font: 700 1rem/1 var(--body);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(184, 241, 251, 0.3), 0 8px 30px -8px var(--glow);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    color: #04121c;
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(184, 241, 251, 0.5), 0 12px 38px -8px rgba(99, 211, 232, 0.6);
    filter: brightness(1.05);
}

.btn:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 0 0 1.5px var(--border-strong);
}

.btn-ghost:hover {
    color: var(--cyan-light);
    box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 24px -6px var(--glow);
}

.btn-small { padding: 0.5rem 1rem; font-size: 0.92rem; }
.btn-wide { width: 100%; padding: 1rem; font-size: 1.1rem; }

.btn-danger {
    background: transparent;
    color: var(--danger);
    box-shadow: inset 0 0 0 1.5px rgba(255, 138, 122, 0.45);
}

.btn-danger:hover { color: #ffb3a8; box-shadow: inset 0 0 0 1.5px var(--danger); }

.link { color: var(--muted); font-weight: 600; text-decoration: none; }
.link:hover { color: var(--cyan); }

/* Header and footer */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
    background: rgba(7, 13, 31, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(140, 180, 255, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-family: var(--heading);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.brand b { color: var(--cyan); font-weight: 700; }
.brand:hover { color: var(--text); }

.site-nav { display: flex; align-items: center; gap: clamp(0.8rem, 2.5vw, 1.8rem); }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:not(.btn):hover { color: var(--text); }

.site-footer {
    margin-top: 5rem;
    padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
    border-top: 1px solid rgba(140, 180, 255, 0.08);
    background: rgba(5, 9, 22, 0.6);
    color: var(--muted);
}

.footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-inner p { margin: 0.7rem 0 0; max-width: 32rem; }
.nowrap { white-space: nowrap; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-inner ul a { color: var(--muted); text-decoration: none; }
.footer-inner ul a:hover { color: var(--cyan); }
.fine { max-width: 72rem; margin: 2rem auto 0; font-size: 0.82rem; color: var(--faint); }

/* Sections */

.section, .page {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section { margin-top: clamp(4rem, 9vw, 7rem); }
.section-lede { max-width: 44rem; color: var(--muted); font-size: 1.1rem; }
.page { padding-top: 2rem; }
.page.narrow { max-width: 40rem; }

.panel {
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8);
}

/* Home: the hero */

.hero {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
    min-height: min(46rem, 88vh);
    display: grid;
    align-items: center;
    padding: 3rem clamp(1rem, 4vw, 2.5rem);
    overflow: hidden;
}

.hero-copy { position: relative; z-index: 1; max-width: 40rem; }

.hero h1 {
    font-size: clamp(3.2rem, 10vw, 7rem);
    line-height: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin-bottom: 1.4rem;
    background: linear-gradient(180deg, var(--cyan-light) 0%, var(--cyan) 55%, #3eaecb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 30px rgba(99, 211, 232, 0.25));
}

.hero h1 span { display: block; }

.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 34rem; }
.lede em { color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.hero-line {
    position: absolute;
    right: -4%;
    bottom: 0;
    height: 100%;
    width: min(56%, 38rem);
    opacity: 0.95;
    pointer-events: none;
}

.hero-line .trail {
    fill: none;
    stroke: url(#hero-gradient);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    filter: drop-shadow(0 0 6px rgba(99, 211, 232, 0.7)) drop-shadow(0 0 18px rgba(69, 201, 177, 0.35));
    animation: draw 3.6s cubic-bezier(0.45, 0, 0.2, 1) 0.2s forwards;
}

.hero-line .sparks circle {
    fill: var(--cyan-light);
    opacity: 0;
    filter: drop-shadow(0 0 4px var(--cyan));
    animation: twinkle 3.2s ease-in-out infinite;
}

.hero-line .sparks circle:nth-child(2n) { animation-delay: 1.1s; }
.hero-line .sparks circle:nth-child(3n) { animation-delay: 2.1s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.9; transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-line .trail { animation: none; stroke-dashoffset: 0; }
    .hero-line .sparks circle { animation: none; opacity: 0.6; }
}

/* Home: how it works */

.steps {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding: 1.6rem 1.5rem 1.4rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    counter-increment: step;
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--heading);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.8rem;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--cyan);
}

.steps p { color: var(--muted); margin: 0; }

/* The cards, as tiles with their part's color on the left edge */

.card-grid {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
    gap: 1rem;
}

.card-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.3rem 1.3rem 1.2rem 1.6rem;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(140, 180, 255, 0.09), rgba(140, 180, 255, 0.03));
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-tile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--band);
    box-shadow: 0 0 16px var(--band);
}

.card-tile:not(.soon):hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 18px 50px -24px var(--glow);
}

.card-tile.soon { opacity: 0.62; }
.card-tile h3 { font-size: 1.25rem; margin: 0; }
.card-tile p { color: var(--muted); font-size: 0.95rem; margin: 0.2rem 0 0.8rem; }
.card-tile .eyebrow { color: var(--band); margin: 0; font-size: 0.7rem; }

.card-number {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    font-family: var(--heading);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(140, 180, 255, 0.35);
}

.chip {
    align-self: flex-start;
    margin-top: auto;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
    border: 1px solid var(--border);
}

.card-tile:not(.soon) .chip { color: var(--ok); border-color: rgba(111, 224, 179, 0.45); }

.tile-body { margin-top: auto; display: grid; gap: 0.7rem; }
.tile-stat { font-size: 0.92rem; color: var(--muted); margin: 0; }
.tile-stat b { color: var(--text); }
.tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.tile-actions form { margin: 0; }

/* Home: start a team */

.start-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
    align-items: center;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(99, 211, 232, 0.14), transparent 70%),
        linear-gradient(180deg, var(--surface-strong), var(--surface));
    border-color: var(--border-strong);
}

.start-panel p { color: var(--muted); margin: 0; }
.inline-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.input-row { display: flex; gap: 0.6rem; }
.input-row input { flex: 1; min-width: 0; }

/* Home and book: the cover */

.book-teaser {
    display: grid;
    grid-template-columns: minmax(10rem, 17rem) 1fr;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}

.book-teaser p:not(.sub) { color: var(--muted); max-width: 38rem; }

.cover {
    display: block;
    perspective: 1200px;
}

.cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px 10px 10px 4px;
    box-shadow: -8px 0 0 -4px rgba(255, 255, 255, 0.06) inset, 0 30px 70px -20px rgba(0, 0, 0, 0.9),
        0 0 60px -10px rgba(99, 211, 232, 0.25);
    transform: rotateY(-14deg) rotateX(3deg);
    transition: transform 0.5s ease;
}

.cover:hover img { transform: rotateY(-4deg) rotateX(1deg); }

/* Book page */

.book-hero {
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem clamp(1rem, 4vw, 2.5rem) 0;
    display: grid;
    grid-template-columns: minmax(12rem, 24rem) 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.book-copy h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--cyan);
    text-shadow: 0 0 40px rgba(99, 211, 232, 0.3);
}

.book-copy > p:not(.sub) { color: var(--muted); }

blockquote {
    margin: 1.8rem 0;
    padding: 1.2rem 1.5rem;
    border-left: 3px solid var(--cyan);
    background: var(--surface);
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    font-size: 1.12rem;
    font-style: italic;
}

blockquote p:last-child { margin: 0; }

.badge-soon {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(111, 224, 179, 0.45);
    color: var(--ok) !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.audience {
    list-style: none;
    margin: 1.5rem 0 1rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}

.audience li { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.audience p { color: var(--muted); margin: 0; }

.parts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.parts .part {
    padding: 1.3rem 1.3rem 1.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--band);
}

.parts .part h3 { color: var(--band); font-size: 1.15rem; }
.parts .part p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.author p { max-width: 46rem; color: var(--muted); font-size: 1.1rem; }
.cta .panel { text-align: center; }
.cta p { color: var(--muted); }

/* Forms */

input[type="text"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-small);
    border: 1.5px solid var(--border-strong);
    background: rgba(5, 9, 22, 0.55);
    color: var(--text);
    font: 1rem/1.4 var(--body);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(99, 211, 232, 0.2);
}

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }
input[readonly] { color: var(--muted); }
textarea { resize: vertical; }

.error { color: var(--danger); font-size: 0.9rem; margin: 0.3rem 0 0; display: block; }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > span:first-child { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field.grow { flex: 1; }

.fields-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.problems {
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 138, 122, 0.5);
    border-radius: var(--radius-small);
    background: rgba(255, 138, 122, 0.08);
}

.problems p { margin: 0; }
.problems ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--danger); }
.problems ul:empty { display: none; }

.flash {
    padding: 0.8rem 1.1rem;
    margin: 1rem 0 1.5rem;
    border-radius: var(--radius-small);
    border: 1px solid rgba(111, 224, 179, 0.45);
    background: rgba(111, 224, 179, 0.08);
    color: var(--ok);
    font-weight: 600;
}

.form-actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; }
.danger-zone { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px dashed var(--border); }
.toolbar { margin: 1.5rem 0; }

/* Team pages */

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--faint);
    margin-bottom: 1.8rem;
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }

.team-head { margin: 1rem 0 1.5rem; }
.rename { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.title-input {
    flex: 1;
    min-width: 12rem;
    font-family: var(--heading) !important;
    font-size: clamp(2.2rem, 5vw, 3.2rem) !important;
    font-weight: 700;
    line-height: 1.1 !important;
    padding: 0.1rem 0.4rem !important;
    margin-left: -0.4rem;
    border-color: transparent !important;
    background: transparent !important;
}

.title-input:hover { border-color: var(--border) !important; }
.title-input:focus { border-color: var(--cyan) !important; }

.key {
    display: grid;
    grid-template-columns: 1fr minmax(18rem, 30rem);
    gap: 1.5rem;
    align-items: center;
}

.key h2 { font-size: 1.4rem; }
.key p { margin: 0; color: var(--muted); }

.key.fresh {
    border-color: var(--cyan);
    box-shadow: 0 0 0 1px var(--cyan), 0 0 50px -12px var(--glow);
}

.copy-row { display: flex; gap: 0.5rem; }
.copy-row input { flex: 1; min-width: 0; }

.card-head {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1rem;
    padding-left: 1.4rem;
    margin-bottom: 2rem;
}

.card-head::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 5px;
    border-radius: 3px;
    background: var(--band);
    box-shadow: 0 0 18px var(--band);
}

.card-head > * { grid-column: 1; }
.card-head .eyebrow { color: var(--band); }
.card-head .sub { margin: 0; }

.card-head .tag {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    padding: 0.3rem 0.8rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.intro {
    padding: 1rem 1.2rem;
    margin-bottom: 1.8rem;
    border-radius: var(--radius-small);
    background: var(--surface);
    border: 1px solid var(--border);
}

.intro p:last-child { margin: 0; }

/* DORA */

.metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.label {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.8rem 0 -0.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.label::before { content: ''; width: 0.75rem; height: 0.75rem; background: currentColor; }
.label.speed { color: var(--speed); }
.label.speed::before { border-radius: 3px; }
.label.stability { color: var(--stability); }
.label.stability::before { border-radius: 50%; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.3rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
}

.metric.speed { --accent: var(--speed); }
.metric.stability { --accent: var(--stability); }
.metric legend { float: left; width: 100%; font-family: var(--heading); font-size: 1.35rem; font-weight: 700; }
.metric .small { margin: 0; clear: both; }

.cfr { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }

.result {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 8rem;
}

.result-value {
    font-family: var(--heading);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    color: var(--stability);
    text-shadow: 0 0 24px rgba(241, 154, 85, 0.35);
}

.result-value.muted { color: var(--faint); text-shadow: none; }
.result-label { font-size: 0.82rem; color: var(--muted); }
.result-label.error { color: var(--danger); }

.levels { display: flex; align-items: center; gap: 0.5rem; margin-top: auto; }
.levels-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-right: auto; }

/* A circled level, as on the card: E, H, M or L */
.lv {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    font-family: var(--heading);
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.lv input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lv:hover { border-color: var(--accent, var(--cyan)); color: var(--text); }
.lv:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

.lv:has(input:checked) {
    border-color: var(--accent, var(--cyan));
    background: var(--accent, var(--cyan));
    color: #04121c;
    box-shadow: 0 0 18px -2px var(--accent, var(--cyan));
}

.lv.static { cursor: default; width: 1.9rem; height: 1.9rem; font-size: 0.95rem; color: var(--text); border-color: var(--cyan); }
.lv.small { width: 1.6rem; height: 1.6rem; font-size: 0.85rem; }
.lv.empty { border-color: var(--border); color: var(--faint); }
.level-row { display: flex; gap: 0.3rem; }

.bench {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0.2rem 1.3rem;
}

.bench summary { cursor: pointer; padding: 0.9rem 0; font-weight: 700; color: var(--muted); }
.bench summary:hover { color: var(--text); }
.bench-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.bench-level h4 { display: flex; align-items: center; gap: 0.5rem; }
.bench-level ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; color: var(--muted); }
.bench-level li + li { margin-top: 0.3rem; }

.next {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 2rem;
    padding: 1.3rem;
    border-radius: var(--radius);
    border: 1.5px dashed var(--border-strong);
}

.next legend { float: left; width: 100%; margin-bottom: 0.8rem; font-family: var(--heading); font-size: 1.35rem; font-weight: 700; }
.next .field:not(.grow) { min-width: 12rem; }

.next:has(legend) { flex-wrap: wrap; }
.next:has(legend) > .field { flex: 1 1 12rem; }
.next:has(legend) > .field.grow { flex: 3 1 20rem; }

/* Tables */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.table th, .table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid rgba(140, 180, 255, 0.08); white-space: nowrap; }
.table th { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(140, 180, 255, 0.04); }
.table td:last-child { white-space: normal; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 3rem 1.5rem; }
.empty p { color: var(--muted); margin: 0 auto; max-width: 30rem; }

/* Westrum */

.westrum-layout {
    display: grid;
    grid-template-columns: minmax(16rem, 20rem) 1fr;
    gap: 1.5rem;
    align-items: start;
}

.invite { display: flex; flex-direction: column; gap: 1rem; text-align: center; position: sticky; top: 5rem; }
.invite h2 { font-size: 1.35rem; margin: 0; }
.invite p { margin: 0; text-align: left; }
.phone-link-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.phone-link-actions form { margin: 0; }
.phone-link-actions .phone-link-closed { flex-basis: 100%; color: var(--muted); }

.qr {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 0 0 6px #fff, 0 0 50px -6px var(--glow);
}

.counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }

.count {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.4rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.count.visible { border-color: rgba(69, 201, 177, 0.5); }
.count-label { font-weight: 600; color: var(--muted); }
.count-value { font-family: var(--heading); font-size: 2rem; line-height: 1; }
.count .small { grid-column: 1 / -1; margin: 0; }

.meter {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--cyan) var(--progress), rgba(140, 180, 255, 0.12) var(--progress));
}

.dot {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(99, 211, 232, 0.6);
    vertical-align: -0.05rem;
}

.dot.open { background: transparent; border: 2px solid var(--cyan); box-shadow: none; }
.dot.big { width: 3rem; height: 3rem; margin-bottom: 1rem; box-shadow: 0 0 40px var(--glow); }

.spectrum { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: var(--surface); }

.spectrum-row {
    display: grid;
    grid-template-columns: minmax(7rem, 0.9fr) repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(140, 180, 255, 0.08);
}

.spectrum-row.head { border-top: 0; background: rgba(5, 9, 22, 0.35); }
.spectrum-row > span { padding: 0.75rem 0.9rem; }
.spectrum-row.head span { display: flex; flex-direction: column; color: var(--culture); border-bottom: 2px solid var(--culture); }
.spectrum-row.head span:first-child { border-bottom-color: transparent; }
.spectrum-row.head small { color: var(--faint); font-size: 0.78rem; }
.spectrum-key { font-weight: 700; }
.spectrum-cell { display: flex; flex-direction: column; gap: 0.4rem; border-left: 1px solid rgba(140, 180, 255, 0.06); }
.cell-text { font-size: 0.9rem; color: var(--muted); }
.dots { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.spectrum-cell .dot { background: var(--culture); box-shadow: 0 0 8px var(--culture); }
.spectrum-cell .dot.open { background: transparent; border-color: var(--culture); box-shadow: none; }
.legend { margin: 0.8rem 0 0; font-size: 0.92rem; color: var(--muted); }

.commit { margin-top: 2rem; }

/* Westrum: the phone form */

.horizon { margin: 2rem 0; }
.horizon h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.6rem; }
.horizon h2 .dot { width: 1rem; height: 1rem; }

.choice { margin-top: 1rem; }
.choice legend { font-weight: 700; margin-bottom: 0.4rem; }
.choice-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }

.choice-options label {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 4.2rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-small);
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s ease;
}

.choice-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-text { font-weight: 600; line-height: 1.25; }
.choice-options small { color: var(--faint); font-size: 0.75rem; }
.choice-options label:hover { border-color: var(--culture); }
.choice-options label:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

.choice-options label:has(input:checked) {
    border-color: var(--culture);
    background: color-mix(in srgb, var(--culture) 18%, transparent);
    box-shadow: 0 0 20px -6px var(--culture);
}

.choice-options label:has(input:checked) small { color: var(--culture); }

.sticky {
    position: sticky;
    bottom: 0;
    margin: 2rem -1rem 0;
    padding: 1rem;
    background: linear-gradient(180deg, transparent, var(--bg) 35%);
}

.thanks { text-align: center; padding-top: 4rem; }
.thanks .panel { padding: 3rem 2rem; }
.thanks p { color: var(--muted); }

.error-page { padding-top: 5rem; text-align: center; }
.error-page p { color: var(--muted); }

/* Cost of Delay: the inputs beside a receipt */

.fields-row.two { grid-template-columns: 3fr 1fr; }

.cod {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
    gap: 1.5rem;
    align-items: start;
}

.cod-inputs { display: grid; gap: 1.1rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.formula {
    margin: 0;
    font-family: var(--heading);
    font-size: 1.5rem;
    color: var(--muted);
}

.formula b { color: var(--cyan); }

.money { position: relative; display: block; }
.money::before { content: '$'; position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--faint); }
.money input { padding-left: 1.8rem; }

.receipt {
    display: block;
    position: sticky;
    top: 5rem;
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border-strong);
    box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8), 0 0 50px -25px var(--glow);
}

.receipt-row, .receipt-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--border);
    font-variant-numeric: tabular-nums;
}

.receipt-row span { color: var(--muted); }
.receipt-row small { display: block; color: var(--faint); font-size: 0.78rem; }
.receipt-row b { font-size: 1.1rem; }
.receipt-total { border-bottom: 0; padding-top: 1rem; }
.receipt-total span { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; }
.receipt-total .result-value { color: var(--cyan); text-shadow: 0 0 24px var(--glow); font-size: 2.4rem; }
.receipt .note { margin: 0.6rem 0 0; }

.stack-fields { display: grid; gap: 1.1rem; margin-top: 2rem; }
.table .strong { font-weight: 700; color: var(--text); }

/* Maturity: five questions on a 1 to 5 scale beside the score */

.maturity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    gap: 1.5rem;
    align-items: start;
}

.questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

.question {
    padding: 1.2rem 1.3rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    --accent: var(--part-2);
}

.question legend { display: flex; align-items: center; gap: 0.6rem; font-family: var(--heading); font-size: 1.25rem; }
.question p { color: var(--muted); margin: 0.4rem 0 0.9rem; }

.q-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 6px;
    background: var(--part-2);
    color: #fff;
    font-size: 1rem;
}

.scale { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.scale-end { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.score-card {
    display: block;
    position: sticky;
    top: 5rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border-strong);
    border-top: 4px solid var(--part-2);
    box-shadow: 0 0 50px -25px var(--glow);
}

.score-card .total { display: flex; align-items: baseline; gap: 0.4rem; margin: 0 0 0.6rem; }
.score-card .total span { color: var(--faint); font-family: var(--heading); font-size: 1.4rem; }
.score-card .result-value { color: var(--cyan); text-shadow: 0 0 24px var(--glow); font-size: 3.6rem; }
.score-card h3 { color: var(--text); }
.score-card .eyebrow { margin: 1rem 0 0.4rem; }
.score-card .eyebrow:first-child { margin-top: 0; }
.lowest { margin: 0; padding-left: 1.1rem; color: var(--text); }

.key-rows { display: grid; gap: 0.8rem; padding-bottom: 1rem; }
.key-row h4 { margin: 0 0 0.2rem; }
.key-row p { margin: 0; }

/* Checklist cards: Non-happy path, Definition of Done, Warning signs, AI safety */

.planner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

.planner-main { display: grid; gap: 1.2rem; min-width: 0; }
.section-title { margin: 1rem 0 0; font-size: 1.35rem; }

.checklist {
    padding: 1.2rem 1.3rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    display: grid;
    gap: 0.4rem;
}

.checklist legend { float: left; width: 100%; margin-bottom: 0.6rem; font-family: var(--heading); font-size: 1.25rem; font-weight: 700; }

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: background 0.15s ease;
}

.check:hover { background: rgba(140, 180, 255, 0.05); }
.check span { line-height: 1.4; color: var(--muted); }
.check small { display: block; color: var(--faint); font-size: 0.88rem; }
.check b { color: var(--text); }
.check:has(input:checked) > span { color: var(--text); }
.check.addition { cursor: default; align-items: center; }
.check.addition input[type="text"] { flex: 1; }

/* A tick box, like the ones printed on the card */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 1.3rem;
    height: 1.3rem;
    margin: 0.1rem 0 0;
    border-radius: 5px;
    border: 1.5px solid var(--border-strong);
    background: rgba(5, 9, 22, 0.55);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="checkbox"]::after {
    content: '';
    width: 0.65rem;
    height: 0.35rem;
    border-left: 2.5px solid #04121c;
    border-bottom: 2.5px solid #04121c;
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}

input[type="checkbox"]:checked { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 12px -2px var(--teal); }
input[type="checkbox"]:checked::after { opacity: 1; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    border: 1.5px dashed var(--border-strong);
    font-weight: 600;
    cursor: pointer;
}

/* The regulated additions only show for a regulated team */
.dod:not(:has(#regulated:checked)) [data-category="REGULATED_ADDITIONS"] { display: none; }

.checks-card { border-top-color: var(--band); }
.verdict { font-family: var(--heading); font-size: 2.4rem; font-weight: 700; line-height: 1.05; margin: 0 0 0.8rem; }
.verdict.ok, .status.ok { color: var(--ok); text-shadow: 0 0 24px rgba(111, 224, 179, 0.35); }
.verdict.warn, .status.warn { color: var(--stability); }
.status { font-weight: 600; margin: 0 0 0.6rem; }
.result-value.warn { color: var(--stability); text-shadow: 0 0 24px rgba(241, 154, 85, 0.35); }
.table .warn { color: var(--stability); font-weight: 700; }

.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; border: 1px solid; }
.badge.ok { color: var(--ok); border-color: rgba(111, 224, 179, 0.45); }
.badge.warn { color: var(--stability); border-color: rgba(241, 154, 85, 0.45); }

.action { padding: 0.7rem 0; border-bottom: 1px dashed var(--border); }
.action:last-of-type { border-bottom: 0; }
.action p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* Non-happy path: the scenario table and the failure modes */

.write-table input[type="text"] { padding: 0.5rem 0.7rem; }
.write-table td { white-space: normal; vertical-align: middle; }
.write-table td:first-child { width: 2rem; }
.table .center { text-align: center; }

.modes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }

.mode {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem 1rem;
    align-items: center;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-small);
    background: var(--surface);
    border: 1px solid var(--border);
}

.mode-name small { display: block; color: var(--faint); }
.mode-reason { grid-column: 1 / -1; display: none; }
.mode:has(input[value="NOT_APPLICABLE"]:checked) .mode-reason { display: block; }
.mode:has(input[value="COVERED"]:checked) { border-color: rgba(111, 224, 179, 0.4); }

.segmented { display: inline-flex; border: 1.5px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 0.4rem 0.85rem; font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.segmented label + label span { border-left: 1px solid var(--border); }
.segmented label:has(input:checked) span { background: var(--cyan); color: #04121c; }
.segmented label:has(input[value="NOT_APPLICABLE"]:checked) span { background: var(--muted); }
.segmented label:has(input:focus-visible) span { outline: 2px solid var(--cyan); outline-offset: -2px; }

/* AI safety: the prompt library */

.prompts { margin-top: 2.5rem; display: grid; gap: 0.8rem; }
.prompt textarea { margin-bottom: 0.8rem; font-size: 0.85rem; line-height: 1.5; }
.prompt .btn { margin-bottom: 1rem; }

/* Narrow screens */

@media (max-width: 860px) {
    .hero-line { width: 90%; right: -25%; opacity: 0.35; }
    .book-teaser, .book-hero, .key, .westrum-layout, .cod, .maturity, .planner { grid-template-columns: 1fr; }
    .receipt, .score-card { position: static; }
    .mode { grid-template-columns: 1fr; }
    .book-teaser .cover, .book-hero .cover { max-width: 15rem; }
    .invite { position: static; }
    .fields-row { grid-template-columns: 1fr 1fr; }
    .fields-row .field:first-child { grid-column: 1 / -1; }
    .bench-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .site-nav a:not(.btn) { display: none; }
    .metrics, .counts, .fields-row.two, .pair { grid-template-columns: 1fr; }
    .card-head { grid-template-columns: 1fr; }
    .card-head .tag { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 0.8rem; }
    .spectrum-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .spectrum-row > .spectrum-key { grid-column: 1 / -1; padding-bottom: 0; }
    .spectrum-row.head span:first-child { display: none; }
    .choice-options label { min-height: 3.6rem; }
    .input-row { flex-direction: column; }
}

.promo { margin-top: 2rem; }
.promo .section-title { margin-bottom: 0.8rem; }

/* Mat 1: the silo diagnosis, a wide page like the A3 mat */

.page.wide { max-width: 80rem; }

.mat-panel { margin-top: 2rem; }
.panel-title { display: flex; align-items: center; gap: 0.7rem; font-size: 1.5rem; margin-bottom: 1rem; }

.panel-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: var(--part-1);
    color: #fff;
    font-size: 1.1rem;
    flex: none;
}

.checklist legend .panel-letter { margin-right: 0.5rem; vertical-align: middle; }

.lane-layout { display: grid; grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.lane-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.lane-main > * { min-width: 0; }
.invite h3 { margin: 0; font-size: 1.2rem; }

.chain {
    padding: 1.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

/* The teams in a row, an arrow between each: every wall is a handoff */
.lane {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0.8rem 0 0.6rem 0.6rem;
    display: flex;
    gap: 2.2rem;
    overflow-x: auto;
}

.step {
    position: relative;
    flex: 0 0 11rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem 0.9rem 0.6rem;
    border-radius: var(--radius-small);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border-strong);
}

.step + .step::before {
    content: '→';
    position: absolute;
    left: -1.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--stability);
    font-size: 1.3rem;
    font-weight: 700;
}

.step-number {
    position: absolute;
    top: -0.6rem;
    left: -0.6rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--part-1);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.step-team { font-family: var(--heading); font-size: 1.15rem; overflow-wrap: anywhere; }
.step-figures { display: grid; gap: 0.1rem; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.step-figures .wait, .chain-totals .wait b { color: var(--stability); }
.step-figures .work, .chain-totals .work b { color: var(--ok); }
.step-actions { display: flex; gap: 0.2rem; margin-top: 0.3rem; }
.step-actions form { margin: 0; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
}

.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--cyan); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }

.lane-empty { color: var(--muted); margin: 0 0 1rem; }

.chain-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.chain-totals div { display: grid; padding: 0.7rem 0.9rem; border-radius: var(--radius-small); background: rgba(5, 9, 22, 0.35); }
.chain-totals span { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.chain-totals b { font-family: var(--heading); font-size: 2rem; line-height: 1.1; }

.suggestion { margin: 1rem 0 0; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.suggestion b { color: var(--text); }

.add-step { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem; }
.add-step .field { flex: 1 1 8rem; }
.add-step .field.grow { flex: 3 1 12rem; }

.mat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.mat-grid .mat-panel { margin-top: 0; }
.inline-number { flex-direction: row; align-items: center; gap: 0.8rem; margin: -0.2rem 0 0.4rem 2.6rem; }
.inline-number input { width: 6rem; }
.yes-no { display: grid; gap: 0.6rem; padding: 0.8rem 0.6rem; }
.yes-no + .yes-no { border-top: 1px dashed var(--border); }
.yes-no .segmented { justify-self: start; }

.busy-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); gap: 1.5rem; align-items: start; }
.busy .question { --accent: var(--part-1); }
.busy .question .q-number { background: var(--part-1); }
.busy .score-card { border-top-color: var(--part-1); }
.key-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.key-list b { color: var(--text); margin-right: 0.3rem; }

.sentence-line { font-size: 1.25rem; line-height: 2.4; color: var(--muted); }

.sentence-line input.blank {
    display: inline-block;
    width: 11rem;
    padding: 0.15rem 0.4rem !important;
    border: 0 !important;
    border-bottom: 2px solid var(--cyan) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text);
    font-size: 1.15rem !important;
    text-align: center;
}

.sentence-line input.blank.short { width: 5rem; }
.mat-form { margin-top: 2.5rem; }

.step-form { display: grid; gap: 1rem; }

@media (max-width: 860px) {
    .lane-layout, .mat-grid, .busy-layout { grid-template-columns: 1fr; }
    .chain-totals { grid-template-columns: 1fr; }
}

/* Mat 4: value stream mapping, a workshop board with the facilitator's script beside it */

.vsm-layout { display: grid; grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.vsm-main { min-width: 0; }
.vsm-side { display: grid; gap: 1.2rem; }
.vsm-side .invite { position: static; }
.vsm-side .qr { max-width: 160px; }

.script-panel {
    padding: 1.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.script-panel .panel-title { font-size: 1.25rem; }
.script { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; }
.script li { font-size: 0.92rem; color: var(--muted); }
.script b { display: block; color: var(--text); }
.script-step p { margin: 0.25rem 0 0; }
.script-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
details .script { padding: 0.4rem 0 1rem; }
details .script span { display: block; }

.timer {
    flex: none;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--muted);
    font: 600 0.8rem/1.4 var(--body);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.timer:hover { color: var(--text); border-color: var(--cyan); }
.timer.running { color: #04121c; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px -2px var(--glow); }
.timer.running.over { background: var(--danger); border-color: var(--danger); }

.stream-ends { display: flex; justify-content: space-between; margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

/* Sticky notes: green for work, red for waiting, as on the wall */
.sticky-notes { gap: 1.9rem; }

.sticky-note {
    position: relative;
    flex: 0 0 9.5rem;
    min-height: 8.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 0.8rem 0.6rem;
    border-radius: 3px;
    color: #10202a;
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.9);
}

.sticky-note.work { background: linear-gradient(180deg, #8de3b6, #6fd3a2); transform: rotate(-1deg); }
.sticky-note.wait { background: linear-gradient(180deg, #f59a8c, #ea7c6d); transform: rotate(1deg); }
.sticky-note + .sticky-note::before { content: '→'; position: absolute; left: -1.5rem; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-weight: 700; }
.sticky-note .step-number { background: #10202a; }
.note-name { font-family: var(--heading); font-size: 1.05rem; line-height: 1.15; overflow-wrap: anywhere; }
.note-time { font-size: 0.85rem; font-weight: 600; }
.sticky-note .step-actions { margin-top: auto; }
.sticky-note .icon-btn { border-color: rgba(16, 32, 42, 0.25); color: #10202a; }
.sticky-note .icon-btn:hover:not(:disabled) { border-color: #10202a; color: #10202a; }

.timeline {
    display: flex;
    height: 1.4rem;
    margin: 0.4rem 0 1.2rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.segment { min-width: 3px; }
.segment.work { background: var(--ok); }
.segment.wait { background: #ea7c6d; }
.segment + .segment { border-left: 1px solid rgba(5, 9, 22, 0.5); }

.efficiency { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.efficiency div { display: grid; align-content: start; padding: 0.7rem 0.9rem; border-radius: var(--radius-small);
    background: rgba(5, 9, 22, 0.35); }
.efficiency span { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.efficiency b { font-family: var(--heading); font-size: 1.6rem; line-height: 1.15; }
.efficiency .work b { color: var(--ok); }
.efficiency .wait b { color: #ea7c6d; }
.efficiency .pe b { font-size: 3.2rem; color: var(--cyan); text-shadow: 0 0 30px var(--glow); }
.efficiency small { color: var(--faint); }

.add-step .kind { align-self: flex-end; margin-bottom: 0.2rem; }
form:has(input[value="WAIT"]:checked) .when-work, form:not(:has(input[value="WAIT"]:checked)) .when-wait { display: none; }
.segmented.big span { padding: 0.6rem 1.4rem; font-size: 1rem; }
.note-form .segmented { justify-self: start; }
.segmented label:has(input[value="WAIT"]:checked) span { background: #ea7c6d; color: #10202a; }
.segmented label:has(input[value="WORK"]:checked) span { background: var(--ok); color: #10202a; }

.missed { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.missed form { margin: 0; }

.chip-btn {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px dashed rgba(234, 124, 109, 0.6);
    background: transparent;
    color: #f2a397;
    font: 600 0.85rem/1.3 var(--body);
    cursor: pointer;
}

.chip-btn:hover { background: rgba(234, 124, 109, 0.12); }

.fields-row.three { grid-template-columns: 3fr 1fr 1fr; }
.queue { flex-direction: row; align-items: center; gap: 0.8rem; }
.queue > span:first-child { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
    background: #ea7c6d; color: #10202a; letter-spacing: 0; }

@media (max-width: 1100px) {
    .vsm-layout { grid-template-columns: 1fr; }

}

@media (max-width: 860px) {
    .fields-row.three { grid-template-columns: 1fr; }
}

/* Mat 1, panel C: Conway's mirror, teams on the left and the architecture on the right */

.mat-grid { grid-template-columns: 1fr; }
.mirror-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); gap: 1.5rem; align-items: start; }

.mirror {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 0 clamp(4rem, 12vw, 9rem);
    padding: 1.2rem;
    border-radius: var(--radius);
    background:
        radial-gradient(400px 260px at 50% 50%, rgba(99, 211, 232, 0.06), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
}

.mirror-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mirror-lines path { fill: none; stroke: var(--cyan); stroke-width: 2.5; filter: drop-shadow(0 0 4px rgba(99, 211, 232, 0.6)); }
.mirror-col { position: relative; display: grid; gap: 0.6rem; align-content: start; }
.mirror-head { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

.mirror-node { display: flex; align-items: center; gap: 0.5rem; }
.mirror-node input[type="text"] { padding: 0.55rem 0.7rem; }
.mirror-node select { width: auto; padding: 0.55rem 0.4rem; flex: none; }
.mirror-node:has(input[type="text"]:placeholder-shown) { opacity: 0.55; }

.mirror-dot {
    flex: none;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    background: var(--bg);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mirror-dot:hover { transform: scale(1.2); box-shadow: 0 0 12px var(--glow); }
.mirror-dot.selected { background: var(--cyan); transform: scale(1.3); box-shadow: 0 0 16px var(--cyan); }

.mirror-findings { border-top-color: var(--part-1); }
.finding { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.7rem; align-items: baseline; padding: 0.7rem 0;
    border-bottom: 1px dashed var(--border); }
.finding:last-of-type { border-bottom: 0; }
.finding > b { font-family: var(--heading); font-size: 1.6rem; }
.finding.warn > b { color: var(--stability); }
.finding.ok > b { color: var(--ok); }
.finding .lowest { grid-column: 1 / -1; font-size: 0.9rem; }

.mirror-grid { margin-top: 1rem; border-radius: var(--radius); border: 1px solid var(--border); padding: 0.2rem 1rem 1rem; }
.mirror-grid summary { cursor: pointer; padding: 0.7rem 0; color: var(--muted); font-weight: 600; }
.mirror-answers { margin-top: 1rem; }
.mirror-answers > p { margin: 0; }

@media (max-width: 860px) {
    .mirror-layout { grid-template-columns: 1fr; }
    .mirror { grid-template-columns: 1fr; gap: 1rem; }
    .mirror-lines { display: none; }
}

/* Worksheet 12: the improvement tax per sprint, against the 10-20% band */

.chip-btn.idea { border-color: rgba(111, 224, 179, 0.5); color: var(--ok); }
.chip-btn.idea:hover { background: rgba(111, 224, 179, 0.1); }
.tax-card { border-top-color: var(--part-4); }
.tax-card .result-value.warn { color: var(--stability); }

.tax-chart-panel { margin: 0 0 1.5rem; }
.tax-chart-panel figcaption { margin-bottom: 1rem; }

/* 0-40% fills the chart's height, so the 10-20% band is its second quarter */
.tax-chart {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 0.8rem;
    height: 12rem;
    padding-bottom: 1.6rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}

.tax-band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(1.6rem + (12rem - 1.6rem) * 0.25);
    height: calc((12rem - 1.6rem) * 0.25);
    background: rgba(79, 184, 141, 0.12);
    border-top: 1px dashed rgba(79, 184, 141, 0.5);
    border-bottom: 1px dashed rgba(79, 184, 141, 0.5);
}

.tax-bar {
    position: relative;
    flex: 0 0 3.2rem;
    height: calc(var(--share) / 40 * 100%);
    min-height: 3px;
    border-radius: 6px 6px 0 0;
    background: var(--ok);
    text-decoration: none;
}

.tax-bar.below { background: var(--stability); }
.tax-bar.above { background: var(--cyan); }
.tax-value { position: absolute; top: -1.4rem; left: 50%; transform: translateX(-50%); font-size: 0.8rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.tax-name { position: absolute; bottom: -1.5rem; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* Worksheet 11: Green, Yellow and Red, as on the workbook */

[data-status="GREEN"] { --rag: var(--ok); }
[data-status="YELLOW"] { --rag: #f2c94c; }
[data-status="RED"] { --rag: var(--danger); }
[data-status="NONE"] { --rag: transparent; }

.rag-text { color: var(--rag); }
.segmented.rag label:has(input:checked) span { background: var(--rag); color: #10202a; }
.rag-dot { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--rag);
    border: 1.5px solid var(--border-strong); }
.audit .question { --accent: var(--part-4); }
.audit textarea { margin-bottom: 0.7rem; }
.answer-label { display: flex; gap: 0.6rem; align-items: baseline; }
.from-cards { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--cyan); }
.health-card { border-top-color: var(--part-4); }
.key-list b.rag-text { color: var(--rag); }

/* Worksheet 14: the yearly checklist, with what the cards say about the boxes they can measure */

.evidence { margin-top: 0.15rem; }
.evidence.met { color: var(--ok); }
.evidence.unmet { color: var(--stability); }
.sustain-card { border-top-color: var(--part-4); }
.area-score { display: grid; grid-template-columns: 6rem 1fr auto; gap: 0.7rem; align-items: center; margin-top: 0.6rem;
    font-size: 0.92rem; color: var(--muted); }
.area-score .meter { height: 6px; border-radius: 3px;
    background: linear-gradient(90deg, var(--ok) var(--progress), rgba(140, 180, 255, 0.12) var(--progress)); }
.area-score b { color: var(--text); }

/* Worksheet 5: should you build feature teams now? */

.readiness-card { border-top-color: var(--part-2); }
.card-tile > .btn { align-self: flex-start; margin-top: auto; }
.teaser-link { display: grid; gap: 0.3rem; text-decoration: none; color: var(--text); border-color: var(--border-strong);
    transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.teaser-link b { font-family: var(--heading); font-size: 1.6rem; }
.teaser-link:hover { color: var(--text); border-color: var(--cyan); box-shadow: 0 0 40px -16px var(--glow); }

/* Worksheet 6: the manager conversation scripts */

.script-card { margin-top: 1.5rem; border-left: 4px solid var(--part-2); }
.script-card h2 { font-size: 1.6rem; }
.setting { color: var(--cyan); font-style: italic; }
.script-steps { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.8rem; }
.script-steps li { color: var(--muted); line-height: 1.55; }
.script-steps b { color: var(--text); }
.numbers { margin: 1rem 0 0.4rem; padding: 1rem; border-radius: var(--radius); border: 1.5px dashed var(--border-strong); }
.numbers-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.8rem; }
.filled-line { display: block; margin-top: 1rem; }
.filled-line p:first-child { color: var(--text); font-size: 1.1rem; font-style: italic; }
