/* PromptDock SEO Planner */

.pd-seo-page {
  width: min(100%, 1900px);
  min-height: 100%;
  margin: 0 auto;
  padding: 16px 18px 70px;
  background: var(--pd-surface-bg, var(--bg));
  color: var(--pd-text-primary, var(--ink));
}

.pd-seo-hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(320px, .8fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 16px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--pd-accent-primary, var(--accent)) 7%, transparent), transparent 34%),
    var(--pd-surface-raised, var(--surface));
}

.pd-seo-hero__title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pd-seo-hero__icon {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--pd-accent-soft, var(--accent-soft));
  color: var(--pd-accent-primary, var(--accent));
  font-size: 20px;
}

.pd-seo-hero h1 {
  margin: 2px 0 5px;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -.04em;
}

.pd-seo-hero__title > div > p:not(.pd-eyebrow) {
  max-width: 70ch;
  margin: 0;
  color: var(--pd-text-muted, var(--muted));
  font-size: 11px;
  line-height: 1.5;
}

.pd-seo-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pd-seo-context-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--pd-border-subtle, var(--line));
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--pd-surface-subtle, var(--surface-muted));
  color: var(--pd-text-secondary, var(--muted));
  font-size: 9px;
  font-weight: 700;
}

.pd-seo-platform-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-width: 0;
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--pd-accent-primary, var(--accent)) 5%, var(--pd-surface-subtle, var(--surface-muted)));
}

.pd-seo-platform-note > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--pd-surface-raised, var(--surface));
  color: var(--pd-text-primary, var(--ink));
}

.pd-seo-platform-note div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pd-seo-platform-note strong {
  font-size: 10px;
}

.pd-seo-platform-note small {
  color: var(--pd-text-muted, var(--muted));
  font-size: 9px;
  line-height: 1.4;
}

.pd-seo-hero__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pd-seo-hero__actions select {
  height: 38px;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 8px;
  padding: 0 30px 0 10px;
  background: var(--pd-surface-raised, var(--surface));
  color: var(--pd-text-primary, var(--ink));
  font-size: 10px;
  font-weight: 700;
}

.pd-seo-readiness {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--pd-surface-raised, var(--surface));
}

.pd-seo-readiness__intro h2,
.pd-seo-sidebar h2,
.pd-seo-section-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: -.015em;
}

.pd-seo-readiness__intro p,
.pd-seo-section-head p {
  margin: 4px 0 0;
  color: var(--pd-text-muted, var(--muted));
  font-size: 9px;
  line-height: 1.45;
}

.pd-seo-readiness__cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
}

.pd-seo-readiness-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--pd-border-subtle, var(--line));
  border-radius: 10px;
  padding: 9px;
  background: var(--pd-surface-raised, var(--surface));
}

.pd-seo-readiness-card__icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--pd-accent-soft, var(--accent-soft));
  color: var(--pd-accent-primary, var(--accent));
}

.pd-seo-readiness-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.pd-seo-readiness-card strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-seo-readiness-card b {
  font-size: 12px;
}

.pd-seo-mini-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--pd-surface-muted, var(--surface-muted));
}

.pd-seo-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pd-accent-primary, var(--accent));
}

.pd-seo-workspace {
  display: grid;
  grid-template-columns: 230px minmax(520px, 1fr) 310px;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.pd-seo-sidebar,
.pd-seo-roadmap,
.pd-seo-coach {
  min-width: 0;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 14px;
  background: var(--pd-surface-raised, var(--surface));
}

.pd-seo-sidebar {
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
}

.pd-seo-sidebar > section {
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 14px;
  padding: 10px;
  background: var(--pd-surface-raised, var(--surface));
}

.pd-seo-sidebar h2 {
  padding: 3px 6px 8px;
}

.pd-seo-sidebar nav {
  display: grid;
  gap: 2px;
}

.pd-seo-area {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 7px;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: var(--pd-text-secondary, var(--muted));
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.pd-seo-area:hover {
  background: var(--pd-surface-subtle, var(--surface-muted));
  color: var(--pd-text-primary, var(--ink));
}

.pd-seo-area.is-active {
  background: var(--pd-accent-soft, var(--accent-soft));
  color: var(--pd-accent-primary, var(--accent));
  font-weight: 750;
}

.pd-seo-area__icon {
  display: grid;
  place-items: center;
  font-size: 14px;
}

.pd-seo-area small {
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
}

.pd-seo-workflow-list {
  display: grid;
  gap: 6px;
}

.pd-seo-workflow-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 8px;
  align-items: center;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 9px;
  padding: 9px;
  background: var(--pd-surface-raised, var(--surface));
  color: var(--pd-text-primary, var(--ink));
  text-align: left;
  cursor: pointer;
}

.pd-seo-workflow-card > span {
  display: grid;
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--pd-surface-muted, var(--surface-muted));
  color: var(--pd-text-muted, var(--muted));
}

.pd-seo-workflow-card strong {
  font-size: 9px;
}

.pd-seo-workflow-card small {
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
  line-height: 1.3;
}

.pd-seo-workflow-card.is-active {
  border-color: var(--pd-accent-primary, var(--accent));
  background: var(--pd-accent-soft, var(--accent-soft));
}

.pd-seo-workflow-card.is-active > span {
  background: var(--pd-accent-primary, var(--accent));
  color: var(--pd-accent-contrast, #fff);
}

.pd-seo-roadmap {
  padding: 10px;
}

.pd-seo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 10px;
}

.pd-seo-roadmap-group {
  margin-top: 8px;
}

.pd-seo-roadmap-group > header {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 9px;
  align-items: stretch;
  padding: 4px 2px 8px;
}

.pd-seo-roadmap-group > header > span {
  border-radius: 999px;
  background: var(--pd-accent-primary, var(--accent));
}

.pd-seo-roadmap-group--p0 > header > span {
  background: var(--pd-accent-800, var(--accent));
}

.pd-seo-roadmap-group--p2 > header > span {
  background: var(--pd-accent-300, var(--accent));
}

.pd-seo-roadmap-group h3 {
  margin: 0;
  font-size: 12px;
}

.pd-seo-roadmap-group p {
  margin: 2px 0 0;
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
}

.pd-seo-step-list {
  display: grid;
  gap: 5px;
}

.pd-seo-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 9px;
  padding: 4px;
  background: var(--pd-surface-raised, var(--surface));
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.pd-seo-step:hover {
  border-color: color-mix(in srgb, var(--pd-accent-primary, var(--accent)) 30%, var(--pd-border-default, var(--line)));
}

.pd-seo-step.is-selected {
  border-color: var(--pd-accent-primary, var(--accent));
  background: color-mix(in srgb, var(--pd-accent-soft, var(--accent-soft)) 60%, var(--pd-surface-raised, var(--surface)));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pd-accent-primary, var(--accent)) 8%, transparent);
}

.pd-seo-step.is-done {
  opacity: .68;
}

.pd-seo-step__select {
  display: grid;
  min-width: 0;
  grid-template-columns: 24px 20px minmax(130px, 1fr) auto auto auto;
  gap: 7px;
  align-items: center;
  border: 0;
  padding: 3px 5px;
  background: transparent;
  color: var(--pd-text-primary, var(--ink));
  text-align: left;
  cursor: pointer;
}

.pd-seo-step__number {
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
}

.pd-seo-step__check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--pd-accent-primary, var(--accent));
  border-radius: 4px;
  color: var(--pd-accent-primary, var(--accent));
  font-size: 10px;
}

.pd-seo-step.is-done .pd-seo-step__check {
  background: var(--pd-accent-primary, var(--accent));
  color: var(--pd-accent-contrast, #fff);
}

.pd-seo-step__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pd-seo-step__copy strong,
.pd-seo-step__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-seo-step__copy strong {
  font-size: 9px;
}

.pd-seo-step__copy small {
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
}

.pd-seo-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.pd-seo-priority--high {
  background: var(--pd-accent-800, #1e40af);
  color: #fff;
}

.pd-seo-priority--medium {
  background: var(--pd-accent-500, #3b82f6);
  color: var(--pd-accent-contrast, #fff);
}

.pd-seo-priority--low {
  background: var(--pd-accent-100, #dbeafe);
  color: var(--pd-accent-800, #1e40af);
}

.pd-seo-step__meta,
.pd-seo-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 6px;
  background: var(--pd-surface-muted, var(--surface-muted));
  color: var(--pd-text-secondary, var(--muted));
  font-size: 8px;
  white-space: nowrap;
}

.pd-seo-step__start {
  border: 0;
  border-radius: 7px;
  background: var(--pd-accent-primary, var(--accent));
  color: var(--pd-accent-contrast, #fff);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.pd-seo-tool-stack {
  margin-top: 10px;
  border: 1px solid var(--pd-border-subtle, var(--line));
  border-radius: 10px;
  padding: 9px;
  background: var(--pd-surface-subtle, var(--surface-muted));
}

.pd-seo-tool-stack > header {
  margin-bottom: 7px;
}

.pd-seo-tool-stack > header div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
}

.pd-seo-tool-stack > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 5px;
}

.pd-seo-tool-card {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1px 6px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 8px;
  padding: 7px;
  background: var(--pd-surface-raised, var(--surface));
  color: var(--pd-text-primary, var(--ink));
  text-align: left;
  cursor: pointer;
}

.pd-seo-tool-card span {
  display: grid;
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: var(--pd-accent-soft, var(--accent-soft));
  color: var(--pd-accent-primary, var(--accent));
}

.pd-seo-tool-card strong,
.pd-seo-tool-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-seo-tool-card strong {
  font-size: 8px;
}

.pd-seo-tool-card small {
  color: var(--pd-text-muted, var(--muted));
  font-size: 7px;
}

.pd-seo-coach {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.pd-seo-coach__header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 8px;
  border-bottom: 1px solid var(--pd-border-subtle, var(--line));
  padding: 13px;
}

.pd-seo-coach__header > div {
  grid-column: 1 / 3;
}

.pd-seo-coach__header p {
  margin: 0 0 4px;
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.pd-seo-coach__header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.pd-seo-coach__header small {
  align-self: center;
  color: var(--pd-text-muted, var(--muted));
  font-size: 8px;
}

.pd-seo-coach > section {
  border-bottom: 1px solid var(--pd-border-subtle, var(--line));
  padding: 11px 13px;
}

.pd-seo-coach > section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 9px;
}

.pd-seo-coach > section h3 i {
  color: var(--pd-accent-primary, var(--accent));
}

.pd-seo-coach > section p,
.pd-seo-coach > section li {
  color: var(--pd-text-secondary, var(--muted));
  font-size: 9px;
  line-height: 1.55;
}

.pd-seo-coach > section p {
  margin: 0;
}

.pd-seo-coach ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 19px;
}

.pd-seo-coach__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pd-seo-coach__tools button {
  border: 1px solid var(--pd-border-default, var(--line));
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--pd-surface-raised, var(--surface));
  color: var(--pd-text-secondary, var(--muted));
  font-size: 8px;
  cursor: pointer;
}

.pd-seo-ai-help {
  background: color-mix(in srgb, var(--pd-accent-soft, var(--accent-soft)) 55%, transparent);
}

.pd-seo-ai-help .pd-button {
  width: 100%;
  margin-top: 8px;
}

.pd-seo-done-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-seo-done-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 5px;
  align-items: start;
}

.pd-seo-coach__actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 6px;
  padding: 10px 13px;
  background: var(--pd-surface-raised, var(--surface));
}

@media (max-width: 1500px) {
  .pd-seo-workspace {
    grid-template-columns: 210px minmax(500px, 1fr) 290px;
  }

  .pd-seo-readiness {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .pd-seo-readiness__cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .pd-seo-hero {
    grid-template-columns: minmax(340px, 1fr) auto;
  }

  .pd-seo-platform-note {
    display: none;
  }
}

@media (max-width: 1180px) {
  .pd-seo-workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .pd-seo-coach {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }

  .pd-seo-coach__actions {
    position: static;
  }

  .pd-seo-tool-stack > div {
    grid-template-columns: repeat(2, 1fr);
  }

  .pd-seo-step__select {
    grid-template-columns: 20px 18px minmax(120px, 1fr) auto auto;
  }

  .pd-seo-tool-pill {
    display: none;
  }
}

@media (max-width: 840px) {
  .pd-seo-page {
    padding: 10px 10px 70px;
  }

  .pd-seo-hero {
    grid-template-columns: 1fr;
  }

  .pd-seo-hero__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pd-seo-readiness {
    grid-template-columns: 1fr;
  }

  .pd-seo-readiness__cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .pd-seo-workspace {
    grid-template-columns: 1fr;
  }

  .pd-seo-sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .pd-seo-sidebar nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .pd-seo-step__select {
    grid-template-columns: 18px 18px minmax(100px, 1fr) auto;
  }

  .pd-seo-step__meta,
  .pd-seo-tool-pill {
    display: none;
  }
}

@media (max-width: 560px) {
  .pd-seo-sidebar {
    grid-template-columns: 1fr;
  }

  .pd-seo-readiness__cards,
  .pd-seo-sidebar nav,
  .pd-seo-tool-stack > div {
    grid-template-columns: 1fr;
  }

  .pd-seo-step {
    grid-template-columns: 1fr 52px;
  }

  .pd-seo-priority {
    display: none;
  }
}