/* =============================================================================
   ONCO-PREDICT  ·  GLOBAL STYLESHEET
   -----------------------------------------------------------------------------
   Project : Breast Cancer Risk Prediction System Using ANNs
   Author  : Ochor Emmanuel Cherechi (GOU/U22/CSC/833)
   File    : assets/css/main.css

   Sits on top of TailwindCSS (loaded via CDN in the page headers). Tailwind
   handles utilities; this file defines:
     · The design-token palette (CSS custom properties)
     · Typography baseline + refinements
     · Polished components (buttons, cards, inputs, nav)
     · Animations and keyframes
     · Risk-level colour system

   Naming convention: BEM-ish, with a leading `op-` prefix on components that
   could otherwise collide with library classes.
   ========================================================================== */

/* =============================================================================
   1. DESIGN TOKENS
   ----------------------------------------------------------------------------
   Define everything here. Don't hardcode hex values anywhere else in the
   codebase — reach for var(--op-...) instead.
   ========================================================================== */

:root {
    /* ---- Brand palette ------------------------------------------------- */
    --op-navy-900:        #0B1426;   /* deepest navy — hero gradient top    */
    --op-navy-800:        #0F1E3C;
    --op-navy-700:        #14274E;   /* primary surface dark                 */
    --op-navy-600:        #1E3A6F;
    --op-navy-500:        #2C5294;

    --op-blue-50:         #EFF6FF;
    --op-blue-100:        #DBEAFE;
    --op-blue-200:        #BFDBFE;
    --op-blue-500:        #3B82F6;
    --op-blue-600:        #2563EB;
    --op-blue-700:        #1D4ED8;

    --op-teal-50:         #F0FDFA;
    --op-teal-100:        #CCFBF1;
    --op-teal-400:        #2DD4BF;   /* primary teal accent                  */
    --op-teal-500:        #14B8A6;
    --op-teal-600:        #0D9488;
    --op-teal-700:        #0F766E;

    /* ---- Neutrals ------------------------------------------------------ */
    --op-white:           #FFFFFF;
    --op-cream:           #FAFBFC;   /* page background, subtle warmth       */
    --op-gray-50:         #F8FAFC;
    --op-gray-100:        #F1F5F9;
    --op-gray-200:        #E2E8F0;
    --op-gray-300:        #CBD5E1;
    --op-gray-400:        #94A3B8;
    --op-gray-500:        #64748B;
    --op-gray-600:        #475569;
    --op-gray-700:        #334155;
    --op-gray-800:        #1E293B;
    --op-gray-900:        #0F172A;

    /* ---- Semantic colours --------------------------------------------- */
    --op-success:         #10B981;
    --op-success-bg:      #ECFDF5;
    --op-warning:         #F59E0B;
    --op-warning-bg:      #FFFBEB;
    --op-danger:          #EF4444;
    --op-danger-bg:       #FEF2F2;
    --op-info:            #3B82F6;
    --op-info-bg:         #EFF6FF;

    /* ---- Risk levels (Chapter 3.12.1 thresholds) ---------------------- */
    --op-risk-low:        var(--op-success);
    --op-risk-low-bg:     var(--op-success-bg);
    --op-risk-moderate:   var(--op-warning);
    --op-risk-moderate-bg: var(--op-warning-bg);
    --op-risk-high:       var(--op-danger);
    --op-risk-high-bg:    var(--op-danger-bg);

    /* ---- Typography --------------------------------------------------- */
    --op-font-sans:
        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
        Arial, 'Noto Sans', sans-serif;
    --op-font-display:
        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --op-font-mono:
        'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        'Liberation Mono', 'Courier New', monospace;

    /* ---- Shadows (subtle, layered) ----------------------------------- */
    --op-shadow-xs:    0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --op-shadow-sm:    0 1px 3px 0 rgba(15, 23, 42, 0.06),
                       0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --op-shadow-md:    0 4px 6px -1px rgba(15, 23, 42, 0.07),
                       0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --op-shadow-lg:    0 10px 15px -3px rgba(15, 23, 42, 0.08),
                       0 4px 6px -4px rgba(15, 23, 42, 0.06);
    --op-shadow-xl:    0 20px 25px -5px rgba(15, 23, 42, 0.10),
                       0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --op-shadow-2xl:   0 25px 50px -12px rgba(15, 23, 42, 0.16);
    --op-shadow-glow:  0 0 0 4px rgba(20, 184, 166, 0.10);

    /* ---- Radii -------------------------------------------------------- */
    --op-radius-sm:    6px;
    --op-radius-md:    10px;
    --op-radius-lg:    14px;
    --op-radius-xl:    20px;
    --op-radius-2xl:   28px;
    --op-radius-full:  9999px;

    /* ---- Motion ------------------------------------------------------- */
    --op-ease-out:        cubic-bezier(0.22, 1, 0.36, 1);
    --op-ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);
    --op-duration-fast:   150ms;
    --op-duration-base:   240ms;
    --op-duration-slow:   400ms;

    /* ---- Layout constants -------------------------------------------- */
    --op-nav-height:      72px;
    --op-sidebar-width:   260px;
    --op-content-max:     1280px;
}

/* =============================================================================
   2. RESETS & DOCUMENT BASELINE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--op-font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--op-gray-800);
    background: var(--op-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font: inherit;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

/* =============================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--op-font-display);
    color: var(--op-gray-900);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 700;
}

h1 { font-size: clamp(1.875rem, 1.6rem + 1.4vw, 2.625rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem,  1.35rem + 0.7vw, 2rem);     letter-spacing: -0.02em;  }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; }

p {
    margin: 0 0 1rem;
    color: var(--op-gray-700);
}

a {
    color: var(--op-teal-600);
    text-decoration: none;
    transition: color var(--op-duration-fast) var(--op-ease-out);
}

a:hover {
    color: var(--op-teal-700);
}

.op-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--op-teal-600);
    margin-bottom: 0.75rem;
}

.op-muted {
    color: var(--op-gray-500);
}

.op-strong {
    color: var(--op-gray-900);
    font-weight: 600;
}

/* =============================================================================
   4. LAYOUT PRIMITIVES
   ========================================================================== */

.op-container {
    width: 100%;
    max-width: var(--op-content-max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 1rem + 1vw, 2rem);
}

.op-section {
    padding-block: clamp(3rem, 2.5rem + 3vw, 5.5rem);
}

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

.op-page__main {
    flex: 1;
}

/* =============================================================================
   5. NAVIGATION
   ========================================================================== */

.op-nav {
    height: var(--op-nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--op-gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow var(--op-duration-base) var(--op-ease-out);
}

.op-nav.is-scrolled {
    box-shadow: var(--op-shadow-sm);
}

.op-nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.op-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--op-gray-900);
    letter-spacing: -0.015em;
}

.op-nav__brand-mark {
    width: 34px;
    height: 34px;
    border-radius: var(--op-radius-md);
    background: linear-gradient(135deg, var(--op-navy-700) 0%, var(--op-teal-500) 100%);
    display: grid;
    place-items: center;
    color: var(--op-white);
    box-shadow: var(--op-shadow-sm);
}

.op-nav__brand:hover {
    color: var(--op-navy-700);
}

.op-nav__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.op-nav__link {
    padding: 0.5rem 0.875rem;
    color: var(--op-gray-600);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--op-radius-md);
    transition:
        color var(--op-duration-fast) var(--op-ease-out),
        background var(--op-duration-fast) var(--op-ease-out);
    position: relative;
}

.op-nav__link:hover {
    color: var(--op-gray-900);
    background: var(--op-gray-100);
}

.op-nav__link.active {
    color: var(--op-navy-700);
    background: var(--op-blue-50);
}

.op-nav__mobile-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--op-radius-md);
    color: var(--op-gray-700);
    align-items: center;
    justify-content: center;
}

.op-nav__mobile-toggle:hover {
    background: var(--op-gray-100);
}

/* =============================================================================
   6. BUTTONS
   ========================================================================== */

.op-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6875rem 1.25rem;
    font-family: var(--op-font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--op-radius-md);
    cursor: pointer;
    user-select: none;
    transition:
        background var(--op-duration-fast) var(--op-ease-out),
        border-color var(--op-duration-fast) var(--op-ease-out),
        color var(--op-duration-fast) var(--op-ease-out),
        box-shadow var(--op-duration-fast) var(--op-ease-out),
        transform var(--op-duration-fast) var(--op-ease-out);
    white-space: nowrap;
    text-decoration: none;
}

.op-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.op-btn:focus-visible {
    outline: none;
    box-shadow: var(--op-shadow-glow);
}

.op-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---- Variants ---- */

.op-btn--primary {
    background: var(--op-navy-700);
    color: var(--op-white);
    border-color: var(--op-navy-700);
    box-shadow: var(--op-shadow-sm);
}

.op-btn--primary:hover:not(:disabled) {
    background: var(--op-navy-800);
    border-color: var(--op-navy-800);
    box-shadow: var(--op-shadow-md);
}

.op-btn--teal {
    background: var(--op-teal-600);
    color: var(--op-white);
    border-color: var(--op-teal-600);
    box-shadow: var(--op-shadow-sm);
}

.op-btn--teal:hover:not(:disabled) {
    background: var(--op-teal-700);
    border-color: var(--op-teal-700);
    box-shadow: var(--op-shadow-md);
}

.op-btn--secondary {
    background: var(--op-white);
    color: var(--op-gray-800);
    border-color: var(--op-gray-300);
    box-shadow: var(--op-shadow-xs);
}

.op-btn--secondary:hover:not(:disabled) {
    background: var(--op-gray-50);
    border-color: var(--op-gray-400);
}

.op-btn--ghost {
    background: transparent;
    color: var(--op-gray-700);
    border-color: transparent;
}

.op-btn--ghost:hover:not(:disabled) {
    background: var(--op-gray-100);
    color: var(--op-gray-900);
}

.op-btn--danger {
    background: var(--op-danger);
    color: var(--op-white);
    border-color: var(--op-danger);
}

.op-btn--danger:hover:not(:disabled) {
    background: #DC2626;
    border-color: #DC2626;
}

/* ---- Sizes ---- */

.op-btn--sm { padding: 0.4375rem 0.875rem; font-size: 0.8125rem; }
.op-btn--lg { padding: 0.875rem 1.5rem;    font-size: 1rem;      }
.op-btn--xl { padding: 1rem 1.875rem;      font-size: 1.0625rem; }

/* ---- States ---- */

.op-btn--loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}

.op-btn--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    color: var(--op-white);
    animation: op-spin 0.65s linear infinite;
}

.op-btn--block {
    width: 100%;
}

/* =============================================================================
   7. CARDS & SURFACES
   ========================================================================== */

.op-card {
    background: var(--op-white);
    border: 1px solid var(--op-gray-200);
    border-radius: var(--op-radius-lg);
    box-shadow: var(--op-shadow-sm);
    transition:
        transform var(--op-duration-base) var(--op-ease-out),
        box-shadow var(--op-duration-base) var(--op-ease-out);
}

.op-card--hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--op-shadow-lg);
}

.op-card__body {
    padding: 1.5rem;
}

.op-card__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--op-gray-200);
}

.op-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--op-gray-900);
}

.op-card__subtitle {
    font-size: 0.8125rem;
    color: var(--op-gray-500);
    margin-top: 0.125rem;
}

.op-card__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--op-gray-200);
    background: var(--op-gray-50);
    border-radius: 0 0 var(--op-radius-lg) var(--op-radius-lg);
}

/* ---- Glassmorphism variant for hero cards ---- */
.op-card--glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--op-shadow-xl);
}

/* =============================================================================
   8. FORMS
   ========================================================================== */

.op-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.op-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--op-gray-700);
    letter-spacing: 0.01em;
}

.op-label__hint {
    font-weight: 400;
    color: var(--op-gray-400);
    margin-left: 0.375rem;
}

.op-input,
.op-select,
.op-textarea {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    font-family: var(--op-font-sans);
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--op-gray-900);
    background: var(--op-white);
    border: 1px solid var(--op-gray-300);
    border-radius: var(--op-radius-md);
    transition:
        border-color var(--op-duration-fast) var(--op-ease-out),
        box-shadow var(--op-duration-fast) var(--op-ease-out);
}

.op-input:hover,
.op-select:hover,
.op-textarea:hover {
    border-color: var(--op-gray-400);
}

.op-input:focus,
.op-select:focus,
.op-textarea:focus {
    outline: none;
    border-color: var(--op-teal-500);
    box-shadow: var(--op-shadow-glow);
}

.op-input::placeholder,
.op-textarea::placeholder {
    color: var(--op-gray-400);
}

.op-input--error,
.op-input.is-invalid {
    border-color: var(--op-danger);
}

.op-input--error:focus,
.op-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10);
}

.op-input-icon {
    position: relative;
}

.op-input-icon > i,
.op-input-icon > svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--op-gray-400);
    pointer-events: none;
    font-size: 0.9375rem;
}

.op-input-icon > .op-input {
    padding-left: 2.5rem;
}

.op-help {
    font-size: 0.75rem;
    color: var(--op-gray-500);
}

.op-help--error {
    color: var(--op-danger);
}

.op-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--op-gray-700);
    font-size: 0.875rem;
}

.op-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--op-teal-600);
    cursor: pointer;
}

/* =============================================================================
   9. BADGES & PILLS
   ========================================================================== */

.op-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--op-radius-full);
    letter-spacing: 0.01em;
}

.op-badge--success { background: var(--op-success-bg); color: var(--op-success); }
.op-badge--warning { background: var(--op-warning-bg); color: var(--op-warning); }
.op-badge--danger  { background: var(--op-danger-bg);  color: var(--op-danger);  }
.op-badge--info    { background: var(--op-info-bg);    color: var(--op-info);    }
.op-badge--neutral { background: var(--op-gray-100);   color: var(--op-gray-700);}

.op-badge--dot::before {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: currentColor;
}

/* =============================================================================
   10. RISK-LEVEL SEMANTICS
   ----------------------------------------------------------------------------
   The three classes below should be applied wherever a risk level is shown:
   the result page hero, history table rows, report headers, etc.
   ========================================================================== */

.risk-low {
    color: var(--op-risk-low);
    background: var(--op-risk-low-bg);
    border-color: rgba(16, 185, 129, 0.2);
}

.risk-moderate {
    color: var(--op-risk-moderate);
    background: var(--op-risk-moderate-bg);
    border-color: rgba(245, 158, 11, 0.2);
}

.risk-high {
    color: var(--op-risk-high);
    background: var(--op-risk-high-bg);
    border-color: rgba(239, 68, 68, 0.2);
}

.op-risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--op-radius-full);
    border: 1px solid transparent;
}

.op-risk-pill::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

/* =============================================================================
   11. HERO & GRADIENT BACKGROUNDS
   ========================================================================== */

.op-hero {
    position: relative;
    overflow: hidden;
    color: var(--op-white);
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(20, 184, 166, 0.35), transparent 60%),
        radial-gradient(800px 400px at 10% 110%, rgba(45, 212, 191, 0.18), transparent 55%),
        linear-gradient(135deg, var(--op-navy-900) 0%, var(--op-navy-700) 60%, var(--op-navy-600) 100%);
    padding-block: clamp(4rem, 3rem + 5vw, 7rem);
}

.op-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
}

.op-hero h1 {
    color: var(--op-white);
}

.op-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.0625rem;
}

.op-hero .op-eyebrow {
    color: var(--op-teal-400);
}

/* =============================================================================
   12. TABLES
   ========================================================================== */

.op-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
}

.op-table thead th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--op-gray-500);
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--op-gray-200);
    background: var(--op-gray-50);
}

.op-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--op-gray-100);
    color: var(--op-gray-800);
    vertical-align: middle;
}

.op-table tbody tr:last-child td {
    border-bottom: 0;
}

.op-table tbody tr {
    transition: background var(--op-duration-fast) var(--op-ease-out);
}

.op-table tbody tr:hover {
    background: var(--op-gray-50);
}

.op-table--rounded {
    border: 1px solid var(--op-gray-200);
    border-radius: var(--op-radius-lg);
    overflow: hidden;
    background: var(--op-white);
}

/* =============================================================================
   13. TOASTS / NOTIFICATIONS
   ========================================================================== */

.op-toast-container {
    position: fixed;
    top: calc(var(--op-nav-height) + 1rem);
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
}

.op-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--op-white);
    border: 1px solid var(--op-gray-200);
    border-left: 3px solid var(--op-gray-400);
    border-radius: var(--op-radius-md);
    box-shadow: var(--op-shadow-lg);
    animation: op-toast-in var(--op-duration-base) var(--op-ease-out);
    font-size: 0.875rem;
}

.op-toast--success { border-left-color: var(--op-success); }
.op-toast--warning { border-left-color: var(--op-warning); }
.op-toast--danger  { border-left-color: var(--op-danger);  }
.op-toast--info    { border-left-color: var(--op-info);    }

.op-toast__icon {
    flex: none;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    margin-top: 1px;
}

.op-toast__body {
    flex: 1;
    color: var(--op-gray-800);
    line-height: 1.45;
}

.op-toast__close {
    flex: none;
    background: transparent;
    border: 0;
    color: var(--op-gray-400);
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
}

.op-toast__close:hover {
    color: var(--op-gray-700);
}

.op-toast.is-leaving {
    animation: op-toast-out var(--op-duration-base) var(--op-ease-out) forwards;
}

/* =============================================================================
   14. SPINNERS & LOADING STATES
   ========================================================================== */

.op-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2.5px solid var(--op-gray-200);
    border-top-color: var(--op-teal-500);
    border-radius: 50%;
    animation: op-spin 0.7s linear infinite;
}

.op-spinner--lg {
    width: 2.25rem;
    height: 2.25rem;
    border-width: 3px;
}

.op-spinner--inline {
    vertical-align: -0.25em;
    margin-right: 0.5rem;
}

.op-skeleton {
    background: linear-gradient(
        90deg,
        var(--op-gray-100) 0%,
        var(--op-gray-200) 50%,
        var(--op-gray-100) 100%
    );
    background-size: 200% 100%;
    border-radius: var(--op-radius-sm);
    animation: op-skeleton 1.4s ease-in-out infinite;
}

/* =============================================================================
   15. ANIMATIONS / KEYFRAMES
   ========================================================================== */

@keyframes op-spin {
    to { transform: rotate(360deg); }
}

@keyframes op-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes op-fade-in-fast {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes op-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

@keyframes op-pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); }
    50%      { box-shadow: 0 0 0 14px rgba(20, 184, 166, 0); }
}

@keyframes op-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes op-toast-out {
    to { opacity: 0; transform: translateX(20px); }
}

@keyframes op-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.op-anim-fade-in     { animation: op-fade-in     var(--op-duration-slow) var(--op-ease-out) both; }
.op-anim-fade-in-fast { animation: op-fade-in-fast var(--op-duration-base) var(--op-ease-out) both; }
.op-anim-pulse       { animation: op-pulse       1.6s ease-in-out infinite; }
.op-anim-pulse-glow  { animation: op-pulse-glow  1.8s ease-in-out infinite; }

/* =============================================================================
   16. ACCESSIBILITY
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--op-teal-500);
    outline-offset: 2px;
    border-radius: var(--op-radius-sm);
}

.op-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================================================
   17. SCROLLBAR (WebKit) — refined rather than chunky
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--op-gray-300);
    border-radius: 8px;
    border: 2px solid var(--op-cream);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--op-gray-400);
}

/* =============================================================================
   18. PRINT — basic preparation; full @media print rules live in print.css
   ========================================================================== */

@media print {
    .op-nav, .op-toast-container, .op-no-print {
        display: none !important;
    }
}

/* =============================================================================
   19. RESPONSIVE OVERRIDES
   ========================================================================== */

@media (max-width: 768px) {
    body { font-size: 14.5px; }

    .op-nav__links {
        position: fixed;
        top: var(--op-nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--op-white);
        padding: 1rem;
        border-bottom: 1px solid var(--op-gray-200);
        box-shadow: var(--op-shadow-md);
        transform: translateY(-110%);
        transition: transform var(--op-duration-base) var(--op-ease-out);
    }

    .op-nav__links.is-open {
        transform: translateY(0);
    }

    .op-nav__link {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .op-nav__mobile-toggle {
        display: inline-flex;
    }
}

/* =============================================================================
   END OF main.css
   ========================================================================== */
