/* Сайт Qarz Daftari: лендинг и блог. Образ — школьная тетрадь в клетку с красным полем:
   именно в ней магазины ведут долги. Шрифт Caveat — только для записей «от руки». */

:root {
    --paper: #fff;
    --square: #e4edf7;
    --tint: #f4f8fc;
    --ink: #14264a;
    --ink-2: #44567a;
    --ink-3: #66769a;
    --pen: #1c4fd6;
    --coral: #fe6953;
    --coral-ink: #c4351c;
    --paid: #0f7a50;
    --paid-bg: #e0f6ea;
    --late: #c4351c;
    --late-bg: #ffe9e4;
    --due: #8f5a00;
    --due-bg: #fff2d4;
    --line: #d7e1ee;
    --cell: 24px;
    --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
    --sketch: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); overflow-x: clip; }
img, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--pen); text-underline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 800; line-height: 1.14; letter-spacing: -.022em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 6px; }
.skip:focus { top: 10px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 28px 16px; }

/* Красное поле тетради идёт через всю страницу, текст стоит правее него. */
.sheet { position: relative; }
.sheet::before {
    content: ''; position: absolute; inset-block: 0; left: 13px; width: 2px;
    background: var(--coral); opacity: .5; pointer-events: none; z-index: 2;
}
@media (min-width: 760px) {
    .wrap { padding-inline: 64px 32px; }
    .sheet::before { left: max(32px, calc(50% - 590px + 32px)); }
}

.grid-paper {
    background-color: var(--paper);
    background-image: linear-gradient(var(--square) 1px, transparent 1px), linear-gradient(90deg, var(--square) 1px, transparent 1px);
    background-size: var(--cell) var(--cell);
}

/* Кнопки */
.btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px;
    border-radius: 10px; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #0d1b38; }
.btn-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { background: var(--tint); }
.btn-sm { min-height: 40px; padding: 7px 16px; font-size: 15px; }

/* Официальные бейджи: равная высота и свободное поле в ¼ высоты, без эффектов. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores a { display: block; border-radius: 7px; }
.stores img { height: 48px; width: auto; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 800; font-size: 18px; letter-spacing: -.015em; text-decoration: none; margin-right: auto; }
.brand img { width: 30px; height: 30px; }
.brand span { display: none; }
.top-nav { display: flex; align-items: center; gap: 20px; }
.top-nav a, .lang { color: var(--ink-2); font-weight: 500; font-size: 15px; text-decoration: none; }
.top-nav a:hover, .lang:hover { color: var(--pen); }
.top-nav .wide { display: none; }
@media (min-width: 420px) { .brand span { display: inline; } }
@media (min-width: 920px) { .top-nav .wide { display: inline; } .top-nav { margin-right: 10px; } }

/* Первый экран */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 34px; padding-block: 38px 46px; }
.hero h1 { font-size: clamp(38px, 6.2vw, 66px); line-height: 1.03; letter-spacing: -.035em; max-width: 13em; }
.hero-sub { margin-top: 18px; max-width: 33em; font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--ink-2); }
.hero .stores { margin-top: 26px; }
.hero-alt { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
@media (min-width: 980px) {
    .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 44px; padding-block: 68px 76px; }
}

.daftar { position: relative; width: 100%; max-width: 470px; margin-inline: auto; padding-right: 0; }
.daftar-page {
    position: relative; background: #fff; padding: 18px 16px 16px 46px; transform: rotate(-1.3deg);
    border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 22px 40px -24px rgba(20, 38, 74, .45);
}
.daftar-page::before { content: ''; position: absolute; inset-block: 0; left: 34px; width: 2px; background: var(--coral); opacity: .75; }
.daftar-title { font: 700 27px/34px var(--hand); color: var(--coral-ink); }
.daftar-rows { background: repeating-linear-gradient(to bottom, transparent 0 37px, var(--square) 37px 38px); }
.daftar-rows li { position: relative; display: flex; justify-content: space-between; gap: 10px; height: 38px; font: 600 25px/37px var(--hand); color: var(--pen); white-space: nowrap; }
.daftar-rows .is-paid > span { opacity: .5; }
.daftar-strike { position: absolute; left: -3px; right: -3px; top: 52%; height: 2px; background: var(--pen); transform: rotate(-1.2deg); transform-origin: left; animation: strike .45s ease-out 1s backwards; }
.daftar-stamp {
    position: absolute; right: 2px; top: 3px; padding: 0 8px; font: 700 20px/28px var(--hand); color: var(--paid);
    background: rgba(255, 255, 255, .94); border: 2px solid var(--paid); border-radius: 6px; transform: rotate(-7deg);
    animation: stamp .3s cubic-bezier(.2, 1.4, .4, 1) 1.45s backwards;
}
.daftar-total { display: flex; justify-content: space-between; margin-top: 6px; font: 700 26px/36px var(--hand); color: var(--ink); }
.daftar-phone { display: none; }
@keyframes strike { from { transform: rotate(-1.2deg) scaleX(0); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-16deg) scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .daftar-strike, .daftar-stamp { animation: none; } }
@media (min-width: 560px) {
    .daftar { padding-right: 128px; max-width: 520px; }
    .daftar-phone {
        display: block; position: absolute; right: 0; top: 50%; width: 176px; transform: translateY(-50%) rotate(2deg);
        border-radius: 24px; border: 5px solid var(--ink); box-shadow: 0 24px 40px -22px rgba(20, 38, 74, .6); background: #fff;
    }
    /* Телефон заходит на страницу тетради: суммы не должны оказаться под ним. */
    .daftar { margin-block: 64px; }
    .daftar-page { padding-right: 62px; }
}

/* Разделы */
.band { padding-block: 52px; border-bottom: 1px solid var(--line); }
.band-tint { background: var(--tint); }
.band h2 { font-size: clamp(27px, 3.6vw, 40px); }
.band-sub { margin-top: 10px; max-width: 42em; color: var(--ink-2); }
.band-body { margin-top: 28px; }
@media (min-width: 760px) { .band { padding-block: 72px; } }

/* Цифры записаны как строки в тетради: название, отточие, значение. */
.tally { display: grid; gap: 0 56px; margin-top: 22px; }
.tally-row { display: flex; align-items: baseline; gap: 8px; padding-block: 9px; border-bottom: 1px solid var(--square); }
.tally-row dt { font-weight: 500; min-width: 0; }
.tally-row dt small { display: block; font-size: 13.5px; font-weight: 400; color: var(--ink-3); }
.tally-row dt a { color: inherit; }
.tally-row::after { content: ''; order: 1; flex: 1; min-width: 14px; border-bottom: 2px dotted var(--line); transform: translateY(-5px); }
.tally-row dd { order: 2; font: 700 36px/1 var(--hand); color: var(--pen); white-space: nowrap; }
.tally-note { margin-top: 14px; font-size: 14px; color: var(--ink-3); max-width: 46em; }
@media (min-width: 860px) { .tally { grid-template-columns: 1fr 1fr; } }

/* Настоящие экраны */
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; max-width: 980px; }
.phone img { width: 100%; border-radius: 18px; border: 4px solid var(--ink); background: #fff; }
.phone figcaption { margin-top: 8px; font-weight: 600; font-size: 15px; text-align: center; }
@media (min-width: 760px) { .phones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } .phone img { border-radius: 24px; border-width: 5px; } }

/* Оглавление — как содержание тетради: тема, отточие, тариф. */
.toc { display: grid; gap: 34px 56px; }
.toc h2, .toc h3 { font-size: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.toc-item a { display: flex; align-items: baseline; gap: 8px; padding-block: 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--square); }
.toc-item a:hover .toc-name { color: var(--pen); text-decoration: underline; }
.toc-name { font-weight: 500; line-height: 1.35; min-width: 0; }
.toc-dots { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.toc-plan { flex: none; font: 700 19px/1 var(--hand); color: var(--coral-ink); white-space: nowrap; }
.toc-card { display: block; font-size: 14.5px; font-weight: 400; color: var(--ink-3); }
@media (min-width: 900px) { .toc { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Три шага */
.steps { display: grid; gap: 22px; counter-reset: step; }
.steps li { position: relative; padding-left: 50px; counter-increment: step; }
.steps li::before { content: counter(step) '.'; position: absolute; left: 0; top: -9px; font: 700 46px/1 var(--hand); color: var(--coral-ink); }
.steps h3 { font-size: 20px; }
.steps p { margin-top: 6px; color: var(--ink-2); font-size: 16px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.who { display: flex; flex-wrap: wrap; gap: 10px; }
.who a { padding: 9px 16px; color: var(--ink); font-weight: 500; font-size: 15.5px; text-decoration: none; background: #fff; border: 2px solid var(--ink); border-radius: var(--sketch); }
.who a:hover { color: var(--pen); border-color: var(--pen); }

/* Видео */
.vid-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(74vw, 270px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.vid-row > * { scroll-snap-align: start; }
.vid-frame { aspect-ratio: 9 / 16; width: 100%; max-width: 300px; overflow: hidden; border-radius: 16px; background: var(--ink); }
.vid-frame iframe { width: 100%; height: 100%; border: 0; }
.vid-cap { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.vid-more { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (min-width: 860px) { .vid-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 270px)); overflow: visible; gap: 28px; } }

/* Тарифы — чеки */
.receipts { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); align-items: start; }
.receipt {
    --zig: 12px; padding: 20px 16px calc(18px + var(--zig)); background: #fff; font-size: 14.5px; line-height: 1.4;
    border: 1px solid var(--line); border-bottom: 0;
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / calc(2 * var(--zig)) 100%;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / calc(2 * var(--zig)) 100%;
}
.band-tint .receipt { border-color: #fff; }
.receipt h3 { font-size: 21px; }
.receipt-price { margin-top: 4px; padding-bottom: 12px; border-bottom: 2px dashed var(--line); font-weight: 800; font-size: 20px; letter-spacing: -.015em; white-space: nowrap; }
.receipt-price small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.receipt-limits { padding-block: 10px; border-bottom: 2px dashed var(--line); }
.receipt-limits li { display: flex; justify-content: space-between; gap: 8px; padding-block: 2px; color: var(--ink-2); }
.receipt-limits b { color: var(--ink); font-weight: 600; text-align: right; }
.receipt-from { margin-top: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-3); }
.receipt-feats { margin-top: 8px; }
.receipt-feats li { position: relative; padding: 2px 0 2px 16px; }
.receipt-feats li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.price-note { margin-top: 18px; max-width: 54em; font-size: 14px; color: var(--ink-3); }

.community { display: grid; gap: 0 56px; }
.community a { display: block; padding-block: 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--square); }
.community strong { display: block; font-size: 18px; }
.community a:hover strong { color: var(--pen); text-decoration: underline; }
.community span { display: block; color: var(--ink-2); font-size: 15.5px; }
@media (min-width: 860px) { .community { grid-template-columns: 1fr 1fr; } }

.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 14px 34px 14px 0; font-weight: 600; font-size: 17.5px; line-height: 1.35; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 4px; font: 700 32px/1.2 var(--hand); color: var(--coral-ink); }
.faq details[open] summary::after { content: '−'; }
.faq-a { padding-bottom: 16px; color: var(--ink-2); }

.final { text-align: left; }
.final h2 { max-width: 16em; }
.final-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Подвал */
.foot { background: var(--ink); color: #c9d5ea; font-size: 15px; }
.foot a { color: #e8eef9; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; gap: 28px; padding-block: 40px 24px; }
.foot-brand { color: #fff; font-weight: 800; font-size: 19px; }
.foot-tag { margin-top: 6px; max-width: 24em; }
.foot h3 { color: #fff; font-size: 15px; letter-spacing: 0; margin-bottom: 8px; }
.foot li { padding-block: 3px; }
.foot-marks { padding-block: 16px 26px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 12px; line-height: 1.5; color: #9fb0cd; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

/* Список статей */
.page-head { padding-block: 40px 36px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(33px, 5vw, 52px); letter-spacing: -.03em; max-width: 17em; }
.page-head p { margin-top: 12px; max-width: 40em; color: var(--ink-2); font-size: 18px; }
.blog-list { padding-block: 36px 60px; }

/* Статья */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 16px; font-size: 14px; color: var(--ink-3); }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.art-head h1 { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -.03em; max-width: 19em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 14.5px; color: var(--ink-3); }
.art-meta b { color: var(--coral-ink); font-weight: 600; }
.art-lead { margin-top: 18px; max-width: 40em; font-size: clamp(18px, 2.1vw, 20.5px); line-height: 1.55; color: var(--ink-2); }
.art { max-width: 780px; padding-block: 26px 30px; }
.art-toc { margin-bottom: 8px; border: 2px solid var(--ink); border-radius: var(--sketch); padding: 10px 18px; }
.art-toc summary { font-weight: 700; cursor: pointer; }
.art-toc ol { margin-top: 8px; padding-left: 22px; list-style: decimal; font-size: 15.5px; }
.art-toc li { padding-block: 2px; }
.art h2 { margin-top: 42px; font-size: clamp(24px, 3vw, 31px); }
.art h2 + * { margin-top: 12px; }
.art > p, .art-text { margin-top: 14px; }
.art > ul, .art > ol { margin-top: 14px; }
.art > ul li { position: relative; padding: 4px 0 4px 22px; }
.art > ul li::before { content: ''; position: absolute; left: 4px; top: 1.02em; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.art > ol { counter-reset: n; }
.art > ol li { position: relative; padding: 5px 0 5px 38px; counter-increment: n; }
.art > ol li::before { content: counter(n) '.'; position: absolute; left: 2px; top: -1px; font: 700 28px/1.3 var(--hand); color: var(--coral-ink); }
.art-note { margin-top: 20px; padding: 13px 16px; background: var(--due-bg); border-left: 4px solid var(--coral); }
.art-table { margin-top: 18px; overflow-x: auto; }
.art-table table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 15.5px; line-height: 1.4; }
.art-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.art-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

.art-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; max-width: 620px; }
.art-shots.one { grid-template-columns: minmax(0, 270px); }
.art-shots figcaption { margin-top: 7px; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.art-shots img { width: 100%; border-radius: 18px; border: 4px solid var(--ink); background: #fff; }
@media (min-width: 640px) { .art-shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.art-shots-note { margin-top: 8px; font-size: 13px; color: var(--ink-3); }

.vid { display: grid; gap: 14px; margin-top: 24px; padding: 14px; background: var(--tint); border-radius: 14px; }
.vid .vid-frame { max-width: 270px; margin-inline: auto; }
.vid-side { display: flex; flex-direction: column; gap: 6px; }
.vid-tag { font: 700 22px/1 var(--hand); color: var(--coral-ink); }
.vid-title { font-weight: 700; font-size: 19px; line-height: 1.3; }
.vid-note { font-size: 14px; color: var(--ink-3); }
.vid-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (min-width: 620px) { .vid { grid-template-columns: 240px 1fr; align-items: center; gap: 22px; } .vid .vid-frame { margin-inline: 0; } }

.art-box { margin-top: 34px; padding: 20px; border: 2px solid var(--ink); border-radius: var(--sketch); }
.art-box h2 { margin-top: 0; font-size: 23px; }
.art-box p { margin-top: 6px; color: var(--ink-2); }
.art-box-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.art-box .stores { margin-top: 16px; }
.art-faq { margin-top: 42px; }
.art-faq h2 { margin-bottom: 8px; }
.related { padding-block: 40px; background: var(--tint); border-top: 1px solid var(--line); }
.related h2 { font-size: 25px; margin-bottom: 8px; }
.related .toc-item a { border-color: var(--line); }

/* Инфографика: нарисована ручкой в тетради */
.fig { margin-top: 24px; }
.fig-sheet { padding: 20px 16px; border: 1px solid var(--line); border-radius: 4px; }
.fig figcaption { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--ink-3); }
.g-title { margin-bottom: 8px; font: 700 26px/1.15 var(--hand); color: var(--coral-ink); }

.g-flow { display: grid; gap: 28px; counter-reset: f; }
.g-flow li { position: relative; padding: 11px 13px 12px; background: #fff; border: 2px solid var(--ink); border-radius: var(--sketch); counter-increment: f; }
.g-flow li::before { content: counter(f); display: block; font: 700 25px/1 var(--hand); color: var(--coral-ink); }
.g-flow strong { display: block; font-size: 16px; line-height: 1.25; }
.g-flow span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.g-flow li:not(:last-child)::after {
    content: ''; position: absolute; left: 50%; bottom: -26px; width: 16px; height: 24px; margin-left: -8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24' fill='none' stroke='%231c4fd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 1c-1 7 1 13 0 21M2 16c2 2 4 4 6 6 2-2 4-4 6-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (min-width: 680px) {
    .g-flow { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 26px; }
    .g-flow li:not(:last-child)::after {
        left: auto; right: -25px; bottom: auto; top: 50%; margin: -8px 0 0; width: 24px; height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' fill='none' stroke='%231c4fd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 8c7-1 13 1 21 0M16 2c2 2 4 4 6 6-2 2-4 4-7 6'/%3E%3C/svg%3E");
    }
}

.g-ledger { max-width: 500px; padding-left: 28px; position: relative; }
.g-ledger::before { content: ''; position: absolute; inset-block: 0; left: 12px; width: 2px; background: var(--coral); opacity: .7; }
.g-ledger li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-block: 5px; border-bottom: 1px solid var(--square); font: 600 23px/1.25 var(--hand); color: var(--pen); }
.g-ledger .l-name { flex: 1; min-width: 40%; }
.g-ledger .l-note { flex-basis: 100%; order: 3; font: 400 14px/1.3 var(--sans); color: var(--ink-3); }
.g-ledger .is-paid .l-name, .g-ledger .is-paid .l-sum { text-decoration: line-through; opacity: .6; }
.g-mark { align-self: center; padding: 0 7px; font: 700 16px/22px var(--hand); border: 1.5px solid; border-radius: 5px; transform: rotate(-4deg); }
.g-mark.paid { color: var(--paid); }
.g-mark.late { color: var(--late); }
.g-total { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font: 700 25px/1.2 var(--hand); color: var(--ink); }

.g-compare { display: grid; gap: 14px; }
.g-compare h3 { font-size: 18px; margin-bottom: 6px; }
.g-compare li { position: relative; padding: 4px 0 4px 26px; font-size: 15.5px; line-height: 1.35; }
.g-compare li::before { position: absolute; left: 2px; top: 1px; font: 700 23px/1.1 var(--hand); }
.g-compare .was { padding: 12px 14px; background: var(--late-bg); border-radius: 8px; }
.g-compare .was li::before { content: '✗'; color: var(--late); }
.g-compare .now { padding: 12px 14px; background: var(--paid-bg); border-radius: 8px; }
.g-compare .now li::before { content: '✓'; color: var(--paid); }
@media (min-width: 620px) { .g-compare { grid-template-columns: 1fr 1fr; } }

.g-sched { position: relative; max-width: 520px; }
.g-sched li { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 0 7px 28px; }
.g-sched li::before { content: ''; position: absolute; left: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 2px solid var(--ink-3); background: #fff; z-index: 1; }
.g-sched li::after { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.g-sched li:first-child::after { top: 50%; }
.g-sched li:last-child::after { bottom: 50%; }
.g-sched .is-paid::before { background: var(--paid); border-color: var(--paid); }
.g-sched .is-late::before { background: var(--late); border-color: var(--late); }
.g-sched .is-due::before { background: #e8a200; border-color: #e8a200; }
.g-sched .s-date { flex: 1; min-width: 0; font-weight: 500; font-size: 15.5px; }
.g-sched .s-sum { font: 700 22px/1 var(--hand); color: var(--pen); white-space: nowrap; }
.g-pill { flex: none; width: 104px; padding: 2px 6px; text-align: center; font-size: 12.5px; font-weight: 600; border-radius: 99px; background: var(--tint); color: var(--ink-2); }
.is-paid .g-pill { background: var(--paid-bg); color: var(--paid); }
.is-late .g-pill { background: var(--late-bg); color: var(--late); }
.is-due .g-pill { background: var(--due-bg); color: var(--due); }
@media (max-width: 479px) {
    /* На узком экране дата — своей строкой, иначе сумма и метка её сжимают. */
    .g-sched li { flex-wrap: wrap; gap: 1px 10px; }
    .g-sched .s-date { flex: 1 1 100%; }
    .g-sched .s-sum { margin-right: auto; }
    .g-pill { width: auto; padding-inline: 9px; }
}

.g-bars li { padding-block: 5px; }
.g-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; line-height: 1.3; }
.g-bar-top b { font: 700 21px/1 var(--hand); color: var(--pen); white-space: nowrap; }
.g-bar { height: 13px; margin-top: 3px; border-bottom: 1px solid var(--line); }
.g-bar i { display: block; height: 100%; min-width: 3px; border: 1.5px solid var(--pen); border-radius: 2px; background: repeating-linear-gradient(-55deg, var(--pen) 0 1.5px, transparent 1.5px 5px); }

.g-receipt {
    --zig: 8px; width: min(100%, 340px); margin-inline: auto; padding: 16px 16px calc(14px + var(--zig)); background: #fff; font-size: 15px;
    box-shadow: 0 0 0 1px var(--line) inset;
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / calc(2 * var(--zig)) 100%;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / calc(2 * var(--zig)) 100%;
}
.g-receipt .g-title { text-align: center; }
.g-receipt li { display: flex; justify-content: space-between; gap: 10px; padding-block: 3px; }
.g-receipt li span:last-child { font-weight: 600; white-space: nowrap; }
.g-r-total { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; padding-top: 8px; border-top: 2px dashed var(--ink-3); font-weight: 800; font-size: 18px; }
.g-r-foot { margin-top: 6px; text-align: center; font: 600 20px/1.2 var(--hand); color: var(--pen); }

.g-hub { text-align: center; }
.g-hub-center { display: inline-block; padding: 9px 20px; color: #fff; background: var(--ink); font-weight: 700; border-radius: var(--sketch); }
.g-hub-nodes { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.g-hub-nodes::before { content: ''; position: absolute; left: 50%; top: -24px; height: 16px; border-left: 2px solid var(--pen); }
.g-hub-nodes::after { content: ''; position: absolute; left: 12%; right: 12%; top: -8px; border-top: 2px solid var(--pen); }
.g-hub-nodes li { position: relative; display: flex; align-items: center; justify-content: center; padding: 9px 8px; font-weight: 500; font-size: 15px; line-height: 1.25; background: #fff; border: 2px solid var(--ink); border-radius: var(--sketch); }
@media (min-width: 620px) { .g-hub-nodes { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); } }
