:root {
  --magenta: #e20074;
  --magenta-dark: #ba0060;
  --ink: #171224;
  --navy: #20133f;
  --purple: #3a1d61;
  --muted: #6f6a7a;
  --line: #e7e3ea;
  --soft: #f7f5f8;
  --white: #fff;
  --green: #11845b;
  --amber: #9a6700;
  --shadow: 0 18px 40px rgba(24, 18, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: #f4f2f6;
}

body.locked .app-shell {
  display: none;
}

body:not(.locked) .login-screen {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 25% 18%, rgba(226, 0, 116, 0.22), transparent 30%),
    linear-gradient(145deg, #21104a 0%, #130d22 58%, #080611 100%);
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  background: white;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.3);
}

.login-panel.hidden,
.registration-panel {
  display: none;
}

.registration-panel.active {
  display: grid;
}

.login-brand {
  color: var(--ink);
  padding: 0 0 16px;
  border-bottom-color: var(--line);
}

.login-brand span {
  color: var(--muted);
}

.login-panel h1 {
  font-size: 24px;
}

.login-panel p {
  margin-bottom: 2px;
}

.login-error {
  display: none;
  border: 1px solid #f0cc72;
  border-radius: 8px;
  background: #fff8e6;
  color: #6f4d00;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.login-error.active {
  display: block;
}

.managed-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.doc-upload-btn {
  margin-top: 8px;
  justify-self: start;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.doc-upload-btn.selected {
  border-color: #1fa971;
  color: #176d49;
  background: #eefaf4;
}

.csv-upload-btn.selected {
  border-color: #1fa971;
  color: #176d49;
  background: #eefaf4;
}

.csv-delete-btn.selected {
  border-color: #d64550;
  color: #9f2f37;
  background: #fff2f2;
}

.hidden {
  display: none !important;
}

label input:disabled {
  background: #f3f0f5;
  color: #6f6a7a;
  cursor: not-allowed;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #1c1231 0%, #130d22 100%);
  color: var(--white);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-lockup span {
  display: block;
  color: #c9c0d5;
  font-size: 12px;
  margin-top: 2px;
}

.dt-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--magenta);
  color: white;
  font-weight: 800;
  border-radius: 8px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list details {
  display: grid;
  gap: 4px;
}

.nav-list summary {
  list-style: none;
  color: #a99fb8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 12px 12px 6px;
  cursor: pointer;
}

.nav-list summary::-webkit-details-marker {
  display: none;
}

.nav-list summary::after {
  content: "+";
  float: right;
  color: #dcd5e6;
}

.nav-list details[open] summary::after {
  content: "-";
}

.nav-item {
  border: 0;
  background: transparent;
  color: #dcd5e6;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item.child {
  margin-left: 8px;
  padding-left: 18px;
}

.nav-subgroup {
  display: grid;
  gap: 4px;
  margin-left: 8px;
}

.nav-subgroup > span {
  color: #8f849d;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px 0 18px;
}

.nav-subgroup > em {
  color: #bdb4c8;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 12px 0 26px;
}

.nav-subgroup .nav-item.child {
  margin-left: 10px;
}

.config-tree {
  margin: 2px 0 8px 8px;
  gap: 2px;
}

.config-tree > span {
  color: white;
  padding-top: 9px;
}

.config-tree .nav-item.child.leaf {
  margin-left: 18px;
  padding: 7px 10px 7px 20px;
  font-size: 12px;
  color: #cfc6da;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(226, 0, 116, 0.18);
  color: white;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--magenta);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d7cfe0;
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffbf3c;
  box-shadow: 0 0 0 4px rgba(255,191,60,0.18);
}

.main {
  min-width: 0;
  padding: 24px 30px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 26px;
}

.eyebrow {
  color: var(--magenta);
  font-weight: 700;
  font-size: 12px;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 0;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.topbar-actions,
.cta-row,
.publish-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: white;
  min-height: 40px;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: white;
  box-shadow: 0 4px 14px rgba(24, 18, 36, 0.04);
}

.mode-switch.compact {
  box-shadow: none;
}

.mode-btn,
.preview-btn {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 10px 13px;
  color: var(--muted);
  font-weight: 700;
}

.mode-btn.active,
.preview-btn.active {
  background: var(--magenta);
  color: white;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: rise 220ms ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.page-heading p {
  margin-bottom: 0;
  max-width: 720px;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 15px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  background: var(--magenta);
  color: white;
  box-shadow: 0 12px 22px rgba(226, 0, 116, 0.22);
}

.secondary-btn {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stacked-sections {
  display: grid;
  gap: 16px;
}

.stacked-sections.inner {
  gap: 22px;
}

.network-policy-grid,
.legal-card-grid,
.page-config-grid,
.method-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.journey-builder {
  display: grid;
  gap: 10px;
}

.journey-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  border: 1px dashed #d8cfdf;
  border-radius: 8px;
  padding: 12px;
  background: #fbf9fc;
  cursor: grab;
}

.journey-step b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--magenta);
  color: white;
}

.journey-step span {
  font-weight: 800;
}

.journey-step small {
  color: var(--muted);
}

.journey-ad-context {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid #ffd0e7;
  border-radius: 8px;
  padding: 12px;
  background: #fff7fb;
}

.journey-ad-context span {
  color: var(--muted);
  margin-right: auto;
}

.page-config-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.manual-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 12px 0;
}

.setup-status-list {
  display: grid;
  gap: 10px;
}

.setup-status-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  background: #fbf9fc;
  border-radius: 8px;
  padding: 13px 14px;
  text-align: left;
  font-weight: 800;
}

.setup-status-list button:hover {
  border-color: var(--magenta);
}

.status-review,
.status-todo {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
}

.status-review {
  background: #fff4d8;
  color: #8a5a00;
}

.status-todo {
  background: #ece7f2;
  color: var(--muted);
}

.publish-status-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.focused-context {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(226, 0, 116, 0.14);
}

.metric,
.panel,
.package-card,
.method-card,
.feature-card,
.market-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span,
.readonly-row span,
.release-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  font-size: 24px;
  margin: 8px 0;
}

#setupComplete {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.metric small,
.method-card small {
  color: var(--muted);
}

.progress {
  height: 8px;
  border-radius: 10px;
  background: #ece8f0;
  overflow: hidden;
  margin-top: 10px;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--magenta);
}

.workspace-grid,
.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.panel {
  padding: 20px;
}

.panel.large {
  min-width: 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-title p {
  margin-bottom: 0;
}

.compact-title {
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 26px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: #f0edf3;
  white-space: nowrap;
}

.pill.included,
.pill.active {
  color: var(--green);
  background: #e8f6f0;
}

.pill.premium {
  color: var(--magenta);
  background: #ffe8f4;
}

.pill.locked {
  color: var(--amber);
  background: #fff5d8;
}

.comparison,
.method-grid,
.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

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

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.language-select {
  min-width: 260px;
}

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

.package-grid,
.form-grid.compact-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.package-card {
  padding: 18px;
  cursor: pointer;
  transition: border 160ms ease, transform 160ms ease;
}

.package-card.selected {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(226, 0, 116, 0.12), var(--shadow);
}

.package-card ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0;
}

.task-list,
.publish-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.task-list li,
.publish-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.task-list li::before,
.publish-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d2cad9;
  flex: 0 0 auto;
}

.task-list li.done::before,
.publish-list li.complete::before {
  background: var(--green);
}

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

.stepper {
  display: grid;
  gap: 8px;
  align-content: start;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 13px;
  text-align: left;
  color: var(--muted);
  font-weight: 700;
}

.step b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0edf3;
  color: var(--ink);
}

.step.active {
  border-color: var(--magenta);
  color: var(--ink);
}

.step.active b {
  background: var(--magenta);
  color: white;
}

.setup-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

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

.logo-upload-field {
  grid-column: 1 / -1;
}

.brand-color-field input {
  width: 100%;
}

label {
  display: grid;
  gap: 7px;
  color: #3b3348;
  font-size: 13px;
  font-weight: 700;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed #bfb6c8;
  border-radius: 8px;
  color: var(--muted);
  background: #faf9fb;
}

.inline-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-options label,
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #faf9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.check-row.locked {
  opacity: 0.5;
}

.premium-lock-label {
  margin-left: auto;
  border-radius: 999px;
  background: #ffe8f4;
  color: var(--magenta);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.language-section {
  margin-top: 20px;
  padding-top: 4px;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.language-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #faf9fb;
  font-size: 12px;
}

.weblate-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.helper-copy {
  margin: 10px 0 0;
  font-size: 13px;
}

.weblate-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.weblate-frame {
  display: none;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.weblate-frame.active {
  display: block;
}

.weblate-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f4f2f6;
  border-bottom: 1px solid var(--line);
}

.weblate-topbar strong {
  color: var(--magenta);
  font-size: 18px;
}

.weblate-topbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.translation-table {
  display: grid;
  max-height: 340px;
  overflow: auto;
}

.translation-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.5fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.translation-row:last-child {
  border-bottom: 0;
}

.translation-key {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.translation-row input {
  width: 100%;
}

.warning-box {
  display: none;
  margin-top: 16px;
  border: 1px solid #f0cc72;
  border-radius: 8px;
  background: #fff8e6;
  color: #6f4d00;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
}

.warning-box.active {
  display: block;
}

.wcag-preview-warning {
  display: none;
  border: 1px solid #f0cc72;
  border-radius: 10px;
  background: #fff8e6;
  color: #6f4d00;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.wcag-preview-warning.active {
  display: block;
}

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

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

.market-section {
  display: grid;
  gap: 14px;
}

.market-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.market-card,
.method-card {
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.feature-card.locked,
.market-card.locked {
  opacity: 0.72;
}

.feature-top,
.market-top,
.method-card > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.feature-card p,
.market-card p,
.method-card p {
  margin-bottom: 0;
}

.tail-list {
  display: grid;
  gap: 12px;
}

.tail-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
}

.tail-card h3 {
  margin-top: 8px;
  color: var(--navy);
}

.tail-card p {
  color: var(--muted);
}

.route-card h3 {
  letter-spacing: 0;
}

.tail-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 12px;
  font-size: 12px;
}

.tail-meta span {
  color: var(--muted);
  font-weight: 800;
}

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

.remove-btn {
  min-height: 34px;
  padding: 7px 12px;
  color: #9f2f37;
}

.preview-control-group {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.nested-control {
  margin-left: 22px;
}

.list-management-compact {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.list-action-stack {
  display: grid;
  gap: 10px;
}

.list-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.list-action-row .secondary-btn {
  width: 100%;
}

.list-iframe {
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  overflow: auto;
}

.list-iframe.mini {
  max-height: 220px;
}

.access-list-table {
  display: grid;
  min-width: 640px;
}

.access-list-row {
  display: grid;
  grid-template-columns: 92px minmax(150px, 1.4fr) 112px 112px auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #e4ebf4;
  padding: 10px 8px;
  font-size: 12px;
}

.access-list-row.head {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.access-list-row:last-child {
  border-bottom: 0;
}

.method-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.method-details summary {
  cursor: pointer;
  color: var(--magenta);
  font-size: 13px;
  font-weight: 900;
}

.method-details p {
  margin: 10px 0;
  font-size: 13px;
}

.method-details label {
  margin-top: 10px;
}

.feature-items {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.switch {
  display: inline-flex;
  justify-self: start;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cfc7d6;
  position: relative;
  transition: background 160ms ease;
}

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

.switch input:checked + span {
  background: var(--magenta);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch input:disabled + span {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-ready {
  color: var(--green) !important;
  font-weight: 800;
}

.baseline-ads,
.premium-ads {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.premium-ads.locked {
  opacity: 0.48;
  pointer-events: none;
}

.readonly-row,
.release-meta {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9fb;
}

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

.control-list label {
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.custom-ad-control {
  display: none;
}

.custom-ad-control.active {
  display: grid;
}

.ads-doc-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ad-placement {
  min-height: 300px;
}

.mini-ad {
  width: min(280px, 100%);
  min-height: 540px;
  justify-self: center;
  border-radius: 34px;
  background: #05050a;
  border: 6px solid #121018;
  color: white;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  text-align: center;
  margin: 14px 0;
  padding: 10px;
  box-shadow: 0 20px 44px rgba(0,0,0,0.32);
  overflow: hidden;
}

.mini-phone-chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  color: #141822;
  background: #f5f7fb;
  border-radius: 24px 24px 0 0;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

.mini-phone-chrome span:last-child {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9edf3;
  font-size: 20px;
}

.mini-ad-hero {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 380px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(75,106,146,0.08), rgba(14,22,42,0.12)),
    linear-gradient(155deg, #879fbd 0%, #f2b995 43%, #5f6f8d 100%);
  overflow: hidden;
}

.mini-ad-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 42% 84%, rgba(255,255,255,0.88), transparent 32%),
    radial-gradient(circle at 18% 72%, rgba(255,255,255,0.58), transparent 27%),
    linear-gradient(180deg, transparent 0 55%, rgba(255,255,255,0.45) 56%, transparent 74%);
  opacity: 0.9;
}

.wing-shape {
  position: absolute;
  z-index: 1;
  top: 78px;
  left: -34px;
  width: 335px;
  height: 88px;
  background: linear-gradient(10deg, rgba(43,50,66,0.64), rgba(235,239,246,0.82));
  clip-path: polygon(0 44%, 76% 0, 100% 15%, 16% 86%);
  transform: rotate(-9deg);
}

.wing-shape::after {
  content: "";
  position: absolute;
  right: 0;
  top: -34px;
  width: 52px;
  height: 88px;
  background: #19213b;
  clip-path: polygon(38% 0, 100% 7%, 76% 100%, 0 88%);
}

.mini-ad-hero strong,
.mini-ad-hero em {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.28);
}

.mini-ad-hero strong {
  margin-top: 190px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.mini-ad-hero em {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.mini-ad-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #dce8f7;
  color: #25354c;
  border-radius: 0 0 24px 24px;
  font-size: 10px;
  font-weight: 900;
}

.mini-ad-footer button {
  border: 0;
  border-radius: 999px;
  background: #8fa9ca;
  color: white;
  min-height: 40px;
  font-weight: 900;
}

.mini-ad.disabled,
.ad-slot.disabled {
  background: #efebf2;
  color: var(--muted);
}

.preview-workbench {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.controls-panel {
  align-self: start;
  display: grid;
  gap: 13px;
}

.passenger-stage {
  min-height: 680px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 10%, rgba(226,0,116,0.28), transparent 30%),
    linear-gradient(145deg, #21104a 0%, #120c25 62%, #07050f 100%);
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 36px);
  overflow: hidden;
}

.passenger-stage.desktop .phone-frame {
  width: min(760px, 100%);
}

.passenger-stage.tablet .phone-frame {
  width: min(560px, 100%);
}

.phone-frame {
  width: min(390px, 100%);
  transition: width 220ms ease;
}

.portal-preview {
  background: #eef7ff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(0,0,0,0.32);
  min-height: 620px;
  display: grid;
  align-content: start;
  position: relative;
  overflow: hidden;
}

.portal-utility {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  background: #f6f6f7;
  color: #091f3f;
  padding: 10px 12px;
  border-bottom: 1px solid #dde4ee;
}

.portal-nav-btn {
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  background: white;
  color: #091f3f;
  font-size: 24px;
  line-height: 1;
}

.portal-close-btn {
  border: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  background: white;
  color: #091f3f;
  font-size: 28px;
  line-height: 1;
}

.portal-brandbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  background: #f6fbff;
  box-shadow: inset 0 -3px 0 #0b376b;
}

.portal-brandbar select {
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font-weight: 800;
  padding: 5px 8px;
  min-height: 28px;
  min-width: 88px;
  max-width: 48%;
  font-size: 12px;
}

.airline-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #2275a7;
  font-weight: 800;
  box-shadow: none;
  font-size: 13px;
}

.portal-main-content {
  display: grid;
  gap: 12px;
  padding: 18px 26px 10px;
  background: linear-gradient(180deg, #f6fbff, #ecf7ff);
}

.portal-screen {
  display: none;
}

.portal-screen.active {
  display: grid;
}

.connectivity-status {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cfe6dc;
  border-radius: 999px;
  background: #eefaf4;
  color: #176d49;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.connectivity-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1fa971;
  box-shadow: 0 0 0 4px rgba(31, 169, 113, 0.12);
}

.connectivity-status.offline {
  border-color: #edd2d2;
  background: #fff2f2;
  color: #9f2f37;
}

.connectivity-status.offline i {
  background: #d64550;
  box-shadow: 0 0 0 4px rgba(214, 69, 80, 0.12);
}

.portal-preview h2 {
  color: #071f46;
  font-size: clamp(23px, 4vw, 30px);
  line-height: 1.12;
  text-align: center;
  margin-bottom: 0;
  max-width: 560px;
  justify-self: center;
}

.portal-subtitle {
  color: #526071;
  text-align: center;
  margin-bottom: 2px;
}

.route {
  color: #071f46;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 0;
  text-align: center;
}

.flight-progress {
  display: none;
  border: 1px solid #dbe8f4;
  border-radius: 12px;
  background: white;
  padding: 14px 16px 12px;
  gap: 8px;
  color: #071f46;
}

.flight-progress.active {
  display: grid;
}

.flight-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flight-progress-meta span {
  color: #69788a;
  font-size: 12px;
  font-weight: 800;
}

.flight-progress-meta strong {
  color: #071f46;
}

.flight-track {
  position: relative;
  height: 46px;
  margin: 2px 18px 0;
}

.track-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b376b, #a8c0dc);
}

.track-point {
  position: absolute;
  top: 16px;
  z-index: 2;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--magenta);
  box-shadow: 0 0 0 5px rgba(226, 0, 116, 0.1);
}

.track-point.origin {
  left: -7px;
}

.track-point.destination {
  right: -7px;
  border-color: #0b376b;
  box-shadow: 0 0 0 5px rgba(11, 55, 107, 0.1);
}

.aircraft {
  position: absolute;
  top: 2px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--magenta);
  color: white;
  font-size: 19px;
  line-height: 1;
  transform: translateX(-50%) rotate(8deg);
  box-shadow: 0 10px 22px rgba(226, 0, 116, 0.28);
  transition: left 220ms ease;
}

.route-endpoints {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 18px 0;
  color: #071f46;
  font-size: 12px;
  font-weight: 900;
}

.route-endpoints span {
  min-width: 42px;
}

.route-endpoints span:last-child {
  text-align: right;
}

.portal-connect-card {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  border-radius: 14px;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.ad-slot {
  min-height: 92px;
  border-radius: 12px;
  background: linear-gradient(135deg, #21104a, #e20074);
  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
}

.ad-slot small {
  opacity: 0.8;
  font-weight: 700;
}

.portal-actions {
  display: grid;
  gap: 10px;
}

.portal-actions button {
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  font-weight: 800;
  background: #07366e;
  color: white;
}

.portal-actions button.secondary {
  background: #eaf2fb;
  color: #07366e;
}

.loyalty-box {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbf9fc;
  gap: 10px;
}

.loyalty-box.active {
  display: grid;
}

.loyalty-box span {
  color: var(--muted);
  font-size: 13px;
}

.loyalty-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.loyalty-fields input {
  color: var(--muted);
  background: white;
}

.loyalty-signup-link {
  justify-self: start;
  color: #07366e;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
}

.premium-widgets {
  display: grid;
  gap: 10px;
}

.ad-flow-screen {
  min-height: 505px;
  background: #dbe8f6;
  grid-template-rows: 1fr auto;
}

.ad-visual {
  position: relative;
  min-height: 450px;
  display: grid;
  place-items: end center;
  padding: 34px 24px 72px;
  overflow: hidden;
  color: white;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(4, 24, 52, 0.05), rgba(4, 24, 52, 0.42)),
    linear-gradient(145deg, #9fc2df 0%, #f1b998 48%, #6f87a5 100%);
}

.ad-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 72%, rgba(255,255,255,0.45), transparent 30%),
    radial-gradient(ellipse at 80% 42%, rgba(255,255,255,0.35), transparent 24%),
    linear-gradient(16deg, transparent 0 38%, rgba(9,31,63,0.34) 39% 45%, transparent 46%),
    linear-gradient(165deg, transparent 0 48%, rgba(255,255,255,0.48) 49% 53%, transparent 54%);
}

.ad-sky::before {
  content: "";
  position: absolute;
  left: -36px;
  right: 42px;
  top: 145px;
  height: 92px;
  transform: skewX(-24deg) rotate(-4deg);
  border-radius: 18px 100% 100% 20px;
  background: linear-gradient(90deg, rgba(236,241,248,0.88), rgba(80,94,116,0.78));
  box-shadow: 220px -38px 0 -24px rgba(9,31,63,0.78);
}

.ad-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-shadow: 0 2px 14px rgba(0,0,0,0.28);
}

.ad-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.05;
  letter-spacing: 1px;
  font-weight: 500;
}

.ad-copy span {
  max-width: 260px;
  font-size: 14px;
  line-height: 1.35;
}

.ad-bottom-bar {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: #d8e6f7;
  border-radius: 18px 18px 0 0;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.ad-details-btn,
.ad-continue-btn {
  border: 0;
  min-height: 54px;
  font-weight: 900;
}

.ad-details-btn {
  display: grid;
  place-items: center;
  gap: 2px;
  background: transparent;
  color: #07366e;
  text-transform: uppercase;
  font-size: 18px;
}

.ad-details-btn span {
  font-size: 10px;
  letter-spacing: 1px;
}

.ad-continue-btn {
  border-radius: 999px;
  background: #8ba3c2;
  color: white;
  padding: 0 18px;
  font-size: 15px;
}

.ad-continue-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  background: #a9b9cf;
}

.ad-continue-btn:not(:disabled) {
  background: #07366e;
  box-shadow: 0 10px 22px rgba(7, 54, 110, 0.24);
}

.success-screen {
  min-height: 505px;
  justify-items: center;
  align-content: start;
  gap: 14px;
  padding: 34px 32px 18px;
  text-align: center;
  background: #eef7ff;
  color: #06244d;
}

.verify-number-screen {
  min-height: 505px;
  justify-items: center;
  align-content: start;
  gap: 15px;
  padding: 34px 32px 22px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(226,0,116,0.08), transparent 32%),
    #eef7ff;
  color: #06244d;
}

.verify-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #06244d;
  color: white;
  font-size: 40px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(6,36,77,0.2);
}

.verify-kicker {
  color: #e20074;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.verify-number-screen h2 {
  font-size: clamp(26px, 5vw, 34px);
}

.verify-number-screen p {
  max-width: 340px;
  color: #4e5d6f;
  line-height: 1.55;
}

.verify-card {
  width: min(320px, 100%);
  display: grid;
  gap: 5px;
  border-radius: 12px;
  background: #c7d7ee;
  padding: 18px 22px;
  text-align: left;
}

.verify-card span,
.verify-card small {
  color: #4e5d6f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.verify-card strong {
  color: #06244d;
  font-size: 27px;
}

.verify-status {
  width: min(320px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: white;
  padding: 13px 16px;
  color: #06244d;
  font-weight: 900;
  text-align: left;
}

.verify-status i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1fa971;
  box-shadow: 0 0 0 5px rgba(31,169,113,0.12);
}

.success-check {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #06244d;
  color: white;
  font-size: 44px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(6,36,77,0.22);
}

.success-screen h2 {
  font-size: clamp(28px, 5vw, 36px);
}

.success-screen p {
  max-width: 340px;
  color: #4e5d6f;
  line-height: 1.6;
}

.success-flight-progress,
.success-widgets {
  width: min(320px, 100%);
}

.success-widgets {
  display: grid;
  gap: 10px;
}

.success-primary,
.success-secondary {
  width: min(320px, 100%);
  min-height: 56px;
  border-radius: 999px;
  font-weight: 900;
}

.success-primary {
  border: 0;
  background: #07366e;
  color: white;
}

.success-secondary {
  border: 1px solid #07366e;
  background: transparent;
  color: #07366e;
}

.portal-preview.ad-active footer {
  display: none;
}

.widget {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #faf9fb;
}

.widget strong {
  display: block;
  margin-top: 4px;
}

.weather-forecast {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #f7fbff, #edf4ff);
}

.weather-forecast > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.weather-forecast span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weather-forecast strong {
  color: var(--navy);
}

.forecast-days {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.forecast-days span {
  display: block;
  border-radius: 10px;
  background: white;
  padding: 10px 8px;
  color: #51465e;
  text-align: center;
  line-height: 1.45;
}

.forecast-days b {
  display: block;
  color: var(--navy);
  margin-bottom: 2px;
}

.portal-preview footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 18px 16px;
  color: #94a5b7;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.portal-preview footer span {
  flex-basis: 100%;
  text-align: center;
  color: #b2beca;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(10, 5, 18, 0.62);
}

.legal-modal.active {
  display: grid;
}

.legal-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0,0,0,0.36);
  padding: 28px;
}

.legal-close {
  position: sticky;
  top: 0;
  float: right;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0edf3;
  color: var(--navy);
  font-size: 24px;
  line-height: 1;
}

.legal-dialog h2 {
  margin: 12px 44px 18px 0;
  color: var(--navy);
}

.legal-doc-body {
  display: grid;
  gap: 16px;
}

.legal-doc-body section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.legal-doc-body h3 {
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 6px;
}

.legal-doc-body p {
  color: #51465e;
  line-height: 1.65;
  font-size: 14px;
}

.market-card .price {
  font-weight: 800;
  color: var(--navy);
}

.managed-form {
  display: none;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.managed-form.active {
  display: grid;
}

.publish-list li {
  justify-content: flex-start;
}

.publish-list li span {
  margin-left: auto;
  color: var(--green);
  font-weight: 800;
}

.release-meta {
  grid-template-columns: 90px minmax(0, 1fr);
  margin-top: 18px;
}

.release-meta strong {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .summary-grid,
  .feature-grid,
  .market-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-grid,
  .publish-layout,
  .preview-workbench,
  .legal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .topbar,
  .page-heading {
    flex-direction: column;
  }

  .summary-grid,
  .comparison,
  .method-grid,
  .legal-grid,
  .language-grid,
  .feature-grid,
  .market-grid,
  .market-category-grid,
  .form-grid,
  .wizard {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .passenger-stage {
    padding: 12px;
    min-height: auto;
  }

  .portal-preview {
    min-height: 0;
    padding: 14px;
    border-radius: 16px;
    gap: 10px;
  }

  .portal-utility {
    justify-content: space-between;
  }

  .portal-utility select {
    max-width: 48%;
    min-width: 0;
    font-size: 12px;
    padding: 7px 9px;
  }

  .portal-preview h2 {
    font-size: 23px;
  }

  .flight-progress {
    padding: 12px;
  }

  .flight-track {
    margin-left: 16px;
    margin-right: 16px;
  }

  .route-endpoints {
    margin-left: 16px;
    margin-right: 16px;
  }

  .aircraft {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .premium-widgets,
  .loyalty-fields {
    grid-template-columns: 1fr;
  }

  .weather-forecast > div:first-child {
    display: grid;
  }

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

  .portal-connect-card {
    padding: 12px;
    border-radius: 14px;
  }

  .ad-slot {
    min-height: 78px;
  }
}
