/* Relicmark exact-match ledger (card pages, trending lists). Every rule is scoped under .rm-ledger, except the
   .rm-lchip / .rm-vh composite chip used next to card links on listing pages and the .rm-snap collapsed snapshot. */
.rm-ledger{--rm-bg:#fff8f3;--rm-panel:#fff;--rm-line:#e8ded6;--rm-accent:#c8161e;--rm-ink:#1f1a17;--rm-muted:#5e5450;--rm-tint:#fbefea;color:var(--rm-ink);box-sizing:border-box;max-width:none}
.rm-ledger *,.rm-ledger *:before,.rm-ledger *:after{box-sizing:border-box}
.rm-ledger p{max-width:none}
.rm-ledger .rm-price,.rm-ledger table,.rm-ledger .rm-stats strong{font-variant-numeric:tabular-nums}

/* hero */
.rm-ledger.rm-hero{display:grid;grid-template-columns:minmax(8.5rem,11.5rem) minmax(0,1fr) minmax(14rem,19rem);grid-template-areas:'slab head comp' 'slab body comp';grid-template-rows:auto 1fr;gap:clamp(1.25rem,2.5vw,2rem);align-items:start;margin:1.5rem 0 1.6rem;padding:clamp(1.1rem,2.5vw,2rem);background:var(--rm-panel);border:1px solid var(--rm-line);border-radius:14px;box-shadow:0 5px 20px rgba(54,33,24,.04)}
.rm-ledger .rm-kicker{margin:0;color:var(--rm-muted);font-size:.78rem;letter-spacing:.09em;text-transform:uppercase}
.rm-ledger h1{margin:.35rem 0 .9rem;font-size:clamp(1.6rem,2.6vw,2.3rem);letter-spacing:-.02em;line-height:1.15}
.rm-ledger h1 .h1-sub{font-size:clamp(.95rem,1.3vw,1.1rem);line-height:1.4}
.rm-ledger .rm-hero-head{grid-area:head;min-width:0}.rm-ledger .rm-hero-body{grid-area:body;min-width:0}.rm-ledger.rm-hero>.rm-slab{grid-area:slab}.rm-ledger.rm-hero>.rm-comp{grid-area:comp}

/* slab placeholder */
.rm-ledger .rm-slab{padding:.55rem;border:3px solid #e2d6cf;border-radius:10px;background:linear-gradient(180deg,#f6f1ee,#ebe3de)}
.rm-ledger .rm-slab-label{display:flex;justify-content:space-between;gap:.3rem;padding:.4rem .5rem;border:2px solid var(--rm-accent);border-radius:4px;background:#fff;font-size:.62rem;line-height:1.35;color:var(--rm-ink)}
.rm-ledger .rm-slab-lines{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.rm-ledger .rm-slab-red{color:var(--rm-accent);font-weight:750}
.rm-ledger .rm-slab-grader{font-weight:800;font-size:.85rem;color:var(--rm-accent);letter-spacing:.02em}
.rm-ledger .rm-slab-art{display:flex;align-items:flex-end;justify-content:center;aspect-ratio:5/7;margin-top:.55rem;padding:.8rem .5rem;border-radius:4px;background:linear-gradient(160deg,#0b2a6b 0%,#163f8f 55%,#c9d6ee 100%);color:#fff;font-weight:750;font-size:.78rem;text-align:center;letter-spacing:.03em;text-shadow:0 1px 2px rgba(0,0,0,.45)}

/* chips, stats */
.rm-ledger .rm-chips{display:flex;flex-wrap:wrap;gap:.45rem;list-style:none;margin:0 0 1rem;padding:0}
.rm-ledger .rm-chip{margin:0;padding:.25rem .8rem;border-radius:999px;background:var(--rm-tint);color:var(--rm-ink);font-size:.88rem}
.rm-ledger .rm-chip-exact{background:var(--rm-accent);color:#fff;font-weight:700}
.rm-ledger .rm-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;list-style:none;margin:0;padding:0}
.rm-ledger .rm-stats li{margin:0;padding:.75rem .85rem;border:1px solid var(--rm-line);border-radius:10px;background:#fffaf7}
.rm-ledger .rm-stats strong{display:block;font-size:1.35rem;line-height:1.2}
.rm-ledger .rm-stats span{display:block;color:var(--rm-muted);font-size:.8rem;line-height:1.3;margin-top:.2rem}

/* composite */
.rm-ledger .rm-comp{text-align:right;padding-left:clamp(1rem,2vw,1.75rem);border-left:1px solid var(--rm-line);align-self:stretch}
.rm-ledger .rm-price{margin:.2rem 0 .1rem;color:var(--rm-accent);font-size:clamp(2.4rem,4.2vw,3.4rem);font-weight:800;line-height:1.05;letter-spacing:-.02em}
.rm-ledger .rm-comp-empty{margin:.4rem 0 .2rem;color:var(--rm-ink);font-size:1.6rem;font-weight:750;line-height:1.15}
.rm-ledger .rm-comp-meta{margin:.2rem 0 .6rem;color:var(--rm-muted);font-size:.92rem}
.rm-ledger .rm-comp-meta strong{color:var(--rm-ink)}
.rm-ledger .rm-range{position:relative;height:.5rem;margin:.9rem 0 .4rem;border-radius:999px;background:#efe6e0}
.rm-ledger .rm-range-fill{position:absolute;top:0;bottom:0;left:var(--l);right:calc(100% - var(--r));border-radius:999px;background:#eba3a0}
.rm-ledger .rm-range-mark{position:absolute;top:50%;left:var(--m);width:4px;height:1.35rem;border-radius:2px;background:#a3121a;transform:translate(-50%,-50%)}
.rm-ledger .rm-range-text{margin:.3rem 0 .7rem;color:var(--rm-muted);font-size:.92rem}
.rm-ledger .rm-comp-note{margin:.4rem 0 0;color:var(--rm-muted);font-size:.92rem}
.rm-ledger .rm-comp-note strong{color:var(--rm-ink)}
.rm-ledger .rm-fresh,.rm-ledger .rm-evidence{margin:.45rem 0 0;color:var(--rm-muted);font-size:.84rem;line-height:1.45}.rm-ledger .rm-evidence{color:var(--rm-ink)}
.rm-ledger .rm-stale{display:block;margin-top:.4rem;color:#7a4b00}

/* panel grid */
.rm-ledger.rm-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:1.25rem;margin:0 0 1rem;align-items:start}
.rm-ledger .rm-panel{min-width:0;padding:clamp(1rem,2.2vw,1.6rem);background:var(--rm-panel);border:1px solid var(--rm-line);border-radius:14px;box-shadow:0 5px 20px rgba(54,33,24,.04)}
.rm-ledger .rm-panel-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.2rem 1rem;margin-bottom:.6rem}
.rm-ledger .rm-panel h2{margin:0;font-size:1.25rem}
.rm-ledger .rm-panel h2:before{content:"";display:block;width:2.25rem;height:3px;background:var(--rm-accent);border-radius:2px;margin-bottom:.6rem}
.rm-ledger .rm-panel-head p{margin:0;color:var(--rm-muted);font-size:.9rem}
.rm-ledger .rm-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.rm-ledger table{width:100%;margin:0;border:0;border-radius:0;border-collapse:collapse;background:none;font-size:.95rem}
.rm-ledger th,.rm-ledger td{padding:.55rem .45rem;border:0;border-bottom:1px solid var(--rm-line);text-align:left;vertical-align:middle;white-space:nowrap}
.rm-ledger thead th{background:none;border-radius:0;border-bottom:1px solid #d9ccc3;color:var(--rm-muted);font-size:.75rem;font-weight:650;letter-spacing:.06em;text-transform:uppercase}
.rm-ledger tbody tr:last-child>*{border-bottom:1px solid var(--rm-line)}
.rm-ledger td s{color:var(--rm-muted)}
.rm-ledger td:last-child{white-space:normal;min-width:8.5rem}
.rm-ledger td a{color:var(--rm-ink);text-decoration-color:#8c7d76}
.rm-ledger td a:hover{color:var(--rm-accent);text-decoration-color:currentColor}
.rm-ledger .rm-ref{display:block;margin-top:.1rem;color:var(--rm-muted);font-size:.78rem;overflow-wrap:anywhere}
.rm-ledger .rm-ref a{color:inherit;white-space:nowrap}
.rm-ledger .rm-comp-meta .rm-pill{display:table;margin-top:.3rem}
@media (min-width:901px){.rm-ledger.rm-hero>.rm-comp .rm-comp-meta .rm-pill{margin-left:auto}}
.rm-ledger .rm-note{margin:.8rem 0 0;color:var(--rm-muted);font-size:.92rem}
.rm-ledger .rm-empty{margin:.4rem 0 0;color:var(--rm-muted);font-style:italic}

/* status pills: text/background pairs all >= 4.5:1 */
.rm-ledger .rm-pill{display:inline-block;padding:.12rem .6rem;border-radius:.75rem;font-size:.84rem;line-height:1.45}
.rm-ledger .rm-ok{background:#e4f3e8;color:#1b6332}
.rm-ledger .rm-warn{background:#fdf0d2;color:#734c00}
.rm-ledger .rm-bad{background:#fbe4e4;color:#9e1118}
.rm-ledger .rm-muted{background:#f1ebe7;color:#564c48}
.rm-ledger .rm-neutral{background:#f7efe9;color:var(--rm-ink)}

/* corrections */
.rm-ledger .rm-corrections{list-style:none;margin:0;padding:0}
.rm-ledger .rm-corrections li{margin:0 0 .75rem;padding:.7rem 1rem;border-left:4px solid var(--rm-accent);border-radius:0 10px 10px 0;background:var(--rm-tint)}
.rm-ledger .rm-corrections p{margin:0}
.rm-ledger .rm-corrections .rm-by{margin-top:.15rem;color:var(--rm-muted);font-size:.84rem}

.rm-ledger.rm-fine{margin:0 0 2rem;color:var(--rm-muted);font-size:.85rem;max-width:60rem}
details.rm-more>summary{cursor:pointer;width:fit-content}
.rm-ledger.rm-fine p{margin:0 0 .4rem}.rm-ledger.rm-fine summary{cursor:pointer;width:fit-content}.rm-ledger.rm-fine details p{margin:.4rem 0 0}

/* price check (pricecheck.js fills .rm-check-out) */
.rm-check{margin:0 0 1.25rem;padding:1rem 1.25rem;border:1px solid #e8ded6;border-radius:14px;background:#fff;color:#1f1a17}
.rm-check[hidden]{display:none}
.rm-check-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .8rem;margin-bottom:.6rem}
.rm-check-head label{font-weight:750;font-size:1.05rem}
.rm-check-head span{color:#5e5450;font-size:.92rem}
.rm-check-row{display:flex;align-items:center;gap:.4rem;max-width:22rem}
.rm-check-row>span{font-weight:700;font-size:1.1rem}
.rm-check-row input{flex:1 1 auto;min-width:0;padding:.55rem .7rem;border:1px solid #8c7d76;border-radius:8px;font:inherit;font-size:1.05rem;font-variant-numeric:tabular-nums}
.rm-check-row button{padding:.55rem 1.1rem;border:0;border-radius:8px;background:#c8161e;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.rm-check-row input:focus-visible,.rm-check-row button:focus-visible{outline:2px solid #1f1a17;outline-offset:2px}
.rm-check-out:not(:empty){margin-top:.9rem}
.rm-strip{position:relative;height:26px;margin:0 6px 4px;border-bottom:2px solid #e8ded6}
.rm-strip span{position:absolute;bottom:-2px;transform:translateX(-50%)}
.rm-strip-dot{width:9px;height:9px;bottom:4px!important;border-radius:50%;background:#1f7a3d;opacity:.75}
.rm-strip-comp{width:2px;height:22px;background:#1f1a17}
.rm-strip-you{width:14px;height:10px;bottom:-12px!important;background:#c8161e;clip-path:polygon(50% 0,100% 100%,0 100%)}
.rm-check-key{display:flex;flex-wrap:wrap;gap:.2rem 1rem;margin:.7rem 0 .5rem;font-size:.8rem;color:#5e5450}
.rm-check-key span:before{content:"";display:inline-block;margin-right:.35rem;vertical-align:middle}
.rm-key-dot:before{width:9px;height:9px;border-radius:50%;background:#1f7a3d}
.rm-key-comp:before{width:2px;height:12px;background:#1f1a17}
.rm-key-you:before{width:10px;height:8px;background:#c8161e;clip-path:polygon(50% 0,100% 100%,0 100%)}
.rm-check-line{margin:.25rem 0;max-width:46rem}
.rm-check-main{font-weight:650;font-size:1.05rem}
.rm-check-fine{margin:.5rem 0 0;color:#5e5450;font-size:.8rem}

/* maker, league and grader */
.rm-ledger.rm-listings{margin:0 0 1.25rem;padding:1rem 1.25rem;border:1px solid var(--rm-line);border-radius:14px;background:var(--rm-panel)}
.rm-listings-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1rem}
.rm-ledger.rm-listings h2{margin:0;font-size:1.05rem}
.rm-ledger .rm-listings-add{display:inline-flex;align-items:center;min-height:44px;padding:.45rem .9rem;border-radius:8px;background:#b3141c;color:#fff;font-weight:650;text-decoration:none}
.rm-ledger .rm-listings-add:hover{background:#8a0e14;color:#fff}
.rm-ledger .rm-listings-empty{margin:.5rem 0 0;color:var(--rm-muted);font-size:.92rem}
.rm-listings-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:.7rem 0 0}
.rm-listings-chip{min-height:44px;padding:.3rem .8rem;border:1px solid #8c7d76;border-radius:999px;background:#fff;color:#1f1a17;font:inherit;font-size:.9rem;cursor:pointer}
.rm-listings-chip[aria-pressed="true"]{background:#1f1a17;border-color:#1f1a17;color:#fff}
.rm-ledger .rm-listings-list{list-style:none;margin:.6rem 0 0;padding:0}
.rm-ledger .rm-listings-list li{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .7rem;max-width:none;margin:0;padding:.45rem 0;border-top:1px solid var(--rm-line);overflow-wrap:anywhere}
.rm-ledger .rm-listings-list a{font-weight:650}
.rm-listings-when,.rm-ledger .rm-listings-none{color:var(--rm-muted);font-size:.88rem}
.rm-ledger .rm-listings-note{margin:.5rem 0 0;color:var(--rm-muted);font-size:.8rem}
.rm-ledger .rm-wordmark{font-weight:800;font-size:.6rem;line-height:1.1;text-align:center;text-transform:uppercase}
.rm-ledger .rm-brands{list-style:none;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:flex-start;gap:.5rem;margin:1rem 0 0;padding:0}
.rm-ledger .rm-brands li{display:flex;flex-direction:column;align-items:center;gap:.25rem;width:58px;margin:0;max-width:none}
.rm-ledger .rm-brand-mark{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:58px;height:48px;padding:5px;border:1px solid var(--rm-line);border-radius:9px;background:#fff}
.rm-ledger .rm-brand-mark a{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.rm-ledger .rm-brand-mark img{display:block;max-width:100%;max-height:100%;width:auto;height:auto}
.rm-ledger .rm-brand-mark .rm-wordmark{color:#1f1a17}
.rm-ledger .rm-brand-cap{font-size:.6rem;line-height:1.2;letter-spacing:.05em;text-transform:uppercase;text-align:center;color:var(--rm-muted)}
@media (max-width:900px){.rm-ledger .rm-brands{justify-content:flex-start}}

/* trending top lists */
.rm-ledger.rm-top{margin:1.25rem 0 1.5rem}
.rm-ledger.rm-top h2{margin:0 0 .2rem}
.rm-ledger .rm-top-sub{margin:0;color:var(--rm-muted);font-size:.92rem}

/* composite chip next to card links (listing pages, trending, directory search results) */
.rm-lchip{display:inline-block;margin-left:.3rem;padding:.05rem .5rem;border-radius:999px;background:#fbefea;color:#1f1a17;font-size:.8rem;font-weight:650;line-height:1.5;white-space:nowrap;font-variant-numeric:tabular-nums;vertical-align:.06em}
.rm-lchip-none{background:#f1ebe7;color:#564c48;font-weight:400}
.rm-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* home page lede (outside .rm-ledger) */
.rm-lede{max-width:48rem;margin:1rem 0 1.25rem;font-size:1.05rem;line-height:1.55}

/* superseded 2 November snapshot on card pages: collapsed by default, outside .rm-ledger so colours are literal */
.rm-snap{margin:1.5rem 0;border:1px solid #e8ded6;border-radius:10px;background:#fff}
.rm-snap>summary{cursor:pointer;padding:.75rem 1rem;color:#5e5450}
.rm-snap[open]>summary{border-bottom:1px solid #e8ded6}
.rm-snap>:not(summary){margin-left:1rem;margin-right:1rem}
.rm-snap .rm-snap-note{max-width:44rem;padding:.7rem 1rem;border:1px solid #e8ded6;border-radius:10px;background:#fbefea}

@media (max-width:960px){.rm-ledger.rm-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:900px){
.rm-ledger.rm-hero{grid-template-columns:9.5rem minmax(0,1fr);grid-template-areas:'head head' 'slab comp' 'body body';grid-template-rows:auto auto auto}
.rm-ledger .rm-slab{width:auto}
.rm-ledger .rm-comp{text-align:left;padding-left:0;padding-top:0;border-left:0;align-self:start}.rm-ledger .rm-comp .rm-price{font-size:clamp(1.9rem,9vw,2.6rem)}
}
@media (max-width:40rem){.rm-ledger .rm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.rm-ledger.rm-hero{grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'comp' 'body'}.rm-ledger.rm-hero>.rm-slab{display:none}.rm-ledger .rm-comp{padding-top:1rem;border-top:1px solid var(--rm-line)}.rm-ledger .rm-comp .rm-price{font-size:2.6rem}}
@media (forced-colors:active){.rm-ledger .rm-pill,.rm-ledger .rm-chip,.rm-lchip{border:1px solid CanvasText}.rm-ledger .rm-range-mark,.rm-strip-dot,.rm-strip-comp,.rm-strip-you,.rm-key-dot:before,.rm-key-comp:before,.rm-key-you:before{background:CanvasText;forced-color-adjust:none}.rm-strip-you,.rm-key-you:before{background:Highlight}}


/* Sales table from tablet up: venue cells wrap instead of pushing Status out of the panel; the sales panel takes the
   whole row when the card has no asking prices (build_pages.grid leaves that panel out). */
.rm-ledger [aria-labelledby="rm-sales"] td:nth-child(2){white-space:normal;min-width:8.6rem}
.rm-ledger [aria-labelledby="rm-sales"] td:last-child{min-width:7.6rem}
.rm-ledger.rm-grid>.rm-wide{grid-column:1/-1}
/* Stat tiles: four columns inside the three-column hero break labels into letter stacks between 901 and 1199px. */
@media (min-width:901px) and (max-width:1199px){.rm-ledger .rm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Sales table on phones: one block per sale (date and price; venue and its source link; status), no sideways scroll.
   ponytail: nth-child positions assume Date, Venue, Price, Cert linked, Status; renumber if sales_panel() changes. */
@media (max-width:46rem){
.rm-ledger section[aria-labelledby="rm-sales"] thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.rm-ledger section[aria-labelledby="rm-sales"] table,.rm-ledger section[aria-labelledby="rm-sales"] tbody{display:block}
.rm-ledger section[aria-labelledby="rm-sales"] tr{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .6rem;padding:.6rem 0;border-bottom:1px solid var(--rm-line)}
.rm-ledger section[aria-labelledby="rm-sales"] td{display:block;padding:0;border:0;white-space:normal;min-width:0}
.rm-ledger section[aria-labelledby="rm-sales"] td:nth-child(1){order:1;color:var(--rm-muted);font-size:.88rem;white-space:nowrap}
.rm-ledger section[aria-labelledby="rm-sales"] td:nth-child(3){order:2;margin-left:auto;font-weight:700;white-space:nowrap}
.rm-ledger section[aria-labelledby="rm-sales"] td:nth-child(2){order:3;flex:0 0 100%;min-width:0}
.rm-ledger section[aria-labelledby="rm-sales"] td:nth-child(2) .rm-ref{display:inline;margin-left:.4rem}
.rm-ledger section[aria-labelledby="rm-sales"] td:nth-child(4):not(.rm-cert){display:none}
.rm-ledger section[aria-labelledby="rm-sales"] td.rm-cert{order:4;flex:0 0 100%;font-size:.84rem;color:var(--rm-muted)}
.rm-ledger section[aria-labelledby="rm-sales"] td.rm-cert:before{content:"Cert linked: "}
.rm-ledger section[aria-labelledby="rm-sales"] td:nth-child(5){order:5;flex:0 0 100%;min-width:0}
.rm-ledger section[aria-labelledby="rm-everywhere"] td:last-child{min-width:0}
}
/* Hero on phones: the composite price straight under the title; chips move below it. */
@media (max-width:40rem){
.rm-ledger.rm-hero{display:flex;flex-direction:column;gap:0}
.rm-ledger .rm-hero-head{display:contents}
.rm-ledger.rm-hero>.rm-comp{order:1;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid var(--rm-line)}
.rm-ledger .rm-chips{order:2}
.rm-ledger .rm-hero-body{order:3}
}
