:root {
    --bg: #0b1020;
    --card: rgba(255, 255, 255, 0.06);
    --card2: rgba(255, 255, 255, 0.08);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.65);
    --line1: #6ee7ff;
    --line2: #fbbf24;
    --point: #a7f3d0;
    --grid: rgba(255, 255, 255, 0.08);
    --axis: rgba(255, 255, 255, 0.35);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(1200px 800px at 20% 10%, #15204a 0%, var(--bg) 55%);
    color: var(--text);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    gap: 12px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background: rgba(11, 16, 32, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--line1), var(--line2));
    box-shadow: 0 0 18px rgba(110, 231, 255, 0.35);
}

.title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.subtitle {
    font-size: 12.5px;
    color: var(--muted);
}

.status {
    font-size: 12.5px;
    color: var(--muted);
}

.layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.panel {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.panel h2 {
    margin: 8px 0 6px;
    font-size: 15px;
}

hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 14px 0;
}

.equation {
    font-family: var(--mono);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 10px 10px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.92);
}

.control {
    margin: 10px 0;
}

.control label {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 6px;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.row-wrap {
    flex-wrap: wrap;
}

input[type="number"] {
    width: 110px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-family: var(--mono);
}

input[type="range"] {
    flex: 1;
    accent-color: rgba(255, 255, 255, 0.85);
}

.btn {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    cursor: pointer;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.intersection {
    margin-top: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.intersection-title {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 6px;
}

.intersection-body {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.35;
}

.workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.graph-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.graph-toolbar {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.legend {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chip {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.18);
}

.chip1 {
    border-color: color-mix(in srgb, var(--line1) 40%, transparent);
}

.chip2 {
    border-color: color-mix(in srgb, var(--line2) 40%, transparent);
}

.chipP {
    border-color: color-mix(in srgb, var(--point) 40%, transparent);
}

.small {
    font-size: 12.5px;
    color: var(--muted);
    font-family: var(--mono);
}

.graph-wrap {
    padding: 10px;
}

#graph {
    width: 100%;
    height: auto;
    display: block;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    cursor: grab;
}

#graph:active {
    cursor: grabbing;
}

.tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.table-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-title {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
}

th,
td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
}

th {
    color: var(--muted);
    text-align: left;
    font-weight: 600;
}

@media (max-width: 1000px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .tables {
        grid-template-columns: 1fr;
    }
}

/* bestaande styles grotendeels identiek */

h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.kleur {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.kleur1 {
    background: var(--line1);
}

.kleur2 {
    background: var(--line2);
}

.primary {
    width: 100%;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.16);
}

.graph-card {
    padding: 10px;
}

.control-row {
    align-items: flex-start;
    gap: 18px;
}

.control-inline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.table-inline {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow-x: auto;
}

.table-inline table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
}

.table-inline th {
    color: var(--muted);
    font-weight: 600;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
}

.table-inline td {
    text-align: center;
    padding: 8px 10px;
    font-size: 12.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.table-inline thead tr {
    background: rgba(255, 255, 255, 0.04);
}

.table-inline tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-inline td {
    cursor: pointer;
    transition: background 0.15s;
}

.table-inline td:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* .table-inline td.selected {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
} */

.table-inline td.selected {
    box-shadow: inset 0 0 0 2px currentColor;
    background: rgba(255, 255, 255, 0.06);
}

.table-inline td {
    transition: background 0.15s, box-shadow 0.15s;
}