.ai-tool-page {
  color-scheme: dark;
  --tool-accent: #8fd1b1;
  --tool-accent-strong: #d8b97c;
  --tool-hero-image: url("../images/lesson_plans.jpg");
  background:
    radial-gradient(circle at top left, rgba(143, 209, 177, 0.14), transparent 22%),
    radial-gradient(circle at top right, rgba(216, 185, 124, 0.1), transparent 20%),
    linear-gradient(180deg, #071410 0%, #0d2018 100%);
}

.ai-tool-page-story {
  --tool-accent: #9ed9a8;
  --tool-accent-strong: #d8b97c;
  --tool-hero-image: url("../images/video_generators.jpg");
}

.ai-tool-page-script {
  --tool-accent: #d8b97c;
  --tool-accent-strong: #8fd1b1;
  --tool-hero-image: url("../images/video_plans.jpg");
}

.ai-tool-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.ai-tool-hero {
  position: relative;
  padding: 1.5rem 0 1.1rem;
  overflow: clip;
}

.ai-tool-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(6, 18, 14, 0.94) 10%, rgba(6, 18, 14, 0.54) 48%, rgba(6, 18, 14, 0.92) 100%),
    var(--tool-hero-image) center/cover no-repeat;
  opacity: 0.16;
  z-index: -2;
}

.ai-tool-hero::after {
  content: "";
  position: absolute;
  inset: auto -10rem -12rem auto;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 209, 177, 0.14), transparent 66%);
  z-index: -1;
}

.ai-tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 2rem;
  align-items: start;
}

.ai-tool-kicker {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--tool-accent);
}

.ai-tool-hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: "Fraunces", serif;
  font-size: clamp(2.8rem, 6.8vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.ai-tool-summary {
  margin: 1.2rem 0 0;
  max-width: 44rem;
  color: rgba(245, 241, 232, 0.78);
  line-height: 1.8;
  font-size: 1.03rem;
}

.ai-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.ai-tool-actions .button-link.primary {
  background: linear-gradient(90deg, var(--tool-accent), var(--tool-accent-strong));
  color: #06110d;
}

.ai-tool-hero-panel {
  display: grid;
  gap: 1rem;
  padding-top: 0.5rem;
}

.ai-tool-hero-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border-radius: 22px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background: linear-gradient(180deg, rgba(10, 30, 24, 0.9), rgba(8, 22, 17, 0.92));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.ai-tool-hero-card span {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 241, 232, 0.56);
}

.ai-tool-hero-card strong {
  font-size: 1rem;
  line-height: 1.5;
}

.ai-tool-section {
  padding: 0.35rem 0 4rem;
}

.ai-tool-intro {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 30, 24, 0.9), rgba(8, 22, 17, 0.92)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.ai-tool-intro p {
  margin: 0;
  color: rgba(245, 241, 232, 0.76);
  line-height: 1.82;
}

.ai-tool-intro a {
  color: var(--tool-accent);
}

.ai-tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  gap: 1rem;
}

.tool-form-panel,
.tool-output-panel {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 28px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 30, 24, 0.9), rgba(8, 22, 17, 0.92)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.tool-form-panel h2,
.tool-output-panel h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  line-height: 1.02;
}

.tool-form-panel form {
  display: grid;
  gap: 0.95rem;
}

.form-group {
  display: grid;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 241, 232, 0.64);
}

.form-control {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background: rgba(9, 28, 22, 0.94);
  color: var(--text);
  font-size: 0.98rem;
  box-sizing: border-box;
}

textarea.form-control {
  min-height: 128px;
  resize: vertical;
}

.form-control:focus,
.editable-content:focus {
  outline: 2px solid rgba(143, 209, 177, 0.32);
  outline-offset: 2px;
  border-color: rgba(143, 209, 177, 0.32);
}

.form-control::placeholder,
.editable-content::placeholder {
  color: rgba(245, 241, 232, 0.46);
}

.form-control option {
  background: #0b1f18;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tool-accent), var(--tool-accent-strong));
  color: #06110d;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.tool-output-panel .ai-content {
  display: grid;
  gap: 0.9rem;
}

.statement_heading {
  margin: 0;
  color: rgba(245, 241, 232, 0.74);
  font-weight: 700;
}

.editable-content {
  width: 100%;
  min-height: 420px;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 241, 232, 0.1);
  background: rgba(5, 15, 12, 0.96);
  color: var(--text);
  box-sizing: border-box;
  resize: vertical;
}

.tool-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tool-output-actions .btn {
  flex: 1 1 220px;
}

.custom-alert {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: min(92vw, 360px);
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background: linear-gradient(180deg, rgba(10, 30, 24, 0.98), rgba(8, 22, 17, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.custom-alert-content {
  display: grid;
  gap: 0.85rem;
  text-align: center;
}

.custom-alert button {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, var(--tool-accent), var(--tool-accent-strong));
  color: #06110d;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .ai-tool-hero-grid,
  .ai-tool-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ai-tool-shell {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .ai-tool-hero {
    padding-top: 1rem;
  }

  .ai-tool-intro,
  .tool-form-panel,
  .tool-output-panel {
    padding: 1rem;
  }

  .tool-output-actions {
    display: grid;
  }
}
