/* Optional alternate theme: Editorial (Design 2.1 inspired).
   Enable by setting: <html data-theme="editorial"> */

:root[data-theme="editorial"] {
    /* Typography */
    --font-display: 'Fraunces', ui-serif, Georgia, serif;
    --font-body: 'Spectral', ui-serif, Georgia, serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

    /* Typography system */
    --font-title: var(--font-display);
    --font-subtitle: var(--font-body);
    --font-text: var(--font-body);
    --font-ui: var(--font-body);

    /* Brand */
    --primary: #0f766e;
    --primary-600: #0b5d57;
    --primary-700: #084c47;
    --secondary: #d97706;
    --secondary-600: #b45309;

    /* Status */
    --success: #0f766e;
    --danger: #b42318;
    --danger-600: #7a271a;
    --warning: #d97706;

    /* Surfaces */
    --bg: #f6f1e8;
    --card: #ffffff;
    --border: rgba(16, 17, 20, 0.14);
    --surface: rgba(255, 255, 255, 0.86);
    --surface-soft: rgba(255, 255, 255, 0.92);
    --surface-accent: rgba(15, 118, 110, 0.08);

    /* Text */
    --text-main: #101114;
    --text-muted: rgba(16, 17, 20, 0.64);
    --text-subtle: rgba(16, 17, 20, 0.42);

    /* Tints */
    --primary-soft: rgba(15, 118, 110, 0.14);
    --secondary-soft: rgba(217, 119, 6, 0.14);
    --success-soft: rgba(15, 118, 110, 0.14);
    --danger-soft: rgba(180, 35, 24, 0.12);
    --warning-soft: rgba(217, 119, 6, 0.18);
    --primary-soft-bg: rgba(15, 118, 110, 0.08);
    --info-soft: rgba(15, 118, 110, 0.12);
    --info-text: #063a36;

    /* Navigation */
    --nav-bg: rgba(255, 255, 255, 0.62);
    --nav-border: rgba(16, 17, 20, 0.08);
    --nav-link: rgba(16, 17, 20, 0.56);
    --nav-link-hover: rgba(16, 17, 20, 0.86);
    --nav-link-hover-bg: rgba(16, 17, 20, 0.025);
    --nav-link-active: #0f766e;
    --nav-link-active-bg: rgba(15, 118, 110, 0.09);
    --nav-icon: rgba(16, 17, 20, 0.42);
    --nav-icon-hover: rgba(16, 17, 20, 0.62);
    --nav-icon-active: #0f766e;
    --nav-section: rgba(16, 17, 20, 0.4);
    --logo-color: #0f766e;

    /* Radius scale (more “pillowy”, outline-first) */
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;

    /* Elevation (keep extremely subtle; outlines do the work) */
    --shadow: none;
    --shadow-hover: none;
}

/* Editorial iconography: lighter, more Notion-like strokes */
:root[data-theme="editorial"] .sidebar__link {
    font-weight: 500;
    letter-spacing: 0.005em;
}

:root[data-theme="editorial"] .sidebar__icon svg {
    opacity: 0.88;
}

:root[data-theme="editorial"] .sidebar__icon svg * {
    stroke-width: 1.4;
}

:root[data-theme="editorial"] .sidebar__icon svg [fill="currentColor"] {
    opacity: 0.68;
}

/* Editorial widgets: calm, outline-first cards with a soft top wash. */
:root[data-theme="editorial"] .widget-card {
    box-shadow: none;
}

:root[data-theme="editorial"] .widget-card--gradient {
    background: var(--card);
    color: var(--text-main);
    border: 1px solid var(--border);
}

:root[data-theme="editorial"] .widget-card--filled,
:root[data-theme="editorial"] .widget-card--filled-gradient {
    border: 1px solid var(--border);
    color: var(--text-main);
}

:root[data-theme="editorial"] .widget-card--gradient::before {
    inset: 0;
    width: auto;
    height: 44%;
    background: linear-gradient(180deg, var(--widget-soft-start, rgba(15, 118, 110, 0.12)), transparent 78%);
    opacity: 1;
}

:root[data-theme="editorial"] .widget-card--gradient::after {
    display: none;
}

:root[data-theme="editorial"] .widget-media {
    border: 1px solid var(--border);
    box-shadow: none;
}

:root[data-theme="editorial"] .widget-card--gradient .widget-title,
:root[data-theme="editorial"] .widget-card--gradient .widget-value,
:root[data-theme="editorial"] .widget-card--gradient .widget-meta,
:root[data-theme="editorial"] .widget-card--gradient .widget-row {
    color: inherit;
}

:root[data-theme="editorial"] .widget-card--gradient .widget-kicker {
    color: var(--text-muted);
}

:root[data-theme="editorial"] .widget-card--gradient .widget-icon {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-muted);
    box-shadow: inset 0 0 0 1px var(--border);
}

:root[data-theme="editorial"] .widget-card--gradient .widget-action {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border);
    color: var(--text-muted);
}

:root[data-theme="editorial"] .widget-card--gradient .widget-action:hover {
    background: var(--surface-soft);
    border-color: var(--primary);
    color: var(--text-main);
}

:root[data-theme="editorial"] .widget-card--gradient .widget-progress {
    background: rgba(16, 17, 20, 0.08);
}

:root[data-theme="editorial"] .widget-card--gradient .widget-progress__bar {
    background: var(--primary);
}

:root[data-theme="editorial"] .widget-card--gradient .btn-outline {
    border-color: var(--border);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.82);
}

:root[data-theme="editorial"] .widget-card--gradient .btn-outline:hover {
    background: var(--surface-soft);
    border-color: var(--primary);
    color: var(--primary);
}

/* Editorial categories: lighter outlines and calmer sparkline contrast. */
:root[data-theme="editorial"] .category-card,
:root[data-theme="editorial"] .category-edit-btn {
    border-color: color-mix(in srgb, var(--border) 62%, transparent);
}

:root[data-theme="editorial"] .category-card__sparkline canvas {
    opacity: 0.9;
}
