/*
 * Seloda — landing page, "the ledger".
 *
 * A lender's book brought to life — ruled lines, a red margin, a printed
 * statement, till receipts and a rubber stamp — drawn in the app's own
 * design system (resources/css/app.css in the app): its sky primary and
 * lime, its neutral greys, IBM Plex Sans and its rounded corners. Keep the
 * tokens below in step with that file.
 */

:root {
    /* app.css: --background, --card, --foreground, --muted-foreground */
    --bg: #f3f3f3;
    --card: #ffffff;
    --fg: #0a0a0a;
    --fg-2: #404040;
    --muted: #737373;
    --soft: #f5f5f5;

    /* app.css: --border, --input */
    --border: #d9dadc;
    --input: #cfd1d3;

    /* app.css: --primary (sky-600), --primary-foreground, --sidebar-active,
       the dark --sidebar-primary (sky-400) and its foreground (sky-950). */
    --primary: #0084d1;
    --primary-hover: #0069a8;
    --primary-fg: #f0f9ff;
    --primary-tint: #b8e6fe;
    --sky-50: #f0f9ff;
    --sky-400: #00bcff;
    --night: #052f4a;

    /* app.css: --color-brand-lime / --series-in (lime-600), --chart-2 (lime-500) */
    --lime: #5ea500;
    --lime-bright: #7ccf00;

    /* app.css: --destructive (red-600) */
    --red: #e7000b;

    --wa: #25d366;
    --radius: 10px;
    --radius-md: 8px;

    --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --lift: 0 1px 2px rgb(10 10 10 / 0.05), 0 18px 40px -20px rgb(5 47 74 / 0.35);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

.wrap {
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 100;
    background: var(--primary);
    color: var(--primary-fg);
    padding: 8px 14px;
    border-radius: var(--radius-md);
}

.skip:focus {
    left: 8px;
}

:focus-visible {
    outline: 3px solid rgb(0 132 209 / 0.45);
    outline-offset: 2px;
}

/* ---------- Buttons (the app's shadcn buttons) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: 600 16px/1 var(--sans);
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
}

.btn-ink {
    background: var(--primary);
    color: var(--primary-fg);
    box-shadow: 0 1px 2px rgb(0 105 168 / 0.3);
}

.btn-ink:hover {
    background: var(--primary-hover);
}

.btn-line {
    background: var(--card);
    border-color: var(--input);
    color: var(--fg);
    box-shadow: 0 1px 2px rgb(10 10 10 / 0.05);
}

.btn-line:hover {
    background: var(--soft);
}

.btn-wa {
    background: var(--wa);
    color: #06301a;
}

.btn-wa:hover {
    background: #1fbd5a;
}

.btn-paper {
    background: var(--card);
    color: var(--fg);
}

.btn-paper:hover {
    background: var(--sky-50);
}

.icon {
    width: 20px;
    height: 20px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
}

.link-arrow:hover {
    color: var(--primary-hover);
}

/* ---------- Masthead ---------- */
.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.masthead.scrolled {
    box-shadow: 0 10px 24px -20px rgb(10 10 10 / 0.45);
}

.masthead-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    width: 34px;
    height: 34px;
}

.brand-name {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.tabs {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.tabs a {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--fg-2);
    border-radius: var(--radius-md);
}

.tabs a:hover {
    background: var(--soft);
    color: var(--fg);
}

.tab-no {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--primary);
}

.masthead-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.masthead-actions .btn {
    padding: 11px 16px;
    font-size: 15px;
}

.lang {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--fg);
    cursor: pointer;
    font: 600 12px/1 var(--mono);
}

.lang span {
    padding: 7px 8px;
    border-radius: 5px;
    color: var(--muted);
}

html:not([lang='sw']) .lang [data-lang='en'],
html[lang='sw'] .lang [data-lang='sw'] {
    background: var(--primary);
    color: var(--primary-fg);
}

.menu {
    display: none;
    width: 44px;
    height: 44px;
    padding: 13px 11px;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--card);
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.menu span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--fg);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu[aria-expanded='true'] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

.menu[aria-expanded='true'] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 72px 0 88px;
    /* Ledger paper: faint sky rules and a red margin. */
    background:
        linear-gradient(90deg, transparent calc(50% - 612px), rgb(231 0 11 / 0.45) calc(50% - 612px), rgb(231 0 11 / 0.45) calc(50% - 610px), transparent calc(50% - 610px)),
        repeating-linear-gradient(180deg, transparent 0 39px, rgb(0 132 209 / 0.1) 39px 40px),
        var(--card);
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 56px;
    align-items: center;
}

.hero h1 {
    font-weight: 700;
    font-size: clamp(48px, 6.8vw, 96px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero h1 span,
.hero h1 em {
    display: block;
}

.hero h1 em {
    font-style: italic;
    font-weight: 600;
    color: var(--primary);
}

.lead {
    margin-top: 28px;
    max-width: 560px;
    font-size: 19px;
    color: var(--fg-2);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin-top: 34px;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    margin: 40px 0 0;
    border-top: 1px solid var(--fg);
    border-bottom: 1px solid var(--fg);
}

.hero-facts div {
    padding: 12px 22px 12px 0;
}

.hero-facts div + div {
    padding-left: 22px;
    border-left: 1px dashed var(--border);
}

.hero-facts dt {
    font: 500 11px/1.4 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.hero-facts dd {
    margin: 2px 0 0;
    font-weight: 600;
    font-size: 15px;
}

/* The printed statement */
.paper {
    position: relative;
    margin: 0;
    padding: 24px 28px 86px 0;
}

.paper-sheet {
    position: relative;
    background: var(--card);
    padding: 30px 28px 26px;
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--lift);
    transform: rotate(1.6deg);
    font-family: var(--mono);
    font-size: 13px;
}

.paper-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fg);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.paper-brand {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.14em;
    color: var(--primary);
}

.paper-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.paper-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.paper-table th {
    text-align: left;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 6px 4px;
    border-bottom: 1px solid var(--fg);
}

.paper-table td {
    padding: 7px 4px;
    border-bottom: 1px dashed var(--border);
    white-space: nowrap;
}

.paper-table th:nth-child(n + 3),
.paper-table td:nth-child(n + 3) {
    text-align: right;
}

.paper-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
}

.paper-total strong {
    font-size: 18px;
    color: var(--primary);
}

.leader {
    flex: 1;
    min-width: 16px;
    border-bottom: 2px dotted var(--input);
    transform: translateY(-4px);
}

.paper-foot {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.stamp {
    position: absolute;
    right: -6px;
    bottom: -4px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    width: 136px;
    height: 136px;
    border: 4px double var(--lime);
    border-radius: 50%;
    color: var(--lime);
    text-align: center;
    transform: rotate(-14deg);
    font-family: var(--mono);
    text-transform: uppercase;
    background: rgb(255 255 255 / 0.6);
    animation: stamp-in 0.5s cubic-bezier(0.2, 1.8, 0.4, 1) 0.7s both;
}

.stamp span {
    font-size: 11px;
    letter-spacing: 0.18em;
}

.stamp strong {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 20px;
    text-transform: none;
    line-height: 1.1;
}

@keyframes stamp-in {
    from {
        opacity: 0;
        transform: rotate(-14deg) scale(1.6);
    }
}

.note-wa {
    position: absolute;
    left: -22px;
    bottom: 0;
    width: 250px;
    padding: 14px 16px;
    background: #dcf8c6;
    border-radius: var(--radius);
    box-shadow: var(--lift);
    transform: rotate(-3deg);
    font-size: 14px;
    line-height: 1.4;
}

.note-wa-tag {
    display: inline-block;
    margin-bottom: 4px;
    font: 600 11px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #075e54;
}

/* ---------- Ticker ---------- */
.ticker {
    display: flex;
    align-items: stretch;
    background: var(--night);
    color: var(--primary-fg);
    font-family: var(--mono);
    font-size: 14px;
    overflow: hidden;
}

.ticker-label {
    flex: none;
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: var(--primary);
    color: var(--primary-fg);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 48s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-run {
    display: flex;
}

.ticker-run span {
    padding: 14px 28px;
    border-right: 1px dashed rgb(240 249 255 / 0.2);
    white-space: nowrap;
}

.ticker b {
    color: var(--sky-400);
    font-weight: 600;
    margin-right: 6px;
}

.ticker i {
    font-style: normal;
    color: var(--lime-bright);
    margin-left: 4px;
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

/* ---------- Sections and folio headers ---------- */
.section {
    padding: 112px 0;
}

.section-paper {
    background: var(--card);
    border-block: 1px solid var(--border);
}

.folio {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 56px;
    max-width: 900px;
}

.folio-no {
    font-weight: 700;
    font-size: 92px;
    line-height: 0.8;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 2px var(--primary);
}

.folio h2 {
    font-weight: 700;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.folio p {
    margin-top: 14px;
    max-width: 620px;
    font-size: 18px;
    color: var(--fg-2);
}

/* ---------- 01 · The ledger of features ---------- */
.ledger {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--fg);
}

.ledger li {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: 24px;
    align-items: baseline;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.ledger li::before {
    content: '';
    position: absolute;
    left: 56px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--red);
    opacity: 0.4;
}

.ln {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--muted);
}

.ledger h3 {
    font-weight: 600;
    font-size: 23px;
    letter-spacing: -0.02em;
    line-height: 1.25;
    justify-self: start;
    /* A highlighter run across the name on hover. */
    background: linear-gradient(transparent 62%, rgb(124 207 0 / 0.35) 62%) no-repeat 0 0 / 0 100%;
    transition: background-size 0.35s ease;
}

.ledger li:hover h3 {
    background-size: 100% 100%;
}

.ledger p {
    color: var(--fg-2);
}

/* ---------- The T-account ---------- */
.section-ink {
    background: var(--night);
    color: var(--primary-fg);
}

.t-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 72px;
    align-items: center;
}

.overline {
    font: 600 12px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sky-400);
}

.t-title {
    margin-top: 18px;
    font-weight: 700;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.t-copy {
    margin-top: 20px;
    font-size: 18px;
    color: rgb(240 249 255 / 0.78);
}

.t-list {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.t-list li {
    position: relative;
    padding-left: 30px;
}

.t-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--mono);
    color: var(--lime-bright);
    font-weight: 600;
}

.t-account {
    font-family: var(--mono);
}

.t-caption {
    font-size: 13px;
    color: rgb(240 249 255 / 0.6);
    margin-bottom: 14px;
}

.t-frame {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 3px solid var(--primary-fg);
}

.t-side {
    padding: 14px 20px 22px;
}

.t-side + .t-side {
    border-left: 3px solid var(--primary-fg);
}

.t-side h4 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 12px;
}

.t-side p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgb(240 249 255 / 0.2);
    font-size: 14px;
}

.t-side p span {
    color: rgb(240 249 255 / 0.72);
}

.t-side b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.t-balanced {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 14px 20px;
    border: 2px solid var(--lime-bright);
    border-radius: var(--radius);
    color: var(--lime-bright);
    font-size: 20px;
    font-weight: 600;
}

.t-balanced span:last-child {
    text-align: right;
}

.t-balanced em {
    font-style: normal;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---------- 02 · Receipt-book stubs ---------- */
.stubs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stub {
    position: relative;
    padding: 26px 22px 26px 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgb(10 10 10 / 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stub:hover {
    transform: translateY(-3px);
    box-shadow: var(--lift);
}

/* The perforation down the left, with its punched holes. */
.stub::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 10px;
    bottom: 10px;
    border-left: 2px dashed var(--border);
}

.stub::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 22px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: inset 0 1px 2px rgb(10 10 10 / 0.2), 0 48px 0 var(--bg), 0 96px 0 var(--bg);
}

.stub-no {
    font: 600 14px/1 var(--mono);
    color: var(--primary);
    letter-spacing: 0.06em;
}

.stub h3 {
    margin-top: 16px;
    font-weight: 600;
    font-size: 21px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.stub p {
    margin-top: 10px;
    color: var(--fg-2);
    font-size: 16px;
}

/* ---------- 03 · Pricing receipts ---------- */
.receipts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

.receipt {
    display: grid;
    gap: 16px;
    filter: drop-shadow(0 14px 18px rgb(5 47 74 / 0.12));
}

.receipt-body {
    position: relative;
    padding: 28px 26px 44px;
    background: var(--card);
    border-radius: var(--radius) var(--radius) 0 0;
    font-family: var(--mono);
    /* A torn, zig-zag foot like a till roll. */
    -webkit-mask:
        linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
        conic-gradient(from 135deg at 50% 0, #000 90deg, transparent 0) bottom / 20px 10px repeat-x;
    mask:
        linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat,
        conic-gradient(from 135deg at 50% 0, #000 90deg, transparent 0) bottom / 20px 10px repeat-x;
}

.receipt-best .receipt-body {
    background: var(--sky-50);
    border-top: 5px solid var(--primary);
}

.r-shop {
    text-align: center;
    font-family: var(--sans);
    font-weight: 700;
    letter-spacing: 0.3em;
    font-size: 14px;
    color: var(--primary);
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--border);
}

.r-plan {
    margin-top: 18px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.r-for {
    margin-top: 4px;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--muted);
    min-height: 48px;
}

.r-lines {
    display: grid;
    gap: 9px;
    margin: 20px 0 0;
    padding: 16px 0 0;
    list-style: none;
    font-size: 14px;
    border-top: 1px dashed var(--border);
}

.r-lines li {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.r-lines i {
    flex: 1;
    min-width: 12px;
    border-bottom: 2px dotted var(--border);
    transform: translateY(-3px);
}

.r-lines b {
    font-weight: 600;
    text-align: right;
}

.r-save b {
    color: var(--lime);
}

.r-total {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 2px solid var(--fg);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.r-price {
    margin-top: 2px;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.r-price small {
    font-size: 16px;
    font-weight: 500;
    margin-right: 6px;
    letter-spacing: 0;
    color: var(--muted);
}

.r-price-talk {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 34px;
}

.barcode {
    height: 38px;
    margin-top: 18px;
    background: repeating-linear-gradient(90deg,
        var(--fg) 0 2px, transparent 2px 4px,
        var(--fg) 4px 5px, transparent 5px 8px,
        var(--fg) 8px 11px, transparent 11px 12px,
        var(--fg) 12px 13px, transparent 13px 17px);
    opacity: 0.8;
}

.stamp-sm {
    top: 64px;
    right: 14px;
    bottom: auto;
    width: 108px;
    height: 108px;
    border-width: 3px;
    transform: rotate(12deg);
    animation: none;
    background: transparent;
}

.receipt-best .r-plan,
.receipt-best .r-for {
    padding-right: 104px;
}

.stamp-sm strong {
    font-size: 15px;
}

.stamp-sm span {
    font-size: 10px;
    letter-spacing: 0.12em;
}

.price-note {
    margin-top: 28px;
    font: 500 13px/1.6 var(--mono);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- 04 · Notes in the margin ---------- */
.notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 48px;
    align-items: start;
    border-top: 2px solid var(--fg);
}

.note {
    border-bottom: 1px solid var(--border);
}

.note summary {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 22px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.note summary::-webkit-details-marker {
    display: none;
}

.note summary::after {
    content: '+';
    margin-left: auto;
    font-family: var(--mono);
    font-weight: 500;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.note[open] summary::after {
    transform: rotate(45deg);
}

.q {
    flex: none;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
}

.note p {
    padding: 0 0 22px 46px;
    color: var(--fg-2);
}

/* ---------- 05 · The back cover ---------- */
.cover {
    padding: 112px 0;
    color: var(--primary-fg);
    background:
        radial-gradient(900px 400px at 85% 0%, rgb(0 132 209 / 0.45), transparent 60%),
        radial-gradient(600px 300px at 0% 100%, rgb(94 165 0 / 0.18), transparent 60%),
        var(--night);
}

.cover-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: center;
}

.folio-no-light {
    display: block;
    -webkit-text-stroke-color: var(--sky-400);
    font-size: 80px;
}

.cover-title {
    margin-top: 22px;
    font-weight: 700;
    font-size: clamp(40px, 5.4vw, 72px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.cover-title span,
.cover-title em {
    display: block;
}

.cover-title em {
    font-style: italic;
    font-weight: 600;
    color: var(--sky-400);
}

.cover-copy {
    margin-top: 22px;
    max-width: 520px;
    font-size: 18px;
    color: rgb(240 249 255 / 0.78);
}

.cover-card {
    padding: 30px;
    border: 1px solid rgb(240 249 255 / 0.2);
    border-radius: var(--radius);
    background: rgb(240 249 255 / 0.05);
}

.cover-label {
    font: 600 12px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgb(240 249 255 / 0.6);
}

.cover-phone {
    display: block;
    margin-top: 10px;
    font-family: var(--mono);
    font-weight: 600;
    font-size: clamp(32px, 4.2vw, 48px);
    letter-spacing: -0.02em;
    line-height: 1.1;
    white-space: nowrap;
}

.cover-phone:hover {
    color: var(--sky-400);
}

.cover-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0 28px;
}

.cover-actions .btn {
    flex: 1;
}

.cover-mail {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--mono);
    font-size: 18px;
    border-bottom: 1px solid rgb(240 249 255 / 0.5);
    overflow-wrap: anywhere;
}

.cover-mail:hover {
    color: var(--sky-400);
}

/* ---------- Footer ---------- */
.footer {
    padding: 30px 0;
    background: var(--card);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
}

.footer .brand-name {
    font-size: 20px;
}

.footer .brand img {
    width: 28px;
    height: 28px;
}

.closing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--mono);
    font-size: 14px;
    color: var(--muted);
}

.closing b {
    color: var(--fg);
}

.copy {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
}

/* ---------- WhatsApp, always within reach ---------- */
.wa-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--wa);
    color: #fff;
    box-shadow: 0 10px 24px -6px rgb(10 10 10 / 0.35);
    transition: transform 0.15s ease;
}

.wa-fab svg {
    width: 28px;
    height: 28px;
}

.wa-fab:hover {
    transform: scale(1.06);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in,
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Grid items shrink to their track, never to a long table row. */
.hero-grid > *,
.t-grid > *,
.cover-grid > *,
.receipts > *,
.stubs > *,
.notes > *,
.footer-inner > * {
    min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .stub {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .stamp,
    .ticker-track {
        animation: none;
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 1040px) {
    .tabs .tab-no {
        display: none;
    }

    .tabs a {
        padding: 8px;
    }

    .hero {
        background:
            repeating-linear-gradient(180deg, transparent 0 39px, rgb(0 132 209 / 0.1) 39px 40px),
            var(--card);
    }

    .hero-grid,
    .t-grid,
    .cover-grid {
        grid-template-columns: 1fr;
    }

    .paper {
        max-width: 560px;
        width: 100%;
        margin-inline: auto;
    }

    .stubs {
        grid-template-columns: repeat(2, 1fr);
    }

    .receipts {
        grid-template-columns: 1fr 1fr;
    }

    .receipt-best {
        grid-column: 1 / -1;
        grid-row: 1;
        max-width: 460px;
        width: 100%;
        justify-self: center;
    }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .masthead-inner {
        gap: 12px;
    }

    .menu {
        display: flex;
    }

    .hide-sm {
        display: none;
    }

    .masthead-actions {
        margin-left: auto;
    }

    .tabs {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 8px 20px 16px;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 24px -18px rgb(10 10 10 / 0.4);
    }

    .tabs.open {
        display: flex;
    }

    .tabs a {
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        font-size: 18px;
    }

    .tabs .tab-no {
        display: inline;
    }

    .hero {
        padding: 44px 0 64px;
    }

    .lead {
        font-size: 17px;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .hero-facts {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hero-facts div,
    .hero-facts div + div {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        padding: 10px 0;
        border-left: 0;
    }

    .hero-facts div + div {
        border-top: 1px dashed var(--border);
    }

    .hero-facts dd {
        text-align: right;
    }

    .paper {
        padding: 16px 0 110px;
    }

    .paper-sheet {
        padding: 24px 16px 22px;
        font-size: 12px;
        transform: rotate(0.8deg);
    }

    .paper-table th:nth-child(2),
    .paper-table td:nth-child(2) {
        display: none;
    }

    .stamp {
        width: 104px;
        height: 104px;
        right: -4px;
        bottom: 0;
    }

    .stamp strong {
        font-size: 15px;
    }

    .stamp span {
        font-size: 9px;
    }

    .note-wa {
        left: 0;
        width: 230px;
    }

    .section,
    .cover {
        padding: 72px 0;
    }

    .folio {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 36px;
    }

    .folio-no {
        font-size: 60px;
    }

    .ledger li {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 6px 18px;
    }

    .ledger li::before {
        left: 32px;
    }

    .ledger p {
        grid-column: 2;
    }

    .ledger h3 {
        font-size: 20px;
    }

    .t-frame {
        grid-template-columns: 1fr;
    }

    .t-side + .t-side {
        border-left: 0;
        border-top: 3px solid var(--primary-fg);
    }

    .t-balanced {
        font-size: 16px;
        padding: 12px 14px;
    }

    .stubs,
    .receipts,
    .notes {
        grid-template-columns: 1fr;
    }

    .receipt-best {
        max-width: none;
    }

    .note p {
        padding-left: 0;
    }

    .cover-card {
        padding: 22px;
    }

    .cover-actions {
        flex-direction: column;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
