:root {
  --bg: #f4f5f2; --surface: #fff; --surface-2: #f8f9f7;
  --ink: #16221d; --ink-2: #3d4a44; --muted: #6b7871;
  --line: #e3e7e2; --line-2: #eef1ed;
  --primary: #1d5a43; --primary-hover: #164a37; --primary-soft: #e7f0eb; --primary-ink: #174a37;
  --amber: #a2670f; --amber-soft: #fbf1df;
  --red: #a53a2a; --red-soft: #fbe9e5;
  --client: #2b5a86; --client-soft: #e6eef7; --client-ink: #234d74;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(22,34,29,.04), 0 4px 16px rgba(22,34,29,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; letter-spacing: -.3px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Header */
.app-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; flex-shrink: 1; min-width: 0; text-decoration: none; }
.brand img { width: 320px; max-width: 100%; height: auto; }

.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }

/* Basics */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.button { height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13.5px/1 inherit; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--surface-2); }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-hover); }
.button.small { height: 32px; padding: 0 11px; font-size: 12.5px; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.big { height: 48px; font-size: 15px; padding: 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--primary-soft); color: var(--primary-ink); }
.pill.warning { background: var(--amber-soft); color: var(--amber); }
.pill.error { background: var(--red-soft); color: var(--red); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: 0 0 0 4px var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.login { max-width: 420px; margin: 40px auto 0; }
.login h1 { font-size: 26px; letter-spacing: -.6px; }
.login .lead { color: var(--muted); margin: 6px 0 18px; }
.login-form { display: grid; gap: 14px; }
.login-form .notice { margin: 0; }
.noimg { aspect-ratio: 16/10; background: var(--line-2); }
input[type=text], input[type=password], textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
input[type=text]:focus, input[type=password]:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }

/* Home: upload */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; }
.upload h1 { font-size: 28px; letter-spacing: -.8px; }
.upload p.lead { margin: 6px 0 20px; color: var(--muted); font-size: 14.5px; }
.drop { border: 1.5px dashed #c9d2cc; border-radius: var(--radius); background: var(--surface-2); padding: 36px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop strong { display: block; font-size: 15px; margin-bottom: 4px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.thumb { position: relative; width: 120px; aspect-ratio: 4/3; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(22,34,29,.75); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.upload-row { display: flex; gap: 12px; align-items: end; margin-top: 18px; flex-wrap: wrap; }
.upload-row .field { flex: 1 1 260px; }

.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 32px 0 14px; }
.section-title h2 { font-size: 20px; }
.projects, .leads { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project { padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s; }
.project:hover { transform: translateY(-2px); }
.project img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--line-2); }
.project .meta { padding: 12px 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.project .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 24px; text-align: center; grid-column: 1 / -1; }
.folder-count { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.folder-search { max-width: 280px; }

/* Project view */
.crumb { color: var(--muted); font-size: 13px; text-decoration: none; }
.title-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.title-row h1 { font-size: 30px; letter-spacing: -.8px; }
.team-status-field { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.team-status-field select, .team-status-field input { width: min(220px, 40vw); padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 500; color: var(--ink); background: var(--surface); }
.pill.team-status { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; flex-shrink: 0; }

.progress { display: grid; gap: 14px; }
.steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.step .circle { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; background: var(--surface); }
.step.done { color: var(--ink); }
.step.done .circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.active { color: var(--ink); font-weight: 600; }
.step.active .circle { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.step.active .circle::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s infinite ease-in-out; }
.step.skipped { opacity: .55; }
.connector { flex: 0 1 28px; height: 1.5px; background: var(--line); }
.progress-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.bar { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.bar > div { height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .5; } }

.notice { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--amber); font-weight: 500; }
.notice.error { background: var(--red-soft); color: var(--red); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

.concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.concept { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.concept .shot { position: relative; aspect-ratio: 3/2; background: var(--surface-2); }
.concept .shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.concept .shot .tag { position: absolute; top: 10px; right: 10px; background: #fff; box-shadow: var(--shadow); }
.placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 16px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(22,34,29,.025) 10px 20px); }
/* Image being drawn: dark dot grid with drifting blue glows, like ChatGPT's image loader. */
.generating { position: absolute; inset: 0; overflow: hidden; background: #111413; }
.generating.over { background: rgba(17,20,19,.78); }
.generating::before, .generating::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, currentColor 1px, transparent 1.6px); background-size: 11px 11px; background-position: center; }
.generating::before { color: rgba(255,255,255,.13); }
.generating::after { color: #6aa6ff; background-image: radial-gradient(circle, currentColor 1.4px, transparent 2px);
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent), radial-gradient(closest-side, #000 25%, transparent);
          mask-image: radial-gradient(closest-side, #000 25%, transparent), radial-gradient(closest-side, #000 25%, transparent);
  -webkit-mask-size: 60% 85%, 55% 80%; mask-size: 60% 85%, 55% 80%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: gen-drift 7s ease-in-out infinite, gen-twinkle 1.8s ease-in-out infinite; }
@keyframes gen-drift {
  0%, 100% { -webkit-mask-position: 0% 0%, 100% 100%; mask-position: 0% 0%, 100% 100%; }
  33% { -webkit-mask-position: 70% 20%, 20% 90%; mask-position: 70% 20%, 20% 90%; }
  66% { -webkit-mask-position: 30% 100%, 90% 10%; mask-position: 30% 100%, 90% 10%; } }
@keyframes gen-twinkle { 50% { opacity: .55; } }
.gen-label { position: absolute; right: 12px; bottom: 12px; z-index: 1; max-width: calc(100% - 24px);
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: #8fb9ff;
  font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.concept .body { padding: 18px 20px 20px; display: grid; gap: 14px; flex: 1; align-content: start; }
.concept-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.concept-head h3 { font-size: 18px; }
.includes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.includes li { display: flex; gap: 8px; align-items: start; }
.includes li::before { content: "✓"; flex: none; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.checknote { font-size: 12.5px; background: var(--amber-soft); color: var(--amber); border-radius: var(--radius-sm); padding: 8px 10px; }
.checknote ul { margin: 6px 0 0; padding-left: 18px; }
details.checknote summary { cursor: pointer; font-weight: 600; }
/* Card actions sit at the bottom so Aerial view, the change box and buttons line up across cards. */
.concept .body { display: flex; flex-direction: column; }
.concept .body .redo { margin-top: 0; }
.checks:empty, .versions:empty { display: none; }
.checks { display: grid; gap: 8px; }
.versions:not(:empty), .versions:empty + .views:not(:empty), .versions:empty + .views:empty + .redo { margin-top: auto; }
.versions { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.versions button { width: 28px; height: 28px; padding: 0; }
.redo { display: grid; gap: 8px; margin-top: auto; }
.redo textarea { min-height: 62px; resize: vertical; font-size: 13px; }
.redo-actions { display: flex; gap: 8px; }
.redo-actions .button.primary { flex: 1; }

.sources { margin-top: 24px; }
.sources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.source { position: relative; border-radius: 11px; overflow: hidden; aspect-ratio: 3/2; background: var(--surface-2); }
.source img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.source .label { position: absolute; top: 10px; left: 10px; background: #fff; border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }

dialog#lightbox { border: 0; padding: 0; border-radius: 16px; max-width: min(1400px, 96vw); background: #111; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
dialog#lightbox::backdrop { background: rgba(10,16,13,.7); }
dialog#lightbox img { max-height: 86vh; width: auto; margin: 0 auto; }
dialog#lightbox form { position: absolute; top: 12px; right: 12px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); transition: .2s; z-index: 50; }
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 1000px) { .concepts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .page { padding: 20px 16px 48px; }
  .header-inner { padding: 10px 16px; height: auto; min-height: 64px; flex-wrap: wrap; }
  .header-actions { flex-wrap: wrap; }
  .brand img { width: 230px; }
  .concepts { grid-template-columns: 1fr; }
  .title-row h1, .upload h1 { font-size: 24px; }
  .step .label { display: none; }
  .connector { flex-basis: 10px; }
  .step.active .label { display: inline; }
  .upload-row .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Rear / Aerial view switch */
.views { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.views:empty { display: none; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font: 600 12.5px/1 inherit; font-family: inherit; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.small { font-size: 12px; }

/* Google Drive photo library picker */
.or-drive { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drive { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 14px; display: grid; gap: 10px; }
.drive-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.crumbs .link { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.drive-list { max-height: 420px; overflow: auto; display: grid; gap: 12px; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.folder { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; font: 500 13px/1.35 inherit; font-family: inherit; color: var(--ink); cursor: pointer; }
.folder:hover { border-color: var(--primary); background: var(--primary-soft); }
.drive-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.dphoto { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--line-2); cursor: pointer; aspect-ratio: 4 / 3; }
.dphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dphoto.on { border-color: var(--primary); }
.dphoto .badge { position: absolute; top: 6px; left: 6px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.dphoto .badge:empty { display: none; }

/* Photo Scout labels in the Drive picker */
.folder { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sbadge { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.sbadge.s-recommended { background: var(--primary-soft); color: var(--primary-ink); border-color: transparent; }
.sbadge.s-review { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.sbadge.s-error { background: var(--red-soft); color: var(--red); border-color: transparent; }
.sbadge.s-pending, .sbadge.s-no-rear { color: var(--muted); }
.scout-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; }
.scout-bar .small { margin-top: 3px; }
.scanning { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-ink); }
.scanning .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.scout-error { color: var(--red); }
.scout-filters { flex-wrap: wrap; justify-self: start; }
.scout-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); border: 1px solid var(--line); }
.scout-note > div { display: grid; gap: 2px; }
.scout-note.s-recommended { background: var(--primary-soft); border-color: transparent; color: var(--primary-ink); }
.scout-note.s-review { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.scout-note.s-error { background: var(--red-soft); border-color: transparent; color: var(--red); }
.dphoto .stag { position: absolute; bottom: 6px; left: 6px; background: rgba(22, 34, 29, .82); color: #fff; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }

/* Proposal editor */
.title-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.proposal-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.proposal-form { display: grid; gap: 14px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.proposal-form textarea { resize: vertical; font-size: 13px; }
.proposal-form select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.prices { border: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prices legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.proposal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.client-link { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.client-link .link-row { display: flex; gap: 8px; }
.client-link input { flex: 1; min-width: 0; color: var(--ink-2); background: var(--surface-2); }
.client-link .muted { font-weight: 400; }
.proposal-preview { min-width: 0; overflow: auto; background: #d9d4c9; border-radius: var(--radius); padding: 24px 0; }
.proposal-preview .proposal { zoom: .72; }
@media (max-width: 1000px) {
  .proposal-layout { grid-template-columns: 1fr; }
  .proposal-form { position: static; max-height: none; }
  .proposal-preview .proposal { zoom: .42; }
}
/* Printing: only the proposal pages, full size, no app chrome */
@media print {
  @page { size: 8.5in 11in; margin: 0; }
  body { background: #fff; }
  body > *:not(main), #app > :not(.proposal-layout), .proposal-form, #toast { display: none !important; }
  #app { padding: 0 !important; max-width: none !important; }
  .proposal-layout { display: block; }
  .proposal-preview { padding: 0; background: none; overflow: visible; border-radius: 0; }
  .proposal-preview .proposal { zoom: 1; }
  .proposal .page { margin: 0; box-shadow: none; }
}

/* Design type switch and custom components */
.mode-switch { margin: 10px 0 4px; flex-wrap: wrap; }
.custom-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 14px; margin-bottom: 16px; display: grid; gap: 12px; }
.custom-group { border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.custom-group legend { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.custom-panel input[type=number], .custom-panel select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.custom-panel .inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.custom-panel .inline input[type=number] { width: 80px; }
.custom-panel textarea { min-height: 54px; }
.custom-problems { margin: 0; padding-left: 18px; color: var(--amber); font-size: 13px; }
.custom-problems:empty { display: none; }
.concepts.single { grid-template-columns: minmax(0, 760px); }
.change-panel { margin-top: 4px; }

/* Add a custom design to a Good/Better/Best project */
.add-custom-panel { margin-bottom: 16px; }
.inline-field { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.inline-field select { width: auto; }
.concepts:has(.concept:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }

/* Delete project */
.delete-row { display: flex; justify-content: flex-end; margin-top: 16px; }
.button.danger { color: #b42318; border-color: #f1c4bf; }
.button.danger:hover { background: #fdf0ef; }

/* Leads tab (client intake) */
#nav-requests.on, #nav-lessons.on { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-soft); }
.nav-badge { background: var(--primary); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; line-height: 17px; }

/* Design requests: client intake vs TEAM */
.request-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.request-tabs { flex-wrap: wrap; }
.request-tabs a { min-height: 36px; padding: 0 14px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.request-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.request-tabs .count { font-size: 11.5px; padding: 0 7px; border-radius: 999px; line-height: 18px; background: var(--line); color: var(--ink-2); }
.request-tabs .count:empty { display: none; }
.request-tabs a.on .count { background: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 12.5px/1 inherit; font-family: inherit; cursor: pointer; }
.chips button.on { border-color: var(--client); background: var(--client-soft); color: var(--client-ink); }
.request-group { margin-top: 26px; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.group-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.group-link { margin-left: auto; font-weight: 600; font-size: 13px; text-decoration: none; }
.src-mark { width: 10px; height: 10px; display: inline-block; }
.src-mark.client { border-radius: 3px; background: var(--client); }
.src-mark.team { border-radius: 50%; background: var(--primary); }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.src::before { content: ''; width: 8px; height: 8px; background: currentColor; }
.src.client { color: var(--client); }
.src.client::before { border-radius: 2px; }
.src.team { color: var(--primary); }
.src.team::before { border-radius: 50%; }
.project-foot { padding: 0 14px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tier-chips { display: flex; gap: 4px; }
.tier-chip { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--line-2); color: var(--muted); }
.tier-chip.done { background: var(--primary-soft); color: var(--primary-ink); }
.pill.neutral { background: var(--line-2); color: var(--ink-2); }
.lead-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lead-card > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; cursor: zoom-in; background: var(--line-2); }
.lead-nophoto { display: grid; place-items: center; color: var(--muted); font-weight: 500; }
.lead-more { display: flex; gap: 6px; padding: 6px 6px 0; overflow-x: auto; }
.lead-more img { flex: none; width: 72px; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: var(--line-2); }
.lead-body { padding: 16px 18px 18px; display: grid; gap: 12px; flex: 1; align-content: start; }
.lead-address { margin: 0; color: var(--ink-2); }
.lead-facts { margin: 0; display: grid; gap: 6px; font-size: 13px; }
.lead-facts div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.lead-facts dt { color: var(--muted); }
.lead-facts dd { margin: 0; overflow-wrap: anywhere; }
.lead-card textarea { font-size: 13px; resize: vertical; }
.lead-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }

/* Design feedback (thumbs on each design card) */
.rate { display: grid; gap: 8px; }
.rate-row { display: flex; align-items: center; gap: 6px; }
.rate-row .muted { flex: 1; }
.rate-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 34px; height: 30px; font-size: 15px; line-height: 1; cursor: pointer; }
.rate-btn:hover { border-color: var(--primary); }
.rate-btn.on { background: var(--primary-soft); border-color: var(--primary); }
.rate-more { display: grid; gap: 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.rate-note { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 4px 10px; font: 500 12.5px/1.3 inherit; font-family: inherit; cursor: pointer; }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); }

/* Lessons page */
.lesson-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.lesson-stats > div { display: grid; gap: 2px; }
.lesson-stats .stat { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.lesson-stats .stat-text { font-size: 15px; font-weight: 600; min-height: 39px; display: flex; align-items: flex-end; }
.lesson-group { margin-top: 16px; display: grid; gap: 12px; }
.lesson-group > p { margin: 0; }
.lesson-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lesson-head h2, details.lesson-group summary h2 { font-size: 17px; }
details.lesson-group summary { cursor: pointer; list-style-position: inside; }
details.lesson-group summary h2 { display: inline; }
.lesson { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.lesson p { margin: 0; }
.lesson-text { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); resize: vertical; }
.lesson-static { font-size: 14px; color: var(--ink-2); }
.lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) { .lesson-stats { grid-template-columns: 1fr; } }

/* Backlog page */
.backlog-status { display: grid; gap: 16px; margin-bottom: 24px; }
.backlog-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 500; }
.backlog-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.backlog-stats { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.backlog-settings { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.backlog-settings input { width: 110px; }
.backlog-item { display: grid; gap: 8px; align-content: start; }
.backlog-item.rejected .project { opacity: .45; }
.backlog-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 4px; }
@media (max-width: 700px) { .backlog-stats { grid-template-columns: repeat(2, 1fr); } }
.backlog-batch { margin-bottom: 28px; }

/* The client's choice from their next steps page (project page) */
.client-choice { margin-bottom: 18px; }
.client-choice-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.client-choice-head h3 { margin: 0; }
.client-choice p { margin: 6px 0 0; }
.client-choice-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
