:root {
  --primary-main: #3c50e0;
  --primary-dark: #0f21a3;
  --primary-light: #e2e5fb;
  --primary-extra-light: #f6f7ff;
  --bg-page: #f2f4f7;
  --bg-surface: #ffffff;
  --text-primary: #16175f;
  --text-muted: #696989;
  --border-light: #e0e5ec;
  --border-medium: #c3ccda;
  --accent-100: rgba(234, 103, 29, 1);
  --status-error: #e82543;
  --status-success: #1d8f52;
  --status-success-bg: #edf8f1;
  --focus-outline: #1884e7;
  --radius: 8px;
}

html {
  font-size: 10px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: Inter, "Helvetica Neue", sans-serif;
  font-size: 1.4rem;
  line-height: 1.8rem;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 118px;
  height: 100vh;
  padding: 16px 0;
  border-right: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.sidebar[hidden] {
  display: none;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 16px 20px;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 2.5rem;
}

.sidebar-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
}

.mobile-sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.mobile-sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
}

.sidebar-brand-netwo {
  color: var(--accent-100);
}

.sidebar-brand-cpe {
  color: var(--text-primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

.nav-section-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 16px 8px 4px;
}

.nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 60px;
  padding: 8px 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  transition: background-color 0.1s ease-out, color 0.1s ease-out;
}

.nav-button.nav-sub {
  min-height: 48px;
}

.nav-button:hover {
  background: var(--bg-page);
}

.nav-button.active {
  background: var(--primary-extra-light);
  color: var(--primary-main);
}

.nav-button.active .nav-label {
  font-weight: 500;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

.nav-label {
  font-size: 1.4rem;
  line-height: 1.8rem;
}

.sidebar-version {
  margin-top: auto;
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.4rem;
}

.main-content {
  min-height: 100vh;
  margin-left: 118px;
  padding: 24px max(32px, calc((100vw - 118px - 1200px) / 2));
  background: var(--bg-page);
}

body.prod-active .main-content {
  border-top: 4px solid var(--status-error);
}

.main-content.sidebar-hidden {
  margin-left: 0;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 16, 28, 0.42);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title-group {
  display: grid;
  gap: 6px;
}

.page-title-group h1,
.section-heading h2,
.panel-header h3,
.service-card h3,
.list-card h4 {
  margin: 0;
  color: var(--text-primary);
}

.page-title-group h1 {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 2.5rem;
}

.page-title-group p,
.section-heading p,
.panel-header p,
.muted-text,
.empty-state,
.service-meta span,
.list-card p,
.pagination-row {
  margin: 0;
  color: var(--text-muted);
}

.page-actions,
.actions-row,
.pagination-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.env-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.env-segment {
  min-width: 56px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.env-segment:hover:not(.active) {
  background: var(--bg-page);
  color: var(--text-primary);
}

.env-segment.active {
  color: var(--bg-surface);
}

.env-segment[data-env="demo"].active {
  background: var(--primary-main);
}

.env-segment[data-env="prod"].active {
  background: var(--status-error);
}

.env-segment:disabled {
  cursor: default;
  opacity: 1;
}

.slug-dropdown {
  position: relative;
}

.slug-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
}

.slug-dropdown-chevron {
  margin-left: auto;
  display: inline-flex;
}

.slug-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 150;
  min-width: 160px;
  padding: 4px 0;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: rgba(87, 100, 189, 0.2) 0px 2px 8px 0px;
  max-height: 300px;
  overflow-y: auto;
}

.slug-dropdown-item {
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  text-align: left;
}

.slug-dropdown-item:hover {
  background: var(--bg-page);
}

.slug-dropdown-item.active {
  color: var(--primary-main);
  font-weight: 600;
}

.slug-search-input {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--bg-surface);
  font-size: 1.3rem;
  position: sticky;
  top: 0;
}

.prod-warning-banner[hidden] {
  display: none;
}

.prod-warning-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--status-error);
  border-radius: var(--radius);
  background: #fff1f3;
  color: var(--status-error);
  box-shadow: 0 10px 24px rgba(232, 37, 67, 0.16);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prod-warning-banner strong {
  font-size: 1.2rem;
  line-height: 1.6rem;
}

.prod-warning-banner span {
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 700;
}

body.prod-active .page-header {
  border-bottom: 2px solid rgba(232, 37, 67, 0.32);
  padding-bottom: 16px;
}

.status-badge,
.service-badge,
.badge-info {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--primary-extra-light);
  color: var(--primary-dark);
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 600;
}

.badge-success {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.badge-error {
  background: #fff1f3;
  color: var(--status-error);
}

.badge-neutral {
  background: var(--bg-page);
  color: var(--text-muted);
}

.badge-cpe {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary-main);
  font-size: 1rem;
  font-weight: 600;
}

.screen {
  display: block;
}

.screen.active {
  display: block;
}

.screen[hidden] {
  display: none;
}

#welcome-screen:not(.active) {
  display: none;
}

input[readonly],
textarea[readonly] {
  background: var(--primary-extra-light);
  border-color: var(--border-light);
  cursor: default;
}

select:disabled {
  background: var(--primary-extra-light);
  border-color: var(--border-light);
  cursor: default;
  opacity: 0.8;
}

.card,
.history-panel,
.list-card,
.service-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.card {
  padding: 24px;
}

.card-narrow {
  max-width: 720px;
}

.config-api-grid {
  display: grid;
  gap: 16px;
}

.api-key-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.section-heading h2,
.panel-header h3 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 2.1rem;
}

.feedback-banner {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--primary-extra-light);
  color: var(--primary-dark);
}

.feedback-banner.success {
  border-color: #b7e4c7;
  background: var(--status-success-bg);
  color: var(--status-success);
}

.feedback-banner.error {
  border-color: #ffc9d3;
  background: #fff1f3;
  color: var(--status-error);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 23, 95, 0.5);
}

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

.modal-card {
  position: relative;
  width: min(440px, calc(100vw - 48px));
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  box-shadow: rgba(87, 100, 189, 0.2) 0px 2px 8px 0px;
}

.modal-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.modal-close-button:hover {
  color: var(--text-primary);
  background-color: var(--bg-page);
}

.modal-close-button:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 1px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 600;
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out, color 0.1s ease-out;
}

.button-primary {
  border: 0;
  background: var(--primary-main);
  color: var(--primary-extra-light);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button-secondary {
  border: 1px solid var(--primary-main);
  background: transparent;
  color: var(--primary-main);
}

.button-secondary:hover:not(:disabled) {
  background: var(--primary-extra-light);
}

.button-tertiary {
  border: 0;
  background: var(--bg-page);
  color: var(--primary-main);
}

.button:disabled {
  border-color: #a0a0b6;
  background: #a0a0b6;
  color: #c2c2d0;
}

.stack-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.field legend {
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 400;
  color: var(--text-primary);
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-page);
  color: var(--text-primary);
}

select {
  height: 42px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23696989' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--focus-outline);
  outline-offset: 1px;
}

.field-error {
  border-color: var(--status-error) !important;
}

.field-error-msg {
  display: block;
  color: var(--status-error);
  font-size: 1.1rem;
  margin-top: 4px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.twofa-code-input {
  max-width: 160px;
  text-align: center;
  letter-spacing: 0.18em;
}

.services-grid,
.list-stack,
.service-summary {
  display: grid;
  gap: 12px;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.inline-feedback {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.inline-feedback.error {
  border-color: #f1b4bc;
  background: #fff1f4;
  color: #a12636;
}

.inline-feedback.success {
  border-color: #c7ebd5;
  background: #effaf3;
  color: #1d7a38;
}

.inline-feedback.info {
  border-color: #ced5ff;
  background: #f4f6ff;
  color: #2138b0;
}

.services-table-card {
  overflow: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.services-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.services-table th,
.services-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-medium);
  font-size: 1.4rem;
  line-height: 1.8rem;
  text-align: left;
}

.services-table th {
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 400;
}

.services-table th[data-sort-key] {
  cursor: pointer;
  user-select: none;
}

.services-table th[data-sort-key]:hover {
  color: var(--primary-main);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.9em;
}

.services-table tbody tr {
  cursor: pointer;
}

.services-table tbody tr:hover {
  background: var(--bg-page);
}

.services-table tbody tr.selected {
  background: var(--primary-extra-light);
}

.radio-circle {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-medium);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
}

.radio-circle.active {
  border-color: var(--primary-main);
}

.radio-circle.active::after {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary-main);
  content: "";
}

.services-pagination {
  margin-top: 16px;
  margin-bottom: 32px;
  justify-content: flex-end;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.pagination-icon-button {
  min-width: 42px;
  padding: 10px 0;
  font-size: 2rem;
  line-height: 1;
}

.pagination-page-label {
  min-width: 92px;
  text-align: center;
}

.services-toolbar {
  align-items: center;
}

.services-search-input {
  flex: 1 1 320px;
  min-width: 240px;
  max-width: 480px;
}

.search-input {
  background: var(--bg-surface);
}

.service-card,
.list-card {
  padding: 16px;
  text-align: left;
}

.service-card {
  display: grid;
  gap: 12px;
}

.service-card:hover {
  background: var(--bg-page);
}

.service-summary {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #ced5ff;
  border-radius: var(--radius);
  background: var(--primary-extra-light);
}

.service-summary p {
  margin: 0;
}

.step-section {
  display: grid;
  gap: 20px;
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.wizard-main {
  min-width: 0;
}

.service-info-panel {
  position: sticky;
  top: 24px;
  border: 0;
}

.service-info-panel[hidden] {
  display: none;
}

.service-info-toggle {
  display: none;
  cursor: pointer;
  list-style: none;
}

.service-info-toggle::-webkit-details-marker {
  display: none;
}

.service-info-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

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

.service-info-list p {
  margin: 0;
}

.preview-header {
  justify-content: space-between;
  align-items: flex-start;
}

.rsc-preview-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.config-summary-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.config-summary-content {
  display: grid;
  gap: 16px;
}

.config-summary-actions {
  justify-content: flex-end;
}

.summary-kv {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 8px 16px;
  align-items: start;
}

.summary-kv-label {
  color: var(--text-muted);
  font-weight: 600;
}

.summary-kv-value {
  color: var(--text-primary);
  word-break: break-word;
}

.summary-warning-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--text-primary);
}

.rsc-preview {
  margin: 0;
  background: var(--bg-page);
  border-radius: 8px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.rsc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rsc-toc-link {
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
}

.rsc-line {
  display: block;
}

.rsc-comment {
  color: var(--text-muted);
}

.rsc-section-header {
  margin: 8px 0;
  padding-top: 8px;
  border-top: 1px solid #d7dde7;
  color: var(--text-primary);
  font-weight: 700;
}

.rsc-command {
  font-weight: 700;
}

.rsc-ip {
  color: var(--primary-main);
}

.rsc-preview.preview-error {
  color: #a12636;
}

.diag-terminal {
  min-height: 120px;
  padding: 16px;
  border-radius: var(--radius);
  background: #1e1e1e;
  color: #4ec9b0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1.2rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.product-card.selected {
  border-color: var(--primary-main);
}

.product-card h4,
.product-card p {
  margin: 0;
}

.product-card-body {
  display: grid;
  gap: 8px;
}

.product-card-specs {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.byod-grid {
  margin-bottom: 24px;
}

.credential-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--primary-extra-light);
}

.credential-header {
  justify-content: space-between;
}

.config-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}

.config-tab {
  padding: 12px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.config-tab:hover {
  color: var(--text-primary);
}

.config-tab.active {
  color: var(--primary-main);
  border-bottom-color: var(--primary-main);
}

.config-panel {
  display: none;
  gap: 18px;
}

.config-panel.active {
  display: grid;
  gap: 24px;
  padding-bottom: 100px;
}

.wizard-stepper-shell {
  margin-bottom: 24px;
}

.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.wizard-stepper-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
}

.wizard-stepper-step:disabled {
  cursor: default;
}

.wizard-stepper-step.complete {
  cursor: pointer;
  color: var(--text-primary);
}

.wizard-stepper-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 1.3rem;
  font-weight: 700;
}

.wizard-stepper-step.active .wizard-stepper-circle,
.wizard-stepper-step.complete .wizard-stepper-circle {
  border-color: var(--primary-main);
  background: rgba(255, 107, 44, 0.12);
  color: var(--primary-main);
}

.wizard-stepper-label {
  font-size: 1.3rem;
  font-weight: 600;
}

.wizard-stepper-connector {
  flex: 1;
  min-width: 18px;
  height: 2px;
  background: var(--border-light);
}

.config-section {
  padding: 20px 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.config-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 600;
}

.config-section[data-collapsible] .config-section-title {
  cursor: pointer;
  user-select: none;
}

.config-section[data-collapsible] .config-section-title::after {
  content: "▾";
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.config-section[data-collapsible][data-collapsed="true"] .config-section-title::after {
  transform: rotate(-90deg);
}

.config-section[data-collapsible] .config-section-title:focus-visible {
  outline: 2px solid var(--accent-main);
  outline-offset: 4px;
}

.config-section-bullet {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-main);
}

.config-section-body {
  display: grid;
  gap: 16px;
}

.config-section-body.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.config-tab-coming-soon {
  color: var(--text-muted);
  background: var(--bg-page);
}

.config-tab-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6ebf2;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
}

.config-tab-badge-status {
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 4px;
  color: var(--bg-surface);
  font-size: 1rem;
  line-height: 1;
}

.config-tab-badge-warning {
  background: #ff9800;
}

.config-tab-badge-error {
  background: var(--status-error);
}

.coming-soon-overlay {
  display: grid;
  place-items: center;
  padding: 32px 24px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius);
  background: #f8fafc;
  text-align: center;
}

.coming-soon-copy {
  display: grid;
  gap: 8px;
}

.coming-soon-copy strong,
.coming-soon-copy p {
  margin: 0;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 400;
}

.field-required {
  color: var(--status-error);
  font-weight: 600;
}

.field-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border-medium);
  color: var(--bg-surface);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  cursor: help;
}

.field-tooltip:hover::after,
.field-tooltip:focus::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 100;
  width: max-content;
  max-width: 250px;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--text-primary);
  color: var(--bg-surface);
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 400;
  white-space: normal;
  transform: translateX(-50%);
  pointer-events: none;
}

.field-tooltip:hover::before,
.field-tooltip:focus::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text-primary);
}

.toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.toggle-switch .toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--border-medium);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch .toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--status-success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--focus-outline);
  outline-offset: 2px;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 1.2rem;
  line-height: 1.5;
}

.info-banner-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
}

.info-banner-info {
  border: 1px solid #bee5fd;
  background: #e8f4fd;
  color: #1a5276;
}

.info-banner-warning {
  border: 1px solid #ffeaa7;
  background: #fef3cd;
  color: #856404;
}

.info-banner-migration-vpn {
  border: 1px solid #ddd6fe;
  background: #f0e6ff;
  color: #5b21b6;
}

.info-banner-migration-mobile {
  border: 1px solid #ffe0b2;
  background: #fff3e0;
  color: #e65100;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  flex: 1;
  padding-right: 60px;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--primary-main);
  font-size: 1.1rem;
  line-height: 1.4rem;
  font-weight: 600;
  cursor: pointer;
}

.password-toggle-btn:hover {
  color: var(--primary-dark);
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label,
.config-panel h4 {
  color: var(--text-primary);
}

.conditional-section {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.config-warnings {
  margin-bottom: 16px;
}

.warning-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.warning-high {
  background: #fef3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.warning-critical {
  background: #fce8ec;
  color: var(--status-error);
  border: 1px solid var(--status-error);
}

.warning-moyenne {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ff9800;
}

.warning-basse {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

.warning-icon {
  flex-shrink: 0;
}

.builder-list {
  display: grid;
  gap: 8px;
}

.lan-network-cards {
  gap: 16px;
}

.builder-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin-bottom: 8px;
}

.builder-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.builder-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.builder-card-title {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 600;
}

.builder-row-fw {
  flex-wrap: wrap;
}

.builder-field {
  flex: 1;
}

.builder-field-small {
  max-width: 120px;
}

.input-port {
  max-width: 140px;
}

.input-short {
  max-width: 120px;
}

.builder-field-wide {
  flex: 2;
}

.lan-network-card {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.lan-network-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lan-network-heading {
  display: grid;
  gap: 4px;
}

.lan-network-title {
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 600;
}

.lan-network-main-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lan-network-field {
  display: grid;
  gap: 8px;
}

.lan-network-readonly {
  background: var(--bg-page);
  color: var(--text-muted);
}

.lan-network-section {
  display: grid;
  gap: 8px;
}

.lan-network-section-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.3rem;
  line-height: 1.7rem;
  font-weight: 600;
  text-align: left;
}

.lan-network-section-content {
  background: var(--primary-extra-light);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-remove {
  min-width: 36px;
  min-height: 36px;
  color: var(--status-error);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
}

.btn-sm {
  width: fit-content;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

.form-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-toggle input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.port-checkboxes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.port-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
}

.toggle-inline input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.field-title {
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 600;
}

.service-meta {
  display: grid;
  gap: 6px;
}

.history-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.history-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.event-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.event-filter-actions {
  display: flex;
  align-items: flex-end;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-field {
  min-width: 220px;
}

.list-card {
  display: grid;
  gap: 8px;
}

.list-card h4 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.8rem;
}

.list-card pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.4rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.event-card {
  gap: 12px;
  cursor: pointer;
}

.event-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.event-badges {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.event-details-toggle {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-main);
  font-size: 1.2rem;
  font-weight: 600;
}

.pagination-row {
  justify-content: space-between;
  padding-bottom: 90px;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.changelog-content {
  display: grid;
  gap: 12px;
}

.changelog-content h2,
.changelog-content h3,
.changelog-content p,
.changelog-content ul {
  margin: 0;
}

.changelog-content ul {
  padding-left: 20px;
  color: var(--text-primary);
}

.bottom-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 82px;
  margin-top: 24px;
  padding: 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 20px 16px 32px;
  }

  .page-header {
    align-items: center;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    width: min(280px, calc(100vw - 32px));
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 18px 40px rgba(11, 20, 40, 0.18);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
  }

  .bottom-bar {
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .page-header,
  .panel-header,
  .actions-row,
  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-row {
    justify-content: flex-start;
  }

  .env-toggle {
    width: 100%;
  }

  .lan-network-header {
    flex-direction: column;
    align-items: stretch;
  }

  .slug-dropdown-trigger,
  .slug-dropdown-menu {
    width: 100%;
  }

  .modal-card {
    width: 100%;
  }

  .wizard-stepper {
    gap: 8px;
    padding: 12px 14px;
  }

  .wizard-stepper-label {
    display: none;
  }
}

@media (max-width: 1024px) {
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .service-info-panel {
    position: static;
    order: -1;
  }

  .service-info-toggle {
    display: block;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
  }
}

/* ======================================================
   EXPERIMENTAL WIZARD — scope .experimental-wizard
   ====================================================== */

.experimental-wizard {
  --exp-fast: 0.15s;
  --exp-normal: 0.3s;
  --exp-slow: 0.5s;
  --exp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Wizard home button --- */

.wizard-home-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--primary-main);
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.1s ease-out, color 0.1s ease-out;
}

.wizard-home-button:hover {
  background: var(--primary-extra-light);
  color: var(--primary-dark);
}

.wizard-home-button[hidden] {
  display: none;
}

.wizard-home-button svg {
  flex-shrink: 0;
}

/* --- Default config (recovery) admin --- */

.defconf-active-panel {
  margin-bottom: 16px;
}

.defconf-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rsc-preview-block {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 16px;
  border-radius: var(--radius);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 1.15rem;
  line-height: 1.6;
  overflow-x: auto;
  max-height: 400px;
  white-space: pre;
  tab-size: 4;
}

.defconf-history-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.defconf-history-row .rsc-preview-block {
  width: 100%;
  margin-top: 8px;
}

.defconf-row-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.defconf-actions-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.defconf-actions {
  margin-bottom: 16px;
}

/* --- API Stats --- */

.api-stats-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.api-stats-card {
  flex: 1;
  min-width: 120px;
  padding: 16px;
  background: var(--bg-page);
  border-radius: var(--radius);
  text-align: center;
}

.api-stats-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.api-stats-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.api-stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  padding: 8px 0;
}

.api-stats-bar {
  flex: 1;
  min-width: 4px;
  background: var(--primary-main);
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease;
}

.api-stats-bar.has-errors {
  background: linear-gradient(to top, var(--status-error) 0%, var(--primary-main) 100%);
}

/* --- Config mode toggle (Simple / Expert) --- */

.config-site-name-bar {
  margin-bottom: 12px;
  max-width: 360px;
}

.config-mode-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.config-mode-btn {
  padding: 6px 16px;
  border: none;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.config-mode-btn:hover:not(.active) {
  background: var(--bg-page);
}

.config-mode-btn.active {
  background: var(--primary-main);
  color: var(--bg-surface);
}

/* --- Welcome screen --- */

.welcome-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  min-height: 50vh;
}

.welcome-hero .section-heading {
  margin-bottom: 8px;
}

/* --- Nav disabled state --- */

.nav-button.nav-disabled {
  opacity: 0.45;
  cursor: default;
}

.nav-button.nav-disabled:hover {
  background: none;
}

/* --- Bouton Experimental --- */

.bottom-bar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.exp-button {
  background: linear-gradient(135deg, var(--primary-main), var(--accent-100));
  border: none;
  color: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

.exp-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.18));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.exp-button:hover:not(:disabled)::after {
  opacity: 1;
}

.exp-button:disabled {
  background: #a0a0b6;
}

/* --- Keyboard toast --- */

.keyboard-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: var(--text-primary);
  color: var(--bg-surface);
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(22, 23, 95, 0.25);
  animation: exp-slide-up var(--exp-normal, 0.3s) cubic-bezier(0.22, 1, 0.36, 1);
}

.keyboard-toast[hidden] {
  display: none;
}

.keyboard-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.keyboard-toast-close:hover {
  color: var(--bg-surface);
}

/* --- Kbd hints on buttons --- */

.kbd-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.7;
  vertical-align: middle;
}

/* --- Port Mapper --- */

.port-mapper-section {
  margin-bottom: 8px;
}

.port-mapper-container {
  text-align: center;
  padding: 16px 8px;
}

.port-mapper-container svg {
  max-width: 100%;
  height: auto;
}

.port-mapper-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 8px 0;
}

.port-mapper-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.port-mapper-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* --- Experimental animations (keyframes) --- */

@keyframes exp-fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes exp-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes exp-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes exp-skeleton-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes exp-stagger-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes exp-checkmark-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes exp-particle-out {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: var(--exp-particle-translate) scale(0);
  }
}

/* --- Experimental stepper --- */

.experimental-wizard .wizard-stepper-circle {
  transition: transform var(--exp-normal) var(--exp-ease),
    box-shadow var(--exp-normal) var(--exp-ease),
    background var(--exp-normal) var(--exp-ease),
    border-color var(--exp-normal) var(--exp-ease);
}

.experimental-wizard .wizard-stepper-step.active .wizard-stepper-circle {
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(60, 80, 224, 0.15);
}

.experimental-wizard .wizard-stepper-step.complete .wizard-stepper-circle {
  background: linear-gradient(135deg, var(--primary-main), var(--primary-dark));
  border-color: var(--primary-main);
  color: var(--bg-surface);
}

.experimental-wizard .wizard-stepper-connector {
  position: relative;
  overflow: hidden;
}

.experimental-wizard .wizard-stepper-connector::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--exp-slow) var(--exp-ease);
}

.experimental-wizard .wizard-stepper-connector.exp-filled::after {
  transform: scaleX(1);
}

/* --- Experimental button hover --- */

.experimental-wizard .button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 80, 224, 0.15);
  transition: transform var(--exp-fast) var(--exp-ease),
    box-shadow var(--exp-fast) var(--exp-ease),
    background-color 0.1s ease-out;
}

/* --- Experimental panels --- */

.experimental-wizard .config-summary-panel:not([hidden]),
.experimental-wizard .rsc-preview-panel:not([hidden]) {
  animation: exp-fade-slide-in var(--exp-normal) var(--exp-ease);
}

.experimental-wizard .config-section {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.88);
}

/* --- Experimental feedbacks --- */

.experimental-wizard .inline-feedback:not([hidden]),
.experimental-wizard .feedback-banner:not([hidden]) {
  animation: exp-fade-slide-in var(--exp-normal) var(--exp-ease);
}

/* --- Experimental modal --- */

.experimental-wizard .modal-overlay:not([hidden]) .modal-card {
  animation: exp-modal-in var(--exp-normal) var(--exp-ease);
}

/* --- Skeleton loading --- */

.skeleton-line {
  height: 16px;
  border-radius: 4px;
  background: var(--border-light);
  animation: exp-skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line:nth-child(2) {
  width: 75%;
  animation-delay: 0.15s;
}

.skeleton-line:nth-child(3) {
  width: 50%;
  animation-delay: 0.3s;
}

/* --- Summary stagger --- */

.exp-stagger-in {
  animation: exp-stagger-in var(--exp-normal, 0.3s) cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* --- Success overlay --- */

.exp-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.exp-success-check {
  stroke: var(--status-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: exp-checkmark-draw 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.exp-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: exp-particle-out 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (max-width: 640px) {
  .port-mapper-legend {
    flex-direction: column;
    align-items: flex-start;
  }

  .keyboard-toast {
    left: 16px;
    right: 16px;
    transform: none;
    font-size: 1.1rem;
  }

  @keyframes exp-slide-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
