
.neck-atlas-shell {
    display: grid;
    gap: 18px;
}

.neck-atlas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.neck-atlas-kicker {
    font-weight: 700;
    color: #53687c;
}

.neck-atlas-version {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(53, 104, 168, 0.12);
    font-weight: 700;
}

.neck-source-note,
.neck-atlas-disclaimer {
    padding: 13px;
    border-left: 5px solid #52677d;
    border-radius: 8px;
    background: rgba(82, 103, 125, 0.10);
}

.neck-workflow-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.62fr) minmax(0, 2fr);
    gap: 18px;
    align-items: start;
}

.neck-workflow-navigation {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.neck-navigation-heading {
    padding: 5px 5px 12px;
    border-bottom: 1px solid var(--border);
}

.neck-navigation-heading h3,
.neck-navigation-heading p {
    margin: 0;
}

.neck-navigation-heading p {
    margin-top: 4px;
    font-size: 13px;
}

.neck-navigation-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.neck-navigation-item.is-current {
    border-color: #3568a8;
    box-shadow: inset 5px 0 0 #3568a8;
    background: rgba(53, 104, 168, 0.08);
}

.neck-navigation-item.is-recorded small {
    color: #1d7a46;
    font-weight: 700;
}

.neck-navigation-number,
.neck-level-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(53, 104, 168, 0.12);
    font-weight: 800;
}

.neck-navigation-copy {
    display: grid;
    gap: 3px;
}

.neck-navigation-copy small {
    font-size: 12px;
}

.neck-workflow-main {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.neck-atlas-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.neck-atlas-toolbar .is-active {
    box-shadow: inset 0 -4px 0 #ef8d22;
}

.neck-atlas-main {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    gap: 18px;
    align-items: start;
}

.neck-atlas-figure-card,
.neck-level-panel,
.neck-atlas-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.neck-svg-host {
    display: grid;
    place-items: center;
    min-height: 650px;
    overflow: hidden;
    border-radius: 12px;
    background: #f7fafc;
}

.neck-svg-host svg {
    width: 100%;
    max-height: 790px;
}

.neck-atlas-caption {
    margin-bottom: 0;
    font-size: 13px;
}

.neck-level-heading {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 12px;
    align-items: start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.neck-level-heading h3 {
    margin: 8px 0 5px;
}

.neck-structure-layer {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(107, 92, 165, 0.12);
    font-size: 13px;
    font-weight: 700;
}

.neck-form-section {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-left-width: 6px;
    border-radius: 12px;
}

.neck-form-section h4 {
    margin-top: 0;
}

.neck-form-blue {
    border-left-color: #3568a8;
    background: rgba(53, 104, 168, 0.07);
}

.neck-form-purple {
    border-left-color: #6b5ca5;
    background: rgba(107, 92, 165, 0.07);
}

.neck-form-orange {
    border-left-color: #c26a00;
    background: rgba(194, 106, 0, 0.08);
}

.neck-form-green {
    border-left-color: #1d7a46;
    background: rgba(29, 122, 70, 0.07);
}

.neck-form-red {
    border-left-color: #b3261e;
    background: rgba(179, 38, 30, 0.07);
}

.neck-form-brown {
    border-left-color: #795548;
    background: rgba(121, 85, 72, 0.07);
}

.neck-form-teal {
    border-left-color: #087f8c;
    background: rgba(8, 127, 140, 0.07);
}

.neck-form-grey {
    border-left-color: #52677d;
    background: rgba(82, 103, 125, 0.07);
}

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

.neck-field {
    display: grid;
    gap: 6px;
}

.neck-field > span {
    font-weight: 700;
}

.neck-field-wide {
    grid-column: 1 / -1;
    margin-top: 12px;
}

.neck-field input,
.neck-field select,
.neck-field textarea,
.neck-summary-card textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.neck-number-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 7px;
}

.neck-number-wrap small {
    font-weight: 700;
}

.neck-field-help {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
    font-size: 13px;
}

.neck-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.neck-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.neck-knot-warning {
    margin-top: 12px;
    padding: 11px;
    border-left: 5px solid #b3261e;
    border-radius: 8px;
    background: rgba(179, 38, 30, 0.09);
}

.neck-forensic-note {
    margin-top: 14px;
    padding: 13px;
    border-left: 5px solid #c26a00;
    border-radius: 8px;
    background: rgba(194, 106, 0, 0.10);
}

.neck-forensic-feature-list {
    display: grid;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.neck-forensic-feature-list li {
    display: grid;
    grid-template-columns: 25px 1fr;
    gap: 7px;
}

.neck-report-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.neck-summary-card textarea {
    resize: vertical;
}

@media (max-width: 1180px) {
    .neck-workflow-layout {
        grid-template-columns: 1fr;
    }

    .neck-workflow-navigation {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: none;
    }

    .neck-navigation-heading {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .neck-atlas-main,
    .neck-form-grid,
    .neck-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .neck-workflow-navigation {
        grid-template-columns: 1fr;
    }

    .neck-svg-host {
        min-height: 430px;
    }
}

@media print {
    .neck-workflow-navigation,
    .neck-atlas-toolbar,
    .neck-summary-card .cjd-action-row {
        display: none !important;
    }

    .neck-workflow-layout,
    .neck-atlas-main {
        display: block;
    }

    .neck-atlas-figure-card,
    .neck-level-panel,
    .neck-atlas-card {
        break-inside: avoid;
        margin-bottom: 12px;
    }
}


/* ===========================================
   Knot identification preview
=========================================== */

.neck-knot-preview {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.neck-knot-preview-heading {
    margin-bottom: 10px;
}

.neck-knot-preview-heading p {
    margin: 4px 0 0;
    font-size: 13px;
}

.neck-knot-svg {
    display: block;
    width: 100%;
    max-height: 280px;
    color: #8b5a32;
}

.neck-knot-svg-background {
    fill: rgba(82, 103, 125, 0.05);
    stroke: var(--border);
}

.neck-knot-post {
    fill: #aeb7bf;
    stroke: #52677d;
    stroke-width: 3;
}

.neck-knot-buckle {
    fill: #c8d0d7;
    stroke: #52677d;
    stroke-width: 5;
}

.neck-knot-buckle-pin {
    stroke: #52677d;
    stroke-width: 8;
}

.neck-knot-crossing {
    fill: #f6d58a;
    stroke: #8b5a32;
    stroke-width: 3;
}

.neck-knot-unknown {
    fill: rgba(194, 106, 0, 0.12);
    stroke: #c26a00;
    stroke-width: 4;
}

.neck-knot-svg-question {
    font-family: Arial, sans-serif;
    font-size: 48px;
    font-weight: 800;
    fill: #c26a00;
}

.neck-knot-svg-text {
    font-family: Arial, sans-serif;
    font-size: 16px;
    fill: #52677d;
}


/* ===========================================
   Export controls
=========================================== */

.neck-summary-card .cjd-action-row {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media print {
    .neck-knot-preview {
        break-inside: avoid;
    }
}
