.protection-works-body {
    min-height: 100vh;
}

.protection-works-shell {
    padding-bottom: 44px;
}

.protection-works-intro {
    max-width: 920px;
    margin-bottom: 18px;
}

.protection-works-intro h1 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 850;
}

.protection-works-intro p {
    color: var(--text-secondary);
    margin: 0;
}

.protection-eyebrow {
    margin: 0 0 4px;
    color: var(--psn-orange-dark);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.protection-works-grid {
    display: grid;
    grid-template-columns: minmax(290px, 430px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.protection-card,
.protection-results,
.preliminary-note {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.protection-form {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.field-stack {
    display: grid;
    gap: 7px;
}

.field-stack .input-group .form-control {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.field-stack .input-group-text {
    border-left: none;
    border-right: 2px solid var(--border-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.field-help,
.field-warning {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.field-help {
    color: var(--text-secondary);
}

.field-warning {
    color: #92400e;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 8px 10px;
}

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.segmented-control label {
    margin: 0;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary);
    font-weight: 750;
    cursor: pointer;
}

.segmented-control input:checked + span {
    border-color: var(--psn-orange);
    background: var(--psn-orange-soft);
    color: var(--psn-navy-dark);
    box-shadow: 0 0 0 3px rgba(245, 129, 24, 0.14);
}

.edge-type-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.edge-type-card {
    margin: 0;
}

.edge-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.edge-type-card span {
    display: grid;
    gap: 6px;
    min-height: 148px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
}

.edge-type-card svg {
    width: 100%;
    height: 58px;
    color: #475569;
}

.edge-type-card strong {
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.15;
}

.edge-type-card small {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.25;
}

.edge-type-card input:focus-visible + span,
.edge-type-card input:checked + span {
    border-color: var(--psn-orange);
    background: var(--psn-orange-soft);
    box-shadow: 0 0 0 3px rgba(245, 129, 24, 0.14);
}

.edge-type-card input:checked + span svg {
    color: var(--psn-orange-dark);
}

.validation-summary {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
}

.validation-summary:empty,
.validation-summary[hidden] {
    display: none;
}

.validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

.diagram-card {
    padding: 18px;
}

.diagram-header,
.results-title,
.scenario-heading,
.overall-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.diagram-header h2,
.results-title h2,
.scenario-heading h3,
.overall-card h3,
.preliminary-note h3 {
    margin: 0;
    font-weight: 850;
    color: var(--text-primary);
}

.diagram-header h2,
.results-title h2 {
    font-size: 1.25rem;
}

.scale-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 8px;
    background: #eef8fd;
    color: #075985;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.diagram-frame {
    width: 100%;
    min-height: 260px;
    overflow-x: auto;
}

.diagram-frame svg {
    display: block;
    min-width: 620px;
}

.diagram-label {
    fill: #25324b;
    font-size: 17px;
    font-weight: 700;
}

.diagram-label.strong {
    fill: #060D26;
    font-size: 18px;
    font-weight: 850;
}

.line-label {
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 5px;
    stroke-linejoin: round;
}

.danger-text,
.encroach-label {
    fill: #991b1b;
}

.footing-label {
    fill: #334155;
    font-size: 14px;
    font-weight: 850;
}

.subtle-label {
    fill: #64748b;
    font-size: 14px;
}

.soil-label {
    fill: #334155;
    font-size: 15px;
}

.results-region {
    margin-top: 16px;
}

.minimum-setback-layout {
    display: grid;
    gap: 18px;
}

.minimum-summary {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.minimum-summary th,
.minimum-summary td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

.minimum-summary th:first-child,
.minimum-summary td:first-child {
    text-align: left;
}

.minimum-section {
    display: grid;
    gap: 12px;
}

.minimum-section h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 850;
}

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

.minimum-card-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.minimum-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

.minimum-card h4,
.minimum-card p {
    margin: 0;
}

.minimum-card h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 850;
}

.minimum-value {
    color: var(--psn-navy-dark);
    font-size: 1.55rem;
    font-weight: 900;
}

.minimum-note {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.4;
}

.minimum-svg {
    overflow-x: auto;
}

.minimum-svg svg {
    display: block;
    min-width: 520px;
    width: 100%;
    height: auto;
}

.protection-results {
    padding: 18px;
}

.footing-note {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

.footing-note h3,
.footing-note p {
    margin: 0;
}

.footing-note h3 {
    font-size: 0.95rem;
    font-weight: 850;
}

.footing-note p {
    margin-top: 4px;
    font-size: 0.9rem;
}

.overall-card {
    margin: 14px 0;
    padding: 16px;
    border: 1px solid;
    border-radius: 8px;
}

.overall-card i,
.scenario-heading i {
    font-size: 1.65rem;
}

.overall-card p {
    margin: 6px 0 0;
}

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

.scenario-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.scenario-card {
    padding: 16px;
    border: 1px solid;
    border-radius: 8px;
    background: #fff;
}

.scenario-card p {
    margin: 12px 0 0;
    color: var(--text-secondary);
}

.scenario-metrics {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
}

.scenario-metrics div {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.scenario-metrics dt {
    color: var(--text-secondary);
    font-weight: 650;
}

.scenario-metrics dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 850;
    text-align: right;
}

.low {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.low i {
    color: #047857;
}

.warning {
    border-color: #fed7aa;
    background: #fff7ed;
}

.warning i {
    color: #c2410c;
}

.high {
    border-color: #fecaca;
    background: #fef2f2;
}

.high i {
    color: #991b1b;
}

.preliminary-note {
    margin-top: 14px;
    padding: 16px;
    box-shadow: none;
}

.preliminary-note p {
    margin: 8px 0 0;
    color: var(--text-secondary);
}

.protection-video-section {
    margin-bottom: 22px;
}

.video-frame {
    aspect-ratio: 16 / 9;
    background: #060d26;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    max-width: 420px;
    overflow: hidden;
    width: 100%;
}

.video-frame iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.protection-email-submit {
    margin-top: 10px;
    width: 100%;
}

.calculator-option {
    text-decoration: none;
}

.calculator-option:hover {
    color: #075985;
}

.address-results {
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    margin-top: 8px;
    overflow: hidden;
}

.address-results button {
    appearance: none;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
    color: #111827;
    display: block;
    font: inherit;
    padding: 12px 14px;
    text-align: left;
    width: 100%;
}

.address-results button:hover,
.address-results button:focus {
    background: #fff7ed;
    outline: none;
}

@media (max-width: 992px) {
    .protection-works-grid,
    .scenario-grid,
    .minimum-card-grid,
    .minimum-card-grid.two-up {
        grid-template-columns: 1fr;
    }

    .edge-type-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .protection-works-intro h1 {
        font-size: 1.45rem;
    }

    .diagram-card,
    .protection-results,
    .protection-form {
        padding: 14px;
    }

    .diagram-header,
    .overall-card,
    .scenario-heading {
        flex-direction: column;
    }

    .scenario-metrics div {
        grid-template-columns: 1fr;
    }

    .scenario-metrics dd {
        text-align: left;
    }

    .edge-type-selector {
        grid-template-columns: 1fr;
    }
}
