@font-face {
    font-family: CircularStd;
    src: url('https://engineeringunleashed.com/fonts/CircularStd-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: CircularStd;
    src: url('https://engineeringunleashed.com/fonts/CircularStd-Medium.woff2') format('woff2');
    font-weight: 500 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: CircularStd;
    src: url('https://engineeringunleashed.com/fonts/CircularStd-Bold.woff2') format('woff2');
    font-weight: 700 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-sans: CircularStd, ui-sans-serif, system-ui, sans-serif;

    --teal: #0C4F69;
    --teal-light: #358EAF;
    --teal-mid: #257796;
    --teal-rgb: 12, 79, 105;
    --navy: #0f2854;
    --navy-rgb: 15, 40, 84;
    --green: #299d8f;

    --gold: #F5B71A;
    --gold-cta: #F5B71A;
    --gold-light: #FEFBE8;
    --gold-rgb: 245, 183, 26;

    --cream: #FAFAFA;
    --cream-dark: #e9eaeb;
    --white: #ffffff;
    --text: #111827;
    --text-light: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--cream);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 700;
}

/* Header */
.site-header {
    background-color: var(--teal);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    background-image: url('assets/topo-pattern.svg');
    background-size: 120px 120px;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--teal);
    opacity: 0.92;
    z-index: 0;
}

.header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    flex-wrap: wrap;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-home-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem 0.25rem 0;
    margin: -0.25rem 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    border-radius: 8px;
    transition: background 0.2s;
    flex: 1;
    min-width: 0;
}

.header-home-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header-home-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.header-home-btn .header-title {
    margin-left: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.header-workshop {
    color: var(--gold);
    font-weight: 500;
}

.header-title-sep,
.header-product {
    color: #ffffff;
}

@media (max-width: 600px) {
    .header-workshop,
    .header-title-sep {
        display: none;
    }
}

.logo-dot {
    width: 11px;
    height: 11px;
    background: var(--gold);
    border-radius: 50%;
    flex-shrink: 0;
}

#field-guide-header-btn {
    margin-left: auto;
}

.header-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hidden {
    display: none !important;
}

/* Layout */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

.main-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
}

/* Hero — teal panel + semi-transparent topo banner + text-safe gradient */
.hero {
    background-color: var(--teal);
    color: white;
    border-radius: 12px;
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('assets/topo-header-overlay.png') no-repeat right center / auto 100%;
    opacity: 0.48;
    z-index: 0;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(var(--teal-rgb), 0.92) 0%,
        rgba(var(--teal-rgb), 0.78) 40%,
        rgba(var(--teal-rgb), 0.42) 65%,
        rgba(var(--navy-rgb), 0.15) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: 2.35rem;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    color: white;
}

.hero-lead {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 36rem;
    line-height: 1.55;
}

/* Welcome card */
.welcome-card {
    background: white;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card-title {
    font-size: 1.25rem;
    color: var(--teal);
    margin-bottom: 1rem;
}

.behavior-explorer {
    margin-bottom: 1rem;
}

.behavior-explorer-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.behavior-explorer-side {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
}

@media (min-width: 720px) {
    .behavior-explorer-layout {
        display: grid;
        grid-template-columns: 1fr minmax(200px, 36%);
        gap: 1.25rem;
        align-items: start;
    }
}

.category-grid {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 0;
}

.field-guide-cover-btn {
    display: block;
    width: 100%;
    padding: 0.35rem;
    margin: 0;
    border: 1px solid rgba(var(--teal-rgb), 0.14);
    border-radius: 8px;
    background: var(--cream);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.field-guide-cover-btn:hover,
.field-guide-cover-btn:focus-visible {
    border-color: rgba(var(--gold-rgb), 0.65);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.field-guide-cover-btn:focus-visible {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--teal), 0 8px 24px rgba(0, 0, 0, 0.1);
}

.field-guide-cover-btn img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.field-guide-cover-cta {
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    bottom: 0.35rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(to top, rgba(var(--teal-rgb), 0.88), rgba(var(--teal-rgb), 0.45) 70%, transparent);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.field-guide-cover-btn:hover .field-guide-cover-cta,
.field-guide-cover-btn:focus-visible .field-guide-cover-cta {
    opacity: 1;
}

.category-grid li {
    margin: 0;
}

.category-tile {
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.84rem;
    padding: calc(0.5rem + 1px) 0.65rem;
    background: var(--cream);
    border-radius: 8px;
    color: var(--text);
    border: 1px solid transparent;
    border-left: 3px solid var(--gold);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.category-tile:hover,
.category-tile:focus-visible,
.category-tile.is-active {
    background: var(--gold-light);
    border-color: rgba(var(--gold-rgb), 0.35);
    outline: none;
    box-shadow: 0 1px 4px rgba(var(--teal-rgb), 0.08);
}

.category-tile:focus-visible {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--teal);
}

.behavior-preview {
    background: var(--cream);
    border: 1px solid rgba(var(--teal-rgb), 0.12);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    min-height: 4.5rem;
    width: 100%;
}

.behavior-explorer-side .behavior-preview {
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
}

.behavior-explorer-side .behavior-preview-title {
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.behavior-explorer-side .behavior-preview-definition {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 0.4rem;
}

.behavior-explorer-side .behavior-preview-meta {
    font-size: 0.6rem;
    padding-top: 0.3rem;
}

.behavior-explorer-side .behavior-preview-placeholder {
    font-size: 0.6rem;
}

.behavior-preview-placeholder {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.behavior-preview-title {
    font-size: 1rem;
    color: var(--teal);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.behavior-preview-definition {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0 0 0.65rem;
}

.behavior-preview-meta {
    font-size: 0.6rem;
    color: var(--text-light);
    line-height: 1.45;
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(var(--teal-rgb), 0.1);
}

.mode-hint {
    font-size: 0.84rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.mode-details {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.mode-details li {
    font-size: 0.86rem;
    color: var(--text-light);
    line-height: 1.55;
    margin-bottom: 0.65rem;
    padding-left: 1rem;
    position: relative;
}

.mode-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
}

.mode-details strong {
    color: var(--text);
}

.start-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
}

.btn-gold {
    background: var(--gold-cta);
    color: var(--navy);
}

.btn-gold:hover:not(:disabled) {
    background: #dda018;
    transform: translateY(-1px);
}

.btn-teal {
    background: var(--navy);
    color: white;
}

.btn-teal:hover:not(:disabled) {
    background: #1a3568;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--teal);
    border: 2px solid var(--teal);
}

.btn-outline:hover {
    background: var(--teal);
    color: white;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.resource-link {
    margin-top: 0.5rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--teal);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    padding: 0;
}

.link-btn:hover {
    color: var(--teal-light);
}

/* Assessment */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--cream-dark);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 100px;
    transition: width 0.35s ease;
    width: 0;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 500;
}

.category-indicators {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.category-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--cream-dark);
    background: white;
    color: var(--text-light);
    transition: all 0.2s;
}

.category-indicator.current {
    border-color: var(--teal);
    background: var(--teal);
    color: white;
}

.category-indicator.partial {
    border-color: var(--gold);
    background: var(--gold-light);
    color: var(--navy);
}

.category-indicator.complete {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}

.category-indicator.omitted {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.category-header {
    background: var(--teal);
    color: white;
    border-radius: 10px;
    padding: 1.1rem 1.35rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.category-header.blind .category-name,
.category-header.blind .category-definition {
    filter: blur(0);
}

.category-name {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.category-definition {
    font-size: 0.84rem;
    opacity: 0.88;
    line-height: 1.45;
    max-width: 32rem;
}

.behavior-link {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.behavior-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

.assessment-main.hidden {
    display: none;
}

.questions-block {
    background: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.scenario-panel {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--cream-dark);
}

.scenario-panel:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.scenario-panel:first-child {
    padding-top: 0;
}

.scenario-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal);
    margin-bottom: 0.75rem;
}

.category-break {
    margin-bottom: 1.25rem;
}

.category-break-card {
    background: white;
    border-radius: 10px;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--gold-light);
}

.category-break-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-break-title {
    font-size: 1.35rem;
    color: var(--teal);
    margin-bottom: 0.75rem;
}

.category-break-message {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.55;
    max-width: 28rem;
    margin: 0 auto 1.25rem;
}

.category-break-next-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.category-break-next {
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 1.25rem;
}

.question-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.video-container {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cream-dark);
    line-height: 0;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

.video-fallback-note {
    font-size: 0.82rem;
    color: var(--text-light);
    padding: 0.5rem 0;
    font-style: italic;
}

.question-text {
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--text);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.option:hover {
    border-color: var(--teal-light);
}

.option.selected {
    border-color: var(--teal);
    background: var(--teal);
    color: white;
}

.option-key {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: var(--gold-light);
    color: var(--navy);
}

.option.selected .option-key {
    background: var(--gold);
    color: var(--navy);
}

.option-text {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.45;
}

.rank-instruction {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-header .behavior-link.hidden {
    display: none;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 2rem 1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    background: white;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    touch-action: none;
}

.rank-item-ghost {
    opacity: 0.45;
    background: var(--gold-light);
}

.rank-item-chosen {
    border-color: var(--teal);
    box-shadow: 0 2px 8px rgba(var(--teal-rgb), 0.12);
}

.rank-item-drag {
    opacity: 0.95;
}

.rank-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    color: var(--text-light);
    cursor: grab;
    user-select: none;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: -0.12em;
}

.rank-drag-handle::before {
    content: '⋮⋮';
}

.rank-drag-handle:active {
    cursor: grabbing;
}

.rank-position {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    background: var(--gold-light);
    color: var(--navy);
}

.rank-item-text {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text);
}

.rank-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rank-btn {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border: 1px solid var(--teal-light);
    border-radius: 4px;
    background: white;
    color: var(--teal);
    cursor: pointer;
}

.rank-btn:hover:not(:disabled) {
    background: var(--cream);
}

.rank-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.order-compare {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0.65rem 0;
}

@media (min-width: 640px) {
    .order-compare {
        grid-template-columns: 1fr 1fr;
    }
}

.order-column-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--teal);
    margin: 0 0 0.4rem;
}

.order-review-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.order-review-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.5rem;
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 0.4rem 0.5rem;
    background: white;
    border-radius: 4px;
}

.order-review-list--reference .order-review-item {
    background: var(--gold-light);
}

.order-review-item--match {
    border-left: 3px solid #2f855a;
}

.score-detail {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0 0 0.65rem;
    line-height: 1.45;
}

.order-rank {
    font-weight: 800;
    color: var(--teal);
    min-width: 1.25rem;
}

.order-review-text {
    flex: 1;
    color: var(--text);
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: white;
    color: var(--teal);
    border: 2px solid var(--teal);
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: var(--teal);
    color: white;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.submit-btn {
    margin-left: auto;
}

/* Results */
.results-hero {
    background: var(--teal);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background-image: url('assets/topo-pattern.svg');
    background-size: 120px;
    position: relative;
    overflow: hidden;
}

.results-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--teal-rgb), 0.93), rgba(var(--navy-rgb), 0.9));
    z-index: 0;
}

.results-hero > * {
    position: relative;
    z-index: 1;
}

.results-badge {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.results-hero h1 {
    font-size: 1.85rem;
    color: white;
    margin-bottom: 0.5rem;
}

.results-subtitle {
    font-size: 0.92rem;
    opacity: 0.88;
    max-width: 28rem;
    margin: 0 auto 1.25rem;
    line-height: 1.5;
}

.overall-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.score-band {
    margin-top: 0.15rem;
}

.score-number {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--gold);
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.85;
}

.results-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.results-section h2 {
    font-size: 1.05rem;
    color: var(--teal);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cream-dark);
}

.omitted-categories {
    background: var(--cream);
    border-left: 4px solid var(--gold);
    padding: 0.85rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
}

.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.results-section-lead {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: -0.35rem 0 1rem;
}

.results-section-lead.chart-section-lead {
    margin-top: -0.5rem;
}

.assessment-sequence-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.75rem;
    background: var(--gold-light);
    border-radius: 8px;
}

.sequence-strip-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--teal);
    margin-right: 0.25rem;
}

.sequence-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border-radius: 999px;
    border: 1px solid rgba(var(--teal-rgb), 0.15);
    font-size: 0.75rem;
}

.sequence-chip-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    font-weight: 800;
    font-size: 0.7rem;
}

.sequence-chip-name {
    color: var(--text);
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-omitted-header {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 0.75rem 0 0.35rem;
    padding: 0 0.25rem;
}

.category-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--cream);
    border-radius: 8px;
    gap: 0.65rem 1rem;
}

.category-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    background: var(--teal);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.category-order-badge--muted {
    background: transparent;
    color: var(--text-light);
    border: 1px dashed rgba(90, 106, 122, 0.35);
}

.category-item.not-assessed {
    opacity: 0.65;
    font-style: italic;
}

.category-name {
    font-weight: 500;
    font-size: 0.88rem;
}

.category-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.5rem;
    font-weight: 700;
    color: var(--teal);
    font-size: 0.88rem;
}

.category-pct {
    color: var(--text);
}

.category-scenario-count {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-light);
}

.chart-section {
    overflow: visible;
}

.chart-section .results-section-lead {
    margin-bottom: 0.75rem;
}

.chart-section .chart-container {
    width: 100%;
    height: clamp(420px, 52vw, 540px);
    margin: 0;
    overflow: visible;
    position: relative;
}

.chart-section .chart-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-footnote {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-light);
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--gold-light);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.question-review {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-item {
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
    border-left: 4px solid var(--gold);
}

.question-item.rubric-level-emerging {
    border-left-color: #c53030;
}

.question-item.rubric-level-developing {
    border-left-color: var(--gold);
}

.question-item.rubric-level-proficient {
    border-left-color: #2f855a;
}

.question-review-text {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
    line-height: 1.45;
}

.answer-info {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.5;
}

.review-set-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    background: var(--teal);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}

.review-category-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 0.35rem;
}

.review-scenario-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.35rem 0 0;
    color: var(--text);
}

.answer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.35rem;
}

.scenario-pct {
    font-size: 0.78rem;
    color: var(--text-light);
}

.answer-choice-text {
    color: var(--text);
    margin-bottom: 0.35rem;
}

.proficient-answer {
    background: var(--gold-light);
    padding: 0.5rem 0.65rem;
    border-radius: 4px;
    margin-top: 0.35rem;
    color: var(--text);
}

.proficient-answer .answer-choice-text {
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.rubric-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    line-height: 1.3;
}

.rubric-badge--large {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

.rubric-badge--emerging {
    background: #fed7d7;
    color: #9b2c2c;
}

.rubric-badge--developing {
    background: var(--gold-light);
    color: #975a16;
}

.rubric-badge--proficient {
    background: #c6f6d5;
    color: #276749;
}

.bank-load-error {
    color: #c53030;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    background: #fff5f5;
    border-radius: 8px;
    border-left: 3px solid #c53030;
}

.scoring-footnote {
    font-size: 0.85rem;
    line-height: 1.55;
    margin-top: 1rem;
    max-width: 32rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.results-hero .scoring-footnote {
    color: rgba(255, 255, 255, 0.92);
}

.explanation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    font-style: italic;
    color: var(--text);
    border: 1px solid var(--cream-dark);
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(26, 41, 66, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-panel {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 630px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.modal-panel-lg {
    max-width: 960px;
    width: min(96vw, 960px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--teal);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.modal-header h2,
.modal-header h3 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--cream-dark);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.tab-btn:hover:not(.active) {
    color: var(--text);
}

.modal-body {
    padding: 1.25rem 1.5rem;
}

.modal-body-scroll {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--cream-dark);
    justify-content: flex-end;
}

.field-guide-modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.fg-download-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 1rem;
}

.field-guide-pdf-viewer {
    flex: 1 1 auto;
    min-height: 320px;
    overflow-y: auto;
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: 8px;
}

.field-guide-pdf-page {
    margin-bottom: 0.5rem;
    line-height: 0;
}

.field-guide-pdf-page:last-child {
    margin-bottom: 0;
}

.field-guide-pdf-page canvas {
    display: block;
    width: 100%;
    height: auto;
}

.field-guide-pdf-status {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.field-guide-pdf-status--error a {
    color: var(--teal);
    font-weight: 600;
}

.fg-download-panel .download-actions {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--cream-dark);
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.download-btn {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.download-btn.primary {
    background: var(--gold);
    color: var(--navy);
}

.download-btn.secondary {
    background: var(--cream);
    color: var(--teal);
    border: 2px solid var(--teal);
}

.pdf-embed {
    display: block;
    width: 100%;
    min-width: 100%;
    height: 540px;
    border: 1px solid var(--cream-dark);
    border-radius: 8px;
    margin-top: 1rem;
    background: var(--cream);
}

.cancel-btn {
    background: var(--cream);
    color: var(--text);
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
}

.confirm-btn {
    background: var(--gold);
    color: var(--navy);
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
}

.error-message {
    color: #c53030;
    font-size: 0.85rem;
}

.modal-body input {
    width: 100%;
    padding: 0.65rem;
    border: 2px solid var(--cream-dark);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.privacy-note {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.5;
    text-align: center;
}

.privacy-footer {
    padding: 1.25rem 1.5rem 2rem;
    max-width: 820px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.85rem;
    }

    .start-actions {
        flex-direction: column;
    }

    .start-actions .btn {
        width: 100%;
        text-align: center;
    }

    .category-header {
        flex-direction: column;
    }
}
