/* Page — App dashboard (app.html) */
body.page-home {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color-scheme: dark;
}

/* Force page-list style scrollbar across all dashboard scroll areas. */
body.page-home,
body.page-home * {
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) var(--bg-elevated);
}

body.page-home::-webkit-scrollbar,
body.page-home *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.page-home::-webkit-scrollbar-track,
body.page-home *::-webkit-scrollbar-track {
  background: var(--bg-elevated);
}

body.page-home::-webkit-scrollbar-track-piece,
body.page-home *::-webkit-scrollbar-track-piece {
  background: var(--bg-elevated);
}

body.page-home::-webkit-scrollbar-thumb,
body.page-home *::-webkit-scrollbar-thumb {
  background: var(--border-soft);
  border-radius: 4px;
  border: none;
  background-clip: padding-box;
}

body.page-home::-webkit-scrollbar-thumb:hover,
body.page-home *::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Hard-force exact custom look on all known scroll containers. */
body.page-home .app-sidebar,
body.page-home #pageResults,
body.page-home #cmsItemResults,
body.page-home .picker-results,
body.page-home .searchable-select-list,
body.page-home .schema-menu,
body.page-home textarea,
body.page-home select {
  scrollbar-width: thin !important;
  scrollbar-color: var(--border-soft) var(--bg-elevated) !important;
}

body.page-home .app-sidebar::-webkit-scrollbar,
body.page-home #pageResults::-webkit-scrollbar,
body.page-home #cmsItemResults::-webkit-scrollbar,
body.page-home .picker-results::-webkit-scrollbar,
body.page-home .searchable-select-list::-webkit-scrollbar,
body.page-home .schema-menu::-webkit-scrollbar,
body.page-home textarea::-webkit-scrollbar,
body.page-home select::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

body.page-home .app-sidebar::-webkit-scrollbar-track,
body.page-home #pageResults::-webkit-scrollbar-track,
body.page-home #cmsItemResults::-webkit-scrollbar-track,
body.page-home .picker-results::-webkit-scrollbar-track,
body.page-home .searchable-select-list::-webkit-scrollbar-track,
body.page-home .schema-menu::-webkit-scrollbar-track,
body.page-home textarea::-webkit-scrollbar-track,
body.page-home select::-webkit-scrollbar-track {
  background: var(--bg-elevated) !important;
}

body.page-home .app-sidebar::-webkit-scrollbar-track-piece,
body.page-home #pageResults::-webkit-scrollbar-track-piece,
body.page-home #cmsItemResults::-webkit-scrollbar-track-piece,
body.page-home .picker-results::-webkit-scrollbar-track-piece,
body.page-home .searchable-select-list::-webkit-scrollbar-track-piece,
body.page-home .schema-menu::-webkit-scrollbar-track-piece,
body.page-home textarea::-webkit-scrollbar-track-piece,
body.page-home select::-webkit-scrollbar-track-piece {
  background: var(--bg-elevated) !important;
}

body.page-home .app-sidebar::-webkit-scrollbar-thumb,
body.page-home #pageResults::-webkit-scrollbar-thumb,
body.page-home #cmsItemResults::-webkit-scrollbar-thumb,
body.page-home .picker-results::-webkit-scrollbar-thumb,
body.page-home .searchable-select-list::-webkit-scrollbar-thumb,
body.page-home .schema-menu::-webkit-scrollbar-thumb,
body.page-home textarea::-webkit-scrollbar-thumb,
body.page-home select::-webkit-scrollbar-thumb {
  background: var(--border-soft) !important;
  border-radius: 4px !important;
}

body.page-home .app-sidebar::-webkit-scrollbar-button,
body.page-home #pageResults::-webkit-scrollbar-button,
body.page-home #cmsItemResults::-webkit-scrollbar-button,
body.page-home .picker-results::-webkit-scrollbar-button,
body.page-home .searchable-select-list::-webkit-scrollbar-button,
body.page-home .schema-menu::-webkit-scrollbar-button,
body.page-home textarea::-webkit-scrollbar-button,
body.page-home select::-webkit-scrollbar-button {
  background: var(--bg-elevated) !important;
  height: 10px !important;
}

body.page-home .app-sidebar::-webkit-scrollbar-corner,
body.page-home #pageResults::-webkit-scrollbar-corner,
body.page-home #cmsItemResults::-webkit-scrollbar-corner,
body.page-home .picker-results::-webkit-scrollbar-corner,
body.page-home .searchable-select-list::-webkit-scrollbar-corner,
body.page-home .schema-menu::-webkit-scrollbar-corner,
body.page-home textarea::-webkit-scrollbar-corner,
body.page-home select::-webkit-scrollbar-corner {
  background: var(--bg-elevated) !important;
}

.page-home .app {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* —— Top hero + connect (full width) —— */
.page-home .app-top {
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(6, 182, 212, 0.08));
  box-shadow: var(--shadow);
}

.page-home .app-top-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.page-home .app-top-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #f8fafc, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-home .app-top-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.5;
}

.page-home .app-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.page-home .app-top-actions .btn {
  margin-top: 0;
}

.page-home .btn--disconnect {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.25);
}

.page-home .btn--disconnect:hover {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(127, 29, 29, 0.4);
}

.page-home .app-top .status {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin: 14px 0 0;
}

/* —— Two-column workspace —— */
.page-home .app-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 420px;
  width: 100%;
}

.page-home .app-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  z-index: 20;
  max-height: calc(100vh - var(--header-h) - 20px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.page-home .app-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.page-home .card {
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.75);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}

.page-home .card:hover {
  border-color: var(--border-soft);
}

.page-home .card--stack {
  display: flex;
  flex-direction: column;
}

.page-home .card--pages {
  flex-shrink: 0;
}

.page-home .card--cms {
  flex-shrink: 0;
}

.page-home .cms-template-setup {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(30, 41, 59, 0.55);
  font-size: 12px;
  line-height: 1.45;
}

.page-home .cms-template-setup__heading {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
}

.page-home .cms-template-setup__lead {
  margin: 0 0 8px;
  color: var(--text-muted);
}

.page-home .cms-template-setup__steps {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--text-muted);
}

.page-home .cms-template-setup__steps li {
  margin-bottom: 4px;
}

.page-home .cms-template-setup__code {
  width: 100%;
  margin-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  resize: vertical;
  min-height: 72px;
}

.page-home .cms-template-setup__meta {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.page-home .cms-template-setup__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.page-home .cms-template-setup__actions .btn,
.page-home .cms-template-setup__actions .cms-template-setup__link {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

.page-home .cms-template-setup__link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.page-home .card--meta {
  flex-shrink: 0;
}

.page-home .card--schema {
  flex-shrink: 0;
}

.page-home .card-heading {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
}

.page-home label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 8px 0 6px;
}

.page-home .card-heading + input,
.page-home .card-heading + .search-hint {
  margin-top: 0;
}

.page-home label:first-of-type {
  margin-top: 4px;
}

.page-home input,
.page-home textarea,
.page-home select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.page-home input:focus,
.page-home textarea:focus,
.page-home select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.page-home textarea {
  resize: vertical;
  min-height: 64px;
}

.page-home .btn {
  margin-top: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

.page-home .btn--compact {
  margin-top: 0;
  padding: 7px 12px;
  font-size: 12px;
}

.page-home .btn--save {
  margin-top: 14px;
  width: 100%;
  padding: 11px 18px;
}

.page-home .action-feedback {
  margin: 6px 0 0;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  line-height: 1.35;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}

.page-home .action-feedback--success {
  color: #86efac;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.page-home .action-feedback--error {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.page-home .action-feedback--info {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 10002;
}

/* Keep modal truly hidden until JS opens it. */
.modal-overlay[hidden] {
  display: none !important;
}

.modal {
  width: min(980px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: rgba(11, 16, 32, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 16px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-sub {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-status {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-textarea {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.4);
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.modal-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.page-home .btn:hover {
  background: #1e293b;
  border-color: #475569;
}

.page-home .btn:active {
  transform: scale(0.98);
}

.page-home .btn.primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5 40%, var(--accent-2));
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.page-home .btn.primary:hover {
  filter: brightness(1.08);
}

.page-home .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-home .row--tight {
  margin-top: 8px;
}

.page-home .row--tight .btn {
  flex: 1;
  min-width: 0;
}

.page-home .score-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.page-home .status {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  line-height: 1.45;
}

.page-home input[type="search"] {
  margin-bottom: 4px;
}

.page-home .search-hint {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.page-home .page-health-progress {
  margin: 0 0 8px;
}

.page-home .page-health-progress__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}

.page-home .page-health-progress__track {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.page-home .page-health-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  transition: width 0.25s ease;
}

.page-home .picker-results--fill {
  min-height: 160px;
  max-height: min(480px, calc(100vh - var(--header-h) - 300px));
}

.page-home .picker-results--cms {
  max-height: 200px;
  min-height: 80px;
}

.page-home #pageResults,
.page-home #cmsItemResults,
.page-home .picker-results {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  margin-bottom: 8px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.page-home .picker-group-label {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 1;
}

.page-home .page-selected-bar {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.12);
  font-size: 12px;
  color: #c7d2fe;
  line-height: 1.4;
}

.page-home #pageResults .picker-option,
.page-home #cmsItemResults .picker-option,
.page-home .picker-results .picker-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  margin: 0;
  border: none;
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
  border-radius: 0;
  background: #0f172a;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.page-home #pageResults .picker-option:hover,
.page-home #cmsItemResults .picker-option:hover,
.page-home .picker-results .picker-option:hover {
  background: #1e293b;
  color: #f8fafc;
}

.page-home #pageResults .picker-option.is-active,
.page-home #cmsItemResults .picker-option.is-active,
.page-home .picker-results .picker-option.is-active {
  background: rgba(99, 102, 241, 0.35);
  color: #f8fafc;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.page-home #pageResults .picker-option:focus-visible,
.page-home #cmsItemResults .picker-option:focus-visible,
.page-home .picker-results .picker-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.page-home .picker-option-dot {
  flex-shrink: 0;
  width: 1.2em;
  text-align: center;
  font-size: 0.85em;
  line-height: 1;
}

.page-home .picker-option-dot.dot-green::before,
.page-home .picker-option-dot.dot-yellow::before,
.page-home .picker-option-dot.dot-red::before,
.page-home .picker-option-dot.dot-unknown::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

.page-home .picker-option-dot.dot-green::before {
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.page-home .picker-option-dot.dot-yellow::before {
  background: #eab308;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.35);
}

.page-home .picker-option-dot.dot-red::before {
  background: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.page-home .picker-option-dot.dot-unknown::before {
  background: #94a3b8;
  opacity: 0.55;
}

.page-home .picker-option-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.page-home .picker-empty {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.page-home .searchable-select {
  position: relative;
  margin-bottom: 6px;
}

.page-home .searchable-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.page-home .searchable-select-trigger:hover {
  border-color: #475569;
}

.page-home .searchable-select.is-open .searchable-select-trigger,
.page-home .searchable-select-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.page-home .searchable-select-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-home .searchable-select-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.page-home .searchable-select.is-open .searchable-select-chevron {
  transform: rotate(180deg);
}

.page-home .searchable-select-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.page-home .searchable-select-search {
  width: 100%;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  box-shadow: none;
}

.page-home .searchable-select-search:focus {
  box-shadow: none;
  border-color: var(--border-soft);
}

.page-home .searchable-select-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
}

.page-home .searchable-select-group-label {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.page-home .searchable-select-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.page-home .searchable-select-option:hover,
.page-home .searchable-select-option.is-active {
  background: rgba(99, 102, 241, 0.14);
}

.page-home .searchable-select-option-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.page-home .searchable-select-empty {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.page-home .seo-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.6);
  flex-shrink: 0;
}

.page-home .seo-indicator[hidden] {
  display: none !important;
}

.page-home .seo-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.page-home .seo-dot--green {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}

.page-home .seo-dot--yellow {
  background: #eab308;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

.page-home .seo-dot--red {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.page-home .seo-dot--unknown {
  background: #64748b;
}

.page-home .seo-indicator-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.page-home select optgroup {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-home .schema-toolbar {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.page-home .schema-toolbar .schema-picker {
  flex: 1;
  min-width: 180px;
}

.page-home .schema-toolbar .btn--compact {
  margin-top: 0;
  flex-shrink: 0;
}

.page-home .schema-picker {
  position: relative;
}

.page-home .schema-toggle {
  width: 100%;
  text-align: left;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}

.page-home .schema-toggle::after {
  content: "▾";
  color: var(--text-muted);
}

.page-home .schema-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: var(--shadow);
}

.page-home .schema-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 6px;
}

.page-home .schema-option:hover {
  background: rgba(51, 65, 85, 0.4);
}

.page-home .schema-option input {
  width: auto;
  margin: 0;
}

.page-home .schema-editors {
  margin-top: 0;
  display: grid;
  gap: 10px;
}

.page-home .schema-editors--scroll {
  overflow: visible;
  max-height: none;
}

.page-home .schema-editor {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(11, 19, 40, 0.8);
}

.page-home .schema-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.page-home .schema-editor-title {
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
}

.page-home .schema-editor textarea {
  min-height: 180px;
  max-height: none;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}

.page-home .schema-empty {
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.page-home .seo-score {
  margin-top: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11px;
  min-width: 0;
  background: var(--bg-elevated);
}

.page-home .seo-score.good {
  border-color: #16a34a;
  color: #86efac;
  background: rgba(22, 163, 74, 0.08);
}

.page-home .seo-score.average {
  border-color: #f59e0b;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
}

.page-home .seo-score.poor {
  border-color: #dc2626;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.08);
}

.page-home .seo-score.neutral {
  color: var(--text-muted);
}

.page-home .site-footer {
  padding: 16px 0 24px;
}

@media (max-width: 900px) {
  .page-home .app-workspace {
    grid-template-columns: 1fr;
  }

  .page-home .app-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .page-home .picker-results--fill {
    max-height: 280px;
  }

  .page-home .score-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .page-home .site-page-shell--app {
    padding-top: 12px;
  }

  .page-home .app-top {
    padding: 16px;
  }

  .page-home .app-top-actions {
    width: 100%;
  }

  .page-home .app-top-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .page-home .card {
    padding: 12px;
  }

  .page-home .row--tight .btn {
    width: 100%;
    flex: none;
  }
}

.page-home .skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  padding: 10px 14px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.page-home .skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
}

.page-home .data-disclosure,
.page-home .data-disclosure-panel {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.page-home .data-disclosure {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-sm);
}

.page-home .data-disclosure a {
  color: var(--link);
  font-weight: 500;
}

.page-home .data-disclosure-panel {
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
}

.page-home .data-disclosure-panel__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.page-home .data-disclosure-panel__list {
  margin: 0 0 10px;
  padding-left: 18px;
}

.page-home .data-disclosure-panel__list li {
  margin-bottom: 6px;
}

.page-home .data-disclosure-panel__link {
  margin: 0;
  font-size: 12px;
}

.page-home .empty-state {
  padding: 20px 16px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-soft);
  background: rgba(15, 23, 42, 0.45);
}

.page-home .empty-state__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.page-home .empty-state__text {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.page-home .schema-empty {
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.page-home .app-loading {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.55);
}

.page-home .app-loading[hidden] {
  display: none !important;
}

.page-home .app-loading__panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.page-home .app-loading__spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-soft);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: app-spin 0.7s linear infinite;
}

@keyframes app-spin {
  to {
    transform: rotate(360deg);
  }
}

body.page-home.is-app-loading {
  cursor: wait;
}

.page-home .row--generate {
  margin-top: 4px;
}

#demoBanner.demo-banner--prerender,
#demoPagePrerender,
#demoSchemaPrerender {
  display: none;
}

html[data-demo="1"] #demoBanner.demo-banner--prerender {
  display: flex !important;
}

html[data-demo="1"] #appWelcome {
  display: none !important;
}

html[data-demo="1"] #demoPagePrerender {
  display: block !important;
}

html[data-demo="1"] .picker-empty {
  display: none !important;
}

html[data-demo="1"] #demoSchemaPrerender {
  display: block !important;
}

html[data-demo="1"] .search-hint__demo {
  display: block;
}

html[data-demo="1"] .search-hint__demo ~ .search-hint__live,
html[data-demo="1"] #pageSearchHint:not(:empty) .search-hint__demo {
  display: none;
}

html[data-demo="1"] .status__demo {
  display: inline;
}

html[data-demo="1"] .status__default {
  display: none;
}

html[data-demo="1"] .save-feedback__demo {
  display: inline;
}

html[data-demo="1"] .save-feedback__default {
  display: none;
}

.page-home .panel-desc {
  margin: -4px 0 10px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

.page-home .action-feedback--visible {
  display: block;
  margin-top: 10px;
}

.page-home .demo-page-prerender .picker-option {
  width: 100%;
  text-align: left;
}

.page-home .demo-schema-prerender textarea {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.page-demo-static .demo-static-pages {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}

.page-demo-static .demo-static-pages li {
  margin-bottom: 6px;
}

.page-demo-static .mono {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.reviewer-noscript-demo {
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
}

.page-home .modal--narrow {
  width: min(520px, 100%);
}

.page-home .btn:focus-visible,
.page-home input:focus-visible,
.page-home textarea:focus-visible,
.page-home select:focus-visible,
.page-home .picker-option:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.page-home .demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.12);
  font-size: 13px;
}

.page-home .demo-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-home .app-welcome {
  margin-bottom: 14px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 42, 0.65));
}

.page-home .app-welcome h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.page-home .app-welcome__lead {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 62ch;
}

.page-home .app-welcome__free {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.page-home .app-welcome__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-home .app-welcome__review {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* Designer Extension iframe — full dashboard, no marketing chrome */
html.wf-panel-embed body.page-home .site-header,
html.wf-panel-embed body.page-home .site-footer,
html.wf-panel-embed body.page-home .skip-link {
  display: none !important;
}

html.wf-panel-embed body.page-home .site-page-shell--app {
  padding-top: 0;
  min-height: 100vh;
}

html.wf-panel-embed body.page-home .site-container {
  max-width: none;
  padding-left: 12px;
  padding-right: 12px;
}

html.wf-panel-embed body.page-home .data-disclosure-panel {
  margin-top: 0;
}
