@font-face {
  font-family: Inter;
  src: url("/shared/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/shared/fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}
:root {
  font-family: Inter, system-ui, sans-serif;
  color: #253746;
  background: #f3f6f8;
  font-size: 13px;
  --ink: #253746;
  --muted: #667887;
  --line: #dce3e9;
  --accent: #3158bd;
  --bluewash: #edf2ff;
  --source: #bb5438;
  --receiver: #304ea0;
  --barrier: #087c82;
  --danger: #a6332c;
  --good: #276740;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  line-height: 1.25;
}
button:active {
  background: #e2e8f3;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.primary:active {
  background: #234395;
}
button.quiet {
  border-color: transparent;
  background: transparent;
}
button.danger {
  color: var(--danger);
}
button.selected {
  color: var(--accent);
  background: var(--bluewash);
  border-color: #c1cef2;
}
button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
input, select, textarea {
  border: 1px solid #bac7d2;
  border-radius: 5px;
  padding: 8px 9px;
  background: #fff;
  min-height: 36px;
  max-width: 100%;
  width: 100%;
}
input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}
textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.6;
}
input:invalid:not(:focus) {
  border-color: #c7908c;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #7195f0;
  outline-offset: 2px;
}
h1, h2, h3, p {
  margin: 0;
}
h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.55px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.25px;
}
h3 {
  font-size: 14px;
}
p {
  line-height: 1.65;
}
small, .muted {
  color: var(--muted);
}
small {
  font-size: 11px;
  line-height: 1.6;
}
svg {
  display: block;
}
.loading {
  padding: 40px;
}
.hidden, [hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spread {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 14px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  width: 31px;
  height: 31px;
}
.brand strong {
  font-size: 22px;
  letter-spacing: -0.8px;
}
.brand span {
  font-size: 11px;
  display: block;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.topbar {
  min-height: 75px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 12px 24px;
  gap: 24px;
}
.topbar .brand {
  min-width: 219px;
}
.project-trigger {
  text-align: left;
  justify-content: start;
  max-width: 440px;
}
.project-trigger strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-trigger small {
  display: block;
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
}
.language-toggle {
  display: flex;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  margin-left: 6px;
}
.language-toggle button {
  min-width: 34px;
  padding: 6px;
  border: 0;
}
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  min-height: 55px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.tabs {
  display: flex;
  align-self: stretch;
  gap: 25px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 3px solid transparent;
  min-width: 75px;
  padding: 14px 0 11px;
  color: var(--muted);
}
.tabs button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.tag {
  font-size: 11px;
  background: #edf0f4;
  padding: 4px 7px;
  border-radius: 4px;
  color: #516475;
  font-weight: 600;
}
.period-toggle {
  display: flex;
  background: #eef1f5;
  padding: 3px;
  border-radius: 7px;
  gap: 2px;
}
.period-toggle button {
  min-height: 30px;
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 400;
}
.period-toggle button.selected {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #1f334619;
}
.workspace {
  display: grid;
  grid-template-columns: 235px minmax(360px, 1fr) 282px;
  grid-template-rows: minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  height: clamp(580px, 59vh, 670px);
  min-height: 580px;
}
.starter-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: #edf2ff;
  border-bottom: 1px solid #c5d1ed;
}
.starter-strip p {
  flex: 1;
  min-width: 190px;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}
.starter-strip strong {
  display: block;
  margin-bottom: 2px;
}
.object-panel, .property-panel {
  background: #fff;
  min-width: 0;
}
.object-panel {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.property-panel {
  border-left: 1px solid var(--line);
  max-height: 100%;
  overflow: auto;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 13px;
}
.panel-heading h2 {
  font-size: 13px;
  letter-spacing: 0;
}
.scenario-picker {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.scenario-picker label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  color: var(--muted);
}
.object-filters {
  display: flex;
  gap: 3px;
  margin: 0 12px 12px;
  flex-wrap: wrap;
}
.object-filters button {
  font-size: 11px;
  min-height: 30px;
  padding: 5px 7px;
  border: 0;
  font-weight: 400;
}
.object-list {
  padding: 0 8px 14px;
  flex: 1;
  min-height: 0;
  max-height: 430px;
  overflow: auto;
}
.object-item {
  border: 0;
  border-radius: 5px;
  width: 100%;
  display: flex;
  justify-content: start;
  text-align: left;
  padding: 11px 8px;
  font-weight: 400;
  gap: 10px;
  margin-bottom: 2px;
}
.object-item .object-symbol {
  flex-shrink: 0;
}
.object-item .object-name {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.object-item small {
  font-size: 10px;
}
.object-item.is-selected {
  background: var(--bluewash);
  color: var(--accent);
}
.object-symbol {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718395;
}
.object-symbol.source, .object-symbol.line {
  color: var(--source);
}
.object-symbol.receiver {
  color: var(--receiver);
}
.object-symbol.barrier {
  color: var(--barrier);
}
.object-item.inactive {
  opacity: 0.45;
}
.left-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}
.left-bottom button {
  font-size: 12px;
}
.scene-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.scene-top {
  display: flex;
  padding: 15px 18px;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  flex-shrink: 0;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
.scene-top h1 {
  font-size: 17px;
}
.mobile-scenario {
  display: none;
}
.scene-top .hint {
  font-size: 11px;
  margin-top: 4px;
}
.scene-top .stats {
  display: flex;
  gap: 18px;
  margin-left: auto;
  text-align: right;
}
.stat strong {
  font-size: 19px;
  display: block;
  font-weight: 600;
}
.stat small {
  font-size: 10px;
}
.map-shell {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background: #e9eef1;
}
.map-container {
  position: absolute;
  inset: 0;
  touch-action: none;
}
.map-container svg {
  width: 100%;
  height: 100%;
  user-select: none;
}
.map-overlay, .basemap-tiles {
  position: absolute;
  inset: 0;
}
.basemap-tiles {
  overflow: hidden;
  pointer-events: none;
}
.basemap-tiles img {
  position: absolute;
  max-width: none;
}
.background-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 11px;
  flex-shrink: 0;
}
.background-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.background-controls select {
  width: auto;
  max-width: 200px;
  padding: 5px 8px;
  min-height: 36px;
  font-size: 12px;
}
.background-controls button {
  min-height: 36px;
  padding: 6px 9px;
  font-size: 12px;
}
.background-controls input[type="range"] {
  width: 90px;
  accent-color: var(--accent);
}
.background-credit {
  padding: 5px 16px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  flex-shrink: 0;
}
.background-credit[hidden] {
  display: none;
}
#background-status:not(:empty) {
  display: block;
  color: #a45512;
}
.top-actions {
  flex-wrap: wrap;
}
.top-actions .file-action {
  gap: 5px;
  font-size: 11px;
}
.map-toolbar {
  position: absolute;
  left: 14px;
  top: 14px;
  display: flex;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 2px;
  box-shadow: 0 2px 6px #24374610;
}
.map-toolbar button {
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
}
.map-tools-right {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.map-tools-right button {
  width: 34px;
  border: 0;
  border-radius: 0;
  padding: 8px;
}
.map-instruction {
  position: absolute;
  top: 65px;
  left: 14px;
  right: 60px;
  pointer-events: none;
}
.map-instruction span {
  background: #fff;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 11px;
  box-shadow: 0 1px 3px #24374610;
}
.map-layers {
  position: absolute;
  left: 14px;
  bottom: 13px;
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  background: #ffffffef;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  line-height: 1.5;
}
.map-north {
  position: absolute;
  right: 23px;
  bottom: 65px;
  color: #516475;
  text-align: center;
  pointer-events: none;
  font-size: 10px;
}
.map-north i {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 20px solid #516475;
  margin: 0 auto 3px;
}
.map-legend {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 17px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.legend-band {
  width: 210px;
  max-width: 42vw;
}
.legend-colors {
  display: flex;
  height: 7px;
  border-radius: 2px;
  overflow: hidden;
}
.legend-colors span {
  flex: 1;
}
.legend-numbers {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.legend-scale {
  margin-left: auto;
  white-space: nowrap;
}
.property-body {
  padding: 2px 16px 18px;
}
.property-body h3 {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 5px;
}
.empty-state {
  padding: 25px 17px;
  color: var(--muted);
  text-align: left;
}
.empty-state svg {
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  color: #95a3b0;
}
.empty-state h3 {
  color: var(--ink);
  margin-bottom: 9px;
}
.field {
  display: grid;
  gap: 5px;
  font-size: 11px;
  min-width: 0;
}
.field label, .field > span {
  font-weight: 600;
  line-height: 1.45;
}
.fields-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field .unit-input {
  position: relative;
}
.unit-input input {
  padding-right: 34px;
}
.unit-input em {
  position: absolute;
  right: 10px;
  top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  pointer-events: none;
}
.field input {
  font-size: 12px;
}
.property-body form {
  display: grid;
  gap: 14px;
}
.property-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.results-panel {
  background: #fff;
  padding: 19px 24px 23px;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}
.results-header h2 {
  font-size: 15px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fb;
  white-space: nowrap;
}
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e8edf1;
  line-height: 1.4;
}
td.number, th.number {
  text-align: right;
}
tr.selected-row {
  background: #f1f5ff;
}
.level-number {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.45px;
}
.exceed {
  color: var(--danger);
}
.within {
  color: var(--good);
}
.delta {
  font-size: 12px;
  font-weight: 600;
}
.results-note {
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 24px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.status-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #45915f;
  display: inline-block;
  margin-right: 6px;
}
.status-dot.error {
  background: #b03932;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 17px 24px;
  font-size: 11px;
  color: var(--muted);
}
.footer a {
  color: var(--muted);
}
.footer nav {
  display: flex;
  gap: 20px;
}
.view-page {
  max-width: 1250px;
  padding: 32px 32px 50px;
  margin: 0 auto;
}
.view-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 25px;
}
.view-heading h1 {
  font-size: 28px;
  margin-bottom: 9px;
  letter-spacing: -0.8px;
}
.view-heading p {
  max-width: 65ch;
  color: var(--muted);
}
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 22px 0;
}
.scenario-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 20px;
  display: grid;
  gap: 15px;
}
.scenario-card.is-baseline {
  border-top: 3px solid var(--accent);
  padding-top: 18px;
}
.scenario-card h2 {
  font-size: 16px;
}
.scenario-card p {
  font-size: 12px;
  color: var(--muted);
}
.change-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.change-list li {
  font-size: 12px;
  line-height: 1.5;
}
.change-list small {
  display: block;
}
.comparison-table, .report-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  margin-top: 22px;
}
.comparison-table h2, .report-section h2 {
  padding: 19px 20px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.report-section .inner {
  padding: 20px;
}
.report-section table {
  font-size: 11px;
}
.report-section .hint {
  padding: 16px 20px;
}
.report-purchase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: 28px;
  background: #eef2fb;
  border: 1px solid #c5d1ed;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 18px;
}
.report-purchase h2 {
  margin: 0 0 10px;
  font-size: 18px;
}
.report-purchase p {
  line-height: 1.6;
}
.purchase-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
.purchase-actions small {
  line-height: 1.6;
  color: var(--muted);
}
.recovery-note {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
@media (max-width: 700px) {
  .report-purchase {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }
}
.report-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 30px;
}
.report-meta dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.report-meta dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.report-meta .full {
  grid-column: 1/-1;
}
.notice {
  padding: 12px 15px;
  border-left: 3px solid var(--accent);
  font-size: 12px;
  line-height: 1.7;
  margin: 18px 0;
}
.notice.warning {
  border-color: #a86521;
  background: #fff9ee;
}
.validation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.validation-list button {
  justify-content: start;
  text-align: left;
  font-weight: 400;
  width: 100%;
}
.checks-button {
  color: #8a5824;
  font-size: 11px;
}
.method-link {
  font-weight: 400;
  min-height: 20px;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  border: 0;
  background: transparent;
}
.hash {
  font-family: monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 18px;
}
.dialog-heading h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  padding-top: 5px;
}
.dialog-heading button {
  min-width: 35px;
  padding: 8px;
}
.library-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.library-row strong {
  font-size: 13px;
}
.library-row small {
  display: block;
}
.library-row .row {
  gap: 5px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 80px #162d4940;
  max-width: min(660px, calc(100vw - 28px));
  width: 660px;
  padding: 26px;
  max-height: calc(100dvh - 40px);
  color: var(--ink);
}
dialog::backdrop {
  background: #2232466b;
}
dialog.wide {
  width: 1050px;
  max-width: min(1050px, calc(100vw - 28px));
}
dialog .field input, dialog .field textarea {
  font-size: 13px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 30px);
  padding: 12px 18px;
  border-radius: 7px;
  background: #253746;
  color: #fff;
  box-shadow: 0 4px 20px #162d4930;
  z-index: 10000;
  font-size: 12px;
}
.source-bars {
  display: grid;
  gap: 13px;
  padding: 16px 0;
}
.source-bar {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr 60px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.bar-track {
  background: #edf0f4;
  border-radius: 2px;
  height: 8px;
  overflow: hidden;
}
.bar-fill {
  background: var(--source);
  height: 100%;
}
.tool-label {
  font-size: 10px;
}
.radio-icon {
  display: inline-block;
  color: var(--muted);
}
.report-intro {
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
}
.print-only {
  display: none;
}
.fatal {
  margin: 60px auto;
  max-width: 620px;
  padding: 30px;
  background: #fff;
}
.empty-table {
  padding: 35px;
  color: var(--muted);
  line-height: 1.7;
}
.map-object {
  cursor: pointer;
}
.map-object:focus-visible {
  outline: none;
}
.map-object:focus-visible .shape {
  stroke: #3158bd;
  stroke-width: 3;
}
.map-coordinates {
  font-size: 10px;
  fill: #84919b;
  pointer-events: none;
}
.map-label {
  font-family: Inter, system-ui, sans-serif;
  fill: #435566;
  font-size: 11px;
  paint-order: stroke;
  stroke: #f3f6f8;
  stroke-width: 3;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-source-label {
  fill: #8b3927;
}
.map-receiver-label {
  fill: #304ea0;
}
.map-level {
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  fill: #253746;
  pointer-events: none;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.check-summary {
  font-size: 12px;
}
.metrics-inline {
  display: flex;
  gap: 35px;
  margin: 15px 0;
}
.metrics-inline strong {
  font-size: 25px;
  display: block;
}
.metrics-inline span {
  font-size: 11px;
  color: var(--muted);
}
@media (hover: hover) {
  button:hover {
    background: #f0f4f8;
  }
  button.primary:hover {
    background: #24479f;
  }
  button.selected:hover {
    background: #e0e8fb;
  }
  .object-item:hover {
    background: #f3f6f9;
  }
  a:hover {
    text-decoration: underline;
  }
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: 260px minmax(360px, 1fr) 310px;
  }
  .map-shell {
    min-height: 300px;
  }
  .property-panel {
    max-height: 900px;
  }
  .object-list {
    max-height: 550px;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 200px minmax(320px, 1fr) 250px;
  }
  .topbar {
    gap: 15px;
    padding: 12px 16px;
  }
  .topbar .brand {
    min-width: 175px;
  }
  .brand span {
    display: none;
  }
  .scene-top .stats {
    gap: 9px;
  }
  .stat strong {
    font-size: 17px;
  }
  .top-actions button .button-text {
    display: none;
  }
  .property-body {
    padding: 2px 12px 15px;
  }
  .map-shell {
    min-height: 300px;
  }
  .map-toolbar {
    left: 9px;
  }
  .map-toolbar button {
    width: 32px;
    padding: 7px;
  }
  .map-toolbar svg {
    width: 16px;
  }
}
@media (max-width: 900px) {
  .workspace {
    height: auto;
    grid-template-rows: none;
    grid-template-columns: 190px 1fr;
  }
  .property-panel {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }
  .property-body form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .property-body form > .hint,
  .property-body form > .property-actions,
  .property-body form > .form-error {
    grid-column: 1/-1;
  }
  .property-body {
    padding: 0 18px 20px;
  }
  .property-actions {
    display: flex;
  }
  .empty-state {
    padding: 15px 18px;
  }
  .empty-state svg {
    display: none;
  }
  .map-shell {
    min-height: 470px;
  }
  .topbar .brand {
    min-width: auto;
  }
  .scene-top .stats {
    display: none;
  }
  .object-list {
    max-height: 420px;
  }
  .main-nav {
    padding: 0 17px;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .project-trigger {
    max-width: 50vw;
  }
  .top-actions {
    margin-left: auto;
  }
}
@media (max-width: 600px) {
  :root {
    font-size: 13px;
  }
  .topbar {
    padding: 13px 13px 10px;
  }
  .brand strong {
    font-size: 20px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .project-trigger {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    padding: 7px 0;
    min-height: 40px;
  }
  .top-actions {
    gap: 3px;
  }
  .top-actions button {
    min-height: 40px;
    min-width: 40px;
    padding: 8px;
  }
  .language-toggle {
    padding-left: 4px;
    margin-left: 1px;
  }
  .language-toggle button {
    min-width: 28px;
    padding: 5px;
  }
  .top-actions .desktop-action {
    display: none;
  }
  .main-nav {
    padding: 0 12px;
    gap: 8px;
    min-height: 52px;
    flex-wrap: wrap;
  }
  .tabs {
    gap: 18px;
  }
  .tabs button {
    min-width: 54px;
    font-size: 12px;
    min-height: 48px;
  }
  .nav-meta .tag {
    display: none;
  }
  .period-toggle button {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 8px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .object-panel {
    border-right: 0;
    order: 2;
    border-top: 1px solid var(--line);
  }
  .scene-main {
    order: 1;
  }
  .property-panel {
    order: 3;
  }
  .object-list {
    display: flex;
    max-height: 170px;
    overflow: auto;
    flex-wrap: wrap;
    gap: 3px;
    padding-bottom: 9px;
  }
  .object-item {
    width: calc(50% - 3px);
    min-height: 52px;
    padding: 9px 5px;
  }
  .object-item .object-name {
    font-size: 11px;
  }
  .object-panel .scenario-picker {
    display: none;
  }
  .object-filters {
    margin-bottom: 7px;
  }
  .left-bottom {
    padding: 9px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }
  .left-bottom .hint {
    display: none;
  }
  .left-bottom button {
    min-height: 40px;
  }
  .scene-top {
    padding: 13px 14px;
    min-height: 65px;
  }
  .scene-top h1 {
    display: none;
  }
  .mobile-scenario {
    display: block;
    min-height: 42px;
    font-size: 15px;
    font-weight: 600;
  }
  .scene-top .hint {
    font-size: 10px;
  }
  .map-shell {
    height: 430px;
    min-height: 430px;
    flex: none;
  }
  .map-toolbar button {
    width: 37px;
    height: 39px;
  }
  .map-toolbar {
    left: 8px;
    top: 9px;
    padding: 3px;
  }
  .map-tools-right {
    top: 9px;
    right: 8px;
  }
  .map-tools-right button {
    height: 39px;
  }
  .map-instruction {
    top: 63px;
    left: 8px;
    right: 8px;
  }
  .map-instruction span {
    font-size: 10px;
    display: inline-block;
    max-width: 90%;
    line-height: 1.5;
  }
  .map-layers {
    left: 8px;
    bottom: 10px;
    font-size: 10px;
    gap: 10px;
    min-height: 40px;
  }
  .map-layers input {
    width: 18px;
    height: 18px;
  }
  .map-legend {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .legend-band {
    max-width: 50vw;
  }
  .legend-scale {
    display: none;
  }
  .property-body form {
    grid-template-columns: 1fr 1fr;
  }
  .property-body form > .full {
    grid-column: 1/-1;
  }
  .property-body form > .fields-two {
    grid-column: 1/-1;
  }
  .property-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .property-actions button[type="submit"] {
    grid-column: 1/-1;
  }
  .field input, .field select, .field textarea {
    min-height: 42px;
    font-size: 16px;
  }
  .property-actions button {
    min-height: 44px;
  }
  .results-panel {
    padding: 18px 13px;
  }
  .results-header {
    align-items: start;
  }
  .results-header h2 {
    font-size: 14px;
    max-width: 180px;
  }
  .results-header button {
    min-height: 40px;
    font-size: 11px;
    padding: 7px;
  }
  .level-number {
    font-size: 16px;
  }
  td, th {
    padding: 10px 9px;
  }
  .results-note {
    gap: 8px;
  }
  .statusbar {
    padding: 11px 14px;
    font-size: 10px;
    flex-wrap: wrap;
  }
  .footer {
    padding: 15px 14px;
    gap: 14px;
    font-size: 10px;
  }
  .footer nav {
    gap: 13px;
  }
  .view-page {
    padding: 22px 13px 35px;
  }
  .view-heading {
    flex-direction: column;
    gap: 16px;
  }
  .view-heading h1 {
    font-size: 24px;
  }
  .view-heading .row {
    flex-wrap: wrap;
  }
  .scenario-cards {
    grid-template-columns: 1fr;
  }
  .report-meta {
    grid-template-columns: 1fr;
  }
  .report-meta .full {
    grid-column: auto;
  }
  .report-section .inner {
    padding: 14px;
  }
  dialog {
    padding: 19px;
  }
  .dialog-heading h2 {
    font-size: 18px;
  }
  .modal-actions button {
    min-height: 44px;
  }
  .notice {
    margin: 15px 0;
  }
  .source-bar {
    grid-template-columns: 1fr 1fr 55px;
  }
  .table-scroll table {
    min-width: 540px;
  }
  .comparison-table table {
    min-width: 570px;
  }
  .object-item .object-symbol {
    width: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }
  body {
    background: #fff;
    font-size: 10pt;
    color: #111;
  }
  .topbar,
  .main-nav,
  .footer,
  .statusbar,
  .no-print,
  #toast,
  dialog,
  .view-heading .row {
    display: none !important;
  }
  .view-page {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .report-section {
    border: 0;
    border-radius: 0;
    margin-top: 18px;
    overflow: visible;
  }
  .report-section h2 {
    padding: 12px 0;
    font-size: 13pt;
  }
  .report-section .inner, .report-section .hint {
    padding: 10px 0;
  }
  .report-section table {
    font-size: 8pt;
    min-width: 0;
  }
  .report-section td, .report-section th {
    padding: 7px 4px;
  }
  tr {
    break-inside: avoid;
  }
  thead {
    display: table-header-group;
  }
  h2, h3 {
    break-after: avoid;
  }
  .table-scroll {
    overflow: visible;
  }
  .notice {
    padding: 8px 10px;
  }
  .view-heading {
    margin-bottom: 10px;
  }
  .print-only {
    display: block;
  }
  .report-meta {
    grid-template-columns: 1fr 1fr;
  }
  .hint, small {
    color: #444;
  }
  .report-intro {
    padding: 10px 0;
  }
  .map-preview svg {
    width: 100%;
    max-height: 300px;
  }
  button {
    display: none !important;
  }
  a {
    color: #111;
    text-decoration: none;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
.standard-settings, .standard-banner {
  padding: 16px;
  border: 1px solid #cbd5e1;
  background: #f3f6fb;
  border-radius: 8px;
  margin: 12px 0;
}
.standard-banner {
  margin: 12px 20px;
}
.standard-banner p {
  margin: 6px 0;
  font-size: 13px;
}
.octave-fields, .hour-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.octave-fields input, .hour-fields input {
  width: 100%;
  min-width: 0;
}
.correction-row {
  border: 1px solid #dce3eb;
  border-radius: 6px;
  padding: 12px;
}
.assessment-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.assessment-summary dd {
  margin: 0;
}
.standard-settings summary, #dialog-content details summary {
  cursor: pointer;
  padding: 12px 0;
}
@media (max-width: 600px) {
  .octave-fields, .hour-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .assessment-summary {
    grid-template-columns: 1fr;
  }
}
