/* Dashboard — same tokens as the site, denser layout (brief: dark sidebar, white panels). */
.app {
  background: #f7f8fa;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  color: #d6d9de;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 18px;
}
.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
}
.side-logo {
  color: #fff;
}
.side-logo .mark {
  color: #fff;
}
.side-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #1a1c20;
  color: #b8bcc4;
}
.side-nav {
  display: grid;
  gap: 2px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 15px;
  color: #c4c8cf;
  transition: background 0.15s, color 0.15s;
}
.side-nav a svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.side-nav a:hover {
  background: #17191c;
  color: #fff;
}
.side-nav a.on {
  background: #202227;
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.side-bottom {
  margin-top: auto;
  display: grid;
  gap: 14px;
}
.side-partner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border: 1px solid #2b2e34;
  border-radius: 16px;
  font-size: 14px;
  color: #e4e7eb;
}
.side-partner:hover {
  border-color: #474b53;
}
.side-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 6px;
}
.side-who {
  min-width: 0;
  flex: 1;
}
.side-who b,
.side-who small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-out {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #2b2e34;
  background: none;
  color: #c4c8cf;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.side-out:hover {
  color: #fff;
  border-color: #474b53;
}
.side-user b {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.side-user small {
  color: #959aa3;
  font-size: 12px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #363a41;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.side-toggle {
  display: none;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.25s;
  }
  .side.open {
    transform: none;
    box-shadow: 0 0 0 100vmax rgba(7, 6, 7, 0.35);
  }
  .side-toggle {
    display: inline-flex;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 55;
  }
}

/* ---------- main ---------- */
.main {
  min-width: 0;
}
.loading {
  padding: 40px;
}
.page-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 22px clamp(16px, 3vw, 36px) 0;
}
.crumbs {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--mute);
}
.crumbs a:hover {
  color: var(--ink);
}
.title-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}
.title-row h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  overflow-wrap: anywhere;
}
.title-row .tag {
  margin-top: 6px;
}
.title-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.site-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mute);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.site-url:hover {
  color: var(--accent);
}
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs button {
  background: none;
  border: 0;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button.on {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.body {
  padding: 20px clamp(16px, 3vw, 36px) 48px;
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}
@media (max-width: 1180px) {
  .cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- panels ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 24px;
  min-width: 0;
}
.panel-h {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.panel-h > svg {
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 1px;
}
.panel-h h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.panel-h p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--mute);
}
.panel-h .right {
  margin-left: auto;
}
.indent {
  padding-left: 40px;
}
@media (max-width: 600px) {
  .indent {
    padding-left: 0;
  }
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}
.kv small {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
}
.kv b {
  display: block;
  font-size: 20px;
  margin-top: 2px;
}
.kv .note {
  font-size: 13px;
  color: var(--mute);
}
.plan-line {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* segmented control */
.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.seg button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-2);
}
.seg button.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.model-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #f1f4ff;
  border-radius: 18px;
  padding: 16px 18px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.model-box .ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid #d9e1ff;
}
.model-box .ico svg {
  width: 24px;
  height: 24px;
}
.model-box b {
  font-size: 16px;
}
.model-box p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
.model-box > div {
  flex: 1;
  min-width: 200px;
}
.info {
  display: flex;
  gap: 12px;
  background: #f1f4ff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.info svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: none;
  margin-top: 1px;
}

/* radios */
.radios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.radio {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 2px 10px;
  cursor: pointer;
}
.radio input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 50%;
  border: 1.5px solid #b4b8c0;
  grid-row: span 2;
  cursor: pointer;
}
.radio input:checked {
  border: 6px solid var(--accent);
}
.radio b {
  font-weight: 600;
}
.radio span {
  font-size: 13.5px;
  color: var(--mute);
}
@media (max-width: 700px) {
  .radios {
    grid-template-columns: 1fr;
  }
}

/* toggles */
.toggles {
  display: grid;
}
.trow {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.trow:first-child {
  border-top: 0;
}
.trow svg {
  width: 22px;
  height: 22px;
  color: var(--ink-2);
}
.trow b {
  font-weight: 600;
  display: block;
}
.trow span {
  font-size: 13.5px;
  color: var(--mute);
}
.switch {
  appearance: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cdd1d8;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  margin: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(7, 6, 7, 0.2);
}
.switch:checked {
  background: var(--accent);
}
.switch:checked::after {
  transform: translateX(20px);
}

/* preview */
.preview-panel {
  position: sticky;
  top: 16px;
}
.ptabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.ptabs button {
  border: 0;
  background: none;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
}
.ptabs button.on {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.frame-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.frame-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  background: #fff;
  transform-origin: 0 0;
}
.frame-wrap.mobile {
  width: 250px;
  margin: 0 auto;
  border-radius: 30px;
  border: 7px solid var(--ink);
}
.models-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.mpick {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
  text-align: center;
  font-size: 12.5px;
  position: relative;
  display: grid;
  gap: 8px;
}
.mpick:hover {
  border-color: var(--line-2);
}
.mpick.on {
  border: 2px solid var(--accent);
  padding: 7px;
}
.mpick.on::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.mthumb {
  height: 64px;
  border-radius: 8px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.mthumb i {
  position: absolute;
  border-radius: 4px;
  background: #e3e6eb;
}
.mthumb .w {
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.mthumb .a {
  background: var(--accent);
}
.mthumb .h {
  background: rgba(47, 91, 255, 0.15);
  box-shadow: 0 0 0 1px rgba(47, 91, 255, 0.5);
}
.sub-h {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 6px;
}
.ilist {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.ilist button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.ilist button:first-child {
  border-top: 0;
}
.ilist button:hover {
  background: var(--paper);
}
.ilist svg {
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}

/* overview */
.ov-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1000px) {
  .ov-grid {
    grid-template-columns: 1fr;
  }
}
.swatches-sm {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.swatches-sm i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 14px 0 0;
  font-size: 14px;
}
.facts dt {
  color: var(--mute);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.brand-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 14px;
}
.brand-row img {
  max-height: 34px;
  max-width: 150px;
  object-fit: contain;
}
.cards-edit {
  display: grid;
  gap: 10px;
}
.cedit {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}
.cedit .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.cedit .fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.cedit .row2 {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
}
@media (max-width: 640px) {
  .cedit {
    grid-template-columns: 1fr;
  }
  .cedit .row2 {
    grid-template-columns: 1fr;
  }
}
.field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  background: var(--white);
  resize: vertical;
}
.field:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.title {
  font-weight: 600;
}
.target {
  font-size: 12.5px;
  color: var(--mute);
  display: flex;
  gap: 8px;
  align-items: center;
}
.target select {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
  font-size: 12.5px;
  min-width: 0;
  flex: 1;
}
.cedit .acts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--ink-2);
}
.icon-btn:hover {
  border-color: var(--line-2);
  color: var(--ink);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
@media (max-width: 640px) {
  .cedit .acts {
    flex-direction: row;
  }
}

/* analytics */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
}
.kpi span {
  font-size: 13px;
  color: var(--mute);
}
.kpi b {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 108%;
  font-size: 34px;
  letter-spacing: -0.03em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.chart {
  position: relative;
  height: 220px;
  display: grid;
  grid-template-columns: 34px 1fr;
}
.chart-y {
  position: relative;
  font-size: 11px;
  color: var(--mute);
}
.chart-y span {
  position: absolute;
  right: 8px;
  translate: 0 50%;
}
.chart-plot {
  position: relative;
  border-bottom: 1px solid var(--line-2);
}
.chart-plot .grid {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--line);
}
.bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: default;
  position: relative;
}
.bar i {
  display: block;
  width: min(70%, 28px);
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 0;
}
.bar:hover i {
  background: #1f47e6;
}
.bar:hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(47, 91, 255, 0.06);
  border-radius: 6px;
}
.chart-x {
  grid-column: 2;
  display: flex;
  gap: 2px;
  font-size: 11px;
  color: var(--mute);
  margin-top: 6px;
}
.chart-x span {
  flex: 1;
  text-align: center;
}
.tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  border-radius: 10px;
  padding: 8px 10px;
  white-space: nowrap;
  z-index: 5;
  translate: -50% -110%;
}
.tip b {
  font-weight: 700;
}
.hbars {
  display: grid;
  gap: 10px;
}
.hbar {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr 44px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}
.hbar .lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbar .track {
  height: 12px;
  border-radius: 0 4px 4px 0;
  background: var(--paper);
  overflow: hidden;
}
.hbar .track i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.hbar .val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.table-toggle {
  font-size: 13px;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.dtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.dtable th,
.dtable td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.dtable td:last-child,
.dtable th:last-child {
  text-align: right;
}

/* integrations / code */
.code {
  font: 13px/1.6 var(--f-mono);
  background: var(--ink);
  color: #e9e7e2;
  border-radius: 16px;
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre;
}
.code-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.int {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 6px;
}
.int b {
  font-size: 15px;
}
.int span {
  font-size: 13.5px;
  color: var(--mute);
}
button.int {
  font: inherit;
  color: inherit;
  text-align: left;
  background: #fff;
  cursor: pointer;
  align-content: start;
  transition: border-color 0.15s, box-shadow 0.15s;
}
button.int:hover {
  border-color: var(--accent);
}
button.int:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.int.on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
button.int.on b {
  color: var(--accent);
}
.int-detail {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  background: #f4f5f7;
  display: grid;
  gap: 14px;
}
.int-detail h3 {
  margin: 0;
  font-size: 17px;
}
.int-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.5;
}
.int-paste {
  display: grid;
  gap: 8px;
}
.int-paste-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}
.int-dl {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.int-small {
  font-size: 13px;
  margin: 0;
}

/* plans */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.plan {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 6px;
}
.plan.on {
  border: 2px solid var(--accent);
  padding: 19px;
}
.plan b.p {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 108%;
  font-size: 30px;
  letter-spacing: -0.03em;
}

/* logs */
.logs {
  list-style: none;
  margin: 0;
  padding: 0;
  font: 13px/1.5 var(--f-mono);
}
.logs li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.logs time {
  color: var(--mute);
}
@media (max-width: 600px) {
  .logs li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* sites list */
.sites-head {
  padding: 32px clamp(16px, 3vw, 36px) 8px;
}
.sites-head h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 110%;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.sites-head .urlbox {
  max-width: 640px;
}
.site-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.site-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  display: grid;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.site-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.site-card b {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.site-card span {
  font-size: 13px;
  color: var(--mute);
  overflow-wrap: anywhere;
}
.empty {
  background: var(--white);
  border: 1.5px dotted var(--ink);
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
  color: var(--ink-2);
}
.progress {
  margin-top: 12px;
  font: 13px var(--f-mono);
  color: var(--mute);
}
.err {
  color: #a33a0b;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -50% 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 80;
  box-shadow: 0 12px 30px rgba(7, 6, 7, 0.25);
}
.dirty {
  position: relative;
}
.dirty::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #fff;
}

/* long names/emails must not push the sidebar's bottom block past its edge */
.side-bottom {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.side-user {
  min-width: 0;
}

/* ---------- editor ---------- */
.ed { display: grid; gap: 0; }
.ed-row { display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.4fr); gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ed-row:first-child { border-top: 0; padding-top: 4px; }
.ed-row b { display: block; font-size: 14.5px; font-weight: 600; }
.ed-row span { display: block; margin-top: 2px; color: var(--mute); font-size: 12.5px; line-height: 1.4; }
.ed-ctl { min-width: 0; display: flex; justify-content: flex-end; }
.ed-ctl .seg button { padding: 7px 14px; font-size: 13.5px; }
.ed-color { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ed-color input[type='color'] { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: none; cursor: pointer; }
.ed-color input[type='color']::-webkit-color-swatch-wrapper { padding: 3px; }
.ed-color input[type='color']::-webkit-color-swatch { border: 0; border-radius: 9px; }
.ed-hex { width: 96px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; font: 500 13px var(--f-mono); text-transform: uppercase; }
.ed-sw { display: flex; gap: 6px; }
.ed-sw button { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); transition: transform 0.15s; }
.ed-sw button:hover { transform: scale(1.12); }
.ed-sw button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.ed-range { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 300px; }
.ed-range input { flex: 1; accent-color: var(--accent); }
.ed-range output { min-width: 44px; text-align: right; font: 500 13px var(--f-mono); color: var(--ink-2); }
.ed-in { width: 100%; max-width: 340px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; font: 14px/1.4 var(--f-body); color: var(--ink); background: #fff; resize: vertical; }
.ed-in:focus, .ed-hex:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.ed-in.mono { font-family: var(--f-mono); font-size: 13px; }
.ed .radios { margin-bottom: 6px; }

/* publish state in the site header */
.pubstate { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--mute); margin-right: 4px; }
.pubstate::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.pubstate.pending::before { background: #f59e0b; }
.title-actions [data-publish]:disabled { opacity: 0.45; cursor: default; }

/* ---------- pages ---------- */
.pg-list { display: grid; margin-top: 6px; }
.pg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.pg-row:first-child { border-top: 0; }
.pg-main { min-width: 0; }
.pg-path { font: 600 15px var(--f-mono); color: var(--ink); margin-right: 10px; text-decoration: none; word-break: break-all; }
.pg-path:hover { color: var(--accent); }
.pg-main p { margin: 4px 0 2px; color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-main small { color: var(--mute); font-size: 12.5px; }
.pg-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pg-cards { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 8px; padding: 14px; border-radius: 18px; background: var(--paper); }
.pg-row.open { background: linear-gradient(var(--bg), var(--bg)); }
.pg-empty { padding: 28px 0 8px; color: var(--mute); }
.tag-warn { background: #fff4e0; color: #9a5b00; }
@media (max-width: 900px) { .pg-row { grid-template-columns: 1fr; } .pg-acts { justify-content: flex-start; } }

/* ---------- goals & impact ---------- */
.goals { display: grid; gap: 10px; padding-bottom: 14px; }
.goal { display: grid; grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1.2fr) auto; gap: 8px; align-items: center; }
.goal .ed-in { max-width: none; }
.goal-acts { display: flex; gap: 8px; }
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 14px; }
.ibox { padding: 16px 18px; border-radius: 18px; background: var(--paper); display: grid; gap: 4px; }
.ibox.on { background: var(--accent-soft); }
.ibox span { font-size: 13px; color: var(--ink-2); }
.ibox b { font: 800 30px/1.1 var(--f-display); letter-spacing: -0.02em; }
.ibox small { color: var(--mute); font-size: 12.5px; }
.impact { margin-bottom: 18px; }
.impact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar i { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--w), var(--paper) var(--w)); }
.hbar b { font-weight: 600; min-width: 28px; text-align: right; }
.hbar .mono { font-family: var(--f-mono); font-size: 12.5px; }
@media (max-width: 900px) { .goal { grid-template-columns: 1fr 1fr; } .impact-grid, .impact-cols { grid-template-columns: 1fr; } }
/* the site-wide .mono label style is uppercase; typed values and paths must show as they are */
.ed-in.mono, .hbar .mono, .goal .mono { text-transform: none; letter-spacing: normal; }
.install-state.ok { background: #effaf3; border-color: #bfe8cd; }
.install-state .panel-h { align-items: center; }
.install-state .right { margin-left: auto; }

/* ---------- account settings ---------- */
.ac { display: grid; gap: 14px; max-width: 980px; }
.ac-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.ac-row:first-child { border-top: 0; padding-top: 4px; }
.ac-l b { display: block; font-size: 15px; font-weight: 600; }
.ac-l span { display: block; margin-top: 2px; color: var(--mute); font-size: 13px; }
.ac-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ac-val { font-size: 14px; color: var(--ink-2); }
.ac-more { grid-column: 1 / -1; padding: 14px; border-radius: 16px; background: var(--paper); }
.ac-inline { display: flex; gap: 8px; }
.ac-inline .ed-in { width: 240px; }
.ac-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-form .ed-in { flex: 1 1 200px; max-width: 280px; }
.ac-col { grid-template-columns: 1fr; }
.ac-devices { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; gap: 8px; }
.ac-devices li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--paper); }
.ac-devices li b { margin-right: 8px; font-size: 14.5px; }
.ac-devices small { display: block; margin-top: 2px; color: var(--mute); }
.ac-dev { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; }
.ac-dev svg { width: 20px; height: 20px; }
.btn.danger { color: #c62828; border-color: rgba(198, 40, 40, 0.35); }
.btn.danger:hover { background: #fdecec; }
.danger-fill { background: #c62828; color: #fff; border: 0; }
.danger-fill:hover { background: #a61f1f; }
.ac-danger { border-color: rgba(198, 40, 40, 0.25); }
.tfa { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.tfa-qr svg { width: 180px; height: 180px; display: block; border-radius: 14px; background: #fff; padding: 8px; }
.tfa-steps p { margin: 0 0 10px; font-size: 14px; }
.tfa-steps code { font-family: var(--f-mono); background: #fff; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.tfa-codes { margin: 12px 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.tfa-codes code { display: block; padding: 8px 10px; border-radius: 10px; background: #fff; font: 14px var(--f-mono); text-align: center; }
.tfa-done p { margin: 0 0 6px; font-size: 14px; }
@media (max-width: 700px) {
  .ac-row { grid-template-columns: 1fr; }
  .ac-r { justify-content: flex-start; }
  .ac-inline { flex-wrap: wrap; }
  .tfa { grid-template-columns: 1fr; }
}

/* ---------- editor studio: the stage with the real widget, controls under it ---------- */
.studio { display: grid; gap: 14px; }
.studio-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.studio-bar .seg button { padding: 7px 16px; font-size: 13.5px; }
.studio-pv { margin-left: auto; }
.studio-pv svg { width: 16px; height: 16px; }
/* Desktop and Mobile share one stage height: --stage-h, from the phone's zoom --k */
.stage { --checker: #e9ebf0; --k: 0.7; --stage-h: calc(876px * var(--k) + 64px); box-sizing: border-box; height: var(--stage-h); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fbfbfc; box-shadow: 0 24px 60px -36px rgba(10, 20, 50, 0.35); }
.stage-chrome { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fff; }
.stage-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #e3e5ea; }
.stage-chrome span { margin: 0 auto; padding: 4px 14px; border-radius: 999px; background: var(--paper); font: 12px var(--f-mono); color: var(--mute); transform: translateX(-24px); }
.stage-screen { position: relative; height: calc(var(--stage-h) - 40px); } /* minus the 38px browser bar and the border */
.stage-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* mobile: a phone standing on the same checkered canvas */
.stage.mobile .stage-chrome { display: none; }
/* a real iPhone-size screen (393 × 852) in a real-proportion body, scaled down as a whole: --k is the zoom */
.stage.mobile { display: grid; justify-items: center; padding-top: 30px; background-color: #fbfbfc; background-image: linear-gradient(var(--checker) 1px, transparent 1px), linear-gradient(90deg, var(--checker) 1px, transparent 1px); background-size: 24px 24px; }
@media (max-height: 820px) { .stage { --k: 0.6; } }
/* the phone: titanium band, black bezel, Dynamic Island, status bar, side buttons, home indicator */
.device { position: relative; }
.dbtn, .phone-bar, .phone-home { display: none; }
.stage.mobile .device { width: 417px; height: 876px; flex: none; padding: 12px; border-radius: 66px; transform: scale(var(--k)); transform-origin: top center; background: linear-gradient(135deg, #4a4e57 0%, #1c1e23 22%, #2c2f36 50%, #17191d 78%, #43464e 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18), inset 0 0 0 5px #0b0c0f, 0 50px 90px -40px rgba(10, 20, 50, 0.6), 0 18px 30px -18px rgba(10, 20, 50, 0.35); }
.stage.mobile .stage-screen { width: 393px; height: 852px; border-radius: 55px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px #000; }
.stage.mobile .stage-screen iframe { top: 54px; height: calc(100% - 54px); }
.stage.mobile .dbtn { display: block; position: absolute; width: 5px; border-radius: 3px; background: linear-gradient(90deg, #2a2d33, #50545c 60%, #2a2d33); }
.stage.mobile .dbtn.d-action { left: -4px; top: 150px; height: 34px; }
.stage.mobile .dbtn.d-up { left: -4px; top: 222px; height: 64px; }
.stage.mobile .dbtn.d-down { left: -4px; top: 300px; height: 64px; }
.stage.mobile .dbtn.d-power { right: -4px; top: 250px; height: 104px; }
.stage.mobile .phone-bar { display: flex; align-items: center; justify-content: space-between; position: absolute; inset: 0 0 auto; height: 54px; padding: 6px 34px 0 40px; background: #fff; color: #0a0b0d; z-index: 2; font: 600 17px/1 -apple-system, 'SF Pro Text', var(--f-body); }
.phone-bar .island { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; translate: -50% 0; border-radius: 20px; background: #000; }
.phone-bar .island::after { content: ''; position: absolute; right: 13px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3a63, #0b0f1c 60%); }
.phone-ic { display: inline-flex; align-items: center; gap: 6px; }
.phone-ic svg { fill: currentColor; }
.batt { position: relative; width: 25px; height: 12px; border: 1.5px solid rgba(10, 11, 13, 0.4); border-radius: 4px; padding: 1.5px; }
.batt::after { content: ''; position: absolute; right: -4px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: rgba(10, 11, 13, 0.4); }
.batt i { display: block; width: 78%; height: 100%; border-radius: 2px; background: #0a0b0d; }
.stage.mobile .phone-home { display: block; position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; translate: -50% 0; border-radius: 3px; background: #0a0b0d; z-index: 3; pointer-events: none; }
.stage-note { margin: -4px 2px 0; font-size: 13px; color: var(--mute); }
.studio-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; padding: 5px; border-radius: 999px; background: var(--paper); width: fit-content; max-width: 100%; }
.studio-tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 18px; border-radius: 999px; font: 500 14px var(--f-body); color: var(--ink-2); cursor: pointer; }
.studio-tabs button svg { width: 16px; height: 16px; }
.studio-tabs button.on { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(10, 20, 50, 0.12); }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: stretch; }
.studio-grid .ed-row { grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.6fr); }
.ed-h { margin: 0 0 6px; font: 600 15px var(--f-body); }
.ed-sub { margin: -2px 0 14px; color: var(--mute); font-size: 13.5px; }
.ed-foot { margin: 12px 0 0; font-size: 13px; color: var(--mute); }
.ed-foot a { color: var(--accent); }
.ed-row[data-shows] { cursor: default; }
@media (max-width: 700px) {
  .studio-pv { margin-left: 0; }
  .stage { --k: 0.58; }
  .studio-grid { grid-template-columns: 1fr; }
}

/* the full preview on the client's page, as an extra */
.pv-dialog { width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 22px 24px; border: 0; border-radius: var(--r-md); box-shadow: 0 40px 100px -30px rgba(10, 20, 50, 0.5); }
.pv-dialog::backdrop { background: rgba(10, 14, 22, 0.45); }
.pv-head { display: flex; align-items: start; gap: 12px; margin-bottom: 12px; }
.pv-head > div { flex: 1; }
.pv-head h2 { margin: 0; font-size: 18px; }
.pv-head p { margin: 2px 0 0; color: var(--mute); font-size: 14px; }
.pv-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.pv-demo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pv-demo svg { width: 16px; height: 16px; }

/* ---------- help: popular questions + support chat ---------- */
.help { display: grid; gap: 14px; }
.help .chat { width: min(680px, 100%); justify-self: center; }
.faq-list { display: grid; margin-top: 4px; }
.faq { border-top: 1px solid var(--line); }
.faq:first-child { border-top: 0; }
.faq summary { display: flex; align-items: center; gap: 16px; padding: 16px 0; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); position: relative; transition: transform 0.25s, background 0.2s; }
.faq summary i::before, .faq summary i::after { content: ''; position: absolute; left: 8px; right: 8px; top: 12px; height: 2px; border-radius: 2px; background: var(--ink-2); }
.faq summary i::after { transform: rotate(90deg); transition: transform 0.25s; }
.faq[open] summary i { background: var(--accent-soft); }
.faq[open] summary i::after { transform: rotate(0deg); }
.faq p { margin: -4px 42px 18px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.chat .panel-h { align-items: center; }
.chat .panel-h .btn svg { width: 15px; height: 15px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; min-height: 180px; overflow-y: auto; padding: 16px; border-radius: var(--r-sm); background: var(--paper); }
.msg { max-width: min(560px, 85%); align-self: flex-start; }
.msg .who { display: block; font: 11px var(--f-mono); color: var(--mute); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 4px 4px; }
.msg p { margin: 0; padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: #fff; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; box-shadow: 0 1px 2px rgba(10, 20, 50, 0.06); }
.msg.me { align-self: flex-end; }
.msg.me .who { text-align: right; margin: 0 4px 4px 0; }
.msg.me p { background: var(--accent); color: #fff; border-radius: 18px 18px 6px 18px; }
.msg.typing p { color: var(--mute); animation: chat-dots 1s ease-in-out infinite alternate; }
.msg.ok p { background: var(--green-soft); }
.msg-act { margin-top: 8px; }
@keyframes chat-dots { to { opacity: 0.4; } }
.chat-sugg { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chat-sugg button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 14px; font: 13.5px var(--f-body); color: var(--ink-2); cursor: pointer; }
.chat-sugg button:hover { border-color: var(--accent); color: var(--accent); }
.chat-in { display: flex; gap: 10px; align-items: end; margin-top: 12px; }
.chat-in textarea, .handoff textarea { flex: 1; width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 16px; font: 14.5px/1.45 var(--f-body); resize: vertical; min-height: 44px; }
.chat-in textarea:focus, .handoff textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.handoff { display: grid; gap: 8px; margin-top: 12px; padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.handoff > span { color: var(--mute); font-size: 13.5px; }
.handoff-row { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 600px) {
  .chat .panel-h { flex-wrap: wrap; }
  .chat .panel-h .right { margin-left: 0; }
}
.chat-in[hidden], .chat-sugg[hidden], .handoff[hidden] { display: none; }
/* narrow control cards: label above its control */
.studio-grid .ed-row { grid-template-columns: 1fr; gap: 10px; }
.studio-grid .ed-ctl, .studio-grid .ed-color { justify-content: flex-start; }
.studio-grid .ed-range { max-width: none; }
.studio-grid .ed-in { max-width: none; }

/* ---------- team ---------- */
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; max-width: 620px; }
.role-pick button { display: grid; gap: 3px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff; font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.role-pick button b { font-size: 15px; }
.role-pick button span { font-size: 13px; color: var(--mute); }
.role-pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.invite-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding: 14px; border: 1px dashed var(--accent); border-radius: var(--r-sm); background: #f8faff; max-width: 720px; }
.invite-link input { flex: 1; min-width: 220px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font: 13px var(--f-mono); background: #fff; }
.invite-link p { flex-basis: 100%; margin: 2px 0 0; font-size: 13px; color: var(--mute); }
.member .mem { display: flex; align-items: center; gap: 12px; }
.member .mem small { font-weight: 400; color: var(--mute); }
.avatar.sm { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 600 13px var(--f-body); }
.ac-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.role-sel { width: auto; padding: 7px 10px; }
.tag.role-owner { background: var(--ink); color: #fff; }
.tag.role-editor { background: var(--accent-soft); color: var(--accent); }
.tag.role-viewer { background: var(--paper-2); color: var(--ink-2); }
.btn.danger { border-color: #e11d48; color: #e11d48; }
.join-card { max-width: 520px; margin: 8vh auto 0; padding: 36px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.join-card h1 { margin: 12px 0 8px; font: 800 30px/1.1 var(--f-display); }
.join-card p { line-height: 1.7; }
.join-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.join-mark svg { width: 26px; height: 26px; }
.join-row { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
/* view-only members: everything readable, nothing editable */
.viewonly-note { margin-top: 12px; }
.viewonly [data-body] .panel :is(input, select, textarea, button, .seg, [data-reanalyze]) { pointer-events: none; opacity: 0.55; }
.viewonly [data-body] [data-reanalyze] { display: none; }

/* sidebar plan button + plans dialog */
button.side-partner { width: 100%; background: none; font: inherit; color: #e4e7eb; cursor: pointer; text-align: left; }
.side-partner b { color: #fff; }
.side-plan-go { font-size: 12.5px; color: #9aa0aa; }
.side-partner:hover .side-plan-go { color: #fff; }
.plans-dialog { width: min(980px, calc(100vw - 32px)); }
.plan-f { margin: 10px 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.plan-f li { display: flex; gap: 8px; }
.plan-f li::before { content: '\2713'; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: auto; }
.plan { display: flex; flex-direction: column; align-items: flex-start; }

/* dialogs sit in the middle of the white work area, not of the whole window (the sidebar is 248px) */
@media (min-width: 901px) {
  .pv-dialog { translate: 124px 0; max-width: calc(100vw - 248px - 32px); }
}

/* ---------- site report ---------- */
.rp-empty-in {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 28px 8px;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.rp-empty-in > svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
}
.rp-empty-in h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.rp-empty-in p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.rp-head {
  display: flex;
  gap: 24px;
  align-items: center;
}
.rp-head-txt {
  flex: 1;
  min-width: 0;
}
.rp-head-txt h2 {
  margin: 4px 0 6px;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.rp-head-txt p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 760px;
}
.rp-eyebrow {
  font: 12px/1 var(--f-mono);
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 13px;
  color: var(--mute);
}
.rp-trend {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rp-trend polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.rp-trend .up {
  color: var(--green);
}
.rp-trend .down {
  color: #d23c2a;
}
.rp-rerun {
  align-self: flex-start;
}
.rp-ring {
  --c: var(--mute);
  position: relative;
  width: var(--s);
  height: var(--s);
  flex: none;
}
.rp-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.rp-ring circle {
  fill: none;
  stroke-width: 10;
}
.rp-track {
  stroke: var(--paper-2);
}
.rp-val {
  stroke: var(--c);
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}
.rp-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 40px/1 var(--f-display);
  letter-spacing: -0.03em;
}
.rp-good,
.rp-score.rp-good,
.rp-m.rp-good {
  --c: var(--green);
}
.rp-ok,
.rp-score.rp-ok,
.rp-m.rp-ok {
  --c: #d98a00;
}
.rp-bad,
.rp-score.rp-bad,
.rp-m.rp-bad {
  --c: #d23c2a;
}
.rp-scores {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.rp-score {
  --c: var(--mute);
  font: inherit;
  color: inherit;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rp-score:hover {
  border-color: var(--line-2);
}
.rp-score.on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.rp-score:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rp-score span {
  font-size: 14px;
  font-weight: 600;
}
.rp-score b {
  font: 800 30px/1 var(--f-display);
  letter-spacing: -0.02em;
  color: var(--c);
}
.rp-score small {
  font-size: 12.5px;
  color: var(--mute);
}
.rp-bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--paper-2);
  overflow: hidden;
}
.rp-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--c);
}
.rp-list {
  display: grid;
  gap: 8px;
}
.rp-f {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.rp-f summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.rp-f summary::-webkit-details-marker {
  display: none;
}
.rp-f summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--mute);
  border-bottom: 2px solid var(--mute);
  transform: rotate(45deg);
  margin: -4px 4px 0 0;
  flex: none;
  transition: transform 0.15s;
}
.rp-f[open] summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.rp-pill {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.rp-sev-high .rp-pill {
  background: #fde8e5;
  color: #b42d1d;
}
.rp-sev-medium .rp-pill {
  background: #fff1d6;
  color: #8a5a00;
}
.rp-sev-low .rp-pill {
  background: var(--paper);
  color: var(--ink-2);
}
.rp-ftitle {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14.5px;
}
.rp-area {
  font-size: 12.5px;
  color: var(--mute);
  white-space: nowrap;
}
.rp-fbody {
  padding: 0 14px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.rp-fbody p {
  margin: 0 0 8px;
}
.rp-fix {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
}
.rp-ex {
  margin: 8px 0 0;
  padding-left: 18px;
  font: 12.5px/1.6 var(--f-mono);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.rp-wins {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  line-height: 1.5;
}
.rp-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.rp-m {
  --c: var(--ink);
  background: var(--paper);
  border-radius: 14px;
  padding: 12px 14px;
}
.rp-m small {
  display: block;
  font-size: 12.5px;
  color: var(--mute);
}
.rp-m b {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  color: var(--c);
}
.linkbtn {
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.rp-running {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.rp-running h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.rp-spin {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: rp-spin 0.9s linear infinite;
}
@keyframes rp-spin {
  to {
    transform: rotate(360deg);
  }
}
.rp-steps {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.rp-steps .done {
  color: var(--mute);
}
.rp-steps .now {
  font-weight: 600;
}
@media (max-width: 1100px) {
  .rp-scores {
    grid-template-columns: repeat(3, 1fr);
  }
  .rp-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .rp-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .rp-scores {
    grid-template-columns: repeat(2, 1fr);
  }
  .rp-area {
    display: none;
  }
  .rp-f summary {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rp-spin {
    animation-duration: 3s;
  }
  .rp-val {
    transition: none;
  }
}
