/* Tax calculators hub (tax-calculators.php). Site plan: hub opener with a live quick sum; set piece: five receipt slips
   printing down a ledger as you scroll. Backgrounds: white opener → ink ledger → blush notes → crimson CTA → wine footer. */

/* ---------- Opener ---------- */
.ch { position: relative; background: var(--paper); padding: calc(var(--head-h) + clamp(26px, 4.6vh, 54px)) 0 clamp(40px, 6vh, 64px); overflow: clip; }
.ch__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(117,21,35,.07) 31px, rgba(117,21,35,.07) 32px); animation: ch-drift 20s linear infinite; }
.ch__ruling::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(14px, 3.2vw, 52px); width: 1px; background: rgba(163,24,62,.38); }
@keyframes ch-drift { to { background-position: 0 32px; } }
.ch__oval { position: absolute; right: -16vw; top: -18%; width: min(1100px, 80vw); overflow: visible; pointer-events: none; }
.ch__oval ellipse { fill: none; stroke: rgba(163,24,62,.14); stroke-width: 1.4; }
.ch__oval .dash { stroke: rgba(163,24,62,.3); stroke-dasharray: 3 12; animation: dash-turn 46s linear infinite; }
.ch__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) min(390px, 34%); gap: clamp(40px, 6vw, 110px); align-items: center; }
.ch__title { font-size: clamp(2.5rem, min(4.6vw, 8.4vh), 4.6rem); line-height: 1.03; margin-bottom: clamp(14px, 2.4vh, 24px); }
.ch__lede { color: var(--ink); margin-bottom: clamp(20px, 3vh, 30px); }
.ch__chips { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: clamp(20px, 3vh, 30px); }
.ch__chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--rule); background: #fff; font-weight: 600; font-size: .97rem; color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--highlight), var(--highlight)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 100%; transition: background-size .45s var(--ease), border-color .3s; }
.ch__chips a:hover { background-size: 100% 100%; border-color: var(--highlight); }

/* The quick VAT sum, on a till receipt */
.qv { position: relative; width: 100%; margin: 0; }
.qv__paper { position: relative; padding: 20px 22px 24px; background: #FFFDF8; border-left: 3px solid var(--crimson); transform: rotate(1.5deg); box-shadow: 0 30px 60px rgba(34,9,15,.18); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #F2E4E7 31px, #F2E4E7 32px); background-position: 0 12px; }
.qv__paper::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; background: linear-gradient(-45deg, transparent 5px, #FFFDF8 0) 0 0 / 10px 8px repeat-x, linear-gradient(45deg, transparent 5px, #FFFDF8 0) 0 0 / 10px 8px repeat-x; }
.qv p { margin: 0; }
.qv__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; margin-bottom: 14px !important; border-bottom: 3px double var(--ink); font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.qv__head b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 700; font-size: .95rem; color: var(--crimson); }
.qv__live { width: 9px; height: 9px; border-radius: 50%; background: var(--crimson); animation: qv-pulse 2s infinite; }
@keyframes qv-pulse { 0% { box-shadow: 0 0 0 0 rgba(163,24,62,.5); } 70% { box-shadow: 0 0 0 9px rgba(163,24,62,0); } 100% { box-shadow: 0 0 0 0 rgba(163,24,62,0); } }
.qv__mode { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--rule); background: #fff; }
.qv__mode label { position: relative; cursor: pointer; }
.qv__mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qv__mode span { display: grid; place-items: center; min-height: 44px; border-radius: var(--btn-r); font-weight: 700; font-size: .98rem; color: var(--ink); transition: background .35s var(--ease), color .35s; }
.qv__mode input:checked + span { background: var(--claret); color: #fff; }
.qv__mode input:focus-visible + span { outline: 3px solid var(--highlight); outline-offset: 2px; }
.qv__field { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 700; font-size: .95rem; color: var(--ink-soft); }
.qv__input { position: relative; display: block; }
.qv__input i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 600; font-size: 1.3rem; color: var(--claret); }
.qv__input input { width: 100%; min-height: 54px; padding: 8px 14px 8px 36px; border: 1.5px solid var(--ink); border-radius: 0; background: #fff; font: 600 1.35rem/1.2 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.qv__input input:focus { outline: 3px solid var(--highlight); outline-offset: 1px; }
.qv__line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #DCCBD0; font-size: 1rem; }
.qv__line span { color: var(--ink-soft); }
.qv__line b { font-weight: 600; }
.qv__total { display: flex; flex-direction: column; margin-top: 8px !important; padding-top: 6px; }
.qv__total span { font-size: .9rem; font-weight: 700; color: var(--claret); text-transform: uppercase; letter-spacing: .07em; }
.qv__total b { font: 600 clamp(2rem, 3vw, 2.6rem)/1.05 var(--sans); letter-spacing: -.035em; color: var(--crimson); }
.qv__go { margin-top: 12px; }
.js .qv__go { display: none; }
.qv__foot { margin-top: 12px !important; }
.motion:not(.motion-fail) [data-ch-in], .motion:not(.motion-fail) [data-ch-card] { opacity: 0; }
@media (max-width: 1000px) { .ch__grid { grid-template-columns: minmax(0, 1fr); } .qv { width: min(100%, 400px); } }
@media (max-width: 560px) { .ch__title { font-size: clamp(2.1rem, 9.4vw, 2.7rem); } .ch .btn-row .btn { flex: 1 1 auto; padding-inline: 1em; } .ch__chips { display: none; } .ch__lede { margin-bottom: 18px; } .qv { margin-top: 6px; } .qv__paper { transform: rotate(.8deg); } }

/* ---------- The ledger: five slips printing as you scroll ---------- */
.cledger { overflow: clip; }
.cledger__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(255,255,255,.04) 35px, rgba(255,255,255,.04) 36px); animation: cledger-drift 22s linear infinite; }
@keyframes cledger-drift { to { background-position: 0 36px; } }
.cledger .wrap { position: relative; }
.cledger h2 { color: #fff; }
.cledger__rows { position: relative; display: grid; gap: clamp(56px, 8vh, 96px); padding-bottom: 10px; }
.cledger__spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255,255,255,.12); }
.cledger__spine span { position: absolute; inset: 0; background: var(--crimson); transform-origin: top; transform: scaleY(var(--sp, 1)); }
.lrow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(60px, 9vw, 150px); align-items: center; }
.lrow__node { position: absolute; left: 50%; top: 50%; width: 22px; height: 15px; margin: -7px 0 0 -11px; border-radius: 50%; background: var(--ink-blue); border: 2.5px solid rgba(255,255,255,.6); transition: background .4s, border-color .4s, transform .4s var(--ease); z-index: 1; }
.lrow.is-printed .lrow__node, .no-js .lrow__node, .rm .lrow__node { background: var(--highlight); border-color: #fff; transform: scale(1.2); }
.lrow__printer { position: relative; justify-self: end; width: min(100%, 420px); }
.lrow--flip .lrow__printer { grid-column: 2; justify-self: start; }
.lrow--flip .lrow__copy { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }
.lrow--flip .lrow__copy .btn { margin-left: auto; }
.lrow__slot { position: relative; z-index: 2; height: 22px; margin: 0 -14px; background: #0B141E; border-radius: 3px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.4), 0 10px 20px rgba(0,0,0,.35); }
.lrow__slot::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; background: #000; border-radius: 2px; }
.lrow__led { position: absolute; right: 12px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #5DD39E; box-shadow: 0 0 8px #5DD39E; animation: led 1.6s ease-in-out infinite; }
@keyframes led { 50% { opacity: .35; } }
.lrow__feed { position: relative; padding: 0 0 30px; margin-top: -4px; }
.rs { position: relative; transform-origin: 50% 0; }
.rs__inner { position: relative; padding: 18px 22px 18px; background: #FFFDF6; color: #2A2023; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #F2E6E8 27px, #F2E6E8 28px); background-position: 0 14px; filter: drop-shadow(0 20px 22px rgba(0,0,0,.35)); }
.rs__inner::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; background: linear-gradient(-45deg, transparent 6px, #FFFDF6 0) 0 0 / 12px 10px repeat-x, linear-gradient(45deg, transparent 6px, #FFFDF6 0) 0 0 / 12px 10px repeat-x; }
.rs p { margin: 0; }
.rs__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 8px; margin-bottom: 8px !important; border-bottom: 3px double #2A2023; font-family: var(--serif); font-size: 1.32rem; line-height: 1.15; }
.rs__head b { font-family: var(--sans); font-weight: 700; font-size: .85rem; color: var(--claret); white-space: nowrap; }
.rs__line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 1rem; line-height: 22px; }
.rs__line span:first-child { color: #5A4C50; }
.rs__line span:last-child { font-weight: 600; white-space: nowrap; }
.rs__line.is-minus span:last-child { color: var(--claret); }
.rs__line.is-soft span:last-child { color: #5A4C50; font-weight: 500; }
.rs__total { display: flex; flex-direction: column; margin-top: 8px !important; padding-top: 8px; border-top: 2px solid #2A2023; }
.rs__total span { font-size: .88rem; font-weight: 700; color: var(--claret); text-transform: uppercase; letter-spacing: .07em; }
.rs__total b { font: 600 clamp(2rem, 2.8vw, 2.6rem)/1.05 var(--sans); letter-spacing: -.035em; color: var(--crimson); }
.rs__note { margin-top: 8px !important; padding-top: 6px; border-top: 1px dashed #C9BBBF; font-size: .92rem; color: #5A4C50; }
.rs__stamp { position: absolute; right: 18px; bottom: 50px; width: 112px; height: 70px; display: grid; place-content: center; text-align: center; border: 3px solid var(--crimson); outline: 1.5px solid var(--crimson); outline-offset: -8px; border-radius: 50%; color: var(--crimson); background: rgba(255,253,246,.75); transform: rotate(-11deg); pointer-events: none; }
.rs__stamp span { font-family: var(--serif); font-size: 1.12rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.rs__stamp small { font-weight: 700; font-size: .66rem; letter-spacing: .14em; margin-top: 2px; }
.motion:not(.motion-fail) [data-rs-stamp] { opacity: 0; }
.lrow__copy { min-width: 0; }
.lrow__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.3rem); line-height: 1.1; color: #fff; margin-bottom: 12px; }
.lrow__copy p { color: var(--on-dark-soft); margin-bottom: 22px; }
.lrow__copy .btn { display: flex; width: fit-content; }
@media (max-width: 900px) {
  .cledger__spine { left: 10px; }
  .cledger__rows { gap: 54px; padding-left: 40px; }
  .cledger__spine { left: 10px; }
  .lrow, .lrow--flip { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .lrow__node { left: -30px; top: 10px; margin: 0 0 0 -11px; }
  .lrow__printer, .lrow--flip .lrow__printer { grid-column: 1; justify-self: start; width: min(100%, 400px); }
  .lrow--flip .lrow__copy { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; }
  .lrow--flip .lrow__copy .btn { margin-left: 0; }
  .cledger__spine { left: calc(10px); }
}
@media (max-width: 560px) {
  .cledger__rows { padding-left: 26px; }
  .cledger__spine { left: 4px; }
  .lrow__node { left: -22px; }
  .lrow__slot { margin: 0 -8px; }
  .rs__inner { padding: 14px 16px; }
  .rs__line { font-size: .95rem; }
  .rs__stamp { width: 100px; height: 62px; right: 8px; }
}

/* ---------- Before you rely on the figures ---------- */
.cread { overflow: clip; }
.cread__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 110px); align-items: center; }
.cread__media { position: relative; margin: 0; padding: 0 22px 30px 0; }
.cread__frame { aspect-ratio: 1264 / 848; max-height: var(--media-cap); box-shadow: 22px 22px 0 rgba(117,21,35,.12); }
.cread__frame img { position: absolute; inset: -6% 0 auto; height: 112%; }
.motion .cread__frame { animation: cr-breathe 10s ease-in-out infinite alternate; }
@keyframes cr-breathe { from { transform: scale(1); } to { transform: scale(1.025); } }
.cread__hl { position: absolute; left: 6%; right: 18%; bottom: 0; width: 76%; height: 40px; overflow: visible; }
.cread__hl path { fill: none; stroke: var(--highlight); stroke-width: 16; stroke-linecap: round; opacity: .85; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.motion:not(.motion-fail) .cread__hl path { stroke-dashoffset: 1; }
.cread__cap { left: auto; right: 10px; top: 18px; bottom: auto; border-left: 3px solid var(--crimson); box-shadow: 0 10px 24px rgba(34,9,15,.14); }
.cread__copy h2 { margin-bottom: 18px; }
.cread__copy .lede { margin-bottom: 22px; }
.cread__h3 { font-size: 1.15rem; margin-bottom: 12px; }
.cread__list { font-weight: 600; margin-bottom: 22px; }
.cread__links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; }
@media (max-width: 900px) { .cread__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CTA ---------- */
.ccta { overflow: clip; padding-block: clamp(64px, 8vw, 110px); }
.ccta__oval { position: absolute; right: -18vw; top: -40%; width: 70vw; height: 140%; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 0 0 40px rgba(255,255,255,.035), inset 0 0 0 80px rgba(255,255,255,.025); animation: wobble 24s ease-in-out infinite alternate; pointer-events: none; }
.ccta__grid { position: relative; display: grid; grid-template-columns: min(420px, 34%) minmax(0, 1fr); gap: clamp(40px, 6vw, 110px); align-items: center; }
.ccta h2 { color: #fff; margin-bottom: 18px; }
.ccta__copy > p { font-size: clamp(1.08rem, 1.25vw, 1.2rem); color: #FBE3E8; margin-bottom: 28px; }
.ccta__photo { position: relative; margin: 0; padding: 18px 0 0 18px; width: 100%; }
.ccta__photo::before { content: ''; position: absolute; inset: 0 18px 18px 0; border: 1.5px solid rgba(255,255,255,.55); pointer-events: none; }
.ccta__photo .frame { position: relative; aspect-ratio: 1; max-height: var(--media-cap); }
.ccta__photo .frame img { position: absolute; inset: -6% 0 auto; height: 112%; }
.motion .ccta__photo .frame { animation: cr-breathe 9s ease-in-out infinite alternate; }
.ccta__photo .cap { left: auto; right: -8px; bottom: 26px; border-left: 3px solid var(--highlight); box-shadow: 0 12px 26px rgba(0,0,0,.25); }
.ccta__next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 30px; }
.ccta__next a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 16px; background: rgba(255,255,255,.1); border-left: 3px solid var(--highlight); color: #fff; font-weight: 700; text-decoration: none; transition: background .3s, transform .35s var(--ease); }
.ccta__next a:hover { background: rgba(255,255,255,.2); transform: translateX(6px); }
.ccta__next svg { width: 18px; flex: none; }
@media (max-width: 900px) { .ccta__grid { grid-template-columns: minmax(0, 1fr); } .ccta__photo { width: min(80%, 340px); } .ccta__next { grid-template-columns: minmax(0, 1fr); } }
