:root {
  --alfa-red: #ef3124;
  --alfa-red-dark: #c92218;
  --ink: #0b0b0d;
  --ink-soft: #29292d;
  --paper: #f3f2ef;
  --card: #ffffff;
  --line: #d8d6d1;
  --muted: #737277;
  --success: #16835d;
  --danger: #b42318;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(18, 18, 20, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 2%, rgba(239, 49, 36, 0.1), transparent 26rem),
    var(--paper);
  font-family:
    Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.app-shell {
  width: min(100%, 880px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(68px + var(--safe-top));
  padding: calc(14px + var(--safe-top)) 20px 14px;
  color: white;
  background: rgba(11, 11, 13, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
}

.bank-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  letter-spacing: 0.08em;
}

.bank-mark__glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  background: var(--alfa-red);
  border-radius: 9px 9px 2px 9px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.bank-mark__name {
  font-size: 12px;
  font-weight: 800;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #b8b8bb;
  background: #1d1d20;
  border: 1px solid #303034;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.connection-pill__dot {
  width: 7px;
  height: 7px;
  background: #31c48d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(49, 196, 141, 0.12);
}

.connection-pill.is-offline .connection-pill__dot {
  background: var(--alfa-red);
  box-shadow: 0 0 0 4px rgba(239, 49, 36, 0.12);
}

.content {
  min-height: calc(100vh - 130px);
}

.view {
  display: none;
}

.view--active {
  display: block;
  animation: view-in 280ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  position: relative;
  min-height: 288px;
  padding: 48px 24px 44px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(122deg, #0b0b0d 0%, #121216 63%, #25100f 100%);
}

.hero::after {
  position: absolute;
  top: -98px;
  right: -74px;
  width: 240px;
  height: 240px;
  content: "";
  border: 62px solid rgba(239, 49, 36, 0.9);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.hero__eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
  color: #a7a7ab;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0;
  font-size: clamp(42px, 11vw, 76px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.hero h1 span {
  color: var(--alfa-red);
}

.hero__lead {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.hero__caption {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: #a7a7ab;
  font-size: 14px;
}

.hero__line {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: var(--alfa-red);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 20px 18px;
}

.section-heading__kicker,
.detail-hero__kicker {
  margin: 0 0 7px;
  color: var(--alfa-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.section-heading__count {
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  gap: 1px;
}

.section-card {
  position: relative;
  display: flex;
  min-height: 188px;
  padding: 22px 18px 20px;
  overflow: hidden;
  flex-direction: column;
  text-align: left;
  background: var(--card);
  border: 0;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.section-card:active {
  transform: scale(0.982);
}

.section-card::after {
  position: absolute;
  right: -30px;
  bottom: -48px;
  width: 110px;
  height: 110px;
  content: "";
  background: rgba(239, 49, 36, 0.045);
  border-radius: 50%;
  transition: transform 220ms ease;
}

.section-card:hover::after {
  transform: scale(1.35);
}

.section-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  place-items: center;
  color: var(--alfa-red);
  background: #fff3f1;
  border-radius: 12px;
}

.section-card__icon svg,
.detail-hero__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.section-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.section-card__tag {
  position: absolute;
  top: 20px;
  right: 15px;
  padding: 5px 7px;
  color: #88878b;
  background: #f0efec;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.section-card--disabled {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(245, 244, 241, 0.96));
}

.section-card--disabled .section-card__icon {
  color: #8b8986;
  background: #efeeeb;
}

.history-section {
  margin-top: 34px;
}

.section-heading--history {
  padding-top: 0;
}

.history-list {
  display: grid;
  margin: 0 16px;
  gap: 10px;
}

.history-empty {
  display: flex;
  min-height: 108px;
  padding: 22px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  border: 1px dashed #cbc9c4;
  border-radius: 17px;
  text-align: center;
}

.history-empty strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.history-empty span {
  max-width: 340px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.4;
}

.history-card {
  display: grid;
  width: 100%;
  min-height: 92px;
  padding: 15px;
  align-items: center;
  color: var(--ink);
  background: var(--card);
  border: 1px solid #dfddd8;
  border-radius: 17px;
  box-shadow: 0 8px 26px rgba(18, 18, 20, 0.045);
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 13px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.history-card:hover {
  border-color: #c9c6c0;
  box-shadow: 0 12px 30px rgba(18, 18, 20, 0.07);
}

.history-card:active {
  transform: scale(0.988);
}

.history-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--alfa-red);
  background: #fff3f1;
  border-radius: 13px;
}

.history-card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.history-card__body {
  min-width: 0;
}

.history-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.history-card__top strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card__top time {
  flex: 0 0 auto;
  color: #969499;
  font-size: 9px;
}

.history-card__body > span:last-child {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-card__action {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--alfa-red);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.history-card__action b {
  font-size: 15px;
}

@media (max-width: 480px) {
  .history-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .history-card__action {
    display: none;
  }
}

.home-note {
  margin: 20px 22px 36px;
  color: #8b898e;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 20px 20px 10px;
  padding: 10px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.back-button span:first-child {
  color: var(--alfa-red);
  font-size: 21px;
  line-height: 0;
}

.detail-hero {
  display: grid;
  margin: 0 16px 18px;
  padding: 28px 22px;
  color: white;
  background:
    linear-gradient(135deg, #0b0b0d 0%, #17171b 72%, #321513 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  grid-template-columns: auto 1fr;
  gap: 18px;
}

.detail-hero__icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: white;
  background: var(--alfa-red);
  border-radius: 16px 16px 4px 16px;
}

.detail-hero__kicker {
  margin-top: 2px;
}

.detail-hero h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.045em;
  line-height: 1;
}

.detail-hero p:last-child {
  margin: 10px 0 0;
  color: #b6b6ba;
  font-size: 13px;
  line-height: 1.4;
}

.panel {
  margin: 0 16px 18px;
  padding: 22px;
  background: var(--card);
  border: 1px solid #e1dfdb;
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(18, 18, 20, 0.055);
}

.panel__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e6e2;
}

.panel__header > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.panel__header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.panel__header > p {
  max-width: 180px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.panel__index {
  margin: 0;
  color: var(--alfa-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  color: #545358;
  font-size: 11px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: var(--ink);
  background: #f7f6f3;
  border: 1px solid #d9d7d2;
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input:focus,
.field select:focus {
  background: white;
  border-color: var(--alfa-red);
  box-shadow: 0 0 0 3px rgba(239, 49, 36, 0.1);
}

.field input::placeholder {
  color: #a4a3a0;
}

.field__hint {
  color: #949398;
  font-size: 10px;
  line-height: 1.35;
}

.multi-select {
  position: relative;
}

.multi-select__selected {
  min-height: 52px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f6f3;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.multi-select:focus-within .multi-select__selected,
.multi-select.is-open .multi-select__selected {
  border-color: rgba(239, 49, 36, 0.58);
  box-shadow: 0 0 0 3px rgba(239, 49, 36, 0.09);
}

.multi-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 9px 6px 12px;
  border-radius: 999px;
  background: #191919;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.multi-select__chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select__remove {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.multi-select__add {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px dashed rgba(239, 49, 36, 0.46);
  border-radius: 50%;
  background: rgba(239, 49, 36, 0.06);
  color: var(--alfa-red);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.multi-select__add:hover,
.multi-select__add:focus-visible {
  background: rgba(239, 49, 36, 0.12);
}

.multi-select__dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.17);
}

.multi-select.is-open .multi-select__dropdown {
  display: block;
}

.multi-select__search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.field .multi-select__search {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f7f5;
  font-size: 14px;
}

.multi-select__options {
  max-height: min(310px, 46vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
}

.multi-select__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.multi-select__option:hover,
.multi-select__option:focus-visible {
  background: #f3f2ef;
}

.multi-select__option.is-selected {
  color: var(--muted);
  cursor: default;
}

.multi-select__option-mark {
  flex: 0 0 auto;
  color: var(--alfa-red);
  font-weight: 800;
}

.multi-select__empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.toggle-row {
  display: flex;
  min-height: 50px;
  padding: 12px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7f6f3;
  border: 1px solid #d9d7d2;
  border-radius: 12px;
}

.toggle-row__copy strong {
  display: block;
  font-size: 12px;
}

.toggle-row__copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
}

.toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle__track {
  position: absolute;
  inset: 0;
  background: #c9c7c2;
  border-radius: 999px;
  transition: background 180ms ease;
}

.toggle__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  content: "";
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease;
}

.toggle input:checked + .toggle__track {
  background: var(--alfa-red);
}

.toggle input:checked + .toggle__track::after {
  transform: translateX(18px);
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--alfa-red);
  border: 0;
  border-radius: 15px;
  box-shadow: 0 12px 24px rgba(239, 49, 36, 0.22);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover {
  background: var(--alfa-red-dark);
}

.primary-button:active {
  transform: translateY(1px);
  box-shadow: 0 7px 16px rgba(239, 49, 36, 0.2);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-button__arrow {
  font-size: 21px;
}

.panel--result {
  min-height: 190px;
}

.is-hidden {
  display: none !important;
}

.progress-card {
  padding: 24px 18px;
  text-align: center;
}

.progress-orbit {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border: 1px solid #dedcd7;
  border-radius: 50%;
}

.progress-orbit::before,
.progress-orbit::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.progress-orbit::before {
  inset: 8px;
  border: 2px solid transparent;
  border-top-color: var(--alfa-red);
  animation: orbit 1s linear infinite;
}

.progress-orbit::after {
  inset: 25px;
  background: var(--alfa-red);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.progress-card h3,
.error-card h3,
.result-summary h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.progress-card p,
.error-card p,
.result-summary p {
  margin: 9px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.progress-steps {
  display: flex;
  margin-top: 22px;
  justify-content: center;
  gap: 6px;
}

.progress-steps span {
  width: 28px;
  height: 3px;
  background: #dedcd7;
  border-radius: 999px;
}

.progress-steps span:nth-child(1),
.progress-steps span:nth-child(2) {
  background: var(--alfa-red);
}

.error-card {
  padding: 20px;
  color: var(--danger);
  background: #fff3f1;
  border: 1px solid #f5c8c3;
  border-radius: 14px;
}

.error-card p {
  color: #7a3934;
}

.metrics-grid {
  display: grid;
  margin: 18px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.metric {
  min-height: 78px;
  padding: 13px;
  background: #f6f5f2;
  border: 1px solid #e2e0dc;
  border-radius: 13px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.artifacts {
  display: grid;
  gap: 12px;
}

.artifact-image {
  overflow: hidden;
  background: #eee;
  border: 1px solid #dfddd8;
  border-radius: 14px;
}

.artifact-image button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.artifact-image img {
  display: block;
  width: 100%;
  height: auto;
}

.artifact-image p {
  margin: 0;
  padding: 11px 13px;
  background: white;
  border-top: 1px solid #e5e3df;
  font-size: 11px;
  font-weight: 700;
}

.artifact-link {
  display: flex;
  min-height: 58px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  background: #f6f5f2;
  border: 1px solid #dfddd8;
  border-radius: 13px;
  text-decoration: none;
}

.artifact-link__meta {
  min-width: 0;
}

.artifact-link__meta strong {
  display: block;
  font-size: 12px;
}

.artifact-link__meta span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-link__icon {
  color: var(--alfa-red);
  font-size: 21px;
}

.coming-soon {
  padding: 30px 18px;
  text-align: center;
}

.coming-soon__badge {
  display: inline-block;
  margin-bottom: 15px;
  padding: 7px 10px;
  color: var(--alfa-red);
  background: #fff1ef;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.coming-soon h3 {
  margin: 0;
  font-size: 21px;
}

.coming-soon p {
  max-width: 390px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.footer {
  display: flex;
  min-height: calc(62px + var(--safe-bottom));
  padding: 19px 20px calc(19px + var(--safe-bottom));
  align-items: center;
  justify-content: space-between;
  color: #8d8c91;
  background: #0b0b0d;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.17em;
}

.footer span:first-child {
  color: white;
}

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: calc(54px + var(--safe-top)) 10px calc(20px + var(--safe-bottom));
  place-items: center;
  background: rgba(4, 4, 5, 0.94);
  backdrop-filter: blur(10px);
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__close {
  position: absolute;
  top: calc(10px + var(--safe-top));
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  background: #252529;
  border: 1px solid #3a3a3f;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  left: 16px;
  max-width: 540px;
  margin: 0 auto;
  padding: 14px 16px;
  color: white;
  background: #17171a;
  border: 1px solid #343438;
  border-radius: 13px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.26);
  font-size: 12px;
  line-height: 1.4;
}

@media (min-width: 720px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(25, 20, 20, 0.16);
  }

  .topbar {
    position: relative;
  }

  .hero {
    padding-right: 52px;
    padding-left: 52px;
  }

  .section-heading {
    padding-right: 34px;
    padding-left: 34px;
  }

  .sections-grid,
  .history-list {
    margin-right: 30px;
    margin-left: 30px;
  }

  .section-card {
    min-height: 170px;
    padding: 24px;
  }

  .detail-hero,
  .panel {
    margin-right: 30px;
    margin-left: 30px;
  }

  .back-button {
    margin-left: 34px;
  }

  .form-grid {
    gap: 17px;
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .hero {
    min-height: 264px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .section-card {
    min-height: 178px;
    padding: 18px 14px;
  }

  .section-card h3 {
    font-size: 15px;
  }

  .panel {
    padding: 18px;
  }

  .detail-hero {
    padding: 22px 18px;
    grid-template-columns: 1fr;
  }

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

  .field--wide {
    grid-column: auto;
  }
}

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