/* ============================================================
   Spigot Proposal — Client-Facing Template
   Builder-agnostic. Uses Amsi Pro (loaded by theme via wp_head).
   ============================================================ */

/* ── Base ────────────────────────────────────────────────── */

:root {
    /* Single source of truth for all horizontal padding */
    --sp-x: 64px;
    /* Vertical rhythm for full sections vs tight/band sections */
    --sp-py:      88px;
    --sp-py-band: 72px;
    --sp-py-tight: 56px;
}

html {
    scroll-behavior: smooth;
}

.spigot-proposal-body {
    --sp-width: 960px;
    --bg-base: #F9F7F6;
    background: var(--bg-base);
    margin: 0;
    padding: 0;
    color: var(--sp-text);
    font-size: var(--sp-font-base);
    overflow-x: hidden;
}

.spigot-proposal-body *,
.spigot-proposal-body *::before,
.spigot-proposal-body *::after {
    box-sizing: border-box;
}

/* Apply Amsi globally — falls back to system sans if theme hasn't loaded it */
.spigot-proposal-body,
.spigot-proposal-body h1,
.spigot-proposal-body h2,
.spigot-proposal-body h3,
.spigot-proposal-body h4,
.spigot-proposal-body p,
.spigot-proposal-body input,
.spigot-proposal-body textarea,
.spigot-proposal-body button,
.spigot-proposal-body label {
    font-family: var(--sp-font-family);
}

/* ── Doc Layout ─────────────────────────────────────────── */

.sp-doc-layout {
    padding: 0;
}

.sp-doc-layout__inner {
    max-width: none;
    margin: 0 auto;
    display: block;
}

.sp-doc-main {
    min-width: 0;
}

/* ── Inner wrapper — aligned to hero width ───────────────── */

.sp-inner {
    max-width: calc(var(--sp-width) + (var(--sp-x) * 2));
    margin: 0 auto;
    padding: 0 var(--sp-x);
}

/* ── Document Nav ───────────────────────────────────────── */

.sp-doc-nav {
    position: sticky;
    top: 0;
    width: 100%;
    overflow-x: auto;
    padding: 10px var(--sp-x);
    background: var(--sp-bg-manual);
    border-bottom: 1px solid var(--sp-border);
    box-shadow: 0 0 10px 0 rgba(0,0,0,.125);
    border-radius: 0;
    z-index: 20;
}

.admin-bar .sp-doc-nav {
    top: 32px;
}

.sp-doc-nav__label {
    display: none;
}

.sp-doc-nav__list {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 6px;
    justify-content: center;
    white-space: nowrap;
}

.sp-doc-nav__list a {
    display: block;
    text-decoration: none;
    color: var(--sp-dark);
    font-size: var(--sp-font-sm);
    line-height: 1.3;
    padding: 7px 10px;
    border-radius: var(--sp-radius-sm);
}

.sp-doc-nav__list a:hover {
    background: var(--sp-bg-soft);
}

.sp-doc-nav__list a.is-active {
    background: var(--sp-ex-dark);
    color: #fff;
    font-weight: var(--sp-weight-bold);
}

/* Back link to the client hub — pinned left of the centered section pills */
.sp-doc-nav__list .sp-doc-nav__hub {
    margin-right: auto;
}

.sp-doc-nav__list .sp-doc-nav__hub a {
    border: 1px solid var(--sp-border);
}

.spigot-proposal-body [id] {
    scroll-margin-top: 72px;
}

/* ── Hero ────────────────────────────────────────────────── */

.sp-hero {
    background: var(--sp-dark);
    color: #fff;
    padding: var(--sp-py) var(--sp-x) calc(var(--sp-py) + 8px);
    position: relative;
}

.sp-hero__inner {
    max-width: var(--sp-width);
    margin: 0 auto;
}

.sp-hero__logo {
    /* Explicit height, not max-height: the 2026 mark's viewBox is tight
       (123x34) where the old one carried padding, so a max- rule would
       render it at its small natural size. */
    height: 46px;
    width: auto;
    display: block;
    margin-bottom: 60px;
}

.sp-hero__logo--print { display: none; }

.sp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-ex-dark);
    font-size: var(--sp-font-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sp-blue);
    margin: 0 0 16px;
    font-weight: var(--sp-weight-bold);
}

.sp-hero__title em,
.sp-section__heading em,
.sp-band__text em {
    /* Bogue runs optically smaller than Boston at display sizes. */
    font-size: 1.06em;
    letter-spacing: -0.005em;
}

.sp-hero__title {
    font-size: var(--sp-font-hero);
    font-weight: var(--sp-weight-bold);
    line-height: 1.05;
    margin: 0 0 32px;
    color: #fff;
    max-width: 780px;
}

.sp-hero__meta {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 28px;
    margin-top: 40px;
}

.sp-hero__meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-hero__meta-label {
    font-size: var(--sp-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sp-blue);
    font-weight: var(--sp-weight-bold);
}

.sp-hero__meta-value {
    font-size: var(--sp-font-lg);
    font-weight: var(--sp-weight-bold);
    color: rgba(255,255,255,0.88);
}

/* ── Content sections ────────────────────────────────────── */

.sp-section {
    padding: var(--sp-py) 0;
}

.sp-section--tight {
    padding: var(--sp-py-tight) 0;
}

.sp-section--alt {
    background: var(--sp-bg-soft);
}

.sp-section__label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: var(--sp-font-xs);
    line-height: 1.5;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sp-blue);
    font-weight: var(--sp-weight-bold);
    margin: 0 0 14px;
    padding: 3px 10px;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-ex-dark);
}

.sp-section__heading {
    font-size: var(--sp-font-section-heading);
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
    margin: 0 0 40px;
    line-height: 1.15;
}

.sp-section__heading--sm {
    font-size: var(--sp-font-section-subhead);
    margin-bottom: 28px;
}

/* ── Parallax band ───────────────────────────────────────── */

.sp-band {
    background: var(--sp-dark);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    padding: var(--sp-py-band) var(--sp-x);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.sp-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(21, 36, 54, 0.25);
}

.sp-band__inner {
    max-width: var(--sp-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.sp-band__label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-ex-dark);
    font-size: var(--sp-font-2xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sp-blue);
    font-weight: var(--sp-weight-bold);
    margin: 0 0 12px;
}

.sp-band__text {
    font-size: var(--sp-font-band-heading);
    font-weight: var(--sp-weight-bold);
    color: #fff;
    max-width: 700px;
    line-height: 1.35;
    margin: 0;
}

.sp-band--thin {
    padding: var(--sp-py-tight) var(--sp-x);
}

/* Image band — taller to show parallax */
.sp-band--image {
    min-height: 320px;
    padding: var(--sp-py) var(--sp-x);
}

/* Slim dark divider between sections — no text content */
.sp-band--divider {
    padding: 0;
    min-height: 6px;
    background: var(--sp-dark);
    background-attachment: initial;
}
.sp-band--divider::before { display: none; }

/* ── Prose ──────────────────────────────────────────────── */

.sp-prose {
    font-size: var(--sp-font-base);
    line-height: 1.75;
    color: var(--sp-text);
}

.sp-prose p { margin: 0 0 1.2em; }
.sp-prose p:last-child { margin-bottom: 0; }

.spigot-proposal-body .sp-prose h2 {
    display: block;
    font-size: var(--sp-font-prose-h2) !important;
    font-weight: var(--sp-weight-bold) !important;
    color: var(--sp-dark);
    margin: 1.5em 0 0.5em;
    line-height: 1.2;
}

.spigot-proposal-body .sp-prose h3 {
    display: block;
    font-size: var(--sp-font-prose-h3) !important;
    font-weight: var(--sp-weight-bold) !important;
    color: var(--sp-dark);
    margin: 1.3em 0 0.4em;
    line-height: 1.25;
}

.spigot-proposal-body .sp-prose h4 {
    display: block;
    font-size: var(--sp-font-prose-h4) !important;
    font-weight: var(--sp-weight-bold) !important;
    color: var(--sp-dark);
    margin: 1.2em 0 0.3em;
}

.sp-prose ul,
.sp-prose ol {
    margin: 0 0 1.2em 1.4em;
    padding-left: 1.2em;
}

.sp-prose li {
    display: list-item;
    margin-bottom: 0.4em;
    line-height: 1.65;
}

.sp-prose ul li { list-style: disc; }
.sp-prose ol li { list-style: decimal; }

.sp-prose strong { font-weight: var(--sp-weight-bold); color: var(--sp-dark); }
.sp-prose em     { font-style: italic; }

.sp-prose a {
    color: var(--sp-mid);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sp-prose blockquote {
    border-left: 4px solid var(--sp-blue);
    margin: 1.5em 0;
    padding: 16px 24px;
    background: var(--sp-bg-soft);
    color: var(--sp-muted);
    font-family: var(--sp-font-serif);
    font-style: italic;
    font-size: var(--sp-font-lg);
    line-height: 1.5;
}

.sp-prose hr {
    border: none;
    border-top: 1px solid var(--sp-border);
    margin: 2em 0;
}

/* Markdown tables. Lighter than the system investment table on purpose —
   these are author-written, so they should read as prose, not as the
   canonical pricing component. */
.sp-prose__table {
    margin: 1.6em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sp-prose__table:first-child { margin-top: 0; }
.sp-prose__table:last-child  { margin-bottom: 0; }

.sp-prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--sp-font-base);
    text-align: left;
}

.sp-prose th {
    padding: 10px 16px;
    border-bottom: 2px solid var(--sp-dark);
    font-size: var(--sp-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
    white-space: nowrap;
}

.sp-prose td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--sp-border);
    vertical-align: top;
}

.sp-prose th:first-child,
.sp-prose td:first-child { padding-left: 0; }

.sp-prose th:last-child,
.sp-prose td:last-child { padding-right: 0; }

.sp-prose tbody tr:last-child td { border-bottom: none; }

/* ── Investment ─────────────────────────────────────────── */

.sp-investment {
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    overflow-x: auto;
    margin-bottom: 40px;
}

.sp-investment__intro {
    margin-bottom: 24px;
}

.sp-investment table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: var(--sp-font-lg);
}

.sp-investment thead tr {
    background: var(--sp-dark);
    color: #fff;
}

.sp-investment th {
    text-align: left;
    padding: 16px 28px;
    font-size: var(--sp-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: var(--sp-weight-bold);
}

.sp-investment td {
    padding: 20px 28px;
    border-bottom: 1px solid var(--sp-border);
    vertical-align: top;
}

.sp-investment td:first-child {
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
}

.sp-investment td:last-child {
    font-weight: var(--sp-weight-bold);
    white-space: nowrap;
}

.sp-investment tbody tr:last-child td {
    border-bottom: none;
}

.sp-investment tbody tr:nth-child(odd) {
    background: var(--sp-bg-soft);
}

.sp-investment__total {
    background: var(--sp-dark) !important;
    color: #fff;
}

.sp-investment__total td {
    font-weight: var(--sp-weight-bold);
    font-size: var(--sp-font-2xl);
    border-bottom: none;
    color: #fff;
}

.sp-investment__total td:last-child {
    color: var(--sp-blue);
    font-size: var(--sp-font-3xl);
}

.sp-investment__rates {
    font-size: var(--sp-font-md);
    color: var(--sp-muted);
    margin: 20px 0 0;
}

/* ── Timeline ───────────────────────────────────────────── */

.sp-timeline-wrap {
    margin-top: 48px;
}

.sp-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 40px;
}

.sp-timeline__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    padding: 18px 16px;
}

.sp-timeline__icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--sp-ex-dark);
    color: transparent;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
}

.sp-timeline__icon::before {
    content: '+';
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: var(--sp-weight-bold);
}

.sp-timeline__notes {
    
}

.sp-timeline__content {
    min-width: 0;
}

.sp-timeline__period {
    margin: 0 0 4px;
    font-size: var(--sp-font-sm);
    font-weight: var(--sp-weight-bold);
    color: var(--sp-blue);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sp-timeline__phase {
    margin: 0 0 6px;
    font-size: var(--sp-font-lg);
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
}

.sp-timeline__text {
    margin: 0;
    font-size: var(--sp-font-sm);
    line-height: 1.55;
    color: var(--sp-muted);
}

.sp-timeline__estimate {
    margin: 8px 0 0;
    font-size: var(--sp-font-xs);
    color: var(--sp-mid);
    font-weight: var(--sp-weight-bold);
    display: none;
}

.sp-timeline__total {
    font-size: var(--sp-font-xl);
    margin: 0 0 12px;
    color: var(--sp-dark);
}

/* ── Timeline graphic ───────────────────────────────────
   Static Gantt built in PHP (sp_timeline_graphic_model). Bars are positioned
   by percentage so it scales with the column; week gridlines come from the
   --sp-gantt-week custom property the template sets per proposal. */

.sp-gantt {
    --sp-gantt-name: 132px;
    margin: 36px 0 0;
    padding: 20px 22px 16px;
    background: #fff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
}

.sp-gantt__axis {
    position: relative;
    height: 22px;
    margin-left: var(--sp-gantt-name);
    border-bottom: 1px solid var(--sp-border);
}

.sp-gantt__tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: var(--sp-font-xs);
    font-weight: var(--sp-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sp-muted);
    white-space: nowrap;
}

.sp-gantt__tick:first-child { transform: none; }

.sp-gantt__rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-gantt__row {
    display: grid;
    grid-template-columns: var(--sp-gantt-name) 1fr;
    align-items: center;
    min-height: 44px;
}

.sp-gantt__name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 14px;
    min-width: 0;
}

.sp-gantt__title {
    font-size: var(--sp-font-md);
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
    line-height: 1.2;
}

.sp-gantt__sub {
    font-size: var(--sp-font-xs);
    color: var(--sp-muted);
    letter-spacing: 0.03em;
}

.sp-gantt__track {
    position: relative;
    height: 44px;
    background-image: repeating-linear-gradient(
        to right,
        var(--sp-border) 0,
        var(--sp-border) 1px,
        transparent 1px,
        transparent var(--sp-gantt-week, 10%)
    );
    background-size: 100% 100%;
}

.sp-gantt__bar {
    position: absolute;
    top: 8px;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 6px;
    color: #fff;
    background: var(--sp-mid);
    box-sizing: border-box;
    overflow: visible;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.sp-gantt__bar--1 { background: #19b8f7; color: var(--sp-dark); }
.sp-gantt__bar--2 { background: #2b9fe0; color: var(--sp-dark); }
.sp-gantt__bar--3 { background: #2b7bb9; }
.sp-gantt__bar--4 { background: #2563eb; }
.sp-gantt__bar--5 { background: #0f2a6b; }

.sp-gantt__label {
    font-size: var(--sp-font-xs);
    font-weight: var(--sp-weight-bold);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Short bars can't hold their label; hang it just outside instead. */
.sp-gantt__bar--label-outside { padding: 0; }
.sp-gantt__bar--label-outside .sp-gantt__label {
    position: absolute;
    left: calc(100% + 8px);
    color: var(--sp-muted);
    overflow: visible;
}
.sp-gantt__bar--label-left .sp-gantt__label {
    left: auto;
    right: calc(100% + 8px);
}

.sp-gantt__caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 10px 0 0 var(--sp-gantt-name);
    padding-top: 10px;
    border-top: 1px solid var(--sp-border);
    font-size: var(--sp-font-xs);
    color: var(--sp-muted);
}

/* Legend under the Gantt: phase name + one-line description, swatch in the
   bar's tone. Carries the scope text the phase cards used to hold. */
.sp-gantt-legend {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 18px;
    row-gap: 8px;
    margin: 18px 0 0;
    font-size: var(--sp-font-sm);
    line-height: 1.55;
}

.sp-gantt-legend__row {
    display: contents;
}

.sp-gantt-legend dt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
    white-space: nowrap;
}

.sp-gantt-legend dd {
    margin: 0;
    color: var(--sp-muted);
}

.sp-gantt-legend__swatch {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.sp-gantt__edge {
    font-weight: var(--sp-weight-bold);
    color: var(--sp-dark);
    white-space: nowrap;
}

.sp-gantt__summary {
    text-align: center;
}

.sp-timeline__deps {
    margin-top: 28px;
    padding: 24px 28px;
    border-left: 3px solid var(--sp-blue);
    background: var(--sp-bg-soft);
    font-size: var(--sp-font-base);
    color: var(--sp-muted);
}

.sp-timeline__deps p { margin: 0 0 8px; font-weight: var(--sp-weight-bold); color: var(--sp-dark); }
.sp-timeline__deps ul { margin: 0; padding-left: 1.2em; }
.sp-timeline__deps li { margin-bottom: 4px; }

.sp-schedule-start {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--sp-border);
}


@media (max-width: 782px) {
    .admin-bar .sp-doc-nav {
        top: 46px;
    }
}

/* ── Next Steps ─────────────────────────────────────────── */

.sp-next-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-next-steps__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-next-steps__icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--sp-blue);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-next-steps__icon::before {
    content: '+';
    color: var(--sp-blue-ui-dk);
    font-weight: var(--sp-weight-bold);
    font-size: 16px;
    line-height: 0;
}

.sp-next-steps__text {
    margin: 0;
    font-size: var(--sp-font-base);
    line-height: 1.55;
    color: var(--sp-dark);
}

/* ── Confirm by callout ──────────────────────────────────── */

.sp-confirm-callout {
    background: #fff;
    color: var(--sp-dark);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    padding: 26px 30px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 32px;
}

.sp-confirm-callout__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: var(--sp-radius-full);
    background: var(--sp-blue);
    position: relative;
}

.sp-confirm-callout__icon::before {
    content: "\2192" ;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: var(--sp-font-2xl);
    font-weight: var(--sp-weight-bold);
    line-height: 1;
}

.sp-confirm-callout__text {
    font-size: var(--sp-font-lg);
    line-height: 1.5;
    margin: 0;
}

.sp-confirm-callout__date {
    color: var(--sp-mid);
    font-weight: var(--sp-weight-bold);
}

/* ── Service agreement ──────────────────────────────────── */

.sp-section--agreement {
    background: #fff;
}

.sp-agreement {
    position: relative;
    border: 1px solid var(--sp-border);
    overflow: hidden;
    border-radius: var(--sp-radius-md);
    background: #fff;
    box-shadow: var(--sp-shadow-sm, 0 8px 22px rgba(15, 24, 32, 0.08));
}

.sp-agreement::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.96));
    backdrop-filter: blur(1.5px);
}

.sp-agreement__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--sp-bg-soft);
    color: var(--sp-dark);
    border-bottom: 1px solid var(--sp-border);
    padding: 12px 16px 12px 24px;
    font-size: var(--sp-font-sm);
    font-weight: var(--sp-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Prints the agreement on its own (see spProposalPrint in the template). */
.sp-agreement__print {
    border: 1px solid var(--sp-border);
    background: #fff;
    color: var(--sp-muted);
    border-radius: var(--sp-radius-sm);
    padding: 6px 10px;
    font: inherit;
    font-size: var(--sp-font-xs);
    font-weight: var(--sp-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.sp-agreement__print:hover {
    color: var(--sp-dark);
    border-color: var(--sp-dark);
}

.sp-agreement__body {
    max-height: 420px;
    overflow-y: auto;
    padding: 28px;
    font-size: var(--sp-font-md);
    line-height: 1.8;
    color: var(--sp-muted);
    background: white;
}

.sp-agreement__body p { margin: 0 0 1em; }

.sp-agreement__body h2,
.sp-agreement__body h3,
.sp-agreement__body h4 {
    color: var(--sp-dark);
    font-weight: var(--sp-weight-bold);
    line-height: 1.25;
    margin: 1.4em 0 0.5em;
}

.sp-agreement__body h2 { font-size: var(--sp-font-2xl); }
.sp-agreement__body h3 { font-size: var(--sp-font-xl); }
.sp-agreement__body h4 { font-size: var(--sp-font-lg); }

.sp-agreement__body ul,
.sp-agreement__body ol {
    margin: 0 0 1em 1.4em;
    padding-left: 1.2em;
}

.sp-agreement__body li { display: list-item; margin-bottom: 0.35em; }
.sp-agreement__body strong { color: var(--sp-dark); font-weight: var(--sp-weight-bold); }

/* ── Signature ──────────────────────────────────────────── */

.sp-signature-wrap {
    background: var(--sp-dark);
    padding: var(--sp-py) var(--sp-x);
    color: #fff;
}

.sp-signature-inner {
    max-width: var(--sp-width);
    margin: 0 auto;
}

.sp-signature-inner .sp-section__label { color: var(--sp-blue); }
.sp-signature-inner .sp-section__heading { color: #fff; margin-bottom: 12px; }

.sp-signature__sub {
    font-size: var(--sp-font-lg);
    color: rgba(255,255,255,0.65);
    margin: 0 0 40px;
}

.sp-sign-field {
    margin-bottom: 20px;
    max-width: 480px;
}

.sp-sign-field label {
    display: block;
    font-size: var(--sp-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sp-blue);
    font-weight: var(--sp-weight-bold);
    margin-bottom: 8px;
}

.sp-sign-field input[type="text"] {
    width: 100%;
    font-size: var(--sp-font-xl);
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.sp-sign-field input[type="text"]::placeholder { color: rgba(255,255,255,0.35); }
.sp-sign-field input[type="text"]:focus { border-color: var(--sp-blue); background-color: var(--sp-dark);}

.sp-sign-check {
    max-width: 560px;
    margin-bottom: 28px;
    font-size: var(--sp-font-md);
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.sp-sign-check label {
    display: flex;
    gap: 12px;
    cursor: pointer;
    align-items: flex-start;
}

.sp-sign-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--sp-blue);
}

.sp-sign-btn {
    background: var(--sp-blue);
    color: var(--sp-dark);
    border: none;
    padding: 16px 40px;
    font-size: var(--sp-font-base);
    font-weight: var(--sp-weight-bold);
    font-family: inherit;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.15s;
}

.sp-sign-btn:hover { opacity: 0.85; }
.sp-sign-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.sp-sign-note {
    font-size: var(--sp-font-sm);
    color: rgba(255,255,255,0.35);
    margin: 14px 0 0;
}

.sp-sign-error {
    color: #f87171;
    font-size: var(--sp-font-md);
    margin: 12px 0 0;
}

/* ── Signed confirmation ─────────────────────────────────── */

.sp-signed-confirmation {
    max-width: 100%;
    padding: 34px 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--sp-radius-md);
    box-shadow: var(--sp-shadow-md, 0 18px 44px rgba(4, 106, 195, 0.12));
}

.sp-signed-confirmation__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.sp-signed-confirmation__check {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-blue);
    color: var(--sp-dark);
    font-size: var(--sp-font-xl);
    font-weight: var(--sp-weight-bold);
    line-height: 1;
}

.sp-signed-confirmation h2 {
    font-size: var(--sp-font-signed-heading);
    font-weight: var(--sp-weight-bold);
    color: #fff;
    margin: 0;
}

.sp-signed-confirmation p {
    font-size: var(--sp-font-xl);
    color: rgba(255,255,255,0.75);
    margin: 4px 0;
}

.sp-signed-confirmation__date {
    font-size: var(--sp-font-md) !important;
    color: rgba(255,255,255,0.4) !important;
}

.sp-signed-confirmation__note {
    font-size: var(--sp-font-md) !important;
    line-height: 1.6;
    color: rgba(255,255,255,0.62) !important;
    margin-top: 18px !important;
    max-width: 560px;
}

.sp-signed-confirmation__print {
    border: 1px solid rgba(255,255,255,0.22);
    background: transparent;
    color: #fff;
    border-radius: var(--sp-radius-sm);
    padding: 9px 12px;
    margin-top: 18px;
    font: inherit;
    font-size: var(--sp-font-sm);
    font-weight: var(--sp-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.sp-signed-confirmation__print:hover {
    border-color: rgba(255,255,255,0.55);
}

.sp-signed-confirmation__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.sp-signed-confirmation__actions .sp-signed-confirmation__print {
    margin-top: 0;
}

/* ── Footer ─────────────────────────────────────────────── */

.sp-footer {
    background: #0d1a27;
    color: rgba(255,255,255,0.4);
    padding: 28px var(--sp-x);
    font-size: var(--sp-font-sm);
    letter-spacing: 0.05em;
}

.sp-footer__inner {
    max-width: var(--sp-width);
    margin: 0 auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Responsive ─────────────────────────────────────────── */

/* Tablet — reduce gutter, collapse grids */
@media (max-width: 900px) {
    :root {
        --sp-x:       32px;
        --sp-py:      64px;
        --sp-py-band: 52px;
        --sp-py-tight: 44px;
    }

    .sp-investment th,
    .sp-investment td { padding: 14px 20px; }

    .sp-confirm-callout { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 1420px) {
    .sp-doc-nav__list {
        justify-content: flex-start;
    }
}

/* Mobile — tighten further */
@media (max-width: 600px) {
    .sp-gantt-legend {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }
    .sp-gantt-legend__row { display: block; }
    .sp-gantt-legend dt { margin-bottom: 2px; white-space: normal; }

    .sp-gantt {
        --sp-gantt-name: 0px;
        padding: 16px 14px 12px;
    }
    .sp-gantt__row {
        grid-template-columns: 1fr;
        padding: 6px 0;
    }
    .sp-gantt__name {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        padding: 0 0 4px;
    }
    .sp-gantt__track { height: 32px; }
    .sp-gantt__bar { top: 4px; height: 24px; padding: 0 8px; }
    .sp-gantt__summary { display: none; }

    /* Phone placement: start from "inside" and re-apply with the --m- thresholds. */
    .sp-gantt__bar .sp-gantt__label {
        position: static;
        color: inherit;
        overflow: hidden;
    }
    .sp-gantt__bar--m-outside { padding: 0; }
    .sp-gantt__bar--m-outside .sp-gantt__label {
        position: absolute;
        left: calc(100% + 8px);
        right: auto;
        color: var(--sp-muted);
        overflow: visible;
    }
    .sp-gantt__bar--m-left .sp-gantt__label {
        left: auto;
        right: calc(100% + 8px);
    }

    /* The axis can't fit every label at this width: drop the origin month when
       another month tick sits right beside it, and show every other week. */
    .sp-gantt--dates .sp-gantt__tick--origin:not(:only-child) { display: none; }
    .sp-gantt--weeks .sp-gantt__tick:nth-child(even) { display: none; }

    :root {
        --sp-x:        20px;
        --sp-py:       48px;
        --sp-py-band:  40px;
        --sp-py-tight: 36px;
    }

    .sp-investment table { min-width: 680px; }

    .sp-timeline { grid-template-columns: 1fr; }
    .sp-sign-field { max-width: 100%; }
}

/* ── Print ──────────────────────────────────────────────────
   The proposal's @media print rules live in proposal-print.css and are
   INLINED into the page head by single-spigot-proposal.php.

   They are deliberately not in this file: spigotdesign.com runs LiteSpeed
   with UCSS (Unique CSS), which rewrites every enqueued stylesheet into a
   tree-shaken bundle built from a headless render of the page. Print-only
   rules match nothing in that render, so UCSS drops them — and it merged
   `.sp-agreement { break-inside: auto }` into a `break-inside: avoid`
   group, inverting the 1.26.0 fix. Inline <style> is not part of the file
   set UCSS rewrites, so inlining is what makes print survive the CDN.
   Keep print rules in proposal-print.css. See 1.26.3 in CLAUDE.md. */
