@font-face {
  font-family: "Inter";
  src: local("Inter");
  font-display: swap;
}

:root {
  --ink: #10201c;
  --muted: #60716b;
  --line: #dce6e1;
  --panel: #f7faf8;
  --white: #fff;
  --green: #0f674f;
  --green-dark: #084638;
  --lime: #c9f15d;
  --orange: #f39a43;
  --blue: #568ddf;
  --shadow: 0 18px 60px rgba(10, 39, 31, 0.14);
  font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edf4f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select, input[type="range"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(72, 142, 219, .45); outline-offset: 2px; }
.hidden { display: none !important; }
.eyebrow { color: var(--green); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.topbar {
  height: 68px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 28px;
  position: relative;
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 850; font-size: 1.05rem; letter-spacing: -.03em; }
.brand small { color: var(--green); font-size: .65em; margin-left: 3px; letter-spacing: .08em; }
.brandmark { width: 34px; height: 34px; background: var(--green-dark); border-radius: 10px; padding: 7px; display: flex; gap: 3px; align-items: end; transform: rotate(-3deg); }
.brandmark i { display: block; width: 5px; border: 2px solid var(--lime); border-top: 0; border-radius: 1px; }
.brandmark i:nth-child(1) { height: 12px; }.brandmark i:nth-child(2) { height: 18px; }.brandmark i:nth-child(3) { height: 15px; }
.activity-progress { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: .78rem; font-weight: 700; color: var(--muted); }
.activity-progress > div { width: 100px; height: 5px; background: #e7eeea; border-radius: 9px; overflow: hidden; }
.activity-progress i { display: block; width: 20%; height: 100%; background: var(--green); transition: width .35s; }
.desktop-nav { display: flex; align-self: stretch; }
.nav-button { border: 0; border-bottom: 3px solid transparent; padding: 0 15px; background: transparent; font-size: .86rem; font-weight: 750; color: var(--muted); }
.nav-button.active { color: var(--green-dark); border-bottom-color: var(--green); }
.nav-button span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 10px; background: #e9f1ed; font-size: .7rem; }
.nav-anchor { display: flex; align-items: center; text-decoration: none; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: white; font-weight: 800; }

.view { display: none; }
.view.active { display: flex; }
#experiment-view { height: calc(100dvh - 68px); min-height: 640px; }
.control-panel { width: 390px; background: var(--panel); border-right: 1px solid var(--line); position: relative; z-index: 500; display: flex; flex-direction: column; }
.panel-scroll { padding: 30px 28px 150px; overflow-y: auto; overscroll-behavior: contain; }
h1, h2, p { margin-top: 0; }
.control-panel h1 { margin: 7px 0 10px; font-size: 2rem; line-height: 1.08; letter-spacing: -.055em; }
.lead { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }

.activity-card { background: var(--green-dark); color: white; padding: 18px; border-radius: 18px; box-shadow: 0 12px 30px rgba(5,49,38,.15); }
.activity-card > div { display: flex; align-items: center; justify-content: space-between; }
.activity-card h2 { margin: 0; font-size: 1rem; }
.activity-time { order: 2; background: rgba(255,255,255,.1); color: var(--lime); padding: 5px 8px; border-radius: 20px; font-size: .68rem; font-weight: 800; }
.activity-card ol { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.activity-card li { display: flex; gap: 9px; align-items: center; color: #bfcdc8; font-size: .76rem; }
.activity-card li i { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border: 1px solid #638078; border-radius: 50%; font-size: .65rem; font-style: normal; font-weight: 800; }
.activity-card li.done { color: white; }
.activity-card li.done i { background: var(--lime); border-color: var(--lime); color: var(--green-dark); }

.control-section { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 14px; }
.section-heading span { font-size: .68rem; color: var(--green); font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.section-heading h2 { font-size: 1rem; margin: 2px 0 0; }
.info-button { width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); font-size: .72rem; font-weight: 800; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.preset-grid button { padding: 10px 4px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.preset-grid strong, .preset-grid small { display: block; }
.preset-grid strong { font-size: .78rem; }.preset-grid small { margin-top: 2px; color: var(--muted); font-size: .63rem; }
.preset-grid button.selected { border-color: var(--green); background: #e8f5ed; box-shadow: inset 0 0 0 1px var(--green); }
.range-control { display: block; margin-top: 18px; }
.range-control > span, .priority-labels { display: flex; justify-content: space-between; align-items: center; color: #3d504a; font-size: .77rem; font-weight: 700; }
output { color: var(--green); font-weight: 850; }
input[type="range"] { width: 100%; accent-color: var(--green); margin: 10px 0 0; }
.capacity-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.capacity-row label { color: #52645e; font-size: .7rem; font-weight: 700; }
select, input[type="text"], dialog input, textarea { width: 100%; margin-top: 5px; padding: 10px 34px 10px 10px; color: var(--ink); background: white; border: 1px solid #ccd9d3; border-radius: 9px; }
select { appearance: none; background-image: linear-gradient(45deg,transparent 50%,#587069 50%),linear-gradient(135deg,#587069 50%,transparent 50%); background-position: calc(100% - 14px) 50%,calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.priority-labels { color: var(--muted); font-size: .68rem; }
.priority-section p { color: var(--muted); margin: 10px 0 0; font-size: .74rem; }
.decision-mode-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.decision-mode-grid button { min-width: 0; padding: 10px 5px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.decision-mode-grid strong, .decision-mode-grid small { display: block; }
.decision-mode-grid strong { font-size: .7rem; }
.decision-mode-grid small { margin-top: 2px; color: var(--muted); font-size: .58rem; }
.decision-mode-grid button.selected { border-color: var(--green); background: #e8f5ed; box-shadow: inset 0 0 0 1px var(--green); }
.priority-choice { margin-top: 18px; }
.priority-choice.is-fixed { opacity: .5; }
.mode-copy { padding: 9px 10px; border-radius: 9px; background: #edf4f0; color: #40574f !important; }

.run-panel { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 22px 18px; background: rgba(247,250,248,.96); backdrop-filter: blur(16px); border-top: 1px solid var(--line); box-shadow: 0 -12px 35px rgba(16,46,37,.08); }
.run-status { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: .65rem; }.run-status span:first-child { color: var(--green); font-weight: 800; }
.primary-button, .secondary-button, .text-button { border-radius: 11px; padding: 12px 16px; font-weight: 800; border: 0; }
.primary-button { background: var(--green-dark); color: white; box-shadow: 0 8px 20px rgba(7,70,56,.18); }
.primary-button:hover { background: #06372d; }.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { background: white; border: 1px solid var(--line); color: var(--green-dark); }
.text-button { background: transparent; color: var(--green); }
.run-panel > button { width: 100%; }
.progress-wrap { margin-top: 9px; }
.progress-wrap > div { height: 5px; border-radius: 4px; background: #dce8e2; overflow: hidden; }
.progress-wrap i { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s; }
.progress-wrap span { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }

.map-workspace { flex: 1; position: relative; min-width: 0; overflow: hidden; background: #dce9e2; }
#map { position: absolute; inset: 0; background: #dfeae5; }
.leaflet-tile-pane { filter: saturate(.62) brightness(1.04) contrast(.93); }
.leaflet-control-attribution { font-size: 10px; }
.map-title-card { position: absolute; z-index: 450; top: 22px; left: 22px; width: 270px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.7); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow); }
.map-title-card span, .map-title-card small { display: block; }.map-title-card span { color: var(--green); text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 800; }.map-title-card strong { display: block; margin: 2px 0; font-size: 1rem; }.map-title-card small { color: var(--muted); font-size: .68rem; }
.map-tools { position: absolute; z-index: 450; top: 22px; right: 22px; display: flex; gap: 7px; }.map-tools button, .mobile-controls-button { border: 1px solid rgba(255,255,255,.8); border-radius: 10px; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(8,45,35,.13); padding: 9px 12px; font-size: .78rem; font-weight: 800; }
.layers-menu { position: absolute; z-index: 460; top: 65px; right: 22px; width: 245px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; }
.layers-menu > strong { display: block; padding: 4px 7px 7px; font-size: .72rem; }
.layers-menu label { display: flex; gap: 8px; align-items: center; padding: 8px 7px; font-size: .75rem; border-radius: 8px; }
.layers-menu label:hover { background: #f1f6f3; }
.layer-swatch { display: inline-block; width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; }
.layer-swatch.current { background: #f28c45; border: 2px solid white; box-shadow: 0 0 0 1px #b75226; }
.layer-swatch.proposal { background: var(--green-dark); border-radius: 4px; }
.layer-swatch.density { background: linear-gradient(135deg,#f5e66f,#dd4e3f); }
.layer-swatch.candidate { background: var(--lime); border: 1px solid var(--green); }
.map-legend { position: absolute; z-index: 430; top: 92px; left: 22px; display: flex; gap: 7px; padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 7px 20px rgba(8,45,35,.1); color: #4c615a; font-size: .64rem; font-weight: 700; }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; background: #f28c45; border: 1px solid white; box-shadow: 0 0 0 1px #b75226; }
.map-legend i.proposal { background: var(--green-dark); border-radius: 3px; box-shadow: none; }
.density-legend { position: absolute; z-index: 435; top: 125px; left: 22px; width: 220px; padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.94); box-shadow: 0 7px 20px rgba(8,45,35,.11); }
.density-legend strong, .density-legend small { display: block; }.density-legend strong { font-size: .68rem; }.density-legend > div { display: flex; align-items: center; gap: 7px; margin: 5px 0 3px; color: var(--muted); font-size: .58rem; }.density-legend > div i { flex: 1; height: 7px; border-radius: 5px; background: linear-gradient(90deg,#f2ef9b,#f2ad4b,#d94e3f); }.density-legend small { color: var(--muted); font-size: .56rem; }
.mobile-controls-button { display: none; }
.site-marker { display: grid; place-items: center; width: 25px !important; height: 25px !important; margin: -12px 0 0 -12px !important; background: var(--green-dark); color: white; border: 2px solid white; border-radius: 8px 8px 8px 2px; box-shadow: 0 4px 10px rgba(4,45,35,.28); font: 800 11px/1 Inter,sans-serif; transform: rotate(-4deg); }
.site-marker span { transform: rotate(4deg); }.site-marker.multi { width: 29px !important; height: 29px !important; background: #0c6d50; }.current-dot { width: 10px; height: 10px; background: rgba(79,94,89,.55); border: 1.5px solid white; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.current-marker { display: grid; place-items: center; width: 17px !important; height: 17px !important; margin: -8px 0 0 -8px !important; background: #f28c45; border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #b75226,0 3px 9px rgba(68,33,15,.35); }
.current-marker span { display: block; width: 5px; height: 5px; background: #713315; border-radius: 50%; }
.candidate-dot { width: 7px; height: 7px; border: 1px solid #0f674f; background: rgba(201,241,93,.8); border-radius: 50%; }
.leaflet-popup-content { font-size: .78rem; }.leaflet-popup-content strong { display: block; font-size: .9rem; }.leaflet-popup-content small { color: var(--muted); }

.result-dock { position: absolute; z-index: 440; left: 22px; right: 22px; bottom: 22px; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.8); border-radius: 18px; padding: 17px 18px; box-shadow: var(--shadow); max-width: 1080px; margin: auto; transition: transform .25s; }
.dock-handle { display: none; }
.result-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.result-header h2 { margin: 3px 0 2px; font-size: 1.08rem; }.result-header p { margin: 0; color: var(--muted); font-size: .72rem; max-width: 560px; }
.solution-switch { display: flex; padding: 3px; border-radius: 10px; background: #edf3f0; }.solution-switch button { border: 0; background: transparent; border-radius: 8px; padding: 7px 10px; color: var(--muted); font-size: .68rem; font-weight: 800; }.solution-switch button.selected { color: var(--green-dark); background: white; box-shadow: 0 2px 8px rgba(10,50,38,.1); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: 13px; padding-top: 13px; }
.metric-grid article { padding: 0 14px; border-left: 1px solid var(--line); }.metric-grid article:first-child { border-left: 0; padding-left: 0; }
.metric-grid span, .metric-grid small { display: block; }.metric-grid span { color: var(--muted); font-size: .65rem; font-weight: 700; }.metric-grid strong { display: block; margin: 1px 0; font-size: 1.42rem; letter-spacing: -.04em; }.metric-grid small { color: var(--green); font-size: .61rem; }
.result-actions { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }.insight { margin-right: auto; padding-left: 25px; position: relative; color: #455953; font-size: .72rem; }.insight::before { content: "✦"; position: absolute; left: 2px; color: var(--green); }.compact { padding: 9px 14px; font-size: .75rem; }

.page-view { display: none; min-height: calc(100dvh - 68px); padding: 48px max(5vw, 26px) 90px; background: #f4f8f6; flex-direction: column; }
.page-view.active { display: flex; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }.page-heading h1 { margin: 6px 0; font-size: clamp(2rem,4vw,3.4rem); line-height: 1; letter-spacing: -.055em; }.page-heading p { color: var(--muted); margin: 0; }.page-actions { display: flex; gap: 8px; }
.empty-state { margin: auto; width: min(470px,100%); text-align: center; padding: 55px 25px; }.empty-state > div { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 20px; background: #e3eee8; color: var(--green); font-size: 2rem; }.empty-state h2 { margin-bottom: 7px; }.empty-state p { color: var(--muted); }.empty-state .primary-button { margin-top: 10px; }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 16px; }.saved-card { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 18px; box-shadow: 0 8px 25px rgba(10,50,38,.05); }.saved-card header { display: flex; justify-content: space-between; gap: 10px; }.saved-card h2 { margin: 0; font-size: 1rem; }.saved-card time { color: var(--muted); font-size: .65rem; }.saved-card p { min-height: 2.8em; color: var(--muted); font-size: .75rem; margin: 10px 0; }.saved-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.saved-metrics div { background: #f1f6f3; border-radius: 9px; padding: 9px; }.saved-metrics span, .saved-metrics strong { display: block; }.saved-metrics span { color: var(--muted); font-size: .61rem; }.saved-metrics strong { font-size: .86rem; }.saved-card footer { display: flex; gap: 7px; margin-top: 14px; }.saved-card footer button { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: white; font-size: .7rem; font-weight: 750; }.saved-card footer .delete { flex: 0 0 36px; color: #9d3d3d; }
.compare-content { display: block; }.compare-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }.compare-picker label { display: flex; align-items: center; gap: 7px; background: white; border: 1px solid var(--line); border-radius: 20px; padding: 8px 12px; font-size: .75rem; font-weight: 750; }.compare-table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 17px; }.compare-table-wrap table { width: 100%; min-width: 640px; border-collapse: collapse; }.compare-table-wrap th, .compare-table-wrap td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .78rem; }.compare-table-wrap thead th { background: #eaf2ee; }.compare-table-wrap tbody th { color: var(--muted); font-weight: 650; }.best-cell { color: var(--green); font-weight: 850; background: #f0f9f3; }.decision-card { margin-top: 20px; display: grid; grid-template-columns: 230px 1fr auto; gap: 16px; align-items: center; background: var(--green-dark); color: white; border-radius: 17px; padding: 20px; }.decision-card h2 { margin: 4px 0 0; font-size: 1rem; }.decision-card textarea { margin: 0; resize: vertical; }.decision-card .secondary-button { white-space: nowrap; }
.method-flow { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }.method-flow article, .method-grid section, .sources-card { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 20px; }.method-flow i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--green-dark); color: var(--lime); font-style: normal; font-weight: 800; }.method-flow h2 { margin: 16px 0 6px; font-size: 1rem; }.method-flow p, .method-grid p, .method-grid li { color: var(--muted); font-size: .78rem; }.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }.method-grid h2 { margin: 5px 0; font-size: 1rem; }.method-grid ul { margin: 8px 0 0; padding-left: 18px; }.sources-card { margin-top: 12px; }.sources-card h2 { margin: 4px 0 12px; }.sources-card a { color: var(--green); }.sources-card #source-list { display: grid; gap: 8px; color: var(--muted); font-size: .78rem; }

dialog { width: min(520px,calc(100vw - 28px)); padding: 22px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); box-shadow: 0 30px 100px rgba(4,35,27,.35); }dialog::backdrop { background: rgba(3,22,17,.55); backdrop-filter: blur(3px); }.wide-dialog { width: min(800px,calc(100vw - 28px)); }.dialog-heading { display: flex; justify-content: space-between; align-items: start; }.dialog-heading h2 { margin: 5px 0 12px; }.close-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eff4f1; font-size: 1.2rem; }.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 18px; }dialog label { display: block; margin-top: 13px; color: var(--muted); font-size: .76rem; font-weight: 700; }dialog textarea { padding-right: 10px; resize: vertical; }.help-steps { padding-left: 20px; color: var(--muted); }.help-steps li { margin: 10px 0; padding-left: 5px; }.wide-dialog > p { color: var(--muted); font-size: .8rem; }#pareto-chart { width: 100%; height: auto; overflow: visible; }.chart-legend { display: flex; gap: 20px; justify-content: center; color: var(--muted); font-size: .7rem; }.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }.chart-legend .cost { background: var(--orange); }.chart-legend .access { background: var(--blue); }
#toast { position: fixed; z-index: 3000; left: 50%; bottom: 25px; transform: translate(-50%,20px); opacity: 0; pointer-events: none; background: #071f18; color: white; border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .76rem; transition: .2s; }#toast.show { transform: translate(-50%,0); opacity: 1; }
.mobile-nav { display: none; }

/* Analytický Monte Carlo režim */
.analysis-body { min-height: 100dvh; background: #edf4f0; }
.analysis-mode { display: flex; align-items: center; gap: 8px; margin-right: auto; color: var(--muted); font-size: .76rem; font-weight: 750; }
.analysis-mode span { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(201,241,93,.2); }
.analysis-nav { display: flex; align-self: stretch; }
.analysis-nav a { display: flex; align-items: center; padding: 0 15px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 750; }
.analysis-nav a.active { color: var(--green-dark); border-bottom-color: var(--green); }
.analysis-shell { display: grid; grid-template-columns: 375px minmax(0,1fr); height: calc(100dvh - 68px); min-height: 680px; }
.analysis-controls { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); }
.analysis-controls-scroll { overflow-y: auto; padding: 28px 25px 150px; overscroll-behavior: contain; }
.analysis-controls h1 { margin: 7px 0 10px; font-size: 1.7rem; line-height: 1.08; letter-spacing: -.05em; }
.analysis-control-section { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.analysis-control-section .section-heading { margin-bottom: 6px; }
.control-note { margin: 0 0 4px; color: var(--muted); font-size: .72rem; }
.presentation-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.presentation-presets button { min-width: 0; min-height: 58px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); text-align: left; }
.presentation-presets button:last-child { grid-column: 1 / -1; }
.presentation-presets strong, .presentation-presets small { display: block; }
.presentation-presets strong { font-size: .72rem; }
.presentation-presets small { margin-top: 3px; color: var(--muted); font-size: .61rem; line-height: 1.25; }
.presentation-presets button.selected { border-color: var(--green); background: #e8f5ed; box-shadow: inset 0 0 0 1px var(--green); }
.presentation-preset-status { margin: 10px 0 0; padding: 9px 10px; border-radius: 9px; background: #edf3f0; color: #40564e; font-size: .68rem; line-height: 1.35; }
.presentation-preset-status.verified { background: #e3f5e9; color: #17603e; font-weight: 750; }
.presentation-preset-status.mismatch { background: #fff0e8; color: #9a4423; font-weight: 750; }
.criteria-presets { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-top: 12px; }
.criteria-presets button { padding: 8px 3px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: .64rem; font-weight: 750; }
.criteria-presets button.selected { border-color: var(--green); background: #e8f5ed; color: var(--green-dark); box-shadow: inset 0 0 0 1px var(--green); }
.advanced-settings { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.advanced-settings summary { color: var(--green-dark); font-size: .82rem; font-weight: 800; cursor: pointer; }
.analysis-run-panel { position: absolute; z-index: 20; right: 0; bottom: 0; left: 0; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: rgba(247,250,248,.97); backdrop-filter: blur(16px); box-shadow: 0 -12px 35px rgba(16,46,37,.08); }
.analysis-run-panel > button { width: 100%; }
.analysis-workspace { min-width: 0; overflow-y: auto; padding: 27px 28px 45px; }
.analysis-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.analysis-heading h2 { margin: 3px 0 4px; font-size: clamp(1.7rem,3vw,2.7rem); line-height: 1.05; letter-spacing: -.045em; }
.analysis-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.analysis-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.analysis-actions button { padding: 10px 13px; font-size: .72rem; }
.robust-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin: 23px 0 15px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 26px rgba(10,50,38,.05); }
.robust-metrics article { min-width: 0; padding: 14px 16px; border-left: 1px solid var(--line); }
.robust-metrics article:first-child { border-left: 0; }
.robust-metrics span, .robust-metrics small { display: block; color: var(--muted); font-size: .62rem; }
.robust-metrics strong { display: block; overflow: hidden; margin: 2px 0; font-size: 1.27rem; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.robust-metrics small { color: var(--green); }
.analysis-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(340px,.75fr); gap: 15px; }
.analysis-map-card, .distribution-card, .alternatives-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 26px rgba(10,50,38,.05); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.panel-heading h3 { margin: 2px 0 0; font-size: .92rem; }
.panel-heading > span { color: var(--muted); font-size: .7rem; }
.map-layer-toggles { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; color: var(--muted); font-size: .68rem; }
.map-layer-toggles label { display: flex; align-items: center; gap: 4px; }
#robust-map { height: 430px; border-top: 1px solid var(--line); background: #dfeae5; }
.distribution-card { display: flex; flex-direction: column; }
#distribution-chart { width: 100%; height: auto; min-height: 230px; padding: 0 10px; }
#distribution-chart rect { fill: var(--green); opacity: .76; }
#distribution-chart .axis { stroke: #b9c9c2; }
#distribution-chart .target-line { stroke: #d06b3a; stroke-width: 3; stroke-dasharray: 6 5; }
#distribution-chart text { fill: var(--muted); font: 12px Inter,sans-serif; }
#distribution-chart .target-label { fill: #a84b25; font-weight: 800; }
#distribution-chart .axis-label { font-size: 11px; }
.distribution-range { white-space: nowrap; }
.distribution-legend { display: flex; justify-content: center; gap: 16px; color: var(--muted); font-size: .66rem; }
.distribution-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: var(--green); vertical-align: -1px; }
.distribution-legend i.target { width: 15px; height: 3px; border-radius: 0; background: #d06b3a; vertical-align: 2px; }
.robust-conclusion { margin: auto 16px 16px; padding: 12px 13px; border-radius: 10px; background: #edf6f1; color: #3d554d; font-size: .73rem; }
.alternatives-card { margin-top: 15px; }
.alternatives-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
#alternatives-table { width: 100%; min-width: 780px; border-collapse: collapse; }
#alternatives-table th, #alternatives-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .7rem; white-space: nowrap; }
#alternatives-table th { color: var(--muted); background: #f5f8f6; font-weight: 750; }
#alternatives-table tr.selected td { background: #edf7f1; }
#alternatives-table .reliable { color: var(--green); font-weight: 800; }
#alternatives-table .risk { color: #b3542d; font-weight: 800; }
#alternatives-table button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--green-dark); font-size: .65rem; font-weight: 750; }
.method-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.method-strip div { padding: 14px 16px; background: white; }
.method-strip strong, .method-strip span { display: block; }
.method-strip strong { margin-bottom: 3px; font-size: .72rem; }
.method-strip span { color: var(--muted); font-size: .68rem; }

@media (max-width: 1100px) {
  .control-panel { width: 350px; }.panel-scroll { padding-left: 22px; padding-right: 22px; }.desktop-nav .nav-button { padding: 0 8px; }.activity-progress { display: none; }.metric-grid strong { font-size: 1.2rem; }.result-dock { left: 14px; right: 14px; bottom: 14px; }.result-actions .insight { display: none; }
  .analysis-shell { grid-template-columns: 340px minmax(0,1fr); }.analysis-workspace { padding: 23px 20px 38px; }.robust-metrics { grid-template-columns: repeat(3,1fr); }.robust-metrics article:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }.robust-metrics article:nth-child(5) { border-top: 1px solid var(--line); }.analysis-grid { grid-template-columns: 1fr; }.distribution-card { min-height: 420px; }
}

@media (max-width: 820px) {
  body { padding-bottom: 64px; }.topbar { height: 58px; padding: 0 14px; }.desktop-nav, .topbar .icon-button { display: none; }.activity-progress { display: flex; margin-left: auto; }.activity-progress > div { width: 70px; }
  #experiment-view { height: calc(100dvh - 122px); min-height: 540px; }
  .control-panel { position: fixed; z-index: 1400; inset: 58px 0 64px; width: auto; transform: translateY(105%); transition: transform .25s; border: 0; }.control-panel.open { transform: translateY(0); }.panel-scroll { padding: 26px 18px 150px; }.control-panel h1 { font-size: 1.7rem; }
  .map-title-card { top: 12px; left: 12px; width: min(245px,calc(100% - 165px)); }.map-tools { top: 12px; right: 56px; }.layers-menu { top: 54px; right: 56px; }.map-legend { top: 104px; left: 12px; max-width: calc(100% - 24px); flex-wrap: wrap; }.density-legend { top: 146px; left: 12px; }.map-workspace .leaflet-bottom.leaflet-right { top: 174px; right: 6px; bottom: auto; }.map-workspace .leaflet-control-attribution { border-radius: 5px; background: rgba(255,255,255,.88); }
  .mobile-controls-button { display: block; position: absolute; z-index: 450; top: 66px; right: 12px; color: var(--green-dark); }
  .result-dock { left: 0; right: 0; bottom: 0; border-radius: 20px 20px 0 0; padding: 9px 13px 13px; border-bottom: 0; max-height: 54%; overflow-y: auto; }.dock-handle { display: block; width: 36px; height: 4px; border-radius: 4px; background: #c9d6d0; margin: 0 auto 8px; }.result-header { display: block; }.result-header p { display: none; }.solution-switch { margin-top: 9px; overflow-x: auto; }.solution-switch button { flex: 1; white-space: nowrap; }.metric-grid { grid-template-columns: 1fr 1fr; gap: 0; }.metric-grid article { padding: 8px 10px !important; border-left: 0; border-top: 1px solid var(--line); }.metric-grid article:nth-child(even) { border-left: 1px solid var(--line); }.metric-grid article:nth-child(-n+2) { border-top: 0; }.metric-grid strong { font-size: 1.22rem; }.result-actions { display: grid; grid-template-columns: 1fr 1fr; }.result-actions .insight { grid-column: 1/-1; display: block; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5,1fr); position: fixed; z-index: 1800; bottom: 0; left: 0; right: 0; height: 64px; padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }.mobile-nav button, .mobile-nav a { display: block; padding: 0; border: 0; background: transparent; color: var(--muted); text-align: center; text-decoration: none; font-size: .58rem; font-weight: 750; }.mobile-nav span { display: block; margin: 10px 0 2px; font-size: 1rem; }.mobile-nav button.active { color: var(--green); }
  .page-view { min-height: calc(100dvh - 122px); padding: 30px 16px 45px; }.page-heading { display: block; }.page-heading h1 { font-size: 2.2rem; }.page-actions { margin-top: 16px; }.method-flow { grid-template-columns: 1fr 1fr; }.method-grid { grid-template-columns: 1fr; }.decision-card { grid-template-columns: 1fr; }.saved-grid { grid-template-columns: 1fr; }
  #toast { bottom: 78px; width: max-content; max-width: calc(100vw - 30px); }
  .analysis-body { padding-bottom: 0; overflow-x: hidden; }.analysis-topbar { position: sticky; top: 0; }.analysis-mode { display: none; }.analysis-nav { margin-left: auto; }.analysis-nav a { min-height: 44px; padding: 0 8px; font-size: .72rem; }.analysis-shell { display: block; height: auto; min-height: 0; }.analysis-controls { border-right: 0; border-bottom: 1px solid var(--line); }.analysis-controls-scroll { overflow: visible; padding: 24px 18px 18px; }.analysis-run-panel { position: sticky; bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }.analysis-workspace { overflow: visible; padding: 26px 14px 40px; }.analysis-heading { display: block; }.analysis-actions { margin-top: 14px; }.analysis-actions button { flex: 1; min-height: 44px; }.robust-metrics { grid-template-columns: 1fr 1fr; }.robust-metrics article { border-top: 1px solid var(--line); }.robust-metrics article:nth-child(odd) { border-left: 0; }.robust-metrics article:nth-child(-n+2) { border-top: 0; }.robust-metrics article:last-child { grid-column: 1 / -1; }.analysis-grid { display: block; }.distribution-card { margin-top: 14px; min-height: 0; }.method-strip { grid-template-columns: 1fr; }#robust-map { height: 400px; }.panel-heading { flex-wrap: wrap; align-items: flex-start; }.alternatives-table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 520px) {
  .activity-progress span { display: none; }.activity-progress > div { width: 72px; }.map-title-card small { display: none; }.map-title-card { width: min(205px,calc(100% - 150px)); }.map-title-card strong { font-size: .9rem; }.metric-grid span { font-size: .65rem; }.metric-grid small { font-size: .64rem; }.method-flow { grid-template-columns: 1fr; }.page-actions { display: grid; grid-template-columns: 1fr 1fr; }.wide-dialog { padding: 15px; }
  .mobile-nav button, .mobile-nav a { font-size: .64rem; }.mobile-nav span { margin-top: 8px; font-size: 1.08rem; }
  .control-panel .lead, .range-control span, .mode-copy, .activity-card li { font-size: .78rem; }.preset-grid button, .decision-mode-grid button { min-height: 48px; }.preset-grid strong, .decision-mode-grid strong { font-size: .74rem; }.preset-grid small, .decision-mode-grid small { font-size: .66rem; }
  .result-actions button, .mobile-controls-button, .primary-button, .secondary-button { min-height: 44px; }.result-dock { max-height: 58%; }.result-dock .eyebrow { font-size: .64rem; }
  .analysis-controls h1 { font-size: 1.52rem; }.analysis-controls .lead, .control-note, .presentation-preset-status { font-size: .76rem; }.presentation-presets { grid-template-columns: 1fr; }.presentation-presets button:last-child { grid-column: auto; }.presentation-presets button { min-height: 54px; }.presentation-presets strong { font-size: .8rem; }.presentation-presets small { font-size: .7rem; }
  .analysis-run-panel .run-status { font-size: .7rem; }.analysis-run-panel button { min-height: 48px; }.analysis-workspace { padding-left: 10px; padding-right: 10px; }.analysis-heading h2 { font-size: 1.8rem; }.analysis-heading p { font-size: .78rem; }.robust-metrics strong { font-size: 1.15rem; }.robust-metrics span, .robust-metrics small { font-size: .67rem; }.map-layer-toggles { width: 100%; justify-content: flex-start; font-size: .72rem; }#robust-map { height: 350px; }.distribution-legend { flex-wrap: wrap; padding: 0 12px; }.robust-conclusion { font-size: .76rem; }.method-strip span { font-size: .72rem; }
}

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