/*
 * Your site (app/views/sites, SitesController): the connection ladder, the
 * search queries, the business profile, keywords, competitors and the
 * settings shortcuts, and the settings pages, which are parts of it
 * (app/views/settings/site, .set-*). Every rule sits under .shell .pg-site;
 * the page header block carries the class too (it renders in the shell's
 * app-head).
 * Shared components (ui-card, ui-chip, ui-btn...) are in ui.css; this file
 * only places them and gives the cards their padding.
 */

.shell .pg-site { color: var(--app-ink); font-size: 14px; line-height: 1.5; }

/* ── Page header: favicon, domain, platform, status line ── */
.shell .pg-site.site-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.shell .pg-site .site-head__fav { display: inline-flex; flex: none; }
.shell .pg-site .site-head__fav .app-fav { width: 36px; height: 36px; padding: 5px; border-radius: 10px; }
.shell .pg-site .site-head__fav .app-fav--letter { padding: 0; font-size: 15px; }
.shell .pg-site .site-head__text { min-width: 0; }
.shell .pg-site .site-head__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shell .pg-site .site-head__row h1 { min-width: 0; }
.shell .pg-site .site-head__page { display: none; }
.shell .pg-site .site-head__status { margin: 3px 0 0; font-size: 13px; line-height: 1.4; color: var(--app-ink-2); }
.shell .pg-site.site-actions { display: inline-flex; }

/* ── Cards (ui.css) get their padding here: 24 for the hero, 20 for the
   side cards, 16 for the hero on phones ── */
.shell .pg-site .ui-card { position: relative; padding: 20px; color: var(--app-ink); }
.shell .pg-site .ui-card--hero { padding: 24px; }

/* ── Layout: main column and a side column of cards ── */
.shell .pg-site .site-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.shell .pg-site .site-main { display: grid; gap: 40px; min-width: 0; }
.shell .pg-site .site-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }

/* ── Sections: flat, a hair rule under the header ── */
.shell .pg-site .site-section { min-width: 0; }
.shell .pg-site .site-section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--app-hair);
}
.shell .pg-site .site-section__title { margin: 0; font-family: var(--f-display); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--app-ink); }
.shell .pg-site .site-section__meta { font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-3); font-variant-numeric: tabular-nums; }
.shell .pg-site .site-section__lead { margin: 12px 0 0; max-width: 64ch; font-size: 14px; color: var(--app-ink-2); }
.shell .pg-site .site-section__more { margin-top: 12px; }

/* ── The connection ladder (hero card) ── */
.shell .pg-site .site-ladder__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.shell .pg-site .site-ladder__head .ui-label { line-height: 1.3; }
.shell .pg-site .site-ladder__count { font-family: var(--f-mono); font-size: 12px; color: var(--app-ink-3); font-variant-numeric: tabular-nums; }
.shell .pg-site .site-ladder__count b { font-weight: 600; color: var(--app-ink); }

.shell .pg-site .site-steps { margin: 0; padding: 0; list-style: none; }
.shell .pg-site .site-step { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 16px; }
.shell .pg-site .site-step__rail { display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.shell .pg-site .site-step__rung { flex: 1; width: 2px; min-height: 16px; margin: 6px 0 4px; border-radius: 2px; background: var(--app-hair-2); }
.shell .pg-site .site-step__rung--done { background: var(--app-sheen-y); }
.shell .pg-site .site-step__rung--ahead { background: repeating-linear-gradient(to bottom, var(--app-hair-2) 0 4px, transparent 4px 8px); }
.shell .pg-site .site-step__body { min-width: 0; padding-bottom: 28px; }
.shell .pg-site .site-step:last-child .site-step__body { padding-bottom: 0; }
/* The current step's panel bleeds up so its title stays level with the node. */
.shell .pg-site .site-step__body.ui-warm { margin: -14px 0 28px; padding: 14px 18px 18px; }
.shell .pg-site .site-step:last-child .site-step__body.ui-warm { margin-bottom: 0; padding-bottom: 18px; }

.shell .pg-site .site-step__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; }
.shell .pg-site .site-step__title { margin: 0; font-family: var(--f-display); font-size: 16px; font-weight: 700; line-height: 22px; letter-spacing: -0.01em; color: var(--app-ink); }
.shell .pg-site .site-step--ahead .site-step__title { color: var(--app-ink-2); }
.shell .pg-site .site-step__text { margin: 6px 0 0; max-width: 62ch; font-size: 14px; color: var(--app-ink-2); }
.shell .pg-site .site-step__text b { font-weight: 600; color: var(--app-ink); overflow-wrap: anywhere; }
.shell .pg-site .site-step--ahead .site-step__text { color: var(--app-ink-3); }
.shell .pg-site .site-step__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; font-size: 12.5px; color: var(--app-ink-3); }
.shell .pg-site .site-step__note { margin: 12px 0 0; max-width: 62ch; font-size: 13px; color: var(--app-ink-3); }
.shell .pg-site .site-plugin { gap: 6px; color: var(--app-ink-2); }
.shell .pg-site .site-plugin svg { flex: none; color: var(--app-ok); }
.shell .pg-site .site-step__controls,
.shell .pg-site .site-step__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
.shell .pg-site .site-step__body > .ui-link { display: inline-block; margin-top: 10px; }
.shell .pg-site .site-step__article { font-weight: 600; color: var(--app-ink); text-decoration: none; overflow-wrap: anywhere; }
.shell .pg-site .site-step__article:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.shell .pg-site .site-url { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-family: var(--f-mono); font-size: 12px; color: var(--app-accent); text-decoration: none; overflow-wrap: anywhere; }
.shell .pg-site .site-url span { min-width: 0; }
.shell .pg-site .site-url svg { flex: none; }
.shell .pg-site .site-url:hover span { text-decoration: underline; text-underline-offset: 3px; }
.shell .pg-site .site-num { font-family: var(--f-mono); font-size: 12px; color: var(--app-ink-2); font-variant-numeric: tabular-nums; }
.shell .pg-site .site-inline-form { display: inline-flex; margin: 0; }

.shell .pg-site .site-ladder__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--app-hair);
  font-size: 12.5px; color: var(--app-ink-3);
}

/* "Send the setup to my web person", folded under the connect button. */
.shell .pg-site .site-setup { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 120, 70, 0.18); }
.shell .pg-site .site-setup summary {
  display: flex; align-items: center; gap: 8px; min-height: 32px;
  font-size: 13.5px; font-weight: 500; color: var(--app-ink-2);
  list-style: none; cursor: pointer; border-radius: 6px;
}
.shell .pg-site .site-setup summary::-webkit-details-marker { display: none; }
.shell .pg-site .site-setup summary svg { flex: none; color: var(--app-ink-3); }
.shell .pg-site .site-setup summary::after {
  content: ''; flex: none; width: 7px; height: 7px; margin: -3px 4px 0 auto;
  border-right: 1.5px solid var(--app-ink-3); border-bottom: 1.5px solid var(--app-ink-3);
  transform: rotate(45deg); transition: transform 0.18s var(--app-ease);
}
.shell .pg-site .site-setup[open] summary::after { margin-top: 3px; transform: rotate(225deg); }
.shell .pg-site .site-setup summary:hover { color: var(--app-ink); }
.shell .pg-site .site-setup__text { margin: 6px 0 12px; font-size: 13px; color: var(--app-ink-3); }
.shell .pg-site .site-setup__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; }

/* ── Search queries ── */
.shell .pg-site .site-queries { margin-top: 4px; }
.shell .pg-site .site-query {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px 56px 72px 64px; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--app-hair);
}
.shell .pg-site .site-query--head { padding: 10px 0 8px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-ink-3); }
.shell .pg-site .site-query__text { min-width: 0; font-size: 14px; color: var(--app-ink); overflow-wrap: anywhere; }
.shell .pg-site .site-query__spark { display: block; height: 24px; color: var(--app-ember); }
.shell .pg-site .site-query__spark svg { display: block; width: 96px; height: 24px; overflow: visible; }
.shell .pg-site .site-query__n { text-align: right; font-family: var(--f-mono); font-size: 12px; color: var(--app-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── About your business ── */
.shell .pg-site .site-save { display: inline-flex; align-items: center; gap: 6px; min-height: 18px; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-3); font-variant-numeric: tabular-nums; }
.shell .pg-site .site-save__saving { display: none; }
.shell .pg-site .site-save.is-saved::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--app-ok); }
.shell .pg-site .site-save.is-error { font-family: var(--f-body); font-size: 12.5px; color: var(--app-hot); }
.shell .pg-site .site-section:has(form[aria-busy="true"]) .site-save__saving { display: inline; }
.shell .pg-site .site-section:has(form[aria-busy="true"]) .site-save__state,
.shell .pg-site .site-section:has(form[aria-busy="true"]) .site-save::before { display: none; }

.shell .pg-site .site-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.shell .pg-site .site-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.shell .pg-site .site-field--wide { grid-column: 1 / -1; }
.shell .pg-site .site-field__label { font-size: 13px; font-weight: 600; color: var(--app-ink); }
.shell .pg-site .site-field__hint { font-size: 12.5px; color: var(--app-ink-3); }
.shell .pg-site .site-field__error { margin: 8px 0 0; font-size: 12.5px; color: var(--app-hot); }
/* More about your business: the rest of the profile, folded. */
.shell .pg-site .site-more { grid-column: 1 / -1; min-width: 0; border-top: 1px solid var(--app-hair); }
.shell .pg-site .site-more > summary {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-height: 44px; padding: 12px 24px 0 0; position: relative;
  font-size: 14px; font-weight: 600; color: var(--app-ink); list-style: none; cursor: pointer; border-radius: 6px;
}
.shell .pg-site .site-more > summary::-webkit-details-marker { display: none; }
.shell .pg-site .site-more > summary::after {
  content: ''; position: absolute; right: 6px; top: 18px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--app-ink-3); border-bottom: 1.5px solid var(--app-ink-3);
  transform: rotate(45deg); transition: transform 0.18s var(--app-ease);
}
.shell .pg-site .site-more[open] > summary::after { top: 22px; transform: rotate(225deg); }
.shell .pg-site .site-more__hint { font-size: 13px; font-weight: 400; color: var(--app-ink-3); }
.shell .pg-site .site-more > summary:hover .site-more__hint { color: var(--app-ink-2); }
.shell .pg-site .site-more > .site-about { margin-top: 16px; }

/* ── Keywords ── */
.shell .pg-site .site-kws { margin: 8px 0 0; padding: 0; list-style: none; }
.shell .pg-site .site-kw {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--app-hair);
}
.shell .pg-site .site-kw__name { min-width: 0; font-size: 14px; color: var(--app-ink); overflow-wrap: anywhere; transition: color 0.15s var(--app-ease); }
.shell .pg-site .site-kw.is-off .site-kw__name { color: var(--app-ink-3); }
.shell .pg-site .site-kw__vol { font-size: 12.5px; color: var(--app-ink-3); white-space: nowrap; }
.shell .pg-site .site-kw__vol b { font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--app-ink-2); font-variant-numeric: tabular-nums; }
.shell .pg-site .site-kw.is-off .site-kw__vol b { color: var(--app-ink-3); }
.shell .pg-site .site-kw__none { font-size: 12.5px; }
.shell .pg-site .site-kw__form { display: flex; margin: 0; }

/* ── Side cards ── */
.shell .pg-site .site-card__title { margin: 0; font-family: var(--f-display); font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--app-ink); }
.shell .pg-site .site-card__lead { margin: 4px 0 0; font-size: 13px; color: var(--app-ink-3); }
.shell .pg-site .site-card__empty { margin: 14px 0 0; font-size: 13.5px; color: var(--app-ink-2); }
.shell .pg-site .site-card__note { margin: 14px 0 0; font-size: 13px; color: var(--app-ink-3); }
.shell .pg-site .site-inline-link { color: var(--app-accent); font-weight: 600; text-decoration: none; }
.shell .pg-site .site-inline-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.shell .pg-site .site-comps { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.shell .pg-site .site-comp {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 3px 0 8px;
  border-radius: 8px; background: var(--app-bg); box-shadow: inset 0 0 0 1px var(--app-hair-2);
  font-family: var(--f-mono); font-size: 12px; color: var(--app-ink);
}
.shell .pg-site .site-comp__fav { flex: none; width: 14px; height: 14px; border-radius: 3px; }
.shell .pg-site .site-comp__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell .pg-site .site-comp__form { display: flex; margin: 0; }
.shell .pg-site .site-comp__x {
  position: relative; display: grid; place-items: center; width: 24px; height: 24px;
  border: 0; border-radius: 6px; background: none; color: var(--app-ink-3); cursor: pointer;
  transition: background-color 0.15s var(--app-ease), color 0.15s var(--app-ease);
}
.shell .pg-site .site-comp__x::after { content: ''; position: absolute; inset: -6px -4px; }
.shell .pg-site .site-comp__x:hover { background: var(--app-hover); color: var(--app-hot); }
.shell .pg-site .site-comp-add { display: flex; gap: 8px; margin-top: 14px; }
.shell .pg-site .site-comp-add .ui-input { flex: 1; min-width: 0; min-height: 36px; padding: 6px 10px; font-family: var(--f-mono); font-size: 12.5px; }
.shell .pg-site .site-comp-add .ui-btn { flex: none; }

.shell .pg-site .site-adv__list { margin: 10px -8px -6px; padding: 0; list-style: none; }
.shell .pg-site .site-adv__row {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px;
  border-radius: 8px; color: var(--app-ink); font-size: 14px; text-decoration: none;
  transition: background-color 0.15s var(--app-ease);
}
.shell .pg-site .site-adv__row:hover { background: var(--app-hover); }
.shell .pg-site .site-adv__row:focus-visible { outline-offset: -2px; }
.shell .pg-site .site-adv__icon { display: inline-flex; flex: none; color: var(--app-ink-3); }
.shell .pg-site .site-adv__label { flex: 1 0 auto; white-space: nowrap; }
.shell .pg-site .site-adv__meta { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-3); font-variant-numeric: tabular-nums; }
.shell .pg-site .site-adv__chev { display: inline-flex; flex: none; color: var(--app-ink-3); transition: transform 0.15s var(--app-ease); }
.shell .pg-site .site-adv__row:hover .site-adv__chev { transform: translateX(2px); }
/* Images leads with the latest covers, the whole tile one link. */
.shell .pg-site .site-adv__images {
  display: block; margin: 14px -8px 0; padding: 8px 8px 0; border-radius: 10px; color: var(--app-ink); text-decoration: none;
  transition: background-color 0.15s var(--app-ease);
}
.shell .pg-site .site-adv__images:hover { background: var(--app-hover); }
.shell .pg-site .site-adv__images:focus-visible { outline-offset: -2px; }
.shell .pg-site .site-adv__images .site-adv__row { padding: 8px 0; background: none; }
.shell .pg-site .site-adv__images:hover .site-adv__chev { transform: translateX(2px); }
.shell .pg-site .site-adv__images .site-adv__label { font-weight: 600; }
.shell .pg-site .site-adv__covers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.shell .pg-site .site-adv__covers .ui-cover { width: 100%; height: auto; aspect-ratio: 1.91; border-radius: 8px; }
.shell .pg-site .site-adv__covers .site-adv__sheen { grid-column: 1 / -1; display: grid; place-items: center; aspect-ratio: auto; height: 64px; color: var(--app-ink-3); }
.shell .pg-site .site-adv__images + .site-adv__list { margin-top: 2px; }
/* Beside a settings page, that page's row is the current one. */
.shell .pg-site .site-adv__row[aria-current="page"], .shell .pg-site .site-adv__images[aria-current="page"] { background: var(--app-press); }
.shell .pg-site .site-adv__images[aria-current="page"] .site-adv__row { background: none; }
.shell .pg-site .site-adv [aria-current="page"] .site-adv__label { font-weight: 600; }
.shell .pg-site .site-adv [aria-current="page"] .site-adv__icon { color: var(--app-ink); }
/* Delete this site, admins only: last, quiet until hovered. */
.shell .pg-site .site-adv__end { margin: 8px -8px -6px; padding-top: 6px; border-top: 1px solid var(--app-hair); }
.shell .pg-site .site-adv__delete { width: 100%; border: 0; background: none; font: inherit; text-align: left; color: var(--app-ink-2); cursor: pointer; }
.shell .pg-site .site-adv__delete:hover { background: color-mix(in srgb, var(--app-hot) 7%, transparent); color: var(--app-hot); }
.shell .pg-site .site-adv__delete:hover .site-adv__icon { color: var(--app-hot); }

/* ── Settings pages (app/views/settings/site): Your site one level down,
   its header with the site first, its layout with the Settings card on the
   side ── */
.shell .pg-site .set-head__row { gap: 10px; }
/* A long domain gives way to the page's name. */
.shell .pg-site .set-crumb { display: inline-flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; }
.shell .pg-site .set-head__row h1 { flex: none; max-width: 100%; }
.shell .pg-site .set-crumb__up {
  display: inline-flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden;
  font-family: var(--f-display); font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em;
  color: var(--app-ink-3); text-decoration: none; white-space: nowrap; border-radius: 6px;
  transition: color 0.15s var(--app-ease);
}
.shell .pg-site .set-crumb__up > span:not(.set-crumb__back) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shell .pg-site .set-crumb__up:hover { color: var(--app-ink); }
.shell .pg-site .set-crumb__back { display: none; flex: none; }
.shell .pg-site .set-crumb__sep { flex: none; font-family: var(--f-display); font-size: 22px; font-weight: 400; line-height: 1.2; color: var(--app-ink-3); opacity: 0.55; }

.shell .pg-site .set-stack { display: grid; gap: 40px; min-width: 0; }
.shell .pg-site .set-body { display: grid; gap: 20px; margin-top: 20px; min-width: 0; }
.shell .pg-site .set-field { max-width: 420px; }

/* A section whose header folds it (the writing rules). */
.shell .pg-site .set-fold > summary { list-style: none; cursor: pointer; border-radius: 6px; }
.shell .pg-site .set-fold > summary::-webkit-details-marker { display: none; }
.shell .pg-site .set-fold__head { align-items: center; }
.shell .pg-site .set-fold__meta { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.shell .pg-site .set-fold__meta svg { transition: transform 0.18s var(--app-ease); }
.shell .pg-site .set-fold > summary:hover .set-fold__meta { color: var(--app-ink); }
.shell .pg-site .set-fold[open] .set-fold__meta svg { transform: rotate(180deg); }
.shell .pg-site .set-fold > .set-rules { margin-top: 8px; }

/* On/off settings: what it does, the switch on the right (as on Your site's keywords). */
.shell .pg-site .set-rules { margin: 0; padding: 0; list-style: none; }
.shell .pg-site .set-rule { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--app-hair); }
.shell .pg-site .set-rule:last-child { border-bottom: 0; padding-bottom: 0; }
.shell .pg-site .set-body > .set-rules:first-child .set-rule:first-child, .shell .pg-site .site-section__head + .set-rules .set-rule:first-child { padding-top: 8px; }
.shell .pg-site .set-rule__text { display: grid; gap: 3px; min-width: 0; max-width: 64ch; }
.shell .pg-site .set-rule__label { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--app-ink); cursor: pointer; }
.shell .pg-site .set-rule__hint { font-size: 13px; line-height: 1.5; color: var(--app-ink-2); }
.shell .pg-site .set-rule .ui-check { margin-top: 1px; }
.shell .pg-site .set-rule__more { display: grid; gap: 6px; margin-top: 10px; }

/* Website and pace */
.shell .pg-site .set-site { display: flex; align-items: center; gap: 12px; max-width: 520px; }
.shell .pg-site .set-site__shot { flex: none; display: block; width: 72px; height: 45px; overflow: hidden; border-radius: 8px; box-shadow: 0 0 0 1px var(--app-hair); }
.shell .pg-site .set-site__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shell .pg-site .set-site__input { flex: 1; min-width: 0; }
.shell .pg-site .set-pace { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.shell .pg-site .set-pace__a { font-size: 14px; color: var(--app-ink-2); }
.shell .pg-site .set-danger__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 16px; }
.shell .pg-site .set-danger__text { margin: 0; max-width: 56ch; font-size: 14px; color: var(--app-ink-2); }
.shell .pg-site .set-danger__btn svg { color: var(--app-hot); }

/* Keywords: All, On or Off, and the plan's keywords across all sites. */
.shell .pg-site .set-filter { flex: none; }
.shell .pg-site .set-filter__opt {
  display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding: 0 10px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--app-ink-2); text-decoration: none;
  transition: background-color 0.15s var(--app-ease), color 0.15s var(--app-ease);
}
.shell .pg-site .set-filter__opt:hover { color: var(--app-ink); }
.shell .pg-site .set-filter__opt[aria-current="page"] { background: var(--app-surface); color: var(--app-ink); box-shadow: var(--app-lift); }
.shell .pg-site .set-quota { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.shell .pg-site .set-quota .ui-meter { flex: none; width: 120px; }
.shell .pg-site .set-quota__text { font-size: 12.5px; color: var(--app-ink-3); }
.shell .pg-site .set-quota__text b { font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--app-ink-2); font-variant-numeric: tabular-nums; }
.shell .pg-site .set-gsc { padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--app-hair); }

/* Adding a keyword or a page: the field and Add, and what Balzac can find itself. */
.shell .pg-site .set-add { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.shell .pg-site .set-add__form { display: flex; flex: 1 1 320px; gap: 8px; max-width: 520px; margin: 0; }
.shell .pg-site .set-add__form .ui-input { flex: 1; min-width: 0; }
.shell .pg-site .set-add__form .ui-input:disabled { background: var(--app-hover); cursor: not-allowed; }
.shell .pg-site .set-add__form .ui-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.shell .pg-site .set-add__more { flex: none; }

/* The keywords table: Your site's row look, with the numbers Balzac knows. */
.shell .pg-site .set-table { min-width: 0; overflow-x: auto; }
.shell .pg-site .set-kws { width: 100%; border-collapse: collapse; }
.shell .pg-site .set-kws thead th {
  padding: 10px 12px 8px 0; border-bottom: 1px solid var(--app-hair); text-align: left; white-space: nowrap;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-ink-3);
}
.shell .pg-site .set-kws thead th[title] { cursor: help; }
.shell .pg-site .set-kws .set-num { text-align: right; }
.shell .pg-site .set-kw-row > * { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--app-hair); vertical-align: middle; font-size: 13px; color: var(--app-ink-2); }
.shell .pg-site .set-kw-row > .set-num { font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shell .pg-site .set-kw-row__name { min-width: 160px; text-align: left; font-size: 14px; font-weight: 500; color: var(--app-ink); overflow-wrap: anywhere; }
.shell .pg-site .set-kw-row.is-off > * { color: var(--app-ink-3); }
.shell .pg-site .set-kw-row__actions { width: 1%; padding-right: 0; text-align: right; white-space: nowrap; }
.shell .pg-site .set-kw-row__actions .site-inline-form { vertical-align: middle; }
.shell .pg-site .set-kw-row__wait { font-family: var(--f-mono); font-size: 11px; color: var(--app-ink-3); }
.shell .pg-site .set-level { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.shell .pg-site .set-level i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--app-ink-3); }
.shell .pg-site .set-level--low i { background: var(--app-ok); }
.shell .pg-site .set-level--mid i { background: var(--app-amber); }
.shell .pg-site .set-level--high i { background: var(--app-hot); }
.shell .pg-site .set-kw-row .ui-btn--icon, .shell .pg-site .set-link .ui-btn--icon { color: var(--app-ink-3); }
.shell .pg-site .set-kw-row .ui-btn--icon:hover, .shell .pg-site .set-link .ui-btn--icon:hover { color: var(--app-hot); }

/* Internal links */
.shell .pg-site .set-links { margin: 0; padding: 0; list-style: none; }
.shell .pg-site .set-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--app-hair); }
.shell .pg-site .set-link__text { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.shell .pg-site .set-link__title { font-size: 14px; font-weight: 500; color: var(--app-ink); overflow-wrap: anywhere; }

/* Integrations: a row per platform (integrations/_card), its logo, what it
   is connected to and what can be done with it; and the setup to send to a
   web person. */
.shell .pg-site .set-ints { margin: 0; padding: 0; list-style: none; }
.shell .pg-site .set-int { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--app-hair); }
.shell .pg-site .set-int:last-child { border-bottom: 0; padding-bottom: 0; }
.shell .pg-site .set-int__logo { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--app-surface); box-shadow: 0 0 0 1px var(--app-hair); color: var(--app-ink-2); }
.shell .pg-site .set-int__logo img, .shell .pg-site .set-int__logo svg { display: block; width: 20px; height: 20px; margin: 0; }
/* Brand logos are drawn for a light ground (Wix's is black): their tile stays light. */
html.dark .shell .pg-site .set-int__logo { background: #f4f1ea; color: #16121c; box-shadow: none; }
.shell .pg-site .set-int__main { display: grid; gap: 3px; min-width: 0; }
.shell .pg-site .set-int__name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; }
.shell .pg-site .set-int__name > span { display: inline-flex; }
.shell .pg-site .set-int__title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--app-ink); overflow-wrap: anywhere; }
.shell .pg-site .set-int__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--app-ink-2); overflow-wrap: anywhere; }
.shell .pg-site .set-int__plugin { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--app-ink-3); }
.shell .pg-site .set-int__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.shell .pg-site .set-int__off:hover { color: var(--app-hot); }
.shell .pg-site .set-invite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; margin-top: 14px; }

/* A connection form (integrations/site/_form): the platform's fields, its
   switches, then Connect or Save. Webflow, Wix and GoHighLevel fill their
   lists as the key goes in (.set-lookup says so, or what went wrong). */
.shell .pg-site .set-back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -3px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--app-ink-2); text-decoration: none;
  transition: color 0.15s var(--app-ease);
}
.shell .pg-site .set-back:hover { color: var(--app-ink); }
.shell .pg-site .set-connect__head { justify-content: flex-start; align-items: center; gap: 8px 10px; }
.shell .pg-site .set-connect__head .set-int__logo { width: 32px; height: 32px; border-radius: 9px; }
.shell .pg-site .set-connect__head .set-int__logo img, .shell .pg-site .set-connect__head .set-int__logo svg { width: 18px; height: 18px; }
.shell .pg-site .set-connect__error { margin: 8px 0 0; max-width: 64ch; font-size: 13px; color: var(--app-hot); overflow-wrap: anywhere; }
.shell .pg-site .set-connect__value { font-size: 14px; color: var(--app-ink); overflow-wrap: anywhere; }
.shell .pg-site .set-form > .set-rules { max-width: 64ch; }
.shell .pg-site .set-form .ui-input:disabled { background-color: var(--app-hover); color: var(--app-ink-3); box-shadow: inset 0 0 0 1px var(--app-hair); cursor: not-allowed; }
.shell .pg-site .set-callout { display: grid; gap: 10px; max-width: 560px; padding: 16px; border-radius: 12px; background: var(--app-warm-wide); box-shadow: inset 0 0 0 1px var(--app-warm-wide-line); }
.shell .pg-site .set-callout__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.shell .pg-site .set-callout__text { flex: 1 1 220px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--app-ink-2); }
.shell .pg-site .set-callout__alert { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--app-ink); }
.shell .pg-site .set-or { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 4px 0 0; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-ink-3); }
.shell .pg-site .set-or::after { content: ''; flex: 1; height: 1px; background: var(--app-hair); }
.shell .pg-site .set-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; color: var(--app-ink-2); cursor: pointer; }
.shell .pg-site .set-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--app-ember); }
.shell .pg-site .set-rule__note { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--app-ink-3); }
.shell .pg-site .set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.shell .pg-site .set-lookups { display: grid; gap: 20px; min-width: 0; }
.shell .pg-site .set-lookup { display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--app-hover); font-size: 13px; line-height: 1.5; color: var(--app-ink-2); }
.shell .pg-site .set-lookup--error { display: grid; gap: 4px; background: color-mix(in srgb, var(--app-hot) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-hot) 22%, transparent); color: var(--app-ink); }
.shell .pg-site .set-lookup--error:empty { display: none; }
.shell .pg-site .set-lookup--error p { margin: 0; }
.shell .pg-site .set-lookup__spin { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--app-ember); border-right-color: transparent; animation: ui-spin 0.9s linear infinite; }
.shell .pg-site .set-mapping { display: grid; gap: 4px; max-width: 560px; padding: 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--app-hair); }
.shell .pg-site .set-mapping__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 10px; }
.shell .pg-site .set-mapping__req { color: var(--app-hot); }

/* Images: the kinds of cover as cards (the article page's New cover dialog
   draws the same choice), the chosen one open on its options. */
.shell .pg-site .set-covers__label { margin: 22px 0 0; }
.shell .pg-site .set-covers { display: grid; gap: 10px; margin-top: 8px; }
.shell .pg-site .set-cover { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--app-hair-2); transition: box-shadow 0.15s var(--app-ease), background-color 0.15s var(--app-ease); }
.shell .pg-site .set-cover.is-on { background: color-mix(in srgb, var(--app-amber) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--app-ember); }
.shell .pg-site .set-cover__pick {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; margin: 0; padding: 14px 16px;
  border: 0; border-radius: 12px; background: none; color: var(--app-ink); font: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.15s var(--app-ease);
}
.shell .pg-site .set-cover:not(.is-on) .set-cover__pick:hover { background: var(--app-hover); }
.shell .pg-site .set-cover.is-on .set-cover__pick { cursor: default; }
.shell .pg-site .set-cover__dot {
  flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: var(--app-surface); box-shadow: inset 0 0 0 1.5px var(--app-hair-2);
}
.shell .pg-site .set-cover.is-on .set-cover__dot { background: var(--app-sheen); box-shadow: none; }
.shell .pg-site .set-cover.is-on .set-cover__dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.shell .pg-site .set-cover__text { display: grid; gap: 2px; min-width: 0; }
.shell .pg-site .set-cover__name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.shell .pg-site .set-cover__hint { font-size: 13px; line-height: 1.45; color: var(--app-ink-2); }
.shell .pg-site .set-cover__more { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 24px; padding: 0 16px 16px 46px; }
.shell .pg-site .set-cover__preview {
  position: relative; flex: none; width: 240px; max-width: 100%; aspect-ratio: 1.91; overflow: hidden;
  border-radius: 10px; background: var(--app-hover); box-shadow: 0 0 0 1px var(--app-hair);
}
.shell .pg-site .set-preview__fill { position: absolute; inset: 0; }
.shell .pg-site .set-preview__shade { background: rgba(0, 0, 0, 0.15); }
.shell .pg-site .set-preview__title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-size: 14px; line-height: 1.3; }
.shell .pg-site .set-preview__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shell .pg-site .set-brand { display: grid; align-content: start; gap: 6px; }
.shell .pg-site .set-brand__row { display: flex; align-items: center; gap: 8px; }
.shell .pg-site .set-brand__swatch { position: relative; flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(22, 18, 28, 0.14); cursor: pointer; }
.shell .pg-site .set-brand__swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.shell .pg-site .set-brand__swatch:has(input:focus-visible) { outline: 2px solid var(--app-focus); outline-offset: 2px; }
.shell .pg-site .ui-input.set-brand__hex { width: 108px; font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; }
.shell .pg-site .set-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; width: 100%; }
.shell .pg-site .set-style { position: relative; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.3; color: var(--app-ink-2); cursor: pointer; }
.shell .pg-site .set-style input { position: absolute; opacity: 0; pointer-events: none; }
.shell .pg-site .set-style img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--app-hair); transition: box-shadow 0.15s var(--app-ease); }
.shell .pg-site .set-style:hover img { box-shadow: 0 0 0 1px var(--app-ink-3); }
.shell .pg-site .set-style:has(input:checked) img { box-shadow: 0 0 0 2px var(--app-ember); }
.shell .pg-site .set-style:has(input:checked) span { font-weight: 600; color: var(--app-ink); }
.shell .pg-site .set-style:has(input:focus-visible) img { outline: 2px solid var(--app-focus); outline-offset: 2px; }

/* ── Narrower windows: one column, the side cards side by side ── */
@media (max-width: 1279.98px) {
  .shell .pg-site .site-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .shell .pg-site .site-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
}

/* ── Phones and tablets (the shell's top bar shows the domain) ── */
@media (max-width: 1023.98px) {
  .shell .pg-site .site-head__fav { display: none; }
  .shell .pg-site .site-head__domain { display: none; }
  .shell .pg-site .site-head__page { display: inline; }
  .shell .pg-site .site-head__row { flex-wrap: wrap; gap: 6px 10px; }
  .shell .pg-site .site-visit { width: 44px; height: 44px; padding: 0; }
  .shell .pg-site .site-visit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .shell .pg-site .site-grid, .shell .pg-site .site-main { gap: 32px; }
  .shell .pg-site .ui-card--hero { padding: 16px; }
  .shell .pg-site .site-step__body.ui-warm { padding: 14px 14px 16px; }
  .shell .pg-site .site-step__actions .ui-btn--primary { height: 44px; }
  .shell .pg-site .site-step__actions .site-inline-form:has(.ui-btn--primary) { display: flex; width: 100%; }
  .shell .pg-site .site-step__actions .ui-btn--primary { width: 100%; }
  .shell .pg-site .ui-switch { height: 44px; padding-right: 14px; }
  .shell .pg-site .ui-switch--bare { height: auto; margin: -8px -6px; padding: 12px 6px; }
  .shell .pg-site .site-comp { height: 36px; }
  .shell .pg-site .site-comp__x { width: 30px; height: 30px; }
  .shell .pg-site .site-comp__x::after { inset: -7px; }
  .shell .pg-site .site-comp-add .ui-input { min-height: 44px; }
  .shell .pg-site .site-comp-add .ui-btn { height: 44px; }
  .shell .pg-site .site-setup summary { min-height: 44px; }
  .shell .pg-site .site-setup__form { grid-template-columns: minmax(0, 1fr); }
  .shell .pg-site .site-setup__form .ui-btn { height: 44px; }
  .shell .pg-site .site-adv__row { min-height: 44px; }
  .shell .pg-site .ui-input { min-height: 44px; font-size: 16px; }

  /* Settings pages: "‹ Your site" above the page's name. */
  .shell .pg-site .set-head__row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .shell .pg-site .set-crumb { max-width: 100%; }
  .shell .pg-site .set-head__row h1 { flex: 0 1 auto; }
  .shell .pg-site .set-crumb__up { position: relative; overflow: visible; margin-left: -4px; font-family: var(--f-body); font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--app-ink-2); }
  .shell .pg-site .set-crumb__up::after { content: ''; position: absolute; inset: -12px -8px; }
  .shell .pg-site .set-crumb__back { display: inline-flex; }
  .shell .pg-site .set-crumb__sep { display: none; }
  .shell .pg-site .set-fold > summary { min-height: 44px; }
  .shell .pg-site .ui-seg--count input { font-size: 16px; }
  .shell .pg-site .set-cover__more { padding-left: 16px; }
  .shell .pg-site .set-cover__preview { width: 100%; max-width: 360px; }
  .shell .pg-site .set-invite { grid-template-columns: minmax(0, 1fr); }
  .shell .pg-site .set-filter__opt { height: 36px; }
  .shell .pg-site .set-back { position: relative; }
  .shell .pg-site .set-back::after { content: ''; position: absolute; inset: -12px -8px; }
  .shell .pg-site .set-check { min-height: 44px; margin-top: 0; }
  .shell .pg-site .set-callout__row .ui-btn { width: 100%; }
}

@media (max-width: 719.98px) {
  .shell .pg-site .site-side { grid-template-columns: minmax(0, 1fr); }
  .shell .pg-site .set-col--wide { display: none; }
  /* Integrations: the actions under the row's text. */
  .shell .pg-site .set-int { grid-template-columns: 36px minmax(0, 1fr); align-items: start; row-gap: 10px; }
  .shell .pg-site .set-int__actions { grid-column: 2; justify-content: flex-start; }
  .shell .pg-site .set-mapping__grid { grid-template-columns: minmax(0, 1fr); }
  .shell .pg-site .set-kw-row__name { min-width: 0; }
  .shell .pg-site .site-about { grid-template-columns: minmax(0, 1fr); }
  .shell .pg-site .site-step { column-gap: 12px; }

  .shell .pg-site .site-query--head { display: none; }
  .shell .pg-site .site-query {
    grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "text text text" "spark clicks pos";
    row-gap: 6px; column-gap: 16px;
  }
  .shell .pg-site .site-query__text { grid-area: text; }
  .shell .pg-site .site-query__spark { grid-area: spark; }
  .shell .pg-site .site-query__n[data-label="Clicks"] { grid-area: clicks; }
  .shell .pg-site .site-query__n[data-label="Pos."] { grid-area: pos; }
  .shell .pg-site .site-query__n[data-label="Impr."] { display: none; }
  .shell .pg-site .site-query__n::before { content: attr(data-label) " "; color: var(--app-ink-3); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; }
}

@media (prefers-reduced-motion: reduce) {
  .shell .pg-site *, .shell .pg-site *::before, .shell .pg-site *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
