/* Rate my list (T-1935S): /rate/, drawn by docs/ratelist.js. The site's tokens (style.css), plus the heat's own: --rml-hot for the
   calibre share, --rml-paper for strong-but-rarely-taken, --rml-cool for the rest. A rung's colour arrives as --c, one of the heat
   tokens --rml-h0 (Mayonnaise) to --rml-h9 (Carolina Reaper), red, orange, yellow, green, blue to ice down the ladder, the same hues as the food drawings
   (Jordan, 22 Nov: "red, orange ,yellow green, blue should be the progression"): pale on dark, deep on light, each 4.5:1 or better as text on the card (ratelist.js's HEAT_DARK copies the
   dark ones for the share picture). The food drawings keep their own colours. One column on a phone; the paste box beside the card
   from 900 px. */
.rml { --rml-hot: #FB923C; --rml-cool: #7DD3FC; --rml-paper: #C4B5FD; --rml-lt: 0; --rml-head: "Barlow Semi Condensed", "Barlow Fallback", "Arial Narrow", sans-serif;
  --rml-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; display: grid; gap: 20px; margin-bottom: 32px; }
:root[data-theme="light"] .rml { --rml-hot: #C2410C; --rml-cool: #0369A1; --rml-paper: #6D28D9; --rml-lt: 1; }
/* The heat tokens --rml-h0 to --rml-h9 are in style.css (shared with the list builder). */
.rml-h { display: grid; gap: 8px; }
.rml-h h1 { margin: 0; font: 800 clamp(34px, 7vw, 52px)/1 var(--rml-head); text-transform: uppercase; letter-spacing: .02em; }
.rml-h h1 em { font-style: normal; color: var(--rml-hot); }
.rml-h p { margin: 0; color: var(--text-dim); max-width: 62ch; font-size: 16px; }
.rml-free { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rml-free li { padding: 3px 9px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-dim); }
.rml-tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .rml-tool { grid-template-columns: minmax(0, 1fr); } }
.rml-card { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.rml-form label { font: 800 15px var(--rml-head); letter-spacing: .06em; text-transform: uppercase; }
.rml-form textarea { width: 100%; min-height: 260px; resize: vertical; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: 500 12.5px/1.55 var(--rml-mono); box-sizing: border-box; }
.rml-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rml-row .btn.primary { flex: 1 1 180px; }
.rml-hint { margin: 0; font-size: 13px; color: var(--text-dim); }
.rml-msg { margin: 0; font-size: 13px; color: var(--text-dim); }
.rml-msg.bad { color: var(--red); }
/* Your saved lists (this device's My lists): one tap rates one. */
.rml-saved { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.rml-saved h2 { margin: 0; font: 800 15px var(--rml-head); letter-spacing: .06em; text-transform: uppercase; }
.rml-saved h2 em { font-style: normal; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); color: var(--text-dim); font-size: 12px; letter-spacing: 0; vertical-align: 2px; }
.rml-mtools { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.rml-ord { display: flex; gap: 4px; flex: none; }
/* The sides, as the Armies sheet shows them: a row of tabs with each side's colour under it. */
.rml-seg { display: grid; grid-template-columns: repeat(var(--n), minmax(max-content, 1fr)); gap: 3px; }
.rml-seg button { min-height: 40px; padding: 4px 3px; white-space: nowrap; border: 0; background: none; color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 800; line-height: 1.15; cursor: pointer; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--side, var(--text-faint)) 60%, transparent); }
.rml-seg button[aria-pressed="true"] { color: var(--text); box-shadow: inset 0 -4px 0 var(--side, var(--rml-hot)); }
.rml-chip { min-height: 30px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rml-chip[aria-pressed="true"] { color: var(--text); border-color: var(--rml-hot); background: color-mix(in srgb, var(--rml-hot) 14%, transparent); }
/* A short box, so a row is cut part-way and the bottom fades while more lists are below (Jordan, 23 Nov). */
.rml-mine { display: grid; align-content: start; gap: 6px; max-height: 210px; overflow-y: auto; overscroll-behavior: contain; }
.rml-mine.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); }
.rml-mine button { display: grid; gap: 1px; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.rml-mine button:hover { border-color: var(--rml-hot); }
.rml-mine button[aria-pressed="true"] { border-color: var(--rml-hot); box-shadow: inset 3px 0 0 var(--rml-hot); }
.rml-mine b { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.rml-mine small { font-size: 12px; color: var(--text-dim); }
.rml-empty { border: 1px dashed var(--border); border-radius: 16px; padding: 18px; color: var(--text-dim); display: grid; gap: 10px; justify-items: start; }
.rml-empty svg { width: 56px; height: 56px; }

/* The result card. */
.rml-res { --c: var(--rml-h6); padding: 0; overflow: hidden; gap: 0; position: relative; }
.rml-res > * { transition: filter .4s, opacity .4s; }
.rml-res.tasting > * { filter: blur(6px); opacity: .5; transition: none; }
.rml-res.tasting::after { content: "Tasting…"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 22px var(--rml-head); letter-spacing: .08em; text-transform: uppercase; color: var(--rml-hot); }
.rml-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 18px 16px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c) 15%, transparent), transparent 60%), var(--panel); border-bottom: 1px solid var(--border); }
.rml-pep { width: 104px; height: 104px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--panel-2)); border: 1.5px solid color-mix(in srgb, var(--c) 55%, var(--border)); }
.rml-pep svg { width: 82px; height: 82px; }
.rml-words { display: grid; gap: 4px; min-width: 0; }
.rml-rung { font: 600 11px var(--rml-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.rml-army { color: var(--text-dim); font-size: 13px; }
.rml-name { margin: 0; font: 800 clamp(30px, 6vw, 42px)/.95 var(--rml-head); text-transform: uppercase; hyphens: auto; overflow-wrap: anywhere; color: var(--c); }
.rml-line { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.35; }
@media (max-width: 480px) { .rml-top { grid-template-columns: minmax(0, 1fr); } .rml-pep { width: 84px; height: 84px; } .rml-pep svg { width: 66px; height: 66px; } }
/* A list outside 1,850 to 2,000 points: no rung, just what to do. */
.rml-out { padding: 18px; display: grid; gap: 8px; }
.rml-out .rml-rung, .rml-out .rml-line, .rml-out .rml-k { margin: 0; }
.rml-cal { padding: 16px 18px 6px; display: grid; gap: 8px; }
.rml-cal p { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.35; }
/* The heat and its Share picture side by side, at the top of the card (Jordan, 22 Nov: "move the share button next to the actual head
   score and picture"). */
.rml-hrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rml-sh { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.rml-heat b { font: 800 34px/1 var(--rml-head); letter-spacing: .02em; text-transform: uppercase; color: var(--c); }
.rml-parts { color: var(--text-dim); }
.rml-cbar { height: 12px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; display: flex; }
.rml-cbar i { display: block; height: 100%; }
.rml-cbar .c { background: var(--rml-hot); } .rml-cbar .p { background: var(--rml-paper); } .rml-cbar .r { flex: 1; background: color-mix(in srgb, var(--rml-cool) 35%, transparent); }
.rml-ladder { padding: 12px 18px 4px; display: grid; gap: 6px; }
.rml-meter { position: relative; padding-top: 30px; }
.rml-segs { display: flex; gap: 2px; height: 14px; }
.rml-segs i { background: var(--c); border-radius: 3px; opacity: .35; min-width: 0; }
.rml-segs i.on { opacity: 1; box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.rml-pin { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; }
.rml-pin svg { width: 26px; height: 26px; }
.rml-pin::after { content: ""; width: 2px; height: 6px; background: var(--text); }
.rml-ends { display: flex; justify-content: space-between; font: 600 11px var(--rml-mono); color: var(--text-faint); }
.rml-why { border-top: 1px solid var(--border); margin-top: 10px; padding: 14px 18px; display: grid; gap: 14px; }
.rml-k { margin: 0; font-size: 12.5px; color: var(--text-dim); }
.rml-grp { display: grid; gap: 6px; }
.rml-grp h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font: 800 15px var(--rml-head); letter-spacing: .06em; text-transform: uppercase; }
.rml-grp h3 small { flex-basis: 100%; padding-left: 18px; font: 500 12px var(--font, inherit); letter-spacing: 0; text-transform: none; color: var(--text-faint); }
.rml-grp h3 i { width: 10px; height: 10px; border-radius: 3px; background: currentColor; flex: none; }
.rml-grp.cal h3 { color: var(--rml-hot); } .rml-grp.paper h3, .rml-grp.many h3 { color: var(--rml-paper); } .rml-grp.rare h3, .rml-grp.cool h3 { color: var(--rml-cool); }
.rml-cool { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.4; }
.rml-cool li::marker { color: var(--rml-cool); }
.rml-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rml-chips span { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 9px; border-radius: 8px; background: var(--chip-bg); border: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.rml-chips em { font: 500 12px var(--rml-mono); font-style: normal; color: var(--text-faint); }
.rml-basis { border-top: 1px solid var(--border); padding: 12px 18px; display: grid; gap: 4px; font-size: 12.5px; color: var(--text-dim); }
.rml-src { font: 500 12px var(--rml-mono); color: var(--text-faint); }
.rml-src a { color: var(--rml-hot); }
.rml-honest { border-top: 1px solid var(--border); padding: 14px 18px; display: flex; gap: 12px; align-items: center; background: var(--panel-2); }
.rml-honest img { flex: none; }
.rml-honest p { margin: 0; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.rml-honest p span { display: block; font-weight: 400; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.rml-acts { border-top: 1px solid var(--border); padding: 14px 18px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.rml-acts .btn { flex: 1 1 140px; }

/* The ladder, every rung. */
.rml-lad { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.rml-lad summary { cursor: pointer; padding: 12px 16px; font: 800 16px var(--rml-head); letter-spacing: .06em; text-transform: uppercase; }
.rml-lad ol { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; gap: 2px; }
.rml-lad li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.rml-rp { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.rml-rp svg { width: 26px; height: 26px; flex: none; }
.rml-rp b { font: 800 15px var(--rml-head); letter-spacing: .04em; text-transform: uppercase; }
.rml-rh { font: 600 13px var(--rml-mono); }
.rml-lad .rml-k { padding: 0 16px 14px; }
/* Links back into the site (Jordan, 22 Nov): the army and detachment names, each unit, the cooling lines, the tournament lists. */
.rml-army a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; }
.rml-chips span a { color: inherit; text-decoration: none; }
.rml-chips span:has(a):hover { border-color: var(--rml-hot); }
.rml-cool a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--rml-cool) 60%, transparent); text-underline-offset: 2px; }
.rml-see { justify-self: start; font-weight: 700; font-size: 13.5px; color: var(--rml-hot); text-decoration: none; }
.rml-see:hover { text-decoration: underline; }
.rml-acts a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* The FAQ: plain questions that open in place. */
.rml-faq { display: grid; gap: 6px; }
.rml-faq h2 { margin: 6px 0 4px; font: 800 20px var(--rml-head); letter-spacing: .04em; text-transform: uppercase; }
.rml-faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.rml-faq summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 15px; }
.rml-faq p { margin: 0; padding: 0 16px 14px; color: var(--text-dim); font-size: 14.5px; line-height: 1.5; max-width: 70ch; }
.rml-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 1001; padding: 10px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 14px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.rml-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .rml-res > *, /* Links back into the site (Jordan, 22 Nov): the army and detachment names, each unit, the cooling lines, the tournament lists. */
.rml-army a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; }
.rml-chips span a { color: inherit; text-decoration: none; }
.rml-chips span:has(a):hover { border-color: var(--rml-hot); }
.rml-cool a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--rml-cool) 60%, transparent); text-underline-offset: 2px; }
.rml-see { justify-self: start; font-weight: 700; font-size: 13.5px; color: var(--rml-hot); text-decoration: none; }
.rml-see:hover { text-decoration: underline; }
.rml-acts a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* The FAQ: plain questions that open in place. */
.rml-faq { display: grid; gap: 6px; }
.rml-faq h2 { margin: 6px 0 4px; font: 800 20px var(--rml-head); letter-spacing: .04em; text-transform: uppercase; }
.rml-faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.rml-faq summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 15px; }
.rml-faq p { margin: 0; padding: 0 16px 14px; color: var(--text-dim); font-size: 14.5px; line-height: 1.5; max-width: 70ch; }
.rml-toast { transition: none; } }
.rml-only { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 700; }
/* A saved list's heat on its row (docs/heat.js): the pepper in its rung's colour and the number, at the right. */
.rml-mine button { position: relative; }
.rml-mine button:has(.rml-mh) { padding-right: 62px; }
.rml-mh { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 2px; font: 800 16px var(--rml-head); }
.rml-mh b { font: inherit; color: inherit; }
.rml-mp { width: 20px; height: 20px; }
