/* The brand mark: the claimed logo, or the brand's initials on its color. */
.brand-logo,
.brand-monogram {
  border-radius: 10px;
  flex: none;
  object-fit: contain;
}
.brand-logo.sm,
.brand-monogram.sm {
  width: 34px;
  height: 34px;
}
.brand-logo.md,
.brand-monogram.md {
  width: 40px;
  height: 40px;
}
.brand-logo.lg,
.brand-monogram.lg {
  width: 64px;
  height: 64px;
}
.brand-logo {
  background: white;
}
.brand-monogram {
  display: inline-grid;
  place-items: center;
  background: var(--coral);
  color: white;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.brand-monogram.lg {
  font-size: 22px;
}

/* Claiming the brand: the owner's first screen. */
.claim-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 40px;
  padding: 56px clamp(20px, 5vw, 72px);
  align-items: start;
  background: linear-gradient(160deg, #f6f7fb, #eef0f6);
}
.claim-product {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  font-size: 16px;
}
.claim-intro h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  margin: 14px 0 16px;
}
.claim-intro p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 440px;
}
.claim-form .form {
  grid-template-columns: 1fr 1fr;
}
.claim-form input[type="color"] {
  height: 42px;
  padding: 4px;
}
@media (max-width: 860px) {
  .claim-shell {
    grid-template-columns: 1fr;
  }
}

/* The client portal. */
.portal {
  min-height: 100vh;
  background: #f6f7fa;
}
.portal-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: white;
  border-bottom: 1px solid var(--line);
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portal-brand strong {
  display: block;
  font-size: 16px;
}
.portal-brand small {
  color: var(--muted);
}
.portal-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}
.portal-tab {
  padding: 9px 14px;
  border-radius: 999px;
  color: #3b3f58;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.portal-tab:hover {
  background: #f1f2f6;
}
.portal-tab.active {
  background: var(--navy);
  color: white;
}
.portal-tab .count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font-size: 12px;
}
.portal-me {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.portal-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 48px) 80px;
}
.portal-hero h1 {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 10px 0 8px;
}
.portal-hero p {
  font-size: 15px;
  color: #4a4e66;
  max-width: 640px;
  line-height: 1.6;
}
.portal-hero.compact h1 {
  font-size: 28px;
}
.waiting-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 24px 0 8px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--navy);
  color: white;
}
.waiting-banner strong {
  display: block;
  font-size: 16px;
}
.waiting-banner span {
  opacity: 0.8;
}
.waiting-banner .button.primary {
  background: var(--coral);
  border-color: var(--coral);
}
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0 8px;
}
.portal-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.portal-stat strong {
  display: block;
  font-size: 30px;
}
.portal-stat span {
  display: block;
  font-weight: 700;
  margin: 2px 0 4px;
}
.portal-stat small {
  color: var(--muted);
  line-height: 1.4;
}
.portal-stat.waiting {
  border-color: var(--coral);
}
.portal-section {
  margin-top: 28px;
}
.section-head h2 {
  margin: 0 0 4px;
}
.lesson-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.lesson-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  min-height: 170px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.lesson-card:hover {
  transform: translateY(-2px);
  border-color: var(--coral);
  box-shadow: 0 10px 28px rgb(15 20 40 / 10%);
}
.lesson-card strong {
  font-size: 16px;
}
.lesson-card small {
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}
.lesson-more {
  color: var(--coral);
  font-weight: 700;
}
.lesson-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f2f6;
  color: var(--navy);
  font-size: 18px;
}
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  margin-top: 28px;
}
.portal-grid h2,
.portal-section h2 {
  margin: 0;
  font-size: 18px;
}
.authority-big {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--navy);
  margin-top: 12px;
}
.authority-big span {
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 6px;
}
.sparkline {
  width: 100%;
  height: 80px;
}
.sparkline polyline {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.5;
}
.sparkline circle {
  fill: var(--coral);
}
.portal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.portal-table th,
.portal-table td {
  text-align: left;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
}
.portal-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.portal-table small.up {
  color: #2f8a57;
}
.portal-table small.down {
  color: #c2410c;
}
.question-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}
.question-list li {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f7fa;
}
.question-list li span {
  color: var(--muted);
}
.question-list li.answered span {
  color: #2f8a57;
}
.post-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.post-row,
.post-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: inherit;
  text-decoration: none;
}
.post-row strong,
.post-card strong {
  display: block;
  font-size: 15px;
}
.post-row small,
.post-card small {
  color: var(--muted);
}
a.post-card:hover {
  border-color: var(--coral);
}
.post-list.stacked {
  margin-top: 24px;
}
.stage-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: #f1f2f6;
  color: #3b3f58;
}
.stage-chip.waiting {
  background: var(--coral);
  color: white;
}
.stage-chip.published {
  background: #e3f4ea;
  color: #22663f;
}
.stage-chip.publishing {
  background: #e7efff;
  color: #2846a8;
}
.empty-state {
  margin-top: 24px;
  text-align: center;
}
.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.post-review h1 {
  font-size: 32px;
  letter-spacing: -0.8px;
  margin: 12px 0 8px;
}
.post-description {
  font-size: 16px;
  color: #4a4e66;
}
.review-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin: 18px 0;
  border-radius: 12px;
  background: #f6f7fb;
  border: 1px solid var(--line);
}
.review-bar.bottom {
  margin-top: 28px;
}
.post-body {
  font-size: 16px;
  line-height: 1.7;
  max-width: 720px;
}
.lesson-index {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.lesson-index a {
  padding: 8px 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.lesson {
  margin-top: 16px;
  scroll-margin-top: 90px;
}
.lesson-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lesson-head h2 {
  margin: 0;
}
.lesson-body {
  font-size: 15px;
  line-height: 1.65;
  max-width: 760px;
}
.lesson-body h3 {
  margin: 22px 0 6px;
  font-size: 16px;
}
.lesson-body li {
  margin: 6px 0;
}
.lesson-steps li {
  margin: 8px 0;
}
.lesson-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f6f7fb;
  font-weight: 700;
}
.hub-diagram {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 16px auto;
}
.hub-link {
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-dasharray: 5 4;
}
.hub-spoke {
  fill: white;
  stroke: var(--navy);
  stroke-width: 2;
}
.hub-spoke-label {
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--navy);
}
.hub-center {
  fill: var(--navy);
}
.hub-center-label {
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
  fill: white;
}
.hub-center-sub {
  font-size: 11px;
  text-anchor: middle;
  fill: white;
  opacity: 0.8;
}
@media (max-width: 900px) {
  .portal-stats,
  .lesson-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .portal-top {
    flex-wrap: wrap;
    gap: 12px;
  }
  .portal-nav {
    order: 3;
    flex-basis: 100%;
  }
}

/* The owner's Client & publishing page. */
.settings-grid {
  display: grid;
  gap: 16px;
}
.settings-grid h2 {
  margin: 0 0 6px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.member-row .grow small {
  display: block;
  color: var(--muted);
}
.role-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f2f6;
  font-size: 12px;
  font-weight: 700;
}
.role-pill.client {
  background: var(--coral);
  color: white;
}
.signin-link {
  word-break: break-all;
  padding: 12px;
  border-radius: 10px;
  background: #f6f7fb;
  border: 1px dashed var(--line);
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.publisher-fields {
  display: none;
}
.publisher-fields.active {
  display: contents;
}

/* The workspace sidebar carries the brand. */
.brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-card img.brand-logo {
  width: 40px;
  height: 40px;
}
.brand-card small {
  color: rgb(255 255 255 / 72%);
}
.auth-story .brand img.brand-logo {
  width: 64px;
  height: 64px;
}
.workspace-name {
  background: none;
  border: 0;
  padding: 0;
}
.workspace-name button {
  width: 100%;
  border: 1px solid var(--line);
}
.portal-preview-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  padding: 8px 16px;
  background: #fff7e6;
  border-bottom: 1px solid #f3dfb2;
  font-weight: 600;
}

/* The central home: every client someone runs content for. */
.home {
  min-height: 100vh;
  background: #f6f7fa;
}
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.client-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.client-card:hover {
  border-color: var(--coral);
  box-shadow: 0 10px 28px rgb(15 20 40 / 10%);
}
.client-card .row {
  align-items: center;
  gap: 12px;
}
.client-card strong {
  font-size: 16px;
}
.client-card small {
  display: block;
  color: var(--muted);
}
.client-authority {
  text-align: right;
}
.client-authority strong {
  font-size: 24px;
  display: block;
}
.client-counts {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.client-counts strong {
  color: #20243e;
}
.client-counts .hot strong,
.client-counts .hot {
  color: var(--coral);
}
textarea.samples {
  min-height: 160px;
}

/* Setup checklist inside a client's workspace. */
.setup-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.setup-step-head h2 {
  margin: 0;
  flex: 1;
}
.setup-check {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f2f6;
  color: var(--navy);
  font-weight: 800;
}
.setup-step.done .setup-check {
  background: var(--coral);
  color: white;
}
.kickoff-preview {
  max-height: 420px;
  overflow: auto;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f7f7fa;
  border: 1px solid var(--line);
  margin-top: 10px;
}
