/*
 * SmartMedium brand look (smartmedium.com, 2026 redesign).
 * Tokens and components shared by the public pages; the opening page (index.jsp)
 * is the first user. Classes are prefixed "brand-" so they never collide with the
 * in-app .sm-* system in application/css/master-detail.css.
 */

:root {
    --brand-navy: #1C1C4C;
    --brand-coral: #FB7B5B;
    --brand-coral-soft: #FEF1EC;
    --brand-coral-tint: #FFE9E2;
    --brand-ink: #0F172A;
    --brand-ink-2: #1E293B;
    --brand-text: #7A7A7A;
    --brand-muted: #475569;
    --brand-line: #E8ECF2;
    --brand-surface: #FFFFFF;
    --brand-surface-alt: #F9FBFD;
    --brand-edge: linear-gradient(100deg, #9EE7DC, #9EC8FF, #D9B8FF);
    --brand-shimmer: linear-gradient(110deg, #C9F5ED 0%, #D9ECFF 35%, #EADCFF 65%, #C9F5ED 100%);

    --brand-font: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --brand-font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

    --brand-max: 1260px;
    --brand-gutter: 20px;
    --brand-radius: 8px;
    --brand-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */

.brand-page {
    margin: 0;
    background: var(--brand-surface);
    color: var(--brand-text);
    font: 400 16px/24px var(--brand-font);
    -webkit-font-smoothing: antialiased;
}
/* :where() keeps these resets at zero specificity so component classes always win. */
:where(.brand-page) *, :where(.brand-page) *::before, :where(.brand-page) *::after { box-sizing: border-box; }
:where(.brand-page) img { max-width: 100%; height: auto; display: block; }
:where(.brand-page) a { color: inherit; text-decoration: none; }
:where(.brand-page) :is(h1, h2, h3, p, ul, ol) { margin: 0; }
:where(.brand-page) :is(b, strong) { font-weight: 700; }

.brand-container {
    width: 100%;
    max-width: calc(var(--brand-max) + 2 * var(--brand-gutter));
    margin: 0 auto;
    padding: 0 var(--brand-gutter);
}

.brand-skip {
    position: absolute; left: -9999px; top: 8px; z-index: 50;
    background: var(--brand-surface); color: var(--brand-ink); padding: 8px 16px; border-radius: 999px;
}
.brand-skip:focus { left: 16px; }

/* ---------- Type ---------- */

.brand-h1 {
    color: var(--brand-ink);
    font: 600 clamp(36px, 4.6vw, 56px)/1 var(--brand-font);
}
.brand-h2 {
    color: var(--brand-ink);
    font: 600 clamp(26px, 2.6vw, 30px)/1 var(--brand-font);
}
.brand-h3 {
    color: var(--brand-ink);
    font: 600 24px/1 var(--brand-font);
}
.brand-accent { color: var(--brand-coral); }
.brand-navy { color: var(--brand-navy); }
.brand-lede { font-weight: 700; }
.brand-copy > * + * { margin-top: 0; }
.brand-copy-gap > * + * { margin-top: 24px; }

/* ---------- Buttons ---------- */

.brand-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: 500 15px/17px var(--brand-font-ui);
    white-space: nowrap;
    cursor: pointer;
    transition: transform .35s var(--brand-ease), box-shadow .35s var(--brand-ease);
}
.brand-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--brand-shimmer);
    background-size: 250% 250%;
    opacity: 0;
    transition: opacity .35s ease;
}
.brand-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(80, 130, 220, .12); }
.brand-btn:focus-visible { outline: 2px solid var(--brand-coral); outline-offset: 3px; }

.brand-btn--outline {
    color: var(--brand-ink-2);
    background: linear-gradient(#fff, #fff) padding-box, var(--brand-edge) border-box;
}
.brand-btn--outline:hover::before { opacity: 1; animation: brand-shimmer 2.8s ease infinite; }

.brand-btn--primary {
    color: #fff;
    background: linear-gradient(var(--brand-coral), var(--brand-coral)) padding-box, var(--brand-edge) border-box;
}
.brand-btn--primary:hover { box-shadow: 0 8px 24px rgba(251, 123, 91, .28); }

.brand-actions { display: flex; flex-wrap: wrap; gap: 20px; }
.brand-actions--center { justify-content: center; }

@keyframes brand-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.brand-header { background: var(--brand-navy); }
.brand-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 61px;
}
.brand-header .brand-container { max-width: calc(var(--brand-max) + 20px + 2 * var(--brand-gutter)); }
.brand-header__logo img { height: 30px; width: auto; }
.brand-header__actions { display: flex; align-items: center; gap: 20px; }
.brand-header .brand-btn { padding: 10px 24px; }
.brand-header .brand-btn--outline { background: linear-gradient(#fff, #fff) padding-box, linear-gradient(#fff, #fff) border-box; }

.brand-footer { background: var(--brand-navy); color: #fff; text-align: center; padding: 20px 0; }
.brand-footer__logo { display: block; width: max-content; margin: 0 auto; }
.brand-footer__logo img { height: 60px; width: auto; margin: 0 auto; }
.brand-footer__tag { margin-top: 20px; font-size: 16px; }
.brand-footer__rule { margin: 20px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .45); }
.brand-footer__legal { font-size: 16px; }

/* ---------- Sections ---------- */

.brand-section { padding: calc(3% + 10px) 0; background: var(--brand-surface); }
.brand-section--alt { background: var(--brand-surface-alt); }
.brand-section--tight { padding: 44px 0 42px; }
.brand-section--roomy { padding: 80px 0; }

.brand-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.brand-split--center { align-items: center; }
.brand-split__text > * + * { margin-top: 20px; }
.brand-split__media img { margin: 0 auto; }
.brand-split__media--narrow img { max-width: 445px; width: 100%; }

.brand-center { text-align: center; }
.brand-center .brand-h2 + * { margin-top: 40px; }

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

/* Background art is the reference's own image, laid over the section at 20% like the live site. */
.brand-hero {
    position: relative;
    overflow: hidden;
    background: var(--brand-surface-alt);
    padding: calc(6% + 10px) 0 calc(3% + 10px);   /* the live page's spacing */
}
.brand-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/landing/hero-bg.jpg") center / cover no-repeat;
    opacity: .2;
    pointer-events: none;
}
.brand-hero .brand-container { position: relative; z-index: 1; }
.brand-hero__text > .brand-lede { margin-top: 20px; }
.brand-hero__text > p + p { margin-top: 24px; }
.brand-hero__text .brand-actions { margin-top: 20px; }
.brand-hero__media img { width: 100%; max-width: 640px; margin-left: auto; }

/* ---------- Checklist panel ---------- */

.brand-panel {
    padding: 20px 20px 22px;
    border-radius: var(--brand-radius);
    background: var(--brand-coral-soft);
}
.brand-checks { list-style: none; padding: 0; margin-top: 20px; }
.brand-checks li { display: flex; align-items: center; gap: 9px; color: #333; font-size: 16px; line-height: 20px; }
.brand-checks li + li { margin-top: 10px; }
.brand-check { flex: 0 0 16px; width: 16px; height: 16px; color: var(--brand-coral); }

/* ---------- Cards ---------- */

.brand-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--brand-coral-tint);
    color: var(--brand-coral);
}
.brand-icon svg { width: 22px; height: 22px; }
.brand-icon--square { border-radius: 4px; width: 46px; height: 46px; }

.brand-cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.brand-container.brand-cards-2 { max-width: calc(var(--brand-max) + 20px + 2 * var(--brand-gutter)); }   /* this row runs 10px wider each side on the live page */
.brand-card {
    padding: 32px 32px 23px;
    border: 1px solid #EEF1F5;
    border-radius: 6px;
    background: var(--brand-surface);
    transition: transform .35s var(--brand-ease), box-shadow .35s var(--brand-ease);
}
.brand-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 23, 42, .07); }
.brand-card__head { display: flex; align-items: center; gap: 20px; }
.brand-card__head .brand-h2, .brand-card__head .brand-h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1; }
.brand-card__body { margin-top: 30px; }

.brand-grid-5 {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.brand-step { text-align: center; }
.brand-step__title { margin-top: 18px; color: var(--brand-ink); font: 600 22px/1.2 var(--brand-font-ui); }
.brand-step__text { margin-top: 10px; font-size: 14px; line-height: 21px; }

.brand-why {
    text-align: center;
    padding: 22px 22px 24px;
    border: 1px solid #F1F3F6;
    border-radius: 6px;
    background: var(--brand-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: transform .35s var(--brand-ease), box-shadow .35s var(--brand-ease);
}
.brand-why:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 23, 42, .07); }
.brand-why__title { margin-top: 18px; color: var(--brand-ink); font: 600 18px/1.2 var(--brand-font-ui); }
.brand-why__text { margin-top: 8px; font-size: 14px; line-height: 21px; }

.brand-cta { max-width: calc(781px + 2 * var(--brand-gutter)); margin: 0 auto; text-align: center; }
.brand-cta .brand-h2 + p { margin-top: 20px; }
.brand-cta .brand-actions { margin-top: 20px; }

/* ---------- Account pages (sign in, registration, password) ---------- */

.brand-page--fill { min-height: 100vh; display: flex; flex-direction: column; }

/* The opening page's hero art behind a centred card. */
.brand-auth-stage {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px var(--brand-gutter) 72px;
    background: var(--brand-surface-alt);
}
.brand-auth-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/landing/hero-bg.jpg") center / cover no-repeat;
    opacity: .2;
    pointer-events: none;
}
.brand-auth-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 40px 36px 32px;
    border: 1px solid #EEF1F5;
    border-radius: 16px;
    background: var(--brand-surface);
    box-shadow: 0 12px 40px rgba(15, 23, 42, .06);
}
.brand-auth-title { color: var(--brand-ink); font: 600 30px/1 var(--brand-font); }
.brand-auth-sub { margin-top: 10px; }
.brand-auth-form { margin-top: 28px; }

.brand-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #FCA5A5;
    border-radius: 12px;
    background: #FEF2F2;
    color: #B91C1C;
    font: 500 14px/20px var(--brand-font-ui);
}
.brand-alert svg { flex: 0 0 20px; width: 20px; height: 20px; color: #F87171; }

.brand-field + .brand-field { margin-top: 18px; }
.brand-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.brand-label { color: var(--brand-ink-2); font: 500 14px/20px var(--brand-font-ui); }
.brand-label i { color: var(--brand-coral); font-style: normal; }
.brand-link { color: var(--brand-coral); font: 500 14px/20px var(--brand-font-ui); }
.brand-link:hover { text-decoration: underline; }
.brand-link:focus-visible { outline: 2px solid var(--brand-coral); outline-offset: 2px; border-radius: 4px; }

.brand-input { position: relative; margin-top: 8px; }
.brand-input input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #D5DCE6;
    border-radius: 12px;
    background: #fff;
    color: var(--brand-ink);
    font: 400 15px var(--brand-font-ui);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.brand-input input::placeholder { color: #A0AEC0; }
.brand-input input:focus { outline: none; border-color: var(--brand-coral); box-shadow: 0 0 0 4px rgba(251, 123, 91, .15); }
.brand-input input.error { border-color: #EF4444; }
.brand-input input.error:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.brand-input--reveal input { padding-right: 48px; }
.brand-reveal {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 0; border-radius: 8px;
    background: none;
    color: #94A3B8;
    cursor: pointer;
}
.brand-reveal:hover { color: var(--brand-muted); }
.brand-reveal:focus-visible { outline: 2px solid var(--brand-coral); outline-offset: 0; }
.brand-reveal svg { width: 20px; height: 20px; }
.brand-reveal [hidden] { display: none; }
label.error {                       /* jQuery Validate message */
    display: block;
    margin: 6px 0 0 4px;
    color: #DC2626;
    font: 400 13px/1.3 var(--brand-font-ui);
}
/* The validator leaves empty labels behind (placeholders in the markup, and a blank
   "success" label it adds then slides away). Without this their 6px margin makes
   everything below jump down and drift back each time a field turns valid. */
label.error:empty { display: none !important; }   /* beats the inline display:block the validator sets */

.brand-btn--block { width: 100%; height: 48px; font-size: 16px; }
.brand-auth-submit { margin-top: 24px; }

.brand-divider {
    display: flex; align-items: center; gap: 14px;
    margin: 22px 0;
    color: #94A3B8;
    font: 600 12px/1 var(--brand-font-ui);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.brand-divider::before, .brand-divider::after { content: ""; flex: 1; border-top: 1px solid var(--brand-line); }
.brand-btn__mark { width: 22px; height: 22px; margin-right: 10px; }

.brand-auth-foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--brand-line); text-align: center; font-size: 15px; }
.brand-auth-pair { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brand-auth-pair .brand-btn { height: 44px; padding: 0 12px; font-size: 14px; }
.brand-auth-note { margin-top: 14px; color: #94A3B8; font-size: 13px; }

/* Full-page overlay shown while a form submits. */
.brand-loader {
    position: fixed; inset: 0; z-index: 9999;
    display: none;
    align-items: center; justify-content: center;
    background: rgba(28, 28, 76, .45);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .3s ease;
}
.brand-loader.is-on { display: flex; }
.brand-loader.is-visible { opacity: 1; }
/* The "signing in" indicator: the coral-glow blob (peach → coral → rose) used by the category search. */
.brand-spinner {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #FFB59E, var(--brand-coral), #F2577A);
    background: linear-gradient(in oklch 135deg, #FFB59E, var(--brand-coral), #F2577A);   /* smoother blend where supported */
    background-size: 200% 200%;
    box-shadow: 0 0 28px rgba(251, 123, 91, .55);
    animation: brand-blob-morph 2.5s ease-in-out infinite, brand-shimmer 2.5s linear infinite;
}
@keyframes brand-spin { to { transform: rotate(360deg); } }

/* ---------- Long forms (registration, profile) ---------- */

.brand-auth-card--wide { max-width: 880px; }
.brand-auth-card--wide .brand-auth-title { font-size: clamp(26px, 3vw, 32px); }

.brand-form-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--brand-line); }
.brand-form-section--first { margin-top: 0; padding-top: 0; border-top: 0; }
.brand-form-title { color: var(--brand-ink); font: 600 20px/1.2 var(--brand-font); }
.brand-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 20px; }
.brand-span-2 { grid-column: 1 / -1; }
.brand-form-grid > .brand-field + .brand-field { margin-top: 0; }   /* the grid gap spaces them */
.brand-hint { margin-top: 6px; color: #94A3B8; font: 400 13px/1.4 var(--brand-font-ui); }
.brand-hint--note { color: var(--brand-muted); }

.brand-alert--warn { border-color: #FCD34D; background: #FFFBEB; color: #92400E; }
.brand-alert--ok { border-color: #86EFAC; background: #F0FDF4; color: #166534; }
.brand-alert--ok svg { color: #22C55E; }
.brand-alert__action { margin-top: 4px; padding: 0; border: 0; background: none; font: 600 14px/20px var(--brand-font-ui); cursor: pointer; text-decoration: underline; }

/* Selects look like the text fields, with a drawn chevron. */
.brand-input select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid #D5DCE6;
    border-radius: 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394A3B8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
    color: var(--brand-ink);
    font: 400 15px var(--brand-font-ui);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.brand-input select:focus { outline: none; border-color: var(--brand-coral); box-shadow: 0 0 0 4px rgba(251, 123, 91, .15); }
.brand-input input.input-error { border-color: #EF4444; }

/* Phone: a read-only dialing code in front of the number. */
.brand-phone { display: flex; gap: 8px; margin-top: 8px; }
.brand-phone > .brand-input { flex: 1; margin-top: 0; }
.brand-phone__code {
    flex: 0 0 76px;
    width: 76px;
    min-width: 0;
    height: 48px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    color: var(--brand-muted);
    font: 500 15px var(--brand-font-ui);
    text-align: center;
}

/* Live availability checks (Company Id, phone, email) add these classes. */
.brand-status {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    pointer-events: none;
    background: center / contain no-repeat;
}
.brand-input--status input { padding-right: 44px; }
.brand-status.loader { border: 2px solid #E2E8F0; border-top-color: var(--brand-coral); border-radius: 50%; animation: brand-spin .8s linear infinite; }
.brand-status.validtick { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%2322C55E'/%3E%3Cpath d='m6 10.2 2.6 2.6L14.2 7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.brand-status.invalidsymbol { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23EF4444'/%3E%3Cpath d='m7 7 6 6m0-6-6 6' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Radio choices drawn as tiles; the radio itself stays the real control. */
.brand-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.brand-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #D5DCE6;
    border-radius: 12px;
    background: #fff;
    color: var(--brand-ink);
    font: 500 15px var(--brand-font-ui);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.brand-choice:hover { border-color: #F8B4A2; }
.brand-choice img { width: 28px; height: 28px; object-fit: contain; }
.brand-choice:has(input:checked) { border-color: var(--brand-coral); background: var(--brand-coral-soft); }
.brand-choice:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(251, 123, 91, .15); }

/* Radios and checkboxes are drawn here: with accent-color, Chrome adds its own
   dark contrast ring and tick on a light colour like coral. */
.brand-choice input[type="radio"],
.brand-check-row input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #B8C2D1;
    background: #fff center / 12px no-repeat;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.brand-choice input[type="radio"] { border-radius: 50%; }
.brand-choice input[type="radio"]:checked { border-color: var(--brand-coral); box-shadow: inset 0 0 0 3.5px #fff; background-color: var(--brand-coral); }
.brand-check-row input[type="checkbox"] { border-radius: 5px; }
.brand-check-row input[type="checkbox"]:checked {
    border-color: var(--brand-coral);
    background-color: var(--brand-coral);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.2 2.3 2.3L9.5 3.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.brand-choice input[type="radio"]:hover:not(:checked),
.brand-check-row input[type="checkbox"]:hover:not(:checked) { border-color: var(--brand-coral); }
.brand-choice input[type="radio"]:focus-visible,
.brand-check-row input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(251, 123, 91, .2); }
.brand-choice input[type="radio"]:checked:focus-visible { box-shadow: inset 0 0 0 3.5px #fff, 0 0 0 4px rgba(251, 123, 91, .2); }
.brand-check-row input[type="checkbox"].error { border-color: #EF4444; }

/* File picker */
.brand-file { margin-top: 8px; color: var(--brand-muted); font: 400 14px var(--brand-font-ui); }
.brand-file::file-selector-button {
    margin-right: 12px;
    padding: 9px 18px;
    border: 1px solid #D5DCE6;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-ink-2);
    font: 500 14px var(--brand-font-ui);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}
.brand-file::file-selector-button:hover { border-color: var(--brand-coral); background: var(--brand-coral-soft); }
.brand-file:focus { outline: none; }   /* no blue default ring; the button shows focus instead */
.brand-file:focus-visible::file-selector-button { border-color: var(--brand-coral); box-shadow: 0 0 0 4px rgba(251, 123, 91, .15); }

/* Checkbox rows */
.brand-check-row { display: flex; align-items: flex-start; gap: 10px; color: var(--brand-ink-2); font: 400 15px/22px var(--brand-font-ui); }
.brand-check-row + .brand-check-row { margin-top: 12px; }
.brand-check-row input { flex: 0 0 18px; margin-top: 2px; }
.brand-check-row label { cursor: pointer; }

/* Captcha: the sum to solve, the answer field and a reload button. */
.brand-captcha { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.brand-captcha__sum {
    flex: 0 0 auto;
    min-width: 96px;
    height: 48px;
    padding: 0 16px;
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed #F8B4A2;
    border-radius: 12px;
    background: var(--brand-coral-soft);
    color: var(--brand-ink);
    font: 600 17px var(--brand-font-ui);
    letter-spacing: .06em;
    user-select: none;
}
.brand-captcha > .brand-input { flex: 1; max-width: 200px; margin-top: 0; }
.brand-icon-btn {
    flex: 0 0 48px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #D5DCE6;
    border-radius: 12px;
    background: #fff;
    color: var(--brand-muted);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}
.brand-icon-btn svg { width: 20px; height: 20px; transition: transform .4s var(--brand-ease); }
.brand-icon-btn:hover { color: var(--brand-coral); border-color: var(--brand-coral); }
.brand-icon-btn:hover svg { transform: rotate(180deg); }
.brand-icon-btn:focus-visible { outline: 2px solid var(--brand-coral); outline-offset: 2px; }

/* Tom Select fields (category search, and plain dropdowns via js/brand-select.js):
   look like the text fields, and open into the same animated list. */
.brand-page :is(.topic-search, .brand-select) .ts-wrapper { min-height: 48px; }
.brand-page :is(.topic-search, .brand-select) .ts-control {
    box-sizing: border-box !important;
    min-height: 48px;
    align-items: center;
    padding: 7px 14px !important;
    border: 1px solid #D5DCE6 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    font: 400 15px var(--brand-font-ui);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.brand-page :is(.topic-search, .brand-select) .ts-wrapper.focus .ts-control { border-color: var(--brand-coral) !important; box-shadow: 0 0 0 4px rgba(251, 123, 91, .15) !important; }
/* Dropdowns without a search box (Branch, Title) make the field itself focusable, and
   Chrome then draws its blue default outline after a pick. The coral ring above
   already marks focus, for keyboard users too. */
.brand-page :is(.topic-search, .brand-select) .ts-control:focus,
.brand-page :is(.topic-search, .brand-select) .ts-control input:focus { outline: none; }
.brand-page :is(.topic-search, .brand-select) .ts-control::after { display: none !important; }
.brand-page :is(.topic-search, .brand-select) .ts-control input {   /* Tom Select's own search box: not a .brand-input field */
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--brand-ink);
    font: 400 15px/20px var(--brand-font-ui) !important;
}
.brand-page :is(.topic-search, .brand-select) .ts-control input::placeholder { color: #A0AEC0; }
.brand-page :is(.topic-search, .brand-select) .ts-wrapper.multi .ts-control > div {
    margin: 3px 6px 3px 0;
    padding: 3px 4px 3px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-coral-soft);
    color: #B9472B;
    font: 500 14px var(--brand-font-ui);
}
.brand-page :is(.topic-search, .brand-select) .ts-wrapper.plugin-remove_button .item .remove { border-left: 0; color: #B9472B; padding: 0 8px; border-radius: 0 999px 999px 0; }
.brand-page :is(.topic-search, .brand-select) .ts-wrapper.plugin-remove_button .item .remove:hover { background: rgba(251, 123, 91, .18); }
.brand-page :is(.topic-search, .brand-select) .cat-mode-tag { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #fff; color: var(--brand-navy); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
/* The list springs open from the field and its rows slide in one after another.
   It stays display:block so the open and close can animate; .dropdown-active
   (set by Tom Select) is what shows it. */
.brand-page :is(.topic-search, .brand-select) .ts-dropdown {
    display: block !important;
    visibility: hidden;
    opacity: 0;
    transform: scale(.9) translateY(-15px);
    transform-origin: top center;
    z-index: 60;
    margin-top: 6px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 2rem;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px -10px rgba(15, 23, 42, .18);
    overflow: hidden;
    transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .brand-page :is(.topic-search, .brand-select) .ts-dropdown { background: #fff; }
}
/* Tom Select leaves visibility:visible inline after closing, which would keep the
   faded-out list over the fields below and swallow their clicks. */
.brand-page :is(.topic-search, .brand-select) .ts-wrapper:not(.dropdown-active) .ts-dropdown {
    visibility: hidden !important;
    pointer-events: none;
}
.brand-page :is(.topic-search, .brand-select) .ts-wrapper.dropdown-active .ts-dropdown {
    visibility: visible;
    opacity: 1;
    transform: scale(1) translateY(0);
    border-radius: 14px;
}
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option {
    opacity: 0;
    animation: brand-row-in .3s cubic-bezier(.2, .9, .2, 1) forwards;
}
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option:nth-child(1) { animation-delay: .02s; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option:nth-child(2) { animation-delay: .04s; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option:nth-child(3) { animation-delay: .06s; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option:nth-child(4) { animation-delay: .08s; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option:nth-child(5) { animation-delay: .10s; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option:nth-child(n+6) { animation-delay: .12s; }
@keyframes brand-row-in {
    0% { opacity: 0; transform: translateY(8px) scale(.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.brand-page :is(.topic-search, .brand-select) .ts-dropdown-content { padding: 5px; max-height: 17.5rem; scrollbar-width: thin; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown .option {
    padding: 7px 9px;
    border-radius: 8px;
    color: var(--brand-ink);
    font: 400 14px/20px var(--brand-font-ui);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-page :is(.topic-search, .brand-select) .ts-dropdown .option.active { background: var(--brand-coral-soft); color: #B9472B; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown .option .highlight { background: transparent; color: inherit; font-weight: 600; }
.brand-page :is(.topic-search, .brand-select) .ts-dropdown .cat-state { display: flex; align-items: center; gap: 8px; padding: 9px; color: var(--brand-muted); font: 400 14px/20px var(--brand-font-ui); }
/* "Searching…" indicator drawn by js/category-picker.js: a morphing blob whose
   gradient drifts peach → coral → rose ("coral glow"). */
.brand-page :is(.topic-search, .brand-select) .liquid-blob {
    flex: 0 0 18px;
    width: 18px; height: 18px;
    background: linear-gradient(135deg, #FFB59E, var(--brand-coral), #F2577A);
    background: linear-gradient(in oklch 135deg, #FFB59E, var(--brand-coral), #F2577A);   /* smoother blend where supported */
    background-size: 200% 200%;
    box-shadow: 0 0 10px rgba(251, 123, 91, .45);
    animation: brand-blob-morph 2.5s ease-in-out infinite, brand-shimmer 2.5s linear infinite;
}
@keyframes brand-blob-morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(0deg) scale(1); }
    50% { border-radius: 30% 70% 70% 30% / 30% 60% 40% 70%; transform: rotate(180deg) scale(1.1); }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(360deg) scale(1); }
}

/* Single-choice dropdowns (js/brand-select.js): a chevron instead of chips. */
.brand-page .brand-select .ts-control {
    padding-right: 40px !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394A3B8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E") right 14px center / 18px no-repeat !important;
    cursor: pointer;
}
.brand-page .brand-select .ts-wrapper.dropdown-active .ts-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23FB7B5B'%3E%3Cpath fill-rule='evenodd' d='M14.77 12.79a.75.75 0 01-1.06-.02L10 8.83l-3.71 3.94a.75.75 0 11-1.08-1.04l4.25-4.5a.75.75 0 011.08 0l4.25 4.5a.75.75 0 01-.02 1.06z' clip-rule='evenodd'/%3E%3C/svg%3E") !important; }
.brand-page .brand-select .ts-control .item { color: var(--brand-ink); font: 400 15px/20px var(--brand-font-ui); }
.brand-page .brand-select .ts-wrapper.is-searching .ts-control .item { display: none; }   /* shown as the search placeholder instead */
.brand-page .brand-select .ts-dropdown .option.selected { color: #B9472B; font-weight: 600; }
.brand-page .brand-select .ts-dropdown .option.selected::after { content: "✓"; float: right; margin-left: 12px; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .brand-grid-5 { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
}

@media (max-width: 900px) {
    .brand-section { padding: 56px 0; }
    .brand-split, .brand-cards-2, .brand-form-grid { grid-template-columns: 1fr; }
    .brand-split__media--first { order: 2; }     /* text before picture once stacked */
    .brand-split__media img { max-width: 560px; width: 100%; }
    .brand-hero { padding: 48px 0 40px; }
    .brand-hero__media img { margin: 0 auto; }
    .brand-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    :root { --brand-gutter: 16px; }
    .brand-auth-stage { padding: 32px var(--brand-gutter) 48px; }
    .brand-auth-card { padding: 28px 20px 24px; }
    .brand-auth-pair { grid-template-columns: 1fr; }
    .brand-choices { grid-template-columns: 1fr; }
    .brand-captcha { flex-wrap: wrap; }
    .brand-grid-5 { grid-template-columns: 1fr; }
    .brand-header__logo img { height: 26px; }
    .brand-header__actions { gap: 10px; }
    .brand-header .brand-btn { padding: 9px 16px; font-size: 14px; }
    .brand-card { padding: 24px 20px; }
    .brand-card__head { gap: 14px; }
    .brand-actions { gap: 12px; }
    .brand-footer__logo img { height: 46px; }
}

@media (max-width: 420px) {
    .brand-wide { display: none; }   /* header "Join SmartMedium" shortens to "Join" */
}

@media (prefers-reduced-motion: reduce) {
    .brand-btn, .brand-card, .brand-why { transition: none; }
    .brand-btn:hover, .brand-card:hover, .brand-why:hover { transform: none; }
    .brand-btn--outline:hover::before { animation: none; }
    .brand-status.loader { animation-duration: 2.4s; }
    .brand-spinner { animation: none; border-radius: 50%; }
    .brand-page :is(.topic-search, .brand-select) .liquid-blob { animation: none; border-radius: 50%; }
    .brand-page :is(.topic-search, .brand-select) .ts-dropdown { transition: none; transform: none; }
    .brand-page :is(.topic-search, .brand-select) .ts-dropdown-content .option { animation: none; opacity: 1; }
    .brand-icon-btn:hover svg { transform: none; }
}

/* ---------- Result pages (registration sent / failed, account activated) ---------- */
/* The sign-in card, centred, with a round status icon above the title. */
.brand-auth-card--result { text-align: center; }
.brand-result-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--brand-coral-soft); color: var(--brand-coral);
}
.brand-result-icon svg { width: 30px; height: 30px; }
.brand-result-icon--ok { background: #DCFCE7; color: #16A34A; }
.brand-result-icon--error { background: #FEE2E2; color: #DC2626; }
.brand-result-note { margin-top: 10px; color: var(--brand-muted); font: 400 15px/1.6 var(--brand-font-ui); }
.brand-result-actions { margin-top: 28px; display: grid; gap: 12px; }
.brand-auth-card--result .brand-auth-title { line-height: 1.2; }   /* result titles wrap on phones */

/* ---------- Password and sign-up pages (forgot / reset password, activate account, user sign-up) ---------- */
/* The account the link was sent to (reset, activate). */
.brand-account {
    display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
    margin-top: 16px; padding: 5px 14px 5px 5px;
    border: 1px solid var(--brand-line); border-radius: 999px; background: var(--brand-surface-alt);
    color: var(--brand-ink-2); font: 500 14px/20px var(--brand-font-ui);
}
.brand-account__avatar {
    flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-coral-soft); color: #B9472B; font: 600 13px/1 var(--brand-font-ui);
}
.brand-account__email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* "Back to sign in" under the short forms. */
.brand-auth-foot--back { margin-top: 24px; padding-top: 20px; }
.brand-back { display: inline-flex; align-items: center; gap: 6px; }
.brand-back svg { width: 16px; height: 16px; transition: transform .25s var(--brand-ease); }
.brand-back:hover svg { transform: translateX(-3px); }

/* Password rules (js/brand-password.js): a list that ticks as you type; after a failed submit the unmet ones turn red. */
.brand-rules {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px 16px;
    margin: 12px 0 0; padding: 0; list-style: none;
    color: var(--brand-muted); font: 400 13px/18px var(--brand-font-ui);
}
.brand-rule { display: flex; align-items: center; gap: 8px; transition: color .2s ease; }
.brand-rule__dot {
    position: relative; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%;
    border: 1.5px solid #CBD5E1; background: #fff;
    transition: border-color .2s ease, background-color .2s ease, transform .3s var(--brand-ease);
}
.brand-rule__dot::after {        /* the tick, scaled up when the rule is met */
    content: ""; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.2 8.3 2.4 2.4 5.2-5.2' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
    transform: scale(0); transition: transform .3s var(--brand-ease);
}
.brand-rule.is-met { color: #15803D; }
.brand-rule.is-met .brand-rule__dot { border-color: #22C55E; background: #22C55E; transform: scale(1.06); }
.brand-rule.is-met .brand-rule__dot::after { transform: scale(1); }
.brand-rule.is-miss { color: #DC2626; }
.brand-rule.is-miss .brand-rule__dot { border-color: #F87171; }
/* Sign-up: one row under Password and Confirm Password, three rules across. */
.brand-rules-row { margin-top: -8px; }
.brand-rules-row .brand-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
@media (max-width: 900px) { .brand-rules-row .brand-rules { grid-template-columns: minmax(0, 1fr); } }

/* Sign-up: who approves you, once a company is picked. */
.brand-approver { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-coral-soft); color: #9A3412; font: 400 13px/1.45 var(--brand-font-ui); }
.brand-approver svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: var(--brand-coral); }
.brand-approver[hidden] { display: none; }
.brand-approver.is-in { animation: brand-fade-up .3s var(--brand-ease); }
@keyframes brand-fade-up { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* A message under the first checkbox keeps the second one apart. */
.brand-check-row + label.error + .brand-check-row { margin-top: 10px; }

/* A dropdown with an error gets the red border the text fields get. */
.brand-page .brand-select .ts-wrapper.is-invalid .ts-control { border-color: #EF4444 !important; }

@media (prefers-reduced-motion: reduce) {
    .brand-approver.is-in { animation: none; }
    .brand-rule__dot, .brand-rule__dot::after, .brand-back svg { transition: none; }
}
