@font-face {
  font-family: "SBSans";
  src: url("./assets/fonts/SBSansText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "SBSans";
  src: url("./assets/fonts/SBSansText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "SBSans";
  src: url("./assets/fonts/SBSansText-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "SBSans";
  src: url("./assets/fonts/SBSansText-Semibold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --ink: #101828;
  --text: #293449;
  --muted: #66728a;
  --muted-light: #98a3b6;
  --line: #d6e2ef;
  --line-soft: #e7eef6;
  --blue: #0b78e3;
  --cyan: #41bacc;
  --green: #56d94d;
  --green-dark: #078a61;
  --scale-1: #168fb8;
  --scale-2: #2cc36b;
  --scale-3: #2f78c8;
  --scale-4: #176ed8;
  --scale-5: #0f5ec8;
  --scale-track: #e7edf4;
  --scale-neutral: #9ba9ba;
  /* Oriole-inspired accents on shared surfaces; dark tones preserve text contrast. */
  --orange: #a94708;
  --orange-soft: #fff2e7;
  --orange-accent: #ff7913;
  --orange-border: var(--line);
  --orange-subtle: #fff9f4;
  --orange-medium: #8e542e;
  --orange-halo: #ffe5d0;
  /* Candy Apple Red screen reference, without the physical TPM metallic finish. */
  --error: #b60017;
  --error-soft: var(--surface-soft);
  --success-soft: #eafaf1;
  --info-soft: #edf6ff;
  --shadow: 0 22px 50px rgba(34, 58, 84, 0.09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --number-marker-size: 48px;
  --gradient: linear-gradient(100deg, var(--blue) 0%, var(--cyan) 55%, var(--green) 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "SBSans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
}

button,
input,
a {
  font: inherit;
  -webkit-tap-highlight-color: rgba(26, 127, 229, 0.14);
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.prototype-shell {
  width: min(1296px, calc(100vw - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0 54px;
}

.app-header {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(480px, 620px);
  align-items: center;
  gap: 32px;
  padding: 10px 26px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-home-btn {
  width: 96px;
  height: 60px;
  flex: 0 0 96px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
}

.brand-home-btn.is-disabled {
  cursor: default;
}

.brand-mark {
  width: 96px;
  height: 60px;
  display: block;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1.15;
}

.brand-title {
  position: relative;
  display: inline-block;
}

.brand-title-question-link {
  position: absolute;
  width: 18px;
  height: 18px;
  right: 18px;
  top: -9px;
  display: block;
  border-radius: 50%;
  line-height: 0;
  text-decoration: none;
}

.brand-title-question {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.brand-copy span {
  color: var(--muted);
  font-size: 13px;
}

.header-progress {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.step-label,
.step-region,
.step-horizon {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-align: left;
}

.step-label {
  white-space: nowrap;
}

.step-region {
  overflow-wrap: anywhere;
}

.step-context {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.step-context.with-horizon .step-context-label {
  color: var(--muted);
  font-weight: 400;
}

.step-horizon {
  white-space: nowrap;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}

.progress-segment {
  height: 6px;
  border-radius: 999px;
  background: #e2e9f2;
}

.progress-segment.active,
.progress-segment.done {
  background: var(--gradient);
}

main {
  position: relative;
}

.screen {
  display: none;
  padding-top: 42px;
}

.screen.active {
  display: block;
}

.screen-heading {
  margin-bottom: 24px;
}

.screen-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

/* Step headings receive navigation focus but are not interactive controls. */
.screen-heading h1[tabindex="-1"]:focus {
  outline: none;
}

.screen-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.setup-grid {
  display: grid;
  gap: 18px;
}

.section-card,
.registry-card,
.report-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.section-card {
  padding: 22px 28px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.section-title > span {
  display: grid;
  place-items: center;
  width: var(--number-marker-size);
  height: var(--number-marker-size);
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.section-title h2,
.card-heading h2,
.report-nav h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.section-title p,
.card-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.region-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.region-block {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.region-select-field {
  position: relative;
  display: block;
}

.region-select {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 56px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.region-select.is-empty [data-region-picker-value],
.region-select.is-empty [data-source-task-picker-value],
.region-select.is-empty [data-material-region-picker-value] {
  color: var(--muted);
  font-weight: 400;
}

.modal-region-select .region-select-listbox {
  max-height: 264px;
}

.modal-region-select .region-select {
  min-height: 48px;
  height: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  align-items: flex-start;
}

.modal-region-select [data-material-region-picker-value] {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 20px;
  font-weight: 600;
}

.modal-region-select .region-select-chevron {
  top: 24px;
}

.modal-source-task-select .region-select {
  min-height: 48px;
  height: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  align-items: flex-start;
}

.modal-source-task-select [data-source-task-picker-value] {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal-source-task-select .region-select-chevron {
  top: 24px;
}

.modal-source-task-select .region-select-listbox {
  max-height: 320px;
}

.modal-source-task-select .region-select-option {
  align-items: start;
  font-weight: 500;
  line-height: 1.35;
}

.modal-source-task-select .region-option-check {
  margin-top: 1px;
}

.region-select-chevron {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 180ms ease;
}

.region-select-field.is-open .region-select-chevron {
  transform: translateY(-25%) rotate(225deg);
}

.region-select-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(34, 58, 84, 0.16);
}

.region-select-popover[hidden] {
  display: none;
}

.region-search-row {
  display: block;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.region-search-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.region-search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.region-select-listbox {
  display: grid;
  gap: 4px;
  max-height: 308px;
  margin-top: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.region-select-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.region-select-option[aria-selected="true"] {
  background: #e8f2ff;
  color: #185f9e;
}

.region-select-option[hidden] {
  display: none;
}

.region-option-check {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.region-select-option[aria-selected="true"] .region-option-check::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 6px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

[data-region-picker-trigger] {
  gap: 12px;
}

[data-region-picker-value] {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.region-select-option[data-region-option] {
  grid-template-columns: 20px minmax(0, 1fr) auto;
}

.region-work-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.region-work-status[hidden] {
  display: none;
}

.region-work-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}

.region-work-status.is-partial .region-work-status-dot {
  background: #e4ad13;
  box-shadow: 0 0 0 3px rgba(228, 173, 19, 0.15);
}

.region-work-status.is-ready .region-work-status-dot {
  background: #2cc36b;
  box-shadow: 0 0 0 3px rgba(44, 195, 107, 0.13);
}

.region-select-option[data-region-option] .region-work-status {
  margin-right: 8px;
}

.modal-region-select .region-option-check {
  border: 1px solid #9eb4cc;
  border-radius: 4px;
  background: #fff;
}

.modal-region-select .region-select-option[aria-selected="true"] .region-option-check {
  border-color: #185f9e;
  background: #185f9e;
}

.modal-region-select .region-select-option[aria-selected="true"] .region-option-check::after {
  top: 0;
  border-color: #fff;
}

.material-region-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 2px 0;
  padding: 10px 10px 2px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.material-region-picker-footer button {
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: #185f9e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.region-search-empty {
  margin: 0;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.region-search-empty[hidden] {
  display: none;
}

.region-select:disabled {
  cursor: wait;
  opacity: 0.72;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field-caption {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.choice-chip.selected {
  border-color: #101828;
  background: #101828;
  color: #fff;
}

.choice-chip.muted {
  color: var(--muted);
}

.choice-chip.small {
  min-width: 92px;
}

.choice-chip.wide {
  min-width: 238px;
}

.params-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 44px;
  align-items: end;
}

.param-block {
  display: grid;
  align-content: start;
  gap: 12px;
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 12px 20px;
}

.indicator-pill {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid #d9e4f0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  padding: 0 18px 0 48px;
  font-weight: 700;
  text-align: left;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.indicator-pill::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  background-color: var(--cyan);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
}

.indicator-pill:not(.selected) {
  background: #fff;
  color: var(--muted);
}

.indicator-pill:not(.selected)::before {
  background-color: var(--muted);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8M12 8v8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8M12 8v8'/%3E%3C/svg%3E");
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 18px;
}

.footer-actions.single {
  justify-content: flex-end;
}

.footer-actions.left {
  justify-content: flex-start;
}

.btn {
  position: relative;
  min-width: 152px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid transparent;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow: hidden;
  background-clip: padding-box;
}

.btn.primary {
  background: transparent;
  border: 0;
  color: #fff;
  isolation: isolate;
}

.btn.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--gradient);
}

.btn.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn.ghost {
  min-width: auto;
  min-height: 38px;
  padding: 0 18px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.btn.compact {
  min-width: 126px;
  min-height: 42px;
  border-radius: 16px;
  font-size: 14px;
}

.btn:disabled {
  border-color: var(--line);
  background: #e8eef6;
  color: var(--muted-light);
}

.btn.primary:disabled,
.btn.primary.is-disabled,
.btn.primary[aria-disabled="true"] {
  border: 1px solid var(--line);
  background: #e8eef6;
  color: var(--muted-light);
  box-shadow: none;
}

.btn.primary:disabled::before,
.btn.primary.is-disabled::before,
.btn.primary[aria-disabled="true"]::before {
  background: #e8eef6;
}

.registry-card {
  overflow: hidden;
}

.source-task-card {
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.source-task-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 18px;
}

.section-eyebrow {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-task-toolbar h2 {
  margin: 5px 0 5px;
  color: var(--ink);
  font-size: 23px;
}

.source-task-toolbar p,
.source-task-policy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.source-task-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 26px 20px;
}

.source-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.source-summary-chip.ready {
  border-color: #8fe6bd;
  background: #eafaf1;
  color: var(--green-dark);
}

.source-summary-chip.manual {
  border-color: var(--orange-border);
  background: var(--orange-soft);
  color: var(--orange);
}

.source-task-list {
  border-top: 1px solid var(--line-soft);
}

.source-task-list[aria-busy="true"] {
  display: block;
  min-height: 220px;
}

.source-task-loading {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 24px;
  color: var(--muted);
  text-align: center;
}

.source-task-loading strong,
.source-task-loading > span:not(.source-task-spinner) {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.source-task-loading strong {
  color: var(--ink);
  font-size: 18px;
}

.source-task-spinner {
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 3px solid var(--line-soft);
  border-top-color: #1c9fd4;
  border-radius: 50%;
  animation: source-task-spin 700ms linear infinite;
}

@keyframes source-task-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .source-task-spinner {
    animation-duration: 1400ms;
  }
}

.source-task-item {
  display: grid;
  grid-template-columns: var(--number-marker-size) minmax(0, 1fr) 180px;
  gap: 20px;
  align-items: start;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line-soft);
}

.source-task-item:last-child {
  border-bottom: 0;
}

.source-task-index {
  display: grid;
  place-items: center;
  width: var(--number-marker-size);
  height: var(--number-marker-size);
  border-radius: 999px;
  background: #edf5fd;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.source-task-item.ready .source-task-index {
  background: #eafaf1;
  color: var(--green-dark);
}

.source-task-item.manual .source-task-index {
  background: var(--orange-soft);
  color: var(--orange);
}

.source-task-item.rejected .source-task-index {
  background: var(--error-soft);
  color: var(--error);
}

.source-task-content {
  min-width: 0;
}

.source-task-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.source-task-title-row > div > span,
.source-task-region,
.source-task-details summary {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.source-task-title-row > div > span,
.source-task-region {
  color: var(--muted);
}

.source-task-material-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.source-task-title-row h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.source-task-region {
  margin: 7px 0 0;
}

.source-task-state {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.source-task-material-count {
  line-height: 1.2;
  white-space: nowrap;
}

.source-task-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.source-task-status.ready {
  background: #eafaf1;
  color: var(--green-dark);
}

.source-task-status.rejected {
  background: var(--error-soft);
  color: var(--error);
}

.source-task-details {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.source-task-details summary {
  cursor: pointer;
  color: var(--ink);
  transition: color 180ms ease;
}

.source-task-details summary:hover,
.source-task-details summary:focus-visible {
  color: var(--ink);
}

.source-task-details ul {
  margin: 9px 0 0;
  padding-left: 19px;
  line-height: 1.5;
}

.source-task-validation {
  margin: 9px 0 0;
  color: var(--orange);
  font-size: 12px;
  line-height: 1.45;
}

.source-task-validation.ready {
  color: #2f7a63;
}

.source-task-validation.rejected {
  color: var(--error);
}

.source-task-action {
  display: grid;
  justify-items: end;
  gap: 9px;
}

.source-task-action .btn {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

#refreshSourceTasks.primary:not(:disabled)::before,
.manual-clear-btn.primary:not(:disabled)::before,
.source-task-action.single .btn.primary::before {
  background: #101828;
}

.source-data-modal {
  width: min(980px, calc(100vw - 48px));
}

.source-data-group {
  margin: -10px 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.source-data-files {
  display: grid;
  gap: 20px;
}

.source-data-file {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.source-data-file-heading {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.source-data-file-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.source-data-file-heading strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.source-data-table-wrap {
  overflow-x: auto;
}

.source-data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}

.source-data-table th,
.source-data-table td {
  padding: 13px 14px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.source-data-table th:last-child,
.source-data-table td:last-child {
  border-right: 0;
}

.source-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.source-data-table th {
  background: #eff6fd;
  color: var(--ink);
  font-weight: 700;
}

.source-data-table th:first-child,
.source-data-table td:first-child {
  width: 52px;
  color: var(--muted);
  text-align: center;
}

.source-data-table th:nth-child(2) {
  width: 46%;
}

.source-data-empty {
  margin: 0;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.source-data-empty-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.source-task-policy {
  padding: 16px 26px 18px;
  border-top: 1px solid var(--line-soft);
  background: #f8fbff;
}

.registry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.counter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.counter-chip {
  min-width: 142px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}

.counter-chip strong {
  color: var(--ink);
  font-size: 17px;
}

.counter-chip.warn {
  border-color: var(--orange-border);
  background: var(--orange-soft);
  color: var(--orange);
}

.counter-chip.warn strong {
  color: var(--orange);
}

.registry-table {
  overflow-x: auto;
}

.registry-row {
  min-width: 1120px;
  display: grid;
  grid-template-columns: minmax(270px, 1.8fr) 170px 190px 78px 130px 170px;
  gap: 18px;
  align-items: center;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line-soft);
}

.registry-row:last-child {
  border-bottom: 0;
}

.registry-empty {
  min-width: 1120px;
  padding: 32px 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  border-bottom: 1px solid var(--line-soft);
}

.registry-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: #f8fbff;
}

.material-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.material-name strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  word-break: break-word;
}

.material-name span,
.table-muted {
  color: var(--muted);
  font-size: 13px;
}

.material-name .material-summary {
  color: var(--green-dark);
  font-weight: 700;
}

.material-name .material-comparison-summary {
  color: var(--cyan);
  font-weight: 700;
}

.material-name .material-calculation-summary {
  color: var(--orange);
  font-weight: 700;
}

.material-name .material-calculation-summary.has-inputs {
  color: var(--green-dark);
}

.material-name .material-processing-summary {
  font-weight: 700;
}

.material-name .material-processing-summary.success {
  color: var(--green-dark);
}

.material-name .material-processing-summary.neutral {
  color: var(--muted);
}

.material-name .material-processing-summary.warn {
  color: var(--orange);
}

.type-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: fit-content;
  min-width: 76px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.status-badge.ready {
  border-color: #8fe6bd;
  background: #eafaf1;
  color: var(--green-dark);
}

.status-badge.review {
  border-color: var(--orange-border);
  background: var(--orange-soft);
  color: var(--orange);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dots-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.agents-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 22px;
  align-items: stretch;
}

.agents-card {
  min-height: 588px;
}

.card-heading {
  margin-bottom: 18px;
}

.scroll-area {
  overflow: auto;
  padding-right: 10px;
  scrollbar-color: #8fa2bb #e7eef6;
}

.scroll-area::-webkit-scrollbar {
  width: 8px;
}

.scroll-area::-webkit-scrollbar-track {
  background: #e7eef6;
  border-radius: 999px;
}

.scroll-area::-webkit-scrollbar-thumb {
  background: #8fa2bb;
  border-radius: 999px;
}

.orchestrator-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #b8edcf;
  border-radius: 18px;
  background: var(--success-soft);
}

.orchestrator-panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.orchestrator-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.orchestrator-panel > strong {
  color: var(--green-dark);
  font-size: 14px;
  white-space: nowrap;
}

.calculation-strip {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.calculation-strip strong {
  color: var(--ink);
  font-size: 16px;
}

.calculation-strip span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.calculation-strip.warn {
  border-color: var(--orange-border);
  background: var(--orange-soft);
}

.calculation-strip.success {
  border-color: #8fe6bd;
  background: #eafaf1;
}

.manual-input-panel {
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #c7d7ea;
  border-radius: 16px;
  background: #fbfdff;
}

.manual-input-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.manual-input-head h3,
.manual-input-group h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
}

.manual-input-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.manual-input-group {
  display: grid;
  gap: 10px;
}

.manual-input-note {
  max-width: 860px;
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.manual-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-input-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.manual-field {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manual-field.missing {
  border-color: var(--orange-border);
  background: var(--orange-subtle);
}

.manual-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.manual-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
  color: var(--ink);
  font: inherit;
}

.manual-field em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.correction-input-panel {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.region-parameter-grid {
  display: grid;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.region-parameter-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 200px;
  align-items: center;
  gap: 24px;
  min-width: 0;
  min-height: 90px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.region-parameter-copy {
  display: grid;
  justify-items: start;
  gap: 7px;
  min-width: 0;
}

.region-parameter-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.region-parameter-reading {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.region-parameter-value {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.region-parameter-unit {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.region-parameter-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.region-parameter-status.is-confirmed {
  color: var(--green-dark);
  background: var(--success-soft);
}

.region-parameter-status .step3-status-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.region-parameter-card.is-missing .region-parameter-value,
.region-parameter-card.is-missing .region-parameter-unit,
.region-parameter-card.is-missing .region-parameter-status {
  color: var(--muted);
}

.region-parameter-card.is-missing .region-parameter-status {
  padding-left: 0;
}

#screen-corrections .correction-card {
  position: relative;
}

.correction-panel-toolbar {
  display: block;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
}

.correction-panel-toolbar p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.correction-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.correction-field-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.correction-field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.correction-field-control {
  display: block;
  margin-top: 8px;
}

.correction-field-control input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}

.correction-field-control input::placeholder {
  color: var(--muted);
  font-weight: 400;
  opacity: 1;
}

.correction-field-control input[aria-invalid="true"] {
  border-color: var(--error);
}

.correction-field-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.correction-field-status.is-manual {
  color: #705c00;
  background: #fff9cc;
}

.correction-field-status.is-calculated {
  color: var(--scale-1);
  background: #e8f7fb;
}

.correction-field-status .step3-status-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.correction-field-error {
  margin: 0;
  color: var(--error);
  font-size: 13px;
}

.correction-save-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.correction-save-feedback[hidden] {
  display: none;
}

#screen-corrections .manual-clear-btn {
  position: relative;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border-color: transparent;
  border-radius: 8px;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

#screen-corrections .manual-clear-btn:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--text);
}

#screen-corrections .manual-clear-btn[hidden] {
  display: none;
}

#screen-corrections .manual-clear-btn .step3-status-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

#screen-corrections .correction-card > .footer-actions {
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

#screen-corrections .correction-nav-actions {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

[data-correction-save-status][data-phase="saved"] {
  color: var(--green-dark);
}

[data-correction-save-status][data-phase="saving"] {
  color: var(--cyan);
}

[data-correction-save-status][data-phase="error"],
[data-correction-save-status][data-phase="invalid"] {
  color: var(--error);
}

.method-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 18px;
}

.method-card {
  align-self: start;
}

.report-mini-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.coefficient-list {
  display: grid;
  gap: 10px;
}

.coefficient-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 16px;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.coefficient-list strong {
  font-size: 14px;
  line-height: 1.2;
}

.coefficient-list span {
  justify-self: end;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.coefficient-list span.warn {
  color: var(--orange);
}

.method-note {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.method-note strong {
  font-size: 14px;
  color: var(--ink);
}

.method-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.method-gap {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--orange-border);
  border-radius: 14px;
  background: var(--orange-soft);
}

.method-gap strong {
  color: var(--orange);
  font-size: 14px;
}

.method-gap span {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.horizon-formulas {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.horizon-formulas div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}

.horizon-formulas strong {
  color: var(--ink);
  font-size: 13px;
}

.horizon-formulas span {
  color: var(--muted);
  font-size: 13px;
}

.horizon-formulas em {
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}

.mini-report-list {
  flex: 1;
  max-height: none;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 8px;
}

.mini-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
}

.mini-card strong {
  font-size: 14px;
}

.mini-card span {
  color: var(--text);
}

.mini-card.success {
  border-color: #b8edcf;
  background: var(--success-soft);
}

.mini-card.success strong {
  color: var(--green-dark);
}

.mini-card.warn {
  border-color: var(--orange-border);
  background: var(--orange-soft);
}

.mini-card.warn strong {
  color: var(--orange);
}

.mini-card.info {
  border-color: #b8d8f6;
  background: var(--info-soft);
}

.mini-card.info strong {
  color: #0870c8;
}

.report-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}

.report-heading > :first-child {
  flex: 1 1 440px;
  min-width: 0;
}

.report-actions {
  margin-top: 8px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.download-btn {
  margin-top: 0;
}

.dashboard-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-empty-page {
  padding-top: 72px;
}

.dashboard-empty-card {
  min-height: 520px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 28px;
}

.dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.dashboard-board {
  display: grid;
  gap: 28px;
}

.dashboard-horizon-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-kpi,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.dashboard-kpi {
  display: flex;
  position: relative;
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
  padding: 18px 20px;
}

.dashboard-kpi.has-icon {
  padding-right: 92px;
}

.dashboard-kpi-icon {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 70px;
  height: 70px;
  transform: translateY(-50%);
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.dashboard-kpi-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-kpi strong {
  display: block;
  color: var(--ink);
  font-size: clamp(22px, 1.82vw, 27px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.dashboard-kpi.has-icon strong {
  font-size: 24px;
  white-space: nowrap;
}

.dashboard-kpi strong.is-missing {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.2;
}

.dashboard-kpi p {
  align-self: end;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.98fr);
  gap: 24px;
}

.dashboard-panel {
  min-height: 300px;
  padding: 26px 28px;
}

.dashboard-panel-heading h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.12;
}

.dashboard-panel-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-bars {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.dashboard-bar-row > div:first-child,
.dashboard-inline-result,
.dashboard-region-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-bar-row span,
.dashboard-inline-result span,
.dashboard-region-row span,
.dashboard-region-summary span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-bar-row strong,
.dashboard-inline-result strong {
  color: var(--scale-1);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-region-row strong {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-bar-row.accent-scale-1 strong,
.dashboard-bar-row.accent-cyan strong {
  color: var(--scale-1);
}

.dashboard-bar-row.accent-scale-2 strong,
.dashboard-bar-row.accent-blue strong {
  color: var(--scale-2);
}

.dashboard-bar-row.accent-scale-3 strong,
.dashboard-bar-row.accent-green strong {
  color: var(--scale-3);
}

.dashboard-bar-row.accent-scale-4 strong {
  color: var(--scale-4);
}

.dashboard-bar-row.accent-scale-5 strong {
  color: var(--scale-5);
}

.dashboard-bar-row strong.is-missing,
.dashboard-bar-row.is-missing strong {
  color: var(--muted);
}

.dashboard-inline-result strong.is-missing {
  color: var(--muted);
}

.dashboard-bar-track {
  position: relative;
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.dashboard-bars .dashboard-bar-row:not(.is-missing) .dashboard-bar-track {
  height: 8px;
  background: var(--scale-track);
}

.dashboard-bars .dashboard-bar-row.is-missing .dashboard-bar-track {
  background: #e8eef6;
}

.dashboard-bar-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--scale-1);
}

.dashboard-bar-track.scale-1 i {
  background: var(--scale-1);
}

.dashboard-bar-track.scale-2 i,
.dashboard-bar-track.blue i {
  background: var(--scale-2);
}

.dashboard-bar-track.scale-3 i,
.dashboard-bar-track.green i {
  background: var(--scale-3);
}

.dashboard-bar-track.scale-4 i {
  background: var(--scale-4);
}

.dashboard-bar-track.scale-5 i {
  background: var(--scale-5);
}

.dashboard-bar-track.neutral {
  height: 8px;
  margin: 0;
  background: var(--scale-track);
}

.dashboard-bar-track.neutral i {
  background: var(--scale-neutral);
}

.dashboard-inline-result {
  min-height: 42px;
  margin-top: 22px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.dashboard-inline-result span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-region-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 20px;
  align-items: start;
  margin-top: 24px;
}

.dashboard-region-summary {
  width: 132px;
  min-height: 126px;
  display: grid;
  align-content: center;
  justify-items: center;
  align-self: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  text-align: center;
  transform: translateX(13px);
}

.dashboard-region-summary strong {
  display: block;
  margin-top: 4px;
  color: #526176;
  font-size: 40px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-region-summary small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-region-summary strong.score-low,
.dashboard-region-row strong.score-low {
  color: var(--orange);
}

.dashboard-region-summary strong.score-medium,
.dashboard-region-row strong.score-medium {
  color: var(--orange-medium);
}

.dashboard-region-summary strong.score-good {
  color: var(--cyan);
}

.dashboard-region-row strong.score-good {
  color: var(--cyan);
}

.dashboard-region-summary strong.score-neutral,
.dashboard-region-row strong.score-neutral {
  color: #526176;
}

.dashboard-region-bars {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.dashboard-region-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(82px, 0.64fr) 76px;
  gap: 12px;
}

.dashboard-region-row strong {
  color: var(--text);
  text-align: right;
}

.dashboard-region-row.score-low .dashboard-bar-track.neutral i {
  background: var(--orange);
}

.dashboard-region-row.score-medium .dashboard-bar-track.neutral i {
  background: var(--orange-medium);
}

.dashboard-region-row.score-good .dashboard-bar-track.neutral i {
  background: var(--cyan);
}

.dashboard-region-row.score-neutral .dashboard-bar-track.neutral i {
  background: #9ba9ba;
}

.report-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}

.report-nav {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 24px 0 0;
}

.report-nav h2 {
  margin-bottom: 18px;
}

.report-nav-list {
  display: grid;
  gap: 6px;
}

.report-nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
}

.report-nav-item span {
  font-size: 13px;
  font-weight: 700;
}

.report-nav-item strong {
  font-size: 14px;
  font-weight: 400;
}

.report-nav-item em {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--orange-accent);
  box-shadow: 0 0 0 4px var(--orange-halo);
}

.report-nav-item.active {
  border-color: #41bacc;
  background: #effcff;
  color: var(--ink);
}

.report-nav-item.active strong {
  font-weight: 700;
}

.report-document {
  max-height: 620px;
  min-height: 0;
  min-width: 0;
  align-self: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.doc-section h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 28px;
}

.doc-section p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.doc-alert {
  display: grid;
  gap: 6px;
  margin: 18px 0 22px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}

.doc-alert strong {
  color: var(--ink);
}

.doc-alert span {
  color: var(--text);
}

.doc-alert.warn {
  border-color: var(--orange-border);
  background: var(--orange-soft);
}

.doc-alert.warn strong {
  color: var(--orange);
}

.doc-gap-alert {
  gap: 10px;
  margin: 2px 0 24px;
  padding: 20px 22px;
  border-color: var(--orange-border);
  border-radius: 18px;
  background: var(--orange-soft);
}

.doc-gap-alert strong {
  font-size: 20px;
  line-height: 1.25;
}

.doc-gap-alert span {
  font-size: 17px;
  line-height: 1.55;
}

.doc-alert.info {
  border-color: #b8d8f6;
  background: var(--info-soft);
}

.doc-alert.success {
  border-color: #8fe6bd;
  background: var(--success-soft);
}

.doc-alert.success strong {
  color: var(--green-dark);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 13px;
}

.doc-table th,
.doc-table td {
  border: 1px solid #dbe6f1;
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  background: #eff6fd;
  color: var(--ink);
  font-weight: 700;
}

.doc-table .doc-table-group th {
  padding-top: 11px;
  padding-bottom: 11px;
  background: #f7fbff;
  color: #168fa3;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.doc-table td {
  color: var(--text);
}

.doc-table-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(40, 52, 67, 0.46);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(780px, calc(100vw - 48px));
  max-height: min(86vh, 860px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 34px;
}

.icon-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 34px;
  line-height: 1;
}

.modal-title {
  max-width: calc(100% - 70px);
  margin: 0 0 22px;
  font-size: 30px;
  line-height: 1.12;
}

.modal-block {
  margin-top: 24px;
}

.modal-block h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.add-material-modal .modal-block h3 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.modal-choice-block .region-select {
  min-height: 48px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.modal-choice-block .region-select.is-empty {
  color: var(--muted);
  font-weight: 400;
}

.modal-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.input-grid.file-only {
  grid-template-columns: 1fr;
}

.modal-field {
  display: grid;
  gap: 7px;
}

.modal-field > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.modal-field input,
.modal-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  padding: 0 13px;
  color: var(--text);
  font: inherit;
}

.source-metadata-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.add-material-modal .modal-field > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.add-material-modal .modal-field input {
  min-height: 48px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.add-material-modal .modal-field input::placeholder {
  color: var(--muted);
  font-weight: 400;
  opacity: 1;
}

.add-material-modal .modal-field input[type="date"]:not(.has-value) {
  color: var(--muted);
  font-weight: 400;
}

.add-material-modal .modal-field input[type="date"]::-webkit-datetime-edit {
  color: inherit;
  font: inherit;
}

.add-material-modal .modal-field input[type="date"].has-value {
  color: var(--text);
  font-weight: 500;
}

.source-metadata-wide {
  grid-column: 1 / -1;
}

.drop-zone {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px dashed #9eb4cc;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--text);
  font-size: 14px;
  text-align: center;
  width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.drop-zone.drag-active {
  border-color: var(--cyan);
  background: #effcff;
  color: var(--ink);
}

.add-material-modal .drop-zone {
  min-height: 72px;
  gap: 3px;
  padding: 14px 16px;
  line-height: 1.35;
}

.add-material-modal .drop-zone.has-file {
  justify-items: start;
  border-style: solid;
  background: var(--surface-soft);
  text-align: left;
}

.drop-zone-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.drop-zone-file {
  max-width: 100%;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.drop-zone-formats {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.drop-zone-action {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.modal-processing-note {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.source-insights {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.material-name .material-source-group {
  color: var(--cyan);
  font-weight: 700;
}

.source-manifest {
  display: grid;
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #b9dceb;
  border-radius: 14px;
  background: #f4fbfe;
}

.source-manifest-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.source-manifest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.source-manifest-grid > div,
.source-manifest-url {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-manifest-grid span,
.source-manifest-url span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.source-manifest-grid strong,
.source-manifest-url strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.source-manifest-url {
  position: relative;
  padding-right: 42px;
}

.source-manifest-url .copy-btn {
  position: absolute;
  right: 0;
  bottom: 0;
}

.source-manifest p {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  line-height: 1.45;
}

.source-hash {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px !important;
}

.source-insights > strong {
  color: var(--ink);
  font-size: 16px;
}

.source-insights > em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
}

.source-insights.empty {
  background: var(--orange-soft);
  border-color: var(--orange-border);
}

.source-insights.empty span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.source-insight-list {
  display: grid;
  gap: 10px;
}

.source-insight {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
}

.source-insight span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.source-insight strong {
  color: var(--ink);
  font-size: 14px;
}

.source-insight p {
  max-height: 92px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 26px;
}

.modal-actions .btn {
  width: 220px;
  min-width: 220px;
}

.review-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.review-meta div {
  display: grid;
  gap: 5px;
}

.review-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.review-material {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
}

.review-material span {
  color: var(--muted);
  font-weight: 700;
}

.review-material strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  word-break: break-word;
  font-size: 20px;
}

.copy-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.copy-btn svg {
  width: 22px;
  height: 22px;
}

.preview-box {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.round-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.doc-preview {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
  overflow: hidden;
}

.preview-box.expanded .doc-preview {
  min-height: min(68vh, 720px);
}

.pdf-preview-frame {
  width: 100%;
  height: 420px;
  border: 0;
  background: #fff;
}

.html-preview-frame {
  width: 100%;
  height: 520px;
  border: 0;
  background: #fff;
}

.preview-box.expanded .pdf-preview-frame {
  height: min(68vh, 720px);
}

.preview-box.expanded .html-preview-frame {
  height: min(68vh, 720px);
}

.docx-preview-host {
  width: 100%;
  height: 520px;
  overflow: auto;
  border-radius: 14px;
  background: #eef4fa;
}

.docx-preview-loading,
.docx-preview-error {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.docx-preview-error {
  gap: 8px;
}

.docx-preview-error strong {
  color: var(--ink);
}

.docx-preview-error span {
  max-width: 520px;
}

.docx-preview-host .docx-wrapper {
  min-height: 100%;
  padding: 24px 16px;
  background: #eef4fa;
}

.docx-preview-host .docx-wrapper > section.docx {
  margin: 0 auto 18px;
  box-shadow: 0 14px 30px rgba(40, 60, 86, 0.12);
}

.preview-box.expanded .docx-preview-host {
  height: min(68vh, 720px);
}

.doc-page-preview {
  width: min(520px, calc(100% - 44px));
  min-height: 310px;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #d4dfec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(40, 60, 86, 0.08);
  overflow: hidden;
}

.preview-box.expanded .doc-page-preview {
  width: min(720px, calc(100% - 48px));
  min-height: 620px;
}

.doc-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.doc-page-body {
  padding: 26px 34px;
}

.doc-page-body h4 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 20px;
}

.doc-page-body p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.doc-preview-text {
  display: grid;
  gap: 10px;
}

.doc-preview-text p {
  margin: 0;
}

.doc-page-body > span {
  display: block;
  width: var(--w);
  height: 8px;
  margin-bottom: 11px;
  border-radius: 999px;
  background: #dfe8f2;
}

.doc-page-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 24px;
  border: 1px solid #dbe6f1;
  background: #dbe6f1;
}

.doc-page-table span {
  min-height: 34px;
  background: #f8fbff;
}

.toast {
  position: fixed;
  right: 24px;
  top: 128px;
  z-index: 120;
  width: min(380px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe5ee;
  border-left: 4px solid var(--toast-accent);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 16px 38px rgba(23, 43, 64, 0.16);
  transform-origin: right top;
}

.toast--success {
  --toast-accent: #0a8f5a;
  --toast-icon-background: #e8f7ef;
  --toast-icon-color: #087748;
}

.toast--error {
  --toast-accent: var(--error);
  --toast-icon-background: #fff0f1;
  --toast-icon-color: var(--error);
}

.toast--info {
  --toast-accent: #2675c9;
  --toast-icon-background: #eaf3fc;
  --toast-icon-color: #1f65ad;
}

.toast__icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--toast-icon-background);
  color: var(--toast-icon-color);
}

.toast__icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.toast__spinner {
  animation: toast-spin 900ms linear infinite;
}

.toast__content {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-top: 1px;
}

.toast__title,
.toast__description {
  overflow-wrap: anywhere;
}

.toast__title {
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.toast__description {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
}

.toast__close {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #68778b;
  font: inherit;
  cursor: pointer;
}

.toast__close:hover {
  color: var(--text);
  background: #f1f5f9;
}

.toast__close svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.toast.is-visible {
  animation: toast-enter 180ms ease-out both;
}

.toast.is-leaving {
  pointer-events: none;
  animation: toast-leave 160ms ease-in both;
}

@keyframes toast-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes toast-leave {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.98);
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .prototype-shell {
    width: min(1040px, calc(100vw - 32px));
  }

  .app-header {
    grid-template-columns: minmax(260px, 1fr) minmax(400px, 520px);
    gap: 24px;
  }

  .region-layout,
  .params-layout,
  .agents-layout,
  .report-shell {
    grid-template-columns: 1fr;
  }

  .report-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 24px;
  }

  .report-document {
    max-height: none;
    overflow-x: auto;
  }

  .dashboard-kpis,
  .dashboard-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .indicator-grid {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
  }

  .correction-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .toast {
    right: 12px;
    top: calc(88px + env(safe-area-inset-top));
    width: calc(100vw - 24px);
  }

  .prototype-shell {
    width: min(100vw - 18px, 680px);
    padding-top: 12px;
  }

  .app-header {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .header-progress {
    width: 100%;
    gap: 8px;
  }

  .progress-track {
    gap: 10px;
  }

  .screen {
    padding-top: 34px;
  }

  .screen-heading h1 {
    font-size: 30px;
  }

  .section-card,
  .registry-toolbar,
  .source-task-toolbar,
  .report-shell {
    padding: 20px;
  }

  .indicator-grid,
  .input-grid,
  .region-parameter-grid,
  .source-metadata-grid {
    grid-template-columns: 1fr;
  }

  .source-metadata-wide {
    grid-column: auto;
  }

  .source-manifest-grid {
    grid-template-columns: 1fr;
  }

  .source-task-toolbar,
  .source-task-title-row {
    flex-direction: column;
  }

  .source-task-item {
    grid-template-columns: var(--number-marker-size) minmax(0, 1fr);
    padding: 18px 20px;
  }

  .source-task-action {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }

  .source-task-state {
    justify-items: start;
  }

  .source-task-action.single .btn {
    grid-column: 1 / -1;
  }

  .correction-panel-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #screen-corrections .correction-input-panel {
    margin-top: 18px;
  }

  #screen-corrections .correction-panel-toolbar {
    display: block;
  }

  #screen-corrections .manual-clear-btn {
    position: relative;
    align-self: flex-start;
    width: auto;
  }

  #screen-corrections .correction-card > .footer-actions.has-reset-action {
    grid-template-columns: 1fr;
  }

  #screen-corrections .correction-card > .footer-actions:not(.has-reset-action) {
    grid-template-columns: 1fr;
  }

  #screen-corrections .correction-card > .footer-actions.has-reset-action .manual-clear-btn {
    justify-self: start;
  }

  #screen-corrections .correction-nav-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-left: 0;
  }

  #screen-corrections .correction-nav-actions .btn {
    width: 100%;
  }

  body:has(#screen-corrections.active .footer-actions.has-reset-action) {
    padding-bottom: calc(146px + env(safe-area-inset-bottom));
  }

  #screen-corrections .region-parameter-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-empty-page {
    padding-top: 36px;
  }

  .dashboard-empty-card,
  .dashboard-panel {
    padding: 20px;
  }

  .dashboard-kpis,
  .dashboard-panels,
  .dashboard-region-content {
    grid-template-columns: 1fr;
  }

  .dashboard-region-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .dashboard-region-row strong {
    text-align: left;
  }

  .footer-actions,
  .screen-heading.report-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    margin: 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(243, 247, 251, 0.96);
    box-shadow: 0 -14px 32px rgba(34, 58, 84, 0.08);
  }

  .footer-actions.single,
  .footer-actions.left {
    grid-template-columns: 1fr;
  }

  .footer-actions .btn {
    min-width: 0;
    padding: 0 12px;
  }

  .btn,
  .download-btn {
    width: 100%;
  }

  .report-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .report-heading > :first-child {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast.is-visible,
  .toast.is-leaving,
  .toast__spinner {
    animation: none;
  }
}

@media (max-width: 420px) {
  .source-task-action {
    grid-template-columns: 1fr;
  }

  .source-task-action .btn {
    grid-column: 1;
  }
}
