/*
 * Partner Network pages inside the main HomeBridge layout.
 * Same navy / purple / orange look as /my-partnerships. Every rule is scoped to
 * .network-site so nothing here can change another page. The older
 * partner-network.css remains for the standalone preview hosts.
 */
.network-site {
    --ph-navy: var(--thb-navy, #0b1633);
    --ph-purple: var(--thb-purple, #6c5ce7);
    --ph-orange: #f47b20;
    --ph-line: #dce2ed;
    --ph-muted: #4c596f;
    --ink: var(--ph-navy);
    --brand: #9b450c;
    --muted: var(--ph-muted);
    --line: var(--ph-line);
    padding: 40px 0 72px;
    background: linear-gradient(135deg, #f4f2ff 0, #fff8ef 580px, #f8f9fc 1050px);
    color: var(--ph-navy);
    font-size: 16px;
    line-height: 1.6;
}
.network-site * { box-sizing: border-box; }
.network-container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.network-site a { color: var(--ph-navy); text-underline-offset: 3px; }
.network-site :focus-visible { outline: 3px solid var(--ph-purple); outline-offset: 3px; }

/* Page frame: the platform's navy header and footer, with no scripts. */
.network-body { margin: 0; font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; background: #f8f9fc; color: #0b1633; }
.skip-link { position: absolute; top: -80px; left: 8px; background: #fff; color: #0b1633; padding: 12px 16px; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 8px; }
.network-header { background: #0b1633; border-bottom: 3px solid #f47b20; }
.network-header * { box-sizing: border-box; }
.network-header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 28px; padding-top: 14px; padding-bottom: 14px; }
.network-brand { display: inline-flex; align-items: center; min-height: 44px; }
.network-brand img { display: block; height: auto; max-width: 170px; }
.network-subnav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.network-header .network-subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border-radius: 22px; font-size: 14px; font-weight: 650; text-decoration: none; color: #fff; }
.network-header .network-subnav a:hover { background: #ffffff1f; }
.network-header :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.network-footer { padding: 28px 24px; text-align: center; background: #0b1633; color: #c9d1e3; font-size: 14px; }
.network-footer p { margin: 0 0 8px; }
.network-footer a { color: #fff; }

.network-shell { max-width: 1100px; min-height: 50vh; overflow-wrap: anywhere; }
.network-shell h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; letter-spacing: -1px; margin: 10px 0 18px; color: var(--ph-navy); font-weight: 700; }
.network-shell h2 { font-size: 24px; line-height: 1.3; color: var(--ph-navy); font-weight: 700; }
.network-shell h3 { color: var(--ph-navy); font-weight: 700; }
.network-kicker { color: var(--brand); text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: 1.7px; }
.network-lead { font-size: 19px; line-height: 1.6; max-width: 800px; color: var(--ph-muted); }
.network-card { background: #fff; border: 1px solid var(--ph-line); border-radius: 16px; padding: 28px; margin: 24px 0; }
.network-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }

/* Forms */
.network-shell label { display: block; font-weight: 650; margin: 15px 0; }
.network-shell input:not([type=checkbox]):not([type=hidden]), .network-shell textarea, .network-shell select {
    display: block; width: 100%; min-width: 0; padding: 12px 14px; margin-top: 7px;
    border: 1px solid #b9c2d3; border-radius: 9px; background: #fff; color: var(--ph-navy); font: inherit; }
.network-shell input:focus, .network-shell textarea:focus, .network-shell select:focus { border-color: var(--ph-purple); }
.network-shell fieldset { border: 1px solid var(--ph-line); padding: 15px 22px; margin: 24px 0; border-radius: 14px; background: #fff; }
.network-shell legend { font-weight: 700; padding: 0 8px; width: auto; float: none; }
.network-shell .network-check { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; }
.network-check input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 5px; accent-color: var(--ph-purple); }
.network-hint { display: block; color: var(--ph-muted); font-size: 14px; font-weight: 400; }
.network-shell button, .network-button {
    display: inline-block; padding: 13px 22px; border: 0; border-radius: 9px; background: var(--ph-navy); color: #fff;
    font: inherit; font-weight: 700; cursor: pointer; min-height: 48px; text-decoration: none; }
.network-shell button:hover, .network-button:hover { background: #2d2856; color: #fff; }
.network-shell a.network-button { color: #fff; }
.network-notice { padding: 18px 20px; border: 1px solid #bfe0cd; border-left: 5px solid #24724a; border-radius: 12px; background: #e9f5ee; }
.network-errors { color: #a21c25; }
.network-errors.validation-summary-valid { display: none; }
.network-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Lists and tables */
.network-counts { display: flex; gap: 12px; flex-wrap: wrap; }
.network-counts a { padding: 10px 16px; background: #fff; border: 1px solid var(--ph-line); border-radius: 22px; text-decoration: none; font-weight: 650; }
.network-counts a:hover { border-color: var(--ph-purple); }
.network-table { overflow: auto; background: #fff; border: 1px solid var(--ph-line); border-radius: 14px; }
.network-table table { border-collapse: collapse; width: 100%; text-align: left; }
.network-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--ph-muted); background: #f6f7fb; }
.network-table th, .network-table td { padding: 13px 14px; border-bottom: 1px solid var(--ph-line); vertical-align: top; }
.network-table th:nth-child(1) { width: 24%; }
.network-table th:nth-child(2) { width: 24%; }
.network-table th:nth-child(3) { width: 12%; white-space: nowrap; }
.network-table th:nth-child(4) { width: 40%; }
.network-shell dl { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 3fr); gap: 10px; }
.network-shell dd { margin: 0; }
.network-agreement-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; padding: 1.1rem; border: 1px solid var(--ph-line); border-radius: 12px; background: #fff; }
.network-hash { overflow-wrap: anywhere; font-size: .85rem; }

/* Entry choices */
.network-intents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.network-intent { display: block; text-decoration: none !important; color: var(--ph-navy); }
.network-intent h2 { font-size: 24px; }
.network-intent span { color: var(--ph-navy); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.network-intent:hover { border-color: var(--ph-purple); }
.network-intents .network-intent { display: flex; flex-direction: column; margin: 12px 0; padding: 26px; box-shadow: 0 5px 20px #10213c06; transition: border-color .15s, box-shadow .15s; }
.network-intent h3 { font-size: 22px; line-height: 1.35; margin: 20px 0 8px; }
.network-intent p { margin: 0 0 20px; color: var(--ph-muted); }
.network-intent > span:last-child { margin-top: auto; }
.network-intent:hover { box-shadow: 0 8px 24px #6c5ce714; }
.network-intent .network-intent-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: #f0edff; color: #433594; text-decoration: none; }
.network-intent-icon svg { width: 29px; height: 29px; }

/* Welcome and steps */
.network-welcome { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: center; margin: 20px 0 44px; }
.network-welcome .network-lead { max-width: 650px; line-height: 1.5; }
.network-start-note { padding: 24px; border: 1px solid #d9d2fb; border-left: 5px solid var(--ph-purple); border-radius: 14px; background: #fff; }
.network-start-note h2 { font-size: 21px; margin: 14px 0 8px; }
.network-start-note p:last-child { margin-bottom: 0; }
.network-pill { display: inline-block; padding: 5px 12px; border-radius: 30px; background: #f0edff; border: 1px solid #d8d2f7; color: #433594; font-size: 13px; font-weight: 700; line-height: 1.6; }
.network-next-steps { margin: 44px 0 28px; padding: 28px 0; border-top: 1px solid var(--ph-line); }
.network-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; padding-left: 24px; }
.network-steps li { padding-left: 4px; }
.network-steps li::marker { color: var(--ph-orange); font-weight: 800; }
.network-steps strong, .network-steps span { display: block; }
.network-steps span { color: var(--ph-muted); font-size: 15px; margin-top: 6px; }

/* Enquiry form */
.network-selection { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.network-enquiry-form { max-width: 900px; }
.network-shell .network-form-section { min-inline-size: 0; margin: 24px 0 32px; padding: 16px 22px 24px; }
.network-form-section legend { font-size: 20px; }
.network-form-section > p, .network-form-section section > p { max-width: 72ch; }
.network-form-section .network-grid label { margin-top: 10px; }
.network-submit-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.network-enquiry-form .input-validation-error { border-color: #a21c25 !important; }
.network-enquiry-form .network-errors:focus { outline: 3px solid var(--ph-purple); outline-offset: 6px; }
.network-received { max-width: 850px; margin-inline: auto; }
.network-received .network-start-note { margin: 28px 0; }
.network-field { margin: 16px 0; }
.network-shell .network-field > label { margin: 0 0 7px; }
.network-field .network-hint { margin-top: 7px; }

/* Enquiry conversations */
.network-conversation-heading { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; flex-wrap: wrap; }
.network-conversation { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.network-message { align-self: flex-start; max-width: 90%; min-width: 0; padding: 16px 20px; border: 1px solid var(--ph-line); border-radius: 14px; background: #fff; }
.network-message-own { align-self: flex-end; background: #f0edff; border-color: #d8d2f7; }
.network-message-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-size: 14px; color: var(--ph-muted); }
.network-message-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 0; }
.network-message:focus-within { outline: 2px solid var(--ph-purple); }

@media (max-width: 800px) {
    .network-intents { grid-template-columns: 1fr; gap: 0; }
    .network-welcome { grid-template-columns: 1fr; gap: 20px; margin-bottom: 30px; }
    .network-steps { grid-template-columns: 1fr; gap: 20px; }
    .network-intents .network-intent { padding: 24px; }
    .network-start-note { padding: 20px; }
}
@media (max-width: 650px) {
    .network-site { padding: 24px 0 56px; }
    .network-grid { grid-template-columns: 1fr; gap: 0; }
    .network-card { padding: 18px; }
    .network-shell dl { grid-template-columns: 1fr; gap: 3px; }
    .network-shell dd { margin-bottom: 12px; }
    .network-table table { min-width: 650px; }
    .network-header .network-subnav a { padding: 0 12px; font-size: 13px; }
    .network-container { padding: 0 16px; }
}
@media (max-width: 650px) {
    .network-table { overflow: visible; }
    .network-table table { min-width: 0; }
    .network-table caption { display: block; text-align: left; margin-bottom: 16px; }
    .network-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .network-table table, .network-table tbody, .network-table tr, .network-table td { display: block; width: 100%; }
    .network-table tr { padding: 16px 14px; border-bottom: 1px solid var(--ph-line); }
    .network-table td { padding: 8px 0; border: 0; }
    .network-table td:before { content: attr(data-label); display: block; font-weight: 700; margin-bottom: 4px; }
}
@media (max-width: 450px) {
    .network-shell .network-form-section { padding: 12px 14px 20px; }
    .network-submit-row button { width: 100%; }
    .network-submit-row { gap: 12px; }
    .network-form-section legend { font-size: 18px; }
    .network-message { max-width: 100%; padding: 14px; }
    .network-conversation-heading { gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .network-intents .network-intent { transition: none; }
}

/* Progress strip: where the person is in the partnership steps. */
.network-progress { margin: 22px 0 8px; }
.network-progress ol { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; }
.network-progress li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--ph-line); border-radius: 12px; font-size: 14px; font-weight: 650; color: var(--ph-muted); }
.network-progress-mark { display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: #eef0f6; color: var(--ph-muted); font-size: 13px; font-weight: 800; }
.network-progress li.is-done { color: var(--ph-navy); border-color: #bfe0cd; background: #f3faf6; }
.network-progress li.is-done .network-progress-mark { background: #24724a; color: #fff; }
.network-progress li.is-current { color: var(--ph-navy); border-color: var(--ph-purple); box-shadow: 0 4px 16px #6c5ce714; }
.network-progress li.is-current .network-progress-mark { background: var(--ph-purple); color: #fff; }
@media (max-width: 800px) { .network-progress ol { grid-template-columns: 1fr; gap: 8px; } }

/* Older standalone organisation pages: same clear, rounded form fields as the rest of the platform. */
.network-body main input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .network-body main textarea, .network-body main select {
    border: 1px solid #b9c2d3; border-radius: 9px; background: #fff; color: #0b1633; min-height: 48px; }
.network-body main input:focus, .network-body main textarea:focus, .network-body main select:focus { border-color: #6c5ce7; outline: 3px solid #6c5ce733; }
.network-body main button { border-radius: 9px; font-weight: 700; min-height: 48px; }
