:root {
  --ep-primary: #075cba;
  --ep-primary-dark: #073b85;
  --ep-primary-soft: #eaf6ff;
  --ep-accent: #8628b8;
  --ep-accent-soft: #f6edfc;
  --ep-cyan: #08bdd4;
  --ep-ink: #152542;
  --ep-muted: #63718a;
  --ep-border: #dce7f1;
  --ep-surface: #ffffff;
  --ep-background: #f5f9fd;
  --ep-success: #087f8c;
  --ep-success-soft: #e7fafb;
  --ep-warning: #9a6700;
  --ep-sidebar-width: 17.625rem;
  --ep-radius-lg: 1.375rem;
  --ep-radius-md: 0.875rem;
  --ep-shadow: 0 16px 45px rgba(7, 59, 133, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 150%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ep-ink);
  background: var(--ep-background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--ep-primary-dark);
  border-radius: 10px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  width: var(--ep-sidebar-width);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--ep-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ep-ink);
}

.brand-home {
  text-decoration: none;
  border-radius: 12px;
}

.brand-home:hover {
  color: var(--ep-primary-dark);
}

.brand-home:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.3);
  outline-offset: 4px;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.055em;
}

.brand small {
  color: var(--ep-primary);
  font-size: 0.72rem;
  font-weight: 650;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(7, 92, 186, 0.12);
  border-radius: 0.875rem;
  box-shadow: 0 9px 20px rgba(7, 92, 186, 0.16);
}

.brand-mark img {
  position: absolute;
  top: -1.3125rem;
  left: 50%;
  width: 6.25rem;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
}

.brand-mark-sm {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.6875rem;
}

.brand-mark-sm img {
  top: -0.9375rem;
  width: 4.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 2.25rem;
}

.nav-caption {
  margin: 0 0 0.55rem 0.75rem;
  color: #9497a8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  color: #55596c;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 12px;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.sidebar-link > i:first-child {
  width: 1.25rem;
  color: #787c90;
  font-size: 1.05rem;
  text-align: center;
}

.sidebar-link.active {
  color: var(--ep-primary-dark);
  font-weight: 650;
  background: var(--ep-primary-soft);
}

.sidebar-link.active > i:first-child {
  color: var(--ep-primary);
}

a.sidebar-link:hover {
  color: var(--ep-primary-dark);
  background: var(--ep-primary-soft);
  transform: translateX(2px);
}

.sidebar-link.locked {
  color: #9699a8;
  cursor: not-allowed;
  opacity: 0.78;
}

.lock-icon {
  font-size: 0.68rem;
}

.sidebar-tip {
  padding: 1rem;
  color: #53566b;
  background: linear-gradient(145deg, var(--ep-primary-soft), var(--ep-accent-soft));
  border: 1px solid #d7eafa;
  border-radius: 16px;
}

.sidebar-tip p {
  color: var(--ep-ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.sidebar-tip small {
  display: block;
  font-size: 0.75rem;
  line-height: 1.45;
}

.tip-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 0.65rem;
  place-items: center;
  color: var(--ep-primary);
  background: #fff;
  border-radius: 10px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  height: 4.375rem;
  align-items: center;
  padding: 0 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--ep-border);
  backdrop-filter: blur(16px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.65rem;
  letter-spacing: 0.045em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.icon-button {
  display: inline-grid;
  width: 2.625rem;
  height: 2.625rem;
  padding: 0;
  place-items: center;
  color: #666a7e;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 12px;
}

.icon-button:hover {
  color: var(--ep-primary);
  border-color: #9fd3ee;
}

.slogan-badge {
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  color: var(--ep-primary-dark);
  font-size: 0.76rem;
  font-weight: 720;
  background: linear-gradient(135deg, var(--ep-primary-soft), var(--ep-accent-soft));
  border: 1px solid #d7eafa;
  border-radius: 999px;
}

.slogan-badge i {
  color: var(--ep-accent);
}

.main-content {
  width: min(77.5rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 1.5rem;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.eyebrow,
.section-kicker,
.result-kicker,
.summary-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ep-primary);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0.45rem 0 0.5rem;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.page-heading p {
  max-width: 45rem;
  margin: 0;
  color: var(--ep-muted);
  line-height: 1.65;
}

.page-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.65rem;
}

.version-pill {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  color: #686c7f;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 999px;
}

.demo-session-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 720;
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-accent));
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 0.6rem 1.4rem rgba(7, 92, 186, 0.18);
}

.demo-session-button:hover,
.demo-session-button:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary-dark), #6e1f9b);
  transform: translateY(-1px);
}

.demo-session-button:disabled {
  color: #fff;
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  color: #585c70;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 14px;
}

.status-banner strong,
.status-banner small {
  display: block;
}

.status-banner strong {
  color: var(--ep-ink);
  font-size: 0.84rem;
}

.status-banner small {
  margin-top: 0.1rem;
  font-size: 0.75rem;
}

.status-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ep-primary);
  background: var(--ep-primary-soft);
  border-radius: 11px;
}

.status-success {
  color: var(--ep-success);
  background: var(--ep-success-soft);
  border-color: #cde9da;
}

.status-success .status-icon {
  color: var(--ep-success);
  background: #fff;
}

.status-error {
  color: #9d2f36;
  background: #fff5f5;
  border-color: #f1cdd0;
}

.status-error .status-icon {
  color: #b4232c;
  background: #fff;
}

.status-loading .status-icon i {
  animation: status-spin 1.3s linear infinite;
}

@keyframes status-spin {
  to {
    transform: rotate(360deg);
  }
}

.generator-card,
.result-card,
.image-generator-card {
  overflow: hidden;
  background: var(--ep-surface);
  border: 1px solid rgba(226, 227, 237, 0.9);
  border-radius: var(--ep-radius-lg);
  box-shadow: var(--ep-shadow);
}

.stepper-wrap {
  padding: 1.3rem 1.5rem;
  background: #fcfcfe;
  border-bottom: 1px solid var(--ep-border);
}

.form-feedback-banner {
  margin: 1rem 2rem 0;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  font-weight: 620;
  border: 1px solid transparent;
  border-radius: 12px;
}

.feedback-danger {
  color: #9d2f36;
  background: #fff3f4;
  border-color: #f1cdd0;
}

.feedback-warning {
  color: #805d10;
  background: #fff9e8;
  border-color: #f0dfaa;
}

.feedback-success {
  color: var(--ep-success);
  background: var(--ep-success-soft);
  border-color: #cde9da;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-item {
  position: relative;
}

.step-item:not(:last-child)::after {
  position: absolute;
  top: 19px;
  right: -0.75rem;
  width: 0.5rem;
  height: 1px;
  content: "";
  background: #dfe0e9;
}

.step-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  color: #7d8092;
  text-align: left;
  background: transparent;
  border: 0;
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 750;
  background: #f0f1f5;
  border: 1px solid #e1e2e9;
  border-radius: 12px;
}

.step-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.step-copy strong {
  font-size: 0.82rem;
}

.step-copy small {
  margin-top: 0.08rem;
  overflow: hidden;
  font-size: 0.69rem;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-item.active .step-button {
  color: var(--ep-primary-dark);
}

.step-item.active .step-number {
  color: #fff;
  background: var(--ep-primary);
  border-color: var(--ep-primary);
  box-shadow: 0 7px 17px rgba(7, 92, 186, 0.2);
}

.step-item.complete .step-number {
  color: var(--ep-success);
  background: var(--ep-success-soft);
  border-color: #c9e9d8;
}

.form-step {
  padding: 2rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  margin: 0.1rem 0 0;
  font-size: 1.25rem;
  font-weight: 730;
  letter-spacing: -0.018em;
}

.section-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ep-primary);
  font-size: 1.05rem;
  background: var(--ep-primary-soft);
  border-radius: 14px;
}

.form-label {
  margin-bottom: 0.45rem;
  color: #3d4052;
  font-size: 0.82rem;
  font-weight: 680;
}

.optional-label {
  margin-left: 0.35rem;
  color: #9699a8;
  font-size: 0.68rem;
  font-weight: 600;
}

.form-control,
.form-select {
  min-height: 46px;
  color: var(--ep-ink);
  font-size: 0.88rem;
  background-color: #fff;
  border-color: #dfe0e8;
  border-radius: 11px;
}

textarea.form-control {
  min-height: auto;
  line-height: 1.55;
  resize: vertical;
}

.form-control::placeholder {
  color: #a0a3b1;
}

.form-control:focus,
.form-select:focus {
  border-color: #62bedf;
  box-shadow: 0 0 0 0.22rem rgba(8, 189, 212, 0.13);
}

.form-control:disabled,
.form-select:disabled {
  color: #989baa;
  background-color: #f6f6f9;
}

.example-picker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  padding: 0.35rem 0.45rem;
  color: var(--ep-primary);
  background: var(--ep-primary-soft);
  border: 1px solid #d7eafa;
  border-radius: 10px;
}

.example-picker > i {
  flex: 0 0 auto;
  margin-left: 0.15rem;
  font-size: 0.85rem;
}

.example-picker .form-select {
  min-height: 34px;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  color: var(--ep-primary-dark);
  font-size: 0.72rem;
  font-weight: 650;
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.example-picker .form-select:focus {
  outline: 2px solid rgba(8, 189, 212, 0.24);
  outline-offset: 1px;
}

.example-picker-wide .form-select {
  white-space: nowrap;
  text-overflow: ellipsis;
}

.duration-unit {
  max-width: 125px;
}

.selection-card {
  height: 100%;
  min-height: 290px;
  margin: 0;
  padding: 1.2rem;
  background: #fcfcfe;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-md);
}

.selection-card legend {
  float: none;
  width: auto;
  margin: 0;
  color: var(--ep-ink);
  font-size: 0.92rem;
  font-weight: 720;
}

.selection-hint {
  margin: 0.3rem 0 1rem;
  color: var(--ep-muted);
  font-size: 0.76rem;
}

.option-list,
.option-grid {
  display: grid;
  gap: 0.65rem;
  max-height: 350px;
  overflow-y: auto;
}

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

.performance-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  background: #f0f1f5;
  border-radius: 12px;
}

.mode-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mode-option span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  color: #717587;
  font-size: 0.72rem;
  font-weight: 680;
  text-align: center;
  border-radius: 9px;
}

.mode-option input:checked + span {
  color: var(--ep-primary-dark);
  background: #fff;
  box-shadow: 0 3px 10px rgba(45, 44, 68, 0.08);
}

.mode-option input:focus-visible + span {
  outline: 3px solid rgba(8, 189, 212, 0.18);
}

.performance-config {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 11px;
}

.criteria-card {
  min-height: 0;
}

.criteria-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.criteria-builder {
  min-width: 0;
}

.criteria-mode {
  width: 100%;
}

.manual-criteria-list {
  display: grid;
  gap: 0.65rem;
}

.criterion-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 40px;
  gap: 0.55rem;
  align-items: center;
}

.criterion-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ep-primary-dark);
  font-size: 0.75rem;
  font-weight: 760;
  background: var(--ep-primary-soft);
  border: 1px solid #d7eafa;
  border-radius: 10px;
}

.criterion-item .form-control {
  min-height: 42px;
}

.remove-criterion {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: #a32633;
  background: #fff5f6;
  border: 1px solid #f0d4d8;
  border-radius: 10px;
}

.remove-criterion:hover,
.remove-criterion:focus {
  color: #811b27;
  background: #ffebed;
}

.add-criterion {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 680;
}

.instrument-selector {
  min-height: 100%;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 11px;
}

.instrument-selector .form-select {
  width: 100%;
}

.instrument-selector small {
  display: block;
  max-width: 620px;
  margin-top: 0.4rem;
  color: var(--ep-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.performance-count-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 0.8rem;
  align-items: center;
}

.performance-count-row p,
.manual-selection-note {
  margin: 0;
  color: var(--ep-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.manual-selection-note {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--ep-primary-soft);
  border-radius: 9px;
}

.custom-resource-adder {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ep-border);
}

.custom-resource-adder .input-group .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 680;
  border-color: #90cfe9;
}

.custom-resource-adder small {
  display: block;
  margin-top: 0.4rem;
  color: var(--ep-muted);
  font-size: 0.68rem;
}

.custom-resource-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 0.35rem;
}

.remove-custom-resource {
  display: grid;
  width: 34px;
  min-height: 100%;
  padding: 0;
  place-items: center;
  color: #8c5660;
  background: #fff5f6;
  border: 1px solid #f0d4d8;
  border-radius: 10px;
}

.remove-custom-resource:hover,
.remove-custom-resource:focus {
  color: #a32633;
  background: #ffebed;
}

.option-choice {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.option-choice > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.option-control {
  display: flex;
  min-height: 62px;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 11px;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.option-check {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-top: 0.05rem;
  place-items: center;
  background: #fff;
  border: 1.5px solid #c7c9d4;
  border-radius: 6px;
}

.option-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.option-copy strong {
  color: #45485b;
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.4;
}

.option-copy small {
  display: -webkit-box;
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--ep-muted);
  font-size: 0.67rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.option-choice > input:checked + .option-control {
  background: var(--ep-primary-soft);
  border-color: #62bedf;
  box-shadow: 0 0 0 2px rgba(8, 189, 212, 0.08);
}

.option-choice > input:checked + .option-control .option-check {
  color: #fff;
  background: var(--ep-primary);
  border-color: var(--ep-primary);
}

.option-choice > input:checked + .option-control .option-check::before {
  font-family: bootstrap-icons, sans-serif;
  font-size: 0.7rem;
  content: "\f26e";
}

.option-choice > input:focus-visible + .option-control {
  outline: 3px solid rgba(8, 189, 212, 0.18);
  outline-offset: 2px;
}

.option-choice-long .option-control {
  min-height: 0;
}

.option-choice-long .option-copy strong {
  font-weight: 560;
}

.option-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.source-note {
  padding: 0.75rem;
  color: #6f581f;
  font-size: 0.72rem;
  background: #fff9e9;
  border: 1px solid #eedda9;
  border-radius: 10px;
}

.source-note summary {
  font-weight: 700;
  cursor: pointer;
}

.source-note p {
  margin: 0.55rem 0 0;
  line-height: 1.5;
}

.curriculum-warning {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  color: #805d10;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  background: #fff9e9;
  border: 1px solid #eedda9;
  border-radius: 11px;
}

.empty-selection {
  grid-column: 1 / -1;
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #9396a6;
  font-size: 0.8rem;
  text-align: center;
  border: 1px dashed #dfe0e8;
  border-radius: 11px;
}

.process-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--ep-primary-soft);
  border: 1px solid #d7eafa;
  border-radius: 14px;
}

.process-card strong,
.process-card small {
  display: block;
}

.process-card strong {
  font-size: 0.84rem;
}

.process-card small {
  margin-top: 0.15rem;
  color: var(--ep-muted);
  font-size: 0.76rem;
}

.process-success {
  background: var(--ep-success-soft);
  border-color: #cde9da;
}

.process-success .process-icon {
  color: var(--ep-success);
}

.process-error {
  color: #932a32;
  background: #fff4f5;
  border-color: #efc8cc;
}

.process-error .process-icon {
  color: #b4232c;
}

.process-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ep-primary);
  background: #fff;
  border-radius: 11px;
}

.summary-card {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(8, 189, 212, 0.38), transparent 31%),
    linear-gradient(135deg, var(--ep-primary-dark), var(--ep-primary) 52%, var(--ep-accent));
  border-radius: 16px;
}

.review-panel {
  padding: 1.25rem;
  background: #fafdff;
  border: 1px solid var(--ep-border);
  border-radius: 16px;
}

.visual-option-help {
  display: block;
  margin-top: 0.4rem;
  color: var(--ep-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.document-style-preview {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.6rem;
  color: var(--ep-muted);
  background: #f8fbfe;
  border: 1px solid var(--ep-border);
  border-radius: 0.65rem;
}

.document-style-preview small {
  font-size: 0.66rem;
  line-height: 1.35;
}

.style-swatches {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.18rem;
}

.style-swatch {
  width: 0.72rem;
  height: 0.72rem;
  border: 1px solid rgba(21, 37, 66, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}

.review-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.review-heading-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ep-primary);
  background: var(--ep-primary-soft);
  border-radius: 12px;
}

.review-kicker {
  color: var(--ep-primary);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.review-heading h3 {
  margin: 0.15rem 0;
  font-size: 1rem;
  font-weight: 730;
}

.review-heading p {
  margin: 0;
  color: var(--ep-muted);
  font-size: 0.74rem;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.review-item {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 12px;
}

.review-item > i {
  flex: 0 0 auto;
  color: var(--ep-primary);
  font-size: 0.95rem;
}

.review-item div {
  min-width: 0;
}

.review-item span,
.review-item strong {
  display: block;
}

.review-item span {
  margin-bottom: 0.18rem;
  color: var(--ep-muted);
  font-size: 0.65rem;
  font-weight: 680;
  text-transform: uppercase;
}

.review-item strong {
  overflow-wrap: anywhere;
  color: var(--ep-ink);
  font-size: 0.76rem;
  font-weight: 680;
  line-height: 1.45;
}

.summary-card h3 {
  max-width: 620px;
  margin: 0.35rem 0;
  font-size: 1.15rem;
}

.summary-card p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
}

.summary-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.summary-illustration {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
}

.form-actions {
  display: flex;
  align-items: center;
  padding: 1.15rem 2rem;
  background: #fcfcfe;
  border-top: 1px solid var(--ep-border);
}

.action-primary,
.action-secondary {
  min-height: 44px;
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
  font-weight: 680;
  border-radius: 11px;
}

.action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ep-primary);
  border-color: var(--ep-primary);
  box-shadow: 0 7px 16px rgba(7, 92, 186, 0.18);
}

.action-primary:hover,
.action-primary:focus {
  background: var(--ep-primary-dark);
  border-color: var(--ep-primary-dark);
}

.action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #5e6173;
  background: #f3f3f7;
  border-color: #f3f3f7;
}

.result-card {
  margin-top: 1.5rem;
  padding: 2rem;
}

.image-generator-card {
  padding: 2rem;
}

.image-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.image-card-heading h2 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 730;
}

.image-card-heading p {
  margin: 0;
  color: var(--ep-muted);
  font-size: 0.78rem;
}

.image-prompt-form {
  display: grid;
  gap: 1.5rem;
}

.image-description {
  min-height: 180px;
}

.field-help {
  display: block;
  margin-top: 0.4rem;
  color: var(--ep-muted);
  font-size: 0.7rem;
}

.image-fieldset {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  background: #fafdff;
  border: 1px solid var(--ep-border);
  border-radius: 14px;
}

.image-fieldset legend {
  float: none;
  width: auto;
  margin: 0;
  color: var(--ep-ink);
  font-size: 0.9rem;
  font-weight: 720;
}

.image-fieldset > p {
  margin: 0.25rem 0 0.85rem;
  color: var(--ep-muted);
  font-size: 0.72rem;
}

.ratio-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.ratio-choice {
  position: relative;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.ratio-choice > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ratio-card {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 11px;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.ratio-preview {
  display: grid;
  width: 45px;
  max-height: 55px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ep-primary-dark);
  font-size: 0.58rem;
  font-weight: 760;
  background: linear-gradient(145deg, var(--ep-primary-soft), var(--ep-accent-soft));
  border: 1px solid #b9dced;
  border-radius: 7px;
}

.ratio-copy {
  min-width: 0;
}

.ratio-copy strong,
.ratio-copy small {
  display: block;
}

.ratio-copy strong {
  color: var(--ep-ink);
  font-size: 0.74rem;
}

.ratio-copy small {
  display: -webkit-box;
  margin-top: 0.18rem;
  overflow: hidden;
  color: var(--ep-muted);
  font-size: 0.63rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ratio-choice > input:checked + .ratio-card {
  background: var(--ep-primary-soft);
  border-color: #62bedf;
  box-shadow: 0 0 0 2px rgba(8, 189, 212, 0.08);
}

.ratio-choice > input:focus-visible + .ratio-card {
  outline: 3px solid rgba(8, 189, 212, 0.18);
  outline-offset: 2px;
}

.image-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ep-border);
}

.image-prompt-output {
  min-height: 300px;
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.3rem;
}

.result-heading h2 {
  margin: 0.35rem 0;
  font-size: 1.35rem;
}

.result-heading p {
  margin: 0;
  color: var(--ep-muted);
  font-size: 0.84rem;
}

.result-kicker {
  color: var(--ep-success);
}

.prompt-output {
  width: 100%;
  min-height: 360px;
  padding: 1.25rem;
  color: #343749;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  background: #fafafd;
  border: 1px solid var(--ep-border);
  border-radius: 14px;
  resize: vertical;
}

.prompt-output:focus {
  outline: 3px solid rgba(8, 189, 212, 0.15);
  border-color: #62bedf;
}

.ai-launch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1rem;
  padding: 1rem;
  background:
    linear-gradient(125deg, rgba(7, 92, 186, 0.06), rgba(8, 189, 212, 0.08)),
    #fff;
  border: 1px solid #cfe5f2;
  border-radius: 14px;
}

.ai-launch-copy {
  min-width: 0;
}

.ai-launch-kicker {
  color: var(--ep-primary);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-launch-copy h3 {
  margin: 0.18rem 0;
  color: var(--ep-ink);
  font-size: 0.94rem;
  font-weight: 730;
}

.ai-launch-copy p {
  margin: 0;
  color: var(--ep-muted);
  font-size: 0.72rem;
}

.ai-launch-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.ai-launcher {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.78rem;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 720;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 11px;
  box-shadow: 0 6px 15px rgba(21, 37, 66, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.ai-launcher:hover,
.ai-launcher:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 9px 20px rgba(21, 37, 66, 0.18);
}

.ai-launcher:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.3);
  outline-offset: 2px;
}

.ai-launcher > i:last-child {
  font-size: 0.65rem;
  opacity: 0.72;
}

.ai-chatgpt {
  background: #126f68;
}

.ai-gemini {
  background: linear-gradient(135deg, #075cba, #7142c1);
}

.ai-claude {
  background: #b55b3d;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.copy-status {
  color: var(--ep-success);
  font-size: 0.78rem;
  font-weight: 650;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 0.25rem;
  color: #9093a2;
  font-size: 0.72rem;
}

.mobile-sidebar {
  width: min(88vw, 20rem) !important;
}

.mobile-sidebar .offcanvas-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--ep-border);
}

.mobile-sidebar .offcanvas-body {
  padding: 0 1rem 1.5rem;
}

@media (min-width: 1400px) {
  .app-body {
    margin-left: var(--ep-sidebar-width);
  }

  .topbar {
    padding-right: 2rem;
  }
}

@media (max-width: 1399.98px) {
  .main-content {
    width: min(100% - 1.5rem, 70rem);
    padding-top: 1.5rem;
  }
}

@media (max-width: 991.98px) {
  html {
    font-size: 137.5%;
  }

  .main-content {
    width: min(100% - 1.5rem, 56.25rem);
    padding-top: 1.5rem;
  }

  .stepper {
    gap: 0.55rem;
  }

  .step-copy small {
    display: none;
  }

  .step-item:not(:last-child)::after {
    right: -0.4rem;
    width: 0.25rem;
  }

  .criteria-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  html {
    font-size: 125%;
  }

  .page-heading {
    display: block;
  }

  .page-heading-actions {
    align-items: flex-start;
    margin-top: 1rem;
  }

  .version-pill {
    display: inline-block;
  }

  .stepper-wrap {
    padding: 1rem;
    overflow-x: auto;
  }

  .stepper {
    min-width: 440px;
  }

  .form-step {
    padding: 1.4rem 1rem;
  }

  .form-feedback-banner {
    margin: 1rem 1rem 0;
  }

  .form-actions {
    padding: 1rem;
  }

  .summary-card,
  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-illustration {
    display: none;
  }

  .result-card {
    padding: 1.25rem 1rem;
  }

  .image-generator-card {
    padding: 1.25rem 1rem;
  }

  .ai-launch-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-launch-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  html {
    font-size: 112.5%;
  }

  .topbar {
    height: 3.875rem;
    padding: 0 0.75rem;
  }

  .main-content {
    width: calc(100% - 1rem);
  }

  .page-heading h1 {
    font-size: 1.7rem;
  }

  .status-banner {
    align-items: flex-start;
  }

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

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

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .ratio-options {
    grid-template-columns: 1fr;
  }

  .image-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .image-form-actions .btn {
    justify-content: center;
  }

  .form-actions > .ms-auto {
    width: 100%;
    margin-left: 0 !important;
  }

  .form-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .result-heading .btn {
    width: 100%;
    justify-content: center;
  }

  .ai-launch-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ai-launcher {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
