/* ═══════════════════════════════════════════════════════════
   SORTERA – Swiss editorial design within STRATEGIOS brand
   Inter typeface · B&W · Color only in data visualization
   ═══════════════════════════════════════════════════════════ */

/* ── Fonts ── */
@font-face { font-family: 'Inter'; src: url('fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

/* ── Design tokens ── */
:root {
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --black: #000000;
    --white: #ffffff;
    --grey-900: #1a1a1a;
    --grey-700: #404040;
    --grey-500: #757575;
    --grey-300: #bdbdbd;
    --grey-200: #e0e0e0;
    --grey-100: #f0f0f0;
    --grey-50: #f8f8f8;

    --bg: var(--white);
    --fg: var(--black);
    --bg-alt: var(--grey-50);
    --bg-elevated: var(--white);
    --border: var(--grey-200);
    --border-strong: var(--grey-300);
    --muted: var(--grey-500);
    --subtle: var(--grey-300);

    /* Data viz – allowed color per design manual */
    --color-high: #2e7d32;
    --color-med: #e6a817;
    --color-low: #9e9e9e;
    --color-explore: #d84315;
    --color-danger: #b71c1c;

    /* Spacing scale */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.25rem;
    --s-6: 1.5rem;
    --s-8: 2rem;
    --s-10: 2.5rem;
    --s-12: 3rem;
    --s-16: 4rem;

    --container: 56rem;
    --radius: 3px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #111111;
    --fg: #e8e8e8;
    --bg-alt: #1a1a1a;
    --bg-elevated: #1e1e1e;
    --border: #2e2e2e;
    --border-strong: #444444;
    --muted: #888888;
    --subtle: #555555;

    --color-high: #5cb85c;
    --color-med: #f0c040;
    --color-low: #888888;
    --color-explore: #e57348;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.65;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Links ── */
a { color: var(--fg); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: opacity var(--transition); }
a:hover { opacity: 0.6; }

/* ── Container ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-6); }

/* ── Typography ── */
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; margin-bottom: var(--s-4); }
h2 { font-size: 0.75rem; margin-bottom: var(--s-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; color: var(--muted); }
h3 { font-size: 1rem; margin-bottom: var(--s-2); }

.lead { font-size: 1rem; color: var(--muted); margin-bottom: var(--s-8); line-height: 1.5; }

/* ── Header ── */
header {
    border-bottom: 2px solid var(--fg);
    padding: var(--s-4) 0;
    margin-bottom: var(--s-8);
}
header nav { display: flex; align-items: center; justify-content: space-between; }
.nav-brand {
    font-weight: 600; font-size: 0.9375rem; text-decoration: none;
    color: var(--fg); letter-spacing: 0.15em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: var(--s-5); }
.nav-links a {
    color: var(--muted); text-decoration: none; font-size: 0.8125rem;
    font-weight: 400; letter-spacing: 0.01em; transition: color var(--transition);
}
.nav-links a:hover { color: var(--fg); opacity: 1; }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: var(--s-6) 0;
    margin-top: var(--s-16);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.01em;
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1.25rem; font-family: var(--font);
    font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.02em;
    color: var(--bg); background: var(--fg); border: 1px solid var(--fg);
    border-radius: var(--radius); cursor: pointer; text-decoration: none;
    transition: all var(--transition); white-space: nowrap;
}
.btn:hover { opacity: 0.8; }
.btn-outline {
    color: var(--fg); background: transparent; border-color: var(--border);
}
.btn-outline:hover { border-color: var(--fg); opacity: 1; }
.btn-sm { padding: 0.3125rem 0.75rem; font-size: 0.75rem; }

/* ── Theme toggle ── */
.theme-toggle {
    background: none; border: none; cursor: pointer;
    font-size: 0.9375rem; font-weight: 500; padding: 0.375rem 0;
    color: var(--muted); display: flex; align-items: center; gap: 0.3125rem;
    font-family: var(--font); transition: color var(--transition);
}
.theme-toggle:hover { color: var(--fg); }
.theme-text { font-weight: 400; font-size: 0.8125rem; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-light { display: none; }
    :root:not([data-theme="light"]) .theme-icon-dark { display: inline; }
}

/* ── Forms ── */
.form-group { margin-bottom: var(--s-4); }
.form-group label {
    display: block; font-size: 0.8125rem; font-weight: 500;
    margin-bottom: var(--s-1); letter-spacing: 0.01em;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

textarea, input[type="text"] {
    width: 100%; padding: var(--s-3); font-family: var(--font);
    font-size: 0.875rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--bg); color: var(--fg);
    transition: border-color var(--transition);
}
textarea:focus, input[type="text"]:focus {
    outline: none; border-color: var(--fg);
}
textarea { resize: vertical; min-height: 10rem; line-height: 1.6; }

/* ── Flash messages ── */
.flash {
    padding: var(--s-3) var(--s-4); border-radius: var(--radius);
    margin-bottom: var(--s-4); font-size: 0.8125rem;
    border-left: 3px solid var(--border-strong); background: var(--bg-alt);
}
.flash-error { border-left-color: var(--color-danger); color: var(--color-danger); }
.flash-warning { border-left-color: var(--color-med); }
.flash-success { border-left-color: var(--color-high); }

/* ── Hero ── */
.hero { padding: var(--s-10) 0 var(--s-4); text-align: center; }
.hero h1 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: var(--s-2); }
.counter { font-size: 0.875rem; color: var(--muted); margin-top: var(--s-2); }

/* ── Upload section ── */
.upload-section { padding-bottom: var(--s-12); }

/* ── Input tabs ── */
.input-tabs { display: flex; gap: 0; margin-bottom: var(--s-4); border-bottom: 1px solid var(--border); }
.tab-btn {
    padding: var(--s-2) var(--s-5); font-family: var(--font);
    font-size: 0.8125rem; font-weight: 500; background: none;
    border: none; border-bottom: 2px solid transparent;
    color: var(--muted); cursor: pointer; transition: all var(--transition);
}
.tab-btn--active { color: var(--fg); border-bottom-color: var(--fg); }
.tab-btn:hover { color: var(--fg); }
.tab-panel { display: none; }
.tab-panel--active { display: block; }

/* ── Dropzone ── */
.dropzone {
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    padding: var(--s-10) var(--s-6); text-align: center;
    transition: all var(--transition); background: var(--bg-alt);
}
.dropzone:hover { border-color: var(--fg); }
.dropzone--active { border-color: var(--fg); border-style: solid; background: var(--bg); }
.dropzone p { margin-bottom: var(--s-2); font-size: 0.875rem; }
.dropzone-btn { margin: var(--s-2) 0; cursor: pointer; }
.file-name { font-size: 0.8125rem; font-weight: 600; color: var(--fg); margin-top: var(--s-2); }

/* ── Consent ── */
.consent-group { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.checkbox-label {
    display: flex; align-items: flex-start; gap: var(--s-2);
    cursor: pointer; font-size: 0.8125rem;
}
.checkbox-label input { margin-top: 0.1875rem; accent-color: var(--fg); }

/* ── Cards ── */
.card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: var(--s-5); margin-bottom: var(--s-3);
    background: var(--bg-elevated); transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-strong); }

/* ── Meta text ── */
.meta { font-size: 0.8125rem; color: var(--muted); margin-bottom: var(--s-2); }
.help-text { font-size: 0.75rem; color: var(--muted); margin-top: var(--s-1); }
.ref { font-size: 0.75rem; color: var(--muted); font-style: italic; }
.warning-text { font-size: 0.8125rem; color: var(--color-danger); font-weight: 500; }

/* ═══ SORT PROFILE TABLE ═══ */
.sort-table { width: 100%; border-collapse: collapse; margin: var(--s-4) 0; }
.sort-table th {
    font-size: 0.625rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--muted); text-align: center;
    padding: var(--s-2) var(--s-2); border-bottom: 2px solid var(--fg);
}
.sort-table th:first-child { text-align: left; }
.sort-table td {
    padding: var(--s-3) var(--s-2); text-align: center; vertical-align: middle;
    font-size: 0.875rem;
}
.sort-table td:first-child { text-align: left; font-weight: 500; font-size: 0.8125rem; }
.sort-table tr { border-bottom: 1px solid var(--border); }
.sort-table tbody tr:hover { background: var(--bg-alt); }

/* ── SORT indicators (colored circles) ── */
.sort-indicator {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    font-size: 0.6875rem; font-weight: 600; color: var(--white);
    transition: transform var(--transition);
}
.sort-indicator:hover { transform: scale(1.1); }
.sort-indicator--high { background: var(--color-high); }
.sort-indicator--med { background: var(--color-med); color: var(--black); }
.sort-indicator--low { background: var(--color-low); }
.sort-indicator--sm { width: 1.625rem; height: 1.625rem; font-size: 0.5625rem; }

/* ── Category badges ── */
.badge {
    display: inline-block; font-size: 0.5625rem; font-weight: 600;
    padding: 0.1875rem 0.5rem; border-radius: 2px;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.badge--rutinmassig { background: var(--color-low); color: var(--white); }
.badge--inkrementell { background: var(--color-med); color: var(--black); }
.badge--utforskande { background: var(--color-explore); color: var(--white); }
.badge--transformativ { background: var(--color-high); color: var(--white); }

/* Punkt type badges – monochrome variants */
.badge--information { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }
.badge--beslut { background: var(--fg); color: var(--bg); }
.badge--diskussion { background: var(--bg-alt); color: var(--fg); border: 1px solid var(--border-strong); }
.badge--ovrigt { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }

/* ═══ AGENDA OVERVIEW ═══ */
.agenda-header { margin-bottom: var(--s-6); }
.punkt-list { margin-bottom: var(--s-6); }
.punkt-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--s-4); gap: var(--s-4);
}
.punkt-card__header { display: flex; align-items: center; gap: var(--s-4); flex: 1; }
.punkt-card__content { flex: 1; }
.punkt-card--assessed { border-left: 3px solid var(--color-high); }
.punkt-number {
    font-size: 0.75rem; font-weight: 600; color: var(--subtle);
    min-width: 1.75rem; text-align: center;
    font-variant-numeric: tabular-nums;
}
.punkt-text { font-size: 0.875rem; margin-bottom: var(--s-1); line-height: 1.4; }
.agenda-actions { display: flex; gap: var(--s-3); align-items: center; }
.inline-form { display: inline; }

/* ═══ ASSESSMENT (COMPACT) ═══ */
.punkt-title {
    font-style: italic; font-weight: 400; font-size: 1.5rem;
    margin-bottom: var(--s-8); line-height: 1.3;
    border-left: 3px solid var(--fg); padding-left: var(--s-4);
}
.bedom-form h2 { margin-top: var(--s-8); margin-bottom: var(--s-3); }

/* Mode toggle (NLP / Manuell) */
.mode-toggle {
    display: flex; gap: 0; margin: var(--s-4) 0 var(--s-2);
    border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; width: fit-content;
}
.mode-btn {
    padding: var(--s-2) var(--s-5); border: none; cursor: pointer;
    font-family: inherit; font-size: 0.8125rem; font-weight: 500;
    background: var(--bg-alt); color: var(--muted);
    transition: background 0.15s, color 0.15s;
}
.mode-btn + .mode-btn { border-left: 1px solid var(--border-strong); }
.mode-btn:hover { color: var(--fg); }
.mode-btn--active {
    background: var(--fg); color: var(--bg);
}

.dim-table { display: flex; flex-direction: column; }
.dim-row {
    display: grid;
    grid-template-columns: 10rem 7rem 1fr 7rem 2.5rem;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.dim-row:hover { background: var(--bg-alt); }
.dim-label { display: flex; align-items: baseline; gap: var(--s-2); }
.dim-key {
    font-weight: 600; font-size: 0.875rem; min-width: 1.5rem;
    color: var(--muted);
}
.dim-name { font-size: 0.8125rem; font-weight: 500; }
/* ── Dimension tooltips ── */
.dim-info {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1rem; height: 1rem; border-radius: 50%;
    border: 1px solid var(--border-strong); color: var(--muted);
    font-size: 0.5625rem; font-weight: 600; cursor: help;
    position: relative; vertical-align: middle; margin-left: var(--s-1);
    transition: all var(--transition);
}
.dim-info:hover, .dim-info:focus { border-color: var(--fg); color: var(--fg); outline: none; }
.dim-tooltip {
    display: none; position: absolute; left: calc(100% + var(--s-2)); top: 50%;
    transform: translateY(-50%);
    background: var(--fg); color: var(--bg); font-size: 0.75rem; font-weight: 400;
    padding: var(--s-2) var(--s-3); border-radius: var(--radius);
    width: 16rem; line-height: 1.4; z-index: 10;
    white-space: normal; text-transform: none; letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.dim-info:hover .dim-tooltip,
.dim-info:focus .dim-tooltip { display: block; }

.dim-lo, .dim-hi { font-size: 0.5625rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3; }
.dim-lo { text-align: right; }
.dim-val {
    font-weight: 600; font-size: 1.125rem; text-align: right;
    font-variant-numeric: tabular-nums; min-width: 2.5rem;
}

input[type="range"] {
    width: 100%; height: 3px; -webkit-appearance: none; appearance: none;
    background: var(--border); border-radius: 2px; outline: none;
    transition: background var(--transition);
}
input[type="range"]:hover { background: var(--border-strong); }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 1rem; height: 1rem;
    background: var(--fg); border-radius: 50%; cursor: pointer;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
    width: 1rem; height: 1rem; background: var(--fg);
    border-radius: 50%; cursor: pointer; border: none;
}

.bedom-actions {
    display: flex; justify-content: space-between; margin-top: var(--s-8);
    padding-top: var(--s-4); border-top: 2px solid var(--fg);
}
.bedom-actions--end { justify-content: flex-end; }

/* ── Input variants ── */
.input-code { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }

/* ═══ RESULTS ═══ */
.summary-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3);
    margin-bottom: var(--s-6);
}
.summary-card { text-align: center; padding: var(--s-4); }
.summary-count {
    display: block; font-size: 2.5rem; font-weight: 600;
    margin: var(--s-2) 0; font-variant-numeric: tabular-nums;
    line-height: 1;
}
.summary-pct { font-size: 0.75rem; color: var(--muted); }

.result-card { margin-bottom: var(--s-4); }
.result-charts {
    display: flex; gap: var(--s-6); margin: var(--s-4) 0;
    justify-content: center;
}
.chart-container { width: 180px; height: 180px; }
.result-scores { margin: var(--s-2) 0; }
.score-row { margin-bottom: var(--s-1); font-size: 0.8125rem; }
.score-chip {
    display: inline-block; padding: 0.125rem 0.375rem;
    background: var(--bg-alt); border-radius: 2px;
    font-size: 0.6875rem; font-weight: 600; margin-right: var(--s-1);
    font-variant-numeric: tabular-nums;
}
/* ── Legend ── */
.legend { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.legend-item {
    display: inline-flex; align-items: center; gap: var(--s-2);
    font-size: 0.75rem; font-weight: 500;
}
.legend-item::before {
    content: ''; width: 0.75rem; height: 0.75rem;
    border-radius: 50%; flex-shrink: 0;
}
.legend-item.dot--high::before { background: var(--color-high); }
.legend-item.dot--med::before { background: var(--color-med); }
.legend-item.dot--low::before { background: var(--color-low); }
.legend-label { font-size: 0.75rem; color: var(--muted); }

/* ── Color dots (reusable) ── */
.dot {
    display: inline-block;
    width: 0.75rem; height: 0.75rem;
    border-radius: 50%; flex-shrink: 0;
}
.dot--high { background: var(--color-high); }
.dot--med { background: var(--color-med); }
.dot--low { background: var(--color-low); }
.dot--explore { background: var(--color-explore); }
.dot--danger { background: var(--color-danger); }
.dot--sm { width: 0.5rem; height: 0.5rem; }
.dot--lg { width: 1rem; height: 1rem; }

.recommendation {
    margin-top: var(--s-4); padding-top: var(--s-4);
    border-top: 1px solid var(--border);
}
.recommendation h4 {
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--s-2);
}
.nuances { font-size: 0.8125rem; padding-left: var(--s-5); line-height: 1.5; }
.nuances li { margin-bottom: var(--s-1); }

.resultat-actions {
    display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-8);
    padding-top: var(--s-4); border-top: 1px solid var(--border);
}

/* ── Feedback ── */
.feedback-section {
    max-width: 28rem; margin: var(--s-12) auto 0; text-align: center;
    padding-top: var(--s-8); border-top: 1px solid var(--border);
}
.feedback-heading { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; color: var(--muted); margin-bottom: var(--s-4); }
.feedback-rating { display: flex; gap: var(--s-1); justify-content: center; margin-bottom: var(--s-1); direction: rtl; }
.feedback-rating-option { cursor: pointer; }
.feedback-rating-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.feedback-rating-label {
    display: block; font-size: 1.75rem; line-height: 1;
    color: var(--border); transition: color var(--transition);
}
.feedback-rating-option:hover .feedback-rating-label,
.feedback-rating-option:hover ~ .feedback-rating-option .feedback-rating-label { color: var(--fg); }
.feedback-rating-option:has(input:checked) .feedback-rating-label,
.feedback-rating-option:has(input:checked) ~ .feedback-rating-option .feedback-rating-label { color: var(--fg); }
.feedback-scale { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--muted); margin-bottom: var(--s-4); padding: 0 var(--s-1); }
.feedback-section textarea { width: 100%; margin-bottom: var(--s-3); }
.feedback-submit { width: 100%; }

/* ═══ TEAM ═══ */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.session-share {
    padding: var(--s-5); background: var(--bg-alt);
    border: 1px solid var(--border); border-radius: var(--radius);
    margin: var(--s-6) 0;
}
.share-url-row { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.share-input {
    flex: 1; font-size: 0.8125rem; padding: var(--s-2) var(--s-3);
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--fg); font-family: var(--font);
}
.code-label { font-size: 0.75rem; color: var(--muted); display: block; }
.participant-list { list-style: none; padding: 0; }
.participant-list li {
    padding: var(--s-2) 0; border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
}
.lobby-actions { margin-top: var(--s-6); }

/* ── Divergence ── */
.divergence-high { background: rgba(183, 28, 28, 0.05); }
.divergence-med { background: rgba(230, 168, 23, 0.06); }
.spread-bar {
    display: inline-block; height: 4px; background: var(--fg);
    border-radius: 2px; vertical-align: middle; margin-right: var(--s-1);
    min-width: 2px; transition: width var(--transition);
    width: calc(attr(data-spread type(<number>), 0) * 20%);
}
/* Fallback for browsers without attr() type support */
.spread-bar[data-spread="1"] { width: 20%; }
.spread-bar[data-spread="2"] { width: 40%; }
.spread-bar[data-spread="3"] { width: 60%; }
.spread-bar[data-spread="4"] { width: 80%; }
.spread-bar[data-spread="5"] { width: 100%; }
.divergence-note {
    font-size: 0.8125rem; font-weight: 500; color: var(--color-danger);
    margin-top: var(--s-3); padding: var(--s-2) var(--s-3);
    border-left: 3px solid var(--color-danger); background: rgba(183, 28, 28, 0.03);
}

/* ═══ HISTORIK ═══ */
.filter-bar {
    display: flex; align-items: center; gap: var(--s-4);
    margin-bottom: var(--s-6);
}
.filter-bar label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.filter-bar select {
    font-family: var(--font); font-size: 0.8125rem;
    padding: var(--s-2) var(--s-3); border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--bg); color: var(--fg);
}

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.compare-summary { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-3); }
.sort-table--compact { font-size: 0.75rem; }
.sort-table--compact td, .sort-table--compact th { padding: var(--s-1); }

.jamfor-bar { margin-top: var(--s-4); display: none; }
.jamfor-bar--visible { display: block; }
.chart-container--wide { width: 100%; max-width: 100%; margin: var(--s-6) 0; }

/* ── Om page ── */
.om .lead { max-width: 42rem; }
.om-group-intro { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--s-4); }

.om-categories { margin-top: var(--s-12); }
.om-categories > p { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--s-6); }
.om-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.om-cat {
    padding: var(--s-4); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.om-cat .badge { margin-bottom: var(--s-2); }
.om-cat p { font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }

.om-insight { margin-top: var(--s-12); }
.om-insight blockquote {
    margin: var(--s-4) 0 0; padding: var(--s-5) var(--s-6);
    border-left: 3px solid var(--fg); font-size: 0.9375rem;
    line-height: 1.65; font-style: italic; color: var(--muted);
}

.om-links { margin-top: var(--s-12); }
.om-links ul { padding-left: var(--s-6); margin: var(--s-3) 0 var(--s-4); }
.om-links li { font-size: 0.875rem; margin-bottom: var(--s-2); line-height: 1.5; }

.om-about { margin-top: var(--s-12); padding-top: var(--s-8); border-top: 1px solid var(--border); }
.om-about p { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--s-3); }

@media (max-width: 640px) {
    .om-cat-grid { grid-template-columns: 1fr; }
}

/* ── Metod page ── */
.metod .lead { max-width: 38rem; }

.metod-grid { display: flex; flex-direction: column; gap: var(--s-12); margin-top: var(--s-8); }

.metod-group-header {
    display: flex; align-items: baseline; gap: var(--s-4);
    padding-bottom: var(--s-3); border-bottom: 2px solid var(--fg);
    margin-bottom: var(--s-6);
}
.metod-group-label {
    font-size: 1.5rem; font-weight: 600; letter-spacing: 0.08em;
}
.metod-group-desc {
    font-size: 0.8125rem; color: var(--muted); font-weight: 400;
}

.metod-dimensions { display: flex; flex-direction: column; }

.metod-dim {
    display: grid; grid-template-columns: 3.5rem 1fr;
    gap: 0 var(--s-4);
    padding: var(--s-5) 0;
    border-bottom: 1px solid var(--border);
}
.metod-dim:last-child { border-bottom: none; }

.metod-letter {
    font-size: 2rem; font-weight: 600; letter-spacing: -0.02em;
    line-height: 1; padding-top: 0.15rem;
    text-align: right;
}
.metod-dim-body h3 { margin-bottom: var(--s-2); }
.metod-dim-body p { font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }
.metod-dim-body .ref { margin-top: var(--s-2); font-size: 0.6875rem; }

.metod-references { margin-top: var(--s-12); padding-top: var(--s-8); border-top: 1px solid var(--border); }

@media (max-width: 640px) {
    .metod-dim { grid-template-columns: 2.5rem 1fr; }
    .metod-letter { font-size: 1.5rem; }
    .metod-group-header { flex-direction: column; gap: var(--s-1); }
}

/* ── References ── */
.references { list-style: none; padding: 0; }
.references li {
    font-size: 0.8125rem; margin-bottom: var(--s-2);
    padding-left: var(--s-6); text-indent: calc(-1 * var(--s-6));
    line-height: 1.5;
}

/* ═══ VERSION TIMELINE ═══ */
.version-timeline { position: relative; padding-left: var(--s-6); }
.version-timeline::before {
    content: ''; position: absolute; left: 0.75rem; top: 0; bottom: 0;
    width: 2px; background: var(--border);
}
.version-card { position: relative; }
.version-card::before {
    content: ''; position: absolute; left: calc(-1 * var(--s-6) + 0.5rem);
    top: var(--s-5); width: 0.625rem; height: 0.625rem;
    border-radius: 50%; background: var(--border-strong); z-index: 1;
}
.version-card--current::before { background: var(--fg); }
.version-header { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }
.version-number { font-weight: 600; font-size: 0.875rem; }
.version-stats { font-size: 0.8125rem; color: var(--muted); display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
.version-actions { display: flex; gap: var(--s-2); }

/* ═══ ÖVERSIKT ═══ */
.oversikt-cats { margin: var(--s-4) 0; }
.oversikt-cat-row { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }
.oversikt-cat-row .badge { min-width: 7rem; text-align: center; }
.oversikt-bar-track {
    flex: 1; height: 1.25rem; background: var(--bg-alt);
    border-radius: var(--radius); overflow: hidden;
}
.oversikt-bar { height: 100%; border-radius: var(--radius); transition: width 0.5s ease; }
.oversikt-bar--transformativ { background: var(--color-high); }
.oversikt-bar--utforskande { background: var(--color-explore); }
.oversikt-bar--inkrementell { background: var(--color-med); }
.oversikt-bar--rutinmassig { background: var(--color-low); }
.oversikt-count { font-size: 0.875rem; font-weight: 600; min-width: 2rem; text-align: right; }

/* ═══ LOADING OVERLAY ═══ */
.loading-overlay {
    display: none; position: fixed; inset: 0; z-index: 100;
    background: rgba(0, 0, 0, 0.92);
    flex-direction: column; align-items: center; justify-content: center;
}
.loading-overlay--visible { display: flex; }
.loading-text {
    font-size: 1.125rem; font-weight: 500; color: var(--white);
    margin-top: var(--s-6); margin-bottom: var(--s-4);
}
.spinner {
    width: 2.5rem; height: 2.5rem;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-steps { text-align: left; }
.loading-step {
    font-size: 0.8125rem; color: rgba(255, 255, 255, 0.3);
    padding: var(--s-1) 0; transition: color 0.3s;
}
.loading-step--visible { color: rgba(255, 255, 255, 0.9); }
.loading-elapsed {
    font-size: 0.75rem; color: rgba(255, 255, 255, 0.4);
    margin-top: var(--s-4);
}

/* ═══ PRINT ═══ */
@media print {
    header, footer, .bedom-actions, .resultat-actions,
    .feedback-section, .theme-toggle, .btn, .btn-sm, .btn-outline { display: none !important; }
    body { background: white; color: black; font-size: 11pt; }
    .sort-indicator { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
    .container { padding: 0 var(--s-4); }
    .form-row { grid-template-columns: 1fr; }
    h1 { font-size: 1.375rem; }
    .hero h1 { font-size: 1.5rem; }
    .sort-table { font-size: 0.75rem; }
    .sort-table th { font-size: 0.5625rem; }
    .sort-indicator { width: 1.75rem; height: 1.75rem; font-size: 0.5625rem; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .dim-row { grid-template-columns: 7rem 1fr 2.5rem; }
    .dim-lo, .dim-hi { display: none; }
    .punkt-card { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
    .punkt-card__actions { margin-top: var(--s-2); }
    .team-grid { grid-template-columns: 1fr; }
    .compare-grid { grid-template-columns: 1fr; }
    .result-charts { flex-direction: column; align-items: center; }
}
