:root {
    --ink: #18332f;
    --muted: #61716d;
    --paper: #f5f3ed;
    --surface: #fffefa;
    --line: #d8ddd7;
    --green: #2f6b5b;
    --green-soft: #dcece5;
    --orange: #dd6546;
    --orange-soft: #fbe8df;
    --purple: #74526f;
    --purple-soft: #eee6ef;
    --shadow: 0 20px 55px rgba(24, 51, 47, .09);
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 90% 3%, rgba(116, 82, 111, .1), transparent 24rem),
        radial-gradient(circle at 7% 34%, rgba(47, 107, 91, .08), transparent 26rem),
        var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button, input, textarea { font: inherit; }

.site-header {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(24, 51, 47, .15);
}

.brand {
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--green);
    font-family: Georgia, serif;
    font-size: 24px;
    border-radius: 50% 50% 50% 12px;
}

.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .1em; font-size: .92rem; }
.brand small { color: var(--muted); font-size: .72rem; }
.version { color: var(--muted); font-size: .8rem; letter-spacing: .04em; }

main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.use-case-builder { padding: 64px 0 82px; }
.builder-intro { max-width: 850px; margin-bottom: 40px; }
.builder-intro h1 { font-size: clamp(2.7rem, 6vw, 4.9rem); }
.builder-intro > p:last-child {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.15rem;
}
.builder-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.builder-progress {
    position: sticky;
    top: 24px;
    padding: 22px;
    background: rgba(255, 254, 250, .78);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.builder-progress p { display: grid; gap: 2px; margin-bottom: 14px; }
.builder-progress p span { color: var(--muted); font-size: .8rem; }
.progress-track { height: 6px; overflow: hidden; background: #e4e5df; border-radius: 999px; }
.progress-track span {
    display: block;
    width: 20%;
    height: 100%;
    background: var(--orange);
    border-radius: inherit;
    transition: width .25s ease;
}
.builder-progress ol { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.builder-progress li {
    color: #8a9692;
    font-size: .78rem;
}
.builder-progress li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 9px;
    background: #cdd2ce;
    border-radius: 50%;
}
.builder-progress li.active { color: var(--ink); font-weight: 800; }
.builder-progress li.active::before { background: var(--orange); }
.builder-progress li.complete::before { background: var(--green); }
.builder-card {
    min-height: 590px;
    display: flex;
    flex-direction: column;
    padding: clamp(30px, 5vw, 58px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.builder-step { flex: 1; position: relative; }
.builder-number {
    position: absolute;
    top: -10px;
    right: 0;
    color: rgba(47, 107, 91, .12);
    font-family: Georgia, serif;
    font-size: clamp(4.5rem, 10vw, 8rem);
    line-height: 1;
}
.builder-step h2 {
    position: relative;
    max-width: 720px;
    margin-bottom: 13px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.35rem);
    font-weight: 500;
    line-height: 1.05;
}
.builder-help { position: relative; max-width: 720px; color: var(--muted); }
.example-box {
    display: grid;
    gap: 4px;
    max-width: 760px;
    margin: 24px 0;
    padding: 15px 18px;
    color: #455d57;
    background: var(--green-soft);
    border-radius: 12px;
    font-size: .85rem;
}
.example-box strong { color: var(--green); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.builder-card .field { max-width: 760px; padding: 0; background: transparent; border: 0; }
.builder-card .field textarea { min-height: 138px; background: #faf9f5; }
.builder-review h2 {
    max-width: 760px;
    margin-bottom: 13px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.35rem);
    font-weight: 500;
    line-height: 1.05;
}
.review-name { margin: 24px 0; }
.builder-review-grid, .use-case-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.review-card, .summary-card {
    padding: 16px;
    background: #faf9f5;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.review-card strong, .summary-card strong {
    color: var(--orange);
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.review-card p, .summary-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .83rem;
    white-space: pre-wrap;
}
.use-case-summary > h3 {
    grid-column: 1 / -1;
    margin: 0 0 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.assessment-hidden-values {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.builder-actions {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.builder-actions > span { color: var(--muted); font-size: .72rem; text-align: center; }
.builder-next {
    min-width: 150px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    color: white;
    background: var(--ink);
    font-weight: 800;
}
.builder-next:hover { background: var(--green); }
.text-button {
    margin-top: 20px;
    padding: 4px 0;
    color: var(--green);
    background: transparent;
    border-radius: 0;
    font-size: .8rem;
    font-weight: 750;
}

.hero {
    max-width: 930px;
    padding: 68px 0 48px;
}

.eyebrow, .overline {
    color: var(--orange);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    max-width: 900px;
    margin-bottom: 22px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.65rem, 6vw, 5.25rem);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: .98;
}

.hero-copy {
    max-width: 720px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.profile-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
    font-size: .85rem;
}

.profile-legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.essential { background: var(--green); }
.dot.extended { background: var(--orange); }
.dot.regulated { background: var(--purple); }

.panel {
    margin-bottom: 22px;
    padding: clamp(26px, 4.5vw, 52px);
    background: rgba(255, 254, 250, .93);
    border: 1px solid rgba(24, 51, 47, .12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-heading {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    margin-bottom: 42px;
}

.step {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    font-family: Georgia, serif;
}

.section-heading .overline { margin-bottom: 6px; }
.section-heading h2, .result h2 {
    margin-bottom: 9px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.85rem, 3.5vw, 3rem);
    font-weight: 500;
    line-height: 1.05;
}
.section-heading p { color: var(--muted); margin-bottom: 0; }

.field-grid {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.4fr);
    gap: 18px;
    align-items: start;
}
.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 21px;
    background: #faf9f5;
    border: 1px solid var(--line);
    border-radius: 15px;
    font-weight: 700;
}
.field > span { font-size: .9rem; }
.field input, .field textarea {
    display: block;
    min-width: 0;
    width: 100%;
    padding: 15px 17px;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.45;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
}
.field input { min-height: 54px; }
.field input:focus, .field textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(47, 107, 91, .15);
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.5; }
.field small { margin-top: auto; color: var(--muted); font-weight: 400; line-height: 1.4; }

.shield-panel {
    background: linear-gradient(145deg, rgba(255, 254, 250, .97), rgba(220, 236, 229, .7));
}
.shield-intro {
    display: flex;
    gap: 14px;
    margin: -14px 0 25px 76px;
    padding: 14px 17px;
    color: var(--green);
    background: rgba(255, 255, 255, .7);
    border-left: 3px solid var(--green);
    border-radius: 8px;
    font-size: .86rem;
}
.shield-intro span { color: var(--muted); }

.question-group + .question-group { margin-top: 38px; }
.question-group h3 {
    margin-bottom: 14px;
    font-size: .78rem;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.question-card {
    position: relative;
    min-height: 126px;
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 13px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}

.question-card:hover {
    border-color: var(--green);
    transform: translateY(-1px);
}

.question-card:has(input:focus-visible) {
    outline: 3px solid rgba(47, 107, 91, .2);
    outline-offset: 2px;
}

.question-card:has(input:checked) {
    background: var(--green-soft);
    border-color: var(--green);
}

.question-card.gate-question:has(input:checked) {
    background: var(--orange-soft);
    border-color: var(--orange);
}

.question-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.check {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid #aeb8b3;
    border-radius: 50%;
    background: white;
}

.question-card input:checked + .check::after {
    content: "✓";
    color: white;
    font-size: .78rem;
    font-weight: 900;
}
.question-card:has(input:checked) .check { background: var(--green); border-color: var(--green); }
.question-card.gate-question:has(input:checked) .check { background: var(--orange); border-color: var(--orange); }
.question-card strong, .question-card small { display: block; }
.question-card strong { margin: 1px 0 6px; font-size: .95rem; }
.question-card small { color: var(--muted); line-height: 1.42; }

.scale-guide {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    margin: -12px 0 24px;
    padding: 16px 18px;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 12px;
    font-size: .84rem;
}
.scale-guide span { color: #48635d; }

.sliders { display: grid; gap: 14px; }
.component-list { display: grid; gap: 18px; margin-top: 24px; }
.component-card {
    padding: clamp(22px, 3vw, 34px);
    background: #fbfaf6;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.component-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.component-header .overline { margin-bottom: 4px; }
.component-header h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.remove-component {
    padding: 8px 11px;
    color: #8b4438;
    background: #fff1ed;
    border: 1px solid #e8c7bf;
    font-size: .72rem;
    font-weight: 750;
}
.remove-component:disabled { visibility: hidden; }
.component-fields {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr);
    gap: 12px;
    margin-bottom: 18px;
}
.component-fields .field { padding: 15px; }
.component-risk-grid { display: grid; gap: 10px; }
.component-track {
    display: grid;
    grid-template-columns: minmax(250px, .75fr) minmax(420px, 1.25fr);
    gap: 24px;
    align-items: center;
    padding: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
}
.component-track.featured {
    background: linear-gradient(105deg, rgba(116, 82, 111, .1), white 55%);
    border-color: rgba(116, 82, 111, .3);
}
.track-question {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: start;
}
.track-question strong, .track-question small { display: block; }
.track-question strong { margin: 1px 0 5px; }
.track-question small { color: var(--muted); line-height: 1.42; }
.track-setting .slider-state { min-height: 72px; margin-bottom: 13px; }
.track-setting input[type="range"] {
    background: linear-gradient(90deg,
        var(--green) 0 31%,
        #f5f3ed 31% 34%,
        var(--orange) 34% 65%,
        #f5f3ed 65% 68%,
        var(--purple) 68% 100%);
}
.profile-scale {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 9px;
    color: var(--muted);
    font-size: .64rem;
    font-weight: 750;
    text-align: center;
}
.component-track[data-profile="ESSENTIAL"] output { color: var(--green); }
.component-track[data-profile="EXTENDED"] output { color: var(--orange); }
.component-track[data-profile="REGULATED"] output { color: var(--purple); }
.add-component-button {
    margin-top: 18px;
    padding: 12px 17px;
    color: var(--green);
    background: transparent;
    border: 1px dashed var(--green);
    font-weight: 750;
}

.slider-row {
    display: grid;
    grid-template-columns: minmax(250px, .75fr) minmax(440px, 1.25fr);
    gap: 34px;
    align-items: stretch;
    padding: 24px;
    background: #fbfaf6;
    border: 1px solid var(--line);
    border-radius: 15px;
}

.slider-row.featured {
    margin: 0;
    background: linear-gradient(105deg, rgba(116, 82, 111, .1), #fbfaf6 55%);
    border-color: rgba(116, 82, 111, .3);
}

.slider-copy {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
}

.slider-copy strong, .slider-copy small { display: block; }
.slider-copy strong { margin: 2px 0 7px; font-size: 1.02rem; }
.slider-copy small { color: var(--muted); line-height: 1.48; }
.slider-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 11px;
    font-family: Georgia, serif;
    font-weight: 700;
}

.slider-control {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.slider-state {
    min-height: 78px;
    margin-bottom: 18px;
    padding: 13px 15px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 11px;
}
.slider-control output {
    display: block;
    margin-bottom: 5px;
    color: var(--green);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.slider-state p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }

input[type="range"] {
    width: 100%;
    height: 8px;
    appearance: none;
    border-radius: 8px;
    background: linear-gradient(90deg,
        var(--green) 0 31.25%,
        #f5f3ed 31.25% 34.375%,
        var(--orange) 34.375% 65.625%,
        #f5f3ed 65.625% 68.75%,
        var(--purple) 68.75% 100%);
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    appearance: none;
    border: 5px solid white;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 1px rgba(24, 51, 47, .25), 0 4px 12px rgba(24, 51, 47, .25);
}

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 5px solid white;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 1px rgba(24, 51, 47, .25);
}

input[type="range"]:focus-visible { outline: 3px solid rgba(47, 107, 91, .25); outline-offset: 7px; }

.scale-bands {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 12px;
}
.band {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding-top: 8px;
    border-top: 2px solid currentColor;
    font-size: .65rem;
    text-align: center;
}
.band strong { text-transform: uppercase; letter-spacing: .05em; }
.band small { opacity: .8; }
.band.essential { color: var(--green); }
.band.extended { color: var(--orange); }
.band.regulated { color: var(--purple); }

.principle {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 28px;
    color: var(--purple);
}
.principle > span {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-weight: 800;
}
.principle p { margin: 0; font-size: .88rem; }

.submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 26px 5px 76px;
}
.submit-bar p { margin: 0; }
.submit-bar p span { display: block; color: var(--muted); font-size: .8rem; }

button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

#submit-button {
    min-width: 244px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 21px;
    color: white;
    background: var(--ink);
    font-weight: 750;
    transition: transform .2s, background .2s;
}
#submit-button:hover { transform: translateY(-2px); background: var(--green); }
#submit-button:disabled { cursor: wait; opacity: .65; transform: none; }

.result {
    margin: 10px 0 80px;
    padding: clamp(28px, 6vw, 66px);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.result.gate-closed { border-top: 7px solid #9c3e2d; }
.result .overline { margin-bottom: 10px; color: var(--orange); }
.result-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 35px;
}
.result h2 { max-width: 760px; }
#result-explanation { max-width: 760px; color: var(--muted); }
.profile-badge {
    flex: 0 0 auto;
    padding: 9px 14px;
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid rgba(37, 112, 92, .3);
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 46px;
    margin: 48px 0;
    padding: 38px 0;
    border-block: 1px solid var(--line);
}
.decision-result {
    margin-top: 32px;
    padding: 24px 26px;
    background: #eef7f2;
    border: 1px solid #c7ded2;
    border-left: 6px solid var(--green);
    border-radius: 14px;
}
.decision-result[data-decision="SECURE_BEFORE_PILOT"] {
    background: #fff5e8;
    border-color: #efd1ac;
    border-left-color: #c26b2c;
}
.decision-result[data-decision="ADAPT_OR_STOP"] {
    background: #fff0ec;
    border-color: #e6bbb1;
    border-left-color: #9c3e2d;
}
.decision-result h3 { margin: 0 0 7px; font-size: 1.18rem; letter-spacing: 0; text-transform: none; }
.decision-result p:last-child { margin: 0; color: var(--muted); }
.shield-result {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px 25px;
    margin-top: 36px;
    padding: 25px;
    background: #f5f7f4;
    border: 1px solid var(--line);
    border-radius: 15px;
}
.shield-result h3 {
    margin-bottom: 7px;
    font-size: 1.05rem;
    letter-spacing: 0;
    text-transform: none;
}
.shield-result p { margin-bottom: 0; color: var(--muted); }
.shield-result ul { grid-column: 1 / -1; }
.shield-badge, .ai-status {
    align-self: start;
    padding: 7px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--green);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.shield-result[data-status="ACTION_REQUIRED"] .shield-badge { color: #a8541c; }
.shield-result[data-status="STOP_REQUIRED"] .shield-badge { color: #9c3e2d; }
.result h3 { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.result li { margin-bottom: 10px; color: #405c56; }
.result ul, .result ol { margin: 0; padding-left: 20px; }
.control-title {
    margin: 0 0 24px;
    font-size: 1.05rem !important;
    letter-spacing: .035em !important;
    line-height: 1.35;
    overflow-wrap: normal;
    text-transform: none !important;
    word-break: normal;
}
.control-grid { display: grid; gap: 18px; }
.component-control-group {
    padding: 24px;
    background: #fbfaf6;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.component-control-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.component-control-heading h4 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 500;
}
.component-control-heading span {
    color: var(--muted);
    font-size: .7rem;
}
.component-control-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}
.control-card {
    min-width: 0;
    min-height: 158px;
    padding: 20px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
}
.control-card[data-level="ESSENTIAL"] { border-top: 4px solid var(--green); }
.control-card[data-level="EXTENDED"] { border-top: 4px solid var(--orange); }
.control-card[data-level="REGULATED"] { border-top: 4px solid var(--purple); }
.control-card .position-label {
    display: block;
    min-height: 2.8em;
    margin: 0 0 16px;
    color: var(--ink);
    font-size: .72rem;
    line-height: 1.45;
}
.control-card h5 {
    margin: 0 0 14px;
    font-size: .92rem;
    line-height: 1.35;
}
.control-card p {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.55;
}
.ai-result {
    margin-top: 42px;
    padding: 26px;
    color: var(--ink);
    background: #f5f0fa;
    border: 1px solid #ded0e6;
    border-radius: 15px;
}
.ai-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.ai-result .overline { color: var(--orange); }
.ai-result h3 { margin-bottom: 18px; color: var(--ink); }
.ai-recommendation {
    margin-bottom: 17px;
    color: #314944;
    line-height: 1.6;
}
.ai-recommendation .ai-section-title {
    margin: 28px 0 10px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}
.ai-recommendation .ai-section-title:first-child { margin-top: 4px; }
.ai-recommendation p { margin: 0 0 14px; }
.ai-recommendation > ul, .ai-recommendation > ol {
    display: grid;
    gap: 13px;
    margin: 0 0 24px;
    padding-left: 25px;
}
.ai-recommendation li {
    margin: 0;
    padding-left: 4px;
    line-height: 1.55;
}
.ai-recommendation li > ul, .ai-recommendation li > ol {
    display: grid;
    gap: 8px;
    margin: 10px 0 2px;
    padding-left: 22px;
}
.ai-recommendation hr {
    margin: 25px 0;
    border: 0;
    border-top: 1px solid #ded0e6;
}
.ai-recommendation strong { color: var(--ink); }
.ai-result .ai-status { color: var(--green); }
.ai-disclosure {
    display: inline-block;
    margin: 0 0 16px;
    padding: 7px 10px;
    color: #57405e;
    background: white;
    border: 1px solid #ded0e6;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
}
.legal-notice {
    max-width: 900px;
    margin: 38px 0 20px;
    color: var(--muted);
    font-size: .74rem;
}
.secondary-button {
    padding: 11px 17px;
    color: var(--ink);
    background: transparent;
    border: 1px solid rgba(24, 51, 47, .35);
}
.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.profile-workspace-button {
    min-width: 290px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 20px;
    color: white;
    background: var(--ink);
    font-weight: 800;
    transition: background .2s, transform .2s;
}
.profile-workspace-button:hover { background: var(--green); transform: translateY(-2px); }
.profile-workspace-view { padding: 46px 0 90px; }
.workspace-header {
    margin-bottom: 24px;
    padding: clamp(25px, 4vw, 44px);
    color: white;
    background: radial-gradient(circle at 92% 0, rgba(255, 255, 255, .12), transparent 20rem), var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.workspace-back {
    margin-bottom: 30px;
    padding: 0;
    color: rgba(255, 255, 255, .72);
    background: transparent;
    border-radius: 0;
    font-size: .78rem;
}
.workspace-back:hover { color: white; }
.workspace-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}
.workspace-title-row .overline { color: #f0a48d; }
.workspace-title-row h1 { margin-bottom: 12px; font-size: clamp(2.45rem, 5vw, 4.5rem); }
.workspace-title-row p:last-child {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, .7);
    font-size: 1.05rem;
}
.workspace-profile-badge {
    flex: 0 0 auto;
    padding: 10px 15px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.workspace-profile-badge[data-profile="ESSENTIAL"] { color: #9ed0bb; }
.workspace-profile-badge[data-profile="EXTENDED"] { color: #f3ac91; }
.workspace-profile-badge[data-profile="REGULATED"] { color: #d8b5d4; }
.workspace-progress {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(180px, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}
.workspace-progress > div:first-child { display: grid; gap: 2px; }
.workspace-progress > div:first-child span {
    color: rgba(255, 255, 255, .55);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.workspace-progress > div:first-child strong { font-size: .84rem; }
.workspace-progress-track {
    height: 7px;
    overflow: hidden;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
}
.workspace-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #7fc1a7, #f1a086);
    border-radius: inherit;
    transition: width .35s ease;
}
.workspace-save-status {
    color: rgba(255, 255, 255, .6);
    font-size: .7rem;
    transition: color .2s;
}
.workspace-save-status.saved { color: #a9e2c9; }
.workspace-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.workspace-context {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 24px;
    padding: 24px;
    background: rgba(255, 254, 250, .96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(24, 51, 47, .07);
}
.workspace-context h2 {
    margin-bottom: 9px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.08;
}
.workspace-context > div:first-child > p:last-child {
    max-height: 132px;
    margin: 0;
    overflow: auto;
    color: var(--muted);
    font-size: .78rem;
    white-space: pre-wrap;
}
.workspace-context-facts { display: grid; gap: 8px; }
.workspace-context-facts span {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    background: #f8f7f2;
    border-radius: 10px;
}
.workspace-context-facts small {
    color: var(--muted);
    font-size: .63rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.workspace-context-facts strong { font-size: .78rem; }
.workspace-context h3 {
    margin-bottom: 10px;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.workspace-context ul { margin: 0; padding-left: 17px; }
.workspace-context li { margin-bottom: 7px; color: var(--muted); font-size: .73rem; }
.workspace-next-button {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: white;
    background: var(--green);
    border-radius: 11px;
    font-size: .75rem;
    font-weight: 800;
}
.workspace-main { min-width: 0; }
.workspace-layer-filter {
    position: sticky;
    z-index: 4;
    top: 12px;
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 7px;
    overflow-x: auto;
    background: rgba(245, 243, 237, .92);
    border: 1px solid rgba(24, 51, 47, .1);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}
.workspace-layer-filter button {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: var(--muted);
    background: transparent;
    font-size: .7rem;
    font-weight: 750;
}
.workspace-layer-filter button.active { color: white; background: var(--ink); }
.workspace-map-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 17px 19px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.workspace-map-intro > div:first-child { display: grid; gap: 3px; }
.workspace-map-intro > div:first-child span { color: var(--muted); font-size: .75rem; }
.workspace-status-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px 11px;
    color: var(--muted);
    font-size: .62rem;
}
.workspace-status-legend span { display: inline-flex; align-items: center; gap: 5px; }
.workspace-status-legend i {
    width: 7px;
    height: 7px;
    background: #a9b1ae;
    border-radius: 50%;
}
.workspace-status-legend i[data-status="IN_PROGRESS"] { background: var(--orange); }
.workspace-status-legend i[data-status="REVIEW"] { background: var(--purple); }
.workspace-status-legend i[data-status="DONE"] { background: var(--green); }
.workspace-status-legend i[data-status="BLOCKED"] { background: #a63f31; }
.profile-map {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #eeece5;
    border: 1px solid #d3d6cf;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(24, 51, 47, .08);
}
.profile-map-masthead {
    display: grid;
    grid-template-columns: 1fr minmax(210px, .55fr);
    gap: 22px;
    padding: 23px 25px;
    color: white;
    background: #303d3a;
    border-radius: 12px;
}
.profile-map-masthead > div { display: grid; gap: 4px; }
.profile-map-masthead > div:last-child { align-content: center; text-align: right; }
.profile-map-masthead span {
    color: rgba(255, 255, 255, .6);
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.profile-map-masthead strong { font-size: 1.3rem; letter-spacing: .07em; text-transform: uppercase; }
.profile-map-masthead p,
.profile-map-masthead small { margin: 0; color: rgba(255, 255, 255, .68); font-size: .72rem; }
.profile-map-layer {
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
}
.profile-map-layer > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}
.profile-map-layer > header h2 {
    margin: 0;
    font-size: .79rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.profile-map-layer > header span { color: var(--muted); font-size: .65rem; }
.shield-layer { border-color: #9cc8b3; background: #f2f9f5; }
.shield-layer > header h2 { color: var(--green); }
.framework-layer { border-color: #ef9b7e; background: #fff8f4; }
.framework-layer > header h2 { color: var(--orange); }
.risk-layer { border-color: #d5ba76; background: #fffaf0; }
.risk-layer > header h2 { color: #956719; }
.organization-layer { border-color: #e1ae76; background: #fffbf4; }
.organization-layer > header h2 { color: #aa6521; }
.delivery-layer { border-color: #bda1bf; background: #faf7fb; }
.delivery-layer > header h2 { color: var(--purple); }
.roles-layer { background: #f7f6f2; }
.profile-station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
}
.roles-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.profile-station {
    min-width: 0;
    min-height: 136px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 9px;
    padding: 13px;
    color: var(--ink);
    text-align: left;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(24, 51, 47, .16);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(24, 51, 47, .035);
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.profile-station:hover {
    z-index: 1;
    border-color: var(--green);
    box-shadow: 0 9px 24px rgba(24, 51, 47, .11);
    transform: translateY(-2px);
}
.profile-station:focus-visible { outline: 3px solid rgba(47, 107, 91, .24); outline-offset: 2px; }
.profile-station-symbol {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 9px;
    font-family: Georgia, serif;
    font-size: 1rem;
    font-weight: 800;
}
.profile-station-body { min-width: 0; display: grid; align-content: start; gap: 4px; }
.profile-station-body strong { font-size: .77rem; line-height: 1.2; }
.profile-station-body small {
    overflow: hidden;
    color: var(--muted);
    font-size: .64rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.profile-station-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(24, 51, 47, .1);
}
.profile-station-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #687570;
    font-size: .59rem;
    font-weight: 850;
    text-transform: uppercase;
}
.profile-station-meta span::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #a9b1ae;
    border-radius: 50%;
}
.profile-station-meta small {
    max-width: 80px;
    overflow: hidden;
    color: var(--muted);
    font-size: .58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-station[data-status="IN_PROGRESS"] { border-color: #e6a48e; }
.profile-station[data-status="IN_PROGRESS"] .profile-station-meta span::before { background: var(--orange); }
.profile-station[data-status="REVIEW"] { border-color: #b998b4; }
.profile-station[data-status="REVIEW"] .profile-station-meta span::before { background: var(--purple); }
.profile-station[data-status="DONE"] { border-color: #81b39e; background: #f0f8f4; }
.profile-station[data-status="DONE"] .profile-station-meta span::before { background: var(--green); }
.profile-station[data-status="BLOCKED"] { border-color: #c87868; background: #fff5f2; }
.profile-station[data-status="BLOCKED"] .profile-station-meta span::before { background: #a63f31; }
.workspace-risk-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 9px;
}
.workspace-risk-components article {
    padding: 13px;
    background: white;
    border: 1px solid #e3d6b5;
    border-radius: 10px;
}
.workspace-risk-components article > strong { font-size: .78rem; }
.workspace-risk-components article > p { margin: 3px 0 11px; color: var(--muted); font-size: .64rem; }
.workspace-risk-tracks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.workspace-risk-tracks span {
    min-width: 0;
    display: grid;
    gap: 1px;
    padding: 7px;
    background: #f6f5f0;
    border-top: 3px solid var(--green);
    border-radius: 7px;
}
.workspace-risk-tracks span[data-profile="EXTENDED"] { border-top-color: var(--orange); }
.workspace-risk-tracks span[data-profile="REGULATED"] { border-top-color: var(--purple); }
.workspace-risk-tracks small { overflow: hidden; color: var(--muted); font-size: .52rem; text-overflow: ellipsis; }
.workspace-risk-tracks strong { font-size: .57rem; }
.workspace-empty { margin: 0; color: var(--muted); font-size: .72rem; }
.profile-outcomes {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #c9b0c8;
    border-radius: 12px;
}
.profile-outcomes > strong {
    color: var(--purple);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.profile-outcomes > div { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-outcomes > div span {
    padding: 7px 10px;
    background: var(--purple-soft);
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 750;
}
.profile-outcomes p {
    margin: 0;
    padding-top: 11px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
}
.workstation-dialog {
    width: min(1040px, calc(100% - 32px));
    max-height: min(900px, calc(100vh - 32px));
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: 0;
    border-radius: 20px;
    box-shadow: 0 35px 90px rgba(14, 32, 29, .28);
}
.workstation-dialog::backdrop { background: rgba(13, 30, 27, .58); backdrop-filter: blur(4px); }
.workstation-dialog form { display: grid; max-height: inherit; }
.workstation-dialog-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.workstation-dialog-header h2 {
    margin-bottom: 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
}
.workstation-dialog-header > div > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: .86rem; }
.dialog-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    color: var(--muted);
    background: #f3f2ed;
    font-size: 1.5rem;
}
.workstation-dialog-body {
    display: grid;
    grid-template-columns: minmax(280px, .75fr) minmax(400px, 1.25fr);
    gap: 0;
    overflow: auto;
}
.workstation-reference,
.workstation-editor { padding: 28px 30px; }
.workstation-reference { background: #f4f2eb; border-right: 1px solid var(--line); }
.workstation-dialog-body h3 {
    margin-bottom: 18px;
    font-size: .74rem;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.workstation-reference dl { display: grid; gap: 16px; margin: 0; }
.workstation-reference dl div { display: grid; gap: 4px; }
.workstation-reference dt {
    color: var(--green);
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.workstation-reference dd { margin: 0; color: var(--muted); font-size: .76rem; }
.workstation-minimum {
    margin: 22px 0 0;
    padding: 13px;
    color: #5b4b23;
    background: #fff5d9;
    border-radius: 9px;
    font-size: .73rem;
}
.workstation-editor { display: grid; align-content: start; gap: 14px; }
.workstation-editor > label,
.workstation-field-row label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-size: .72rem;
    font-weight: 750;
}
.workstation-editor input,
.workstation-editor select,
.workstation-editor textarea {
    width: 100%;
    padding: 11px 12px;
    color: var(--ink);
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
    resize: vertical;
}
.workstation-editor input:focus,
.workstation-editor select:focus,
.workstation-editor textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(47, 107, 91, .13);
}
.workstation-field-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px; }
.workstation-dialog-footer {
    position: sticky;
    z-index: 2;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 30px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}
.workstation-dialog-footer > span { color: var(--muted); font-size: .68rem; }
.workstation-dialog-footer > div { display: flex; gap: 9px; }
.workstation-save-button {
    padding: 11px 16px;
    color: white;
    background: var(--green);
    font-size: .75rem;
    font-weight: 800;
}

.organization-overview,
.organization-detail { padding: clamp(54px, 8vw, 96px) 0 90px; }
.organization-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 44px;
    margin-bottom: 44px;
}
.organization-hero > div { max-width: 780px; }
.organization-hero h1,
.organization-detail-header h1 {
    margin: 8px 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 5.6vw, 5.2rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.035em;
}
.organization-hero > div > p:last-child {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}
.primary-action-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 12px 18px;
    color: white;
    background: var(--ink);
    font-size: .78rem;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease;
}
.primary-action-button:hover { background: var(--green); transform: translateY(-2px); }
.primary-action-button:disabled { cursor: wait; opacity: .6; transform: none; }
.organization-loading {
    padding: 32px 0;
    color: var(--muted);
    font-size: .85rem;
}
.organization-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
}
.organization-card {
    min-width: 0;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    color: var(--ink);
    background: rgba(255, 254, 250, .92);
    border: 1px solid var(--line);
    border-radius: 18px;
    text-align: left;
    box-shadow: 0 8px 28px rgba(24, 51, 47, .04);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.organization-card:hover,
.organization-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(47, 107, 91, .6);
    box-shadow: 0 18px 38px rgba(24, 51, 47, .11);
    outline: none;
}
.organization-card-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 50% 50% 50% 13px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    font-weight: 700;
}
.organization-card-body { display: grid; gap: 5px; margin: 24px 0; overflow: hidden; }
.organization-card-body strong {
    overflow-wrap: anywhere;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    line-height: 1.15;
}
.organization-card-body > span { color: var(--ink); font-size: .8rem; }
.organization-card-body small {
    overflow: hidden;
    color: var(--muted);
    font-size: .69rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.organization-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: .72rem;
}
.organization-card-footer > span:last-child { color: var(--green); font-size: 1.2rem; }
.organization-empty,
.use-case-empty {
    display: grid;
    justify-items: center;
    padding: 58px 24px;
    text-align: center;
    background: rgba(255, 254, 250, .7);
    border: 1px dashed #bdc8c2;
    border-radius: var(--radius);
}
.organization-empty[hidden],
.use-case-empty[hidden] { display: none; }
.organization-empty > span { color: var(--green); font-size: 2.3rem; }
.organization-empty h2 { margin: 12px 0 6px; font-family: Georgia, serif; font-size: 1.8rem; }
.organization-empty p,
.use-case-empty p { max-width: 560px; margin: 0 0 22px; color: var(--muted); }
.detail-toolbar,
.assessment-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.detail-toolbar { margin-bottom: 48px; }
.detail-toolbar .text-button,
.assessment-context-bar .text-button { margin: 0; }
.assessment-context-bar {
    margin-top: 24px;
    padding: 10px 0 14px;
    color: var(--muted);
    border-bottom: 1px solid rgba(24, 51, 47, .13);
    font-size: .76rem;
}
.organization-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 30px;
    margin-bottom: 34px;
}
.organization-detail-header h1 { max-width: 850px; margin-bottom: 12px; }
.organization-detail-header > div:first-child > p:last-child { margin: 0; color: var(--muted); }
.organization-detail-count {
    min-width: 112px;
    display: grid;
    padding: 18px;
    background: var(--green-soft);
    border-radius: 16px;
    text-align: center;
}
.organization-detail-count strong { font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.organization-detail-count span { margin-top: 5px; color: var(--muted); font-size: .66rem; }
.organization-detail-layout {
    display: grid;
    grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr);
    gap: 22px;
    align-items: start;
}
.organization-edit-card,
.organization-use-cases {
    padding: clamp(22px, 3vw, 32px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 44px rgba(24, 51, 47, .055);
}
.card-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.card-heading h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.card-heading .overline { margin: 0; }
#organization-save-status { color: var(--green); font-size: .7rem; font-weight: 750; }
.organization-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}
.organization-form-grid label { display: grid; gap: 6px; }
.organization-form-grid label.wide { grid-column: 1 / -1; }
.organization-form-grid label > span {
    color: var(--muted);
    font-size: .69rem;
    font-weight: 750;
}
.organization-form-grid input,
.organization-form-grid textarea {
    width: 100%;
    padding: 11px 12px;
    color: var(--ink);
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    resize: vertical;
}
.organization-form-grid input:focus,
.organization-form-grid textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(47, 107, 91, .12);
}
.organization-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 22px;
}
.organization-form-actions .inline-error { margin-right: auto; }
.organization-use-case-list { display: grid; gap: 12px; }
.organization-use-case-card {
    padding: 19px;
    background: #faf9f4;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.organization-use-case-card > div:first-child {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}
.organization-use-case-card h3 { margin: 0; font-family: Georgia, serif; font-size: 1.12rem; }
.organization-use-case-card > div:first-child > span {
    padding: 5px 9px;
    background: var(--green-soft);
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
}
.organization-use-case-card > div:first-child > span[data-profile="EXTENDED"] { background: var(--orange-soft); }
.organization-use-case-card > div:first-child > span[data-profile="REGULATED"] { background: var(--purple-soft); }
.use-case-card-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 17px 0 13px;
}
.use-case-card-meta > span { display: grid; gap: 2px; }
.use-case-card-meta small,
.organization-use-case-card > small { color: var(--muted); font-size: .62rem; }
.use-case-card-meta strong { font-size: .7rem; }
.inline-error {
    margin: 0;
    padding: 10px 12px;
    color: #7d2f20;
    background: #ffe4da;
    border-radius: 9px;
    font-size: .72rem;
}
.organization-dialog {
    width: min(760px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: auto;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 34px 100px rgba(13, 30, 27, .3);
}
.organization-dialog::backdrop { background: rgba(13, 30, 27, .58); backdrop-filter: blur(4px); }
.organization-dialog-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px 22px;
    border-bottom: 1px solid var(--line);
}
.organization-dialog-header h2 { margin: 3px 0 5px; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.organization-dialog-header p { margin-block: 0; }
.organization-dialog-header > div > p:last-child { color: var(--muted); font-size: .8rem; }
.organization-dialog-body { padding: 26px 30px; }
.organization-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 30px;
    border-top: 1px solid var(--line);
}
.organization-dialog-footer > div { display: flex; gap: 9px; margin-left: auto; }

.error-message {
    margin: 0 0 70px;
    padding: 18px;
    color: #7d2f20;
    background: #ffe4da;
    border-radius: 12px;
}

footer {
    width: min(1180px, calc(100% - 40px));
    min-height: 90px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    border-top: 1px solid rgba(24, 51, 47, .15);
    font-size: .75rem;
}

@media (max-width: 1100px) {
    .organization-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .organization-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .organization-hero { grid-template-columns: 1fr; align-items: start; gap: 26px; }
    .organization-hero .primary-action-button { justify-self: start; }
    .organization-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .builder-layout { grid-template-columns: 1fr; }
    .builder-progress { position: static; }
    .builder-progress ol { grid-template-columns: repeat(5, 1fr); gap: 5px; }
    .builder-progress li { font-size: .68rem; }
    .field-grid { grid-template-columns: 1fr; }
    .component-fields, .component-track { grid-template-columns: 1fr; }
    .question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .slider-row { grid-template-columns: 1fr; gap: 18px; }
    .component-control-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workspace-shell { grid-template-columns: 1fr; }
    .workspace-context {
        position: static;
        grid-template-columns: 1.2fr 1fr;
    }
    .workspace-context > div:nth-child(3),
    .workspace-next-button { grid-column: 1 / -1; }
    .workstation-dialog-body { grid-template-columns: 1fr; }
    .workstation-reference {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 620px) {
    .site-header, main, footer { width: min(100% - 24px, 1180px); }
    .site-header { min-height: 72px; }
    .version { display: none; }
    .organization-overview,
    .organization-detail { padding: 42px 0 55px; }
    .organization-grid { grid-template-columns: 1fr; }
    .organization-card { min-height: 220px; }
    .detail-toolbar,
    .organization-detail-header,
    .assessment-context-bar { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
    .organization-detail-header { display: grid; }
    .organization-detail-count { justify-self: start; }
    .organization-form-grid { grid-template-columns: 1fr; }
    .organization-form-grid label.wide { grid-column: auto; }
    .use-case-card-meta { grid-template-columns: 1fr; }
    .organization-dialog-header,
    .organization-dialog-body,
    .organization-dialog-footer { padding-inline: 19px; }
    .organization-dialog-footer { align-items: stretch; flex-direction: column; }
    .organization-dialog-footer > div { display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; }
    .hero { padding: 58px 0 40px; }
    .use-case-builder { padding: 45px 0 55px; }
    .builder-intro { margin-bottom: 26px; }
    .builder-card { min-height: 0; padding: 27px 20px; }
    .builder-review-grid, .use-case-summary { grid-template-columns: 1fr; }
    .builder-progress ol { display: none; }
    .builder-actions { grid-template-columns: 1fr 1fr; }
    .builder-actions > span { display: none; }
    .builder-next { min-width: 0; }
    h1 { font-size: clamp(2.6rem, 14vw, 4rem); }
    .panel { padding: 25px 18px; }
    .section-heading { grid-template-columns: 1fr; gap: 12px; margin-bottom: 30px; }
    .shield-intro { margin-left: 0; flex-direction: column; }
    .step { width: 38px; height: 38px; }
    .question-grid, .result-grid { grid-template-columns: 1fr; }
    .component-control-cards { grid-template-columns: 1fr; }
    .component-control-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .component-control-group { padding: 19px; }
    .control-card .position-label { min-height: 0; }
    .question-card { min-height: 108px; }
    .slider-row { padding-block: 24px; }
    .scale-guide { grid-template-columns: 1fr; }
    .slider-row { padding: 19px 16px; }
    .component-header { flex-direction: column; }
    .scale-bands .band { display: grid; }
    .submit-bar, .result-title-row, .ai-heading, footer { align-items: stretch; flex-direction: column; }
    .result-actions,
    .workspace-title-row,
    .workspace-map-intro,
    .profile-map-layer > header,
    .workstation-dialog-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .result-actions { display: flex; }
    .profile-workspace-button { width: 100%; min-width: 0; }
    .workspace-progress { grid-template-columns: 1fr; }
    .workspace-context { grid-template-columns: 1fr; }
    .workspace-context > div:nth-child(3),
    .workspace-next-button { grid-column: auto; }
    .workspace-layer-filter { border-radius: 14px; }
    .workspace-status-legend { justify-content: flex-start; }
    .profile-map { padding: 7px; }
    .profile-map-masthead { grid-template-columns: 1fr; }
    .profile-map-masthead > div:last-child { text-align: left; }
    .profile-map-layer > header { display: flex; }
    .profile-station-grid { grid-template-columns: 1fr; }
    .workspace-risk-components { grid-template-columns: 1fr; }
    .workspace-risk-tracks { grid-template-columns: repeat(2, 1fr); }
    .workstation-dialog {
        width: calc(100% - 12px);
        max-height: calc(100vh - 12px);
    }
    .workstation-dialog-header,
    .workstation-reference,
    .workstation-editor,
    .workstation-dialog-footer { padding-inline: 19px; }
    .workstation-field-row { grid-template-columns: 1fr; }
    .workstation-dialog-footer { display: flex; }
    .workstation-dialog-footer > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .shield-result { grid-template-columns: 1fr; }
    #submit-button { width: 100%; }
    .submit-bar { padding-bottom: 55px; }
    .result { margin-bottom: 45px; }
    footer { justify-content: center; padding-block: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

@media print {
    body { background: white; }
    body:has(#result:not([hidden])) .site-header,
    body:has(#result:not([hidden])) .hero,
    body:has(#result:not([hidden])) form,
    body:has(#result:not([hidden])) footer { display: none; }
    main { width: 100%; }
    .result {
        margin: 0;
        padding: 18px;
        border: 0;
        box-shadow: none;
    }
    .decision-result, .shield-result, .control-card, .ai-result, .result-grid article {
        break-inside: avoid;
    }
    .secondary-button { display: none; }
}
