:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #e8edf5;
  background: #10151d;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #8994a5;
  --line: rgba(175, 190, 211, 0.13);
  --accent: #8bdbbd;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 78% 4%, rgba(70, 121, 108, 0.13), transparent 35%),
    radial-gradient(ellipse at 4% 50%, rgba(74, 90, 126, 0.1), transparent 32%),
    #10151d;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 30px;
}

.topbar,
.header-meta,
.brand,
.local-indicator,
.section-heading,
.step-badge,
.status-heading,
.download-link {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 50px;
  animation: enter 520ms ease both;
}

.header-meta {
  gap: 20px;
}

.support-table {
  border-collapse: collapse;
  color: #aeb9c8;
  font-size: 0.62rem;
  text-align: left;
}

.support-table caption {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.57rem;
  letter-spacing: 0.09em;
  text-align: right;
  text-transform: uppercase;
}

.support-table th,
.support-table td {
  padding: 3px 7px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.support-table thead th {
  color: #8994a5;
  font-size: 0.56rem;
  font-weight: 500;
}

.support-table tbody th {
  color: #d3dbe5;
  font-weight: 500;
}

.support-table tbody td {
  color: var(--accent);
  font-family: Consolas, "Courier New", monospace;
}

.brand {
  gap: 11px;
  color: #e8edf5;
  font-size: 1.12rem;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand strong {
  color: var(--accent);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(139, 219, 189, 0.4);
  border-radius: 10px;
  background: rgba(139, 219, 189, 0.1);
  color: var(--accent);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.local-indicator {
  gap: 9px;
  color: #adb7c5;
  font-size: 0.76rem;
}

.local-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(139, 219, 189, 0.7);
  animation: local-pulse 2.4s ease-in-out infinite;
}

.hero {
  margin-bottom: 24px;
  padding: 26px 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(112deg, rgba(29, 39, 49, 0.76), rgba(23, 32, 41, 0.68));
  animation: enter 620ms 70ms ease both;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--accent);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 1.06;
}

h1 span {
  color: #9ba8b8;
}

.hero-text {
  max-width: 470px;
  margin: 17px 0 0;
  color: #9da8b7;
  font-size: 0.91rem;
  line-height: 1.8;
}

.workspace {
  padding: 33px 40px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(25, 33, 42, 0.93);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.12);
  animation: enter 620ms 140ms ease both;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading .eyebrow {
  margin-bottom: 7px;
}

h2 {
  margin: 0;
  color: #e7edf4;
  font-size: 1.23rem;
  letter-spacing: -0.04em;
}

.step-badge {
  gap: 10px;
  color: #8c98a8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
}

.step-badge span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
}

.form-grid {
  display: grid;
  gap: 20px;
}

.field-group {
  display: grid;
  gap: 9px;
  color: #cbd3de;
}

.field-label {
  color: #cbd3de;
  font-size: 0.79rem;
  font-weight: 600;
}

.field-group > small,
.checkbox-field small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.field-group input[type="text"],
.field-group select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(175, 190, 211, 0.16);
  border-radius: 9px;
  outline: none;
  background: #151c24;
  color: #e7edf4;
  font-size: 0.83rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-group input[type="text"]:focus,
.field-group select:focus {
  border-color: rgba(139, 219, 189, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 219, 189, 0.08);
}

.supported-box {
  --box-color: 139, 219, 189;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--box-color), 0.17);
  border-radius: 9px;
  background: rgba(var(--box-color), 0.045);
  animation: reveal 220ms ease both;
}

.note-box[hidden] {
  display: none;
}

.note-box[data-level="warning"] {
  --box-color: 245, 193, 103;
}

.note-box[data-level="important"],
.note-box[data-level="fatal"] {
  --box-color: 255, 145, 145;
}

.supported-label {
  color: var(--muted);
  font-size: 0.67rem;
}

.supported-box strong {
  color: rgb(var(--box-color));
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.note-box strong {
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.note-box a {
  justify-self: start;
  color: rgb(var(--box-color));
  font-size: 0.78rem;
  text-underline-offset: 0.18em;
}

.performance-notice {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: center;
}

.file-picker {
  position: relative;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border: 1px dashed rgba(175, 190, 211, 0.25);
  border-radius: 10px;
  background: rgba(21, 28, 36, 0.65);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.file-picker:hover {
  border-color: rgba(139, 219, 189, 0.6);
  background: rgba(139, 219, 189, 0.035);
}

.file-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-picker-content > span:last-child {
  display: grid;
  gap: 3px;
}

.file-picker-content strong,
.checkbox-field strong {
  color: #e0e6ee;
  font-size: 0.76rem;
  font-weight: 600;
}

.file-picker-content small {
  color: var(--muted);
  font-size: 0.68rem;
}

.upload-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(139, 219, 189, 0.2);
  border-radius: 9px;
  background: rgba(139, 219, 189, 0.08);
  color: var(--accent);
  font-size: 1.1rem;
}

.file-name {
  max-width: 45%;
  overflow: hidden;
  color: #8c98a8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  padding: 2px 0 3px;
}

.checkbox-field {
  position: relative;
  display: flex;
  min-width: 220px;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-field input {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
}

.checkmark {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  margin-top: 1px;
  border: 1px solid rgba(175, 190, 211, 0.28);
  border-radius: 4px;
  background: #151c24;
}

.checkbox-field input:checked + .checkmark {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-field input:checked + .checkmark::after {
  width: 7px;
  height: 4px;
  border-bottom: 2px solid #15211e;
  border-left: 2px solid #15211e;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.checkbox-field input:focus-visible + .checkmark {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.checkbox-field > span:last-child {
  display: grid;
  gap: 3px;
}

.btn-primary {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #14231e;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.btn-primary:hover {
  background: #a2e9cf;
  transform: translateY(-1px);
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal {
  from {
    opacity: 0.5;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes local-pulse {
  0%,
  100% {
    opacity: 0.78;
    box-shadow: 0 0 7px rgba(139, 219, 189, 0.42);
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 13px rgba(139, 219, 189, 0.78);
    transform: scale(1.08);
  }
}

.btn-primary:focus-visible,
.download-link:focus-visible {
  outline: 2px solid #e8edf5;
  outline-offset: 3px;
}

.btn-primary > span:last-child {
  font-size: 1.1rem;
}

.status-card {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(139, 219, 189, 0.16);
  border-radius: 10px;
  background: rgba(17, 25, 31, 0.78);
}

.status-heading {
  gap: 10px;
}

.status-heading h2 {
  font-size: 0.95rem;
}

.status-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(139, 219, 189, 0.12);
  color: var(--accent);
  font-size: 0.76rem;
}

.status-message {
  margin: 13px 0;
  color: #b3becb;
  font-size: 0.78rem;
  line-height: 1.6;
}

.status-card.error {
  border-color: rgba(246, 133, 133, 0.25);
}

.status-card.error .status-icon {
  background: rgba(246, 133, 133, 0.13);
  color: #f3a1a1;
}

.status-card.error .status-message {
  color: #f3a1a1;
}

.patch-list {
  display: grid;
  gap: 7px;
}

.patch-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(175, 190, 211, 0.055);
  color: #bac5d1;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.68rem;
}

.patch-item strong {
  color: #e2e8ef;
  font-weight: 500;
}

.download-link {
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 13px 17px;
  border: 1px solid rgba(139, 219, 189, 0.25);
  border-radius: 9px;
  background: rgba(139, 219, 189, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.download-link > span:last-child {
  font-size: 1.1rem;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 2px 0;
  color: #6f7b8a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.61rem;
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 28px, 600px);
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 24px;
  }

  .header-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
  }

  .hero {
    padding: 24px 22px;
  }

  .hero-text {
    font-size: 0.83rem;
  }

  .workspace {
    padding: 26px 22px;
  }

  .options-row {
    display: grid;
    gap: 16px;
  }

  .page-footer {
    flex-direction: column;
    gap: 7px;
  }
}
