/* Discere brand: navy ink with an amber accent, the same palette as the
   public site. Loaded after the SDK, MudBlazor and LnHub styles.

   The default brand colour is set as --sm360-tenant-primary on :root, so a
   tenant that sets its own brand (Branding page / SM360 branding scope)
   still overrides it. Amber is a fill colour: text on it is dark ink, and
   wherever the SDK draws the brand colour AS TEXT on a light background it
   is darkened (amber on white is unreadable). */

:root {
    --discere-ink: #12233b;
    --discere-amber: #f2a900;
    --discere-amber-ink: #1d1600;
    --discere-paper: #f5f7fa;

    --sm360-tenant-primary: var(--discere-amber);
    --sm360-tenant-accent: #ffbf2e;
    --sm360-tenant-on-brand: var(--discere-amber-ink);
    --sm360-teal-dark: color-mix(in srgb, var(--sm360-teal) 86%, #000);

    /* The brand colour, dark enough to read as text on white (amber → about #8a5c00). */
    --discere-brand-text: color-mix(in srgb, var(--sm360-teal) 57%, #000);
    --discere-display: "Bricolage Grotesque", "DM Sans", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
    --sm360-tenant-primary: #ffbf2e;
    /* On dark backgrounds the brand colour itself reads well. */
    --discere-brand-text: var(--sm360-teal);
}

/* ---- SDK: brand colour used as text, darkened for contrast ---------------- */
a,
.sm360-nav-flyout-item.active,
.sm360-footer a:hover,
.sm360-tenant-option.active,
.sm360-stat-icon.teal,
.sm360-tab.active,
.sm360-tab.active .sm360-tab-count,
.sm360-template-icon,
.sm360-settings-nav-item.active,
.sm360-widget-table th.sorted,
.sm360-scorecard-value.highlight,
.sm360-dashboard-tab-add:hover,
.sm360-ai-quick-action:hover,
.sm360-ai-feedback-btn:hover,
.sm360-ai-feedback-btn.active-helpful,
.sm360-page-breadcrumb a:hover,
.sm360-form-group:focus-within .sm360-form-label,
.sm360-analytics-tab.active,
.sm360-linkish,
.sm360-disclosure:hover,
.sm360-ai-load-earlier:hover,
.sm360-step-now .sm360-step-num,
.sm360-fix-open,
.sm360-spark {
    color: var(--discere-brand-text);
}

a:hover { color: var(--discere-ink); }
[data-theme="dark"] a:hover { color: #fff; }

/* Buttons and links styled as buttons keep dark text on the amber fill. */
a.sm360-btn-primary,
a.sm360-btn-primary:hover,
.sm360-btn-primary { color: var(--sm360-tenant-on-brand, var(--discere-amber-ink)); }

.sm360-tab.active,
.sm360-analytics-tab.active { border-bottom-color: var(--sm360-teal); }

/* Sidebar: the active item gets an amber bar and a soft amber tint. */
.sm360-nav-item.active {
    color: var(--discere-brand-text);
    background: color-mix(in srgb, var(--sm360-teal) 14%, transparent);
    box-shadow: inset 3px 0 0 var(--sm360-teal);
}

/* ---- MudBlazor pages: primary as text is darkened, fills keep amber -------- */
.mud-primary-text,
.mud-button-text.mud-button-text-primary,
.mud-button-outlined.mud-button-outlined-primary,
.mud-link.mud-primary-text {
    color: var(--discere-brand-text) !important;
}
.mud-button-outlined.mud-button-outlined-primary { border-color: var(--discere-brand-text) !important; }
.mud-button-filled.mud-button-filled-primary { color: var(--sm360-tenant-on-brand, var(--discere-amber-ink)) !important; }

/* ---- Wordmark (shell header, landing, sign-in) ----------------------------- */
.discere-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--discere-display);
    font-weight: 800;
    letter-spacing: .18em;
    font-size: 19px;
    color: var(--discere-ink);
    text-decoration: none;
    white-space: nowrap;
}
[data-theme="dark"] .discere-wordmark { color: #eef2f8; }
.discere-mark {
    position: relative;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--discere-amber);
}
.discere-mark::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid var(--discere-amber-ink);
    border-width: 0 3px 3px 0;
    transform: rotate(40deg);
}

/* ---- Public landing (Index, not signed in) --------------------------------- */
.discere-landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--discere-paper);
    color: #16202e;
}
.discere-landing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px max(16px, calc((100vw - 1160px) / 2));
    background: var(--discere-ink);
}
.discere-landing-top .discere-wordmark { color: #eef2f8; }
.discere-btn,
.discere-btn:hover {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--discere-amber);
    color: var(--discere-amber-ink);
    font-weight: 700;
    text-decoration: none;
}
.discere-btn:hover { filter: brightness(1.05); }
.discere-btn-lg { padding: 14px 26px; font-size: 17px; }
.discere-btn-ghost,
.discere-btn-ghost:hover {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 999px;
    border: 2px solid #eef2f8;
    color: #eef2f8;
    font-weight: 600;
    text-decoration: none;
}
.discere-landing-hero {
    background: var(--discere-ink);
    color: #eef2f8;
    padding: 64px max(16px, calc((100vw - 1160px) / 2)) 80px;
}
.discere-eyebrow {
    margin: 0;
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 12.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #a9b6c9;
}
.discere-landing-hero h1 {
    margin: 14px 0 0;
    font-family: var(--discere-display);
    font-size: clamp(44px, 7vw, 84px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: #eef2f8;
    max-width: 14ch;
}
.discere-landing-hero h1 span { color: var(--discere-amber); }
.discere-lede { margin: 22px 0 0; max-width: 46ch; font-size: clamp(18px, 2.1vw, 22px); color: #eef2f8; }
.discere-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.discere-dev { margin-top: 24px; font-family: monospace; }
.discere-dev a { color: #a9b6c9; }
.discere-landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 56px max(16px, calc((100vw - 1160px) / 2));
}
.discere-landing-features article {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    padding: 24px;
}
.discere-landing-features h3 { margin: 0; font-family: var(--discere-display); font-size: 21px; color: var(--discere-ink); }
.discere-landing-features p { margin: 10px 0 0; color: #566476; font-size: 15.5px; line-height: 1.55; }
.discere-landing-footer {
    margin-top: auto;
    padding: 24px 16px;
    text-align: center;
    font-size: 13.5px;
    color: #566476;
    border-top: 1px solid #d8dee8;
}
@media (max-width: 800px) {
    .discere-landing-features { grid-template-columns: 1fr; }
}
