/* PRPSure public brand — navy field, paper page, gold accent only. */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.55;
}

img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: var(--navy);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--gold-deep);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3rem;
    z-index: 80;
    padding: 0.4rem 0.75rem;
    background: var(--gold);
    color: var(--navy-ink);
    font-weight: 600;
}

.skip-link:focus {
    top: 0.75rem;
}

.wrap {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

.num {
    font-variant-numeric: tabular-nums;
}

/* —— Masthead —— */

.masthead {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--navy);
    color: #f3efe4;
    box-shadow: 0 1px 0 rgba(201, 162, 39, 0.35);
}

.masthead__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1rem;
    padding: 0.7rem 0;
}

.wordmark {
    font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: inherit;
    line-height: 1;
}

.wordmark__prp {
    color: #f3efe4;
}

.wordmark__sure {
    color: var(--gold);
}

.wordmark--foot .wordmark__prp {
    color: #f3efe4;
}

.masthead__tagline {
    margin: 0;
    flex: 1 1 12rem;
    color: rgba(243, 239, 228, 0.72);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.nav-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-burger {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 8px;
    color: #f3efe4;
    cursor: pointer;
    user-select: none;
}

.nav-burger__bars {
    width: 1.05rem;
    height: 0.75rem;
    background:
        linear-gradient(#f3efe4, #f3efe4) 0 0 / 100% 2px no-repeat,
        linear-gradient(#f3efe4, #f3efe4) 0 50% / 100% 2px no-repeat,
        linear-gradient(#f3efe4, #f3efe4) 0 100% / 100% 2px no-repeat;
}

.nav-burger__text {
    font-size: 0.82rem;
    font-weight: 600;
}

.site-nav {
    display: none;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0 0.55rem;
}

.site-nav a {
    color: #f3efe4;
    text-decoration: none;
    padding: 0.45rem 0.2rem;
    border-bottom: 1px solid rgba(215, 226, 239, 0.12);
    font-size: 0.98rem;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--gold);
}

.nav-check:checked ~ .site-nav {
    display: flex;
}

.nav-check:focus-visible + .nav-burger {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (min-width: 1100px) {
    .nav-burger {
        display: none;
    }

    .masthead__bar {
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .masthead__tagline {
        flex: 0 1 auto;
        max-width: 11rem;
    }

    .site-nav {
        display: flex;
        flex: 1 1 auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.15rem 0.85rem;
        padding: 0;
    }

    .site-nav a {
        border: 0;
        padding: 0.2rem 0;
        font-size: 0.86rem;
        font-weight: 600;
        letter-spacing: 0.01em;
    }
}

/* —— Page chrome —— */

.hero {
    background: var(--navy);
    color: #f3efe4;
    padding: 3.2rem 0 3.6rem;
}

.hero--short {
    padding: 2.4rem 0 2.6rem;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.display {
    margin: 0 0 0.85rem;
    font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
    font-size: clamp(1.85rem, 4.6vw, 3.15rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    max-width: 18ch;
}

.display--wide {
    max-width: 22ch;
}

.rule {
    width: 4.5rem;
    height: 3px;
    margin: 0 0 1.15rem;
    background: var(--gold);
    border: 0;
}

.deck {
    margin: 0;
    max-width: 42rem;
    color: rgba(243, 239, 228, 0.88);
    font-size: 1.05rem;
}

.page {
    padding: 2.4rem 0 3.6rem;
}

.lede {
    margin: 0 0 1.4rem;
    max-width: 40rem;
    color: var(--muted);
}

.prose {
    max-width: 40rem;
}

.prose h2,
.section-h {
    margin: 2rem 0 0.65rem;
    font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--navy);
}

.prose p,
.prose li {
    color: var(--ink);
}

.prose ul {
    padding-left: 1.15rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn--gold {
    background: var(--gold);
    color: var(--navy-ink);
}

.btn--gold:hover {
    background: var(--gold-deep);
    color: var(--navy-ink);
}

.btn--ghost {
    background: transparent;
    border-color: rgba(201, 162, 39, 0.7);
    color: #f3efe4;
}

.btn--ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn--navy {
    background: var(--navy);
    color: #f3efe4;
}

.btn--navy:hover {
    background: var(--navy-mid);
    color: #f3efe4;
}

.btn--line {
    background: var(--white);
    border-color: var(--line);
    color: var(--navy);
}

.btn--line:hover {
    border-color: var(--gold);
    color: var(--navy);
}

/* —— Cards / pillars —— */

.pillar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    .pillar-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pillar-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1.3rem 1.35rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}

.pillar-card:hover {
    border-color: var(--gold);
    color: inherit;
}

.pillar-card__kicker {
    margin: 0 0 0.35rem;
    color: var(--gold-deep);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pillar-card h2,
.pillar-card h3 {
    margin: 0 0 0.45rem;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.35rem;
    color: var(--navy);
}

.pillar-card p {
    margin: 0 0 0.85rem;
    color: var(--muted);
    flex: 1;
}

.pillar-card__meta {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
}

.formula-band {
    margin: 2.4rem 0 0;
    padding: 1.35rem 1.4rem;
    background: var(--navy-ink);
    color: #f3efe4;
    border-radius: var(--radius-lg);
}

.formula-band p {
    margin: 0;
}

.formula-band .eq {
    margin-top: 0.45rem;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    color: var(--gold);
    overflow-wrap: anywhere;
}

.formula-band a {
    color: var(--gold);
}

.trust-note {
    margin-top: 1.75rem;
    padding: 1rem 1.15rem;
    border-left: 3px solid var(--gold);
    background: var(--white);
}

.trust-note p {
    margin: 0;
    color: var(--muted);
}

/* —— Tables —— */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

table.data {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
}

table.data th,
table.data td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

table.data th {
    background: var(--navy);
    color: #f3efe4;
    font-weight: 600;
}

table.data tr:last-child td {
    border-bottom: 0;
}

.empty-ledger {
    margin: 0;
    padding: 1.4rem 1.15rem;
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--ink);
}

.example-block {
    margin: 1.25rem 0 1.75rem;
    padding: 1.1rem 1.15rem 1.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.example-block h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    color: var(--navy);
}

.example-block .result {
    margin: 0.55rem 0 0;
    font-weight: 600;
    color: var(--navy);
}

.install-note {
    margin: 1rem 0 1.4rem;
    padding: 0.85rem 1rem;
    background: #fff8e8;
    border: 1px solid #ead7a0;
    border-radius: var(--radius);
    color: var(--navy);
}

/* —— Forms —— */

.form {
    max-width: 36rem;
}

.field {
    margin-bottom: 1rem;
}

.field label,
.field-label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: var(--navy);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

.field textarea {
    min-height: 8rem;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.95rem;
}

.check input {
    width: auto;
    margin-top: 0.3rem;
}

.errors,
.flash {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
}

.errors {
    background: #f8ecec;
    color: var(--bad);
}

.flash--ok {
    background: #e7f2eb;
    color: var(--ok);
}

.flash--warn {
    background: #fff4e8;
    color: var(--warn);
}

/* —— Calculator —— */

.calc-layout {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .calc-layout {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: start;
    }
}

.calc-panel,
.calc-out {
    padding: 1.15rem 1.15rem 1.3rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.calc-out {
    position: sticky;
    top: 5.2rem;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 560px) {
    .calc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.kpi-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
    .kpi-row {
        grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.8fr)) auto;
        align-items: end;
    }
}

.kpi-row .check {
    font-size: 0.82rem;
    color: var(--muted);
}

.calc-out dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
}

.calc-out dt {
    color: var(--muted);
}

.calc-out dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--navy);
}

.calc-out .score {
    color: var(--gold-deep);
    font-size: 1.35rem;
}

.calc-out .billable {
    font-size: 1.35rem;
}

.outcome {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--navy);
    color: #f3efe4;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.outcome--reward {
    background: var(--ok);
}

.outcome--floor {
    background: var(--warn);
}

.disclaimer {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.calc-errors {
    margin: 0 0 0.85rem;
    color: var(--bad);
    font-size: 0.92rem;
}

.kpi-break th,
.kpi-break td {
    font-size: 0.88rem;
}

/* —— Auth shell —— */

.auth-card {
    width: min(28rem, 100%);
    margin: 0 auto;
    padding: 1.4rem 1.25rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* —— Footer —— */

.site-foot {
    background: var(--navy-ink);
    color: rgba(243, 239, 228, 0.82);
    padding: 2.4rem 0 1.4rem;
}

.site-foot a {
    color: #f3efe4;
}

.site-foot a:hover {
    color: var(--gold);
}

.site-foot__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem 1rem;
}

@media (min-width: 800px) {
    .site-foot__grid {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }
}

.site-foot__h {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.site-foot__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-foot__list li {
    margin: 0.25rem 0;
}

.site-foot__tag,
.site-foot__support {
    margin: 0.45rem 0 0;
    font-size: 0.92rem;
}

.site-foot__fine {
    margin: 1.6rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(215, 226, 239, 0.12);
    font-size: 0.82rem;
    color: rgba(243, 239, 228, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 360px) {
    .wrap {
        width: calc(100% - 1.25rem);
    }

    .display {
        font-size: 1.7rem;
    }
}
