@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #201519;
    --ink-soft: #44323a;
    --ink-muted: #74636a;
    --ink-faint: #95868b;
    --coral: #76283e;
    --coral-light: #99465b;
    --coral-pale: #f4e9ec;
    --gold: #76283e;
    --gold-light: #b66c7e;
    --gold-dark: #541729;
    --gold-pale: #f4e9ec;
    --sage: #58645d;
    --sage-light: #849289;
    --sage-pale: #edf0ed;
    --sky: #66747b;
    --sky-light: #9aa7ac;
    --sky-pale: #edf0f1;
    --surface: #fffdfa;
    --surface-warm: #f5f1ed;
    --surface-mid: #ebe4e1;
    --border: #e4d9d7;
    --border-strong: #cbb9bb;
    --footer-bg: #20171b;
    --hunt: #76283e;
    --hunt-light: #984357;
    --hunt-pale: #f4e9ec;
    --forest: #541729;
    --plum: #76283e;
    --plum-light: #a24d63;
    --plum-pale: #f4e9ec;
    --cream: #fffdfa;
    --cream-dark: #eee5e2;
    --radius-sm: 3px;
    --radius-md: 5px;
    --radius-lg: 7px;
    --shadow-soft: 0 3px 16px rgba(43, 19, 29, .055);
    --shadow-card: 0 10px 30px rgba(43, 19, 29, .09);
    --shadow-elevated: 0 20px 54px rgba(43, 19, 29, .15);
}

html { scroll-behavior: smooth; }
body {
    background: #f5f1ed;
    color: var(--ink);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 1.65;
}
h1, h2, h3, h4, .page-header h1, .card-header h2 {
    color: var(--ink);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.05;
}
::selection { color: #fffdfa; background: #76283e; }
a { text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid rgba(118, 40, 62, .5);
    outline-offset: 3px;
}

nav {
    background: rgba(255, 253, 250, .97);
    border-bottom: 1px solid #e4d9d7;
    box-shadow: 0 3px 16px rgba(43, 19, 29, .045);
    backdrop-filter: blur(12px);
}
nav .container { min-height: 68px; }
.logo {
    color: var(--ink);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: .025em;
}
.brand-wordmark { gap: 2px; }
.brand-partner {
    color: #806d74;
    font-family: 'Manrope', sans-serif;
    font-size: .55rem;
    font-weight: 600;
    letter-spacing: .035em;
}
.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: #76283e;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.logo-mark svg { fill: #fffdfa; }
.logo:hover { color: #76283e; }
.logo:hover .logo-mark { background: #541729; }
.nav-links a, .nex-btn, .nav-all-btn, .mobile-menu-toggle {
    color: #5b4850;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .075em;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #76283e; }
.btn-premium {
    background: #76283e !important;
    border-radius: 3px !important;
    font-weight: 800 !important;
    letter-spacing: .09em !important;
}
.btn-premium:hover { background: #541729 !important; box-shadow: 0 7px 18px rgba(118,40,62,.2) !important; }
.nex-panel, .nav-all-panel, .nav-search-results {
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: 0 18px 42px rgba(43,19,29,.15);
}
.nex-premium { background: #f4e9ec; }
.nex-premium .nex-heading { color: #76283e; }
.nex-cta-premium, .nex-cta-premium:hover { background: #76283e; color: #fffdfa; }

main { padding-top: 38px; }
.container { max-width: 1240px; }
.page-header {
    position: relative;
    margin-bottom: 30px;
    padding: 6px 0 20px 18px;
    border-bottom: 1px solid var(--border);
}
.page-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 22px;
    width: 4px;
    background: #76283e;
}
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); text-transform: uppercase; }
.page-header p { color: var(--ink-muted); font-size: .9rem; }
.card, .chart-container, .feature-card, .pet-card, .stat-card {
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-soft);
}
.card { padding: clamp(20px, 3vw, 32px); }
.card:hover, .feature-card:hover, .pet-card:hover, .stat-card:hover {
    border-color: #cbb9bb;
    box-shadow: var(--shadow-card);
}
.card-header { border-color: var(--border); }
.card-header h2 { font-size: 1.5rem; text-transform: uppercase; }
.btn {
    border-radius: 3px;
    font-family: 'Manrope', sans-serif;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .085em;
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.btn-primary, .btn-premium { background: #76283e; }
.btn-primary:hover, .btn-secondary:hover {
    background: #541729;
    box-shadow: 0 7px 18px rgba(118,40,62,.18);
}
.btn-secondary { background: #302329; }
.btn-sage { background: #58645d; }
.btn-outline { border: 1px solid #bdaeb1; color: var(--ink); }
.btn-outline:hover, .btn-back:hover { background: #201519; border-color: #201519; color: #fffdfa; }
.btn-back {
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    font-size: .68rem;
    font-weight: 800;
}
.btn:hover { transform: translateY(-2px); }

form {
    border-color: var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-card);
}
label {
    color: #55424a;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .085em;
}
input, textarea, select {
    border: 1px solid #ddd1d0;
    border-radius: 3px;
    background: #fbf8f5;
    color: var(--ink);
    font-size: .9rem;
}
input:focus, textarea:focus, select:focus {
    border-color: #76283e;
    background: #fffdfa;
    box-shadow: 0 0 0 3px rgba(118,40,62,.11);
}
input::placeholder, textarea::placeholder { color: #9d9094; }
table { border-color: var(--border); }
th {
    background: #eee8e5;
    color: #5c464f;
    font-weight: 800;
    letter-spacing: .085em;
}
td { background: #fffdfa; color: #44323a; }
tr:hover td { background: #f8f3f0; }
.alert { border-radius: 3px; }
.alert-success { background: #edf0ed; border-color: #58645d; color: #35423a; }
.alert-warning { background: #f4e9ec; border-color: #76283e; color: #541729; }
.alert-danger { background: #f6e7e9; border-color: #76283e; color: #541729; }
.alert-info { background: #edf0f1; border-color: #66747b; color: #39474e; }

.hero {
    background: #24191e;
    border-radius: 5px;
    box-shadow: 0 22px 56px rgba(43,19,29,.2);
    text-align: left;
    padding: clamp(54px, 8vw, 104px) clamp(26px, 8vw, 100px);
}
.color-stripe { background: linear-gradient(90deg, #76283e, #b66c7e, #201519); }
.hero::before {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: 7px;
    height: auto;
    background: #a24d63;
}
.hero::after {
    width: 420px;
    height: 420px;
    right: -150px;
    bottom: -250px;
    border: 1px solid rgba(255,253,250,.14);
    background: transparent;
}
.hero h1 {
    max-width: 850px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: .88;
    text-transform: uppercase;
}
.hero h1 .budget-text { color: #fffdfa; font-style: normal; font-weight: 800; }
.hero p:not(.subtitle) { max-width: 550px; color: #d8cbd0; font-size: .96rem; font-weight: 500; }
.hero .subtitle {
    color: #d39aa8;
    font-family: 'Manrope', sans-serif;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .2em;
}
.hero .btn-primary { background: #9a3b53; }
.hero .btn-outline { border-color: rgba(255,253,250,.42); color: #fffdfa; }
.hero .btn-outline:hover { background: #fffdfa; color: #201519; }
.feature-card {
    border-radius: 4px;
    background: #fffdfa;
}
.feature-card:nth-child(n) { border-top: 3px solid #76283e; }
.feature-card h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.45rem; font-weight: 700; text-transform: uppercase; }
.feature-card p { font-weight: 500; }
.feature-card-number { color: #eadde0 !important; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; }
.plans-grid > div {
    border-radius: 4px !important;
    box-shadow: var(--shadow-soft);
}
.category-item {
    border-radius: 4px;
    background: #f4e9ec !important;
    border-color: #e3cdd3 !important;
}
.category-item:nth-child(n) .category-label { color: #76283e; }
.category-item:hover { box-shadow: var(--shadow-card); }
.pet-card-header { background: #f3e9eb; }
.pet-avatar {
    border-radius: 4px;
    border-color: #d8c5ca;
    color: #76283e;
}
.badge { border-radius: 3px; font-weight: 800; }
.badge-premium { background: #76283e; }
.premium-banner {
    border-radius: 5px;
    background: #24191e;
}
.stat-card { background: #fffdfa !important; }
.stat-card:nth-child(n) { border-color: var(--border); }
.stat-value {
    color: #76283e !important;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 3.15rem;
    font-weight: 700;
}
.stat-label { font-weight: 800; color: #74636a; }
.expense-row { border-color: var(--border); }
.expense-amount { color: #76283e; font-weight: 800; }
.limit-warning {
    background: #f4e9ec;
    border-color: #76283e;
    color: #541729;
}
.summary-box { border-left-color: #76283e; }

footer {
    background: #20171b;
    border-top: 4px solid #76283e;
}
footer a:hover { color: #d39aa8; }
footer p, footer a { font-family: 'Manrope', sans-serif; }

/* Replace inline legacy display fonts and colorful landing-page blocks without
   touching their content, links, or feature availability. */
[style*="Cormorant Garamond"], [style*="Georgia, serif"] {
    font-family: 'Manrope', sans-serif !important;
}
[style*="background: var(--hunt)"],
[style*="background: var(--forest)"],
[style*="background: var(--hunt-light)"] {
    background: #76283e !important;
}
[style*="linear-gradient(145deg, #3D1F52"] {
    background: #24191e !important;
    border: 1px solid #59313d;
}
[style*="border: 2px solid var(--hunt)"] { border-color: #76283e !important; }
[style*="background: var(--gold)"] { background: #76283e !important; }
[style*="border-radius: 16px"] { border-radius: 5px !important; }
[style*="border-radius: 20px"] { border-radius: 3px !important; }
[style*="border-radius: 15px"], [style*="border-radius: 12px"],
[style*="border-radius: 10px"] { border-radius: 4px !important; }
h1[style*="font-weight"], h2[style*="font-weight"], h3[style*="font-weight"] {
    font-weight: 700 !important;
}
/* Retune legacy one-off colors in supporting pages while keeping labels and
   status meaning intact. */
[style*="background:#EBF3F9"], [style*="background:#EDF5EF"],
[style*="background:#FBF5EC"], [style*="background:#FDF0EB"],
[style*="background:#FAEAEA"], [style*="background:#F4EEFA"],
[style*="background:#EAF0FB"], [style*="background:#FBE8F3"],
[style*="background:#E8F5EF"], [style*="background:#F5F3EA"],
[style*="background:#F0EEF5"] {
    background: #f4e9ec !important;
    color: #541729 !important;
}
#errorState { background: #f4e9ec !important; border-radius: 4px !important; }
#resultsHeader { border-radius: 4px !important; }
button[style*="#28a745"], a[style*="#28a745"] { background: #76283e !important; }
[style*="background: linear-gradient(135deg, #3a7d44"] {
    background: linear-gradient(135deg, #76283e, #541729) !important;
}

.auth-page {
    min-height: 100dvh;
    background:
        linear-gradient(135deg, rgba(118,40,62,.07), transparent 50%),
        #f5f1ed;
    padding: 32px 18px;
}
.auth-card {
    border-top: 4px solid #76283e;
    border-radius: 5px;
    background: #fffdfa;
}
.auth-header h1 { font-size: 2.5rem; font-weight: 800; text-transform: uppercase; }
.auth-header p { color: var(--ink-muted); }
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: #76283e;
    color: #fffdfa;
    font-size: 0;
}
.logo-icon::after { content: 'PB'; font: 800 15px 'Barlow Condensed', sans-serif; letter-spacing: .08em; }
.auth-divider { color: var(--ink-muted); }

@media (max-width: 700px) {
    main { padding-top: 25px; }
    nav .container { min-height: 62px; }
    .hero { text-align: left; padding: 58px 25px; }
    .hero h1 { font-size: clamp(3.7rem, 17vw, 6rem); }
    .hero p:not(.subtitle) { margin-left: 0; margin-right: 0; }
    .page-header { margin-bottom: 24px; }
    .page-header h1 { font-size: 2.7rem; }
    .card { padding: 20px; }
    .grid-2 { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
