/* ==========================================================================
   Klaar — visual system
   Vernacular: the duplicate invoice book. Ink on cool paper, hairline rules,
   figures set in a monospace so columns of money line up, and a rubber stamp
   for status. The stamp is the one loud element; everything else stays quiet.
   ========================================================================== */

:root {
    --ink:        #14161B;
    --ink-soft:   #262A33;
    --paper:      #EEF0F4;
    --card:       #FFFFFF;
    --rule:       #DCE0E7;
    --rule-soft:  #EBEEF2;
    --muted:      #6B7280;
    --muted-deep: #4B5563;

    --blue:       #2B4C8C;
    --blue-dark:  #1F3968;
    --blue-wash:  #EDF1F9;

    --stamp-red:  #C8322B;
    --red-wash:   #FCEEED;
    --paid:       #1F7A55;
    --paid-wash:  #E9F5EF;
    --amber:      #9A6A08;
    --amber-wash: #FCF3E2;

    --radius:     8px;
    --radius-lg:  12px;
    --rail:       232px;

    --shadow-sm:  0 1px 2px rgba(20, 22, 27, .06);
    --shadow:     0 2px 10px rgba(20, 22, 27, .07);

    --display: 'Archivo', system-ui, sans-serif;
    --body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.018em;
    margin: 0 0 .4em;
    line-height: 1.18;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 3px;
}

/* --- shell ---------------------------------------------------------------- */

.shell { display: flex; min-height: 100vh; }

.rail {
    width: var(--rail);
    flex: 0 0 var(--rail);
    background: var(--ink);
    color: #C9CDD6;
    padding: 22px 16px 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    color: #fff;
    padding: 0 10px 4px;
    display: block;
}
.wordmark:hover { text-decoration: none; }
.wordmark-sub {
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #6E7686;
    padding: 0 10px 22px;
    display: block;
}

.rail nav { display: flex; flex-direction: column; gap: 1px; }
.rail nav a {
    color: #C9CDD6;
    padding: 9px 11px;
    border-radius: 6px;
    font-size: .92rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.rail nav a:hover { background: var(--ink-soft); color: #fff; text-decoration: none; }
.rail nav a.on { background: var(--ink-soft); color: #fff; font-weight: 600; }

.rail-count {
    font-family: var(--mono);
    font-size: .7rem;
    background: var(--stamp-red);
    color: #fff;
    border-radius: 20px;
    padding: 1px 7px;
}

.rail-foot {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #262A33;
    font-size: .78rem;
    color: #838B99;
}
.rail-foot a { color: #C9CDD6; display: block; padding: 3px 11px; }
.rail-foot .who {
    padding: 0 11px 10px;
    font-family: var(--mono);
    font-size: .72rem;
    color: #6E7686;
    overflow-wrap: anywhere;
}

.canvas { flex: 1; min-width: 0; padding: 30px 34px 64px; }
.canvas-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.canvas-head p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }

/* --- buttons -------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--body);
    font-size: .9rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { border-color: var(--rule); background: var(--card); }
.btn-ghost:hover { background: var(--rule-soft); }
.btn-danger { color: var(--stamp-red); border-color: var(--rule); }
.btn-danger:hover { background: var(--red-wash); }
.btn-sm { padding: 6px 11px; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* --- cards and rules ------------------------------------------------------ */

.card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 18px; }
.card-tight { padding: 16px 18px; }

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 14px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: .66rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

/* --- figures -------------------------------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 17px 19px;
    box-shadow: var(--shadow-sm);
}
.stat .figure {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    display: block;
    margin-top: 2px;
}
.stat .note { font-size: .8rem; color: var(--muted); margin-top: 4px; display: block; }
.stat.alert { border-color: #EBB9B6; background: var(--red-wash); }
.stat.alert .figure { color: var(--stamp-red); }

.money { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* --- tables --------------------------------------------------------------- */

.table { width: 100%; border-collapse: collapse; }
.table th {
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    text-align: left;
    padding: 0 10px 9px;
    border-bottom: 1px solid var(--rule);
}
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--rule-soft);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FAFBFC; }
.table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table .ref { font-family: var(--mono); font-size: .86rem; }

.table-wrap { overflow-x: auto; }

/* --- the stamp: the one loud thing ---------------------------------------- */

.stamp {
    display: inline-block;
    font-family: var(--mono);
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 11px;
    border: 2px solid currentColor;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
    white-space: nowrap;
}
.stamp-draft   { color: var(--muted-deep); }
.stamp-sent,
.stamp-viewed  { color: var(--blue); }
.stamp-part    { color: var(--amber); }
.stamp-paid    { color: var(--paid); }
.stamp-overdue,
.stamp-void    { color: var(--stamp-red); }

/* Oversized, tilted, low-opacity: the stamp pressed onto the document itself. */
.stamp-mark {
    position: absolute;
    top: 26px;
    right: 34px;
    transform: rotate(-11deg);
    font-family: var(--mono);
    font-weight: 700;
    font-size: 2.1rem;
    letter-spacing: .06em;
    padding: 8px 20px;
    border: 4px solid currentColor;
    border-radius: 7px;
    opacity: .16;
    pointer-events: none;
    user-select: none;
}

/* --- the document sheet --------------------------------------------------- */

.sheet {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 34px 38px;
    position: relative;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.sheet-head {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}
.sheet-title {
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
}
.sheet-number {
    font-family: var(--mono);
    color: var(--muted);
    font-size: .95rem;
    margin: 2px 0 0;
}
.sheet-party { font-size: .88rem; color: var(--muted-deep); line-height: 1.5; text-align: right; }
.sheet-party strong { color: var(--ink); }

.sheet-meta {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
}
.sheet-meta > div { min-width: 130px; }

.totals { margin-left: auto; width: min(340px, 100%); margin-top: 14px; }
.totals-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 6px 0;
    font-size: .92rem;
}
.totals-row.grand {
    border-top: 1px solid var(--rule);
    margin-top: 6px;
    padding-top: 11px;
    font-weight: 700;
    font-size: 1.1rem;
}
.totals-row .money { font-size: inherit; }

/* --- notices -------------------------------------------------------------- */

.notice {
    border-radius: var(--radius);
    padding: 12px 15px;
    font-size: .9rem;
    margin-bottom: 16px;
    border: 1px solid;
}
.notice-ok    { background: var(--paid-wash);  border-color: #B6DCC8; color: #14563C; }
.notice-warn  { background: var(--amber-wash); border-color: #E7CE9B; color: #7A5406; }
.notice-error { background: var(--red-wash);   border-color: #EBB9B6; color: #90231D; }
.notice-info  { background: var(--blue-wash);  border-color: #C2D0EA; color: var(--blue-dark); }
.notice ul { margin: 8px 0 0; padding-left: 19px; }
.notice li { margin-bottom: 3px; }
.notice strong { font-weight: 600; }

/* --- forms ---------------------------------------------------------------- */

.field { margin-bottom: 15px; }
.field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--muted-deep);
}
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=tel], select, textarea {
    width: 100%;
    font-family: var(--body);
    font-size: .93rem;
    padding: 9px 11px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}
input[type=number], .input-money { font-family: var(--mono); text-align: right; }
textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-wash); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }

.checkline { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 14px; }
.checkline input { margin-top: 3px; }
.checkline label { font-weight: 500; font-size: .9rem; color: var(--ink); margin: 0; }

.field-error { color: var(--stamp-red); font-size: .8rem; margin-top: 4px; }

/* --- line item editor ----------------------------------------------------- */

.lines { width: 100%; border-collapse: collapse; }
.lines th {
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    text-align: left;
    padding-bottom: 7px;
}
.lines td { padding: 3px 5px 3px 0; vertical-align: top; }
.lines input, .lines select { padding: 7px 9px; font-size: .88rem; }
.lines .col-desc { width: 46%; }
.lines .col-sm { width: 11%; }
.line-drop {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 6px 4px;
}
.line-drop:hover { color: var(--stamp-red); }

/* --- timeline ------------------------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    display: flex;
    gap: 13px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: .87rem;
}
.timeline li:last-child { border-bottom: none; }
.timeline time {
    font-family: var(--mono);
    font-size: .74rem;
    color: var(--muted);
    flex: 0 0 108px;
    padding-top: 2px;
}

/* --- public pay page ------------------------------------------------------ */

.pay-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 44px 20px 60px;
}
.pay-page .brandline {
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
}
.pay-card { width: min(560px, 100%); }
.pay-amount {
    font-family: var(--mono);
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin: 4px 0 2px;
}
.pay-methods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}
.pay-methods span {
    border: 1px solid var(--rule);
    border-radius: 20px;
    padding: 3px 11px;
    background: var(--card);
}
.btn-pay {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 14px;
    margin-top: 6px;
}
.pay-foot { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 22px; line-height: 1.7; }

/* --- landing -------------------------------------------------------------- */

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 34px;
    border-bottom: 1px solid var(--rule);
    background: var(--card);
    flex-wrap: wrap;
    gap: 12px;
}
.top .wordmark { color: var(--ink); padding: 0; }
.top nav { display: flex; gap: 8px; align-items: center; }

.hero { padding: 76px 34px 60px; max-width: 1080px; margin: 0 auto; }
.hero h1 {
    font-size: clamp(2.3rem, 5.6vw, 3.5rem);
    max-width: 17ch;
    letter-spacing: -0.035em;
    line-height: 1.06;
}
.hero .lede { font-size: 1.12rem; color: var(--muted-deep); max-width: 56ch; margin: 18px 0 28px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
    gap: 16px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 34px 80px;
}
.feature h3 { font-size: .98rem; margin-bottom: 5px; }
.feature p { font-size: .89rem; color: var(--muted-deep); margin: 0; }
.feature .n {
    font-family: var(--mono);
    font-size: .66rem;
    color: var(--blue);
    letter-spacing: .12em;
    display: block;
    margin-bottom: 9px;
}

.empty {
    text-align: center;
    padding: 52px 20px;
    color: var(--muted);
}
.empty h3 { color: var(--ink); }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.right { text-align: right; }
.mt { margin-top: 18px; }
.mb0 { margin-bottom: 0; }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .rail {
        width: 100%;
        flex: none;
        height: auto;
        position: static;
        padding: 14px 16px;
    }
    .rail nav { flex-direction: row; overflow-x: auto; gap: 4px; }
    .rail nav a { white-space: nowrap; }
    .wordmark-sub { display: none; }
    .rail-foot { display: none; }
    .canvas { padding: 20px 16px 48px; }
    .sheet { padding: 22px 18px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stamp-mark { font-size: 1.4rem; top: 16px; right: 16px; border-width: 3px; }
    .hero { padding: 46px 20px 40px; }
    .feature-grid { padding: 0 20px 56px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

@media print {
    .rail, .btn-row, .no-print { display: none !important; }
    body { background: #fff; }
    .canvas { padding: 0; }
    .sheet { border: none; box-shadow: none; }
}

/* ==========================================================================
   Support chatbot
   Deliberately restrained. A support widget that shouts is one people close
   before reading it, so this sits quietly until it is opened.
   ========================================================================== */

.chat-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--body);
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    background: var(--ink);
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(20, 22, 27, .22);
}
.chat-launcher:hover { background: var(--ink-soft); }
.chat-launcher-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3DD68C;
    box-shadow: 0 0 0 3px rgba(61, 214, 140, .22);
}

.chat-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 61;
    width: min(380px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(20, 22, 27, .22);
    overflow: hidden;
}
.chat-panel[hidden] { display: none; }

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--ink);
    color: #fff;
}
.chat-head strong { display: block; font-family: var(--display); font-size: .98rem; }
.chat-sub { font-size: .72rem; color: #9BA3B2; }
.chat-close {
    background: none;
    border: none;
    color: #9BA3B2;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.chat-close:hover { color: #fff; }

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--paper);
    min-height: 180px;
}

.chat-bubble {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.5;
    word-wrap: break-word;
}
.chat-bot {
    background: var(--card);
    border: 1px solid var(--rule);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.chat-mine {
    background: var(--blue);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}
.chat-bubble strong { font-weight: 600; }

.chat-handover {
    align-self: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0 4px;
}

.chat-dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.chat-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    animation: chat-blink 1.2s infinite ease-in-out;
}
.chat-dots i:nth-child(2) { animation-delay: .18s; }
.chat-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes chat-blink {
    0%, 60%, 100% { opacity: .25; }
    30% { opacity: 1; }
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 0;
    background: var(--card);
}
.chat-suggestions:empty { display: none; }
.chat-chip {
    font-family: var(--body);
    font-size: .78rem;
    color: var(--blue);
    background: var(--blue-wash);
    border: 1px solid #C2D0EA;
    border-radius: 20px;
    padding: 5px 11px;
    cursor: pointer;
    text-align: left;
}
.chat-chip:hover { background: #E2E9F6; }

/* The number is always on screen. Nobody should have to argue with a bot to find it. */
.chat-escalate {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 11px 14px;
    background: var(--card);
    border-top: 1px solid var(--rule-soft);
    font-size: .76rem;
}
.chat-escalate-link { color: var(--muted-deep); font-weight: 500; }
.chat-escalate-link:hover { color: var(--blue); }

.chat-input {
    display: flex;
    gap: 8px;
    padding: 11px 14px 14px;
    background: var(--card);
    border-top: 1px solid var(--rule);
}
.chat-input input { flex: 1; font-size: .88rem; padding: 9px 11px; }

@media (max-width: 520px) {
    .chat-panel {
        right: 8px;
        left: 8px;
        bottom: 8px;
        width: auto;
        max-height: calc(100vh - 16px);
    }
    .chat-launcher { right: 14px; bottom: 14px; }
}

@media print {
    .chat-launcher, .chat-panel { display: none !important; }
}

/* --- pricing on the landing page ------------------------------------------ */

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.price-card .amount {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    display: block;
    margin: 4px 0 0;
}
.price-card .per { font-size: .8rem; color: var(--muted); }
.price-card ul { padding-left: 18px; margin: 12px 0 16px; font-size: .86rem; color: var(--muted-deep); }
.price-card li { margin-bottom: 4px; }
.price-card.featured { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

/* ==========================================================================
   Landing page polish
   Same design language, more presence. The hero gains a rendered preview of the
   actual document the product makes, because the fastest way to look credible is
   to show the thing rather than describe it.
   ========================================================================== */

.top {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: saturate(180%) blur(8px);
    background: rgba(255, 255, 255, .88);
}

/* --- hero: copy beside a product preview -------------------------------- */

.hero-split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 54px;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 72px 34px 64px;
}
.hero-copy h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.2rem);
    letter-spacing: -0.035em;
    line-height: 1.07;
    max-width: 15ch;
}
.hero-copy .lede {
    font-size: 1.08rem;
    color: var(--muted-deep);
    max-width: 46ch;
    margin: 18px 0 26px;
}

/* Reassurance directly under the buttons, where hesitation actually happens. */
.hero-reassure {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 20px;
    font-size: .82rem;
    color: var(--muted);
}
.hero-reassure span { display: inline-flex; align-items: center; gap: 6px; }
.tick {
    width: 15px; height: 15px;
    flex: 0 0 15px;
    border-radius: 50%;
    background: var(--paid-wash);
    color: var(--paid);
    font-size: .62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- the invoice preview ------------------------------------------------- */

.hero-visual { position: relative; }

.preview-sheet {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    box-shadow: 0 18px 48px rgba(20, 22, 27, .13);
    position: relative;
    overflow: hidden;
    transform: rotate(-1deg);
}
/* A second sheet peeking out behind, so it reads as a stack of documents. */
.preview-sheet::before {
    content: "";
    position: absolute;
    inset: 14px -12px -12px 14px;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    z-index: -1;
    transform: rotate(2.5deg);
}
.preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
}
.preview-title {
    font-family: var(--display);
    font-size: 1.02rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0;
}
.preview-meta { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.preview-party { text-align: right; font-size: .68rem; color: var(--muted); line-height: 1.6; }
.preview-party strong { color: var(--ink); font-size: .76rem; }

.preview-rows { margin: 14px 0 0; }
.preview-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: .76rem;
}
.preview-row span:last-child {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--muted-deep);
    white-space: nowrap;
}
.preview-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 4px;
    font-weight: 700;
    font-size: .95rem;
}
.preview-total span:last-child { font-family: var(--mono); }

.preview-pay {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 10px;
}
.preview-btn {
    background: var(--blue);
    color: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: .74rem;
    font-weight: 600;
}
.preview-qr {
    width: 34px; height: 34px;
    border: 1px solid var(--rule);
    border-radius: 5px;
    background:
        linear-gradient(90deg, var(--ink) 2px, transparent 2px) 0 0 / 7px 7px,
        linear-gradient(0deg, var(--ink) 2px, transparent 2px) 0 0 / 7px 7px;
    opacity: .55;
}
.preview-stamp {
    position: absolute;
    top: 62px; right: 22px;
    transform: rotate(-12deg);
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: .08em;
    color: var(--paid);
    border: 3px solid currentColor;
    border-radius: 6px;
    padding: 5px 13px;
    opacity: .22;
}

/* --- how it works --------------------------------------------------------- */

.steps {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 34px 68px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
    counter-reset: step;
}
.step { position: relative; padding-top: 14px; }
.step::before {
    counter-increment: step;
    content: counter(step);
    font-family: var(--mono);
    font-size: .7rem;
    font-weight: 700;
    color: var(--blue);
    background: var(--blue-wash);
    border-radius: 50%;
    width: 26px; height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.step h3 { font-size: .98rem; margin-bottom: 4px; }
.step p { font-size: .88rem; color: var(--muted-deep); margin: 0; }

/* --- section headings ----------------------------------------------------- */

.section-head { max-width: 1080px; margin: 0 auto; padding: 0 34px 22px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.025em; }
.section-head p { color: var(--muted-deep); max-width: 54ch; margin: 6px 0 0; }

/* --- landing FAQ ---------------------------------------------------------- */

.faq { max-width: 780px; margin: 0 auto; padding: 0 34px 70px; }
.faq details {
    border-bottom: 1px solid var(--rule);
    padding: 15px 0;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .96rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-family: var(--mono);
    color: var(--muted);
    font-size: 1.1rem;
    flex: 0 0 auto;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
    font-size: .9rem;
    color: var(--muted-deep);
    margin: 10px 0 0;
    max-width: 62ch;
}

/* --- closing call to action ---------------------------------------------- */

.cta-band {
    background: var(--ink);
    color: #fff;
    padding: 52px 34px;
}
.cta-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.6rem; letter-spacing: -0.02em; }
.cta-band p { color: #A8AEBB; margin: 0; font-size: .95rem; }
.cta-band .btn-ghost {
    background: transparent;
    border-color: #3A404E;
    color: #fff;
}
.cta-band .btn-ghost:hover { background: var(--ink-soft); }

.site-footer {
    border-top: 1px solid var(--rule);
    background: var(--card);
    padding: 30px 34px;
}
.site-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 46px 20px 44px;
    }
    .hero-copy h1 { max-width: 100%; }
    .preview-sheet { transform: none; }
    .preview-sheet::before { display: none; }
    .steps, .section-head, .faq { padding-left: 20px; padding-right: 20px; }
    .cta-band { padding: 40px 20px; }
    .site-footer { padding: 26px 20px; }
}

/* ==========================================================================
   Support page
   Organised by what the person is trying to do, not by our internal categories.
   Someone locked out at 22:00 should not have to read about VAT first.
   ========================================================================== */

.support-hero {
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    padding: 44px 24px 38px;
    text-align: center;
}
.support-hero h1 { margin-bottom: 6px; }
.support-hero p { color: var(--muted-deep); max-width: 52ch; margin: 0 auto; }

/* Route cards: the three ways through, ranked by speed. */
.route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 26px 0 8px;
}
.route {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.route.primary { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.route h3 { font-size: 1rem; margin: 6px 0 4px; }
.route p { font-size: .86rem; color: var(--muted-deep); margin: 0 0 14px; flex: 1; }
.route .when {
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.route .speed {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--paid);
    background: var(--paid-wash);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 10px;
    align-self: flex-start;
}

/* Fix-it-yourself list: the handful of things that account for most tickets. */
.quickfix { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.quickfix a {
    display: block;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 13px 15px;
    background: var(--card);
    color: inherit;
    text-decoration: none;
    transition: border-color .12s ease, background .12s ease;
}
.quickfix a:hover { border-color: var(--blue); background: var(--blue-wash); text-decoration: none; }
.quickfix strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.quickfix span { font-size: .8rem; color: var(--muted); }

.sla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 6px;
}
.sla div {
    border-left: 3px solid var(--rule);
    padding-left: 12px;
}
.sla strong { display: block; font-size: .84rem; }
.sla span { font-size: .78rem; color: var(--muted); }
.sla div.urgent { border-left-color: var(--stamp-red); }
.sla div.high { border-left-color: var(--amber); }
