/* Spending explorer layouts: a sign (lettering on the wall) beside or above its receipt.
   Headline leading is 1.04: Spanish accents reach 0.98 em and "¿" drops 0.21 em, so tighter lines collide. */
.layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(28px,5vw,72px);align-items:start;padding-block:14px 8px}
@media (max-width:859px){.layout{grid-template-columns:minmax(0,1fr)}}
/* The PRELIMINAR stamp lands from a larger size; clipping at the paper's edge (the mask already hides
   anything outside it) keeps it from widening the page on a phone while it falls. */
.layout .pin>.ticket{overflow:clip}
.display{margin:0;font-weight:900;font-size:clamp(56px,9vw,128px);line-height:1.04;letter-spacing:.2px;text-transform:uppercase;text-wrap:balance;overflow-wrap:break-word;-webkit-hyphens:manual;hyphens:manual}
.lead{margin:16px 0 0;font-weight:600;font-size:clamp(21px,2.1vw,27px);line-height:1.14;max-width:32ch;text-wrap:pretty}
/* The home total: a red tag by day, the marker by night. A gradient, so motion.js can draw it on. */
.total-tag{--tag:var(--stamp);font-weight:700;background:linear-gradient(var(--tag),var(--tag)) no-repeat 0 0/100% 100%;color:#FFFFFF;padding:.02em .2em;border-radius:.16em;white-space:nowrap}
:root[data-theme="dark"] .total-tag{--tag:var(--marker);color:var(--ink);border-radius:0}
.controls{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.controls .select-wrap{color:var(--on-wall)}
.period-wrap{min-width:0;max-width:100%}
.period-wrap select{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
@media (max-width:374px){.period-wrap .select-wrap select{font-size:17px;padding:0 42px 0 16px}}
.hint{font-family:var(--font-ticket);font-size:13px;line-height:1.5;margin:16px 0 0;color:var(--on-wall-soft)}
.source-line{margin:22px 0 0;font-family:var(--font-ticket);font-size:12.5px;line-height:1.6;color:var(--on-wall-soft);max-width:52ch}
.source-line a{color:var(--on-wall)}

/* Category */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;font-family:var(--font-ticket);font-size:13px;margin:0 0 14px}
.crumbs a{display:inline-flex;align-items:center;min-height:36px;padding:0 2px}
.crumbs span[aria-current]{padding:6px 2px}
.cat-name{margin:0;font-weight:800;font-size:clamp(30px,4.2vw,52px);line-height:1.04;letter-spacing:.3px;text-transform:uppercase;text-wrap:balance;overflow-wrap:break-word;-webkit-hyphens:manual;hyphens:manual}
.big{margin:14px 0 0;font-weight:900;font-size:clamp(96px,15vw,180px);line-height:.82;letter-spacing:-.5px;white-space:nowrap}
.big.tiny{font-size:clamp(52px,7vw,92px);line-height:.9;white-space:normal}
/* Context under the main sentence: quieter, so the big number stays the headline. */
.within{margin:14px 0 0;font-weight:500;font-size:17px;line-height:1.25;color:var(--on-wall-soft);max-width:34ch;text-wrap:pretty}
.amount{margin:14px 0 0}
.lost{padding-block:24px;display:grid;gap:16px;justify-items:start}

/* Sources */
.methods{max-width:66ch;display:grid;gap:28px}
.methods h2{margin:0 0 6px;font-weight:800;font-size:clamp(26px,2.6vw,32px);line-height:1;letter-spacing:.3px;text-transform:uppercase}
.methods p{margin:0 0 10px;font-family:var(--font-ticket);font-size:15px;line-height:1.7}
.methods section{display:block}
.method-links{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin-top:18px}
.method-links a{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:800;font-size:19px}

/* Share dialog */
#share-canvas{display:none}
#share-preview{display:block;width:auto;max-width:100%;max-height:min(56dvh,600px);margin:16px auto 14px;border-radius:6px;box-shadow:0 6px 18px rgba(35,34,43,.25);-webkit-touch-callout:default}
#share-preview[hidden]{display:none}
.share-actions{display:flex;gap:10px}
.share-actions>*{flex:1 1 0;min-width:0;padding-inline:12px;white-space:nowrap}
@media (max-width:374px){.share-actions>*{font-size:17px;padding-inline:6px}}
.share-actions [hidden]{display:none}
.share-actions a[aria-disabled="true"]{opacity:.5;cursor:wait}
#share-status{font-size:13px;margin:10px 0 0;color:var(--ink)}
#share-status:empty{display:none}
.ticket .t-ref{margin-top:12px}
.nowrap{white-space:nowrap}
