:root {
    --paper: #efeae3;
    --sheet: #fffcf8;
    --ink: #1a1916;
    --muted: #6f6a62;
    --line: rgba(26, 25, 22, 0.12);
    --copper: #8f3d16;
    --copper-soft: #f3e2d6;
    --stone: #ece7df;
    --good: #1d6b45;
    --good-soft: #e5f3eb;
    --warn: #8a5a10;
    --warn-soft: #f8efd8;
    --bad: #8d342c;
    --bad-soft: #f8e6e3;
    --shadow: 0 30px 70px rgba(40, 28, 16, 0.08);
    --radius: 28px;
    --sans: "Outfit", "Segoe UI", sans-serif;
    --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(143, 61, 22, 0.08), transparent 50%),
        var(--paper);
    font-family: var(--sans);
    font-size: 1.02rem;
    line-height: 1.5;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, .serif { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--ink);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    z-index: 5;
}
.skip:focus { top: 1rem; }

.top {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.1rem 4vw;
    position: sticky;
    top: 0;
    z-index: 4;
    background: rgba(239, 234, 227, 0.9);
    backdrop-filter: blur(16px);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-weight: 600;
}
.brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.mark {
    width: 1.35rem;
    height: 1rem;
    background:
        linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 3px no-repeat,
        linear-gradient(var(--copper), var(--copper)) 4px 6px / calc(100% - 8px) 3px no-repeat,
        linear-gradient(var(--ink), var(--ink)) 0 12px / 100% 3px no-repeat;
}
.top-nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.top-nav a { text-decoration: none; color: var(--muted); }
.top-nav a[aria-current="page"], .top-nav a:hover { color: var(--ink); }
.menu-btn { display: none; }
.nav-search input { width: 10rem; padding: 0.45rem 0.7rem; border-radius: 999px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.top-actions { display: flex; gap: 0.55rem; align-items: center; }
.who { color: var(--muted); font-size: 0.92rem; }

.wrap { width: min(1120px, calc(100% - 8vw)); margin: 0 auto; }
.wrap-wide { width: min(1240px, calc(100% - 6vw)); margin: 0 auto; }
#content { padding-bottom: 4rem; }

.sheet {
    background: var(--sheet);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.layered { position: relative; }
.layered::before,
.layered::after {
    content: "";
    position: absolute;
    inset: 14px -10px auto;
    height: 100%;
    border-radius: var(--radius);
    background: rgba(255, 252, 248, 0.55);
    z-index: -1;
    border: 1px solid rgba(26, 25, 22, 0.04);
}
.layered::after { inset: 26px -18px auto; background: rgba(255, 252, 248, 0.35); }

.hero { padding: 4.5rem 0 2rem; }
.hero-sheet { padding: clamp(1.6rem, 4vw, 3.2rem); display: grid; gap: 1.5rem; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.98; max-width: 14ch; }
.lede { max-width: 42rem; font-size: 1.15rem; color: #3c3832; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.eyebrow i {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--copper);
    display: inline-block;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.pill, .btn, .status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.7rem;
    padding: 0.35rem 1.15rem;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}
.pill { cursor: default; font-size: 1.05rem; padding: 0.8rem 1.5rem; }
.pill.stone, .btn-stone { background: var(--stone); color: var(--ink); }
.pill.copper, .btn-copper { background: var(--copper); color: white; }
.pill.ink, .btn-ink { background: var(--ink); color: white; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-copper:hover { filter: brightness(1.08); }
.btn-ink:hover { background: #2a2825; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.small, .status { min-height: 2rem; padding: 0.15rem 0.8rem; font-size: 0.85rem; }

.trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}
.trust article, .card {
    background: var(--sheet);
    border-radius: 22px;
    padding: 1.2rem 1.25rem;
    border: 1px solid rgba(26, 25, 22, 0.05);
}
.trust h2, .card h3 { font-family: var(--sans); font-weight: 600; letter-spacing: 0; font-size: 1.05rem; margin-bottom: 0.35rem; }
.muted { color: var(--muted); }
.fine { font-size: 0.88rem; }

.section { padding: 2.2rem 0; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.1rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; }

.service-grid, .bundle-grid, .split, .quote-grid, .dash-grid {
    display: grid;
    gap: 0.9rem;
}
.service-grid { grid-template-columns: repeat(2, 1fr); }
.bundle-grid { grid-template-columns: repeat(3, 1fr); }
.service {
    padding: 1.25rem 1.3rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 100%;
}
.service .price { font-family: var(--serif); font-size: 1.8rem; letter-spacing: -0.03em; }
.tiers { border-top: 1px solid var(--line); padding-top: 0.7rem; }
.tiers summary { cursor: pointer; color: var(--copper); font-weight: 600; }
.tier { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.tier:last-child { border-bottom: 0; }
.tier header { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.tier ul { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--muted); }

.bundle { padding: 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; }
.bundle.featured { outline: 2px solid var(--copper); }
.save { color: var(--copper); font-weight: 600; font-size: 0.92rem; }
.compare { color: var(--muted); text-decoration: line-through; margin-right: 0.45rem; }
.bundle .price { font-family: var(--serif); font-size: 2rem; }
.bundle ul { margin: 0; padding-left: 1.1rem; }

.split { grid-template-columns: 1.1fr 0.9fr; }
.pay-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 1rem; }
.pay-steps strong { display: block; font-family: var(--serif); font-size: 1.8rem; }

.doc ol { padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.85rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin-top: 0.45rem; }

.form { display: grid; gap: 0.8rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field { display: grid; gap: 0.3rem; }
.field.full { grid-column: 1 / -1; }
.field span, .field label { font-size: 0.88rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="search"], textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    outline: none;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); }
.hp { position: absolute; left: -9999px; }

.flashes { display: grid; gap: 0.5rem; margin: 1rem 0; }
.flash { margin: 0; padding: 0.75rem 1rem; border-radius: 16px; background: var(--stone); }
.flash-error { background: var(--bad-soft); color: var(--bad); }
.flash-ok { background: var(--good-soft); color: var(--good); }

.site-footer {
    width: min(1120px, calc(100% - 8vw));
    margin: 1rem auto 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
    padding-top: 1.5rem;
}
.site-footer .fine { grid-column: 1 / -1; }

.auth-body { display: grid; place-items: center; padding: 6vh 1rem; }
.auth-card { width: min(440px, 100%); padding: 1.6rem; display: grid; gap: 0.9rem; }
.auth-card h1 { font-size: 2.4rem; line-height: 1; }

.dash-head, .editor-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin: 0.5rem 0 1rem;
}
.dash-head h1, .editor-head h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.search-field { flex: 1 1 14rem; max-width: 22rem; min-width: 0; }
.filters a { text-decoration: none; }
.filters a[aria-current="true"] { background: var(--ink); color: white; }

.quote-card {
    padding: 1.1rem 1.15rem;
    display: grid;
    gap: 0.45rem;
}
.quote-card header, .row-actions, .spread { display: flex; justify-content: space-between; gap: 0.7rem; align-items: center; }
.row-actions { flex-wrap: wrap; justify-content: flex-start; }
.quote-card h2 { font-family: var(--sans); font-size: 1.15rem; font-weight: 600; letter-spacing: 0; }
.dash-grid { grid-template-columns: repeat(2, 1fr); }
.leads { margin-top: 1.5rem; display: grid; gap: 0.7rem; }

.status-draft { background: var(--stone); }
.status-sent, .status-viewed { background: var(--warn-soft); color: var(--warn); }
.status-accepted { background: var(--good-soft); color: var(--good); }
.status-declined { background: var(--bad-soft); color: var(--bad); }
.status-changes { background: var(--copper-soft); color: var(--copper); }

.quote-grid { grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); align-items: start; }
.panel { padding: 1.15rem; display: grid; gap: 0.9rem; }
.panel h2 { font-size: 1.7rem; }
.lines { display: grid; gap: 0.7rem; }
.line {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.8rem;
    display: grid;
    gap: 0.55rem;
    background: white;
}
.line-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.totals { display: grid; gap: 0.35rem; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals .grand { font-family: var(--serif); font-size: 1.7rem; padding-top: 0.4rem; }
.sticky { position: sticky; top: 5.2rem; }

.catalog-list { display: grid; gap: 0.8rem; }
.catalog-item { padding: 1rem 1.1rem; }
.tier-edit { display: grid; grid-template-columns: 1.3fr 0.8fr 0.8fr; gap: 0.5rem; margin-top: 0.45rem; }

dialog.sheet {
    border: 0;
    padding: 1.2rem;
    width: min(640px, calc(100% - 1.5rem));
    max-height: min(80vh, 720px);
    overflow: auto;
}
dialog::backdrop { background: rgba(26, 25, 22, 0.46); }
.picker-list { display: grid; gap: 0.45rem; margin-top: 0.8rem; }
.picker-list button { text-align: left; justify-content: space-between; width: 100%; }

.doc { width: min(860px, calc(100% - 8vw)); margin: 1.5rem auto 3rem; padding: clamp(1.2rem, 4vw, 2.4rem); display: grid; gap: 1.1rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { text-align: left; padding: 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc td.num, .doc th.num { text-align: right; white-space: nowrap; }
.response { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.check { display: flex; gap: 0.55rem; align-items: flex-start; }
.check input { margin-top: 0.35rem; }

.empty { padding: 2rem 1.2rem; text-align: center; display: grid; gap: 0.6rem; justify-items: center; }
.warn-note { background: var(--warn-soft); color: var(--warn); border-radius: 16px; padding: 0.75rem 0.9rem; }

.pager { display: flex; gap: 0.5rem; margin-top: 1rem; }

.status-estimate { background: var(--copper-soft); color: var(--copper); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin: 0.5rem 0 1rem; }
.stat strong { display: block; font-family: var(--serif); font-size: 1.8rem; }
.checkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 1rem; }
.thread { display: grid; gap: 0.6rem; }
.bubble { background: white; border-radius: 16px; padding: 0.75rem 0.9rem; border: 1px solid var(--line); }
@media (max-width: 900px) {
    .top { flex-wrap: wrap; }
    .menu-btn { display: inline-flex; }
    .top-nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: flex-start; gap: 0.65rem; padding-top: 0.4rem; }
    .top-nav.is-open { display: flex; }
    .nav-search { width: 100%; }
    .nav-search input { width: 100%; }
    .trust, .service-grid, .bundle-grid, .split, .quote-grid, .dash-grid, .fields, .site-footer, .pay-steps, .tier-edit, .stats, .checkgrid {
        grid-template-columns: 1fr;
    }
    .sticky { position: static; }
    .hero { padding-top: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

@media print {
    body { background: white; }
    .top, .no-print, .site-footer { display: none !important; }
    .doc { box-shadow: none; width: 100%; margin: 0; }
}
