/* Branded theme for kit tools (tools/shared/static/kit-brand.css).
   Loaded after kit.css when TOOL_META["theme"] == "brand". Colors come from the RealMarket
   Labs ship logo (static/logo-ship-bg-stroke-round-small.png): navy #083259 and gold
   #dfa945. The rest are shades of those two. The plain storefront theme in kit.css stays
   untouched for tools that do not opt in. */

.theme-brand {
    --navy: #083259;
    --navy-deep: #051f38;
    --navy-soft: #0f4273;
    --gold: #dfa945;
    --gold-strong: #e9b957;
    --gold-soft: #fbf1dc;
    --paper: #f4f7fb;
    --on-navy: #ffffff;
    --on-navy-muted: rgb(255 255 255 / 76%);
    --on-navy-line: rgb(255 255 255 / 14%);
    --ink: #0b1b2e;
    --muted: #4a5b6e;
    --line: #dde4ec;
    --brand: var(--navy);
    --brand-dark: var(--navy-deep);
    --brand-soft: #e6eef7;
    --accent: var(--gold);
    --bh-radius: 16px;
    caret-color: var(--navy);
    accent-color: var(--navy);
    background: var(--paper);
}

.theme-brand ::selection { background: var(--gold-soft); color: var(--ink); }

.theme-brand h1, .theme-brand h2, .theme-brand h3 {
    font-family: var(--font-display);
    text-wrap: balance;
    letter-spacing: -0.02em;
}

.theme-brand a { text-underline-offset: 0.18em; }

.bh-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding-inline: var(--s6);
}

@media (max-width: 560px) {
    .bh-wrap { padding-inline: var(--s4); }
}

.rml-main:focus { outline: none; }

/* --- Header ------------------------------------------------------------------------ */

.rml-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--navy);
    border-bottom: 1px solid var(--on-navy-line);
}

.rml-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s4);
    min-height: 72px;
}

.rml-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    color: var(--on-navy);
    text-decoration: none;
    min-height: 44px;
}

/* The logo's navy half would melt into the header without a ring around it. */
.rml-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgb(255 255 255 / 85%);
}

.rml-brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.rml-brand-sub {
    padding-left: var(--s3);
    border-left: 1px solid var(--on-navy-line);
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9375rem;
}

@media (max-width: 420px) {
    .rml-brand-sub { display: none; }
}

.rml-header-actions {
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.rml-contact {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--s4);
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 10px;
    color: var(--on-navy);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rml-contact:hover { background: rgb(255 255 255 / 8%); border-color: rgb(255 255 255 / 60%); }

@media (max-width: 600px) {
    .rml-contact { display: none; }
}

/* Language switch to the twin page: stays visible on mobile, where most ad traffic arrives */
.rml-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 var(--s3);
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 10px;
    color: var(--on-navy);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rml-lang:hover { background: rgb(255 255 255 / 8%); border-color: rgb(255 255 255 / 60%); }

.rml-menu-button,
.rml-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--on-navy);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.rml-menu-button:hover { background: rgb(255 255 255 / 10%); }

.theme-brand :is(.rml-contact, .rml-lang, .rml-menu-button, .rml-brand, .rml-footer a):focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* --- Menu drawer --------------------------------------------------------------------- */

.rml-drawer {
    margin: 0 0 0 auto;
    padding: 0;
    width: min(380px, 100vw);
    height: 100dvh;
    max-height: none;
    border: 0;
    background: var(--surface);
    color: var(--ink);
    box-shadow: -24px 0 48px -16px rgb(5 31 56 / 35%);
}

.rml-drawer[open] { animation: rml-slide-in 0.32s var(--kit-ease); }

.rml-drawer::backdrop { background: rgb(5 31 56 / 55%); }

@keyframes rml-slide-in { from { transform: translateX(24px); opacity: 0; } }

.rml-drawer-panel { padding: var(--s4) var(--s6) var(--s10); }

.rml-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s4);
}

.rml-drawer-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
}

.rml-drawer-close { color: var(--ink); }
.rml-drawer-close:hover { background: var(--paper); }
.rml-drawer-close:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.rml-drawer-label {
    margin: var(--s6) 0 var(--s2);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
}

.rml-drawer ul { list-style: none; margin: 0; padding: 0; }

.rml-drawer-tools a {
    display: block;
    padding: var(--s3);
    margin: 0 calc(var(--s3) * -1);
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
}

.rml-drawer-tools a:hover { background: var(--paper); }
.rml-drawer-tools a[aria-current="page"] { background: var(--gold-soft); }

.rml-drawer-tools strong { display: block; font-weight: 600; }

.rml-drawer-tools span {
    display: block;
    margin-top: 2px;
    font-size: 0.875rem;
    color: var(--muted);
}

.rml-drawer-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--navy);
    font-weight: 500;
    text-decoration: none;
}

.rml-drawer-links a:hover { text-decoration: underline; }

.rml-drawer a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* --- Hero ----------------------------------------------------------------------------- */

.bh-hero {
    position: relative;
    color: var(--on-navy);
    background:
        radial-gradient(56rem 30rem at 92% -12%, rgb(223 169 69 / 20%), transparent 62%),
        radial-gradient(44rem 34rem at -8% 108%, var(--navy-soft), transparent 68%),
        var(--navy);
    padding: var(--s10) 0 72px;
    overflow: hidden;
}

.bh-hero-grid {
    display: grid;
    grid-template-areas: "intro" "form" "preview";
    gap: var(--s8);
}

.bh-intro { grid-area: intro; }
.bh-form { grid-area: form; }
.bh-preview { grid-area: preview; }

@media (min-width: 960px) {
    .bh-hero { padding: 72px 0 96px; }
    .bh-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
        grid-template-rows: auto 1fr;
        grid-template-areas: "intro form" "preview form";
        gap: var(--s8) 64px;
    }
}

.bh-intro h1 {
    margin: 0 0 var(--s5);
    font-size: clamp(2.125rem, 1.2rem + 3.4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--on-navy);
}

.bh-intro h1 em {
    font-style: normal;
    color: var(--gold);
}

.bh-lede {
    margin: 0 0 var(--s6);
    max-width: 36em;
    font-size: 1.1875rem;
    line-height: 1.55;
    color: var(--on-navy-muted);
}

.bh-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2) var(--s6);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Vertical "what we check" list under the lede; same gold tick as the trust line */
.bh-checklist {
    display: grid;
    gap: var(--s3);
    margin: 0 0 var(--s6);
    padding: 0;
    list-style: none;
    font-size: 1.0625rem;
    line-height: 1.4;
}

.bh-checklist li {
    position: relative;
    padding-left: 30px;
}

.bh-checklist li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.2em;
    width: 7px;
    height: 13px;
    border: solid var(--gold);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.bh-trust li {
    position: relative;
    padding-left: 24px;
}

.bh-trust li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.2em;
    width: 6px;
    height: 11px;
    border: solid var(--gold);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* The form card sits on the navy band: white, rounded, with a real drop shadow. */
.theme-brand .bh-form {
    position: static;
    align-self: start;  /* a one-field form must not stretch to the height of the intro column */
    border: 0;
    border-radius: var(--bh-radius);
    padding: var(--s8) var(--s6) var(--s6);
    color: var(--ink);
    box-shadow: 0 2px 4px rgb(5 31 56 / 18%), 0 32px 64px -24px rgb(5 31 56 / 55%);
}

@media (max-width: 560px) {
    .theme-brand .bh-form { padding: var(--s6) var(--s5) var(--s5); }
}

.theme-brand .button-cta {
    background: var(--gold);
    color: var(--navy-deep);
    font-weight: 700;
}

.theme-brand .button-cta:hover { background: var(--gold-strong); }
.theme-brand .button-cta:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.theme-brand .kit-choice-option:has(input:checked) { background: var(--brand-soft); border-color: var(--navy); }

/* --- Sample result (the preview next to the form) ----------------------------------- */

.bh-sample {
    margin: 0;
    padding: var(--s6);
    border: 1px solid var(--on-navy-line);
    border-radius: var(--bh-radius);
    background: rgb(255 255 255 / 5%);
}

.bh-sample-title {
    margin: 0 0 var(--s2);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--gold);
}

.bh-sample-case {
    margin: 0 0 var(--s5);
    font-size: 0.9375rem;
    color: var(--on-navy-muted);
}

.bh-sample-bars { list-style: none; margin: 0; padding: 0; }

.bh-sample-questions {
    margin: 0;
    padding: 0 0 0 1.5em;
    color: var(--on-navy);
}

.bh-sample-questions li {
    padding: var(--s2) 0;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.bh-sample-questions li::marker { color: var(--gold); font-weight: 700; }

.bh-sample-questions .bh-sample-q { display: block; }

.bh-sample-questions .bh-sample-block {
    display: block;
    margin-bottom: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--on-navy-muted);
}

.bh-sample-bars li {
    display: grid;
    grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s4);
    padding: var(--s2) 0;
    font-size: 0.9375rem;
}

.bh-sample-track {
    height: 10px;
    border-radius: 999px;
    background: rgb(255 255 255 / 12%);
    overflow: hidden;
}

.bh-sample-track span {
    display: block;
    height: 100%;
    width: max(var(--bar), 1.5%);
    border-radius: inherit;
    background: rgb(255 255 255 / 45%);
    animation: kit-grow 1.1s var(--kit-ease) both;
}

.bh-sample-bars li:nth-child(2) .bh-sample-track span { animation-delay: 0.12s; }
.bh-sample-bars li:nth-child(3) .bh-sample-track span { animation-delay: 0.24s; }

.bh-sample-bars .is-current .bh-sample-label { font-weight: 600; }
.bh-sample-bars .is-current .bh-sample-track span { background: var(--on-navy); }
.bh-sample-bars .is-best .bh-sample-track span { background: var(--gold); }

.bh-sample-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.bh-sample figcaption {
    margin-top: var(--s4);
    padding-top: var(--s4);
    border-top: 1px solid var(--on-navy-line);
    font-size: 0.8125rem;
    color: var(--on-navy-muted);
}

@media (max-width: 560px) {
    .bh-sample { padding: var(--s5); }
    .bh-sample-bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--s3); }
    .bh-sample-track { grid-column: 1 / -1; grid-row: 2; }
}

/* --- What you get + details --------------------------------------------------------- */

.bh-gets { padding: 72px 0 var(--s8); }

.bh-gets h2 {
    margin: 0 0 var(--s8);
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 800;
    color: var(--navy);
}

.bh-gets-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: var(--s6) var(--s8);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bh-gets-list li {
    padding-top: var(--s4);
    border-top: 2px solid var(--navy);
}

.bh-gets-list strong {
    display: block;
    margin-bottom: var(--s2);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy);
}

.bh-gets-list span { color: var(--muted); }

.bh-details-wrap .kit-details {
    margin: 0;
    padding: var(--s10) 0 72px;
    border-top: 0;
}

.bh-details-wrap .kit-details h2 { color: var(--navy); }

/* Kit pages that are not the landing (result, not found) keep a reading column. */
.theme-brand .kit-result,
.theme-brand .kit-empty {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--s10) var(--s6) 72px;
}

@media (max-width: 560px) {
    .theme-brand .kit-result, .theme-brand .kit-empty { padding: var(--s8) var(--s4) var(--s10); }
}

/* --- Footer --------------------------------------------------------------------------- */

.rml-footer {
    background: var(--navy-deep);
    color: var(--on-navy-muted);
    font-size: 0.9375rem;
}

.rml-footer-grid {
    display: grid;
    gap: var(--s8);
    padding-top: 56px;
    padding-bottom: var(--s10);
}

@media (min-width: 640px) {
    .rml-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .rml-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 0.8fr; }
}

.rml-footer-brand p { margin: var(--s4) 0 0; max-width: 30em; }

.rml-footer-address { line-height: 1.6; font-size: 0.875rem; }

.rml-footer-label {
    margin: 0 0 var(--s3);
    color: var(--on-navy);
    font-weight: 600;
}

.rml-footer ul { list-style: none; margin: 0; padding: 0; }

.rml-footer li a,
.rml-social a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--on-navy-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.rml-footer li a:hover,
.rml-social a:hover { color: var(--gold); }

.rml-social { display: flex; gap: var(--s3); margin: var(--s3) 0 0; }
.rml-social a { min-width: 40px; justify-content: center; }

.rml-footer-bottom {
    padding-top: var(--s5);
    padding-bottom: var(--s6);
    border-top: 1px solid var(--on-navy-line);
    font-size: 0.8125rem;
}

.rml-footer-bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
    .rml-drawer[open], .bh-sample-track span { animation: none; }
    .rml-contact, .rml-lang, .rml-menu-button, .rml-footer a { transition: none; }
}

/* --- Sample checklist (status_rows preview) -------------------------------------------- */

.theme-brand {
    --on-navy-good: #7fd6ac;
    --on-navy-bad: #ff9a8b;
}

.bh-sample-rows { list-style: none; margin: 0; padding: 0; }

.bh-sample-rows li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) 0;
    border-top: 1px solid var(--on-navy-line);
    font-size: 0.9375rem;
    animation: bh-row-in 0.6s var(--kit-ease) both;
    animation-delay: calc(var(--i, 0) * 0.12s);
}

.bh-sample-rows li:first-child { border-top: 0; }

.bh-sample-rows .status-pass .kit-icon { color: var(--on-navy-good); }
.bh-sample-rows .status-warn .kit-icon { color: var(--gold); }
.bh-sample-rows .status-fail .kit-icon { color: var(--on-navy-bad); }
.bh-sample-rows .status-info .kit-icon { color: var(--on-navy-muted); }

@keyframes bh-row-in { from { opacity: 0.2; transform: translateX(-6px); } }

@media (prefers-reduced-motion: reduce) {
    .bh-sample-rows li { animation: none; }
}

/* --- Result page ------------------------------------------------------------------------ */

/* Verdict and headline numbers in a navy band, the same ground as the landing hero, so the
   visitor lands on the answer rather than on a form they already filled. */
.bh-result-hero {
    color: var(--on-navy);
    background:
        radial-gradient(48rem 26rem at 96% -20%, rgb(223 169 69 / 18%), transparent 60%),
        var(--navy);
    padding: 56px 0 var(--s8);
}

.bh-result-wrap { max-width: 808px; }

.bh-result-hero .kit-result-head h1 {
    margin: 0 0 var(--s4);
    font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--on-navy);
}

.bh-result-hero .tone-good h1 { color: var(--on-navy-good); }
.bh-result-hero .tone-warn h1 { color: var(--gold); }
.bh-result-hero .tone-bad h1 { color: var(--on-navy-bad); }

.bh-result-hero .kit-verdict-text {
    font-size: 1.1875rem;
    color: var(--on-navy);
}

.bh-result-hero .kit-verdict-quote { color: var(--on-navy-muted); }

.bh-result-hero .kit-run-meta {
    margin-bottom: var(--s8);
    color: var(--on-navy-muted);
}

.bh-result-hero .kit-metrics { margin: 0; }
.bh-result-hero .kit-metric { border-top-color: var(--on-navy-line); }
.bh-result-hero .kit-metric dt,
.bh-result-hero .kit-metric p { color: var(--on-navy-muted); }
.bh-result-hero .kit-metric dd { color: var(--on-navy); }

.theme-brand .kit-result { padding-top: var(--s8); }

@media (max-width: 560px) {
    .bh-result-hero { padding: var(--s8) 0 var(--s6); }
}

.theme-brand .kit-sent {
    background: var(--gold-soft);
    color: var(--navy-deep);
}

.theme-brand .kit-bar.is-current .kit-bar-fill { background: var(--navy); }
.theme-brand .kit-bar.is-best .kit-bar-fill { background: var(--gold); }

.theme-brand .kit-actions li { border-top-color: var(--line); }
.theme-brand .kit-actions li::before { color: var(--navy); }

/* The gate is the one dark card on the page: the email is the step that matters most. */
.theme-brand .kit-gate {
    position: relative;
    border: 0;
    border-radius: var(--bh-radius);
    padding: var(--s8);
    color: var(--on-navy);
    background:
        radial-gradient(30rem 16rem at 100% 0%, rgb(223 169 69 / 22%), transparent 65%),
        var(--navy);
    box-shadow: 0 2px 4px rgb(5 31 56 / 16%), 0 28px 56px -24px rgb(5 31 56 / 50%);
}

.theme-brand .kit-gate h2 { color: var(--on-navy); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); }
.theme-brand .kit-gate-copy p,
.theme-brand .kit-gate-support { color: var(--on-navy-muted); }
.theme-brand .kit-gate-form > label { color: var(--on-navy); }
.theme-brand .kit-gate .kit-field > label { color: var(--on-navy); }
.theme-brand .kit-qlist li::marker { color: var(--navy); }
.theme-brand .kit-gate .kit-input { border-color: transparent; }
.theme-brand .kit-gate .kit-input:focus-within { box-shadow: 0 0 0 3px rgb(223 169 69 / 55%); }
.theme-brand .kit-gate .kit-field-error { color: var(--on-navy-bad); }
.theme-brand .kit-gate .kit-input:has([aria-invalid="true"]) {
    border-color: var(--on-navy-bad);
    box-shadow: 0 0 0 3px rgb(255 154 139 / 35%);
}

@media (max-width: 560px) {
    .theme-brand .kit-gate { padding: var(--s6) var(--s5); }
}

/* Partner links wrap on phones; inline flow keeps the arrow on the last line of the text. */
.theme-brand .kit-partner a {
    display: inline;
    padding-block: 10px;
    line-height: 1.6;
}

.theme-brand .kit-partner .kit-icon { vertical-align: -3px; margin-left: 4px; }

/* --- Offer band on a landing (free test, trial...) ---------------------------------- */

.bh-offer {
    display: grid;
    gap: var(--s5);
    align-items: center;
    margin: 0 0 var(--s10);
    padding: var(--s8);
    border-radius: var(--bh-radius);
    color: var(--on-navy);
    background:
        radial-gradient(30rem 16rem at 100% 0%, rgb(223 169 69 / 22%), transparent 65%),
        var(--navy);
}

@media (min-width: 860px) {
    .bh-offer { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s8); }
}

.bh-offer h2 {
    margin: 0 0 var(--s3);
    color: var(--on-navy);
    font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
}

.bh-offer p { margin: 0 0 var(--s3); color: var(--on-navy-muted); max-width: 62ch; }

.bh-offer .bh-offer-kicker {
    margin-bottom: var(--s2);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
}

.bh-offer .bh-offer-fine { margin: 0; font-size: 0.875rem; }

.bh-offer-cta { justify-self: start; white-space: nowrap; }

@media (max-width: 560px) {
    .bh-offer { padding: var(--s6) var(--s5); }
    .bh-offer-cta { justify-self: stretch; text-align: center; white-space: normal; }
}
