:root {
  color-scheme: light;
  --ink-950: #0b2029;
  --ink-900: #102f3b;
  --ink-800: #173f4b;
  --ink-700: #285563;
  --ink-600: #486a74;
  --ink-500: #68828a;
  --ink-300: #b8c7cb;
  --ink-200: #d5dfe1;
  --ink-100: #e9eff0;
  --ink-050: #f5f8f8;
  --paper: #ffffff;
  --teal-700: #087369;
  --teal-600: #07877b;
  --teal-100: #d8efeb;
  --teal-050: #edf8f6;
  --amber-700: #8d5c00;
  --amber-100: #f8e7bb;
  --amber-050: #fff8e7;
  --red-700: #a12c35;
  --red-100: #f5dce0;
  --red-050: #fff4f5;
  --blue-700: #285b91;
  --blue-100: #dceaf7;
  --blue-050: #f2f7fc;
  --shadow-sm: 0 1px 2px rgb(11 32 41 / 7%), 0 6px 20px rgb(11 32 41 / 4%);
  --shadow-lg: 0 24px 70px rgb(11 32 41 / 18%);
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --content: 1240px;
  --focus: 0 0 0 3px rgb(7 135 123 / 27%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink-950);
  background:
    radial-gradient(circle at 6% 2%, rgb(7 135 123 / 7%), transparent 23rem),
    linear-gradient(180deg, #f7f9f9 0, #eef3f3 34rem, #f5f8f8 100%);
  font-family: Inter, Aptos, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
label,
select,
input[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--teal-700);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  text-wrap: balance;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  color: var(--ink-900);
  font-size: clamp(2.15rem, 5vw, 4.65rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

h2 {
  margin-bottom: 4px;
  color: var(--ink-900);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  color: var(--ink-900);
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink-950);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 3px;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  color: var(--paper);
  background: rgb(16 47 59 / 96%);
  border-bottom: 1px solid rgb(255 255 255 / 11%);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: min(calc(100% - 40px), var(--content));
  min-height: 70px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  color: inherit;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 9px;
}

.brand-mark span {
  display: grid;
  font-size: 0.72rem;
  font-weight: 800;
  place-items: center;
}

.brand-mark span:first-child {
  color: var(--ink-900);
  background: #8fe0d5;
}

.brand-mark span:last-child {
  background: rgb(255 255 255 / 9%);
}

.brand-copy {
  display: grid;
  line-height: 1.17;
}

.brand-copy strong {
  font-size: 0.91rem;
  letter-spacing: 0.015em;
}

.brand-copy span {
  margin-top: 3px;
  color: #bcd0d4;
  font-size: 0.72rem;
}

.header-meta,
.privacy-badge,
.icon-button {
  display: flex;
  align-items: center;
}

.header-meta {
  gap: 18px;
}

.privacy-badge {
  color: #c9d9dc;
  font-size: 0.78rem;
  gap: 7px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #75d7c9;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(117 215 201 / 12%);
}

.icon-button {
  min-height: 38px;
  padding: 7px 11px;
  color: var(--paper);
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  gap: 7px;
}

.icon-button:hover {
  background: rgb(255 255 255 / 13%);
}

.page-shell {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 68px 0 100px;
}

.intro {
  margin-bottom: 42px;
}

.eyebrow,
.step-label,
.section-index {
  margin-bottom: 10px;
  color: var(--teal-700);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink-600);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
}

.scope-note {
  display: flex;
  padding: 22px 0 2px 22px;
  border-top: 1px solid var(--ink-300);
  gap: 14px;
}

.scope-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--teal-700);
  background: var(--teal-100);
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 800;
  place-items: center;
}

.scope-note strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-900);
  font-size: 0.91rem;
}

.scope-note p {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.82rem;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.input-panel,
.settings-panel,
.result-section,
.filter-panel,
.error-panel {
  padding: clamp(22px, 4vw, 38px);
}

.section-heading {
  display: flex;
  margin-bottom: 28px;
  padding-bottom: 22px;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--ink-100);
}

.section-heading > p {
  max-width: 460px;
  margin-bottom: 2px;
  color: var(--ink-600);
  font-size: 0.88rem;
  text-align: right;
}

.step-label {
  margin-bottom: 5px;
}

.upload-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: minmax(0, 720px);
  gap: 18px;
}

fieldset {
  min-width: 0;
}

.upload-card,
.acceptance-card {
  margin: 0;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
}

.upload-card {
  min-height: 284px;
  padding: 18px;
  background: var(--ink-050);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.upload-card.is-dragover {
  background: var(--teal-050);
  border-color: var(--teal-600);
  box-shadow: var(--focus);
}

.upload-card legend,
.acceptance-card legend {
  padding: 0 8px;
  color: var(--ink-900);
  font-size: 0.94rem;
  font-weight: 760;
}

.legend-number {
  display: inline-grid;
  width: 23px;
  height: 23px;
  margin-right: 8px;
  color: var(--teal-700);
  background: var(--teal-100);
  border-radius: 6px;
  font-size: 0.72rem;
  place-items: center;
}

.field-help,
.drop-hint {
  color: var(--ink-600);
  font-size: 0.8rem;
}

.field-help {
  min-height: 38px;
  margin: 0 0 14px;
}

.drop-hint {
  margin: 10px 0 0;
  text-align: center;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-input:focus-visible + .file-picker,
.file-input:focus-visible + .picker-actions .file-picker:first-child {
  outline: 2px solid var(--teal-600);
  outline-offset: 3px;
}

.file-picker {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 10px;
  transition: border-color 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}

.file-picker:hover {
  border-color: var(--teal-600);
  box-shadow: 0 5px 16px rgb(7 135 123 / 9%);
  transform: translateY(-1px);
}

.primary-picker {
  min-height: 88px;
  padding: 16px;
  border-style: dashed;
}

.primary-picker > span:last-child {
  display: grid;
  text-align: left;
}

.primary-picker small {
  margin-top: 3px;
  color: var(--ink-600);
}

.picker-icon {
  display: grid;
  width: 45px;
  height: 52px;
  color: var(--teal-700);
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  place-items: center;
}

.picker-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compact-picker {
  padding: 10px 12px;
  color: var(--paper);
  background: var(--ink-900);
  border-color: var(--ink-900);
  font-size: 0.82rem;
}

.compact-picker:hover {
  background: var(--ink-800);
  border-color: var(--ink-800);
}

.secondary-picker {
  color: var(--ink-900);
  background: var(--paper);
  border-color: var(--ink-300);
}

.secondary-picker:hover {
  background: var(--paper);
  border-color: var(--teal-600);
}

.selected-file,
.file-list-wrap {
  margin-top: 14px;
}

.empty-file {
  display: block;
  padding: 10px 4px 0;
  color: var(--ink-500);
  font-size: 0.77rem;
  text-align: center;
}

.file-list {
  max-height: 124px;
  padding: 0;
  margin: 0;
  overflow: auto;
  list-style: none;
  scrollbar-color: var(--ink-300) transparent;
}

.file-item {
  display: grid;
  min-height: 43px;
  padding: 7px 4px 7px 9px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--ink-100);
  gap: 8px;
}

.file-item:last-child {
  border-bottom: 0;
}

.file-meta {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.file-meta strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta span {
  color: var(--ink-500);
  font-size: 0.69rem;
}

.remove-file,
.icon-only-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink-600);
  background: transparent;
  border: 0;
  border-radius: 50%;
  place-items: center;
}

.remove-file:hover,
.icon-only-button:hover {
  color: var(--red-700);
  background: var(--red-050);
}

.acceptance-card {
  padding: 20px 22px 24px;
}

.acceptance-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) repeat(3, minmax(150px, 0.8fr));
  align-items: end;
  gap: 16px;
}

.confirmation-field {
  display: flex;
  min-height: 68px;
  padding: 12px;
  align-items: center;
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 11px;
}

.confirmation-field input {
  position: absolute;
  opacity: 0;
}

.check-control {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  background: var(--paper);
  border: 1.5px solid var(--ink-500);
  border-radius: 5px;
  place-items: center;
}

.confirmation-field input:checked + .check-control {
  background: var(--teal-600);
  border-color: var(--teal-600);
}

.confirmation-field input:checked + .check-control::after {
  width: 5px;
  height: 10px;
  content: "";
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

.confirmation-field input:focus-visible + .check-control {
  box-shadow: var(--focus);
}

.confirmation-field > span:last-child {
  display: grid;
}

.confirmation-field strong {
  font-size: 0.84rem;
}

.confirmation-field small {
  margin-top: 2px;
  color: var(--ink-600);
  font-size: 0.69rem;
  line-height: 1.35;
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.form-field > span:first-child {
  color: var(--ink-700);
  font-size: 0.76rem;
  font-weight: 700;
}

.form-field > span:first-child small {
  color: var(--ink-500);
  font-weight: 500;
}

input[type="text"],
input[type="search"],
input[type="date"],
select,
.evidence-field input[type="file"],
.custom-rule-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink-950);
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
}

input:hover,
select:hover {
  border-color: var(--ink-500);
}

input:focus,
select:focus {
  border-color: var(--teal-600);
  outline: 0;
  box-shadow: var(--focus);
}

input::placeholder {
  color: var(--ink-500);
  opacity: 1;
}

.evidence-field input[type="file"] {
  max-width: 100%;
  padding: 7px;
  font-size: 0.73rem;
}

.evidence-field input[type="file"]::file-selector-button {
  padding: 5px 8px;
  margin-right: 7px;
  color: var(--ink-900);
  background: var(--ink-100);
  border: 0;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.input-note {
  overflow: hidden;
  color: var(--ink-500) !important;
  font-size: 0.68rem !important;
  font-weight: 500 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-actions,
.settings-actions,
.export-actions {
  display: flex;
  margin-top: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.form-actions > p,
.export-actions > p {
  display: grid;
  margin: 0;
  color: var(--ink-600);
  font-size: 0.78rem;
}

.form-actions > p strong {
  margin-bottom: 2px;
  color: var(--ink-900);
  font-size: 0.82rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 9px 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  gap: 8px;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  min-width: 146px;
  color: var(--paper);
  background: var(--teal-700);
  border-color: var(--teal-700);
  box-shadow: 0 6px 16px rgb(8 115 105 / 18%);
}

.button-primary:hover:not(:disabled) {
  background: #075f58;
  border-color: #075f58;
}

.button-secondary {
  color: var(--ink-900);
  background: var(--paper);
  border-color: var(--ink-300);
}

.button-secondary:hover:not(:disabled) {
  background: var(--ink-050);
  border-color: var(--ink-500);
}

.button-quiet {
  color: var(--ink-700);
  background: transparent;
  border-color: transparent;
}

.button-quiet:hover:not(:disabled) {
  background: var(--ink-050);
}

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgb(255 255 255 / 38%);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.is-loading .button-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.alert {
  padding: 12px 14px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.alert-error {
  color: var(--red-700);
  background: var(--red-050);
  border-color: var(--red-100);
}

.form-message {
  margin-top: 18px;
}

.settings-panel {
  margin-top: 20px;
  border-top: 4px solid var(--teal-600);
}

.settings-heading {
  align-items: start;
}

.settings-heading .icon-only-button {
  flex: 0 0 auto;
  font-size: 1.55rem;
}

.settings-intro {
  max-width: 850px;
  margin-bottom: 24px;
  color: var(--ink-600);
  font-size: 0.88rem;
}

.aixboms-settings,
.architecture-settings,
.global-quality-settings {
  display: grid;
  padding: 18px;
  margin-bottom: 24px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr);
  align-items: start;
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-md);
  gap: 20px;
}

.aixboms-settings h3,
.architecture-settings h3,
.global-quality-settings h3 {
  margin: 0;
}

.aixboms-settings .settings-intro,
.architecture-settings .settings-intro,
.global-quality-settings .settings-intro {
  margin: 8px 0 0;
}

.aixboms-settings .upload-card,
.architecture-settings .upload-card {
  min-height: 0;
  background: var(--paper);
}

.quality-rules-table-wrap {
  min-width: 0;
}

.quality-rules-table select,
.quality-rules-table input[type="text"] {
  width: 100%;
  min-width: 150px;
}

.quality-rules-table th:nth-child(3),
.quality-rules-table td:nth-child(3) {
  width: 72px;
  text-align: center;
}

.quality-rule-actions {
  justify-content: flex-end;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--ink-100);
  text-align: left;
}

.data-table thead th {
  color: var(--ink-600);
  background: var(--ink-050);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.data-table thead th:first-child {
  border-radius: 7px 0 0 7px;
}

.data-table thead th:last-child {
  border-radius: 0 7px 7px 0;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom-color: transparent;
}

.data-table tbody tr:hover {
  background: var(--ink-050);
}

.settings-table th:first-child {
  min-width: 180px;
}

.settings-table td:nth-child(2) {
  width: 255px;
}

.settings-table select {
  min-width: 220px;
  font-size: 0.78rem;
}

.settings-table .rule-description {
  min-width: 250px;
  color: var(--ink-600);
}

.remove-rule-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--red-700);
  background: transparent;
  border: 0;
  border-radius: 50%;
  place-items: center;
}

.remove-rule-button:hover {
  background: var(--red-050);
}

.custom-rule-form {
  display: grid;
  margin-top: 18px;
  padding: 15px;
  align-items: center;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  background: var(--ink-050);
  border-radius: var(--radius-sm);
  gap: 14px;
}

.custom-rule-form > div {
  display: grid;
  color: var(--ink-600);
  font-size: 0.73rem;
}

.custom-rule-form > div strong {
  color: var(--ink-900);
  font-size: 0.82rem;
}

.analysis-status {
  display: flex;
  width: min(680px, 100%);
  min-height: 98px;
  padding: 20px 24px;
  margin: 28px auto;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: var(--ink-900);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  gap: 19px;
}

.analysis-status > div:last-child {
  display: grid;
}

.analysis-status strong {
  margin-bottom: 3px;
  font-size: 0.91rem;
}

.analysis-status span {
  color: #bfd0d4;
  font-size: 0.78rem;
}

.loader {
  display: flex;
  min-width: 48px;
  align-items: center;
  gap: 5px;
}

.loader span {
  width: 7px;
  height: 7px;
  background: #80ddd1;
  border-radius: 50%;
  animation: pulse 1.15s ease-in-out infinite;
}

.loader span:nth-child(2) { animation-delay: 150ms; }
.loader span:nth-child(3) { animation-delay: 300ms; }

@keyframes pulse {
  0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-5px); }
}

.error-panel {
  display: flex;
  max-width: 820px;
  margin: 28px auto;
  border-color: var(--red-100);
  gap: 20px;
}

.error-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--red-700);
  background: var(--red-100);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
  place-items: center;
}

.error-panel h2 {
  font-size: 1.32rem;
}

.error-panel p:not(.step-label),
.error-panel li {
  color: var(--ink-600);
  font-size: 0.84rem;
}

.error-panel ul {
  padding-left: 19px;
}

.error-panel details {
  margin: 14px 0;
  font-size: 0.75rem;
}

.error-panel pre {
  max-height: 180px;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--ink-050);
  border-radius: 6px;
}

.results {
  margin-top: 62px;
}

.results-title-row {
  display: flex;
  margin-bottom: 24px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.results-title-row h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.results-title-row p:last-child {
  margin: 7px 0 0;
  color: var(--ink-600);
  font-size: 0.87rem;
}

.result-status {
  display: inline-flex;
  padding: 8px 11px;
  flex: 0 0 auto;
  color: var(--teal-700);
  background: var(--teal-100);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  align-items: center;
  gap: 6px;
}

.result-nav {
  display: flex;
  padding: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  background: var(--ink-900);
  border-radius: 10px;
  scrollbar-width: thin;
}

.result-nav a {
  min-width: max-content;
  padding: 9px 13px;
  color: #d4e1e3;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.result-nav a:hover,
.result-nav a:focus-visible {
  color: var(--paper);
  background: rgb(255 255 255 / 10%);
}

.result-section,
.filter-panel,
.result-warnings {
  margin-top: 18px;
  scroll-margin-top: 90px;
}

.result-warnings {
  overflow: hidden;
  border-color: var(--amber-100);
}

.result-warnings summary {
  display: flex;
  min-height: 70px;
  padding: 15px 20px;
  align-items: center;
  color: var(--ink-900);
  background: var(--amber-050);
  cursor: pointer;
  gap: 12px;
  list-style: none;
}

.result-warnings summary::-webkit-details-marker {
  display: none;
}

.result-warnings summary > span:nth-child(2) {
  display: grid;
  flex: 1;
}

.result-warnings summary strong {
  font-size: 0.88rem;
}

.result-warnings summary small {
  color: var(--ink-600);
  font-size: 0.7rem;
}

.warning-symbol,
.warning-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 850;
  place-items: center;
}

.warning-count {
  padding: 0 7px;
  border-radius: 99px;
}

.result-warnings ul {
  padding: 5px 42px 18px 58px;
  margin: 0;
}

.qs-reference-summary {
  margin: 14px 18px 0;
  padding: 10px 12px;
  color: var(--ink-700);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.qs-reference-summary:empty {
  display: none;
}

.result-warnings li {
  padding: 9px 0;
  color: var(--ink-700);
  border-bottom: 1px solid var(--ink-100);
  font-size: 0.78rem;
}

.result-warnings li:last-child {
  border-bottom: 0;
}

.result-warnings.no-warnings {
  border-color: var(--teal-100);
}

.result-warnings.no-warnings summary {
  background: var(--teal-050);
}

.result-warnings.no-warnings .warning-symbol,
.result-warnings.no-warnings .warning-count {
  color: var(--teal-700);
  background: var(--teal-100);
}

.compact-heading {
  margin-bottom: 20px;
  padding-bottom: 16px;
  align-items: center;
}

.compact-heading > div {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.section-index {
  margin: 0;
  color: var(--ink-500);
}

.section-summary {
  color: var(--ink-600);
  font-size: 0.75rem;
}

.section-help {
  max-width: 920px;
  margin: -8px 0 16px;
  color: var(--ink-600);
  font-size: 0.76rem;
}

.no-border {
  margin-bottom: 14px;
  padding-bottom: 0;
  border: 0;
}

.metrics-section {
  padding: 20px 0 2px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-width: 0;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-top: 3px solid var(--ink-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric-card[data-tone="positive"] { border-top-color: var(--teal-600); }
.metric-card[data-tone="warning"] { border-top-color: #c78a12; }
.metric-card[data-tone="danger"] { border-top-color: var(--red-700); }
.metric-card[data-tone="info"] { border-top-color: var(--blue-700); }

.metric-card span {
  display: block;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--ink-900);
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-card small {
  display: block;
  min-height: 30px;
  color: var(--ink-500);
  font-size: 0.69rem;
  line-height: 1.4;
}

.filter-panel {
  padding-top: 24px;
  padding-bottom: 21px;
  background: #f9fbfb;
}

.filter-title-row {
  display: flex;
  margin-bottom: 17px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.filter-title-row h3 {
  font-size: 1.05rem;
}

.text-button {
  min-height: 38px;
  padding: 6px 4px;
  color: var(--teal-700);
  background: transparent;
  border: 0;
  font-size: 0.76rem;
  font-weight: 750;
}

.text-button:hover {
  text-decoration: underline;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(150px, 0.8fr)) auto;
  align-items: end;
  gap: 12px;
}

.inline-check {
  display: flex;
  min-height: 44px;
  padding: 9px 11px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  gap: 8px;
  white-space: nowrap;
}

.inline-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--teal-600);
}

.filter-result {
  margin: 12px 0 0;
  color: var(--ink-600);
  font-size: 0.72rem;
}

.object-name {
  display: grid;
  min-width: 200px;
}

.object-name strong,
.relationship-object strong {
  color: var(--ink-900);
  font-size: 0.8rem;
}

.object-name span,
.relationship-object span,
.type-cell span {
  max-width: 360px;
  overflow: hidden;
  color: var(--ink-500);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-cell {
  display: grid;
  min-width: 135px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  align-items: center;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.badge::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.badge-positive,
.badge-equal,
.badge-complete,
.badge-relevant {
  color: var(--teal-700);
  background: var(--teal-100);
}

.badge-warning,
.badge-changed,
.badge-incomplete,
.badge-partial {
  color: var(--amber-700);
  background: var(--amber-100);
}

.badge-danger,
.badge-conflict,
.badge-missing_scm,
.badge-error {
  color: var(--red-700);
  background: var(--red-100);
}

.badge-info,
.badge-only_aixboms,
.badge-new,
.badge-preserve {
  color: var(--blue-700);
  background: var(--blue-100);
}

.badge-muted,
.badge-ignored,
.badge-unknown,
.badge-loaded,
.badge-not_needed {
  color: var(--ink-600);
  background: var(--ink-100);
}

.badge-unusable {
  color: var(--red-700);
  background: var(--red-100);
}

.badge-optional {
  color: var(--blue-700);
  background: var(--blue-100);
}

.count-value {
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.detail-button {
  min-width: 38px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--teal-700);
  background: transparent;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 750;
}

.detail-button:hover {
  background: var(--teal-050);
  border-color: var(--teal-600);
}

.relationship-actions {
  display: flex;
  min-width: 182px;
  align-items: center;
  gap: 7px;
}

.object-actions {
  display: flex;
  min-width: 286px;
  flex-wrap: wrap;
  gap: 7px;
}

.object-actions .detail-button {
  min-width: 82px;
}

.relationship-actions .detail-button {
  min-width: 82px;
}

.delete-button {
  color: var(--red-700);
}

.delete-button:hover {
  background: var(--red-050);
  border-color: var(--red-700);
}

.restore-button {
  color: var(--blue-700);
}

.relationship-deleted > td:not(:last-child) {
  color: var(--ink-500);
  background: var(--ink-050);
  opacity: 0.72;
}

.object-deleted > th:not(:last-child),
.object-deleted > td:not(:last-child) {
  color: var(--ink-500);
  background: var(--ink-050);
  opacity: 0.72;
}

.object-deleted > th:not(:last-child) > span:not(.developer-note),
.object-deleted > td:not(:last-child) > span:not(.developer-note),
.object-deleted > td:not(:last-child) > strong,
.object-deleted .badge {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.relationship-deleted > td:not(:last-child) > span:not(.developer-note),
.relationship-deleted > td:not(:last-child) > strong,
.relationship-deleted .badge {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.developer-note {
  display: block;
  margin-top: 9px;
  padding: 7px 9px;
  color: var(--ink-700);
  background: var(--amber-050);
  border-left: 3px solid var(--amber-700);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 1;
}

.relationship-edited:not(.relationship-deleted) {
  box-shadow: inset 3px 0 0 var(--blue-700);
}

.object-edited:not(.object-deleted) {
  box-shadow: inset 3px 0 0 var(--blue-700);
}

.empty-state {
  padding: 44px 20px 28px;
  color: var(--ink-600);
  text-align: center;
}

.empty-state > span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-300);
  font-size: 2rem;
}

.empty-state strong {
  display: block;
  color: var(--ink-900);
}

.empty-state p {
  margin: 4px 0 0;
  font-size: 0.78rem;
}

.compact-empty {
  padding: 26px 20px 10px;
}

.load-more {
  margin: 18px auto 0;
}

.scm-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.7fr);
  align-items: start;
  gap: 26px;
}

.score-card {
  padding: 25px;
  color: var(--paper);
  background: var(--ink-900);
  border-radius: var(--radius-md);
}

.score-value {
  display: flex;
  align-items: baseline;
}

.score-value strong {
  font-size: clamp(3rem, 7vw, 4.6rem);
  font-weight: 730;
  letter-spacing: -0.06em;
  line-height: 1;
}

.score-value span {
  margin-left: 4px;
  color: #90aaaF;
  font-size: 1.15rem;
}

.score-card p {
  margin: 10px 0 20px;
  color: #c2d2d5;
  font-size: 0.76rem;
}

.score-card progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  background: rgb(255 255 255 / 13%);
  border: 0;
  border-radius: 99px;
}

.score-card progress::-webkit-progress-bar {
  background: rgb(255 255 255 / 13%);
  border-radius: 99px;
}

.score-card progress::-webkit-progress-value {
  background: #78d9cd;
  border-radius: 99px;
}

.score-card progress::-moz-progress-bar {
  background: #78d9cd;
  border-radius: 99px;
}

.score-card > span {
  display: block;
  margin-top: 9px;
  color: #a9c0c5;
  font-size: 0.68rem;
}

.scm-table-wrap {
  min-width: 0;
}

.mail-fields {
  display: grid;
  margin-bottom: 20px;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.subject-field {
  grid-column: 1 / -1;
}

.mail-preview-frame {
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
}

.mail-preview-bar {
  display: flex;
  min-height: 39px;
  padding: 9px 12px;
  align-items: center;
  background: var(--ink-050);
  border-bottom: 1px solid var(--ink-200);
  gap: 6px;
}

.mail-preview-bar > span {
  width: 8px;
  height: 8px;
  background: var(--ink-300);
  border-radius: 50%;
}

.mail-preview-bar > span:nth-child(1) { background: #e98b8f; }
.mail-preview-bar > span:nth-child(2) { background: #e2bd66; }
.mail-preview-bar > span:nth-child(3) { background: #77c7ad; }

.mail-preview-bar strong {
  margin-left: 7px;
  color: var(--ink-600);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mail-preview-content {
  display: block;
  width: 100%;
  min-height: 430px;
  padding: 30px 34px;
  overflow-wrap: anywhere;
  background: var(--paper);
  border: 0;
  font-family: Arial, sans-serif;
  font-size: 0.91rem;
  line-height: 1.6;
}

.mail-preview-content h1,
.mail-preview-content h2,
.mail-preview-content h3 {
  color: var(--ink-900);
  line-height: 1.25;
}

.mail-preview-content h1 { font-size: 1.5rem; }
.mail-preview-content h2 { margin-top: 26px; font-size: 1.12rem; }

.mail-preview-content table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.mail-preview-content th,
.mail-preview-content td {
  padding: 9px 10px;
  vertical-align: top;
  border: 1px solid var(--ink-200);
  text-align: left;
}

.mail-preview-content th {
  color: var(--ink-900);
  background: var(--ink-050);
}

.mail-preview-content a {
  color: var(--teal-700);
}

.export-actions {
  padding-top: 20px;
  margin-top: 0;
}

.detail-dialog {
  width: min(930px, calc(100% - 32px));
  max-height: min(780px, calc(100vh - 36px));
  padding: 0;
  overflow: auto;
  color: var(--ink-950);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.detail-dialog::backdrop {
  background: rgb(5 23 30 / 62%);
  backdrop-filter: blur(2px);
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  padding: 23px 26px 18px;
  align-items: start;
  justify-content: space-between;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--ink-100);
  backdrop-filter: blur(10px);
  gap: 20px;
}

.dialog-header h2 {
  font-size: 1.5rem;
}

.dialog-header p:last-child {
  max-width: 680px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-header .icon-only-button {
  flex: 0 0 auto;
  font-size: 1.55rem;
}

#dialogContent {
  padding: 22px 26px 30px;
}

.relationship-edit-content {
  padding: 22px 26px 28px;
}

.relationship-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.relationship-note-field {
  grid-column: 1 / -1;
}

.relationship-edit-grid textarea,
.relationship-delete-dialog textarea,
.object-delete-dialog textarea {
  min-height: 104px;
  padding: 11px 12px;
  resize: vertical;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  font: inherit;
  line-height: 1.45;
}

.relationship-edit-grid textarea:focus,
.relationship-delete-dialog textarea:focus,
.object-delete-dialog textarea:focus {
  outline: 2px solid var(--teal-600);
  outline-offset: 1px;
}

.relationship-dialog-actions {
  display: flex;
  margin-top: 22px;
  justify-content: flex-end;
  gap: 10px;
}

.detail-summary {
  display: flex;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.diff-table td,
.diff-table th {
  vertical-align: top;
}

.diff-table th:first-child {
  min-width: 150px;
}

.diff-value {
  max-width: 300px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100% - 44px));
  padding: 13px 16px;
  color: var(--paper);
  background: var(--ink-900);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1040px) {
  .acceptance-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-grid {
    grid-template-columns: 1.25fr repeat(2, 1fr);
  }

  .inline-check {
    width: fit-content;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .page-shell {
    padding-top: 46px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .scope-note {
    padding-left: 0;
  }

  .upload-grid,
  .aixboms-settings,
  .architecture-settings,
  .global-quality-settings,
  .scm-layout {
    grid-template-columns: 1fr;
  }

  .upload-card {
    min-height: 0;
  }

  .section-heading,
  .results-title-row,
  .form-actions,
  .export-actions {
    align-items: start;
    flex-direction: column;
  }

  .section-heading > p {
    max-width: none;
    text-align: left;
  }

  .form-actions .button-row,
  .export-actions .button-row {
    width: 100%;
  }

  .form-actions .button,
  .export-actions .button {
    flex: 1 1 auto;
  }

  .custom-rule-form {
    grid-template-columns: 1fr;
  }

  .settings-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .settings-actions .button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .page-shell {
    width: min(calc(100% - 24px), var(--content));
  }

  .header-inner {
    min-height: 62px;
  }

  .privacy-badge {
    display: none;
  }

  .icon-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .icon-button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .page-shell {
    padding: 36px 0 70px;
  }

  h1 br {
    display: none;
  }

  .input-panel,
  .settings-panel,
  .result-section,
  .filter-panel,
  .error-panel {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .picker-actions,
  .acceptance-grid,
  .filter-grid,
  .metric-grid,
  .mail-fields,
  .relationship-edit-grid {
    grid-template-columns: 1fr;
  }

  .subject-field {
    grid-column: auto;
  }

  .acceptance-card {
    padding: 17px 13px;
  }

  .button-row {
    flex-direction: column;
  }

  .button-row .button {
    width: 100%;
  }

  .compact-heading {
    align-items: start;
  }

  .section-summary {
    padding-left: 37px;
  }

  .filter-title-row {
    align-items: start;
  }

  .result-status {
    align-self: start;
  }

  .mail-preview-content {
    min-height: 360px;
    padding: 20px 17px;
  }

  .dialog-header,
  #dialogContent,
  .relationship-edit-content {
    padding-right: 17px;
    padding-left: 17px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .status-dot,
  .badge::before,
  .check-control,
  .score-card progress {
    forced-color-adjust: none;
  }

  .button,
  .file-picker,
  .panel,
  .badge {
    border: 1px solid ButtonText;
  }
}

@media print {
  .app-header,
  .input-panel,
  .settings-panel,
  .result-nav,
  .filter-panel,
  .button,
  .toast {
    display: none !important;
  }

  body {
    background: white;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .results {
    margin-top: 0;
  }

  .panel,
  .metric-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

.login-page { min-height: 100vh; background: linear-gradient(145deg, #e9f0f2, #f8fafb 52%, #e7eef0); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); padding: 34px; background: #fff; border: 1px solid #ccdadd; border-radius: 18px; box-shadow: 0 20px 55px rgba(16,47,59,.16); }
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.login-brand p { margin: 0 0 4px; color: #557078; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.login-brand h1 { margin: 0; color: #102f3b; font-size: 1.35rem; line-height: 1.25; }
.login-card .form-field { display: grid; gap: 7px; margin: 0 0 18px; }
.login-card input { width: 100%; padding: 12px 13px; border: 1px solid #9fb3b9; border-radius: 8px; font: inherit; }
.login-button { width: 100%; justify-content: center; margin-top: 4px; }
.login-note { margin: 22px 0 0; color: #60767d; font-size: .86rem; line-height: 1.5; }
.account-name { color: #dce9ec; font-size: .86rem; }
.admin-shell h1 { margin: 0; color: #102f3b; font-size: 1.5rem; }
.admin-create-form { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) auto auto; gap: 14px; align-items: end; margin: 24px 0; }
.admin-create-form .form-field { display: grid; gap: 6px; }
.admin-create-form input { padding: 10px; border: 1px solid #9fb3b9; border-radius: 7px; }
.compact-action { padding: 7px 9px; margin: 2px 5px 2px 0; font-size: .8rem; }
@media (max-width: 900px) { .admin-create-form { grid-template-columns: 1fr; align-items: stretch; } .account-name { display: none; } }
