@import url('/css/nls-home.css');

.nls-tool-intro {
  display: flex;
  width: min(calc(100% - 2rem), 99rem);
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: clamp(1rem, 1.35vw, 1.55rem) clamp(0.1rem, 0.35vw, 0.35rem) 0;
}

.nls-tool-intro > div {
  min-width: 0;
}

.nls-tool-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
}

.nls-tool-breadcrumb a {
  color: #6d28d9;
  text-decoration: none;
}

.nls-tool-breadcrumb svg {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nls-tool-intro h1 {
  margin: 0.45rem 0 0;
  color: #172033;
  font-size: clamp(1.3rem, 1.85vw, 1.8rem);
  font-weight: 950;
  line-height: 1.2;
}

.nls-tool-intro p {
  margin: 0.32rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 550;
  line-height: 1.45;
}

.nls-tool-intro__action {
  display: inline-flex;
  min-height: 2.7rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  border: 1px solid #c4b5fd;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.65rem 0.9rem;
  color: #5b21b6;
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.08);
}

.nls-tool-intro__action svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nls-tool-intro__action:hover {
  border-color: #8b5cf6;
  background: #f5f3ff;
}

.skkn-page {
  width: min(100%, 99rem);
  min-height: 100%;
  min-width: 0;
  margin: 0 auto;
  overflow-x: hidden;
  padding: clamp(1rem, 1.35vw, 1.55rem);
  color: #172033;
}

.skkn-page button,
.skkn-page input,
.skkn-page select,
.skkn-page textarea,
.skkn-page a {
  letter-spacing: 0;
}

.skkn-page button:focus-visible,
.skkn-page input:focus-visible,
.skkn-page select:focus-visible,
.skkn-page textarea:focus-visible,
.skkn-page a:focus-visible,
.nls-tool-intro a:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.2);
  outline-offset: 2px;
}

.step-tabs {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3f0;
  border-radius: 1rem 1rem 0 0;
  background: #fff;
  box-shadow: 0 14px 35px rgba(30, 41, 59, 0.06);
}

.step-tabs__tablist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid #dbe3f0;
}

.step-tabs__tab {
  display: flex;
  min-width: 0;
  min-height: 4.25rem;
  align-items: center;
  gap: clamp(0.62rem, 0.85vw, 0.9rem);
  border: 0;
  border-bottom: 2px solid transparent;
  background: #fbfdff;
  padding: 0.66rem clamp(0.9rem, 2vw, 1.75rem);
  color: #475569;
  text-align: left;
}

.step-tabs__tab + .step-tabs__tab {
  border-left: 1px solid #dbe3f0;
}

.step-tabs__tab.is-active {
  border-bottom-color: #5b21b6;
  background: #fff;
  color: #5b21b6;
}

.step-tabs__tab.is-disabled {
  cursor: not-allowed;
  color: #64748b;
  opacity: 0.72;
}

.step-tabs__icon {
  display: grid;
  width: 2.18rem;
  height: 2.18rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.55rem;
  background: #f1f5f9;
  color: #64748b;
}

.step-tabs__tab.is-active .step-tabs__icon {
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(91, 33, 182, 0.22);
}

.step-tabs__icon svg,
.step-tabs__stat-icon svg {
  width: 1.08rem;
  height: 1.08rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.step-tabs__copy {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
}

.step-tabs__copy strong,
.step-tabs__copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.step-tabs__copy strong {
  color: currentColor;
  font-size: clamp(0.88rem, 0.95vw, 1rem);
  font-weight: 900;
  line-height: 1.15;
}

.step-tabs__copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #334155;
  font-size: clamp(0.72rem, 0.78vw, 0.84rem);
  font-weight: 550;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.step-tabs__stats {
  display: flex;
  width: 100%;
  min-height: 2.62rem;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  background: #fff;
  padding: 0.42rem clamp(0.9rem, 2vw, 1.75rem);
}

.step-tabs__stat {
  display: inline-flex;
  min-width: 0;
  min-height: 1.8rem;
  align-items: center;
  gap: 0.42rem;
  padding: 0.22rem 1.05rem 0.22rem 0;
  color: #1f2a44;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.2;
}

.step-tabs__stat + .step-tabs__stat {
  border-left: 1px solid #dbe3f0;
  padding-left: 1.05rem;
}

.step-tabs__stat-icon {
  display: grid;
  width: 1.12rem;
  height: 1.12rem;
  flex: 0 0 auto;
  place-items: center;
}

.step-tabs__stat--blue .step-tabs__stat-icon,
.step-tabs__stat--violet .step-tabs__stat-icon { color: #6d28d9; }
.step-tabs__stat--emerald .step-tabs__stat-icon { color: #059669; }
.step-tabs__stat-label { min-width: 0; overflow-wrap: anywhere; }
.step-tabs__stat strong { flex: 0 0 auto; color: #172033; font-size: 0.78rem; font-weight: 900; }
.step-tabs__divider { height: 1px; background: #dbe3f0; }

.workflow-navigation {
  display: block;
  width: 100%;
  min-width: 0;
}

.preparation-panel {
  display: grid;
  min-width: 0;
  gap: 1rem;
  padding-bottom: 6.8rem;
}

.preparation-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.input-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3f0;
  border-top: 0;
  border-radius: 0 0 1rem 1rem;
  background: #fff;
  box-shadow: 0 18px 45px rgba(30, 41, 59, 0.07);
}

.form-sections {
  display: grid;
  gap: 1.18rem;
  padding: 1.2rem 1.5rem 1.45rem;
}

.form-section {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
}

.form-section__heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
}

.form-section__heading h2 {
  min-width: 0;
  margin: 0;
  color: #172033;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  align-items: start;
}

.field {
  display: grid;
  min-width: 0;
  grid-column: span 3;
  gap: 0.42rem;
}

.field--document-type,
.field--quarter { grid-column: span 3; }
.field--topic { grid-column: span 9; }
.field--half { grid-column: span 6; }
.field--target-audience { grid-column: span 4; }
.field--length { grid-column: span 2; }
.field--tone, .field--style { grid-column: span 3; }
.field--full { grid-column: 1 / -1; }

.field-label,
.reference-upload strong {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
}

.required-mark { color: #dc2626; }

.field-control {
  position: relative;
  display: block;
  min-width: 0;
}

.field-control__icon {
  position: absolute;
  top: 50%;
  left: 0.78rem;
  z-index: 1;
  display: grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  color: #64748b;
  transform: translateY(-50%);
  pointer-events: none;
}

.field-control__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d5deea;
  border-radius: 0.58rem;
  background: #fff;
  color: #1f2a44;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field .field-control input,
.field .field-control select {
  min-height: 2.7rem;
  padding: 0.62rem 0.78rem 0.62rem 2.45rem;
}

.field select:not(.field-control select),
.field input:not(.field-control input) {
  min-height: 2.7rem;
  padding: 0.62rem 0.78rem;
}

.field textarea {
  min-height: 5.35rem;
  padding: 0.72rem 0.85rem;
  resize: vertical;
  font-size: 0.82rem;
  line-height: 1.45;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8390a5;
  font-weight: 500;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.field-help {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
}

.lesson-plan-notes textarea { min-height: 6.4rem; }

.content-direction-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ddd6fe;
  border-radius: 0.72rem;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.98), rgba(245, 243, 255, 0.95));
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.08);
}

.content-direction-panel__header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
}

.content-direction-panel__copy {
  display: grid;
  min-width: 0;
  gap: 0.24rem;
}

.content-direction-panel__title-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.content-direction-panel__title-row h2 {
  margin: 0;
  color: #172033;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.content-direction-panel__badge {
  display: inline-flex;
  min-height: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ede9fe;
  padding: 0.16rem 0.52rem;
  color: #6d28d9;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.content-direction-panel__copy p {
  margin: 0;
  color: #5b6475;
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.45;
}

.content-direction-panel__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.ai-secondary-action,
.content-direction-toggle {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 0.58rem;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.ai-secondary-action {
  min-height: 2.45rem;
  border: 1px solid #c4b5fd;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.55rem 0.82rem;
  color: #6d28d9;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
}

.ai-secondary-action:hover {
  border-color: #8b5cf6;
  background: #fff;
  color: #5b21b6;
}

.content-direction-toggle {
  min-height: 2.25rem;
  padding: 0.42rem 0.35rem;
  color: #6d28d9;
}

.ai-secondary-action svg,
.content-direction-toggle svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-secondary-action svg { fill: currentColor; stroke: none; }

.reference-upload {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
  min-height: 4.9rem;
  border: 1.5px dashed #8b5cf6;
  border-radius: 0.72rem;
  background: linear-gradient(135deg, rgba(250, 251, 255, 0.98), rgba(245, 243, 255, 0.96));
  padding: 0.9rem 1rem;
}

.reference-upload__icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
}

.reference-upload__icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reference-upload__copy { min-width: 0; }

.reference-upload p,
.reference-upload small {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
}

.reference-upload small { display: block; color: #667085; font-weight: 650; }

.file-button {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid #c4b5fd;
  border-radius: 0.58rem;
  background: #f5f3ff;
  padding: 0.45rem 0.65rem;
  color: #6d28d9;
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.file-button:hover { border-color: #8b5cf6; background: #ede9fe; }

.file-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preparation-footer {
  position: fixed;
  right: clamp(1rem, 1.35vw, 1.4rem);
  bottom: 0.5rem;
  left: calc(clamp(14.75rem, 15.6vw, 17rem) + clamp(1rem, 1.35vw, 1.4rem));
  z-index: 30;
  display: flex;
  min-height: 5.55rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #ddd6fe;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.98), rgba(245, 243, 255, 0.96));
  padding: 0.95rem clamp(1rem, 1.6vw, 1.6rem) 1.1rem;
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(10px);
}

.quota-note {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.8rem;
  color: #64748b;
}

.quota-note__icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}

.quota-note__icon img { width: 2rem; height: 2rem; }
.quota-note__copy { display: grid; min-width: 0; gap: 0.18rem; }
.quota-note strong { color: #1f2a44; font-size: 1rem; font-weight: 900; }
.quota-note span, .quota-note a { font-size: 0.82rem; }
.quota-note a { color: #4f46e5; font-weight: 900; text-decoration: none; white-space: nowrap; }

.preparation-footer__actions {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.8rem;
}

.primary-action,
.button-secondary {
  display: inline-flex;
  min-width: 0;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.58rem;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.primary-action {
  min-width: clamp(20rem, 25vw, 24rem);
  border: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 16px 26px rgba(99, 102, 241, 0.28);
}

.primary-action:hover { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); }

.button-secondary {
  min-width: 8.25rem;
  border: 1px solid #d5deea;
  background: #fff;
  color: #1f2a44;
}

.button-secondary:hover { border-color: #93c5fd; background: #f8fafc; color: #1d4ed8; }

.button-secondary svg,
.primary-action svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clear-form-action { border-color: #fecaca; color: #b91c1c; }
.clear-form-action:hover { border-color: #f87171; background: #fef2f2; color: #991b1b; }

@media (max-width: 1199px) {
  .preparation-panel {
    padding-bottom: 18rem;
  }

  .preparation-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .preparation-footer__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .preparation-footer .button-secondary,
  .preparation-footer .primary-action {
    width: 100%;
    min-width: 0;
  }

  .quota-note {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 1023px) {
  .preparation-footer {
    right: 0.85rem;
    left: 0.85rem;
    width: auto;
  }
}

@media (max-width: 899px) {
  .field--document-type,
  .field--length,
  .field--tone,
  .field--style,
  .field--quarter { grid-column: span 1; }

  .input-grid--basic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .input-grid--basic .field--topic,
  .input-grid--basic .field--target-audience,
  .input-grid--basic .field--half { grid-column: 1 / -1; }

  .content-direction-panel__header { align-items: flex-start; }
  .content-direction-panel__actions { flex-wrap: wrap; }
}

@media (max-width: 767px) {
  .nls-tool-intro {
    width: calc(100% - 1.5rem);
    align-items: stretch;
    flex-direction: column;
  }

  .nls-tool-intro__action { width: 100%; }
  .skkn-page { padding: 0.75rem; }
  .preparation-panel { padding-bottom: 25rem; }
  .form-sections { padding: 1rem; }
  .input-grid, .input-grid--basic { grid-template-columns: 1fr; }

  .input-grid--basic .field--document-type,
  .input-grid--basic .field--length,
  .input-grid--basic .field--tone,
  .input-grid--basic .field--style,
  .input-grid--basic .field--quarter,
  .input-grid--basic .field--topic,
  .input-grid--basic .field--target-audience,
  .input-grid--basic .field--half { grid-column: 1 / -1; }

  .content-direction-panel__header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
  }

  .content-direction-panel__actions,
  .ai-secondary-action,
  .content-direction-toggle { width: 100%; }

  .content-direction-toggle { justify-content: space-between; }
  .reference-upload { grid-template-columns: 1fr; }

  .preparation-footer {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    gap: 0.8rem;
    padding: 0.85rem 0.85rem 1rem;
  }
}

@media (max-width: 520px) {
  .step-tabs { border-radius: 0.8rem 0.8rem 0 0; }
  .step-tabs__tab { min-height: 4.4rem; align-items: flex-start; gap: 0.48rem; padding: 0.58rem 0.55rem; }
  .step-tabs__icon { width: 1.65rem; height: 1.65rem; border-radius: 0.45rem; }
  .step-tabs__icon svg { width: 0.95rem; height: 0.95rem; }
  .step-tabs__copy strong { font-size: 0.76rem; }
  .step-tabs__copy small { font-size: 0.62rem; line-height: 1.2; }
  .step-tabs__stat { flex-basis: 100%; padding-right: 0; }
  .step-tabs__stat + .step-tabs__stat { border-top: 1px solid #dbe3f0; border-left: 0; padding-left: 0; }
  .quota-note a { flex-basis: 100%; }
}
