* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Manrope, sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  background: var(--ink);
  color: #edf3f6;
  padding: 28px 18px 24px;
  overflow: auto;
  z-index: 20;
}
.brand {
  display: block;
  margin: 0 10px 28px;
  color: white;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 15px;
}
.season-switcher { padding: 0 10px 22px; }
.eyebrow, .kicker, .tree-season, .nav-section-label, .table-label, .condition span, .facts dt, .context-bar span, .card-info label {
  font-family: "DM Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow { display: block; color: var(--mist); font-size: 10px; margin-bottom: 6px; }
.season-switcher strong { display: block; font-size: 18px; font-weight: 700; }
.main-nav { display: grid; gap: 2px; }
.nav-link, .tree-node, .tree-season, .tree-group, .add-inline {
  width: 100%;
  border: 0;
  background: transparent;
  color: #d5e2ea;
  text-align: left;
  border-radius: 10px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-weight: 650;
}
.nav-link.is-active, .nav-link:hover, .tree-node:hover, .tree-season:hover, .tree-group:hover { background: rgba(169, 199, 216, 0.12); color: white; }
.nav-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nav-section-label {
  display: block;
  margin: 22px 12px 8px;
  color: var(--mist);
  font-size: 10px;
}
.tree-season, .tree-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--mist);
  font-size: 11px;
}
.tree-group { color: #edf3f6; font-family: Manrope, sans-serif; letter-spacing: 0; text-transform: none; font-weight: 700; font-size: 14px; }
.tree-stage { margin-top: 2px; }
.tree-node { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-weight: 600; }
.stage-node { font-weight: 700; }
.tree-days { margin-left: 16px; }
.tree-sessions { margin: 2px 0 6px 18px; display: grid; gap: 1px; }
.session-node { color: #c5d5df; font-weight: 550; }
.tree-node.is-selected { color: white; background: rgba(62, 111, 143, 0.45); }
.tree-node i, .twisty { width: 14px; color: var(--mist); font-style: normal; flex: none; }
.tree-empty { margin: 4px 16px 8px; color: var(--mist); font-size: 12px; }
.add-inline {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border: 1px dashed rgba(169, 199, 216, 0.45);
  color: var(--wash);
}
.workspace { margin-left: 292px; min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 36px;
  background: rgba(247, 249, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.menu-toggle, .sidebar-backdrop { display: none; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue);
  font-weight: 700;
}
.breadcrumb button:last-child { color: var(--ink); }
.crumb-sep { color: var(--mist); }
#screen { max-width: 1180px; padding: 32px 36px 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.kicker { color: var(--blue); font-size: 11px; margin-bottom: 6px; }
.page-heading h1 { font-size: 40px; line-height: 1.05; letter-spacing: -0.04em; font-weight: 750; }
.subtitle { margin-top: 8px; color: var(--muted); }
.page-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.primary-button, .ghost-button, .danger-button, .quiet-button {
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  font-weight: 750;
}
.primary-button { background: var(--accent); color: white; }
.ghost-button, .quiet-button { background: white; border-color: var(--line); }
.danger-button { background: white; color: var(--bad); border-color: #efd5d2; }
.danger-button.solid { background: var(--bad); color: white; border-color: var(--bad); }
.quiet-button { background: transparent; }
.path, .context-bar, .panel, .stat-card, .ski-card, .entity-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.path { display: flex; gap: 10px; align-items: center; padding: 14px 16px; margin-bottom: 16px; color: var(--blue); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; }
.path b { color: var(--mist); font-weight: 500; }
.stats-grid, .split, .card-grid, .ski-cards, .condition-grid { display: grid; gap: 14px; }
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.stat-card { padding: 18px; min-height: 132px; display: flex; flex-direction: column; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { margin: 14px 0 6px; font-size: 34px; letter-spacing: -0.04em; line-height: 1; }
.context-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; padding: 18px 20px; margin-bottom: 16px; }
.context-bar span { color: var(--muted); font-size: 10px; }
.context-bar strong { display: block; margin-top: 4px; font-size: 18px; }
.context-bar p { grid-column: 1 / -1; margin: 6px 0 0; color: var(--blue); font-weight: 700; }
.text-button { border: 0; background: transparent; padding: 0; font-weight: 750; font-size: 18px; }
.panel { padding: 20px 22px; margin-bottom: 16px; }
.panel-head, .panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel h2 { font-size: 22px; letter-spacing: -0.03em; }
.panel-note { color: var(--muted); margin: 8px 0 14px; }
.stack { display: grid; margin-top: 8px; }
.work-row, .timeline-item, .table-row { display: grid; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.work-row { grid-template-columns: 1fr auto; }
.work-row strong, .work-row small, .timeline-item strong, .timeline-item small { display: block; }
.work-row small, .timeline-item small, .empty-state, .form-note { color: var(--muted); }
.work-row small, .timeline-item small { margin-top: 3px; }
.timeline-item { grid-template-columns: 72px 1fr; }
.split { grid-template-columns: 1fr 1.2fr; align-items: start; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin: 16px 0 0; }
.facts div { padding-top: 12px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 10px; }
.facts dd { margin: 4px 0 0; font-size: 20px; font-weight: 750; letter-spacing: -0.03em; }
.condition-grid { grid-template-columns: 1fr 1fr; margin-top: 14px; }
.condition { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.condition i { grid-row: 1 / span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--wash); color: var(--blue); }
.condition svg { width: 18px; height: 18px; }
.condition span { font-size: 10px; color: var(--muted); }
.condition strong { font-size: 16px; }
.table-wrap { overflow-x: auto; }
.table-row { grid-template-columns: 48px 80px 1.3fr 0.8fr 0.9fr 0.8fr auto; min-width: 720px; }
.table-row.athletes { grid-template-columns: 1.4fr 0.8fr 1.2fr 0.6fr; min-width: 560px; }
.table-row.analysis { grid-template-columns: 1.2fr 0.7fr 1fr 0.8fr 0.9fr 0.7fr 0.9fr 0.8fr; min-width: 920px; }
.table-label { border: 0; color: var(--muted); font-size: 10px; padding-bottom: 0; }
.delta.positive { color: var(--good); }
.delta.negative { color: var(--bad); }
.inventory-tools { display: flex; gap: 12px; align-items: end; margin-bottom: 16px; flex-wrap: wrap; }
.table-tools { justify-content: space-between; width: 100%; }
.ski-run-details { margin: 0 0 8px 8px; }
.ski-run-line { display: grid; grid-template-columns: 92px 1fr 1fr 0.45fr 0.7fr 0.7fr 1.4fr; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; padding: 6px 0; border-top: 1px dashed var(--line); }
.ski-run-label { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.park-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.park-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.park-filters select { border: 1px solid var(--line); background: white; border-radius: 12px; padding: 10px 12px; min-width: 160px; }
.park-head, .park-row { display: grid; grid-template-columns: 0.8fr 1.4fr 1.3fr 1fr 0.8fr; gap: 12px; align-items: center; min-width: 760px; }
.keep-space, .facts dd { white-space: pre-wrap; }
.park-head { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 0 12px 8px; }
.park-row { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; padding: 16px 12px; cursor: pointer; }
.park-row:hover { background: var(--wash); }
.park-row strong { font-size: 18px; letter-spacing: -0.03em; }
.prep-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-top: 12px; background: white; }
.prep-card header, .prep-card footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prep-card h3 { font-size: 20px; letter-spacing: -0.03em; margin-top: 4px; }
.prep-date { color: var(--blue); font-family: "DM Mono", monospace; font-size: 13px; }
.prep-num { color: var(--muted); font-family: "DM Mono", monospace; font-size: 16px; }
.prep-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 14px 0; }
.prep-card dt { color: var(--muted); font-size: 12px; }
.prep-card dd { margin: 2px 0 0; font-weight: 750; }
.prep-card footer { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); }
.active-prep { background: var(--wash); border-radius: 16px; padding: 8px 8px 16px; }
.active-prep h2 { margin: 4px 0; }
.active-count { margin: 8px 0 14px; font-weight: 750; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--muted); }
.search-box input { border: 0; outline: 0; width: 100%; background: transparent; }
.segmented { display: flex; gap: 4px; padding: 4px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.segmented button { border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; color: var(--muted); }
.segmented .selected { background: var(--wash); color: var(--ink); font-weight: 800; }
.ski-cards, .card-grid { grid-template-columns: repeat(3, 1fr); }
.ski-card, .entity-card { padding: 8px 8px 12px; }
.card-hit { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.ski-badge { min-width: 36px; height: 28px; padding: 0 8px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--wash); color: var(--blue); font-family: "DM Mono", monospace; font-size: 12px; }
.ski-badge.sl { background: #f8e7d4; color: #9a5416; }
.ski-badge.gs { background: var(--wash); color: var(--blue); }
.ski-badge.sg { background: #d9e6ef; color: #1d4e6e; }
.ski-badge.dh { background: var(--ink); color: white; }
.tag { border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 750; }
.tag.ok { background: #e5f4ea; color: var(--good); }
.tag.watch { background: #fff1e4; color: #a85b16; }
.ski-card h3, .entity-card h3 { margin: 14px 0 4px; font-size: 28px; letter-spacing: -0.04em; }
.card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-info label { display: block; color: var(--muted); font-size: 10px; }
.tech-lines { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.tech-lines li { font-size: 14px; }
.tech-lines li:first-child { font-weight: 750; }
.tech-empty { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--wash); color: var(--blue); font-weight: 800; }
.note-panel p:last-child { margin-top: 8px; }
.ski-card .row-actions, .entity-card .row-actions { padding: 0 10px; }
.empty-state { padding: 16px 0; }
dialog {
  width: min(640px, calc(100vw - 28px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: var(--shadow);
  color: var(--ink);
}
dialog.wide { width: min(960px, calc(100vw - 28px)); }
dialog::backdrop { background: rgba(23, 42, 58, 0.46); backdrop-filter: blur(6px); }
dialog form { display: flex; flex-direction: column; max-height: min(92vh, 880px); }
.modal-header, .modal-footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px 26px; }
.modal-header { align-items: flex-start; }
.modal-footer { border-top: 1px solid var(--line); }
.modal-header h2 { font-size: 30px; letter-spacing: -0.04em; margin-top: 4px; }
.modal-context { color: var(--muted); margin-top: 6px; }
.modal-close { border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; }
.modal-body { overflow: auto; padding: 0 26px 8px; }
.modal-section { padding: 18px 0; border-top: 1px solid var(--line); }
.modal-section h3 { margin-bottom: 14px; color: var(--blue); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-family: "DM Mono", monospace; font-weight: 500; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.modal-grid.one { grid-template-columns: 1fr; }
.field { display: grid; gap: 8px; }
.field[hidden] { display: none; }
.field span { color: var(--muted); font-size: 13px; font-weight: 700; }
.req { color: var(--accent); font-style: normal; }
.field-wide { grid-column: 1 / -1; }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.check-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: white; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.check-row span { color: var(--ink); font-size: 14px; font-weight: 650; }
.holders { margin-top: 10px; color: var(--blue); font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(62, 111, 143, 0.12); }
.deps { margin: 8px 0 16px; padding-left: 18px; }
.deps li { margin: 4px 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.analysis-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; margin-top: 10px; }
.analysis-chrono { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.analysis-chrono label, .ski-filter { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.analysis-chrono select:disabled { opacity: 0.55; }
.brand-mark { display: inline-grid; place-items: center; min-width: 46px; padding: 2px 8px; border: 1px solid; border-radius: 8px; font-family: "DM Mono", ui-monospace, monospace; font-size: 12px; font-weight: 700; line-height: 1.45; letter-spacing: 0; }
button.brand-mark { cursor: pointer; }
.ski-picker { position: relative; }
.ski-picker-button, .ski-inline { display: flex; align-items: center; gap: 8px; }
.brand-swatch { width: 14px; height: 14px; border: 1px solid; border-radius: 4px; flex: 0 0 auto; }
.ski-picker-button { width: 100%; min-height: 38px; text-align: left; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 6px 10px; color: var(--ink); }
.ski-picker-menu { position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow: auto; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(23, 42, 58, 0.08); }
.ski-picker-menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-top: 1px solid var(--line); background: white; padding: 8px 10px; text-align: left; color: var(--ink); }
.ski-picker-menu button:first-child { border-top: 0; }
.ski-cell, .work-title { display: flex; align-items: center; gap: 8px; }
.park-row strong.ski-cell { font-size: inherit; letter-spacing: 0; }
.analysis-filters label, .inline-filter { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.analysis-filters select, .analysis-filters input, .inline-filter select { border: 1px solid var(--line); background: white; border-radius: 12px; padding: 8px 10px; color: var(--ink); }
.analysis-filter-panel .panel-head { margin-bottom: 8px; }
.advanced-toggle { margin-top: 10px; }
.analysis-advanced { margin-top: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filter-chips button { border: 1px solid var(--line); background: var(--wash); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 750; }
.analysis-scope { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.analysis-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.analysis-reading { margin: 0 0 14px; font-weight: 750; }
.analysis-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.analysis-kpis .stat-card { min-height: 0; padding: 12px 14px; }
.analysis-kpis .stat-card span { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.analysis-kpis .stat-card strong { margin: 8px 0 0; font-size: 22px; letter-spacing: -0.04em; line-height: 1.15; }
.hint { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--wash); color: var(--blue); font-size: 11px; font-weight: 800; cursor: help; flex: 0 0 auto; }
.chart-block { min-width: 0; }
.chart-block h3 { margin: 0 0 6px; font-size: 16px; }
.inline-filter { min-width: 140px; }
.passage-wrap { max-height: 520px; overflow: auto; }
.table-row.passage-row { grid-template-columns: 92px 0.9fr 0.9fr 0.7fr 0.9fr 0.45fr 0.7fr 0.9fr 0.75fr 1.1fr 0.7fr 150px; min-width: 1280px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; align-items: center; }
.table-row.prep-result { grid-template-columns: 1.3fr 0.9fr 0.9fr 0.55fr 0.5fr 0.55fr 0.75fr 0.65fr 1.2fr 0.95fr; min-width: 1180px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; align-items: center; }
button.table-row.prep-result { font: inherit; color: inherit; cursor: pointer; text-align: left; }
button.table-row.prep-result small { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
button.table-row.prep-result.is-selected, button.table-row.prep-result:hover { background: var(--wash); }
.prep-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.prep-modes .is-active { background: var(--ink); color: white; }
.prep-kpis { margin: 8px 0 16px; }
.prep-detail { margin-top: 16px; padding-top: 4px; }
.prep-skis { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 12px; }
.table-row.prep-detail-row { grid-template-columns: 92px 0.9fr 0.9fr 0.7fr 0.4fr 0.6fr 0.6fr 1.2fr; min-width: 980px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; align-items: center; }
.prep-transitions h3 { font-size: 16px; margin: 18px 0 8px; }
.table-row.analysis-result { grid-template-columns: 0.7fr 0.8fr 0.6fr 0.6fr 0.6fr 0.9fr 0.9fr 0.7fr 0.8fr 1.2fr 150px; min-width: 1180px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; align-items: center; }
.table-row.analysis-result.table-label, .table-row.passage-row.table-label, .table-row.prep-result.table-label { position: sticky; top: 0; background: white; z-index: 1; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card { min-height: 108px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-frame { position: relative; }
.chart-frame canvas { width: 100% !important; height: 100% !important; }
.hc-target { background: var(--wash); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; }
.hc-target strong { font-size: 18px; }
.hc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin: 16px 0; }
.hc-stat { background: var(--bg); border-radius: 14px; padding: 12px; }
.hc-stat b { display: block; font-size: 22px; letter-spacing: -0.04em; }
.hc-stat span { color: var(--muted); font-size: 12px; font-weight: 700; }
.hc-block { margin: 16px 0; }
.hc-block h3 { margin-bottom: 8px; color: var(--blue); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-family: "DM Mono", monospace; font-weight: 500; }
.hc-preview { overflow: auto; max-height: 320px; border: 1px solid var(--line); border-radius: 14px; }
.hc-line { display: grid; grid-template-columns: 46px 46px 52px 1.3fr 72px 78px 1.4fr; gap: 8px; align-items: center; min-width: 760px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.hc-line.head { border-top: 0; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; position: sticky; top: 0; background: white; }
.hc-line.ignored { color: var(--muted); }
.hc-line .ok { color: var(--good); }
.hc-line .watch { color: #a85b16; }
.hc-ski-choice { display: grid; gap: 8px; margin-top: 8px; }
.hc-ski-choice label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.hc-ski-choice select { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white; }
.hc-import { border-top: 1px solid var(--line); padding: 16px 0; display: grid; gap: 4px; }
.hc-import header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.hc-import.focus { background: var(--wash); border-radius: 14px; padding: 16px; border-top-color: transparent; }
.hc-import p { color: var(--muted); }
.table-row.analysis-result { grid-template-columns: 0.7fr 0.9fr 0.7fr 0.7fr 0.7fr 0.9fr 0.9fr 0.8fr 0.8fr 0.8fr 0.9fr 1.3fr; min-width: 1280px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.table-row.analysis-result.table-label { cursor: default; }
.sort-head { border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; padding: 0; cursor: pointer; }
.reliability { font-size: 13px; font-weight: 750; }
.reliability.low { color: var(--muted); }
.reliability.mid { color: var(--blue); }
.reliability.high { color: var(--accent); }
.reliability-legend { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 750; margin: -4px 0 8px; }
.reliability-legend span { display: inline-flex; align-items: center; gap: 6px; }
.reliability-legend .rel-sample { width: 28px; height: 12px; border-radius: 4px; display: inline-block; background: white; border: 2px solid #172A3A; box-sizing: border-box; }
.reliability-legend .rel-low { border-color: #C0392B; }
.reliability-legend .rel-mid { border-color: #E58A3A; }
.reliability-legend .rel-high { border-color: #1F7A4D; }
.analysis-empty h2 { font-size: 28px; letter-spacing: -0.03em; margin: 8px 0; }
@media (max-width: 1100px) {
  .stats-grid, .ski-cards, .card-grid { grid-template-columns: 1fr 1fr; }
  .analysis-kpis { grid-template-columns: 1fr 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 34px; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-105%); transition: transform 0.2s ease; }
  .sidebar.open { transform: none; }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(23, 42, 58, 0.35); z-index: 15; }
  .workspace { margin-left: 0; }
  .menu-toggle { display: inline-flex; border: 1px solid var(--line); background: white; border-radius: 10px; padding: 8px 10px; }
  .topbar, #screen { padding-left: 16px; padding-right: 16px; }
  .page-heading, .context-bar, .inventory-tools { display: grid; }
  .stats-grid, .ski-cards, .card-grid, .facts, .condition-grid, .modal-grid, .check-list, .chart-grid, .analysis-kpis, .analysis-chrono { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 30px; }
  .account-row { grid-template-columns: 1fr; }
}
.owner-slot { display: flex; align-items: center; }
.owner-slot:empty { display: none; }
.account-slot { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.account-name { color: var(--muted); font-size: 14px; font-weight: 700; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-gate[hidden] { display: none; }
body.auth-open .app-shell { display: none; }
.auth-card { width: min(440px, 100%); display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.auth-card h1 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.auth-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-error { color: var(--bad); font-size: 14px; font-weight: 700; margin: 0; }
.sync-banner { margin: 12px 36px 0; padding: 12px 14px; border: 1px solid var(--bad); border-radius: 12px; color: var(--bad); background: white; }
.sync-banner[hidden] { display: none; }
.account-table { overflow-x: auto; }
.account-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(160px, 1.4fr) minmax(110px, .8fr) minmax(110px, 1fr) minmax(80px, .6fr) minmax(90px, .7fr) auto; gap: 10px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.account-head { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.account-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.account-span { grid-column: 1 / -1; }
.account-role { display: grid; gap: 2px; }
.account-role small { color: var(--muted); font-weight: 650; line-height: 1.35; }
.permission-list { display: grid; gap: 8px; }
.permission-list label, .permission-lock { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; }
.permission-list input, .permission-lock input { margin-top: 3px; }
body.is-hosted:not(.can-edit-sessions) [data-open="stage"],
body.is-hosted:not(.can-edit-sessions) [data-open="day"],
body.is-hosted:not(.can-edit-sessions) [data-open="session"],
body.is-hosted:not(.can-edit-sessions) [data-open="place"],
body.is-hosted:not(.can-edit-sessions) [data-open="assign-athlete"],
body.is-hosted:not(.can-edit-sessions) [data-open="assign-ski"],
body.is-hosted:not(.can-edit-sessions) [data-edit="stage"],
body.is-hosted:not(.can-edit-sessions) [data-edit="day"],
body.is-hosted:not(.can-edit-sessions) [data-edit="session"],
body.is-hosted:not(.can-edit-sessions) [data-edit="place"],
body.is-hosted:not(.can-edit-sessions) [data-duplicate],
body.is-hosted:not(.can-edit-sessions) .add-inline,
body.is-hosted:not(.can-edit-skis) [data-open="ski"],
body.is-hosted:not(.can-edit-skis) [data-edit="ski"],
body.is-hosted:not(.can-edit-athletes) [data-open="athlete"],
body.is-hosted:not(.can-edit-athletes) [data-edit="athlete"],
body.is-hosted:not(.can-edit-runs) [data-open="run"],
body.is-hosted:not(.can-edit-runs) [data-edit="run"],
body.is-hosted:not(.can-edit-preparations) [data-open="preparation"],
body.is-hosted:not(.can-edit-preparations) [data-edit="preparation"],
body.is-hosted:not(.can-edit-preparations) [data-attach],
body.is-hosted:not(.can-edit-preparations) [data-ski-for],
body.is-hosted:not(.can-import) [data-hc],
body.is-hosted:not(.can-delete-sessions) [data-delete="stage"],
body.is-hosted:not(.can-delete-sessions) [data-delete="day"],
body.is-hosted:not(.can-delete-sessions) [data-delete="session"],
body.is-hosted:not(.can-delete-sessions) [data-delete="place"],
body.is-hosted:not(.can-delete-skis) [data-delete="ski"],
body.is-hosted:not(.can-delete-athletes) [data-delete="athlete"],
body.is-hosted:not(.can-delete-runs) [data-delete="run"],
body.is-hosted:not(.can-delete-preparations) [data-delete="preparation"] { display: none; }
