/* The weekly Shop Check's screens, on top of the dashboard's stylesheet (tokens only, light mode). */

/* ---------- Bar: "Rulecart / <tool>", the tool's name as large as "Rulecart" (founder, 27 Nov 2026), as the Withdrawal Button's ---------- */
.bar__tool { display: inline-flex; align-items: center; gap: var(--s-4); min-width: 0; }
.bar__slash { font-family: var(--font-display); font-size: var(--text-body); font-weight: 700; color: var(--muted-foreground); }
.bar__toolname { display: inline-flex; align-items: center; min-height: var(--key-sm); min-width: 0; padding: 0 var(--s-4); border-radius: var(--radius-sm); font-family: var(--font-display); font-size: var(--text-body); font-weight: 800; letter-spacing: -0.01em; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 30rem) {
  .bar__tool .logo span { display: none; }
}
@media (max-width: 23.5rem) {
  .bar__slash, .bar__toolname { font-size: var(--text-small); }
}

/* ---------- The start screen: the free check's hero (gold "Shop Radar start", G-16) ---------- */
/* Two columns on a laptop: the promise and the sign-in left, the mail a seller gets right, both top-aligned. */
.sr-door { display: grid; gap: var(--section); }
.sr-hero { display: grid; gap: var(--space-group) var(--s-48); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 60rem) { .sr-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sr-hero__text { gap: var(--space-group); }
.sr-hero__text .lead { max-width: 34rem; }
.sr-promises { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-8); }
.sr-promises li { display: flex; gap: var(--s-8); align-items: flex-start; font-weight: 600; }
/* On the start page the promises are plain text: the title and the sign-in carry the weight (founder, 27 Nov 2026). */
.sr-hero .sr-promises li { font-weight: 400; }
/* The mark sits on the first line's centre (founder, 27 Nov 2026), also when the line wraps. */
.sr-promises svg { width: 1.25rem; height: 1.25rem; flex: none; margin-top: calc((1lh - 1.25rem) / 2); color: var(--success); stroke-width: 3; }
/* The free step's marks are quiet; the green marks belong to the paid steps. */
.sr-tier--free .sr-promises svg { color: var(--muted-foreground); }
.sr-hero__text form.card { max-width: 30rem; }
/* The mail, drawn as it really looks (FC-6): its subject, the cream card, the logo, one line and the yellow key. */
.sr-hero__pic { margin: 0; display: grid; gap: var(--s-8); }
.sr-mail { display: grid; gap: var(--s-12); padding: var(--s-16); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); }
.sr-mail__subject { margin: 0; font-weight: 400; font-size: var(--text-small); }
.sr-mail__card { display: grid; gap: var(--s-12); padding: var(--s-16); border-radius: var(--radius-md); background: var(--background); font-size: var(--text-small); color: var(--muted-foreground); }
.sr-mail__card p { margin: 0; }
/* The header's logo as it is (.logo): the same mark, size and word. */
.sr-mail__logo { margin: 0; min-height: 0; color: var(--foreground); }
.sr-mail__button { justify-self: start; padding: var(--s-8) var(--s-12); border: 2px solid var(--foreground); border-bottom-width: 4px; border-radius: var(--radius-sm); background: var(--brand); font-family: var(--font-display); font-weight: 700; }
/* The side path to the free check (FC-22): one short line and its own white key, under the hero, full width. */
.sr-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-12) var(--s-24); padding-top: var(--space-group); border-top: 1px solid var(--border); }
.sr-side p { margin: 0; max-width: 40rem; color: var(--muted-foreground); }
.sr-side strong { color: var(--foreground); }

/* ---------- The plan cards on the start page (option C, founder 27 Nov 2026: "C is good!"), FC-1, FC-5, FC-42 ---------- */
/* A laptop: the text and the email side by side, the cards across the full width under both. A phone: the text, the
   email, then the cards (DOM order; founder 27 Nov 2026). One section gap above the cards (FC-36). */
.sr-hero:has(.sr-plans) { row-gap: var(--section); }
@media (min-width: 60rem) {
  .sr-hero:has(.sr-plans) .sr-hero__text { grid-column: 1; grid-row: 1; }
  .sr-hero:has(.sr-plans) .sr-hero__pic { grid-column: 2; grid-row: 1; }
  .sr-plans { grid-column: 1 / -1; grid-row: 2; }
}
.sr-plans { display: grid; gap: var(--space-group); }
.sr-plans > p { margin: 0; }
/* What every plan holds, once: in the cards' columns on a laptop, read row by row. */
.sr-shared { display: grid; gap: var(--s-12); }
.sr-shared > p { margin: 0; }
@media (min-width: 60rem) {
  .sr-plans .sr-tiers { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .sr-shared ul { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-16); }
}
/* One line per key in every language down to 320 px (FC-43): German "Jährlich −16 %" and French "Envoyer le code de
   connexion" broke there. On the narrowest phones the period keys take less side room and the email card's key the
   small type size, in every language alike. */
.period .key { white-space: nowrap; }
@media (max-width: 22.5rem) {
  .period .key { padding-inline: var(--s-12); }
  .sr-hero__text form.card .key--main { padding-inline: var(--s-16); font-size: var(--text-small); }
}
/* The chosen plan on the email card's first line: "Pro, €19.99 a month" left, "Change" at the line's end. */
.sr-chosen { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-4) var(--s-16); }
.sr-chosen p { margin: 0; }
.sr-chosen a { font-size: var(--text-small); }
.sr-chosen-card { max-width: 30rem; }

/* ---------- What the check found: the free result's look (shop-check app, Result.tsx), FC-9, FC-10, FC-17 ---------- */
/* The title: "Shop Radar: <address>", the address in plain weight (founder, 27 Nov 2026); the read time a step smaller. */
.sr-title__host { font-weight: 400; overflow-wrap: anywhere; }
.sr-read { margin: 0; font-size: var(--text-small); color: var(--muted-foreground); }

/* The figure: plain, as on the free result since 26 Nov 2026 ("3 von 5 gefunden", no marker); under it what could not be checked. */
.sr-figure { display: grid; gap: var(--s-8); }
.sr-figure p { margin: 0; }
.sr-figure__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-4) var(--s-12); }
.sr-figure__count { font-family: var(--font-display); font-size: var(--text-h1); line-height: var(--text-h1--line-height); letter-spacing: var(--text-h1--letter-spacing); font-weight: 800; font-variant-numeric: tabular-nums; }
.sr-figure__word { font-family: var(--font-display); font-size: var(--text-body); font-weight: 700; }
.sr-figure__aside { display: inline-flex; align-items: center; gap: var(--s-8); font-weight: 700; }
.sr-figure__aside svg { width: 1.125rem; height: 1.125rem; color: var(--warning); flex: none; }
.sr-figure--small .sr-figure__count { font-size: var(--text-h2); line-height: var(--text-h2--line-height); }
/* "Check again" as an icon key and the developer PDF, both small, on one line (founder, 27 Nov 2026: less scrolling). */
.sr-keys { display: flex; flex-wrap: wrap; gap: var(--s-12); align-items: center; }
.sr-keys form { margin: 0; }

/* The groups: a place's title close to its rows (FC-26), the groups further apart. */
.sr-groups { display: grid; gap: var(--space-group); }
.sr-group { display: grid; gap: var(--space-in); }
.sr-group > h3, .sr-group > summary h3 { margin: 0; }

/* One key per rule, as on the free result: one colour across the whole row, only its mark differs (FC-17); only a rule
   the check did not find is yellow. A tap opens the rule's panel from the right. */
.sr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-8); }
.sr-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8) var(--s-12); min-height: var(--key-md); margin-bottom: 3px; padding: var(--s-12) calc(var(--s-16) + 1.25rem + var(--s-8)) var(--s-12) var(--s-16); border: 2px solid var(--foreground); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); box-shadow: 0 3px 0 0 var(--foreground); text-decoration: none; }
.sr-row--open-item { background: var(--brand); color: var(--brand-foreground); }
.sr-row:hover .sr-row__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.sr-row:focus-visible { outline: 2px solid var(--foreground); outline-offset: 2px; }
/* Whole words only (founder 26 Nov 2026): the name is never narrower than its longest word. */
.sr-row__name { flex: 1 1 9rem; font-family: var(--font-display); font-weight: 700; overflow-wrap: normal; hyphens: manual; }
.sr-row .stamp { background: var(--card); }
.sr-row > svg { position: absolute; inset-block: 0; right: var(--s-16); margin-block: auto; width: 1.25rem; height: 1.25rem; }
/* On a phone a row's stamp keeps its mark only, in the stamp's own tilted box, so the name keeps the width; the word
   stays for screen readers and stands in the panel. Wider screens show the whole stamp (founder, 27 Nov 2026). */
@media (max-width: 40rem) {
  .sr-row { flex-wrap: nowrap; }
  .sr-row .stamp { padding: 0 var(--s-8); gap: 0; font-size: 0; }
  .sr-row .stamp svg { width: 1rem; height: 1rem; }
}
/* The overview's keys: the round arrow alone and the short PDF name on a phone, the words on wider screens. */
.sr-narrow { display: none; }
@media (max-width: 40rem) {
  .sr-wide { display: none; }
  .sr-narrow { display: inline; }
  .sr-keys button.key > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 30rem) {
  .sr-row { padding-inline: var(--s-12) calc(var(--s-12) + 1.25rem + var(--s-8)); }
  .sr-row > svg { right: var(--s-12); }
}

/* The cards under the list: their titles below the page title's size, their text at reading size. */
.sr-home .card h2 { font-size: var(--text-body); line-height: 1.3; }
.sr-home .card > p, .sr-home .card .stack > p { font-size: 1rem; }

/* Rules for some cases only: a summary that plainly opens ("Show 2" with its arrow), never underlined. */
.sr-fold > summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-8) var(--s-16); list-style: none; cursor: pointer; }
.sr-fold > summary::-webkit-details-marker { display: none; }
.sr-fold__more { display: inline-flex; align-items: center; gap: var(--s-4); font-size: var(--text-small); font-weight: 600; }
.sr-fold__more svg { width: 1rem; height: 1rem; rotate: 90deg; }
.sr-fold[open] .sr-fold__more svg { rotate: -90deg; }
.sr-fold[open] > summary { margin-bottom: var(--s-12); }

/* The rule's panel, one-to-one the free result's (shop-check app, components/panel.tsx): a sheet from the right on wider
   screens, the whole screen on a phone; a top bar with the place and "Close" over a 2 px line; the body in sections. */
.sr-panel { position: fixed; inset: 0 0 0 auto; width: min(36rem, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--card); color: var(--card-foreground, var(--foreground)); overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow-lg-value); }
.sr-panel::backdrop { background: color-mix(in oklab, var(--foreground) 30%, transparent); }
/* Without the script the row's link still opens it (:target), over the page. */
.sr-panel:target:not([open]) { display: block; z-index: 40; }
.sr-panel__bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); min-height: 4rem; padding: 0 var(--pad-key); border-bottom: 2px solid var(--secondary); background: var(--card); }
.sr-panel__bar p { margin: 0; min-width: 0; font-size: var(--text-small); color: var(--muted-foreground); }
.sr-panel__bar .key { flex: none; margin-bottom: 0; }
/* design-allow: the bottom padding is the help button's room (FC-8), 5rem as on the free result's panel. */
.sr-panel__body { display: flex; flex-direction: column; gap: var(--s-32); padding: var(--pad-key) var(--pad-key) 5rem; }
.sr-panel__body p { margin: 0; }
.sr-panel__intro { display: flex; flex-direction: column; gap: var(--s-12); }
.sr-panel__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8) var(--s-16); }
.sr-panel__head h2 { margin: 0; flex: 1 1 0%; min-width: max(8rem, min-content); font-size: var(--text-h2); overflow-wrap: normal; hyphens: manual; }
/* The stamp right of the name, centred on it whether the name takes one line or two (founder, 27 Nov 2026). */
.sr-panel__stamp { display: flex; align-items: center; margin-left: auto; flex: none; }
.sr-panel__lines { display: flex; flex-direction: column; gap: var(--s-4); font-size: var(--text-small); }
.sr-panel__lines strong { font-weight: 600; }
.sr-panel__section { display: flex; flex-direction: column; gap: var(--s-12); }
.sr-panel__section h3 { margin: 0; font-family: var(--font-display); font-size: var(--text-body); font-weight: 700; }
/* The law: its words on the quiet marker and its name under them, one link to the law's page (FC-18, G-15). */
.sr-panel__law { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-8); padding-top: var(--s-4); color: inherit; text-decoration: none; }
.sr-panel__law .quote__words { font-size: var(--text-body); line-height: 1.375; }
.sr-panel__law:hover .quote__words { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sr-panel__law .quote__source { display: inline-flex; align-items: center; gap: var(--s-4); }
.sr-panel__law .quote__source svg { width: 0.875rem; height: 0.875rem; }
.sr-panel__law:hover .quote__source { color: var(--foreground); }
.sr-panel .linkbtn { color: var(--muted-foreground); }
@media (min-width: 40rem) {
  .sr-panel__bar { padding-inline: var(--s-32); }
  .sr-panel__body { padding: var(--s-32) var(--s-32) 5rem; }
  .sr-panel__section h3 { font-size: var(--text-h3); }
  .sr-panel__law .quote__words { font-size: var(--text-h3); }
}
.sr-rule__evidence { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
  .sr-fold__more svg { transition: rotate var(--dur-base) var(--ease-standard); }
  .sr-panel[open] { animation: sr-panel-in var(--dur-slow, 240ms) var(--ease-enter, cubic-bezier(0.16, 1, 0.3, 1)); }
}
@keyframes sr-panel-in { from { translate: 2rem 0; opacity: 0; } }
@media (max-width: 40rem) { @keyframes sr-panel-in { from { translate: 0 2rem; opacity: 0; } } }

/* ---------- The seller's answers ---------- */
.sr-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }

/* ---------- A yes / no question in the key shape ---------- */
.sr-yesno .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- The mail's settings ---------- */
.sr-select { width: 100%; max-width: 20rem; min-height: 2.75rem; padding: 0 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--background); color: var(--foreground); font: inherit; }

/* ---------- The plan page: four tiles, equal; two columns on a laptop, four on a wide screen ---------- */
.sr-tiers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); align-items: stretch; }
.sr-tier { display: flex; flex-direction: column; }
.sr-tier__price { margin: 0; font-family: var(--font-display); font-size: var(--text-h3); font-weight: 800; }
.sr-tier__lines { flex: 1; align-content: start; }
.sr-tier__lines li { font-weight: 400; }
.sr-tier__key { padding-top: 0.5rem; }
.sr-periods { gap: 0.5rem; }

/* ---------- The account's shops and the check record: one card per shop ---------- */
.sr-shops { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.sr-shop p { margin: 0; }
.sr-shop__head { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 0.5rem; align-items: start; }
.sr-shop__host { margin: 0; min-width: 0; font-size: var(--text-h3); overflow-wrap: anywhere; }
.sr-shops__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.sr-shop { display: flex; flex-direction: column; }
.sr-shop__key { margin-top: auto; padding-top: 0.25rem; }
/* The record's two keys: the same width, side by side where both fit, else one above the other (every card alike). */
.sr-record__keys { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

/* A plan tile's state stamp ("Your plan") on the plan name's line, top right. */
.sr-tier__head { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 0.5rem; align-items: center; min-height: var(--s-32); }
.sr-tier__head h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

/* ---------- The facts form (FC-23): its key is the plain white key until every question has an answer, then yellow.
   A press before that shows which answer is missing (founder, 27 Nov 2026: "the same button design … colored in yellow if
   … see result is possible"). ---------- */
.sr-facts-form:is(:not(:has(input[name^="market"]:checked)), :not(:has(input[name="subscriptions"]:checked)), :not(:has(input[name="micro"]:checked))) .key--main:is(*, :hover) { background: var(--card); color: var(--foreground); }


/* The facts form: room between a question and its answers (founder 26 Nov 2026: "the buttons are too close to the text"). */
.sr-facts-form legend.legend { margin-bottom: var(--s-12); }
.sr-facts-form .hint { margin-top: calc(-1 * var(--s-4)); margin-bottom: var(--s-4); }

/* The mail settings: the card itself shows the choice (dark = on); the text runs the card's full width, no box
   (founder, 27 Nov 2026: "text full width and no icons"). */
.sr-mail-form .choice { grid-template-columns: minmax(0, 1fr); }
.sr-mail-form .choice__box { display: none; }
.sr-mail-form .choice__note { grid-column: 1; }
/* Calmer in the overview (founder, 27 Nov 2026: the daily card "screams"): flat cards, an on card with a dark edge, an
   off card white with a thin one; the labels small as the list's place titles. */
.sr-mail-form .choice { min-height: 0; margin-bottom: 0; padding: var(--s-12) var(--s-16); border: 1px solid var(--border); box-shadow: none; translate: none; }
/* On: a dark edge on a light grey card; yellow stays for what the check did not find (C-4). */
.sr-mail-form .choice:has(input:checked) { border: 2px solid var(--foreground); background: var(--muted); color: var(--foreground); box-shadow: none; translate: none; }
.sr-mail-form .choice { align-content: start; }
.sr-mail-form .choice__title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.sr-mail-form .choice__note { opacity: 1; color: var(--muted-foreground); }
.sr-home .sr-mail-form .legend, .sr-home .sr-mail-form .field > label { font-family: var(--font-body); font-size: var(--text-small); font-weight: 600; color: var(--muted-foreground); }

/* A form's Save key turns yellow while something differs from what is saved, and white again when it is back
   (founder, 27 Nov 2026). Each field carries its saved state in data-was; no script. */
.sr-dirty:has(input[data-was="on"]:not(:checked), input[data-was="off"]:checked, option[data-was]:not(:checked)) button.key:not([name]) { background: var(--brand); color: var(--brand-foreground); }

/* Plan keys: short words, one line at one height on every tile. */
.sr-tier__key .key { white-space: nowrap; }

/* The markets as one list, top to bottom, on every screen (founder, 27 Nov 2026: two columns overflow and confuse). */
.sr-markets .choices { grid-template-columns: minmax(0, 1fr); }

/* The plan card's keys fill the width on a phone, so a short one never sits beside a long one (founder, 27 Nov 2026). */
@media (max-width: 40rem) {
  .sr-plan-keys > form { flex: 1 1 100%; }
  .sr-plan-keys .key { width: 100%; }
}
