.seo-planner {
  margin: 40px 0 52px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #090c12;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.seo-planner,
.seo-planner * {
  letter-spacing: 0;
}

.seo-planner__header {
  padding: 30px 32px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c1018;
}

.seo-planner__eyebrow,
.seo-planner__output-label {
  display: block;
  margin-bottom: 10px;
  color: #45dce6;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.seo-planner__header h2,
.article .seo-planner__header h2 {
  margin: 0;
  padding: 0;
  color: #f7f8fb;
  font-size: 2rem;
  line-height: 1.15;
}

.article .seo-planner__header h2::before {
  content: none;
}

.seo-planner__header p,
.article .seo-planner__header p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #aeb6c7;
  font-size: 1rem;
  line-height: 1.55;
}

.seo-planner__workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  min-height: 560px;
}

.seo-planner__controls,
.seo-planner__output {
  min-width: 0;
  padding: 30px 32px 32px;
}

.seo-planner__controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.seo-planner__output {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d121a;
}

.seo-planner__field {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 9px;
}

.seo-planner__field legend {
  width: 100%;
  margin: 0 0 9px;
  padding: 0;
}

.seo-planner__label,
.seo-planner__field legend {
  color: #dce1eb;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

.seo-planner__label small {
  color: #778196;
  font-size: 0.78rem;
  font-weight: 500;
}

.seo-planner input[type="text"],
.seo-planner textarea,
.seo-planner select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  outline: none;
  color: #f4f6fa;
  background: #111722;
  font: inherit;
  font-size: 0.96rem;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.seo-planner input[type="text"],
.seo-planner select {
  min-height: 48px;
  padding: 0 14px;
}

.seo-planner textarea {
  min-height: 176px;
  padding: 13px 14px;
  resize: vertical;
}

.seo-planner input[type="text"]::placeholder,
.seo-planner textarea::placeholder {
  color: #697386;
  opacity: 1;
}

.seo-planner input[type="text"]:focus,
.seo-planner textarea:focus,
.seo-planner select:focus {
  border-color: #45dce6;
  background: #121b26;
  box-shadow: 0 0 0 3px rgba(69, 220, 230, 0.13);
}

.seo-planner select {
  appearance: auto;
  color-scheme: dark;
}

.seo-planner__counter {
  justify-self: end;
  color: #778196;
  font-size: 0.76rem;
}

.seo-planner__upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 8px 10px 8px 14px;
  border: 1px dashed rgba(69, 220, 230, 0.48);
  border-radius: 6px;
  color: #eef2f8;
  background: rgba(69, 220, 230, 0.055);
  cursor: pointer;
  gap: 14px;
}

.seo-planner__upload:hover {
  border-color: #45dce6;
  background: rgba(69, 220, 230, 0.09);
}

.seo-planner__upload:focus-within {
  outline: 3px solid rgba(69, 220, 230, 0.16);
  outline-offset: 2px;
}

.seo-planner__upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.seo-planner__upload > span {
  font-size: 0.9rem;
  font-weight: 650;
}

.seo-planner__upload small {
  color: #8e98aa;
  font-size: 0.76rem;
  text-align: right;
}

.seo-planner__photo-preview:empty {
  display: none;
}

.seo-planner__photo-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.seo-planner__photo-preview figure {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: #111722;
}

.seo-planner__photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seo-planner__photo-preview figcaption {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 4px;
  color: #071016;
  background: #45dce6;
  font-size: 0.72rem;
  font-weight: 800;
}

.seo-planner__segments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: #111722;
}

.seo-planner__segments label {
  min-width: 0;
  cursor: pointer;
}

.seo-planner__segments input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.seo-planner__segments span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: #919bae;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.seo-planner__segments label:last-child span {
  border-right: 0;
}

.seo-planner__segments input:checked + span {
  color: #061015;
  background: #45dce6;
}

.seo-planner__segments input:focus-visible + span {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(255, 184, 92, 0.8);
  outline-offset: -3px;
}

.seo-planner__error {
  margin: -4px 0 0;
  padding: 11px 12px;
  border-left: 3px solid #ffb85c;
  color: #ffd9a8;
  background: rgba(255, 184, 92, 0.08);
  font-size: 0.86rem;
}

.seo-planner__submit {
  width: 100%;
  margin-top: auto;
  border-radius: 6px;
}

.seo-planner__empty {
  display: grid;
  align-content: center;
  min-height: 100%;
}

.seo-planner__empty h3,
.article .seo-planner__empty h3,
.seo-planner__result h3,
.article .seo-planner__result h3 {
  margin: 0;
  color: #f7f8fb;
  font-size: 1.45rem;
  line-height: 1.25;
}

.seo-planner__empty ul,
.article .seo-planner__empty ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.seo-planner__empty li,
.article .seo-planner__empty li {
  position: relative;
  margin: 12px 0;
  padding-left: 22px;
  color: #919bae;
}

.seo-planner__empty li::before,
.article .seo-planner__empty li::before {
  content: "";
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: #45dce6;
}

.seo-planner__result[hidden],
.seo-planner__empty[hidden] {
  display: none;
}

.seo-planner__result {
  scroll-margin-top: 96px;
}

.seo-planner__result-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 20px;
}

.seo-planner__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  gap: 8px;
}

.seo-planner__meta div {
  min-width: 74px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 5px;
  text-align: center;
}

.seo-planner__meta dt {
  color: #747f92;
  font-size: 0.65rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.seo-planner__meta dd {
  margin: 3px 0 0;
  color: #e8edf5;
  font-size: 0.82rem;
  font-weight: 700;
}

.seo-planner__hook,
.seo-planner__finish {
  margin: 22px 0 0;
  padding: 16px 18px;
  border-left: 3px solid #45dce6;
  background: rgba(69, 220, 230, 0.055);
}

.seo-planner__finish {
  border-left-color: #70dfa7;
  background: rgba(112, 223, 167, 0.055);
}

.seo-planner__hook h4,
.seo-planner__finish h4 {
  margin: 0 0 6px;
  color: #e7ecf5;
  font-size: 0.78rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.seo-planner__hook p,
.seo-planner__finish p,
.article .seo-planner__hook p,
.article .seo-planner__finish p {
  margin: 0;
  color: #bdc5d4;
  font-size: 0.91rem;
  line-height: 1.5;
}

.seo-planner__scenes,
.article .seo-planner__scenes {
  display: grid;
  margin: 22px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none;
}

.seo-planner__scene,
.article .seo-planner__scene {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 14px;
}

.seo-planner__scene::before,
.article .seo-planner__scene::before {
  content: none;
}

.seo-planner__scene-time {
  color: #45dce6;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.seo-planner__scene strong {
  display: block;
  margin-bottom: 3px;
  color: #e8edf5;
  font-size: 0.88rem;
}

.seo-planner__scene p,
.article .seo-planner__scene p {
  margin: 0;
  color: #8f99ac;
  font-size: 0.84rem;
  line-height: 1.45;
}

.seo-planner__studio-link {
  display: flex;
  width: 100%;
  margin-top: 24px;
  border-radius: 6px;
}

.seo-planner__privacy,
.article .seo-planner__privacy {
  margin: 10px 0 0;
  color: #747f92;
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 900px) {
  .seo-planner__workspace {
    grid-template-columns: 1fr;
  }

  .seo-planner__output {
    min-height: 440px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .seo-planner {
    margin: 30px -4px 40px;
  }

  .seo-planner__header h2,
  .article .seo-planner__header h2 {
    font-size: 1.55rem;
  }

  .seo-planner__header,
  .seo-planner__controls,
  .seo-planner__output {
    padding: 23px 20px 24px;
  }

  .seo-planner__workspace {
    min-height: 0;
  }

  .seo-planner__output {
    min-height: 390px;
  }

  .seo-planner__photo-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seo-planner__result-heading {
    display: grid;
  }

  .seo-planner__meta {
    justify-content: start;
  }

  .seo-planner__scene,
  .article .seo-planner__scene {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seo-planner input,
  .seo-planner textarea,
  .seo-planner select {
    transition: none;
  }
}
