:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: rgba(12, 24, 42, 0.86);
  --panel: rgba(10, 20, 36, 0.76);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #9eb0c7;
  --accent: #4db6ff;
  --accent-strong: #1296ff;
  --success: #48d597;
  --warning: #ffcc66;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

.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;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(38, 142, 255, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(18, 150, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #07111f 0%, #050c16 100%);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

body.content-protected {
  -webkit-user-select: none;
  user-select: none;
}

body.content-protected input,
body.content-protected textarea,
body.content-protected [contenteditable="true"],
body.content-protected .allow-copy {
  -webkit-user-select: text;
  user-select: text;
}

body.content-protected img {
  -webkit-user-drag: none;
}

.protection-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1300;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(255, 204, 102, 0.3);
  border-radius: 14px;
  background: rgba(16, 22, 34, 0.94);
  color: #ffe1a3;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.protection-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(77, 182, 255, 0.18), transparent 32%),
    rgba(3, 8, 16, 0.88);
  backdrop-filter: blur(10px);
}

.login-overlay--hidden {
  display: none;
}

.login-card {
  width: min(100%, 520px);
  padding: 32px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(77, 182, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(8, 16, 28, 0.96);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
}

.login-card__lead {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  margin-top: 24px;
}

.login-message {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.login-message--success {
  color: var(--success);
}

.login-message--warning {
  color: var(--warning);
}

.login-message--neutral {
  color: var(--muted);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(77, 182, 255, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(5, 11, 20, 0.78);
  box-shadow: var(--shadow);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 34%),
    radial-gradient(circle at 78% 20%, rgba(77, 182, 255, 0.18), transparent 20%);
  pointer-events: none;
}

.topbar,
.hero__content,
.content {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffffff);
  box-shadow: 0 0 24px rgba(77, 182, 255, 0.9);
}

.brand__text,
.topbar__meta {
  color: var(--text);
}

.topbar__meta,
.eyebrow,
.result-card__label,
.input-label,
.input-hint,
.detail-box__text,
.notes-list,
.chip {
  color: var(--muted);
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 28px;
  align-items: stretch;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  min-width: 0;
  padding: 10px 0;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero__copy h1,
.section-heading h2,
.decoder-card__header h2,
.detail-box h3 {
  margin: 0;
}

.hero__copy h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero__logo-title {
  max-width: 620px;
  margin: 0;
}

.hero__logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
}

.hero__lead {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: 1.06rem;
  line-height: 1.7;
  color: #d8e4f2;
}

.hero__stats,
.result-grid,
.details-layout {
  display: grid;
  gap: 18px;
}

.hero__stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 72px;
}

.stat-card,
.decoder-card,
.panel,
.detail-box,
.result-card {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.stat-card,
.result-card {
  padding: 18px;
  border-radius: var(--radius-md);
}

.stat-card__value {
  display: block;
  margin-bottom: 6px;
  font-size: 1.7rem;
  font-weight: 800;
}

.stat-card__label {
  font-size: 0.92rem;
  color: var(--muted);
}

.decoder-card {
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.decoder-card__header {
  margin-bottom: 20px;
}

.decoder-card__header h2 {
  font-size: 1.9rem;
  line-height: 1.05;
}

.decoder-form {
  display: grid;
  gap: 12px;
}

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

input,
button {
  border: 0;
  font: inherit;
}

input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: 1px solid transparent;
  transition: outline-color 160ms ease, background 160ms ease;
}

input:focus {
  outline-color: rgba(77, 182, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

button {
  padding: 16px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #001221;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(18, 150, 255, 0.35);
}

.status-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.status-box--neutral {
  background: rgba(255, 255, 255, 0.05);
  color: #d8e4f2;
}

.status-box--success {
  background: rgba(72, 213, 151, 0.12);
  color: #bcf4db;
}

.status-box--warning {
  background: rgba(255, 204, 102, 0.12);
  color: #ffe2a1;
}

.content {
  margin-top: 28px;
  display: grid;
  gap: 28px;
}

.panel {
  padding: 28px;
  border-radius: var(--radius-xl);
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading__lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-heading--details {
  margin-bottom: 18px;
}

.section-heading--compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 1.8rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.result-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.18rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.details-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.detail-box--wide {
  grid-column: 1 / -1;
}

.detail-box--vida {
  grid-column: span 6;
}

.detail-box--priority {
  grid-column: span 6;
}

.detail-box--compact {
  grid-column: span 4;
}

.database-layout {
  display: grid;
  gap: 18px;
}

.detail-box {
  min-width: 0;
  min-height: 100%;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.detail-box h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.vida-box__heading {
  margin-bottom: 10px;
}

.vida-box__heading .eyebrow {
  margin-bottom: 4px;
  letter-spacing: 0.16em;
}

.vida-box__heading h3 {
  font-size: 0.98rem;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.vida-box__heading .detail-box__text {
  margin-top: 6px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.detail-box--vida {
  background:
    linear-gradient(180deg, rgba(171, 196, 222, 0.045), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, rgba(14, 17, 20, 0.98), rgba(9, 10, 12, 0.98));
  border-color: rgba(164, 187, 211, 0.16);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.34);
}

.report-accordion {
  padding: 0;
  overflow: hidden;
}

.report-accordion__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  cursor: pointer;
  list-style: none;
}

.report-accordion__summary::-webkit-details-marker {
  display: none;
}

.report-accordion__summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.report-accordion__summary .detail-box__text {
  margin-right: 12px;
}

.report-accordion__icon {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-right: 2px solid rgba(216, 228, 242, 0.86);
  border-bottom: 2px solid rgba(216, 228, 242, 0.86);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.report-accordion[open] .report-accordion__icon {
  transform: rotate(225deg);
}

.report-accordion__content {
  padding: 0 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.report-accordion--secondary .report-accordion__summary {
  padding-top: 18px;
  padding-bottom: 18px;
}

.report-accordion--secondary .report-accordion__content {
  padding-top: 18px;
}

.detail-box__text {
  margin: 12px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.detail-table {
  min-width: 480px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.93rem;
}

.chip--muted {
  opacity: 0.86;
}

.notes-list {
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.save-folder-label,
.save-status {
  margin: 12px 0 0;
  line-height: 1.6;
}

.save-folder-label {
  color: #d8e4f2;
}

.save-status--neutral {
  color: var(--muted);
}

.save-status--success {
  color: var(--success);
}

.save-status--warning {
  color: var(--warning);
}

.report-shell {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.report-output {
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 0.93rem/1.7 "Consolas", "Courier New", monospace;
  color: #d8e4f2;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.match-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.match-table--compact {
  min-width: 640px;
}

.match-table th,
.match-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.match-table th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.match-table td {
  font-size: 0.95rem;
  line-height: 1.55;
}

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

.vida-table {
  min-width: 0;
}

.vida-table thead th {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #aebcca;
  background: rgba(159, 178, 198, 0.07);
}

.vida-table th,
.vida-table td {
  padding: 8px 12px;
}

.vida-table th:first-child,
.vida-table td:first-child {
  width: 38%;
}

.vida-table td:first-child {
  color: #c2cede;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.vida-table td:last-child {
  color: #f2f6fb;
  font-size: 0.9rem;
  line-height: 1.45;
}

.vida-table tbody tr:hover {
  background: rgba(174, 197, 220, 0.045);
}

.epc-tree-cell {
  min-width: 280px;
}

.epc-tree-node {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-left: calc(var(--tree-level, 0) * 16px);
}

.epc-tree-toggle {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(166, 189, 213, 0.34);
  border-radius: 6px;
  background: rgba(16, 23, 31, 0.86);
  color: #d9e8f7;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.epc-tree-toggle:hover {
  border-color: rgba(77, 182, 255, 0.62);
  background: rgba(24, 36, 49, 0.95);
  transform: translateY(-1px);
}

.epc-tree-node__marker {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(77, 182, 255, 0.95), rgba(194, 206, 222, 0.75));
  box-shadow: 0 0 0 3px rgba(77, 182, 255, 0.12);
}

.epc-tree-node__marker::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: calc(var(--tree-level, 0) * 16px);
  height: 1px;
  background: linear-gradient(90deg, rgba(166, 189, 213, 0.12), rgba(166, 189, 213, 0.55));
  transform: translateY(-50%);
}

.epc-tree-node__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.epc-tree-node__meta,
.epc-tree-parent {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.table-shell--service {
  overflow-x: auto;
  padding-bottom: 2px;
}

.vida-table--service {
  min-width: 1280px;
  table-layout: fixed;
}

.vida-table--service th,
.vida-table--service td {
  padding: 8px 10px;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vida-table--service th:nth-child(1),
.vida-table--service td:nth-child(1) {
  width: 8%;
}

.vida-table--service th:nth-child(2),
.vida-table--service td:nth-child(2) {
  width: 8%;
}

.vida-table--service th:nth-child(3),
.vida-table--service td:nth-child(3) {
  width: 6%;
}

.vida-table--service th:nth-child(4),
.vida-table--service td:nth-child(4) {
  width: 10%;
}

.vida-table--service th:nth-child(5),
.vida-table--service td:nth-child(5) {
  width: 8%;
}

.vida-table--service th:nth-child(6),
.vida-table--service td:nth-child(6) {
  width: 8%;
}

.vida-table--service th:nth-child(7),
.vida-table--service td:nth-child(7) {
  width: 11%;
}

.vida-table--service th:nth-child(8),
.vida-table--service td:nth-child(8) {
  width: 10%;
}

.vida-table--service th:nth-child(9),
.vida-table--service td:nth-child(9) {
  width: 13%;
}

.vida-table--service th:nth-child(10),
.vida-table--service td:nth-child(10) {
  width: 18%;
}

.vida-table--service td:first-child {
  white-space: nowrap;
}

.match-table tbody tr:hover {
  background: rgba(77, 182, 255, 0.04);
}

.match-table__empty {
  color: var(--muted);
  text-align: center;
}

.decoder-extra-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.decoder-extra-grid .detail-box {
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
    rgba(7, 8, 10, 0.6);
}

.decoder-extra-grid .detail-box--priority {
  grid-column: span 6;
}

.decoder-extra-grid .detail-box--compact {
  grid-column: span 4;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(77, 182, 255, 0.12);
  color: #ccecff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 980px) {

  .hero__content,
  .result-grid,
  .hero__stats {
    grid-template-columns: 1fr;
  }

  .details-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-box--wide,
  .detail-box--priority,
  .detail-box--compact {
    grid-column: auto;
  }

  .decoder-extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decoder-extra-grid .detail-box--priority,
  .decoder-extra-grid .detail-box--compact {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 10px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .topbar {
    margin-bottom: 32px;
  }

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

  .details-layout {
    grid-template-columns: 1fr;
  }

  .decoder-extra-grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    margin-top: 44px;
  }
}

/* Premium parallel version for /Nowy */

:root {
  --bg: #070707;
  --bg-soft: rgba(21, 16, 16, 0.9);
  --panel: linear-gradient(180deg, rgba(18, 18, 20, 0.94), rgba(10, 10, 11, 0.92));
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #f3ede7;
  --muted: #b6aba1;
  --accent: #e1062c;
  --accent-strong: #ff355d;
  --success: #7cd496;
  --warning: #efbe76;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
}

html,
body {
  background:
    radial-gradient(circle at 15% 10%, rgba(225, 6, 44, 0.14), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.05), transparent 20%),
    linear-gradient(180deg, #090909 0%, #050505 100%);
  color: var(--text);
  font-family: "Manrope", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 80%);
  opacity: 0.28;
}

.login-overlay {
  background:
    radial-gradient(circle at top, rgba(225, 6, 44, 0.16), transparent 28%),
    rgba(3, 3, 4, 0.88);
  backdrop-filter: blur(14px);
}

.login-card,
.panel,
.decoder-card,
.detail-box,
.result-card,
.stat-card {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card {
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(28, 14, 17, 0.96), rgba(9, 9, 10, 0.96));
}

.page-shell {
  width: min(1320px, calc(100% - 40px));
  padding: 24px 0 60px;
}

.hero {
  padding: 28px;
  border-radius: 38px;
  background:
    linear-gradient(135deg, rgba(40, 18, 22, 0.92), rgba(10, 10, 11, 0.88)),
    rgba(8, 8, 9, 0.9);
}

.hero__overlay {
  background:
    radial-gradient(circle at 18% 18%, rgba(225, 6, 44, 0.2), transparent 22%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 30%, transparent 70%, rgba(225, 6, 44, 0.04));
}

.topbar {
  margin-bottom: 44px;
}

.brand {
  gap: 14px;
  font-family: "Oxanium", Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__mark {
  width: 13px;
  height: 13px;
  background: linear-gradient(135deg, var(--accent), #ff8aa0);
  box-shadow: 0 0 24px rgba(225, 6, 44, 0.45);
}

.topbar__meta {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #d8cdc2;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__content {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 430px);
  gap: 36px;
  align-items: center;
}

.hero__copy {
  padding: 20px 0;
}

.eyebrow {
  color: #cbbdb0;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
}

.hero__copy h1,
.section-heading h2,
.decoder-card__header h2,
.detail-box h3 {
  font-family: "Oxanium", Arial, sans-serif;
}

.hero__logo-title {
  max-width: 680px;
}

.hero__logo {
  width: min(100%, 560px);
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.44));
}

.hero__lead {
  max-width: 640px;
  margin-top: 22px;
  color: #ddd1c5;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #f0e6dc;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero__stats {
  margin-top: 34px;
  gap: 16px;
}

.stat-card,
.result-card {
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(13, 13, 14, 0.94);
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before,
.detail-box::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}

.stat-card__value,
.result-card strong {
  font-family: "Oxanium", Arial, sans-serif;
  color: #fff7f0;
}

.stat-card__label,
.result-card__label,
.input-hint,
.detail-box__text,
.notes-list,
.chip {
  color: var(--muted);
}

.decoder-card {
  position: relative;
  padding: 30px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(19, 19, 21, 0.98), rgba(9, 9, 10, 0.96));
}

.decoder-card__header {
  margin-bottom: 22px;
}

.decoder-card__header h2 {
  font-size: 2rem;
  line-height: 1.04;
}

.decoder-card__lead {
  margin: 14px 0 0;
  color: #d1c3b7;
  line-height: 1.7;
}

input {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

input:focus {
  outline-color: rgba(225, 6, 44, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

button {
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff8f2;
  box-shadow: 0 14px 32px rgba(225, 6, 44, 0.22);
}

button:hover {
  box-shadow: 0 18px 38px rgba(225, 6, 44, 0.3);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: none;
}

.status-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.status-box--neutral {
  background: rgba(255, 255, 255, 0.04);
  color: #ded0c4;
}

.panel {
  min-width: 0;
  position: relative;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(17, 17, 18, 0.96), rgba(9, 9, 10, 0.94));
}

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

.section-heading h2 {
  font-size: 2rem;
  line-height: 1.08;
}

.section-heading__lead {
  color: #cdbfb2;
}

.detail-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(12, 12, 13, 0.96);
}

.report-accordion__summary:hover {
  background: rgba(255, 255, 255, 0.02);
}

.report-accordion__icon {
  border-right-color: rgba(243, 237, 231, 0.86);
  border-bottom-color: rgba(243, 237, 231, 0.86);
}

.chip {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #eadfd3;
}

.chip--muted {
  color: #b8aba0;
}

.table-shell,
.report-shell {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.018);
}

.report-output {
  color: #e7dbcf;
}

.match-table th {
  background: rgba(255, 255, 255, 0.035);
  color: #cdbfb2;
}

.match-table td {
  color: #e5d9cf;
}

.match-table tbody tr:hover {
  background: rgba(225, 6, 44, 0.06);
}

.match-badge {
  background: rgba(225, 6, 44, 0.14);
  color: #ffd4dc;
}

.protection-toast {
  border-color: rgba(225, 6, 44, 0.32);
  background: rgba(18, 10, 12, 0.96);
  color: #ffd5dd;
}

@media (max-width: 980px) {
  .hero__content {
    grid-template-columns: 1fr;
  }

  .topbar {
    margin-bottom: 30px;
  }

  .hero__copy {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 16px, 100%);
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .panel,
  .decoder-card {
    border-radius: 24px;
  }

  .hero__lead,
  .decoder-card__lead {
    font-size: 0.98rem;
  }

  .hero__stats {
    margin-top: 28px;
  }
}

/* AESP-like refinement */

html,
body {
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 20, 42, 0.12), transparent 22%),
    linear-gradient(180deg, #0a0a0b 0%, #060606 100%);
}

body::before {
  opacity: 0.12;
  background-size: 48px 48px;
}

.page-shell {
  width: min(1380px, calc(100% - 44px));
  padding-top: 10px;
}

.hero {
  padding: 24px 34px 36px;
  border-radius: 40px;
  background:
    radial-gradient(circle at top left, rgba(225, 6, 44, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(20, 20, 21, 0.98), rgba(8, 8, 9, 0.96));
}

.hero__overlay {
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.05), transparent 24%, transparent 70%, rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at 86% 16%, rgba(225, 6, 44, 0.16), transparent 18%);
}

.hero__content {
  grid-template-columns: minmax(0, 1.34fr) minmax(360px, 430px);
  gap: 44px;
  align-items: start;
}

.hero__copy {
  max-width: 820px;
}

.hero__headline {
  margin: 0;
  font-family: "Oxanium", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: #fff7f0;
  text-transform: uppercase;
}

.hero__lead {
  max-width: 760px;
  margin-top: 24px;
  font-size: 1.08rem;
  line-height: 1.9;
  color: #d9cec4;
}

.hero__bullets {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.hero__bullets li {
  position: relative;
  padding-left: 24px;
  color: #eee3d7;
  line-height: 1.7;
}

.hero__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffb4c1);
  transform: translateY(-50%);
}

.hero__logo-title {
  margin-top: 26px;
}

.hero__logo {
  width: min(100%, 504px);
  opacity: 0.92;
}

.hero__badges {
  margin-top: 28px;
}

.hero-badge {
  min-height: 44px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.hero-feature {
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(14, 14, 15, 0.94);
}

.hero-feature__title {
  display: inline-block;
  margin-bottom: 10px;
  font-family: "Oxanium", Arial, sans-serif;
  font-size: 1.08rem;
  color: #fff5ec;
  text-transform: uppercase;
}

.hero-feature__text {
  margin: 0;
  color: #cdbfb2;
  line-height: 1.7;
}

.hero__stats {
  margin-top: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  min-height: 130px;
  padding: 22px 20px;
}

.stat-card__value {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.decoder-card {
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(26, 26, 27, 0.98), rgba(11, 11, 12, 0.98));
}

.decoder-card__header h2 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  text-transform: uppercase;
}

.decoder-card__lead {
  color: #d6c9be;
}

.input-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

input,
button {
  min-height: 58px;
}

button {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-box {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.content {
  display: grid;
  gap: 26px;
  margin-top: 14px;
}

.panel {
  border-radius: 34px;
}

.panel--intro {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(20, 20, 21, 0.98), rgba(10, 10, 11, 0.96));
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.intro-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.intro-card__label {
  display: inline-block;
  margin-bottom: 12px;
  font-family: "Oxanium", Arial, sans-serif;
  font-size: 1.06rem;
  color: #fff5ea;
  text-transform: uppercase;
}

.intro-card__text {
  margin: 0;
  color: #d0c3b8;
  line-height: 1.75;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  text-transform: uppercase;
}

.section-heading__lead {
  max-width: 820px;
  line-height: 1.85;
}

.panel--result,
.panel--details,
.panel--matches {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(18, 18, 19, 0.98), rgba(10, 10, 11, 0.96));
}

.panel--result {
  border-top-color: transparent;
}

.result-grid {
  gap: 18px;
}

.result-card,
.detail-box {
  border-radius: 24px;
}

.result-card strong {
  font-size: 1.18rem;
}

.match-table th {
  letter-spacing: 0.14em;
}

@media (max-width: 1180px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero__feature-grid,
  .intro-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 24px, 100%);
  }

  .hero {
    padding: 20px;
  }

  .hero__headline {
    font-size: clamp(2rem, 4vw, 3.2rem);
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 14px, 100%);
  }

  .hero {
    padding: 16px;
    border-radius: 26px;
  }

  .panel,
  .decoder-card,
  .intro-card,
  .hero-feature {
    border-radius: 22px;
  }

  .hero__headline,
  .section-heading h2,
  .decoder-card__header h2 {
    letter-spacing: -0.02em;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px 8px 26px 4px;
  }

  .hero {
    padding: 16px;
    border-radius: 24px;
  }

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

  .hero__copy,
  .decoder-card,
  .panel,
  .result-card,
  .detail-box,
  .table-shell,
  .report-shell {
    max-width: none;
    width: 100%;
    min-width: 0;
  }

  .hero__copy {
    padding: 0;
  }

  .hero__logo-title {
    margin-top: 0;
  }

  .hero__logo {
    width: min(100%, 360px);
  }

  .hero__stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
  }

  .stat-card {
    min-height: auto;
    padding: 16px;
  }

  .stat-card__value {
    font-size: 1.55rem;
  }

  .decoder-card,
  .panel,
  .detail-box {
    padding: 16px;
    border-radius: 22px;
  }

  .decoder-card__header {
    margin-bottom: 14px;
  }

  .decoder-card__header h2,
  .section-heading h2 {
    font-size: clamp(1.28rem, 5.6vw, 1.72rem);
    line-height: 1.12;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .section-heading__lead {
    margin-top: 8px;
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .eyebrow,
  .input-label {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .input-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  input,
  button {
    min-height: 50px;
    padding: 13px 14px;
    font-size: 0.96rem;
  }

  button {
    width: 100%;
  }

  .status-box {
    margin-top: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .content {
    gap: 16px;
    margin-top: 10px;
  }

  .result-grid,
  .details-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .database-layout {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 15px;
    border-radius: 18px;
  }

  .result-card__label {
    font-size: 0.92rem;
  }

  .result-card strong {
    margin-top: 6px;
    font-size: 1rem;
    line-height: 1.35;
  }

  .detail-box h3 {
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .detail-box__text,
  .notes-list,
  .save-status,
  .save-folder-label {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .report-accordion__summary {
    gap: 10px;
    padding: 16px;
    align-items: flex-start;
  }

  .report-accordion__summary .detail-box__text {
    margin-right: 0;
  }

  .report-accordion__icon {
    margin-top: 4px;
  }

  .report-accordion__content {
    padding: 0 16px 16px;
  }

  .save-actions {
    gap: 10px;
  }

  .save-actions .button-secondary,
  .save-actions button {
    width: 100%;
  }

  .chip-list {
    gap: 8px;
    margin-top: 10px;
  }

  .chip {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .table-shell,
  .report-shell {
    border-radius: 18px;
  }

  .table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .match-table,
  .match-table--compact {
    min-width: 0;
    width: 100%;
  }

  .match-table thead {
    display: none;
  }

  .match-table,
  .match-table tbody,
  .match-table tr,
  .match-table td {
    display: block;
    width: 100%;
  }

  .match-table tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.01)),
      rgba(12, 12, 13, 0.96);
  }

  .match-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .match-table td {
    display: grid;
    grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
  }

  .match-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .match-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .table-shell--service {
    overflow: visible;
  }

  .epc-tree-node {
    padding-left: calc(var(--tree-level, 0) * 10px);
    gap: 8px;
  }

  .epc-tree-toggle {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .epc-tree-node__marker::before {
    width: calc(var(--tree-level, 0) * 10px);
  }

  .vida-table--service,
  .vida-table--service tbody,
  .vida-table--service tr,
  .vida-table--service th,
  .vida-table--service td {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .vida-table--service td,
  .vida-table--service td:first-child,
  .vida-table--service td:last-child {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .match-table__empty {
    display: block !important;
    padding: 2px 0;
    border-bottom: 0 !important;
    text-align: center;
  }

  .match-table__empty::before {
    content: none;
  }

  .match-table {
    min-width: 0;
  }

  .match-table--compact {
    min-width: 0;
  }

  .match-table th,
  .match-table td {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .match-table th {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
  }

  .report-output {
    padding: 14px;
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .protection-toast {
    bottom: 14px;
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 6px 6px 18px 2px;
  }

  .hero,
  .decoder-card,
  .panel,
  .detail-box {
    padding: 14px;
    border-radius: 18px;
  }

  .hero__logo {
    width: min(100%, 300px);
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card__value {
    font-size: 1.4rem;
  }

  .decoder-card__header h2,
  .section-heading h2 {
    font-size: 1.18rem;
  }

  input,
  button {
    min-height: 48px;
    padding: 12px;
  }

  .result-card,
  .detail-box {
    border-radius: 16px;
  }

  .match-table {
    min-width: 0;
  }

  .match-table--compact {
    min-width: 0;
  }

  .report-accordion__summary,
  .report-accordion__content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .match-table tr {
    padding: 12px;
    border-radius: 16px;
  }

  .match-table td {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 7px 0;
  }

  .match-table td::before {
    font-size: 0.68rem;
  }

  .vida-table--service tr {
    padding: 14px 12px;
  }

  .vida-table--service td {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 8px 0;
  }

  .vida-table--service td::before {
    font-size: 0.7rem;
    letter-spacing: 0.07em;
  }
}

@media (max-width: 900px) {
  .hero__stats,
  .result-grid,
  .details-layout,
  .database-layout {
    grid-template-columns: 1fr !important;
  }

  .detail-box--wide,
  .detail-box--vida,
  .detail-box--priority,
  .detail-box--compact {
    grid-column: auto !important;
  }

  .hero,
  .decoder-card,
  .panel,
  .detail-box {
    border-radius: 18px;
  }

  .panel,
  .decoder-card,
  .detail-box {
    padding: 14px;
  }

  .hero__content {
    gap: 14px;
  }

  .hero__stats {
    gap: 8px;
  }

  .stat-card,
  .result-card {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .section-heading {
    margin-bottom: 12px;
  }

  .section-heading h2,
  .decoder-card__header h2 {
    font-size: clamp(1.1rem, 4.2vw, 1.45rem) !important;
    line-height: 1.04;
  }

  .section-heading__lead,
  .detail-box__text,
  .notes-list {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .result-card__label,
  .stat-card__label {
    font-size: 0.8rem;
  }

  .result-card strong {
    font-size: 0.94rem;
    line-height: 1.25;
  }

  .detail-box h3 {
    font-size: 0.9rem;
    line-height: 1.24;
  }

  .chip-list {
    gap: 5px;
    margin-top: 6px;
  }

  .chip {
    padding: 6px 9px;
    font-size: 0.76rem;
  }

  .report-accordion__summary {
    padding: 12px;
  }

  .report-accordion__content {
    padding: 0 12px 12px;
  }
}

@media (max-width: 560px) {
  .hero__logo {
    width: min(100%, 250px);
  }

  .stat-card__value {
    font-size: 1.18rem;
  }

  .result-card strong {
    font-size: 0.9rem;
  }

  .section-heading h2,
  .decoder-card__header h2 {
    font-size: 0.98rem !important;
  }

  .panel,
  .decoder-card,
  .detail-box {
    padding: 12px;
  }

  .section-heading__lead,
  .detail-box__text,
  .notes-list,
  .save-status,
  .save-folder-label {
    font-size: 0.84rem;
  }

  .result-grid,
  .details-layout,
  .database-layout,
  .content {
    gap: 10px;
  }

  .report-accordion__summary {
    padding: 10px;
  }

  .report-accordion__content {
    padding: 0 10px 10px;
  }
}
