/* ---------- schreibly design tokens ---------- */
/* Canonical brand palette — values mirror Schreibly-Design/brand/tokens.css
   (the --sch-* source of truth). The --schr-* names below are kept stable
   because markup and component CSS reference them; only the values track the
   official tokens. Mapping:
     --schr-primary       <- --sch-blue   #1E6BFF
     --schr-primary-hover <- darkened blue #1557E6 (white text keeps AA: 5.94:1)
     --schr-accent        <- --sch-cyan   #52D2FF
     --schr-dark          <- --sch-navy   #0E1F5C
     --schr-bg            <- --sch-bg     #F6F9FF
     --schr-surface       <- --sch-white  #FFFFFF
     --schr-tint          <- --sch-bg-2   #EDF3FF
     --schr-ink           <- --sch-ink    #0B1437
     --schr-ink-muted     <- --sch-ink-2  #44507A  (7.85:1 on white — AA pass;
                             --sch-ink-3 #6E78A0 is 4.32:1, fails AA, not used)
     --schr-border        <- --sch-line   #E2E8F4
     --schr-gradient      <- --grad-logo
     --schr-shadow        <- --shadow-card
   Indicator colors: success/error use the official --sch-mint / --sch-coral
   for accents (underlines, icons, outlines). Body/validation *text* uses the
   darker -text variants below so every text/background pair clears WCAG AA. */
:root {
    --schr-primary: #1E6BFF;        /* brand blue — primary actions (4.56:1 on white) */
    --schr-primary-hover: #1557E6;  /* darkened brand blue — hover / pressed (5.94:1 on white) */
    --schr-accent: #52D2FF;         /* brand cyan — sparkle / gradient highlight */
    --schr-dark: #0E1F5C;           /* brand navy — headings, dark UI */
    --schr-bg: #F6F9FF;             /* very light blue page background */
    --schr-surface: #FFFFFF;        /* white card surface */
    --schr-tint: #EDF3FF;           /* light-blue surface tint */
    --schr-ink: #0B1437;            /* near-black navy body ink */
    --schr-ink-muted: #44507A;      /* blue-grey muted ink — WCAG AA on white (7.85:1) */
    --schr-border: #E2E8F4;         /* light blue-grey border */
    --schr-shadow: 0 1px 2px rgba(14, 31, 92, 0.06), 0 12px 32px -8px rgba(14, 31, 92, 0.12);

    /* Status indicators — official brand mint/coral for accents (underlines,
       icons, focus outlines). Text variants are darkened so they clear AA
       (>=4.5:1) as body / validation-message text on white. */
    --schr-success: #15B79E;        /* brand mint — "correct" indicator accent */
    --schr-success-text: #0C7D6D;   /* darkened mint — success text (5.04:1 on white) */
    --schr-error: #E5484D;          /* brand coral — "incorrect" indicator accent */
    --schr-error-text: #C13338;     /* darkened coral — error / validation text (5.53:1 on white) */

    /* Official corner radii (brand --r-* scale). */
    --schr-radius-sm: 8px;
    --schr-radius-md: 14px;
    --schr-radius-lg: 22px;
    --schr-radius-xl: 32px;

    --schr-gradient: linear-gradient(135deg, #7FE0FF 0%, #2A7BFF 55%, #0E1F5C 100%);

    --schr-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                  Arial, "Noto Sans", sans-serif;
}

html, body {
    font-family: var(--schr-font);
    background-color: var(--schr-bg);
    color: var(--schr-ink);
}

a, .btn-link {
    color: var(--schr-dark);
}

a:hover {
    color: var(--schr-primary);
}

.btn-primary {
    color: #fff;
    background-color: var(--schr-primary);
    border-color: var(--schr-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--schr-primary-hover);
    border-color: var(--schr-primary-hover);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(30, 107, 255, 0.45);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* Validation outlines must clear WCAG 1.4.11 (3:1 for UI components). The
   bright brand mint (--schr-success) is only 2.53:1 on white, so the valid
   outline uses the darker mint text variant (5.04:1). Coral (--schr-error)
   clears 3:1 on white, so the invalid outline keeps the brand coral. */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--schr-success-text);
}

.invalid {
    outline: 1px solid var(--schr-error);
}

.validation-message {
    color: var(--schr-error-text);
}

.blazor-error-boundary {
    background: var(--schr-error-text);
    color: white;
    padding: 1rem 1rem 1rem 3.7rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---------- Marketing top nav ---------- */
.schr-topnav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--schr-surface);
    border-bottom: 1px solid var(--schr-border);
    padding: 0.75rem 1.25rem;
}

.schr-topnav-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.schr-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

/* Brand logo image (gradient "S" mark + navy wordmark). Sized by height so it
   sits cleanly in the sticky nav; width auto-scales with the aspect ratio. */
.schr-brand-logo {
    height: 30px;
    width: auto;
    display: block;
}

.schr-brand:hover {
    opacity: 0.85;
}

.schr-nav-links {
    display: flex;
    gap: 1.25rem;
    flex: 1;
    justify-content: center;
}

.schr-nav-links a {
    color: var(--schr-ink);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.schr-nav-links a:hover,
.schr-nav-links a.active {
    color: var(--schr-primary);
    background: rgba(30, 107, 255, 0.08);
}

.schr-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* CSS-only mobile toggle via <details>. */
.schr-mobile-toggle {
    display: none;
}

@media (max-width: 720px) {
    .schr-nav-links {
        display: none;
    }
    .schr-mobile-toggle {
        display: block;
        margin-left: auto;
    }
    .schr-mobile-toggle > summary {
        list-style: none;
        cursor: pointer;
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--schr-border);
        border-radius: 6px;
        font-weight: 600;
    }
    .schr-mobile-toggle > summary::-webkit-details-marker {
        display: none;
    }
    .schr-mobile-panel {
        position: absolute;
        right: 1rem;
        top: 3.5rem;
        background: var(--schr-surface);
        border: 1px solid var(--schr-border);
        border-radius: 8px;
        box-shadow: var(--schr-shadow);
        padding: 0.5rem;
        min-width: 200px;
        display: flex;
        flex-direction: column;
    }
    .schr-mobile-panel a {
        padding: 0.5rem 0.75rem;
        text-decoration: none;
        color: var(--schr-ink);
        border-radius: 4px;
    }
    .schr-mobile-panel a:hover {
        background: rgba(30, 107, 255, 0.08);
        color: var(--schr-primary);
    }
}

/* ---------- User menu (auth dropdown) ---------- */
.schr-user-menu {
    position: relative;
}

.schr-user-menu > summary {
    list-style: none;
    cursor: pointer;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--schr-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.schr-user-menu > summary::-webkit-details-marker {
    display: none;
}

.schr-user-menu[open] > summary {
    outline: 2px solid var(--schr-primary);
}

.schr-user-dropdown {
    position: absolute;
    right: 0;
    top: 2.75rem;
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 8px;
    box-shadow: var(--schr-shadow);
    min-width: 220px;
    padding: 0.5rem;
    z-index: 20;
}

.schr-user-dropdown a,
.schr-user-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--schr-ink);
    background: transparent;
    border: none;
    font: inherit;
    cursor: pointer;
}

.schr-user-dropdown a:hover,
.schr-user-dropdown button:hover {
    background: rgba(30, 107, 255, 0.08);
    color: var(--schr-primary);
}

.schr-user-dropdown hr {
    margin: 0.35rem 0;
    border-color: var(--schr-border);
}

.schr-user-dropdown .schr-username {
    padding: 0.35rem 0.75rem 0.6rem;
    color: var(--schr-ink-muted);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--schr-border);
    margin-bottom: 0.35rem;
}

/* ---------- Marketing hero ---------- */
/* Airy banner-style backdrop: a soft white -> light-blue vertical wash with
   two faint radial cyan glows, then a flowing wave shape pinned to the section
   base via an inline SVG data-URI. Pure CSS — renders under static SSR, no JS.
   The wrapper is full-bleed; the inner .schr-hero keeps the 1200px grid. */
.schr-hero-band {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(40rem 22rem at 12% 0%, rgba(82, 210, 255, 0.18), transparent 70%),
        radial-gradient(34rem 20rem at 92% 18%, rgba(30, 107, 255, 0.12), transparent 72%),
        linear-gradient(180deg, #FFFFFF 0%, #EAF2FF 60%, var(--schr-bg) 100%);
}

/* Flowing wave pinned to the base of the band. background-size cover + a
   symmetric SVG path means it mirrors cleanly under [dir="rtl"]. */
.schr-hero-band::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 5.5rem;
    z-index: -1;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'><path fill='%23F6F9FF' d='M0,64 C240,128 480,0 720,40 C960,80 1200,128 1440,64 L1440,120 L0,120 Z'/><path fill='%23EDF3FF' fill-opacity='0.7' d='M0,88 C260,40 520,120 720,88 C960,48 1180,104 1440,80 L1440,120 L0,120 Z'/></svg>");
}

.schr-hero {
    position: relative;
    padding: 4rem 1.25rem 4.5rem;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 880px) {
    .schr-hero {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.25rem 4rem;
        gap: 2rem;
    }
}

.schr-hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    color: var(--schr-dark);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.schr-hero .schr-lead {
    font-size: 1.15rem;
    color: var(--schr-ink-muted);
    margin-bottom: 1.75rem;
    max-width: 36rem;
}

.schr-hero-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.schr-btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    border: 2px solid transparent;
    transition: transform 0.05s ease;
}

.schr-btn:active {
    transform: translateY(1px);
}

/* Primary button reads as flat official brand blue (matches brand
   components.css .sch-btn-primary). The logo mark, hero accents and feature
   chips keep the cyan-to-navy gradient; the action button does not. */
.schr-btn-primary {
    background: var(--schr-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(30, 107, 255, 0.28);
}

.schr-btn-primary:hover {
    background: var(--schr-primary-hover);
    color: #fff;
    box-shadow: 0 8px 20px rgba(30, 107, 255, 0.34);
}

.schr-btn-ghost {
    color: var(--schr-dark);
    border-color: var(--schr-border);
    background: var(--schr-surface);
}

.schr-btn-ghost:hover {
    border-color: var(--schr-primary);
    color: var(--schr-primary);
}

/* Mock editor card in the hero. */
.schr-mock-editor {
    background: var(--schr-surface);
    border-radius: 14px;
    border: 1px solid var(--schr-border);
    box-shadow: var(--schr-shadow);
    padding: 1.5rem 1.5rem 1.25rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--schr-ink);
}

.schr-mock-editor-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.schr-mock-editor-bar span {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--schr-border);
}

.schr-underline {
    text-decoration: underline wavy;
    text-underline-offset: 4px;
}

/* Issue underlines: grammar uses the official brand coral; spelling the brand
   blue. "Style" keeps a distinct amber — the brand palette has no amber token,
   and style hints are intentionally a third, non-error category. */
.schr-underline-grammar { text-decoration-color: var(--schr-error); }
.schr-underline-style   { text-decoration-color: #E0A93B; }
.schr-underline-spell   { text-decoration-color: var(--schr-primary); }

.schr-mock-meta {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--schr-border);
    color: var(--schr-ink-muted);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
}

/* ---------- Sections (features / steps / pricing) ---------- */
.schr-section {
    padding: 3.5rem 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.schr-section-title {
    text-align: center;
    color: var(--schr-dark);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.schr-section-lead {
    text-align: center;
    color: var(--schr-ink-muted);
    max-width: 40rem;
    margin: 0 auto 2.5rem;
}

.schr-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 880px) {
    .schr-feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .schr-feature-grid { grid-template-columns: 1fr; }
}

.schr-feature-card {
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--schr-shadow);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.schr-feature-card:hover {
    border-color: var(--schr-primary);
    box-shadow: 0 10px 26px rgba(14, 31, 92, 0.14);
    transform: translateY(-2px);
}

.schr-feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: var(--schr-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(30, 107, 255, 0.25);
}

.schr-feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    color: var(--schr-dark);
}

.schr-feature-card p {
    color: var(--schr-ink-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* How it works */
.schr-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    counter-reset: schr-step;
}

@media (max-width: 720px) {
    .schr-steps { grid-template-columns: 1fr; }
}

.schr-step {
    background: var(--schr-surface);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--schr-border);
    box-shadow: var(--schr-shadow);
}

.schr-step-num {
    display: inline-block;
    background: var(--schr-gradient);
    color: #fff;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    text-align: center;
    line-height: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 10px rgba(30, 107, 255, 0.25);
}

.schr-step h3 {
    font-size: 1.1rem;
    color: var(--schr-dark);
    margin-bottom: 0.35rem;
}

.schr-step p {
    color: var(--schr-ink-muted);
    margin: 0;
}

/* ---------- Pricing ---------- */
.schr-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1080px;
    margin: 0 auto;
}

@media (max-width: 880px) {
    .schr-pricing-grid { grid-template-columns: 1fr; }
}

.schr-plan {
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.schr-plan-highlight {
    border-color: var(--schr-primary);
    box-shadow: var(--schr-shadow);
    position: relative;
}

.schr-plan-highlight::before {
    /* Label text comes from the localised data-popular-label attribute set by
       PricingTiers.razor, so "Most popular" translates with the culture. */
    content: attr(data-popular-label);
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--schr-gradient);
    color: #fff;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.schr-plan-name {
    font-size: 1.1rem;
    color: var(--schr-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.schr-plan-price {
    font-size: 2rem;
    color: var(--schr-ink);
    font-weight: 700;
}

.schr-plan-period {
    color: var(--schr-ink-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.schr-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}

.schr-plan-features li {
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
    color: var(--schr-ink);
}

.schr-plan-features li::before {
    content: "✓";
    color: var(--schr-primary);
    position: absolute;
    left: 0;
    font-weight: 700;
}

.schr-plan-cta {
    text-align: center;
    width: 100%;
}

/* ---------- Badges (Coming soon / Available) ---------- */
.schr-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    vertical-align: middle;
    line-height: 1.2;
}

.schr-badge-available {
    background: rgba(30, 107, 255, 0.12);
    color: var(--schr-dark);
    border: 1px solid rgba(30, 107, 255, 0.4);
}

.schr-badge-soon {
    background: var(--schr-surface);
    color: var(--schr-ink-muted);
    border: 1px solid var(--schr-border);
}

.schr-btn-disabled {
    background: var(--schr-surface);
    color: var(--schr-ink-muted);
    border: 1px solid var(--schr-border);
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Platform cards (Apps page) ---------- */
.schr-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (max-width: 980px) {
    .schr-platform-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .schr-platform-grid { grid-template-columns: 1fr; }
}

.schr-platform {
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schr-platform-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.schr-platform-name {
    margin: 0;
    font-size: 1.05rem;
    color: var(--schr-dark);
    font-weight: 700;
}

.schr-platform-desc {
    color: var(--schr-ink-muted);
    margin: 0;
    font-size: 0.95rem;
    flex: 1;
}

.schr-platform-cta {
    margin-top: 0.5rem;
    text-align: center;
}

/* ---------- Blog ---------- */
.schr-blog-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 720px) {
    .schr-blog-list { grid-template-columns: 1fr; }
}

.schr-blog-card {
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.15s ease;
}

.schr-blog-card:hover {
    border-color: var(--schr-primary);
}

.schr-blog-card h3 {
    margin-top: 0;
    color: var(--schr-dark);
    font-size: 1.25rem;
}

.schr-blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

.schr-blog-card-meta {
    color: var(--schr-ink-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.schr-blog-card-summary {
    color: var(--schr-ink);
}

.schr-blog-card-cta {
    margin-top: 0.75rem;
    display: inline-block;
    color: var(--schr-primary);
    font-weight: 600;
    text-decoration: none;
}

.schr-blog-card-cta:hover {
    text-decoration: underline;
}

.schr-blog-post {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.schr-blog-post h1 {
    color: var(--schr-dark);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.schr-blog-post-meta {
    color: var(--schr-ink-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.schr-blog-body h1,
.schr-blog-body h2,
.schr-blog-body h3 {
    color: var(--schr-dark);
    margin-top: 2rem;
}

.schr-blog-body p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ---------- Testimonials ---------- */
.schr-testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 880px) {
    .schr-testimonials { grid-template-columns: 1fr; }
}

.schr-testimonial {
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.schr-testimonial-quote {
    color: var(--schr-ink);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.schr-testimonial-author {
    color: var(--schr-ink-muted);
    font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.schr-footer {
    background: var(--schr-surface);
    border-top: 1px solid var(--schr-border);
    margin-top: 4rem;
}

.schr-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 720px) {
    .schr-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

.schr-footer h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--schr-ink-muted);
    margin-bottom: 0.75rem;
}

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

.schr-footer li {
    padding: 0.25rem 0;
}

.schr-footer a {
    color: var(--schr-ink);
    text-decoration: none;
}

.schr-footer a:hover {
    color: var(--schr-primary);
}

.schr-footer-fineprint {
    border-top: 1px solid var(--schr-border);
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    color: var(--schr-ink-muted);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- Contact form (about page) ---------- */
.schr-contact-form {
    max-width: 36rem;
    margin: 1.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.schr-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.schr-form-row label {
    font-weight: 600;
    color: var(--schr-dark);
    font-size: 0.95rem;
}

.schr-form-row input,
.schr-form-row textarea {
    width: 100%;
    font: inherit;
    color: var(--schr-ink);
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schr-form-row input:focus,
.schr-form-row textarea:focus {
    outline: none;
    border-color: var(--schr-primary);
    box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.18);
}

.schr-form-row .validation-message {
    color: var(--schr-error-text);
    font-size: 0.85rem;
}

.schr-contact-form .schr-btn {
    align-self: flex-start;
}

/* Success panel: brand-mint tint with navy heading + ink body. The mint
   (--schr-success) is used only as a low-opacity tint and border — the text
   stays navy/ink so contrast clears AA. */
.schr-contact-success {
    max-width: 36rem;
    margin: 1.5rem auto 0;
    background: rgba(21, 183, 158, 0.10);
    border: 1px solid rgba(21, 183, 158, 0.40);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color: var(--schr-dark);
    text-align: left;
}

.schr-contact-success strong { display: block; margin-bottom: 0.25rem; }
.schr-contact-success p { margin: 0; color: var(--schr-ink); }

/* Error panel: brand-coral tint + border; text uses the darker coral text
   variant (--schr-error-text) for AA contrast on the light tint. */
.schr-contact-error {
    background: rgba(229, 72, 77, 0.08);
    border: 1px solid rgba(229, 72, 77, 0.40);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: var(--schr-error-text);
    font-size: 0.95rem;
}

/* ---------- Language switcher ---------- */
/* Dropdown variant — used in the marketing top nav. <details>/<summary> so it
   works without JavaScript on static-SSR pages, like the user menu. */
.schr-lang-menu {
    position: relative;
}

.schr-lang-menu > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--schr-border);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--schr-ink);
    white-space: nowrap;
}

.schr-lang-menu > summary::-webkit-details-marker {
    display: none;
}

.schr-lang-menu[open] > summary {
    border-color: var(--schr-primary);
    color: var(--schr-primary);
}

.schr-lang-dropdown {
    position: absolute;
    top: 2.5rem;
    inset-inline-end: 0;
    background: var(--schr-surface);
    border: 1px solid var(--schr-border);
    border-radius: 8px;
    box-shadow: var(--schr-shadow);
    min-width: 160px;
    padding: 0.4rem;
    z-index: 30;
}

.schr-lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.7rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--schr-ink);
}

.schr-lang-option:hover {
    background: rgba(30, 107, 255, 0.08);
    color: var(--schr-primary);
}

.schr-lang-option-current {
    font-weight: 600;
    color: var(--schr-primary);
}

/* Inline variant — used in the footer fineprint. */
.schr-lang-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.schr-lang-inline-link {
    color: var(--schr-ink-muted);
    text-decoration: none;
}

.schr-lang-inline-link:hover {
    color: var(--schr-primary);
}

.schr-lang-inline-current {
    color: var(--schr-ink);
    font-weight: 600;
}

/* ---------- Right-to-left (Arabic) ----------
   Bootstrap's bootstrap.rtl.min.css is loaded conditionally in App.razor and
   handles the framework components. These rules fix the custom schreibly styles
   above, which assume a left-to-right reading order. Logical properties
   (inset-inline-*, margin-inline-*) used above already flip automatically;
   the rules below handle the remaining direction-specific cases. */
[dir="rtl"] .schr-section-title,
[dir="rtl"] .schr-hero h1 {
    letter-spacing: 0;
}

/* Hero band: mirror the asymmetric radial cyan glows and the SVG wave so the
   airy banner backdrop reads correctly in right-to-left layouts. The vertical
   white -> light-blue wash and the wave's vertical shape are unaffected. */
[dir="rtl"] .schr-hero-band {
    background:
        radial-gradient(40rem 22rem at 88% 0%, rgba(82, 210, 255, 0.18), transparent 70%),
        radial-gradient(34rem 20rem at 8% 18%, rgba(30, 107, 255, 0.12), transparent 72%),
        linear-gradient(180deg, #FFFFFF 0%, #EAF2FF 60%, var(--schr-bg) 100%);
}

[dir="rtl"] .schr-hero-band::after {
    transform: scaleX(-1);
}

/* Plan feature ticks: the checkmark sits at the start of the line. */
[dir="rtl"] .schr-plan-features li {
    padding: 0.35rem 1.5rem 0.35rem 0;
}

[dir="rtl"] .schr-plan-features li::before {
    left: auto;
    right: 0;
}

/* User dropdown and mobile panel anchor to the start edge in RTL. */
[dir="rtl"] .schr-user-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .schr-mobile-panel {
    right: auto;
    left: 1rem;
}

/* Blog list "Read more" and post-back arrows read naturally in RTL because the
   text content carries the arrow; no mirroring needed. The blog body inherits
   dir from <html>, so headings, lists and paragraphs flow right-to-left. */
[dir="rtl"] .schr-blog-card,
[dir="rtl"] .schr-blog-post,
[dir="rtl"] .schr-contact-form,
[dir="rtl"] .schr-contact-success {
    text-align: right;
}

/* Bootstrap form controls: text-align:end already follows dir; nothing extra. */
