:root {
  --ep-primary: #075cba;
  --ep-primary-dark: #073b85;
  --ep-primary-soft: #eaf6ff;
  --ep-accent: #8628b8;
  --ep-accent-dark: #5d178f;
  --ep-accent-soft: #f6edfc;
  --ep-cyan: #08bdd4;
  --ep-brand-gradient: linear-gradient(
    135deg,
    var(--ep-primary) 0%,
    #176ccb 38%,
    var(--ep-accent) 100%
  );
  --ep-brand-glow: 0 18px 38px rgba(34, 74, 166, 0.2);
  --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: 100%;
  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:
    radial-gradient(circle at 8% 4%, rgba(8, 189, 212, 0.12), transparent 21rem),
    linear-gradient(180deg, #ffffff 0%, #f9fbff 58%, #f7f2fc 100%);
  border-right: 1px solid rgba(7, 92, 186, 0.13);
  box-shadow: 10px 0 35px rgba(7, 59, 133, 0.055);
}

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

.brand-home {
  text-decoration: none;
  border-radius: 18px;
  transition:
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

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

.sidebar > .brand-home,
.mobile-sidebar .offcanvas-header .brand-home {
  align-items: center;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: visible;
  color: var(--ep-primary-dark);
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sidebar > .brand-home::after,
.mobile-sidebar .offcanvas-header .brand-home::after {
  content: none;
}

.sidebar > .brand-home:hover,
.mobile-sidebar .offcanvas-header .brand-home:hover {
  color: var(--ep-accent-dark);
  box-shadow: none;
  transform: none;
}

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

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

.brand strong {
  font-size: 1.02rem;
  font-weight: 820;
  letter-spacing: 0.065em;
  line-height: 1.1;
}

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

.sidebar > .brand-home small,
.mobile-sidebar .offcanvas-header .brand-home small {
  margin-top: 0.22rem;
  color: var(--ep-primary);
}

.brand-logo {
  display: block;
  width: min(9rem, 100%);
  height: auto;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  object-fit: contain;
  border-radius: 0;
  filter: none;
}

.brand-logo-mobile {
  width: 2.9rem;
}

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

.nav-caption {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.55rem 0.55rem;
  color: #737b93;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.nav-caption::before {
  width: 0.45rem;
  height: 0.45rem;
  content: "";
  background: linear-gradient(135deg, var(--ep-cyan), var(--ep-accent));
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(8, 189, 212, 0.09);
}

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

.sidebar-link > i:first-child {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ep-primary);
  font-size: 0.95rem;
  background: linear-gradient(145deg, var(--ep-primary-soft), #f7fbff);
  border: 1px solid rgba(7, 92, 186, 0.08);
  border-radius: 0.7rem;
}

.sidebar-link.active {
  color: #fff;
  font-weight: 700;
  background: var(--ep-brand-gradient);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(48, 64, 165, 0.2);
}

.sidebar-link.active > i:first-child {
  color: var(--ep-accent-dark);
  background: #fff;
  border-color: rgba(255, 255, 255, 0.8);
}

a.sidebar-link:hover {
  color: var(--ep-primary-dark);
  background: linear-gradient(100deg, var(--ep-primary-soft), var(--ep-accent-soft));
  border-color: rgba(7, 92, 186, 0.12);
  box-shadow: 0 8px 20px rgba(7, 59, 133, 0.08);
  transform: translateX(3px);
}

a.sidebar-link:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.34);
  outline-offset: 2px;
}

a.sidebar-link.active:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary-dark), var(--ep-accent-dark));
  border-color: rgba(255, 255, 255, 0.24);
}

.sidebar-link.locked {
  color: #8a8fa1;
  cursor: not-allowed;
  opacity: 0.72;
}

.sidebar-link.locked > i:first-child {
  color: #85899b;
  background: rgba(237, 239, 245, 0.82);
  border-color: rgba(132, 139, 159, 0.08);
}

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

.sidebar-tip {
  padding: 1rem;
  color: #53566b;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(8, 189, 212, 0.55), rgba(134, 40, 184, 0.45))
      border-box;
  border: 1px solid transparent;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(7, 59, 133, 0.07);
}

.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: #fff;
  background: linear-gradient(135deg, var(--ep-cyan), var(--ep-accent));
  border-radius: 10px;
  box-shadow: 0 7px 16px rgba(68, 64, 170, 0.2);
}

.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:
    linear-gradient(90deg, rgba(234, 246, 255, 0.94), rgba(255, 255, 255, 0.94) 48%, rgba(246, 237, 252, 0.94));
  border-bottom: 1px solid rgba(7, 92, 186, 0.13);
  box-shadow: 0 8px 28px rgba(7, 59, 133, 0.055);
  backdrop-filter: blur(16px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.65rem;
  color: var(--ep-primary-dark);
  letter-spacing: 0.045em;
}

.mobile-brand:hover {
  color: var(--ep-accent-dark);
}

.mobile-brand strong {
  font-size: 0.92rem;
}

.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: var(--ep-primary);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(7, 92, 186, 0.16);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(7, 59, 133, 0.08);
}

.icon-button:hover {
  color: #fff;
  background: var(--ep-brand-gradient);
  border-color: transparent;
}

.icon-button:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.34);
  outline-offset: 2px;
}

.slogan-badge {
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 720;
  background: var(--ep-brand-gradient);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(55, 66, 170, 0.18);
}

.slogan-badge i {
  color: #d8fbff;
}

.donation-trigger {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  color: #8a275f;
  font-size: 0.72rem;
  font-weight: 760;
  background: linear-gradient(120deg, #fff5fb, #fff8ed);
  border: 1px solid rgba(190, 52, 127, 0.22);
  border-radius: 999px;
  box-shadow: 0 0.4rem 1rem rgba(132, 43, 97, 0.09);
}

body[data-feature-donations="false"] [data-donation-open] {
  display: none !important;
}

.donation-trigger i {
  color: #db2777;
}

.donation-trigger:hover,
.donation-trigger:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #db2777, #d97706);
  border-color: transparent;
}

.donation-trigger:hover i,
.donation-trigger:focus-visible i {
  color: #fff;
}

.author-trigger {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.7rem 0.35rem 0.42rem;
  color: var(--ep-ink);
  background: linear-gradient(110deg, #ffffff, #eff9ff 62%, #f7efff);
  border: 1px solid rgba(65, 80, 181, 0.22);
  border-radius: 999px;
  box-shadow: 0 0.45rem 1.1rem rgba(34, 74, 166, 0.12);
}

.author-trigger:hover,
.author-trigger:focus-visible,
.author-trigger[aria-expanded="true"] {
  color: var(--ep-primary-dark);
  border-color: rgba(7, 92, 186, 0.35);
  box-shadow: 0 0.45rem 1.2rem rgba(34, 74, 166, 0.13);
}

.author-avatar {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--ep-brand-gradient);
  border-radius: 50%;
  box-shadow: 0 0.35rem 0.9rem rgba(54, 62, 166, 0.2);
}

.author-trigger-copy {
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.05;
}

.author-trigger-copy small {
  color: var(--ep-primary);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.author-trigger-copy strong {
  max-width: 10.5rem;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-trigger > i {
  color: var(--ep-muted);
  font-size: 0.62rem;
}

.author-menu {
  width: min(21rem, calc(100vw - 1rem));
  margin-top: 0.55rem !important;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(7, 92, 186, 0.14);
  border-radius: 1rem;
  box-shadow: 0 1.2rem 3rem rgba(21, 37, 66, 0.18);
}

.author-menu-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem;
}

.author-avatar-lg {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 0.82rem;
}

.author-menu-profile small,
.author-menu-profile strong,
.author-menu-profile span {
  display: block;
}

.author-menu-profile small {
  color: var(--ep-primary);
  font-size: 0.58rem;
  font-weight: 740;
  text-transform: uppercase;
}

.author-menu-profile strong {
  margin-top: 0.1rem;
  font-size: 0.9rem;
}

.author-menu-profile span {
  margin-top: 0.18rem;
  color: var(--ep-muted);
  font-size: 0.65rem;
}

.author-menu-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.author-menu-links a,
.author-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--ep-primary-dark);
  font-size: 0.67rem;
  font-weight: 720;
  text-decoration: none;
  background: var(--ep-primary-soft);
  border: 1px solid rgba(7, 92, 186, 0.12);
  border-radius: 0.65rem;
}

.author-menu-links a {
  min-height: 2.35rem;
  padding: 0.45rem;
}

.author-menu-links a:hover,
.author-social-links a:hover {
  color: #fff;
  background: var(--ep-primary);
}

.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;
}

[data-module-panel] h1:focus {
  outline: none;
}

.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-select {
  padding-right: 2.5rem;
  color: var(--ep-primary-dark);
  font-weight: 650;
}

.duration-reference {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  color: var(--ep-muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.duration-reference i {
  color: var(--ep-accent);
}

.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-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.image-flow-steps li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  color: var(--ep-muted);
  background: #f7fafc;
  border: 1px solid var(--ep-border);
  border-radius: 12px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.image-flow-steps li > span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 780;
  background: #e8eef4;
  border-radius: 50%;
}

.image-flow-steps strong,
.image-flow-steps small {
  display: block;
}

.image-flow-steps strong {
  color: var(--ep-ink);
  font-size: 0.72rem;
}

.image-flow-steps small {
  margin-top: 0.08rem;
  font-size: 0.6rem;
}

.image-flow-steps li.active {
  color: var(--ep-primary-dark);
  background: var(--ep-primary-soft);
  border-color: #b9dced;
}

.image-flow-steps li.active > span {
  color: #fff;
  background: var(--ep-brand-gradient);
}

.image-flow-steps li.complete > span {
  color: transparent;
  background: var(--ep-success);
}

.image-flow-steps li.complete > span::after {
  color: #fff;
  font-family: "bootstrap-icons";
  content: "\f26e";
}

.image-step-card {
  padding: 1.15rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(7, 59, 133, 0.045);
}

.image-step-legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.image-step-legend > span:last-child,
.image-step-legend strong,
.image-step-legend small {
  display: block;
}

.image-step-legend strong {
  color: var(--ep-ink);
  font-size: 0.9rem;
}

.image-step-legend small {
  margin-top: 0.05rem;
  color: var(--ep-muted);
  font-size: 0.62rem;
  font-weight: 500;
}

.image-step-number {
  display: grid !important;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  background: var(--ep-brand-gradient);
  border-radius: 9px;
  box-shadow: 0 6px 14px rgba(53, 77, 178, 0.18);
}

.description-step-card .image-description {
  margin-top: 0.85rem;
}

.description-helpers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.description-helpers > span {
  margin-right: 0.15rem;
  color: var(--ep-muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.description-helpers button {
  padding: 0.36rem 0.62rem;
  color: var(--ep-primary-dark);
  font-size: 0.64rem;
  font-weight: 700;
  background: var(--ep-primary-soft);
  border: 1px solid #c9e3f1;
  border-radius: 999px;
}

.description-helpers button:hover,
.description-helpers button:focus-visible {
  color: #fff;
  background: var(--ep-primary);
}

.rubric-prompt-form {
  display: grid;
  gap: 1.25rem;
}

/* Unidades: reutiliza la composición de los generadores y mantiene legibles
   las selecciones curriculares extensas tanto en escritorio como en móvil. */
.unit-fields {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.unit-example-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  color: #17365d;
  background: linear-gradient(135deg, #eef7ff, #f5efff);
  border: 1px solid #cbdcf0;
  border-radius: 14px;
}
.unit-example-action div { display: grid; gap: 0.2rem; }
.unit-example-action strong { font-size: 1rem; }
.unit-example-action small { color: var(--ep-muted); font-size: 0.875rem; line-height: 1.5; }
@media (max-width: 575.98px) {
  .unit-example-action { align-items: stretch; flex-direction: column; }
  .unit-example-action .btn { width: 100%; }
}
#unitsModule .form-label,
#unitsModule .form-control,
#unitsModule .form-select {
  font-size: 1rem;
}
#unitsModule .visual-option-help,
#unitsModule .rubric-section-card > p,
#unitCurriculumStatus,
#unitSaveStatus {
  font-size: 0.875rem;
  line-height: 1.6;
}
#unitsModule .rubric-section-card > legend {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.unit-check-list,
.unit-competences,
.unit-capabilities {
  display: grid;
  gap: 0.65rem;
}
.unit-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem;
  border: 1px solid var(--ep-border);
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.unit-check input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: #276749;
}
.unit-check:has(input:checked) { background: #edf6f0; border-color: #81ad92; }
.unit-check:has(input:disabled) { opacity: 0.6; cursor: default; }
.unit-check:focus-within { outline: 2px solid #276749; outline-offset: 2px; }
.unit-area-group {
  min-width: 0;
  border: 1px solid var(--ep-border);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}
#unitsModule .unit-area-group legend { font-size: 1rem; margin-bottom: 0.75rem; }
.unit-competence-item + .unit-competence-item { margin-top: 1rem; }
.unit-capabilities { padding: 0.65rem 0 0 1rem; }
#unitCurriculumStatus { margin-top: 1rem; }
.service-card-units .service-card-icon { background: #e8f3ed; color: #276749; }
#unitsModule .prompt-output { font-size: 0.875rem; }

.rubric-section-card {
  min-width: 0;
  margin: 0;
  padding: 1.15rem;
  background: rgba(250, 253, 255, 0.88);
  border: 1px solid var(--ep-border);
  border-radius: 14px;
}

.rubric-section-card legend {
  float: none;
  width: auto;
  margin: 0;
  color: var(--ep-ink);
  font-size: 0.95rem;
  font-weight: 740;
}

.rubric-section-card > p {
  margin: 0.25rem 0 1rem;
  color: var(--ep-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.rubric-form-grid,
.rubric-config-grid,
.rubric-score-heading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rubric-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.rubric-field-full {
  grid-column: 1 / -1;
}

.rubric-mode-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.22rem;
  background: #eef3f8;
  border-radius: 11px;
}

.rubric-mode-panel {
  margin-top: 1rem;
}

.rubric-number-input {
  width: min(100%, 9rem);
}

.rubric-dynamic-list {
  display: grid;
  gap: 0.55rem;
}

.rubric-dynamic-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2.35rem;
  align-items: center;
  gap: 0.45rem;
}

.rubric-row-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--ep-primary-dark);
  font-size: 0.72rem;
  font-weight: 760;
  background: var(--ep-primary-soft);
  border-radius: 9px;
}

.rubric-remove-row {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  place-items: center;
  color: #9b3441;
  background: #fff4f5;
  border: 1px solid #efd0d4;
  border-radius: 9px;
}

.rubric-remove-row:hover,
.rubric-remove-row:focus-visible {
  color: #7f1825;
  background: #ffe9ec;
  border-color: #e6abb2;
}

.rubric-add-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding: 0.5rem 0.7rem;
  color: var(--ep-primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--ep-primary-soft);
  border: 1px solid #c9e3f5;
  border-radius: 9px;
}

.rubric-add-row:hover,
.rubric-add-row:focus-visible {
  color: #fff;
  background: var(--ep-primary);
  border-color: var(--ep-primary);
}

.rubric-scale-row,
.rubric-scale-labels {
  grid-template-columns: 2rem minmax(9rem, 1fr) minmax(5rem, 0.35fr) minmax(5rem, 0.35fr) 2.35rem;
}

.rubric-scale-labels {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  color: var(--ep-muted);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rubric-score-heading {
  align-items: end;
}

.rubric-prompt-output {
  min-height: 360px;
}

.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;
}

.style-fieldset {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(134, 40, 184, 0.07), transparent 24rem),
    #fafdff;
}

.style-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.style-search {
  display: flex;
  width: min(100%, 24rem);
  min-height: 2.65rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.8rem;
  color: var(--ep-muted);
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 11px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.style-search:focus-within {
  border-color: #62bedf;
  box-shadow: 0 0 0 3px rgba(8, 189, 212, 0.12);
}

.style-search input {
  width: 100%;
  color: var(--ep-ink);
  font-size: 0.78rem;
  background: transparent;
  border: 0;
  outline: 0;
}

.style-selection {
  color: var(--ep-primary-dark);
  font-size: 0.7rem;
  font-weight: 720;
}

.style-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.15rem 0 0.65rem;
}

.style-category {
  display: inline-flex;
  min-height: 2.25rem;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.7rem;
  color: var(--ep-muted);
  font-size: 0.68rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 999px;
}

.style-category small {
  display: grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  color: inherit;
  font-size: 0.58rem;
  background: rgba(99, 113, 138, 0.09);
  border-radius: 999px;
}

.style-category:hover,
.style-category.active {
  color: var(--ep-primary-dark);
  background: var(--ep-primary-soft);
  border-color: #b9dced;
}

.style-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 20rem;
  gap: 0.6rem;
  padding: 0.15rem 0.25rem 0.25rem 0.05rem;
  overflow-y: auto;
}

.style-option {
  display: flex;
  min-width: 0;
  min-height: 4.2rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--ep-border);
  border-radius: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.style-option:hover {
  border-color: #9ecfe4;
  box-shadow: 0 8px 20px rgba(7, 59, 133, 0.08);
  transform: translateY(-1px);
}

.style-option.selected {
  background: linear-gradient(120deg, var(--ep-primary-soft), var(--ep-accent-soft));
  border-color: #62bedf;
  box-shadow: 0 0 0 2px rgba(8, 189, 212, 0.08);
}

.style-option:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.22);
  outline-offset: 2px;
}

.style-swatch {
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #22c8d8, #176fc5 55%, #9638c4);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 11px;
  box-shadow: 0 5px 12px rgba(25, 76, 151, 0.16);
}

.style-option[data-palette="1"] .style-swatch { background: linear-gradient(145deg, #f8c65d, #ed6f72, #8c4ac8); }
.style-option[data-palette="2"] .style-swatch { background: linear-gradient(145deg, #1c2b47, #4176a3, #f1ad76); }
.style-option[data-palette="3"] .style-swatch { background: linear-gradient(145deg, #81e6d9, #3b82f6, #6d28d9); }
.style-option[data-palette="4"] .style-swatch { background: linear-gradient(145deg, #36d399, #1f6feb, #111827); image-rendering: pixelated; }
.style-option[data-palette="5"] .style-swatch { background: linear-gradient(145deg, #ff7a18, #af002d 55%, #42145f); }
.style-option[data-palette="6"] .style-swatch { background: linear-gradient(145deg, #f6e7c1, #88b7aa, #365d66); }

.style-option-copy {
  min-width: 0;
}

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

.style-option-copy strong {
  overflow: hidden;
  color: var(--ep-ink);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-option-copy small {
  margin-top: 0.14rem;
  overflow: hidden;
  color: var(--ep-muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-empty {
  margin: 0.8rem 0 0;
  color: var(--ep-muted);
  font-size: 0.75rem;
  text-align: center;
}

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

.image-flow-summary {
  margin-right: auto;
  color: var(--ep-muted);
  font-size: 0.7rem;
  font-weight: 680;
}

.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;
}

/* Vibrant EDUPROMPT theme */
body {
  background:
    radial-gradient(circle at 24% 8%, rgba(8, 189, 212, 0.13), transparent 29rem),
    radial-gradient(circle at 92% 22%, rgba(134, 40, 184, 0.12), transparent 32rem),
    radial-gradient(circle at 60% 92%, rgba(7, 92, 186, 0.1), transparent 34rem),
    linear-gradient(145deg, #f7fcff 0%, #f6f8ff 46%, #fcf7ff 100%);
  background-attachment: fixed;
}

.page-heading {
  position: relative;
  padding: 1.6rem 1.7rem;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.93), rgba(242, 249, 255, 0.9) 54%, rgba(250, 239, 255, 0.92));
  border: 1px solid rgba(73, 95, 187, 0.15);
  border-radius: 1.4rem;
  box-shadow: 0 18px 42px rgba(34, 74, 166, 0.11);
}

.page-heading::before,
.page-heading::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.page-heading::before {
  top: -4rem;
  right: 7%;
  width: 10rem;
  height: 10rem;
  background: radial-gradient(circle, rgba(8, 189, 212, 0.18), transparent 68%);
}

.page-heading::after {
  right: -3rem;
  bottom: -5rem;
  width: 11rem;
  height: 11rem;
  background: radial-gradient(circle, rgba(134, 40, 184, 0.18), transparent 68%);
}

.page-heading > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  padding: 0.42rem 0.68rem;
  color: var(--ep-primary-dark);
  background: linear-gradient(110deg, rgba(8, 189, 212, 0.14), rgba(134, 40, 184, 0.12));
  border: 1px solid rgba(8, 189, 212, 0.2);
  border-radius: 999px;
}

.page-heading h1 {
  color: var(--ep-primary-dark);
  background: linear-gradient(100deg, var(--ep-primary-dark), var(--ep-primary) 48%, var(--ep-accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-pill {
  color: var(--ep-accent-dark);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(134, 40, 184, 0.2);
  box-shadow: 0 7px 18px rgba(86, 42, 143, 0.1);
}

.status-banner {
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.96), rgba(234, 246, 255, 0.9), rgba(246, 237, 252, 0.82));
  border-color: rgba(7, 92, 186, 0.16);
  box-shadow: 0 10px 26px rgba(7, 59, 133, 0.07);
}

.status-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-cyan), var(--ep-primary), var(--ep-accent));
  box-shadow: 0 8px 18px rgba(53, 77, 178, 0.2);
}

.status-success {
  color: #086a74;
  background: linear-gradient(105deg, #effffb, #e9fbff 58%, #f7efff);
  border-color: rgba(8, 159, 157, 0.22);
}

.status-success .status-icon {
  color: #fff;
  background: linear-gradient(135deg, #08a6a0, var(--ep-cyan));
}

.generator-card,
.result-card,
.image-generator-card {
  position: relative;
  border-color: rgba(73, 95, 187, 0.16);
  box-shadow:
    0 24px 58px rgba(34, 74, 166, 0.12),
    0 6px 16px rgba(134, 40, 184, 0.055);
}

.generator-card::before,
.result-card::before,
.image-generator-card::before {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 0.24rem;
  content: "";
  background: linear-gradient(90deg, var(--ep-cyan), var(--ep-primary) 45%, var(--ep-accent));
}

.stepper-wrap {
  padding-top: 1.5rem;
  background:
    linear-gradient(110deg, rgba(234, 246, 255, 0.92), rgba(255, 255, 255, 0.96) 46%, rgba(246, 237, 252, 0.9));
  border-bottom-color: rgba(73, 95, 187, 0.14);
}

.step-button {
  min-height: 3rem;
  padding: 0.48rem 0.58rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.step-button:hover {
  color: var(--ep-primary-dark);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(7, 92, 186, 0.11);
  transform: translateY(-1px);
}

.step-button:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.28);
  outline-offset: 2px;
}

.step-item:not(:last-child)::after {
  height: 2px;
  background: linear-gradient(90deg, rgba(8, 189, 212, 0.5), rgba(134, 40, 184, 0.28));
}

.step-number {
  color: #68728d;
  background: linear-gradient(145deg, #fff, #eef5ff);
  border-color: rgba(7, 92, 186, 0.12);
  box-shadow: 0 5px 14px rgba(7, 59, 133, 0.08);
}

.step-item.active .step-button {
  color: var(--ep-primary-dark);
  background: linear-gradient(110deg, rgba(8, 189, 212, 0.11), rgba(134, 40, 184, 0.11));
  border-color: rgba(82, 80, 181, 0.15);
}

.step-item.active .step-number {
  background: var(--ep-brand-gradient);
  border-color: transparent;
  box-shadow: 0 8px 19px rgba(69, 61, 169, 0.26);
}

.step-item.complete .step-number {
  color: #fff;
  background: linear-gradient(135deg, #099d92, var(--ep-cyan));
  border-color: transparent;
}

.form-step {
  background:
    radial-gradient(circle at 100% 0%, rgba(134, 40, 184, 0.045), transparent 24rem),
    radial-gradient(circle at 0% 100%, rgba(8, 189, 212, 0.05), transparent 25rem),
    #fff;
}

.section-heading {
  position: relative;
  padding-bottom: 1rem;
}

.section-heading::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(15rem, 52%);
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--ep-cyan), var(--ep-primary), var(--ep-accent));
  border-radius: 999px;
}

.section-icon,
.review-heading-icon {
  color: #fff;
  background: var(--ep-brand-gradient);
  box-shadow: 0 9px 20px rgba(65, 63, 172, 0.22);
}

.section-kicker,
.result-kicker,
.review-kicker {
  color: var(--ep-accent-dark);
}

.form-label {
  color: var(--ep-primary-dark);
}

.form-control,
.form-select {
  background-color: #fcfdff;
  border-color: rgba(7, 92, 186, 0.18);
  box-shadow: 0 3px 10px rgba(7, 59, 133, 0.035);
}

.form-control:hover,
.form-select:hover {
  border-color: rgba(8, 189, 212, 0.48);
}

.form-control:focus,
.form-select:focus {
  background-color: #fff;
  border-color: var(--ep-cyan);
  box-shadow:
    0 0 0 0.22rem rgba(8, 189, 212, 0.13),
    0 9px 20px rgba(7, 92, 186, 0.07);
}

.example-picker {
  background: linear-gradient(110deg, rgba(234, 246, 255, 0.95), rgba(246, 237, 252, 0.8));
  border-color: rgba(72, 92, 187, 0.16);
}

.selection-card,
.review-panel,
.image-fieldset {
  background:
    linear-gradient(145deg, rgba(250, 253, 255, 0.98), rgba(247, 241, 255, 0.78));
  border-color: rgba(73, 95, 187, 0.16);
  box-shadow: inset 0 1px 0 #fff;
}

.performance-mode {
  background: linear-gradient(110deg, rgba(7, 92, 186, 0.09), rgba(134, 40, 184, 0.09));
}

.mode-option input:checked + span {
  color: #fff;
  background: var(--ep-brand-gradient);
  box-shadow: 0 6px 16px rgba(64, 60, 168, 0.2);
}

.performance-config,
.instrument-selector,
.review-item,
.ratio-card,
.option-control {
  border-color: rgba(7, 92, 186, 0.15);
  box-shadow: 0 5px 14px rgba(7, 59, 133, 0.045);
}

.option-choice > input:checked + .option-control,
.ratio-choice > input:checked + .ratio-card {
  background: linear-gradient(115deg, rgba(225, 248, 252, 0.92), rgba(242, 230, 252, 0.88));
  border-color: rgba(82, 80, 181, 0.34);
  box-shadow:
    0 0 0 2px rgba(8, 189, 212, 0.09),
    0 9px 20px rgba(57, 67, 171, 0.09);
}

.option-choice > input:checked + .option-control .option-check {
  background: var(--ep-brand-gradient);
  border-color: transparent;
}

.criterion-number,
.process-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-accent));
  border-color: transparent;
}

.process-card {
  background: linear-gradient(110deg, rgba(226, 250, 252, 0.94), rgba(242, 234, 252, 0.88));
  border-color: rgba(8, 189, 212, 0.22);
}

.process-success {
  background: linear-gradient(110deg, #e6fbf6, #e9faff);
}

.form-actions {
  background: linear-gradient(105deg, rgba(234, 246, 255, 0.9), rgba(255, 255, 255, 0.96), rgba(246, 237, 252, 0.86));
  border-top-color: rgba(73, 95, 187, 0.14);
}

.action-primary {
  background: var(--ep-brand-gradient);
  border-color: transparent;
  box-shadow: 0 9px 20px rgba(61, 62, 170, 0.22);
}

.action-primary:hover,
.action-primary:focus {
  background: linear-gradient(135deg, var(--ep-primary-dark), var(--ep-accent-dark));
  border-color: transparent;
  transform: translateY(-1px);
}

.action-secondary {
  color: var(--ep-primary-dark);
  background: linear-gradient(110deg, #edf8ff, #f6edfc);
  border-color: rgba(73, 95, 187, 0.13);
}

.image-generator-card,
.result-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(134, 40, 184, 0.05), transparent 24rem),
    radial-gradient(circle at 0% 100%, rgba(8, 189, 212, 0.055), transparent 24rem),
    #fff;
}

.image-card-heading {
  padding: 1rem;
  background: linear-gradient(110deg, rgba(234, 246, 255, 0.82), rgba(246, 237, 252, 0.72));
  border: 1px solid rgba(73, 95, 187, 0.13);
  border-radius: 1rem;
}

.ai-launch-panel {
  background:
    linear-gradient(115deg, rgba(223, 249, 252, 0.88), rgba(234, 246, 255, 0.9) 52%, rgba(245, 231, 252, 0.86));
  border-color: rgba(73, 95, 187, 0.18);
  box-shadow: 0 9px 22px rgba(58, 70, 174, 0.07);
}

.app-footer {
  color: #697493;
  border-top: 1px solid rgba(73, 95, 187, 0.12);
}

.app-footer span:first-child {
  color: var(--ep-primary-dark);
  font-weight: 680;
}

/* Initial service catalog */
body.home-mode .sidebar {
  display: none !important;
}

body.home-mode .topbar > [data-bs-toggle="offcanvas"] {
  display: none !important;
}

body.home-mode .main-content {
  width: min(80rem, calc(100% - 2.5rem));
}

body.home-mode {
  background:
    radial-gradient(circle at 12% 18%, rgba(8, 189, 212, 0.08), transparent 24rem),
    radial-gradient(circle at 88% 34%, rgba(134, 40, 184, 0.07), transparent 27rem),
    var(--ep-background);
}

.home-module {
  display: grid;
  gap: 2rem;
}

.home-hero {
  position: relative;
  display: grid;
  min-height: 25rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(19rem, 0.85fr);
  align-items: center;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 18%, rgba(8, 189, 212, 0.2), transparent 18rem),
    radial-gradient(circle at 95% 86%, rgba(134, 40, 184, 0.2), transparent 22rem),
    linear-gradient(125deg, #fff 0%, #eff9ff 48%, #f9efff 100%);
  border: 1px solid rgba(61, 85, 183, 0.15);
  border-radius: 1.75rem;
  box-shadow: 0 1.5rem 4rem rgba(34, 74, 166, 0.13);
}

.home-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: radial-gradient(rgba(7, 92, 186, 0.13) 0.8px, transparent 0.8px);
  background-size: 20px 20px;
  mask-image: linear-gradient(90deg, transparent 15%, #000 100%);
  opacity: 0.34;
}

.home-hero-copy,
.home-hero-visual {
  position: relative;
  z-index: 1;
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.7rem;
  color: var(--ep-primary-dark);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(7, 92, 186, 0.16);
  border-radius: 999px;
}

.home-eyebrow i {
  color: var(--ep-accent);
}

.home-logo {
  display: block;
  width: min(18rem, 78%);
  margin: 1.35rem 0 0.9rem;
}

.home-hero h1 {
  max-width: 47rem;
  margin: 0;
  color: var(--ep-primary-dark);
  font-size: clamp(2rem, 4.4vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.home-hero h1 span {
  color: var(--ep-accent-dark);
  background: linear-gradient(100deg, var(--ep-primary) 8%, var(--ep-accent) 78%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-hero p {
  max-width: 43rem;
  margin: 1.1rem 0 0;
  color: var(--ep-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.home-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 1rem 0 0;
  padding: 0;
  color: #4e607b;
  font-size: 0.76rem;
  font-weight: 680;
  list-style: none;
}

.home-benefits li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.home-benefits i {
  color: var(--ep-success);
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.home-primary-action,
.home-secondary-action {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
  font-size: 0.88rem;
  font-weight: 720;
  border-radius: 0.85rem;
}

.home-primary-action {
  color: #fff;
  background: var(--ep-brand-gradient);
  border: 0;
  box-shadow: 0 0.75rem 1.6rem rgba(55, 64, 174, 0.22);
}

.home-primary-action:hover,
.home-primary-action:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary-dark), var(--ep-accent-dark));
  transform: translateY(-2px);
}

.home-secondary-action {
  color: var(--ep-primary-dark);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(7, 92, 186, 0.19);
}

.home-secondary-action:hover,
.home-secondary-action:focus-visible {
  color: var(--ep-accent-dark);
  background: #fff;
  transform: translateY(-2px);
}

.home-hero-visual {
  width: min(100%, 25rem);
  aspect-ratio: 1;
  justify-self: center;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(63, 87, 183, 0.18);
  border-radius: 50%;
}

.hero-orbit-one { inset: 8%; }
.hero-orbit-two { inset: 22%; border-style: dashed; }

.hero-center-icon {
  position: absolute;
  inset: 34%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 3.2rem;
  background: var(--ep-brand-gradient);
  border: 0.55rem solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  box-shadow: 0 1.2rem 2.8rem rgba(48, 64, 172, 0.28);
}

.hero-floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  color: var(--ep-ink);
  font-size: 0.78rem;
  font-weight: 720;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(73, 95, 187, 0.15);
  border-radius: 0.85rem;
  box-shadow: 0 0.8rem 1.8rem rgba(34, 74, 166, 0.13);
  animation: hero-float 4s ease-in-out infinite;
}

.hero-floating-card i { color: var(--ep-primary); font-size: 1.1rem; }
.hero-card-session { top: 6%; left: 4%; }
.hero-card-image { top: 27%; right: -2%; animation-delay: -1.35s; }
.hero-card-prompt { right: 8%; bottom: 8%; animation-delay: -2.65s; }

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.4rem); }
}

.service-catalog,
.upcoming-catalog {
  padding: 1.65rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(73, 95, 187, 0.12);
  border-radius: 1.4rem;
  box-shadow: 0 0.85rem 2rem rgba(34, 74, 166, 0.07);
}

.about-eduprompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(12rem, 15rem);
  gap: 1.15rem;
  align-items: center;
  padding: 1.4rem 1.65rem;
  background: linear-gradient(105deg, rgba(238, 248, 255, 0.94), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(7, 92, 186, 0.16);
  border-radius: 1.4rem;
  box-shadow: 0 0.85rem 2rem rgba(34, 74, 166, 0.07);
}

.about-eduprompt-icon {
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  background: var(--ep-brand-gradient);
  border-radius: 1rem;
  box-shadow: 0 0.65rem 1.25rem rgba(7, 92, 186, 0.2);
}

.about-eduprompt h2 {
  margin: 0.25rem 0 0;
  color: var(--ep-ink);
  font-size: 1.3rem;
  font-weight: 780;
}

.about-eduprompt p {
  max-width: 48rem;
  margin: 0.45rem 0 0;
  color: var(--ep-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.about-eduprompt p.about-eduprompt-aliases {
  margin-top: 0.5rem;
  color: var(--ep-primary-dark);
  font-size: 0.75rem;
  line-height: 1.5;
}

.about-eduprompt-aliases strong {
  color: var(--ep-primary);
  font-weight: 760;
}

.about-eduprompt-purpose {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.85rem;
  color: var(--ep-primary-dark);
  font-size: 0.76rem;
  font-weight: 690;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(7, 92, 186, 0.12);
  border-radius: 0.9rem;
}

.about-eduprompt-purpose i {
  flex: 0 0 auto;
  color: var(--ep-accent);
  font-size: 1rem;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.catalog-heading h2 {
  margin: 0.3rem 0 0;
  color: var(--ep-ink);
  font-size: 1.45rem;
  font-weight: 780;
}

.catalog-heading p {
  max-width: 28rem;
  margin: 0;
  color: var(--ep-muted);
  font-size: 0.82rem;
  text-align: right;
}

.service-grid { display: grid; gap: 1rem; }
.service-grid-active { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid-upcoming { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.service-card {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.15rem;
  color: var(--ep-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 1rem;
}

.service-card-active {
  min-height: 11rem;
  align-items: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-card-active::before {
  position: absolute;
  inset: 0 0 auto;
  height: 0.2rem;
  content: "";
  background: linear-gradient(90deg, var(--ep-primary), var(--ep-cyan));
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.service-card-active:hover,
.service-card-active:focus-visible {
  color: var(--ep-ink);
  border-color: rgba(67, 92, 188, 0.3);
  box-shadow: 0 1rem 2.2rem rgba(34, 74, 166, 0.12);
  transform: translateY(-3px);
}

.service-card-active:hover::before,
.service-card-active:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

.service-card-active:hover .service-card-icon,
.service-card-active:focus-visible .service-card-icon {
  transform: rotate(-3deg) scale(1.05);
}

.service-card-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-cyan));
  border-radius: 0.9rem;
  box-shadow: 0 0.65rem 1.25rem rgba(7, 92, 186, 0.18);
  transition: transform 0.18s ease;
}

.service-card-images .service-card-icon {
  background: linear-gradient(135deg, var(--ep-accent), var(--ep-primary));
}

.service-card-rubrics .service-card-icon {
  background: linear-gradient(135deg, #087f8c, var(--ep-primary));
}

.service-card-worksheets .service-card-icon {
  background: linear-gradient(135deg, #d97706, #db2777);
}

.service-card-copy { min-width: 0; }
.service-card-copy strong,
.service-card-copy small { display: block; }
.service-card-copy strong { margin-top: 0.45rem; font-size: 1rem; font-weight: 760; }
.service-card-copy small { margin-top: 0.35rem; color: var(--ep-muted); font-size: 0.76rem; line-height: 1.55; }

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #7c8498;
  font-size: 0.61rem;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.service-status-ready { color: var(--ep-success); }
.service-status-new { color: var(--ep-accent); }

.service-card-arrow {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  margin-left: auto;
  place-items: center;
  color: var(--ep-primary);
  background: var(--ep-primary-soft);
  border-radius: 50%;
}

.service-card-locked { min-height: 9rem; opacity: 0.78; }
.service-card-locked .service-card-icon { color: #7d879b; background: #eef2f7; box-shadow: none; }

.author-home-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.65rem;
  background:
    linear-gradient(115deg, rgba(225, 246, 255, 0.96), rgba(255, 255, 255, 0.98) 48%, rgba(244, 230, 253, 0.94));
  border: 1px solid rgba(73, 95, 187, 0.22);
  border-radius: 1.4rem;
  box-shadow: 0 1rem 2.4rem rgba(34, 74, 166, 0.12);
}

.author-home-profile {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.author-avatar-xl {
  width: 5rem;
  height: 5rem;
  font-size: 1.4rem;
}

.author-home-profile h2 {
  margin: 0.25rem 0 0;
  color: var(--ep-ink);
  font-size: 1.65rem;
}

.author-home-profile p {
  margin: 0.25rem 0 0;
  color: var(--ep-muted);
  font-size: 0.82rem;
}

.author-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.author-social-links a {
  min-height: 2.45rem;
  padding: 0.55rem 0.75rem;
}

/* Native welcome dialog */
.welcome-dialog {
  width: min(47rem, calc(100% - 2rem));
  max-width: none;
  max-height: min(44rem, calc(100dvh - 2rem));
  padding: 0;
  overflow: hidden;
  color: var(--ep-ink);
  background: #fff;
  border: 0;
  border-radius: 1.65rem;
  box-shadow: 0 2.2rem 6rem rgba(15, 31, 66, 0.3);
}

.welcome-dialog[open] {
  display: grid;
  grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.28fr);
  animation: welcome-enter 0.28s ease-out both;
}

.welcome-dialog::backdrop {
  background: rgba(10, 24, 52, 0.56);
  backdrop-filter: blur(6px);
}

@keyframes welcome-enter {
  from { opacity: 0; transform: translateY(1rem) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-dialog-visual {
  position: relative;
  min-height: 26rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 26% 16%, rgba(255, 255, 255, 0.28), transparent 9rem),
    linear-gradient(145deg, var(--ep-primary) 0%, #2767c7 42%, var(--ep-accent) 100%);
}

.welcome-dialog-visual::after {
  position: absolute;
  inset: auto -2.5rem -3rem auto;
  width: 10rem;
  aspect-ratio: 1;
  content: "";
  background: rgba(255, 255, 255, 0.11);
  border-radius: 2rem;
  transform: rotate(22deg);
}

.welcome-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.welcome-orbit-one { width: 10rem; }
.welcome-orbit-two { width: 15rem; border-style: dashed; opacity: 0.68; }

.welcome-dialog-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 5.5rem;
  height: 5.5rem;
  place-items: center;
  color: var(--ep-primary-dark);
  font-size: 2.4rem;
  background: #fff;
  border: 0.45rem solid rgba(255, 255, 255, 0.38);
  border-radius: 1.7rem;
  box-shadow: 0 1.2rem 2.8rem rgba(10, 26, 77, 0.28);
  transform: translate(-50%, -50%) rotate(-4deg);
}

.welcome-dialog-content {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 2.25rem;
}

.welcome-dialog-content > form:first-child {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  margin: 0;
}

.welcome-dialog-close {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  place-items: center;
  color: var(--ep-muted);
  background: #f3f7fb;
  border: 1px solid var(--ep-border);
  border-radius: 50%;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.welcome-dialog-close:hover,
.welcome-dialog-close:focus-visible {
  color: #fff;
  background: var(--ep-primary-dark);
  transform: rotate(4deg);
}

.welcome-dialog-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.4rem;
  color: var(--ep-accent-dark);
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.welcome-dialog h2 {
  max-width: 22rem;
  margin: 0.65rem 0 0;
  color: var(--ep-primary-dark);
  font-size: clamp(1.7rem, 3.1vw, 2.25rem);
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.welcome-dialog p {
  margin: 1rem 0 0;
  color: var(--ep-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.welcome-dialog-actions {
  margin-top: 1.15rem;
}

.welcome-dialog-action {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 740;
  background: var(--ep-brand-gradient);
  border: 0;
  border-radius: 0.8rem;
  box-shadow: 0 0.75rem 1.6rem rgba(55, 64, 174, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.welcome-dialog-action:hover,
.welcome-dialog-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0.95rem 1.9rem rgba(55, 64, 174, 0.27);
}

.welcome-dialog-action:focus-visible,
.welcome-dialog-close:focus-visible {
  outline: 3px solid rgba(8, 189, 212, 0.52);
  outline-offset: 3px;
}

.welcome-dialog-note {
  margin-top: 0.85rem;
  color: #77839a;
  font-size: 0.65rem;
  line-height: 1.5;
}

/* Donation demo dialog */
.donation-dialog {
  width: min(31rem, calc(100% - 2rem));
  max-width: none;
  padding: 1.5rem;
  overflow: visible;
  text-align: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(219, 39, 119, 0.12), transparent 16rem),
    radial-gradient(circle at 0% 100%, rgba(217, 119, 6, 0.1), transparent 17rem),
    #fff;
  border: 1px solid rgba(176, 52, 120, 0.2);
  border-radius: 1.4rem;
  box-shadow: 0 1.8rem 5rem rgba(34, 23, 58, 0.28);
}

.donation-dialog::backdrop {
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(5px);
}

.donation-dialog > form:first-child {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.donation-dialog-close {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  place-items: center;
  color: #6f6674;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(127, 91, 117, 0.18);
  border-radius: 50%;
}

.donation-dialog-close:hover,
.donation-dialog-close:focus-visible {
  color: #fff;
  background: #a82f73;
}

.donation-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  color: #9a4c0d;
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fff7e8;
  border: 1px solid #f0d29d;
  border-radius: 999px;
}

.donation-dialog-icon {
  display: grid;
  width: 3.6rem;
  height: 3.6rem;
  margin: 1rem auto 0;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  background: linear-gradient(135deg, #db2777, #d97706);
  border-radius: 1rem;
  box-shadow: 0 0.8rem 1.8rem rgba(190, 52, 116, 0.22);
}

.donation-dialog h2 {
  margin: 0.9rem 0 0;
  color: var(--ep-ink);
  font-size: 1.4rem;
}

.donation-dialog > p {
  margin: 0.65rem auto 0;
  color: var(--ep-muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.donation-yape-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 1rem;
  text-align: left;
  background: linear-gradient(125deg, #faf4ff, #fff);
  border: 1px solid rgba(112, 35, 139, 0.18);
  border-radius: 1rem;
}

.donation-qr {
  display: grid;
  width: 7.2rem;
  height: 7.2rem;
  place-items: center;
  align-content: center;
  gap: 0.18rem;
  color: #30133a;
  background: #fff;
  border: 0.35rem solid #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0 0 1px rgba(69, 27, 81, 0.15), 0 0.7rem 1.5rem rgba(58, 28, 66, 0.1);
}

.donation-qr i {
  font-size: 4.5rem;
  line-height: 1;
}

.donation-qr small {
  color: #8a708e;
  font-size: 0.52rem;
  font-weight: 700;
}

.donation-yape-copy span,
.donation-yape-copy strong,
.donation-yape-copy small {
  display: block;
}

.donation-yape-copy span {
  color: #79537f;
  font-size: 0.66rem;
  font-weight: 700;
}

.donation-yape-copy strong {
  margin-top: 0.3rem;
  color: #692179;
  font-size: 1.45rem;
  letter-spacing: 0.035em;
}

.donation-yape-copy small {
  margin-top: 0.3rem;
  color: var(--ep-muted);
  font-size: 0.62rem;
}

.donation-dialog .donation-demo-note {
  padding: 0.55rem 0.65rem;
  color: #8a5d18;
  font-size: 0.66rem;
  background: rgba(255, 248, 232, 0.82);
  border-radius: 0.65rem;
}

.donation-dialog-actions {
  margin-top: 1rem;
}

.donation-dialog-actions button {
  min-height: 2.75rem;
  padding: 0.6rem 1.2rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 740;
  background: linear-gradient(135deg, #8d2a8f, #c02677);
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 0.65rem 1.4rem rgba(119, 35, 120, 0.2);
}

@media (max-width: 575.98px) {
  .donation-dialog {
    padding: 1.2rem;
  }

  .donation-yape-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .donation-qr {
    margin: 0 auto;
  }
}

/* Worksheet generator */
.worksheet-flow-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.worksheet-section-card {
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.44), rgba(250, 253, 255, 0.9));
}

.worksheet-section-card legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.worksheet-legend-number {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  font-size: 0.72rem;
  background: linear-gradient(135deg, #d97706, #db2777);
  border-radius: 9px;
  box-shadow: 0 6px 14px rgba(190, 80, 42, 0.18);
}

.worksheet-topic-field {
  margin-top: 1rem;
}

.worksheet-page-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.worksheet-page-choice,
.worksheet-check-choice {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.worksheet-page-choice > input,
.worksheet-check-choice > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.worksheet-page-card {
  display: flex;
  min-height: 7.25rem;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.worksheet-page-choice:hover .worksheet-page-card,
.worksheet-page-choice > input:focus-visible + .worksheet-page-card {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 0.6rem 1.3rem rgba(112, 74, 34, 0.09);
  transform: translateY(-1px);
}

.worksheet-page-choice > input:checked + .worksheet-page-card {
  background: linear-gradient(125deg, #fffaf0, #fff5fb);
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.08);
}

.worksheet-page-preview {
  display: grid;
  width: 5.15rem;
  height: 3.65rem;
  flex: 0 0 auto;
  place-items: center;
}

.worksheet-page-preview-1 {
  width: 3.05rem;
  height: 4.3rem;
}

.worksheet-page-sections {
  display: grid;
  width: 100%;
  height: 100%;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 0.25rem;
  background: #f3eadc;
  border: 1px solid #d7b98e;
  border-radius: 4px;
  box-shadow: 0 5px 10px rgba(75, 56, 34, 0.11);
}

.worksheet-page-sections > span {
  background:
    linear-gradient(#e5e7eb 0 0) 50% 28% / 70% 2px no-repeat,
    linear-gradient(#e5e7eb 0 0) 50% 46% / 78% 2px no-repeat,
    linear-gradient(#e5e7eb 0 0) 50% 64% / 62% 2px no-repeat,
    #fff;
  border-radius: 2px;
}

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

.worksheet-page-copy strong {
  color: var(--ep-ink);
  font-size: 0.78rem;
}

.worksheet-page-copy small {
  margin-top: 0.22rem;
  color: var(--ep-muted);
  font-size: 0.64rem;
  line-height: 1.4;
}

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

.worksheet-practice-configuration {
  transition: opacity 0.18s ease, filter 0.18s ease;
}

.worksheet-practice-configuration.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.25);
}

.worksheet-practice-notice {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  color: #7a4a0f;
  font-size: 0.7rem;
  font-weight: 650;
  background: #fff7e8;
  border: 1px solid #efd19e;
  border-radius: 0.7rem;
}

.worksheet-check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.worksheet-structure-options {
  display: grid;
  grid-template-columns: 1fr;
}

.worksheet-preset-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.25rem;
}

.worksheet-check-card {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: flex-start;
  gap: 0.42rem;
  padding: 0.52rem 0.7rem;
  color: #556176;
  font-size: 0.68rem;
  font-weight: 680;
  background: #fff;
  border: 1px solid var(--ep-border);
  border-radius: 10px;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.worksheet-check-card i {
  margin-top: 0.12rem;
  color: #cbd5e1;
}

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

.worksheet-check-copy strong {
  color: inherit;
  font-size: 0.69rem;
}

.worksheet-check-copy small {
  margin-top: 0.16rem;
  color: var(--ep-muted);
  font-size: 0.58rem;
  font-weight: 520;
  line-height: 1.4;
}

.worksheet-structure-options .worksheet-check-card,
.worksheet-preset-options .worksheet-check-card {
  width: 100%;
  min-height: 4.4rem;
}

.worksheet-check-choice:hover .worksheet-check-card,
.worksheet-check-choice > input:focus-visible + .worksheet-check-card {
  border-color: rgba(217, 119, 6, 0.42);
}

.worksheet-check-choice > input:checked + .worksheet-check-card {
  color: #8a3d0b;
  background: #fff7ed;
  border-color: #f2bd7c;
}

.worksheet-check-choice > input:checked + .worksheet-check-card i {
  color: #d97706;
}

.worksheet-extra-label,
.worksheet-learning-label {
  margin-top: 0.85rem;
}

.worksheet-visual-options {
  margin-bottom: 0.15rem;
}

.worksheet-add-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.worksheet-add-option {
  display: inline-flex;
  min-width: 6.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 730;
  background: linear-gradient(135deg, #d97706, #db2777);
  border: 0;
  border-radius: 0.65rem;
}

.worksheet-add-option:hover,
.worksheet-add-option:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #b45309, #be185d);
}

.worksheet-added-options {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.55rem;
}

.worksheet-added-options:empty {
  display: none;
}

.worksheet-added-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.1rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.42rem 0.38rem 0.65rem;
  color: #713c13;
  font-size: 0.66rem;
  font-weight: 670;
  background: #fff8eb;
  border: 1px solid #efce9d;
  border-radius: 0.7rem;
}

.worksheet-added-choice {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.worksheet-added-choice span {
  overflow-wrap: anywhere;
}

.worksheet-remove-option {
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  color: #9f305b;
  background: #fff;
  border: 1px solid #efd0dc;
  border-radius: 0.55rem;
}

.worksheet-prompt-output {
  min-height: 30rem;
}

.mobile-sidebar {
  width: min(88vw, 20rem) !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(8, 189, 212, 0.12), transparent 19rem),
    linear-gradient(180deg, #fff 0%, #fbf9ff 100%);
}

.mobile-sidebar .offcanvas-header {
  gap: 0.8rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(7, 92, 186, 0.12);
}

.mobile-sidebar .offcanvas-header .brand-home {
  width: auto;
  flex: 1 1 auto;
  padding: 0;
}

.mobile-sidebar .offcanvas-header .brand-logo {
  width: min(8rem, 100%);
}

.mobile-sidebar .offcanvas-header .brand strong {
  font-size: 0.9rem;
}

.mobile-sidebar .offcanvas-header .brand small {
  font-size: 0.64rem;
}

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

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

  body.home-mode .app-body {
    margin-left: 0;
  }

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

@media (max-width: 991.98px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    display: none;
  }

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

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

  .about-eduprompt {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .about-eduprompt-purpose {
    grid-column: 2;
    max-width: 30rem;
  }

  .author-home-card {
    grid-template-columns: 1fr;
  }

  .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;
  }

  .rubric-config-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 767.98px) {
  body.home-mode .main-content {
    width: min(100% - 1rem, 40rem);
  }

  .home-hero {
    min-height: auto;
    padding: 1.5rem;
    border-radius: 1.25rem;
  }

  .home-logo {
    width: min(15rem, 90%);
  }

  .home-hero-actions,
  .catalog-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .home-primary-action,
  .home-secondary-action {
    justify-content: center;
  }

  .welcome-dialog[open] {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .welcome-dialog-visual {
    min-height: 7rem;
  }

  .welcome-orbit-one { width: 7rem; }
  .welcome-orbit-two { width: 11rem; }

  .welcome-dialog-icon {
    width: 3.9rem;
    height: 3.9rem;
    font-size: 1.65rem;
    border-width: 0.3rem;
    border-radius: 1.15rem;
  }

  .welcome-dialog-content {
    padding: 1.5rem;
  }

  .welcome-dialog-content > form:first-child {
    top: 0.65rem;
    right: 0.65rem;
    transform: translateY(calc(-100% - 1rem));
  }

  .welcome-dialog-close {
    color: #fff;
    background: rgba(11, 35, 92, 0.32);
    border-color: rgba(255, 255, 255, 0.3);
  }

  .catalog-heading p {
    text-align: left;
  }

  .service-grid-active,
  .service-grid-upcoming {
    grid-template-columns: 1fr;
  }

  .service-catalog,
  .upcoming-catalog {
    padding: 1rem;
  }

  .about-eduprompt {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1.25rem;
  }

  .about-eduprompt-icon {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.85rem;
  }

  .about-eduprompt-purpose {
    grid-column: auto;
  }

  .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;
  }

  .rubric-form-grid,
  .rubric-score-heading,
  .rubric-reference-grid {
    grid-template-columns: 1fr;
  }

  .rubric-field-full {
    grid-column: auto;
  }

  .rubric-scale-labels {
    display: none;
  }

  .rubric-scale-row {
    grid-template-columns: 2rem minmax(0, 1fr) 2.35rem;
  }

  .rubric-scale-row [name="rubric_scale_name"] {
    grid-column: 2;
  }

  .rubric-scale-row [name="rubric_scale_min"] {
    grid-column: 2;
  }

  .rubric-scale-row [name="rubric_scale_max"] {
    grid-column: 2;
  }

  .rubric-scale-row .rubric-remove-row {
    grid-column: 3;
    grid-row: 1;
  }

  .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) {
  .author-trigger {
    padding-right: 0.35rem;
  }

  .author-trigger > i {
    display: none;
  }

  .author-home-profile {
    align-items: flex-start;
  }

  .author-avatar-xl {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1rem;
  }

  .author-home-card {
    padding: 1rem;
  }

  .author-social-links {
    flex-direction: column;
  }

  .home-benefits {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-dialog {
    width: min(100% - 1rem, 31rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 1.2rem;
  }

  .welcome-dialog-content {
    padding: 1.25rem;
  }

  .welcome-dialog h2 {
    font-size: 1.55rem;
  }

  .welcome-dialog-action {
    width: 100%;
  }

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

  .mobile-brand {
    gap: 0.5rem;
    margin-left: 0.45rem;
  }

  .mobile-brand strong {
    font-size: 0.82rem;
  }

  .brand-logo-mobile {
    width: 2.55rem;
  }

  .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;
  }

  .style-picker-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .style-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .style-search {
    width: 100%;
  }

  .style-options {
    grid-template-columns: 1fr;
    max-height: 24rem;
  }

  .image-flow-steps {
    gap: 0.35rem;
  }

  .image-flow-steps li {
    justify-content: center;
    padding: 0.55rem 0.35rem;
  }

  .image-flow-steps li > div {
    display: none;
  }

  .description-helpers {
    align-items: stretch;
    flex-direction: column;
  }

  .description-helpers > span {
    margin-bottom: 0.1rem;
  }

  .description-helpers button {
    text-align: left;
  }

  .image-flow-summary {
    margin: 0 0 0.15rem;
    text-align: center;
  }

  .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 (max-width: 991.98px) {
  .worksheet-page-options {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  .worksheet-content-grid {
    grid-template-columns: 1fr;
  }

  .worksheet-page-card {
    min-height: 6.2rem;
  }

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

@media (max-width: 575.98px) {
  .worksheet-flow-steps {
    gap: 0.3rem;
  }

  .worksheet-check-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .worksheet-check-card {
    width: 100%;
  }
}

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