:root {
  --bg: #f5f2eb;
  --paper: #fbfaf6;
  --ink: #171714;
  --muted: #706e67;
  --line: rgba(23, 23, 20, 0.13);
  --dark: #171817;
  --white: #f7f5ef;
  --accent: #b88455;
  --danger: #a33;
  --success: #2f6b3a;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "Space Mono", monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius: 6px;
  --tap: 44px;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
a { text-decoration: none; color: inherit; }
.wrap { width: min(1160px, calc(100% - 44px)); margin: auto; }

.app-nav {
  height: 72px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(245, 242, 235, 0.88);
  backdrop-filter: blur(14px);
  z-index: 20;
}
.app-nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-weight: 700; letter-spacing: -0.04em; font-size: 1.1rem; display: flex; align-items: center; }
.logo span { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.logo img { display: block; height: 36px; width: auto; }
.navlinks { display: flex; gap: 28px; font-size: 0.76rem; color: var(--muted); align-items: center; }
.navcta {
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}
.inline-form { display: inline; margin: 0; }
.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.app-footer {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font: 0.62rem var(--mono);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.app-footer b { color: var(--ink); }

.msg-bar { position: relative; z-index: 30; }
.msg {
  padding: 12px 20px;
  text-align: center;
  font-size: 0.85rem;
  background: #ebe6dd;
  border-bottom: 1px solid var(--line);
}
.msg-success { background: #e4efe4; }
.msg-error { background: #f3e0e0; }

.page {
  width: min(720px, calc(100% - 44px));
  margin: 40px auto 80px;
}
.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
}
.page .lead { color: var(--muted); margin-bottom: 28px; }

.legal-wrap {
  width: min(760px, calc(100% - 32px));
  margin: 40px auto 96px;
}
.legal-paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 28px 36px;
}
.legal-paper h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.legal-paper .updated {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 18px;
}
.legal-paper .lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0 0 8px;
  max-width: 40rem;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 18px 0 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.legal-nav a { color: var(--muted); }
.legal-nav a.is-current {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}
.legal-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.legal-section:last-child { border-bottom: 0; padding-bottom: 0; }
.legal-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  margin: 0 0 12px;
  line-height: 1.25;
}
.legal-section p {
  margin: 0 0 12px;
  line-height: 1.65;
  color: var(--ink);
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { text-decoration: underline; text-underline-offset: 2px; }
.legal-section ul,
.legal-section ol {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.legal-section ul li,
.legal-section ol li {
  position: relative;
  padding: 10px 12px 10px 36px;
  background: rgba(245, 242, 235, 0.7);
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.5;
  color: var(--ink);
}
.legal-section ul li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}
.legal-section ol {
  counter-reset: legal-step;
}
.legal-section ol li {
  counter-increment: legal-step;
}
.legal-section ol li::before {
  content: counter(legal-step);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.legal-mail {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f5ef;
}
.legal-mail p { margin: 0; color: var(--muted); }
.legal-mail strong { color: var(--ink); font-size: 1.05rem; }
.legal-mail .btn { justify-self: start; }

@media (max-width: 640px) {
  .legal-wrap { width: calc(100% - 24px); margin: 24px auto 72px; }
  .legal-paper { padding: 22px 18px 28px; }
  .legal-section { padding: 18px 0; }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  text-align: center;
}
.btn.fill { background: var(--ink); color: var(--white); }
.btn.light { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}
.btn.danger.fill {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn:disabled,
.btn.is-loading {
  opacity: 0.65;
  cursor: wait;
  pointer-events: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.btn-row.stack-mobile { gap: var(--space-3); }

/* —— Forms —— */
.form-stack { display: grid; gap: var(--space-4); }
.field {
  display: grid;
  gap: 6px;
}
.field-label {
  font-size: 0.8rem;
  font-weight: 600;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.field-example {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}
.field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.field select,
.field textarea,
.form-stack > p input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]),
.form-stack > p select,
.form-stack > p textarea,
.rp-input {
  font: inherit;
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  width: 100%;
  color: var(--ink);
}
.field textarea,
.rp-input.textarea { resize: vertical; min-height: 88px; }
.field .errorlist,
.form-stack .errorlist {
  color: var(--danger);
  font-size: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--ink);
}
.field-group {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-2);
}
.field-group-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: var(--space-3) 0 0;
}
.save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  margin-top: var(--space-2);
}
.save-bar .hint { color: var(--muted); font-size: 0.78rem; }

/* —— Chips / radios —— */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
}
.chip:has(input:checked),
.chip.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.chip.is-extra[hidden] {
  display: none !important;
}
.niche-more,
.link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  margin-top: 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  justify-self: start;
}
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.field-check > input[type="checkbox"],
.check-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--ink);
  justify-self: start;
}
.choice-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.choice-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-4);
  cursor: pointer;
  display: grid;
  gap: 4px;
  position: relative;
}
.choice-card:has(input:checked),
.choice-card.is-selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card strong { font-size: 0.95rem; }
.choice-card span { font-size: 0.78rem; color: var(--muted); }
.radio-stack {
  display: grid;
  gap: 8px;
}
.radio-stack label {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.radio-stack label input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--ink);
}
.radio-stack label span {
  flex: 1 1 auto;
  line-height: 1.35;
}
.radio-stack label:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* —— Dashboard shell —— */
.dash-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(184, 132, 85, 0.08), transparent 55%),
    var(--bg);
}
.dash-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 235, 0.94);
  backdrop-filter: blur(12px);
}
.dash-topbar .logo span { font-size: 1.2rem; }
.dash-menu-btn {
  width: var(--tap);
  height: var(--tap);
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dash-view-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}
.dash-layout {
  width: min(1120px, calc(100% - 40px));
  margin: 28px auto 72px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.dash-layout.onboard-only {
  grid-template-columns: 1fr;
  width: min(720px, calc(100% - 32px));
}
.dash-side {
  position: sticky;
  top: 24px;
  padding-right: 8px;
}
.dash-nav-group {
  margin-bottom: var(--space-5);
}
.dash-nav-label {
  font: 0.62rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.dash-side a,
.dash-side .dash-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--muted);
}
.dash-side a:hover,
.dash-side .dash-nav-link:hover { color: var(--ink); background: rgba(23, 23, 20, 0.04); }
.dash-side a.is-active,
.dash-side .dash-nav-link.is-active {
  color: var(--ink);
  background: rgba(23, 23, 20, 0.07);
  font-weight: 600;
}
.dash-nav-count {
  margin-left: auto;
  font: 0.68rem var(--mono);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.dash-side a.is-active .dash-nav-count { color: var(--muted); font-weight: 400; }
.enquiry-row.is-unread .name { font-weight: 600; color: var(--ink); }
.enquiry-unread-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--ink);
  vertical-align: middle;
}
.dash-side .view-portfolio {
  margin-top: var(--space-4);
  display: inline-flex;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0 0 2px;
  margin-left: 0;
}
.dash-main { min-width: 0; }
.dash-main > .page-head { margin-bottom: var(--space-5); }
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.page-head .lead {
  color: var(--muted);
  margin: 0;
  max-width: 42rem;
  font-size: 0.95rem;
}
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
}

/* Mobile drawer */
.dash-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 20, 0.35);
  z-index: 45;
}
.dash-drawer-backdrop.is-open { display: block; }
body.dash-nav-open { overflow: hidden; }

/* —— Cards / lists —— */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.summary-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 2px;
  min-height: 88px;
}
.summary-card .label {
  font: 0.62rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-card .value {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
}
.summary-card .meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: auto;
}
.summary-card:hover { border-color: rgba(23, 23, 20, 0.28); }

.insight-chart {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-5);
}
.insight-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.insight-chart .label {
  font: 0.62rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.insight-chart-sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.insight-chart-stats {
  display: flex;
  gap: var(--space-5);
  text-align: right;
}
.insight-chart-stats .value {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.1;
}
.insight-chart-stats .meta {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}
.insight-chart-plot {
  width: 100%;
  aspect-ratio: 640 / 168;
}
.insight-chart-plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.insight-chart-area {
  fill: rgba(23, 23, 20, 0.08);
}
.insight-chart-line {
  stroke: var(--ink);
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.insight-chart-dot {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.75;
}
.insight-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font: 0.68rem var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

.audience-block { margin-top: var(--space-5); }
.dash-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dash-audience-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px;
}
.dash-audience-card h3,
.dash-audience-card .subhead {
  margin: 0 0 12px;
  font: 0.62rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-audience-card .subhead { margin-top: 18px; }
.dash-audience-more {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.dash-stat-line { margin-bottom: 10px; }
.dash-stat-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  margin-bottom: 4px;
}
.dash-stat-track {
  height: 6px;
  background: rgba(23, 23, 20, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.dash-stat-fill {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
}
@media (max-width: 900px) {
  .dash-audience-grid { grid-template-columns: 1fr; }
}

.progress-block {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}
.progress-block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 10px;
}
.progress-track {
  height: 6px;
  background: rgba(23, 23, 20, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  background: var(--ink);
  border-radius: inherit;
}
.action-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.action-list a {
  color: var(--ink);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
}
.action-list a:hover { border-bottom-color: var(--ink); }

.section-block { margin-top: var(--space-6); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  margin: 0;
}
.section-head a {
  font-size: 0.8rem;
  font-weight: 600;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: rgba(251, 250, 246, 0.6);
}
.empty-state h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 6px;
}
.empty-state p {
  color: var(--muted);
  margin: 0 0 14px;
  max-width: 36rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.work-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 100%;
}
.work-card .thumb {
  aspect-ratio: 1;
  background: #e8e4db;
  object-fit: cover;
  width: 100%;
  display: block;
}
.work-card .thumb-ph {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #ebe6dd, #d9d3c6);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
}
.work-card .body { padding: 10px 12px 8px; display: grid; gap: 2px; min-width: 0; }
.work-card .title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.3;
  max-height: calc(1.3em * 2);
}
.work-card .meta {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-head-tight {
  margin-bottom: var(--space-3);
}
.page-head-tight h1 {
  margin-bottom: 4px;
}
.page-head-tight .lead {
  font-size: 0.9rem;
  line-height: 1.35;
}
.form-stack-ig-review {
  gap: var(--space-3);
}
.form-stack-ig-review .field {
  gap: 4px;
}
.form-stack-ig-review .field-label {
  line-height: 1.25;
}
.form-stack-ig-review .field-hint {
  line-height: 1.35;
}
.field-input-wrap {
  position: relative;
}
.field-input-wrap input {
  padding-right: 3.25rem;
}
.field-input-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 0.7rem;
  line-height: 1;
  color: var(--muted);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.ig-review-hero {
  display: grid;
  grid-template-columns: minmax(118px, 148px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.ig-review-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  align-self: stretch;
}
.ig-review-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  object-fit: cover;
  background: #e8e4db;
}
.ig-review-thumb-ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}
.ig-review-metrics {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 0;
  height: 100%;
}
.ig-review-metric {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 0;
  align-content: center;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: left;
}
.ig-review-metric-icon {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip, #ebe6dd) 80%, var(--paper));
  color: var(--ink);
}
.ig-review-metric-icon svg {
  width: 13px;
  height: 13px;
}
.ig-review-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.ig-review-metric-label {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
@media (max-width: 520px) {
  .ig-review-hero {
    grid-template-columns: minmax(104px, 120px) minmax(0, 1fr);
    gap: 10px;
  }
  .ig-review-metric {
    padding: 7px 9px;
  }
}
.ig-review-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}
.ig-review-link-url {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ig-review-link-open {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
}
.ig-review-link-open:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--chip, #ebe6dd) 70%, var(--paper));
}
.ig-review-link-open svg {
  width: 16px;
  height: 16px;
}
.ig-review-visibility {
  margin-top: 4px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}
.form-stack-ig-review .save-bar {
  margin-top: 2px;
}
.work-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
  font-size: 0.75rem;
}
.work-card .actions button,
.work-card .actions a {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.work-card .actions .danger { color: var(--danger); }

.ig-pick-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.ig-pick {
  position: relative;
  z-index: 0;
  isolation: isolate;
  cursor: pointer;
  padding: 0;
}
.ig-pick input {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.ig-pick:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.ig-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: rgba(23, 23, 20, 0.35);
  pointer-events: none;
}
.ig-pick:has(input:checked) .ig-check {
  background: var(--ink);
  border-color: var(--ink);
}
.ig-pick:has(input:checked) .ig-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-stack[data-ig-import],
.ig-import-form {
  padding-bottom: 8px;
}
.form-stack[data-ig-import] .ig-pick-grid,
.ig-import-form .ig-pick-grid {
  padding-bottom: 8px;
}
.ig-pick-bar {
  position: sticky;
  left: auto;
  right: auto;
  bottom: 0;
  z-index: 30;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(23, 23, 20, 0.12);
  isolation: isolate;
}
.ig-pick-bar .btn,
.ig-pick-bar .btn.fill,
.ig-pick-bar .btn.light {
  display: flex !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin: 0;
}
.ig-pick-bar .btn.light {
  margin-top: 8px;
}

.metrics-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.metrics-fields input[readonly],
.form-stack input[readonly] {
  background: color-mix(in srgb, var(--chip, #ebe6dd) 70%, var(--paper));
  color: var(--ink);
  cursor: default;
}

.item-list { display: grid; gap: 10px; }
.item-row {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.item-row .title { font-weight: 600; font-size: 1rem; }
.item-row .sub { color: var(--muted); font-size: 0.85rem; }
.item-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.78rem;
}
.item-row .actions a,
.item-row .actions button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
}
.item-row .actions .danger { color: var(--danger); }
.item-row a.stretch {
  display: block;
}
.collab-list-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.collab-list-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8e4db;
  flex: 0 0 auto;
  display: block;
}
.collab-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.collab-list-thumb-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.enquiry-row {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
}
.enquiry-row:hover { border-color: rgba(23, 23, 20, 0.28); }
.enquiry-row .name { font-weight: 600; }
.enquiry-row .sub { color: var(--muted); font-size: 0.82rem; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 0.65rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #ebe6dd;
  color: var(--ink);
}
.badge.new { background: #e8f0e4; color: var(--success); }

/* —— Photo upload —— */
.photo-field {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-4);
  align-items: center;
}
.photo-preview {
  width: 96px;
  height: 120px;
  border-radius: 4px;
  object-fit: cover;
  background: #e8e4db;
  border: 1px solid var(--line);
}
.photo-preview.ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
  padding: 8px;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: var(--space-2);
}

/* —— Theme cards —— */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.theme-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
  display: block;
  position: relative;
}
.theme-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme-card:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.theme-preview {
  aspect-ratio: 4 / 3;
  padding: 18px;
  display: grid;
  align-content: end;
  gap: 4px;
}
.theme-preview.light {
  background: linear-gradient(160deg, #f7f5ef, #ebe6dd);
  color: #171714;
}
.theme-preview.dark {
  background: linear-gradient(160deg, #1c1c1a, #0e0e0d);
  color: #f7f5ef;
}
.theme-preview .name {
  font-family: var(--serif);
  font-size: 1.25rem;
}
.theme-preview .tag { font-size: 0.75rem; opacity: 0.7; }
.theme-card-foot {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}
.theme-card-foot .lock { color: var(--muted); font-size: 0.72rem; }

/* —— SEO —— */
.seo-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.google-preview {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px;
  border-radius: 4px;
}
.google-preview .g-title { color: #1a0dab; font-size: 1.15rem; }
.google-preview .g-url { color: #006621; font-size: 0.8rem; margin: 4px 0; }
.google-preview .g-desc { color: #545454; font-size: 0.85rem; }
.share-preview {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.share-preview img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: #ddd; }
.share-preview .share-body { padding: 12px; }
.share-preview .share-title { font-weight: 700; font-size: 0.9rem; }
.share-preview .share-desc { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.locked-overlay { opacity: 0.55; pointer-events: none; filter: grayscale(0.4); }
.upgrade-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.upgrade-panel h2 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0 0 6px;
  font-size: 1.4rem;
}

/* —— Crop modal —— */
.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.crop-modal.is-open { display: flex; }
.crop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 20, 0.55);
}
body.crop-open { overflow: hidden; }
.crop-modal-panel {
  position: relative;
  width: min(520px, 100%);
  background: var(--paper);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  overflow: auto;
}
.crop-modal-panel h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  font-size: 1.4rem;
}
.crop-stage {
  position: relative;
  z-index: 0;
  height: min(360px, 46vh);
  height: min(360px, 46svh);
  background: #111;
  border-radius: 4px;
  overflow: hidden;
  touch-action: none;
}
.crop-stage .cropper-container {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
.crop-stage > img {
  display: block;
  max-width: 100%;
  visibility: hidden;
}
.crop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.crop-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  flex: 1;
  min-width: 160px;
}
.crop-controls input[type="range"] { flex: 1; }
.crop-modal-panel .crop-controls,
.crop-modal-panel .btn-row {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

/* —— Confirm dialog —— */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.confirm-modal.is-open { display: flex; }
.confirm-modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 20, 0.45);
}
.confirm-panel {
  position: relative;
  width: min(400px, 100%);
  background: var(--paper);
  border-radius: 8px;
  padding: 20px;
  display: grid;
  gap: 10px;
}
.confirm-panel h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  font-size: 1.4rem;
}
.confirm-panel p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.ig-account-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ig-account-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--chip, #ebe6dd);
  flex-shrink: 0;
}
.ig-account-photo-fallback {
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}
.ig-perm-btn {
  font-size: 0.78rem;
  padding: 8px 10px;
}
.ig-perm-panel {
  width: min(480px, 100%);
}
.ig-perm-groups {
  display: grid;
  gap: 14px;
}
.ig-perm-groups h4 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ig-perm-groups ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}
.ig-perm-groups li { padding-left: 2px; }
.ig-perm-text {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.ig-connect-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.ig-table-wrap {
  overflow-x: auto;
  width: 100%;
}
.ig-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.9rem;
  table-layout: auto;
}
.ig-table th,
.ig-table td {
  padding: 12px 16px 12px 0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.ig-table th:last-child,
.ig-table td:last-child {
  width: 1%;
  white-space: normal;
}
.ig-table thead tr {
  border-bottom: 1px solid var(--line);
}
.ig-table tbody tr {
  border-bottom: 1px solid var(--line);
}
.ig-card {
  display: none;
}

/* —— Onboarding —— */
.onboard-wrap {
  width: min(640px, calc(100% - 32px));
  margin: 32px auto 72px;
}
.onboard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-5);
}
.onboard-progress span {
  flex: 1;
  height: 3px;
  background: rgba(23, 23, 20, 0.1);
  border-radius: 999px;
}
.onboard-progress span.is-done,
.onboard-progress span.is-current { background: var(--ink); }
.onboard-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: var(--space-5);
}
.onboard-card h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 8px;
}
.onboard-card .lead { color: var(--muted); margin: 0 0 20px; }
.onboard-skip {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.onboard-skip:hover { border-bottom-color: var(--muted); }

.plan-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: grid;
  gap: 10px;
  max-width: 480px;
}
.plan-panel.ig-connect-panel {
  max-width: none;
  width: 100%;
}
.plan-panel h2 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  font-size: 1.6rem;
}
.plan-panel .muted { color: var(--muted); margin: 0; }
.plan-features {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-meta {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  font-size: 0.9rem;
}
.detail-meta dt {
  font: 0.62rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-meta dd { margin: 0 0 8px; }
.message-body {
  white-space: pre-wrap;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px;
}

.card-list { display: grid; gap: 12px; margin-top: 20px; }
.card-row {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px 16px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.card-row-warn {
  border-color: color-mix(in srgb, #b45309 35%, var(--line));
  background: color-mix(in srgb, #b45309 8%, var(--paper));
}
.card-row-danger {
  border-color: color-mix(in srgb, #b91c1c 40%, var(--line));
  background: color-mix(in srgb, #b91c1c 8%, var(--paper));
}

@media (max-width: 1024px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .navlinks { display: none; }
  .dash-topbar { display: flex; }
  .dash-layout {
    width: 100%;
    margin: 0;
    padding: 20px 16px 64px;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dash-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    z-index: 50;
    background: var(--paper);
    padding: 72px 20px 24px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    overflow-y: auto;
    border-right: 1px solid var(--line);
  }
  .dash-side.is-open { transform: translateX(0); }
  .dash-main { min-width: 0; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-chart-head {
    flex-direction: column;
    gap: var(--space-3);
  }
  .insight-chart-stats {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
  .seo-preview-grid { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: 1fr; }
  .choice-cards { grid-template-columns: 1fr; }
  .metrics-fields { grid-template-columns: 1fr; }
  .photo-field { grid-template-columns: 80px 1fr; }
  .btn-row.stack-mobile .btn { flex: 1 1 100%; }
  .page-head-row { flex-direction: column; }
  .save-bar .btn.fill { width: 100%; }
  .form-stack[data-ig-import],
  .ig-import-form {
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  .ig-pick-bar {
    position: fixed;
    z-index: 100;
    width: 100vw;
    max-width: 100vw;
    left: 0;
    right: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  .ig-pick-bar .btn.fill {
    width: 100% !important;
  }
  .ig-table-wrap,
  .ig-connect-head-badge { display: none; }
  .ig-card {
    display: grid;
    gap: 16px;
    margin-top: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
  }
  .ig-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .ig-card-head .ig-account-photo {
    width: 48px;
    height: 48px;
  }
  .ig-card-head strong {
    display: block;
    font-size: 0.95rem;
  }
  .ig-card-handle {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 2px;
  }
  .ig-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin: 0;
  }
  .ig-card-meta dt {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
  }
  .ig-card-meta dd {
    margin: 2px 0 0;
    font-size: 0.95rem;
  }
  .ig-card-meta div:last-child {
    grid-column: 1 / -1;
  }
  .ig-card-actions,
  .ig-card-actions form {
    width: 100%;
  }
  .ig-card-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .enquiry-row { grid-template-columns: 1fr; }
}

/* —— Collaboration builder —— */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.collab-builder { max-width: 720px; gap: var(--space-5); }
.collab-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.collab-section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}
.collab-section-title span {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
}
.collab-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
}
.collab-selected {
  display: grid;
  gap: 10px;
}
.collab-media-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.collab-media-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: #e8e4db;
  display: block;
}
.collab-media-thumb.is-ph {
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: var(--muted);
}
.collab-media-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.collab-media-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2px;
}
.collab-media-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}
.collab-media-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.collab-media-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.collab-media-metrics svg {
  width: 11px;
  height: 11px;
}
.collab-media-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  padding: 6px 8px;
}
.collab-media-remove:hover { color: var(--danger); background: rgba(163, 51, 51, 0.08); }
.collab-add-media {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 92px;
  border: 1.5px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  padding: 18px;
}
.collab-add-media:hover { border-color: var(--ink); background: rgba(23, 23, 20, 0.03); }
.collab-perf-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.collab-perf-cell {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}
.collab-perf-cell b {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
}
.collab-perf-cell span {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.collab-verified {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
}
.collab-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, var(--paper));
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
}
.collab-verified-sub {
  font-size: 0.75rem;
  color: var(--muted);
}
.collab-source-cards { margin-top: 4px; }
.collab-brand-metrics { margin-top: var(--space-3); }
.collab-list-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, var(--paper));
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 600;
}

.collab-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.collab-picker-modal[hidden] { display: none !important; }
.collab-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 20, 0.45);
}
.collab-picker-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--line);
  box-shadow: 0 -12px 40px rgba(23, 23, 20, 0.18);
  overflow: hidden;
}
.collab-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.collab-picker-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
}
.collab-picker-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}
.collab-picker-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px 0;
}
.collab-picker-tabs button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.collab-picker-tabs button.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.collab-picker-body {
  overflow: auto;
  padding: 14px 18px 18px;
  flex: 1;
}
.collab-picker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.collab-picker-play {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 2;
}
.collab-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.collab-picker-preview {
  display: flex;
  gap: 6px;
  min-height: 36px;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.collab-picker-chip {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #e8e4db;
  flex: 0 0 auto;
}
.collab-picker-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.collab-picker-more-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.collab-picker-empty {
  margin: 8px 0 0;
  text-align: center;
}

@media (min-width: 720px) {
  .collab-picker-modal { align-items: center; padding: 24px; }
  .collab-picker-panel {
    border-radius: 12px;
    max-height: min(88vh, 820px);
  }
}
@media (max-width: 700px) {
  .collab-grid-2 { grid-template-columns: 1fr; }
  .collab-perf-strip { grid-template-columns: 1fr 1fr; }
  .collab-picker-grid { grid-template-columns: 1fr 1fr; }
  .collab-source-cards { grid-template-columns: 1fr; }
  .collab-picker-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .collab-picker-actions { justify-content: space-between; }
}

/* —— Case study builder —— */
.case-builder { max-width: 760px; gap: var(--space-5); }
.case-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.case-section-secondary { opacity: 0.96; }
.case-section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}
.case-section-title span {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
}
.case-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
}
.case-cover-field {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.case-cover-preview {
  width: min(100%, 420px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #e8e4db;
  display: block;
}
.case-cover-preview.ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.case-add-media {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 92px;
  border: 1.5px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  padding: 18px;
}
.case-add-media:hover { background: rgba(23, 23, 20, 0.03); }
.case-selected { display: grid; gap: 10px; }
.case-media-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.case-media-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: #e8e4db;
  display: block;
}
.case-media-thumb.is-ph {
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: var(--muted);
}
.case-media-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-media-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 2px;
}
.case-media-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.case-media-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
}
.case-media-remove:hover { color: var(--danger); }
.case-perf-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.case-perf-cell {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}
.case-perf-cell b {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
}
.case-perf-cell span {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.case-verified { margin: 4px 0 0; }
.case-verified-badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, var(--paper));
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
}
.case-source-note { margin: 0; }
.case-source-brand {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.case-gallery-existing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.case-gallery-item {
  margin: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #e8e4db;
}
.case-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-gallery-remove {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border: 0;
  background: rgba(23, 23, 20, 0.75);
  color: #fff;
  font: inherit;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.case-gallery-upload {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
}
.case-gallery-upload input { display: none; }
.case-preview-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  display: grid;
  gap: 14px;
}
.case-preview-brand {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--mono);
}
.case-preview-campaign {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.15;
}
.case-preview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.82rem;
  color: var(--muted);
}
.case-preview-metrics b { color: var(--ink); }
.case-preview-block h3 {
  margin: 0 0 6px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 400;
}
.case-preview-block p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}
.case-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.case-picker-modal[hidden] { display: none !important; }
.case-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 20, 0.45);
}
.case-picker-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--line);
  box-shadow: 0 -12px 40px rgba(23, 23, 20, 0.18);
  overflow: hidden;
}
.case-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.case-picker-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
}
.case-picker-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
}
.case-picker-body {
  overflow: auto;
  padding: 14px 18px 18px;
  flex: 1;
}
.case-picker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-picker-play {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 2;
}
.case-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.case-picker-preview {
  display: flex;
  gap: 6px;
  min-height: 36px;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.case-picker-chip {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #e8e4db;
  flex: 0 0 auto;
}
.case-picker-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.case-picker-more-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.case-picker-empty { margin: 8px 0 0; text-align: center; }

@media (min-width: 720px) {
  .case-picker-modal { align-items: center; padding: 24px; }
  .case-picker-panel {
    border-radius: 12px;
    max-height: min(88vh, 820px);
  }
}
@media (max-width: 700px) {
  .case-grid-2 { grid-template-columns: 1fr; }
  .case-perf-strip { grid-template-columns: 1fr 1fr; }
  .case-picker-grid { grid-template-columns: 1fr 1fr; }
  .case-gallery-existing { grid-template-columns: 1fr 1fr; }
  .case-picker-bar { flex-direction: column; align-items: stretch; }
  .case-picker-actions { justify-content: space-between; }
}

/* —— Blog —— */
.blog-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.blog-index-hero {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--line);
}
.blog-index-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 12px 0 16px;
}
.blog-index-lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
}
.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding: 40px 0 72px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.blog-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.blog-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft, #ebe9e1);
}
.blog-card-media img,
.blog-related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-cover-ph {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background:
    linear-gradient(135deg, rgba(23, 23, 20, 0.06), rgba(23, 23, 20, 0.14)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(23, 23, 20, 0.04) 10px,
      rgba(23, 23, 20, 0.04) 20px
    );
}
.blog-card-body {
  padding: 18px 18px 22px;
  display: grid;
  gap: 10px;
}
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.blog-card-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
}
.blog-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.blog-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}
.blog-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 0 64px;
  color: var(--muted);
  font-size: 0.9rem;
}
.blog-pagination a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 22px 0 8px;
  font-size: 0.84rem;
  color: var(--muted);
}
.blog-breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-detail-shell {
  padding-bottom: 48px;
}
.blog-related {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.blog-related h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  margin: 0 0 22px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-related-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 0 16px;
  color: inherit;
  text-decoration: none;
}
.blog-related-card img,
.blog-related-card .blog-cover-ph {
  aspect-ratio: 16 / 9;
}
.blog-related-card > div:last-child {
  padding: 0 14px;
  display: grid;
  gap: 6px;
}
.blog-related-card strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
}
.blog-related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 820px) {
  .blog-related-grid {
    grid-template-columns: 1fr;
  }
}
