/* Marked Quick Overview — colorful, accessible theme */

:root {
  color-scheme: light dark;
  --bg-window: #eef4fb;
  --bg-surface: #ffffff;
  --bg-elevated: #f4f8fc;
  --text-primary: #1d1d1f;
  --text-secondary: #4a4a4f;
  --text-tertiary: #6e6e73;
  --accent: #0b84d6;
  --accent-hover: #086db3;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.18);
  --shadow: rgba(0, 0, 0, 0.08);
  --focus-ring: #0b84d6;
  --step-accent-1: #2eb0dc;
  --step-accent-2: #5fbf4a;
  --step-accent-3: #e04848;
  --step-accent-4: #e88a1a;
  --step-tint: rgba(46, 176, 220, 0.14);
  --step-tint-strong: rgba(46, 176, 220, 0.24);
  --step-tint-light: #dff4fb;
  --button-bg: rgba(255, 255, 255, 0.42);
  --button-bg-hover: rgba(255, 255, 255, 0.62);
  --button-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --button-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  --nav-button-bg: rgba(255, 255, 255, 0.5);
  --nav-button-bg-hover: rgba(255, 255, 255, 0.65);
  --callout-bg: rgba(46, 176, 220, 0.12);
  --callout-border: rgba(11, 132, 214, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-window: #18222e;
    --bg-surface: #243040;
    --bg-elevated: #2c3a4d;
    --text-primary: #f3f6fa;
    --text-secondary: #b8c2d0;
    --text-tertiary: #95a1b0;
    --accent: #3da8f5;
    --accent-hover: #67bdf8;
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --shadow: rgba(0, 0, 0, 0.35);
    --focus-ring: #67bdf8;
    --step-tint-light: #1e3344;
    --button-bg: rgba(36, 48, 64, 0.45);
    --button-bg-hover: rgba(36, 48, 64, 0.65);
    --button-shadow: 0 1px 3px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.18);
    --button-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.34), 0 1px 3px rgba(0, 0, 0, 0.22);
    --nav-button-bg: rgba(255, 255, 255, 0.2);
    --nav-button-bg-hover: rgba(255, 255, 255, 0.3);
    --callout-bg: rgba(61, 168, 245, 0.16);
    --callout-border: rgba(103, 189, 248, 0.4);
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-secondary: var(--text-primary);
    --border: var(--border-strong);
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  font-size: 16px;
}

body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: Avenir, "Avenir Next", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--step-tint-light, var(--bg-window));
}

body[data-accent="accent-1"] {
  --current-accent: var(--step-accent-1);
  --step-accent-text: #087089;
  --nav-primary-bg: #1a9cc7;
  --step-tint: rgba(46, 176, 220, 0.14);
  --step-tint-strong: rgba(46, 176, 220, 0.24);
  --step-tint-light: #dff4fb;
  --callout-bg: rgba(46, 176, 220, 0.12);
  --callout-border: rgba(46, 176, 220, 0.38);
}

body[data-accent="accent-2"] {
  --current-accent: var(--step-accent-2);
  --step-accent-text: #2f7a22;
  --nav-primary-bg: #3d9b32;
  --step-tint: rgba(95, 191, 74, 0.14);
  --step-tint-strong: rgba(95, 191, 74, 0.24);
  --step-tint-light: #e6f8e2;
  --callout-bg: rgba(95, 191, 74, 0.12);
  --callout-border: rgba(95, 191, 74, 0.38);
}

body[data-accent="accent-3"] {
  --current-accent: var(--step-accent-3);
  --step-accent-text: #9e2424;
  --nav-primary-bg: #c23636;
  --step-tint: #fad4d4;
  --step-tint-strong: #f5bcbc;
  --step-tint-light: #fff0f0;
  --callout-bg: rgba(224, 72, 72, 0.12);
  --callout-border: rgba(224, 72, 72, 0.38);
}

body[data-accent="accent-4"] {
  --current-accent: var(--step-accent-4);
  --step-accent-text: #9a5200;
  --nav-primary-bg: #c26f08;
  --step-tint: rgba(232, 138, 26, 0.14);
  --step-tint-strong: rgba(232, 138, 26, 0.24);
  --step-tint-light: #fdf0e0;
  --callout-bg: rgba(232, 138, 26, 0.12);
  --callout-border: rgba(232, 138, 26, 0.38);
}

@media (prefers-color-scheme: dark) {
  body[data-accent="accent-1"] {
    --step-accent-text: #67bdf8;
    --step-tint-strong: #2a4f63;
    --step-tint: #234458;
    --step-tint-light: #1e3344;
    --callout-bg: rgba(61, 168, 245, 0.16);
    --callout-border: rgba(103, 189, 248, 0.4);
  }

  body[data-accent="accent-2"] {
    --step-accent-text: #8fe07a;
    --step-tint-strong: #304a36;
    --step-tint: #2a402f;
    --step-tint-light: #243328;
    --callout-bg: rgba(143, 224, 122, 0.14);
    --callout-border: rgba(143, 224, 122, 0.38);
  }

  body[data-accent="accent-3"] {
    --step-accent-text: #ff9a9a;
    --step-tint-strong: #6a3a3a;
    --step-tint: #5c3232;
    --step-tint-light: #442828;
    --callout-bg: rgba(255, 138, 138, 0.14);
    --callout-border: rgba(255, 138, 138, 0.38);
  }

  body[data-accent="accent-4"] {
    --current-accent: #3da8f5;
    --step-accent-text: #67bdf8;
    --step-tint-strong: #2a4f63;
    --step-tint: #234458;
    --step-tint-light: #1e3344;
    --callout-bg: rgba(61, 168, 245, 0.16);
    --callout-border: rgba(103, 189, 248, 0.4);
  }
}

.app-container {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(
    180deg,
    var(--step-tint-strong) 0%,
    var(--step-tint) 32%,
    var(--step-tint-light) 100%
  );
}

.step-header {
  flex-shrink: 0;
  padding: 1.25rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--current-accent, var(--accent));
  background: transparent;
}

.step-progress {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--step-accent-text, var(--current-accent, var(--accent)));
}

.step-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.steps-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: transparent;
}

.step,
.config-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.step.active,
.config-step.active {
  display: block;
  opacity: 1;
  z-index: 1;
}

.config-step.active {
  z-index: 2;
}

.step-content,
.config-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.75rem 2rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.step-content::before,
.step-content::after {
  content: "";
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}

.step-content p,
.config-content p,
.subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  color: var(--text-primary);
  text-align: left;
  max-width: 800px;
  width: 100%;
}

.subtitle {
  text-align: center;
}

.subtitle.subtle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.step-content strong {
  font-weight: 650;
  color: var(--text-primary);
}

.step-content a {
  color: var(--step-accent-text, var(--current-accent, var(--accent)));
  font-weight: 600;
  text-decoration: none;
}

.step-content a:hover,
.step-content a:focus-visible {
  color: var(--step-accent-text, var(--current-accent, var(--accent)));
  text-decoration: underline;
}

.step-content a:focus-visible {
  outline: 2px solid var(--step-accent-text, var(--current-accent, var(--accent)));
  outline-offset: 2px;
}

.callout {
  width: 100%;
  max-width: 800px;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--callout-border);
  background: var(--callout-bg);
  box-shadow: inset 3px 0 0 var(--current-accent, var(--accent));
}

.callout p {
  margin: 0;
}

.step-content figure {
  margin: 1.25rem 0;
  text-align: center;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--bg-elevated);
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px var(--shadow);
}

.step-content img,
.step-content video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.step-content video.demo-video {
  object-fit: contain;
  background: var(--bg-elevated);
  cursor: pointer;
}

.button-container {
  margin-top: 1.5rem;
  text-align: center;
  width: 100%;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.button-primary,
.button-secondary,
.nav-button,
.config-option,
.text-button {
  font-family: inherit;
}

.button-primary,
.button-secondary,
.nav-button,
.config-option {
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease;
}

.button-primary,
.button-secondary,
.nav-button,
.config-option {
  background: var(--button-bg);
  border: 1.5px solid var(--current-accent, var(--accent));
  color: var(--current-accent, var(--accent));
  box-shadow: var(--button-shadow);
}

.button-primary {
  padding: 0.65rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.button-primary:hover {
  background: var(--button-bg-hover);
  box-shadow: var(--button-shadow-hover);
}

.button-secondary {
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.button-secondary:hover {
  background: var(--button-bg-hover);
  box-shadow: var(--button-shadow-hover);
}

.step-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem 1.25rem;
  background: transparent;
  border-top: none;
}

.nav-button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  min-width: 8.5rem;
  border-width: 1px;
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--nav-button-bg);
}

.nav-button:hover:not(:disabled) {
  background: var(--nav-button-bg-hover);
  box-shadow: var(--button-shadow-hover);
}

.nav-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.nav-button#prevBtn,
.nav-button#nextBtn {
  min-width: 2.5rem;
  width: 2.5rem;
  font-size: 1rem;
  padding: 0.5rem 0.55rem;
}

.nav-button#quickconfig {
  font-weight: 650;
}

.text-button,
.inline-link {
  background: none;
  border: none;
  color: var(--current-accent, var(--accent));
  text-decoration: underline;
  padding: 0.15rem 0.25rem;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
}

.text-button:hover,
.inline-link:hover {
  color: var(--accent-hover);
}

.config-header {
  text-align: right;
  margin-bottom: 0.75rem;
}

.config-buttons {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
  width: 100%;
}

.config-button-left,
.config-button-right {
  flex: 1;
}

.config-option {
  display: block;
  width: 100%;
  margin: 0 auto 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  font-size: 1.35rem;
  padding: 0.65rem 1.25rem;
}

.config-option:hover {
  background: var(--button-bg-hover);
  box-shadow: var(--button-shadow-hover);
  border-color: var(--current-accent, var(--accent));
}

.config-button-left .description,
.config-button-right .description {
  min-height: 5.5rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border);
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.config-content .details {
  font-size: 0.95rem;
  color: var(--text-secondary);
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.config-content .details > li {
  display: block;
  padding: 0.35rem 0 0.35rem 1.35rem;
  margin: 0.1rem 0;
  position: relative;
}

.config-content .details > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--current-accent, var(--accent));
}

.config-content .details ul {
  margin-top: 0.2rem;
  margin-left: 0;
  padding-left: 1.1rem;
}

.config-confirm-container {
  text-align: center;
  width: 100%;
  margin-top: 1rem;
}

#configconfirm,
#configresults {
  margin: 1.25rem 0;
  text-align: left;
  width: 100%;
}

#configconfirm h2,
#configresults h2 {
  display: block;
  margin: 1rem 0 0.35rem;
  width: 100%;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 650;
  text-align: left;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
}

#configconfirm .details li,
#configresults .details li {
  font-size: 1rem;
  color: var(--text-primary);
}

#configconfirm #config-disabled li,
#configresults #config-disabled li {
  color: var(--text-secondary);
}

kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

html,
body,
.app-container,
.steps-container,
.step,
.config-step {
  overflow: hidden;
}

.step-content::-webkit-scrollbar,
.config-content::-webkit-scrollbar {
  width: 8px;
}

.step-content::-webkit-scrollbar-track,
.config-content::-webkit-scrollbar-track {
  background: transparent;
}

.step-content::-webkit-scrollbar-thumb,
.config-content::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .config-step,
  .button-primary,
  .button-secondary,
  .nav-button,
  .config-option {
    transition: none;
  }
}
