@charset "utf-8";

/*
    Accounting - /features/accounting.

    ? A ledger is the one thing in a shop that is allowed to be a table, so the hero is one: the
    ? entries an invoice writes when it is finalized, played once, line by line, ending on a total
    ? that balances. It is deliberately not only flattering. The last line is a refusal, because
    ? "the books are closed, and a late edit is turned away" is the part an accountant wants to see.

    ? The body follows one job from the counter to a closed year, the way the MecanoPro AI page
    ? follows a day: a label down the left, the dashed red bay line through the middle, the
    ? sequence as real structure.

    ? Same ground as the rest of the site (concrete, the brand's steel, red used the way a shop uses
    ? paint). Scoped under .accounting-page so the shared components keep their look elsewhere.
*/

.accounting-page {
    --acc-concrete: #e8ebee;
    --acc-paper: #f4f6f7;
    --acc-line: #cdd4da;
    --acc-ink: #151b21;
    --acc-steel: #1f272f;
    --acc-text: #36424d;
    --acc-muted: #55616c;
    --acc-red: #fb172b;
    --acc-red-dark: #d9101f;

    font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-stretch: 100%;
    color: var(--acc-text);
}

/*  The display voice, shared with the other pages: the same family pulled condensed and heavy */
.accounting-page .acc-hero-title,
.accounting-page .acc-section-title,
.accounting-page .stop-label,
.accounting-page .stop-title,
.accounting-page .rule-name,
.accounting-page .acc-setup-title {
    font-stretch: 76%;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.accounting-page a:focus-visible {
    outline: 3px solid var(--acc-ink);
    outline-offset: 3px;
}

/*-------------------------------------------------------------------------------------------------
    Hero - dark, so the ledger is the lightest thing on the first screen
-------------------------------------------------------------------------------------------------*/

.accounting-page .acc-hero {
    position: relative;
    background-color: var(--acc-ink);
    color: #c3ccd5;
    padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 7vw, 88px);
}

/*  The red bay line, as on the other pages */
.accounting-page .acc-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background-image: repeating-linear-gradient(90deg, var(--acc-red) 0 28px, transparent 28px 48px);
}

.accounting-page .acc-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.accounting-page .acc-hero-title {
    margin: 0 0 24px;
    font-size: clamp(42px, 5vw, 74px);
    line-height: 0.96;
    color: #ffffff;
    max-width: 14ch;
    text-wrap: balance;
}

.accounting-page .acc-hero-lede {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.6;
    color: #c3ccd5;
    max-width: 52ch;
}

.accounting-page .acc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/*  The quiet button, drawn for the dark ground */
.accounting-page .btn-acc-ghost,
.accounting-page .btn-acc-ghost:focus {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.accounting-page .btn-acc-ghost:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--acc-ink);
}

/*  The ledger ------------------------------------------------------------------------------------- */

.accounting-page .ledger-card {
    margin: 0 0 0 auto;
    width: 100%;
    max-width: 520px;
    background-color: var(--acc-paper);
    border-radius: 14px;
    padding: 0 24px 18px;
    box-shadow: 0 40px 60px -36px rgba(0, 0, 0, 0.7);
}

.accounting-page .ledger-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 14px;
    border-bottom: 1px solid var(--acc-line);
    font-size: 15px;
    font-weight: 700;
    color: var(--acc-ink);
}

.accounting-page .ledger-card-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--acc-muted);
}

.accounting-page .ledger-card-live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1f9d55;
}

.accounting-page .ledger {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    line-height: 1.35;
    color: var(--acc-ink);
}

.accounting-page .ledger thead th {
    padding: 16px 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--acc-muted);
    text-align: left;
    border-bottom: 2px solid var(--acc-ink);
}

.accounting-page .ledger .ledger-amount {
    width: 96px;
    padding-left: 10px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.accounting-page .ledger thead .ledger-amount {
    text-align: right;
}

/*  ? The one thing on the page that moves by itself: the lines arrive in order, once. */
.accounting-page .ledger-row {
    animation: ledger-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.5s + var(--i, 0) * 0.55s);
}

.accounting-page .ledger-row th,
.accounting-page .ledger-row td {
    padding: 10px 0;
    border-bottom: 1px solid var(--acc-line);
    vertical-align: baseline;
}

.accounting-page .ledger-row .ledger-amount {
    font-weight: 600;
}

.accounting-page .ledger-account {
    font-weight: 500;
    text-align: left;
}

/*  A credit is written indented under its debit, as a bookkeeper would on paper */
.accounting-page .ledger-row-credit .ledger-account {
    padding-left: 22px;
}

/*  The rule above the total replaces the hairline of the row before it, not adds to it */
.accounting-page .ledger-row:has(+ .ledger-row-total) th,
.accounting-page .ledger-row:has(+ .ledger-row-total) td {
    border-bottom: 0;
}

.accounting-page .ledger-row-total th,
.accounting-page .ledger-row-total td {
    padding-top: 12px;
    border-top: 2px solid var(--acc-ink);
    border-bottom: 0;
    font-weight: 800;
}

.accounting-page .ledger-row-total .ledger-account::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background-color: #1f9d55;
}

/*  What the software did, as opposed to an entry. Dashed, like paint on the floor. */
.accounting-page .ledger-row-note td,
.accounting-page .ledger-row-refusal td {
    padding: 12px 0 6px;
    border-bottom: 0;
    text-align: center;
}

.accounting-page .ledger-pill {
    display: inline-block;
    padding: 5px 14px;
    background-color: #ffffff;
    border: 1.5px dashed var(--acc-red);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--acc-red-dark);
    text-wrap: balance;
}

/*  The refusal is the loudest thing in the card, and says so in a plain sentence */
.accounting-page .ledger-row-refusal td {
    padding-top: 18px;
}

.accounting-page .ledger-row-refusal .ledger-pill {
    border-radius: 12px;
    background-color: #fff0f1;
    border-style: solid;
    padding: 9px 16px;
}

.accounting-page .ledger-card-caption {
    margin-top: 12px;
    font-size: 13px;
    color: var(--acc-muted);
}

@keyframes ledger-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {

    .accounting-page .ledger-row {
        animation: none;
    }
}

/*-------------------------------------------------------------------------------------------------
    Shared section heading
-------------------------------------------------------------------------------------------------*/

.accounting-page .acc-section-title {
    margin: 0 0 18px;
    font-size: clamp(36px, 4.4vw, 56px);
    color: var(--acc-ink);
    text-wrap: balance;
}

.accounting-page .acc-section-lede {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--acc-muted);
    max-width: 44ch;
}

/*-------------------------------------------------------------------------------------------------
    The trip - one job, counter to close
-------------------------------------------------------------------------------------------------*/

.accounting-page .acc-trip {
    background-color: #ffffff;
    padding: clamp(56px, 8vw, 104px) 0 clamp(24px, 4vw, 48px);
}

.accounting-page .acc-trip-head {
    margin-bottom: clamp(40px, 5vw, 72px);
}

.accounting-page .stops {
    list-style: none;
    margin: 0;
    padding: 0;
}

.accounting-page .stop {
    position: relative;
    display: grid;
    grid-template-columns: 190px 40px minmax(0, 1fr);
    margin: 0;
    padding-bottom: clamp(44px, 5.5vw, 72px);
}

/*  The marker on the line: a small square with an ink edge, where the red line passes through */
.accounting-page .stop::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 14px;
    height: 14px;
    margin-top: 10px;
    background-color: #ffffff;
    border: 3px solid var(--acc-ink);
    z-index: 1;
}

/*  The line itself: dashed red, running from this marker to the next */
.accounting-page .stop::after {
    content: "";
    position: absolute;
    left: 208px;
    top: 28px;
    bottom: -8px;
    width: 3px;
    background-image: repeating-linear-gradient(180deg, var(--acc-red) 0 10px, transparent 10px 18px);
}

.accounting-page .stop:last-child::after {
    display: none;
}

.accounting-page .stop-label {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: clamp(28px, 2.8vw, 40px);
    color: var(--acc-ink);
}

.accounting-page .stop-body {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
}

.accounting-page .stop-title {
    margin: 0 0 16px;
    font-size: clamp(28px, 3vw, 40px);
    color: var(--acc-ink);
    max-width: 24ch;
    text-wrap: balance;
}

.accounting-page .stop-text {
    margin: 0;
    font-size: 17.5px;
    line-height: 1.6;
    color: var(--acc-text);
    max-width: 58ch;
}

.accounting-page .stop-points {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 62ch;
}

.accounting-page .stop-points li {
    position: relative;
    margin: 0;
    padding-left: 22px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--acc-muted);
}

/*  A painted square, not a tick: these are facts about the product, not a checklist */
.accounting-page .stop-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background-color: var(--acc-red);
}

/*-------------------------------------------------------------------------------------------------
    Books you can trust
-------------------------------------------------------------------------------------------------*/

.accounting-page .acc-rules {
    background-color: var(--acc-concrete);
    padding: clamp(56px, 8vw, 104px) 0;
}

.accounting-page .acc-rules-inner {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(28px, 5vw, 80px);
    align-items: start;
}

/*  The heading stays in view while the rows go by */
.accounting-page .acc-rules-head {
    position: sticky;
    top: 110px;
}

.accounting-page .rule-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--acc-line);
}

.accounting-page .rule-rows li {
    margin: 0;
    padding: 28px 0;
    border-top: 1px solid var(--acc-line);
}

.accounting-page .rule-name {
    margin: 0 0 12px;
    font-size: clamp(26px, 2.6vw, 34px);
    color: var(--acc-ink);
}

.accounting-page .rule-text {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--acc-text);
    max-width: 60ch;
}

/*-------------------------------------------------------------------------------------------------
    Setup - the dark annex
-------------------------------------------------------------------------------------------------*/

.accounting-page .acc-setup {
    position: relative;
    background-color: var(--acc-steel);
    color: #c3ccd5;
    padding: clamp(56px, 8vw, 104px) 0;
}

.accounting-page .acc-setup::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background-image: repeating-linear-gradient(90deg, var(--acc-red) 0 28px, transparent 28px 48px);
}

.accounting-page .acc-setup-inner {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: clamp(32px, 6vw, 88px);
    align-items: start;
}

.accounting-page .acc-setup-title {
    margin: 0 0 22px;
    font-size: clamp(34px, 4vw, 52px);
    color: #ffffff;
    max-width: 17ch;
    text-wrap: balance;
}

.accounting-page .acc-setup-lede {
    margin: 0;
    font-size: 17.5px;
    line-height: 1.6;
    color: #b6c0ca;
    max-width: 48ch;
}

.accounting-page .acc-setup-points {
    list-style: none;
    margin: 0;
    padding: 0;
}

.accounting-page .acc-setup-points li {
    margin: 0;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 16.5px;
    line-height: 1.55;
    color: #ffffff;
}

.accounting-page .acc-setup-points li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.accounting-page .acc-setup-note {
    margin: 22px 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: #b6c0ca;
    max-width: 52ch;
}

/*-------------------------------------------------------------------------------------------------
    Responsive
-------------------------------------------------------------------------------------------------*/

@media (max-width: 991px) {

    .accounting-page .acc-hero-inner,
    .accounting-page .acc-rules-inner,
    .accounting-page .acc-setup-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .accounting-page .acc-hero-title {
        max-width: 18ch;
    }

    .accounting-page .ledger-card {
        margin-left: 0;
    }

    .accounting-page .acc-rules-head {
        position: static;
    }

    .accounting-page .acc-rules-inner {
        gap: 28px;
    }

    /*  The label moves above the stop, and the line moves to the left edge */
    .accounting-page .stop {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .accounting-page .stop::before {
        grid-column: 1;
        justify-self: start;
        margin-top: 6px;
    }

    .accounting-page .stop::after {
        left: 6px;
        top: 24px;
    }

    .accounting-page .stop-label {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 12px;
    }

    .accounting-page .stop-body {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (max-width: 767px) {

    .accounting-page .acc-hero-actions .btn {
        width: 100%;
    }

    .accounting-page .ledger-card {
        padding: 0 16px 16px;
    }

    .accounting-page .ledger {
        font-size: 14px;
    }

    .accounting-page .ledger .ledger-amount {
        width: 78px;
    }

    .accounting-page .ledger-row-credit .ledger-account {
        padding-left: 14px;
    }
}
