/* ─────────────────────────────────────────────────────────────────────────
   Renterah design system. Warm cream + ink + a single red accent. Anton +
   Instrument Serif italic + JetBrains Mono. Sharp rectangles, dashed
   receipt-style dividers, no drop shadows on cards.
   ───────────────────────────────────────────────────────────────────────── */

:root {
    /* surfaces */
    /* Single page tone: body, nav and cards all share the same cream. Cards stand
       apart by border only, so the user never sees a body-vs-card transition. */
    --bg:          #FBF6EC;
    --card:        #FBF6EC;
    --bg-soft:     #F4ECDF;
    --page-outer:  #E5DCC8;

    /* ink */
    --ink:         #1B140D;
    --ink-2:       #3D332A;
    --muted:       #857A6E;
    --ink-faint:   rgba(27, 20, 13, 0.45);
    --black:       #0E0B08;

    /* lines */
    --line:        rgba(27, 20, 13, 0.10);
    --line-strong: rgba(27, 20, 13, 0.18);
    --line-soft:   rgba(27, 20, 13, 0.06);

    /* semantic */
    --red:         #D7263D;
    --red-deep:    #A8182C;
    --red-soft:    #FBE3E3;
    --red-soft-2: #F7D3D3;
    --green:       #3F6B3B;
    --green-soft:  #E1ECDB;
    --amber:       #A86A1F;
    --amber-soft:  #F4E6CC;
    /* Red-orange for the SUSPECT band (40-69) — sits between --red (scam) and --amber
       (vigilance) so the four verdict tiers each have a distinct visual moment. */
    --orange:      #C45A0F;
    --orange-soft: #F8DCC4;

    /* fonts */
    --font-display: 'Anton', 'Bebas Neue', Impact, sans-serif;
    --font-serif:   'Instrument Serif', 'Times New Roman', serif;
    --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
    --font-body:    'Manrope', -apple-system, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-mono);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body {
    /* Single solid background — no overlay gradients, no nav/body tone mismatch. */
    background: var(--bg);
}

::selection { background: var(--ink); color: var(--bg); }

button { font-family: inherit; cursor: pointer; }
input  { font-family: inherit; }
a      { color: inherit; text-decoration: none; }

@keyframes r-blink   { 0%, 60% { opacity: 1; } 60.1%, 100% { opacity: 0.25; } }
@keyframes r-pulse   { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes r-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }


/* ── Splash (replaces the spinner the Blazor template ships) ───────────── */

.splash {
    position: fixed; inset: 0;
    display: flex;
    align-items: center; justify-content: center;
    background: var(--bg);
}
.splash-icon {
    width: 160px; height: 160px;
    object-fit: contain;
}


/* ── Reusable primitives the Razor components compose with ─────────────── */

.r-mono {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}
.r-mono--ink   { color: var(--ink); }
.r-mono--red   { color: var(--red); }
.r-mono--green { color: var(--green); }
.r-mono--amber { color: var(--amber); }

.r-display {
    font-family: var(--font-display);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 0.95;
}
.r-serif-em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--red);
    text-transform: lowercase;
    font-weight: 400;
}

.r-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.r-card:hover { border-color: var(--line-strong); }

.r-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 9px;
    border-radius: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    background: rgba(27, 20, 13, 0.04);
    color: var(--ink-2);
}
.r-pill--danger { background: var(--red);        color: #fff;          border-color: var(--red); }
.r-pill--warn   { background: var(--amber-soft); color: var(--amber);  border-color: rgba(168, 106, 31, 0.30); }
.r-pill--ok     { background: var(--green-soft); color: var(--green);  border-color: rgba(63, 107, 59, 0.30); }
.r-pill--scan   { background: rgba(27, 20, 13, 0.06); color: var(--ink); border-color: var(--line-strong); }

.r-dashed-h {
    height: 1px; width: 100%;
    background-image: linear-gradient(to right, var(--line) 50%, transparent 50%);
    background-size: 6px 1px;
    background-repeat: repeat-x;
}
.r-dashed-v {
    width: 1px; align-self: stretch;
    background-image: linear-gradient(var(--line) 50%, transparent 50%);
    background-size: 1px 6px;
    background-repeat: repeat-y;
}

.r-signal-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block;
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
    animation: r-blink 1.6s ease-in-out infinite;
}
.r-signal-dot--green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.r-signal-dot--amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }


/* ── Buttons (pill-shaped, sharp text in display face) ─────────────────── */

.r-btn {
    height: 44px; padding: 0 20px;
    border-radius: 99px;
    border: 1px solid var(--black);
    background: var(--black); color: #fff;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 10px;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(14, 11, 8, 0.18);
}
.r-btn:hover:not(:disabled) { background: #1F1B14; }
.r-btn:active:not(:disabled) { transform: translateY(1px); }
.r-btn:disabled {
    background: rgba(27, 20, 13, 0.08); color: var(--ink-faint);
    border-color: var(--line); cursor: not-allowed; box-shadow: none;
}
.r-btn--sm { height: 36px; font-size: 11px; padding: 0 16px; }
.r-btn--lg { height: 52px; font-size: 14px; padding: 0 28px; }
.r-btn--full { width: 100%; }

.r-btn--secondary {
    background: rgba(27, 20, 13, 0.05); color: var(--ink);
    border: 1px solid var(--line); box-shadow: none;
}
.r-btn--secondary:hover:not(:disabled) { background: rgba(27, 20, 13, 0.09); }

.r-btn--outline {
    background: transparent; color: var(--ink);
    border: 1px solid var(--line-strong); box-shadow: none;
}
.r-btn--outline:hover:not(:disabled) { background: rgba(27, 20, 13, 0.05); }

.r-btn--danger {
    background: var(--red); color: #fff; border-color: var(--red);
    box-shadow: 0 4px 12px rgba(215, 38, 61, 0.25);
}
.r-btn--danger:hover:not(:disabled) { background: var(--red-deep); }


/* ── Form inputs (white field, focus ring in ink) ──────────────────────── */

.r-input {
    position: relative;
    display: flex; align-items: center;
    height: 48px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.r-input:focus-within {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(27, 20, 13, 0.06);
}
.r-input--error,
.r-input--error:focus-within { border-color: var(--red); box-shadow: none; }
.r-input__icon {
    padding: 0 12px 0 16px;
    color: var(--muted);
    display: inline-flex; align-items: center;
}
.r-input:focus-within .r-input__icon { color: var(--ink); }
.r-input__field {
    flex: 1; height: 100%;
    background: transparent; border: none; outline: none;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13.5px;
    padding: 0 16px 0 6px;
    letter-spacing: 0.01em;
}
.r-input__error {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--red);
    letter-spacing: 0.05em;
}
.r-field-label {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 8px;
}


/* ── Top nav chrome (overlays AntDesign Layout/Header defaults) ─────────── */

.r-app-shell.ant-layout { background: transparent; min-height: 100vh; }
.r-app-shell .ant-layout-content { background: transparent; }

.r-nav.ant-layout-header {
    position: sticky; top: 0; z-index: 30;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    /* Bumped to fit the 2x-bigger logo without clipping. */
    height: 90px;
    padding: 0;
}
.r-nav__inner {
    max-width: 1240px;
    margin: 0 auto;
    height: 100%;
    padding: 0 32px;
    display: flex; align-items: center; justify-content: space-between;
}
.r-nav__brand {
    display: inline-flex; align-items: center;
    gap: 12px;
    height: 100%;
}
.r-nav__logo {
    /* 2× the previous 56px — primary brand anchor in the nav. */
    height: 86px;
    width: auto;
    display: block;
    object-fit: contain;
}
@media (max-width: 720px) {
    /* 2× the previous 44px on small screens. */
    .r-nav__logo { height: 66px; }
}
.r-nav__tokens {
    height: 38px;
    padding: 0 14px;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card); color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
}
.r-nav__tokens__count {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.04em;
}
.r-nav__tokens__label {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.r-nav__buy.ant-btn {
    border-radius: 99px;
    font-family: var(--font-display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.r-avatar-menu__head {
    padding: 6px 4px 8px;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 4px;
    cursor: default;
    pointer-events: none;
}


/* ── Page main + grids ─────────────────────────────────────────────────── */

.r-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 32px 120px;
}

/* Force every brand-flagged AntDesign card to inherit the cream tone — otherwise
   AntDesign's default white .ant-card-body produces a two-tone look. */
.r-input-card.ant-card,
.r-section.ant-card,
.r-subcard.ant-card,
.r-login__card.ant-card {
    background: var(--card);
}
.r-input-card.ant-card > .ant-card-body,
.r-section.ant-card > .ant-card-body,
.r-subcard.ant-card > .ant-card-body,
.r-login__card.ant-card > .ant-card-body {
    background: var(--card);
}

/* AntDesign Card override — the design's input card uses .ant-card-body padding. */
.r-input-card.ant-card {
    border: 1px solid var(--line);
    border-radius: 20px;
}
.r-input-card.ant-card .ant-card-body { padding: 32px; }
.r-input-card__form { margin-top: 4px; }
.r-input-card__div.ant-divider { margin: 18px 0 16px; border-color: var(--line); }
.r-input-card__form .ant-form-item { margin-bottom: 0; }
.r-input-card__form .ant-input-affix-wrapper {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--line);
    height: 48px;
}
.r-input-card__form .ant-input-affix-wrapper-focused {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(27, 20, 13, 0.06);
}
.r-input-card__form .ant-input {
    background: transparent;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--ink);
}
.r-input-card__form .ant-input-prefix { color: var(--muted); margin-right: 8px; }
.r-input-card__form .ant-input-affix-wrapper-focused .ant-input-prefix { color: var(--ink); }

/* Field wrapper — gives breathing room above + below the help/error message
   so a wrong URL warning never hugs the input or the next field. */
.r-fld.ant-form-item { margin-bottom: 18px; }

/* IMPORTANT: only paint the red chip when there's an actual error message.
   AntDesign keeps the explain <div> in the DOM for transitions, so unscoped
   styling shows an empty red bar under every input. The `has-error` parent
   guard + the `:not(:empty)` filter on the inner div together fix that. */
.r-fld.ant-form-item-has-error .ant-form-item-explain-error:not(:empty) {
    margin-top: 8px;
    padding: 6px 10px;
    background: var(--red-soft);
    border: 1px solid var(--red-soft-2);
    border-radius: 8px;
    color: var(--red-deep);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
.r-fld.ant-form-item-has-error .ant-input-affix-wrapper {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.08);
}
/* And make sure the explain slot collapses to zero height when no error is
   present, so it doesn't reserve vertical space + push the button down. */
.r-fld:not(.ant-form-item-has-error) .ant-form-item-explain { display: none; }
.r-input-card__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.r-input-card__h2 {
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1;
    color: var(--ink);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.r-input-card__grid {
    display: grid; gap: 12px;
    align-items: flex-end;
    grid-template-columns: 1.4fr 1fr auto;
}
.r-input-card__foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    display: flex; justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.025em;
}

/* ── Dashboard feedback FAB — fixed-position black pill anchored to the
   bottom-right of the viewport. Same mailto target as the avatar dropdown's
   "Nous contacter" link (driven by AppSettings.ContactEmail). Stays put on
   scroll so it's always one click away from the user. ──────────────────── */
.r-feedback-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--ink);
    color: var(--bg);
    border: 1px solid var(--ink);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(27, 20, 13, 0.22);
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.r-feedback-widget:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(27, 20, 13, 0.28);
}
.r-feedback-widget:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(27, 20, 13, 0.22);
}
.r-feedback-widget,
.r-feedback-widget .r-mono { color: var(--bg); }
.r-feedback-widget__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}
.r-feedback-widget__arrow {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--bg);
    transition: transform 120ms ease;
}
.r-feedback-widget:hover .r-feedback-widget__arrow {
    transform: translateX(2px);
}
@media (max-width: 640px) {
    .r-feedback-widget { bottom: 16px; right: 16px; padding: 10px 14px; }
}

.r-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}
.r-metric { padding: 22px 24px; }
.r-metric + .r-metric { border-left: 1px dashed var(--line); }
.r-metric__big {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 44px;
    letter-spacing: 0.01em;
    line-height: 1;
}
.r-metric__big--red   { color: var(--red); }
.r-metric__big--green { color: var(--green); }
.r-metric__sub {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.02em;
}

.r-scans-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; margin-bottom: 22px;
}
.r-scans-h2 {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 0.95;
    color: var(--ink);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.r-scans-counter {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    margin-left: 18px;
    letter-spacing: 0.16em;
    vertical-align: middle;
}

.r-filter-tabs {
    display: inline-flex; align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 4px;
}
.r-filter-tab {
    height: 32px;
    padding: 0 14px;
    border-radius: 99px;
    background: transparent;
    color: var(--ink);
    border: none;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s;
}
.r-filter-tab[aria-pressed="true"] { background: var(--black); color: #fff; }
.r-filter-tab__count {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
}
.r-filter-tab[aria-pressed="true"] .r-filter-tab__count { color: rgba(255, 255, 255, 0.55); }
.r-filter-tab--red   .r-filter-tab__count { color: var(--red); }
.r-filter-tab--amber .r-filter-tab__count { color: var(--amber); }
.r-filter-tab--green .r-filter-tab__count { color: var(--green); }


/* ── Scan card ─────────────────────────────────────────────────────────── */

/* Wrapper toggles whether the whole card behaves like a button. Terminal-state
   scans (Completed + Failed*) get cursor:pointer + a tiny hover lift; in-progress
   scans stay flat and non-interactive so users don't try to drill in too early. */
.r-scan-card-wrap { display: block; }
.r-scan-card-wrap--clickable { cursor: pointer; transition: transform 120ms ease; }
.r-scan-card-wrap--clickable:hover { transform: translateY(-1px); }
.r-scan-card-wrap--clickable:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.r-scan-card { display: flex; flex-direction: column; }
.r-scan-strip {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    gap: 14px;
    flex-wrap: wrap;
}
.r-scan-strip__left {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
}
.r-scan-strip__sep { color: var(--ink-faint); }
.r-scan-body {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 24px;
    padding: 20px;
    align-items: stretch;
}
.r-scan-body__thumb { width: 100%; height: 100%; min-height: 180px; }
.r-scan-body__content { min-width: 0; display: flex; flex-direction: column; }

/* ── In-progress card variant — no thumb, no score column ───────────────────
   Two-column layout (spinner area + content) instead of the normal three-col,
   so the AntDesign Alert can breathe in the content column. */
.r-scan-body--pending {
    grid-template-columns: 220px 1fr;
}
.r-scan-pending__thumb {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-soft, #f8f5ee);
    border: 1px dashed var(--line);
    border-radius: 6px;
}
.r-scan-pending__notice {
    margin-top: 14px;
}
@media (max-width: 720px) {
    .r-scan-body--pending { grid-template-columns: 1fr; }
    .r-scan-pending__thumb { min-height: 120px; }
}

/* ── Failure card variant — no fake thumb / score / counters ──────────────── */
.r-scan-body--failed { grid-template-columns: 220px 1fr; }
.r-scan-failed__thumb {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(220, 53, 69, 0.06);
    border: 1px dashed rgba(220, 53, 69, 0.45);
    border-radius: 6px;
    color: var(--red);
}
.r-scan-failed__notice { margin-top: 14px; }
.r-scan-foot--simple {
    display: flex;
    justify-content: flex-end;
    padding: 14px 20px 18px;
    border-top: 1px dashed var(--line);
}
@media (max-width: 720px) {
    .r-scan-body--failed { grid-template-columns: 1fr; }
    .r-scan-failed__thumb { min-height: 120px; }
}
.r-scan-body__title {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--ink);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.05;
}
.r-scan-body__url {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.025em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.r-price-strip {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex; align-items: center; gap: 18px;
}
.r-price-strip__big {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--ink);
    line-height: 1;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.r-price-strip__delta {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
}
.r-price-strip__delta--down { color: var(--red); }
.r-price-strip__delta--ok   { color: var(--green); }

.r-flags { margin-top: 14px; }
.r-flag {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 5px 0;
}
.r-flag__glyph {
    width: 18px; height: 18px; flex-shrink: 0;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 700; line-height: 1;
    border: 1px solid;
}
.r-flag__glyph--bad  { background: var(--red-soft);   color: var(--red);   border-color: var(--red); }
.r-flag__glyph--warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.r-flag__glyph--ok   { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.r-flag__text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
    line-height: 1.5;
}
.r-flag__more {
    margin-top: 4px;
    padding-left: 28px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.025em;
}

.r-scan-foot {
    padding: 14px 20px;
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px;
}
.r-counters { display: flex; gap: 18px; flex-wrap: wrap; }
.r-counter { display: flex; align-items: center; gap: 6px; }
.r-counter__num {
    width: 22px; height: 22px; border-radius: 4px;
    background: #fff;
    font-family: var(--font-display);
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid;
}
.r-counter__num--red   { color: var(--red);   border-color: var(--red); }
.r-counter__num--amber { color: var(--amber); border-color: var(--amber); }
.r-counter__num--green { color: var(--green); border-color: var(--green); }


/* ── Score badge (cornered tile with big numeral + label) ──────────────── */

.r-score {
    position: relative;
    width: 124px; height: 124px; flex-shrink: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border-radius: 12px;
    border: 1px solid;
    text-align: center;
}
.r-score--scam      { color: var(--red);    background: var(--red-soft);    border-color: var(--red); }
.r-score--suspect   { color: var(--orange); background: var(--orange-soft); border-color: var(--orange); }
.r-score--vigilance { color: var(--amber);  background: var(--amber-soft);  border-color: var(--amber); }
.r-score--clean     { color: var(--green);  background: var(--green-soft);  border-color: var(--green); }
.r-score__corner {
    position: absolute;
    width: 9px; height: 9px;
}
.r-score__corner--tl { top: 6px;    left: 6px;  border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; }
.r-score__corner--tr { top: 6px;    right: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }
.r-score__corner--bl { bottom: 6px; left: 6px;  border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; }
.r-score__corner--br { bottom: 6px; right: 6px; border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }
.r-score__num-row {
    display: flex; align-items: baseline; gap: 2px;
    margin-top: 2px;
}
.r-score__num {
    font-family: var(--font-display);
    font-size: 60px;
    line-height: 1;
    letter-spacing: 0.02em;
}
.r-score__den {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
}
.r-score__label {
    margin-top: 4px;
    padding: 2px 8px;
    background: currentColor;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.r-score__label > span { color: #fff; }

.r-score--lg { width: 152px; height: 152px; }
.r-score--lg .r-score__num { font-size: 76px; }


/* ── Apartment thumbnail (striped placeholder) ─────────────────────────── */

.r-thumb {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #E5DCC8;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(27, 20, 13, 0.07) 0 1px,
        transparent 1px 12px
    );
    min-height: 180px;
}
.r-thumb--p1 { background-color: #E5DCC8; }
.r-thumb--p2 { background-color: #D8C7AE; }
.r-thumb--p3 { background-color: #E1D2B9; }
.r-thumb--p4 { background-color: #CFC1A8; }
.r-thumb__window {
    position: absolute; left: 8%; top: 18%;
    width: 38%; height: 46%;
    background: var(--card);
    border: 1px solid #BFA987;
    box-shadow:
        inset 0 0 0 4px var(--page-outer),
        inset 0 0 0 5px #BFA987;
}
.r-thumb__sofa {
    position: absolute; left: 54%; right: 8%; bottom: 20%;
    height: 28%;
    background: #BFA987; opacity: 0.6;
    border-radius: 4px;
}
.r-thumb__lamp {
    position: absolute; left: 54%; top: 24%;
    width: 14%; height: 14%;
    border-radius: 50%;
    background: var(--card); opacity: 0.7;
}
.r-thumb__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.r-thumb__tint { position: absolute; inset: 0; pointer-events: none; }
.r-thumb__tint--scam    { background: linear-gradient(180deg, rgba(215, 38, 61, 0)  50%, rgba(215, 38, 61, 0.18) 100%); }
.r-thumb__tint--caution { background: linear-gradient(180deg, rgba(168, 106, 31, 0) 60%, rgba(168, 106, 31, 0.16) 100%); }
.r-thumb__tint--clean   { background: linear-gradient(180deg, rgba(63, 107, 59, 0)  60%, rgba(63, 107, 59, 0.14)  100%); }
.r-thumb__chip {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 8px;
    background: rgba(251, 246, 236, 0.92);
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 9px; font-weight: 600;
    color: var(--ink-2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.r-thumb__wm {
    position: absolute; bottom: 8px; right: 10px;
    font-family: var(--font-mono);
    font-size: 9px; font-weight: 500;
    color: rgba(27, 20, 13, 0.55);
    letter-spacing: 0.18em;
}


/* ── Toast / inline banner ─────────────────────────────────────────────── */

.r-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%); z-index: 200;
    background: var(--card);
    border: 1px solid var(--red);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 20px 40px rgba(27, 20, 13, 0.18);
    max-width: 480px;
    animation: r-fade-in 0.2s ease-out;
}
.r-toast__title {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--red);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.r-toast__msg {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.02em;
}
.r-toast__close {
    background: transparent; border: none;
    color: var(--muted); padding: 4px;
    cursor: pointer;
}


/* ── Login page (centered card with logo on top) ───────────────────────── */

.r-login {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.r-login__card.ant-card {
    width: 100%; max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
}
.r-login__card .ant-card-body {
    display: flex; flex-direction: column;
    align-items: center; gap: 28px;
    padding: 40px 32px;
}
.r-login__logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
}
.r-login__alert {
    width: 100%;
    border-radius: 10px;
}
.r-login__cta {
    width: 100%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
}


/* ── Scan-details page chrome ──────────────────────────────────────────── */

.r-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    margin-top: 18px;
}
.r-section__head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px;
}
.r-section__num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 32px;
    color: var(--red);
    line-height: 1;
}
.r-section__title {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}


/* ── Responsive overrides ──────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .r-input-card__grid { grid-template-columns: 1fr 1fr; }
    .r-input-card__grid .r-launch { grid-column: 1 / -1; }
    .r-metrics { grid-template-columns: repeat(2, 1fr); }
    .r-metric:nth-child(3) { border-left: none; border-top: 1px dashed var(--line); }
    .r-metric:nth-child(4) { border-top: 1px dashed var(--line); }
    .r-scan-body { grid-template-columns: 180px 1fr; }
    .r-scan-body .r-score { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 720px) {
    .r-main { padding: 24px 16px 80px; }
    /* Tall enough for the 88px mobile logo + padding. */
    .r-nav__inner { padding: 0 16px; height: 104px; }
    .r-nav__tagline,
    .r-nav__divider,
    .r-nav__buy { display: none !important; }
    .r-nav__tokens { padding: 0 10px; }
    .r-nav__tokens__label { display: none; }
    .r-input-card { padding: 22px; border-radius: 16px; }
    .r-input-card__grid { grid-template-columns: 1fr; gap: 14px; }
    .r-input-card__grid .r-launch { grid-column: 1; width: 100%; }
    .r-input-card__grid .r-launch .r-btn { width: 100%; }
    .r-input-card__h2 { font-size: 28px; }
    .r-input-card__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
    .r-metrics { grid-template-columns: repeat(2, 1fr); border-radius: 12px; }
    .r-metric { padding: 16px 14px; }
    .r-metric__big { font-size: 32px; }
    .r-scans-h2 { font-size: 36px; }
    .r-scans-counter { display: block; margin-left: 0; margin-top: 6px; }
    .r-scans-header { flex-direction: column; align-items: flex-start; }
    .r-filter-tabs { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .r-filter-tabs::-webkit-scrollbar { display: none; }
    .r-scan-strip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; }
    .r-scan-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; position: relative; }
    .r-scan-body .r-thumb { width: 100%; height: 180px; }
    .r-scan-body .r-score {
        position: absolute; top: 26px; right: 26px;
        transform: scale(0.78); transform-origin: top right;
    }
    .r-scan-body__title { font-size: 20px; }
    .r-scan-foot {
        flex-direction: column; align-items: stretch;
        gap: 12px; padding: 14px 16px;
    }
    .r-scan-foot .r-counters { justify-content: space-between; width: 100%; }
    .r-scan-foot .r-btn { width: 100%; }
    .r-login__card { padding: 24px; border-radius: 14px; }
    .r-login__title { font-size: 32px; }
}


/* ── AntDesign overrides — push the library towards the brand palette ──── */

/* Every AntDesign Primary button = ink-black with Anton uppercase. One global
   override so we don't have to attach a brand class to every button site. */
.ant-btn-primary {
    background: var(--black) !important;
    border-color: var(--black) !important;
    color: #fff !important;
    font-family: var(--font-display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(14, 11, 8, 0.18);
}
.ant-btn-primary:hover,
.ant-btn-primary:focus {
    background: #1F1B14 !important;
    border-color: #1F1B14 !important;
    color: #fff !important;
}
.ant-btn-primary[disabled],
.ant-btn-primary[disabled]:hover {
    background: rgba(27, 20, 13, 0.08) !important;
    border-color: var(--line) !important;
    color: var(--ink-faint) !important;
    box-shadow: none;
}

/* CTAs that need the pill shape on top of the brand black. */
.r-cta-btn.ant-btn,
.r-launch-btn.ant-btn,
.r-login__cta.ant-btn {
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

/* Back / outline buttons. */
.r-back-btn.ant-btn {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-family: var(--font-display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
}
.r-back-btn.ant-btn:hover {
    background: rgba(27, 20, 13, 0.05);
    color: var(--ink);
    border-color: var(--ink);
}

/* Tags act as sharp pills with mono caps. */
.r-pill-ant.ant-tag {
    border-radius: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 3px 9px;
    line-height: 1.4;
    margin-right: 0;
    color: #fff;
}

/* Filter segmented control — round pill with ink active state. */
.r-filter-segmented.ant-segmented {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 4px;
}
.r-filter-segmented .ant-segmented-item {
    border-radius: 99px;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}
.r-filter-segmented .ant-segmented-item-selected {
    background: var(--black);
    color: #fff;
}
.r-filter-segmented .ant-segmented-thumb { background: var(--black); }
.r-filter-segmented .ant-segmented-item-label {
    line-height: 28px;
    height: 28px;
}

/* Metrics row inside a Row: matches the card border + dashed dividers. */
.r-metrics.ant-row {
    margin-top: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}
.r-metric { padding: 22px 24px; }
.r-metrics.ant-row > .ant-col + .ant-col .r-metric { border-left: 1px dashed var(--line); }

/* Plain vertical stack for the scan-card list — replaces AntDesign Space whose
   gap stops applying once children carry display:block. */
.r-scan-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Scan card AntDesign override. */
.r-scan-card.ant-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}
.r-scan-card.ant-card .ant-card-body {
    padding: 0;
    background: var(--card);
    border-radius: inherit;
}
.r-scan-card.ant-card:hover { border-color: var(--line-strong); }

/* Sub-card (used on the scan-details page for the recommendation + signal tiles). */
.r-subcard.ant-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 14px;
}
.r-subcard.ant-card .ant-card-body { padding: 18px; }

/* "Money saved" Alert — full red banner. */
.r-money-saved.ant-alert {
    margin-top: 18px;
    background: var(--red-soft);
    border: 1px solid var(--red);
    border-radius: 12px;
    color: var(--red);
}
.r-money-saved .ant-alert-message {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--red);
}
.r-money-saved .ant-alert-description {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--red);
    letter-spacing: 0.02em;
}

/* Loading container for Spin. */
.r-empty {
    padding: 80px 24px;
    text-align: center;
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 12px;
}

/* Scan-details disclaimer footer. */
.r-disclaimer {
    margin-top: 32px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.05em;
    line-height: 1.6;
}

/* Detail-hero card variant just removes the bottom rounding when followed by another card. */
.r-scan-card--detail.ant-card { border-radius: 16px; }


/* ── Buy-tokens packs (modal) ──────────────────────────────────────────── */

.r-packs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 6px;
}
@media (max-width: 640px) {
    .r-packs { grid-template-columns: 1fr; }
}
.r-pack {
    position: relative;
    text-align: left;
    padding: 22px 18px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.12s ease, transform 0.12s ease;
    font: inherit;
    color: inherit;
}
.r-pack:hover:not(:disabled)  { border-color: var(--ink); transform: translateY(-2px); }
.r-pack:disabled { opacity: 0.6; cursor: progress; }
.r-pack--featured {
    background: var(--card);
    border-color: var(--red);
}
.r-pack__ribbon {
    position: absolute;
    top: -10px; right: 14px;
    background: var(--red);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.r-pack__count {
    font-family: var(--font-display);
    font-size: 44px;
    line-height: 1;
    color: var(--ink);
}
.r-pack__label {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}
.r-pack__price {
    margin-top: 10px;
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
    letter-spacing: 0.02em;
    line-height: 1;
}
.r-pack--featured .r-pack__price { color: var(--red); }
.r-pack__sub {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    letter-spacing: 0.05em;
}
.r-pack__cta {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}
.r-pack--featured .r-pack__cta { color: var(--red); }
.r-packs__foot {
    margin-top: 18px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
}

/* ── Subscription cards (two-up) ───────────────────────────────────────── */
.r-subs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 6px;
}
@media (max-width: 640px) {
    .r-subs { grid-template-columns: 1fr; }
}
.r-sub {
    position: relative;
    text-align: left;
    padding: 24px 20px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.12s ease, transform 0.12s ease;
    font: inherit;
    color: inherit;
}
.r-sub:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-2px); }
.r-sub:disabled { opacity: 0.6; cursor: progress; }
.r-sub--featured {
    background: var(--card);
    border-color: var(--red);
}
.r-sub__ribbon {
    position: absolute;
    top: -10px; right: 14px;
    background: var(--red);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.r-sub__name {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}
.r-sub__price {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1;
    color: var(--ink);
    display: inline;
}
.r-sub--featured .r-sub__price { color: var(--red); }
/* Clarifying sub-line under the "Illimité jetons" line on the unlimited tier. */
.r-sub__unlimited-note {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}
/* Small "HT" (hors taxes / before tax) marker beside a price. */
.r-price-ht {
    margin-left: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    vertical-align: super;
}
.r-sub__period {
    display: inline;
    margin-left: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
}
.r-sub__tokens {
    margin-top: 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.r-sub__tokens-num {
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
    color: var(--ink);
}
.r-sub--featured .r-sub__tokens-num { color: var(--red); }
.r-sub__tokens-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.r-sub__cta {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}
.r-sub--featured .r-sub__cta { color: var(--red); }

/* Current plan — greyed out and non-interactive (the user is already subscribed to it). */
.r-sub--current {
    opacity: 0.55;
    background: var(--bg-soft);
    border-color: var(--line);
    border-style: dashed;
    cursor: not-allowed;
    filter: grayscale(1);
}
.r-sub--current:hover { transform: none; border-color: var(--line); }
.r-sub--current .r-sub__price,
.r-sub--current .r-sub__tokens-num,
.r-sub--current .r-sub__cta { color: var(--muted); }
.r-sub__ribbon--current { background: var(--muted); }

/* ── One-time reveal under the subscriptions ───────────────────────────── */
.r-onetime-note {
    margin: 18px 0 4px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}
.r-onetime-note__link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--red);
    cursor: pointer;
    text-decoration: underline;
}

/* Bold, very visible CTA that reveals the one-time packs. */
.r-onetime-cta {
    margin: 20px 0 4px;
    text-align: center;
}
.r-onetime-cta__btn {
    display: inline-block;
    background: var(--ink);
    color: var(--bg);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 13px 26px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}
.r-onetime-cta__btn:hover {
    transform: translateY(-2px);
    background: var(--red);
    border-color: var(--red);
}

.r-onetime { margin-top: 18px; }
.r-onetime__head {
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}


/* ── Payment-state pages (success / cancel) ────────────────────────────── */
.r-payment-state { max-width: 640px; margin: 64px auto; }


/* ── Verdict stamp (rotated rubber-stamp mark) ─────────────────────────── */

.r-stamp {
    display: inline-block;
    transform: rotate(-4deg);
    border: 2.5px solid var(--red);
    color: var(--red);
    background: transparent;
    padding: 6px 14px;
    border-radius: 2px;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}
.r-stamp__text { display: inline-block; line-height: 1.05; }
.r-stamp--suspect   { border-color: var(--orange); color: var(--orange); }
.r-stamp--vigilance { border-color: var(--amber);  color: var(--amber); }
.r-stamp--clean     { border-color: var(--green);  color: var(--green); }
.r-stamp--sm { padding: 4px 10px; font-size: 11px; border-width: 2px; }
.r-stamp--lg { padding: 10px 22px; font-size: 22px; border-width: 3px; letter-spacing: 0.10em; }


/* ── Image-pair carousel (scan-details hero) ───────────────────────────── */

.r-pair-carousel.ant-carousel { margin-bottom: 18px; }
.r-pair-carousel .slick-dots li button {
    background: var(--ink-faint) !important;
    border-radius: 99px;
}
.r-pair-carousel .slick-dots li.slick-active button {
    background: var(--red) !important;
}
.r-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 4px 4px 30px;
}
.r-pair__cell {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--page-outer);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.r-pair__cell img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.r-pair__badge {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 10px;
    background: rgba(251, 246, 236, 0.95);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-transform: none;
}
.r-pair-banner {
    margin: 14px 4px 0;
    padding: 10px 14px;
    background: var(--red-soft);
    border: 1px solid var(--red-soft-2);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--red-deep);
    line-height: 1.5;
    display: flex; align-items: flex-start; gap: 8px;
}
.r-pair-banner::before { content: '⚐'; color: var(--red); font-size: 13px; }


/* ── Big score block (the "14 / 100" + stamp moment) ──────────────────── */

.r-score-block {
    text-align: center;
    padding: 28px 16px 24px;
}
.r-score-block__eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.r-score-block__big {
    margin-top: 8px;
    font-family: var(--font-display);
    color: var(--red);
    font-size: 88px;
    line-height: 0.95;
    letter-spacing: 0.01em;
}
.r-score-block__big--caution { color: var(--amber); }
.r-score-block__big--clean   { color: var(--green); }
.r-score-block__den {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--muted);
    margin-left: 4px;
    letter-spacing: 0.06em;
}
.r-score-block__stamp { margin-top: 14px; }


/* ── Alert sub-cards (the "ALERTE 1: ..." pattern from the design) ─────── */

.r-alert-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 10px;
}
.r-alert-card__tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
}
.r-alert-card__tag--bad   { background: var(--red); }
.r-alert-card__tag--warn  { background: var(--amber); }
.r-alert-card__tag--ok    { background: var(--green); }
.r-alert-card__title {
    margin-left: 8px;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--ink);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.r-alert-card__body {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.55;
}


/* ── Blazor error UI override (matches the brand) ──────────────────────── */

#blazor-error-ui {
    background: var(--red);
    color: #fff;
    bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed; width: 100%; z-index: 1000;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
#blazor-error-ui .reload { color: #fff; text-decoration: underline; margin-left: 8px; }


/* ════════════════════════════════════════════════════════════════════════
   Scan Details — v2 layout
   ════════════════════════════════════════════════════════════════════════ */

.r-sd-main { max-width: 980px; margin: 0 auto; padding: 32px 20px 80px; }

/* ── Hero image-pair carousel ─────────────────────────────────────────── */
.r-sd-hero-pairs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}
.r-sd-hero-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.r-sd-hero-pair__cell {
    position: relative;
    aspect-ratio: 4 / 3;
    background: rgba(27, 20, 13, 0.04);
    border: 1px solid rgba(27, 20, 13, 0.08);
    overflow: hidden;
    border-radius: 4px;
}
/* Direct-child selector so the photo's object-fit:cover doesn't bleed into the
   platform-logo <img> nested inside .r-sd-hero-pair__logo (which needs `contain`
   to letterbox wide wordmarks like Airbnb / Logic-Immo without clipping). */
.r-sd-hero-pair__cell > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.r-sd-hero-pair__logo {
    position: absolute;
    top: 14px;
    right: 14px;
    /* No background here — the inner PlatformLogo's white plate provides it. */
}
@media (max-width: 640px) {
    /* On phones the hero photos are smaller, so step the plate back down to lg
       (48px) rather than xl — otherwise the logo eats a quarter of the image. */
    .r-sd-hero-pair__logo .r-platform-logo--xl .r-platform-logo__plate {
        width: 52px; height: 52px;
    }
    .r-sd-hero-pair__logo .r-platform-logo--xl .r-platform-logo__plate--text {
        height: 52px; min-width: 52px; font-size: 14px; padding: 0 12px;
    }
    .r-sd-hero-pair__logo { top: 10px; right: 10px; }
}
.r-sd-hero-caption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 8px 0 24px;
    border-bottom: 1px dashed rgba(27, 20, 13, 0.1);
    margin-bottom: 24px;
}

/* ── Score block ──────────────────────────────────────────────────────── */
.r-sd-score-card { text-align: center; }
.r-sd-score { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.r-sd-score__big {
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 140px;
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--red);
}
.r-sd-score__big--suspect   { color: var(--orange); }
.r-sd-score__big--vigilance { color: #C97A1A; }
.r-sd-score__big--clean     { color: #1F7A3A; }
.r-sd-score__big--scam      { color: var(--red); }
.r-sd-score__den {
    font-size: 38px;
    opacity: 0.7;
    margin-left: 6px;
}
.r-sd-score__stamp { margin-top: 8px; }

.r-sd-listing-title {
    margin-top: 12px;
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
}
.r-sd-listing-url {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

/* ── Summary + recommendation ─────────────────────────────────────────── */
.r-sd-summary {
    font-family: var(--font-serif, "Instrument Serif", serif);
    font-style: italic;
    font-size: 22px;
    line-height: 1.45;
    color: var(--ink);
    margin: 8px 0 16px;
}
.r-sd-reco { margin-top: 16px; }
.r-sd-reco__body {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink);
}
.r-sd-flags { margin-top: 18px; }
.r-sd-flags ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}
.r-sd-flags li {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--red);
    padding: 6px 0;
    border-bottom: 1px dashed rgba(215, 38, 61, 0.2);
}

/* ── Section headers ──────────────────────────────────────────────────── */
.r-sd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.r-sd-section-head__main { display: flex; flex-direction: column; gap: 4px; }
.r-sd-section-body {
    margin: 8px 0 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-2, #3D332A);
}

/* ── Empty / unavailable callouts ─────────────────────────────────────── */
.r-sd-empty {
    text-align: center;
    padding: 24px 16px;
    border: 1px dashed rgba(27, 20, 13, 0.15);
    border-radius: 4px;
    background: rgba(27, 20, 13, 0.03);
}
.r-sd-empty p {
    margin: 8px 0 0;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-2);
}
.r-sd-empty--ok { border-color: rgba(31, 122, 58, 0.3); background: rgba(31, 122, 58, 0.04); }
.r-sd-empty--muted { border-color: rgba(27, 20, 13, 0.15); }

/* ── Platform logo (image-on-white-plate, with text-pill fallback) ────── */
.r-platform-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
}
.r-platform-logo__plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    flex-shrink: 0;
}
/* Image plate keeps the size class's square dimensions; the inner <img> fills
   the box and uses object-fit: contain to letterbox without distortion.
   object-fit only works when BOTH width and height are explicitly set on the img
   — the previous `width: auto` made contain a no-op, so wide wordmarks were
   sized by their natural ratio and clipped by the plate's overflow:hidden. */
.r-platform-logo__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 6px;
    box-sizing: border-box;
}
.r-platform-logo__plate--text {
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}
.r-platform-logo--sm .r-platform-logo__plate { width: 28px; height: 28px; }
.r-platform-logo--md .r-platform-logo__plate { width: 36px; height: 36px; }
.r-platform-logo--lg .r-platform-logo__plate { width: 48px; height: 48px; }
.r-platform-logo--xl .r-platform-logo__plate { width: 72px; height: 72px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.r-platform-logo--sm .r-platform-logo__plate--text { height: 28px; width: auto; min-width: 28px; font-size: 11px; }
.r-platform-logo--md .r-platform-logo__plate--text { height: 36px; width: auto; min-width: 36px; font-size: 13px; }
.r-platform-logo--lg .r-platform-logo__plate--text { height: 48px; width: auto; min-width: 48px; font-size: 15px; }
.r-platform-logo--xl .r-platform-logo__plate--text { height: 72px; width: auto; min-width: 72px; font-size: 18px; padding: 0 16px; }
.r-platform-logo__name { font-weight: 600; color: var(--ink); text-transform: none; }

/* ── Confidence bar ───────────────────────────────────────────────────── */
.r-confidence-bar { display: inline-flex; gap: 4px; margin-top: 8px; }
.r-confidence-bar__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(27, 20, 13, 0.15);
}
.r-confidence-bar__dot--strong { background: #1F7A3A; }
.r-confidence-bar__dot--weak   { background: #C97A1A; }
.r-confidence-bar__dot--off    { background: rgba(27, 20, 13, 0.15); }

/* ── DataRow ──────────────────────────────────────────────────────────── */
.r-sd-data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(27, 20, 13, 0.08);
    font-family: var(--font-mono);
    font-size: 12px;
}
.r-sd-data-row:last-child { border-bottom: none; }
.r-sd-data-row__label { color: var(--muted, #857A6E); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.r-sd-data-row__value { color: var(--ink); font-weight: 600; text-align: right; }
.r-sd-data-row__value--good { color: #1F7A3A; }
.r-sd-data-row__value--bad  { color: var(--red); }
.r-sd-data-row__value--warn { color: #C97A1A; }
.r-sd-data-row__value--muted{ color: var(--muted); }

/* ── §01 Multi-platform card ──────────────────────────────────────────── */
.r-sd-platform-card {
    border: 1px solid rgba(27, 20, 13, 0.1);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 14px;
    background: #fff;
}
.r-sd-platform-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.r-sd-platform-card__strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin: 0 -4px 12px;
}
.r-sd-platform-card__strip img {
    flex: 0 0 auto;
    width: 180px;
    height: 130px;
    object-fit: cover;
    border-radius: 4px;
    scroll-snap-align: start;
}
.r-sd-platform-card__rows { margin: 8px 0; }
.r-sd-platform-card__cta { text-align: right; margin-top: 10px; }
.r-sd-match-type { background: rgba(27, 20, 13, 0.06); color: var(--ink); }

/* ── §02 Email tiles ──────────────────────────────────────────────────── */
.r-sd-email-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}
.r-sd-email-tile {
    border: 1px solid rgba(27, 20, 13, 0.1);
    border-radius: 6px;
    padding: 14px;
    background: #fff;
}
.r-sd-email-tile--muted { background: rgba(27, 20, 13, 0.03); }
.r-sd-email-tile__addr {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    margin: 8px 0 12px;
    word-break: break-all;
}
.r-sd-email-tile__missing {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}
.r-sd-email-verdict { text-align: center; margin-top: 14px; }

/* ── §02 Email-missing callout ────────────────────────────────────────── */
.r-sd-email-missing {
    border: 2px dashed var(--red);
    background: rgba(215, 38, 61, 0.04);
    padding: 24px;
    border-radius: 8px;
    margin-top: 8px;
}
.r-sd-email-missing__head { display: flex; align-items: center; gap: 10px; color: var(--red); }
.r-sd-email-missing__title {
    margin: 14px 0 10px;
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 22px;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.r-sd-email-missing__body {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink);
    margin: 8px 0;
}
.r-sd-email-missing__actions { margin-top: 16px; }

/* ── §03 Identity grid ────────────────────────────────────────────────── */
.r-sd-identity-header { margin-bottom: 16px; }
.r-sd-identity-agency {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(27, 20, 13, 0.04);
    border-left: 3px solid var(--ink);
    border-radius: 4px;
}
.r-sd-identity-agency p {
    margin: 4px 0 0;
    font-family: var(--font-serif, "Instrument Serif", serif);
    font-style: italic;
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink);
}
.r-sd-identity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}
.r-sd-identity-tile {
    border: 1px solid rgba(27, 20, 13, 0.1);
    border-radius: 6px;
    padding: 14px;
    text-align: center;
    background: #fff;
}
.r-sd-identity-tile--strong { border-color: rgba(31, 122, 58, 0.35); background: rgba(31, 122, 58, 0.04); }
.r-sd-identity-tile--weak   { border-color: rgba(201, 122, 26, 0.35); background: rgba(201, 122, 26, 0.04); }
.r-sd-identity-tile--none   { border-color: rgba(27, 20, 13, 0.1); background: rgba(27, 20, 13, 0.03); }
.r-sd-identity-tile--off    { opacity: 0.55; }
.r-sd-identity-tile__glyph {
    width: 40px; height: 40px;
    margin: 0 auto 8px;
    background: var(--ink);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display, "Anton", sans-serif);
    font-weight: 700;
}
.r-sd-identity-tile__platform {
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.r-sd-identity-tile__status {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}
.r-sd-identity-tile__companies { margin-top: 10px; }
.r-sd-identity-tile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-top: 4px;
}
.r-sd-identity-tile__chip {
    font-family: var(--font-mono);
    font-size: 10px;
    background: var(--ink);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}
.r-sd-identity-footer { text-align: right; margin-top: 14px; }

/* ── §04 Price ────────────────────────────────────────────────────────── */
.r-sd-price-big {
    text-align: center;
    margin: 8px 0 20px;
}
.r-sd-price-big__num {
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 56px;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.r-sd-price-big__suffix {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-left: 6px;
}
.r-price-chart { margin: 12px 0 20px; }
.r-price-chart__bar {
    position: relative;
    height: 16px;
    background: rgba(27, 20, 13, 0.06);
    border-radius: 999px;
}
.r-price-chart__range {
    position: absolute;
    top: 0; bottom: 0;
    background: rgba(31, 122, 58, 0.25);
    border-radius: 999px;
}
.r-price-chart__median {
    position: absolute;
    top: -4px; bottom: -4px;
    width: 2px;
    background: var(--ink);
    transform: translateX(-50%);
}
.r-price-chart__marker {
    position: absolute;
    top: -22px;
    transform: translateX(-50%);
    text-align: center;
    color: var(--red);
}
.r-price-chart__marker--green { color: #1F7A3A; }
.r-price-chart__marker--amber { color: #C97A1A; }
.r-price-chart__marker-pin { font-size: 14px; display: block; line-height: 1; }
.r-price-chart__marker-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.r-price-chart__legend {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}
.r-price-chart__legend strong { color: var(--ink); font-weight: 700; }
.r-price-chart__legend em { font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; }
.r-sd-price-meta { margin-top: 12px; }

/* ── §05 Images ───────────────────────────────────────────────────────── */
.r-sd-ai-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: flex-start;
    margin: 8px 0 20px;
}
.r-ai-gauge { text-align: center; max-width: 220px; }
.r-ai-gauge__svg { width: 140px; height: 140px; }
.r-ai-gauge__track { fill: none; stroke: rgba(27, 20, 13, 0.08); stroke-width: 8; }
.r-ai-gauge__fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.4s ease; }
.r-ai-gauge--neutral .r-ai-gauge__fill { stroke: var(--ink); }
.r-ai-gauge--red   .r-ai-gauge__fill { stroke: var(--red); }
.r-ai-gauge--amber .r-ai-gauge__fill { stroke: #C97A1A; }
.r-ai-gauge--green .r-ai-gauge__fill { stroke: #1F7A3A; }
.r-ai-gauge__big { font-family: var(--font-display, "Anton", sans-serif); font-size: 22px; fill: var(--ink); }
.r-ai-gauge__suffix { font-family: var(--font-mono); font-size: 8px; fill: var(--muted); }
.r-ai-gauge__label {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
}
.r-ai-gauge__sub {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}
.r-sd-ai-list { margin-top: 12px; }
.r-sd-ai-list ul { padding-left: 22px; margin: 6px 0; }
.r-sd-ai-list li {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
    margin-bottom: 4px;
}

.r-sd-dupes { margin-top: 18px; }
.r-sd-dupe-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.r-sd-dupe-row__cell {
    position: relative;
    aspect-ratio: 4 / 3;
    background: rgba(27, 20, 13, 0.04);
    border-radius: 4px;
    overflow: hidden;
}
.r-sd-dupe-row__cell img { width: 100%; height: 100%; object-fit: cover; }
.r-sd-dupe-row__badge {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(244, 236, 223, 0.95);
    border-radius: 4px;
    padding: 3px 6px;
}

/* ── Responsive breakpoints ───────────────────────────────────────────── */
@media (max-width: 920px) {
    .r-sd-score__big { font-size: 110px; }
    .r-sd-identity-grid { grid-template-columns: repeat(2, 1fr); }
    .r-sd-platform-card__strip img { width: 150px; height: 110px; }
}

@media (max-width: 640px) {
    .r-sd-main { padding: 20px 14px 60px; }
    .r-sd-score__big { font-size: 100px; }
    .r-sd-score__den { font-size: 28px; }
    .r-sd-listing-title { font-size: 22px; }
    .r-sd-summary { font-size: 18px; }
    .r-sd-email-grid { grid-template-columns: 1fr; }
    .r-sd-identity-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .r-sd-ai-row { flex-direction: column; align-items: center; }
    .r-sd-dupe-row { grid-template-columns: 1fr; }
    .r-sd-hero-pair__cell img { aspect-ratio: 1 / 1; }
    .r-sd-platform-card__strip img { width: 130px; height: 100px; }
}

/* ── §05 image-analysis headline + dupe stats ─────────────────────────── */
.r-sd-images-headline {
    text-align: center;
    margin: 8px 0 16px;
}
.r-sd-images-headline__num {
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 44px;
    color: var(--ink);
    line-height: 1;
}
.r-sd-images-headline__cap {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}
.r-sd-dupes-stats { margin: 16px 0 12px; }

/* ── Misc additions ───────────────────────────────────────────────────── */
.r-sd-section-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 14px;
    gap: 12px;
    flex-wrap: wrap;
}
.r-sd-dupe-pair { margin-top: 14px; }
.r-sd-dupe-row__caption {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    margin-top: 6px;
}


/* ════════════════════════════════════════════════════════════════════════
   Scan Details — mockup alignment pass
   ════════════════════════════════════════════════════════════════════════ */

/* ── Share button (hero header right-edge aside) ──────────────────────── */
/* Pill-shaped with icon + "Partager" label so it reads as an obvious action,
   not just a glyph. Mono caps for the label keeps it in the brand's voice. */
.r-sd-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 99px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.r-sd-share-btn:hover { background: #1F1B14; }
.r-sd-share-btn:active { transform: translateY(1px); }
.r-sd-share-btn svg { flex-shrink: 0; }

/* ── Hero header (eyebrow + Anton title + address + ANALYSÉ EN stat) ──── */
.r-sd-hero-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}
.r-sd-hero-head__main { min-width: 0; flex: 1; }
.r-sd-hero-h1 {
    margin-top: 6px;
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 44px;
    line-height: 0.95;
    color: var(--ink);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
/* Hero title becomes a deep-link to the user's original ad when SubmittedUrl is set —
   styled like the underlying h1, underline-on-hover so it doesn't shout at rest. */
.r-sd-hero-title-link        { text-decoration: none; color: inherit; }
.r-sd-hero-title-link:hover  { text-decoration: underline; text-underline-offset: 4px; }
.r-sd-hero-title-link:focus-visible {
    outline: 2px solid var(--accent, currentColor);
    outline-offset: 4px;
}
.r-sd-hero-addr {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.r-sd-hero-head__aside {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.r-sd-hero-stat { text-align: right; flex-shrink: 0; }
.r-sd-hero-stat__num {
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
    letter-spacing: 0.02em;
    margin-top: 4px;
    white-space: nowrap;
}
.r-sd-hero-stat__num span {
    font-size: 14px;
    color: var(--muted);
    margin-left: 2px;
}

/* ── Score block — diagonal stripe + 3-stat row ───────────────────────── */
/* The AntDesign Card outer wrapper keeps its solid border/background; we layer
   the stripe ON TOP via the inner .ant-card-body selector so the gradient
   actually paints. Without this, AntDesign's white card-body covers it. */
.r-sd-score-card .ant-card-body {
    background:
        repeating-linear-gradient(135deg,
            transparent 0 22px,
            rgba(27, 20, 13, 0.025) 22px 23px);
}
.r-sd-score-stats {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px dashed rgba(27, 20, 13, 0.15);
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    gap: 40px;
}
.r-sd-score-stats__cell { text-align: center; white-space: nowrap; }
.r-sd-score-stats__num {
    margin-top: 4px;
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 24px;
    letter-spacing: 0.02em;
}
.r-sd-score-stats__num--red { color: var(--red); }
.r-sd-score-stats__num--green { color: #1F7A3A; }
.r-sd-score-stats__date {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.3px;
}

/* ── Page footer ──────────────────────────────────────────────────────── */
.r-sd-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px dashed rgba(27, 20, 13, 0.10);
    text-align: center;
}
.r-sd-footer__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}
.r-sd-footer__logo img {
    height: 32px;
    width: auto;
    opacity: 0.85;
}
.r-sd-footer__caption {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(27, 20, 13, 0.5);
    letter-spacing: 0.16em;
}
.r-sd-footer__scanid {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(27, 20, 13, 0.4);
    letter-spacing: 0.04em;
}

/* ── Responsive — 920px and 640px ─────────────────────────────────────── */
@media (max-width: 920px) {
    .r-sd-hero-head { flex-wrap: wrap; }
    .r-sd-hero-h1 { font-size: 32px; }
}
@media (max-width: 640px) {
    .r-sd-hero-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .r-sd-hero-head__aside {
        width: 100%;
        justify-content: space-between;
    }
    .r-sd-hero-stat { text-align: left; }
    .r-sd-hero-h1 { font-size: 26px; }
    .r-sd-score-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding-top: 16px;
    }
}


/* ── FindingNarrative — Claude's per-category subtitle + bullet evidence ─ */
.r-sd-finding__subtitle {
    margin: 0 0 6px;
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 20px;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.r-sd-finding__evidence {
    list-style: none;
    margin: 12px 0 8px;
    padding: 0;
}
.r-sd-finding__evidence li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-2, #3D332A);
    border-bottom: 1px dashed rgba(27, 20, 13, 0.08);
}
.r-sd-finding__evidence li:last-child { border-bottom: none; }
.r-sd-finding__evidence li::before {
    content: "›";
    position: absolute;
    left: 4px;
    top: 6px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--red);
}

/* ── Disclaimer above the footer ──────────────────────────────────────── */
.r-sd-disclaimer {
    margin-top: 56px;
    padding: 14px 18px;
    border: 1px dashed rgba(27, 20, 13, 0.15);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.55;
    color: var(--muted, #857A6E);
    letter-spacing: 0.01em;
    text-align: center;
}
.r-sd-disclaimer strong {
    color: var(--ink);
    font-weight: 700;
    margin-right: 4px;
}

/* ── User dropdown — "Nous contacter" mailto link ─────────────────────── */
.r-avatar-menu__link {
    display: block;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    /* AntDesign's MenuItem already supplies padding — the anchor only needs to
       fill the parent's hit area so the full row is clickable. */
    text-decoration: none;
}
.r-avatar-menu__link:hover { color: var(--red); }

/* ── Scan-details footer — "Nous contacter" mailto link ───────────────── */
.r-sd-footer__contact {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
}
.r-sd-footer__contact a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(27, 20, 13, 0.4);
}
.r-sd-footer__contact a:hover {
    color: var(--red);
    text-decoration-color: var(--red);
}

/* ── ErrorBoundary fallback (App.razor → RenderErrorContent.razor) ─────── */
.r-error-boundary {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}
.r-error-boundary__inner {
    max-width: 480px;
    text-align: center;
    border: 1.5px solid var(--red);
    background: var(--red-soft);
    padding: 40px 32px;
    border-radius: 4px;
}
.r-error-boundary__icon  { font-size: 36px; margin-bottom: 12px; }
.r-error-boundary__title {
    font-family: var(--font-display, "Anton", sans-serif);
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin: 0 0 12px;
}
.r-error-boundary__body {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 24px;
    line-height: 1.5;
}
.r-error-boundary__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.r-error-boundary__btn {
    display: inline-block;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1.5px solid var(--ink);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}
.r-error-boundary__btn:hover { background: var(--ink); color: var(--bg); }
.r-error-boundary__btn--primary {
    background: var(--ink);
    color: var(--bg);
}
.r-error-boundary__btn--primary:hover { background: transparent; color: var(--ink); }

/* ── Compulsory onboarding modal ───────────────────────────────────────────
   Editorial styling on top of AntDesign's Modal shell. We strip AntDesign's
   default body padding/title via WrapClassName so our own layout takes over. */
.r-onb-wrap .ant-modal-content {
    background: var(--bg);
    border: 1.5px solid var(--ink);
    border-radius: 0;
    box-shadow: 10px 10px 0 rgba(27, 20, 13, 0.12);
    overflow: hidden;
}
.r-onb-wrap .ant-modal-body { padding: 0; }

.r-onb {
    font-family: var(--font-body);
    color: var(--ink);
    padding: 30px 32px 28px;
}

.r-onb__head {
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 18px;
    margin-bottom: 22px;
}
.r-onb__kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 8px;
}
.r-onb__title {
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--ink);
}
.r-onb__sub {
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--ink-2);
    margin-top: 8px;
}

.r-onb__q { margin-bottom: 22px; }
.r-onb__label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
/* Full-sentence question label (multi-question feedback survey). */
.r-onb__qlabel {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 10px;
}

.r-onb__opts { display: flex; flex-direction: column; gap: 8px; }

.r-onb__opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    background: var(--card);
    border: 1.5px solid var(--line-strong);
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.3;
    transition: border-color 0.12s ease, background 0.12s ease,
                color 0.12s ease, transform 0.06s ease;
}
.r-onb__opt:hover { border-color: var(--ink); color: var(--ink); }
.r-onb__opt:active { transform: translateY(1px); }

.r-onb__marker {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    position: relative;
    transition: border-color 0.12s ease;
}
.r-onb__opt:hover .r-onb__marker { border-color: var(--ink); }

.r-onb__opt.is-selected {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
}
.r-onb__opt.is-selected .r-onb__marker { border-color: var(--bg); }
.r-onb__opt.is-selected .r-onb__marker::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--bg);
    border-radius: 50%;
}

.r-onb__input {
    width: 100%;
    margin-top: 10px;
    padding: 11px 13px;
    background: var(--card);
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 14px;
    outline: none;
}
.r-onb__input::placeholder { color: var(--ink-faint); }
.r-onb__input:focus { box-shadow: inset 0 0 0 1px var(--ink); }

.r-onb__foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1.5px solid var(--line);
}
.r-onb__submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--ink);
    border: 1.5px solid var(--ink);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}
.r-onb__submit:hover:not(:disabled) { background: #1F1B14; }
.r-onb__submit:disabled {
    background: var(--bg-soft);
    border-color: var(--line-strong);
    color: var(--ink-faint);
    cursor: not-allowed;
}
.r-onb__submit-arrow { transition: transform 0.12s ease; }
.r-onb__submit:hover:not(:disabled) .r-onb__submit-arrow { transform: translateX(3px); }

@media (max-width: 560px) {
    .r-onb { padding: 24px 20px 22px; }
    .r-onb__title { font-size: 28px; }
}

/* ── Buy-tokens modal — "out of credits" context banner ─────────────────────
   Shown at the top of the buy modal only when it auto-opened after a 402
   INSUFFICIENT_CREDITS, so the user understands why they landed here. */
.r-buy-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: var(--amber-soft);
    border: 1.5px solid var(--amber);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
}
.r-buy-alert__icon { flex: 0 0 auto; color: var(--amber); display: inline-flex; }

/* ── Scan scope note + "scan sale properties" interest CTA ──────────────────
   Sits under the new-scan form, and (variant --incard) inside a failed
   PROPERTY_FOR_SALE scan card. The descriptive text sits beside the button. */
.r-sale-cta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.r-sale-cta__note {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}
.r-sale-cta__row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.r-sale-cta__row--incard { margin-top: 12px; }
.r-sale-cta__text {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--ink-2);
    flex: 1 1 220px;
}
.r-sale-cta__btn {
    flex: 0 0 auto;
    padding: 9px 16px;
    background: var(--ink);
    border: 1.5px solid var(--ink);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.12s ease, opacity 0.12s ease;
}
.r-sale-cta__btn:hover:not(:disabled) { background: #1F1B14; }
.r-sale-cta__btn:disabled { opacity: 0.5; cursor: not-allowed; }
