/* Home Ideas sponsor portal. Brand: #829ea9 (primary), #2e2e2e (dark), Figtree. */
:root {
  --brand: #829ea9;
  --brand-dark: #5f7c88;
  --ink: #2e2e2e;
  --muted: #5c5c5c;
  --line: #e2e6e8;
  --bg: #f6f8f9;
  --card: #fff;
  --ok: #1f7a4d;
  --ok-bg: #e8f5ee;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --info: #285b8f;
  --info-bg: #e8f1fa;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Figtree', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--brand-dark); }
a:hover { color: var(--ink); }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
code { background: #eef1f3; padding: 1px 5px; border-radius: 4px; }
pre { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 6px 0 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.brand-logo { display: block; height: 36px; width: auto; }   /* the site header's logo (.img-1, 36px tall) */
.brand-sub { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a[aria-current] { background: var(--bg); color: var(--ink); font-weight: 600; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
/* Admin header: four menus (Sponsors, Review, Leads, Admin) so it stays on one line (client, Oct 27 2026) */
.nav-groups { gap: 2px; flex-wrap: nowrap; }
.navgroup { position: relative; }
.navgroup > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none; }
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary:hover, .navgroup[open] > summary { background: var(--bg); color: var(--ink); }
.navgroup > summary.here { background: var(--bg); color: var(--ink); font-weight: 600; }
.navcaret { width: 7px; height: 7px; margin: -3px 0 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.navgroup[open] .navcaret { transform: rotate(-135deg); margin-top: 3px; }
.navmenu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 200px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(31, 41, 46, .12); }
.navmenu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.navgroup:last-child .navmenu { left: auto; right: 0; }
.who form { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
.bare .wrap { max-width: 760px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.headactions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.eyebrow a { color: var(--muted); }
.lead { font-size: 16px; color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.help { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.card.narrow { max-width: 440px; margin: 40px auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + * { margin-top: 20px; }
.stack > * + * { margin-top: 14px; }
.row, .row3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row3 { grid-template-columns: 2fr 1fr 1fr; }
.row-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row-inline input:not([type=checkbox]):not([type=radio]), .row-inline select { width: auto; flex: 1 1 180px; }
.row-inline .check { margin: 0; flex: 0 1 auto; white-space: nowrap; }
.check input, .radio input { width: auto; flex: none; margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card + .actions { margin: -4px 0 28px; }             /* a form's buttons after its last card: room before the next card */
form.inline { display: inline; margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 22px; overflow-x: auto; }
.tabs a { text-decoration: none; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

/* Forms */
.field label, legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d0d4; border-radius: 8px; padding: 9px 12px; }
/* Dropdowns: our own arrow, set in from the right edge with room before it (client, Oct 27 2026) */
select { -webkit-appearance: none; appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235c5c5c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; text-overflow: ellipsis; }
select[multiple] { padding-right: 12px; background-image: none; }
/* File pickers: the portal's outlined pill button, not the browser's grey one (client, Oct 27 2026) */
input[type=file] { max-width: 100%; font: inherit; font-size: 14px; color: var(--muted); }
input[type=file]::file-selector-button { margin-right: 12px; padding: 9px 20px; border: 1px solid var(--ink); border-radius: 22px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
input[type=file]::file-selector-button:hover { background: var(--ink); color: #fff; }
input[type=file]:focus-visible { outline: none; }
input[type=file]:focus-visible::file-selector-button { outline: 2px solid var(--ink); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid rgba(46,46,46,.15); outline-offset: 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 14px 0 0; }
fieldset > legend { padding: 0 6px; margin: 0; }
.check, .radio { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
.linkto input { margin-top: 6px; }
.colorpick { display: flex; gap: 8px; }
.colorpick input[type=color] { width: 48px; height: 40px; padding: 2px; border: 1px solid #c9d0d4; border-radius: 8px; background: #fff; flex: none; }
.hours { display: grid; gap: 8px; }
.hrow { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.hrow label { font-weight: 500; }
.count { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }

.btn, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px; border-radius: 22px; padding: 10px 20px; cursor: pointer; text-decoration: none; border: 1px solid var(--ink); }
.btn { background: var(--ink); color: #fff; }
.btn:hover { background: #000; color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* Primary action in the Home Ideas brand slate, darkened for white text (4.95:1, the site's readable brand shade) */
.btn.btn-primary { background: #4f6b76; border-color: #4f6b76; }
.btn.btn-primary:hover { background: #3e5660; border-color: #3e5660; }
.btn.btn-primary:focus-visible, .btn-ghost:focus-visible { outline: 3px solid rgba(79,107,118,.35); outline-offset: 2px; }
.auth-actions { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; }   /* the two buttons share the row equally */
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.danger { border-color: var(--bad); }
.btn.danger { background: var(--bad); }
.btn-ghost.danger { color: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-dark); text-decoration: underline; cursor: pointer; font-size: 14px; }
.linkbtn.danger { color: var(--bad); }
.howto code { word-break: break-all; }   /* the reCAPTCHA site key in the Spam protection steps, on phones */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.copy { margin-top: 8px; font-size: 13px; }

/* Messages and badges */
.flash { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid transparent; }
.flash-ok { background: var(--ok-bg); border-color: #bfe3cf; }
.flash-bad { background: var(--bad-bg); border-color: #f4c3be; }
.flash-info { background: var(--info-bg); border-color: #c6dbf0; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; background: #eef1f3; color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #eef1f3; color: var(--muted); }

.submitbox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; max-width: 380px; }
.submitbox p { margin: 0 0 6px; }
.submitbox form { margin-top: 8px; }

/* Tables */
.tablewrap { position: relative; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.card .tablewrap { border: 0; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); background: #fafbfc; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.msg { max-width: 420px; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }   /* Leads list: the lead's page shows it all */
.leadname { font-weight: 600; color: var(--ink); }
.nowrap { white-space: nowrap; }
.leadtitle { margin: 0 0 16px; }
.diff td { width: 40%; }
.rv { max-width: 260px; max-height: 260px; width: auto; height: auto; border: 1px solid var(--line); display: block; }

/* Checklists, caps, users */
.checklist { list-style: none; padding: 0; margin: 0 0 18px; }
.checklist li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .done > span:first-child { color: var(--ok); font-weight: 700; }
.checklist .todo > span:first-child { color: var(--muted); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.caps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.cap { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.capn { font-weight: 700; }
.cap-full { background: var(--warn-bg); }
.placements { list-style: none; padding: 0; margin: 0 0 12px; }
.placements > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.placements summary { cursor: pointer; line-height: 1.6; }
.placements form.stack { margin-top: 12px; }
.placements .pmove { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0 16px; font-size: 14px; }
.placements .pmove label { font-weight: 600; margin: 0; }
.placements .pmove select { width: auto; max-width: 100%; min-width: 0; }
.placements .pmove .btn-ghost { padding: 4px 12px; }
.addplace > summary { display: inline-block; list-style: none; cursor: pointer; }
.addplace > summary::-webkit-details-marker { display: none; }
.addplace[open] > summary { margin-bottom: 12px; }
.users { list-style: none; padding: 0; margin: 0; }
.users li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--bad); }

/* Featured Pros card mock-up (matches the site's .bx-117) */
.fcard { border: 1px solid var(--line); background: #fff; max-width: 340px; }
.fcard img, .fcard .ph { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fcard-body { padding: 14px 16px 16px; }
.fcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pill { font-size: 10px; letter-spacing: 1.5px; font-weight: 600; background: var(--brand); color: #fff; padding: 4px 10px; border-radius: 12px; }
.fcard-tag { display: block; font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.fcard p { font-size: 14px; margin: 0 0 10px; }
.fcard-link { font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.ph { background: repeating-linear-gradient(45deg, #f2f5f6, #f2f5f6 12px, #eaeef0 12px, #eaeef0 24px); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* Upload slots */
.slothead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.spec { font-size: 13px; font-weight: 600; color: var(--info); margin: 0 0 6px; }
.slotbody { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 24px; align-items: start; }
.slotprev { max-width: 300px; }
.slotimg { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fafbfc; }   /* rounded like the site's ad tiles */
.slotimg.ph { width: 100%; }
.ar-1-2 { aspect-ratio: 1 / 2; max-width: 200px; }
.ar-6-5 { aspect-ratio: 6 / 5; }
.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-7-3 { aspect-ratio: 7 / 3; }
.filecheck { font-size: 13px; margin: 6px 0 0; }
.filecheck.ok { color: var(--ok); }
.filecheck.bad { color: var(--bad); }
.filecheck.info { color: var(--info); }
/* Crop tool for ad and photo uploads (portal.js) */
.cropper { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: grid; gap: 14px; }
.crop-stage { position: relative; display: inline-block; justify-self: start; max-width: 100%; line-height: 0; overflow: hidden; touch-action: none; user-select: none; background: #ddd; }
.crop-stage img { display: block; max-width: 100%; max-height: 460px; width: auto; height: auto; pointer-events: none; }
.crop-box { position: absolute; outline: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 0 9999px rgba(20,24,26,.55); cursor: move; }
.crop-box:focus-visible { outline: 3px solid var(--brand); }
.crop-h { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--brand-dark); border-radius: 3px; }
.crop-h[data-h=nw] { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-h[data-h=ne] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-h[data-h=sw] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-h[data-h=se] { right: -8px; bottom: -8px; cursor: nwse-resize; }
@media (pointer: coarse) { .crop-h { width: 24px; height: 24px; } .crop-h[data-h=nw], .crop-h[data-h=sw] { left: -12px; } .crop-h[data-h=ne], .crop-h[data-h=se] { right: -12px; } .crop-h[data-h=nw], .crop-h[data-h=ne] { top: -12px; } .crop-h[data-h=sw], .crop-h[data-h=se] { bottom: -12px; } }
.crop-tools { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.crop-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.crop-label input, .crop-label select { display: block; margin-top: 4px; font-weight: 400; accent-color: var(--brand-dark); }
.crop-side { flex: 1 1 220px; min-width: 0; }
.crop-align { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.crop-align button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; position: relative; }
.crop-align button:hover, .crop-align button:focus-visible { border-color: var(--brand-dark); }
.crop-align i { position: absolute; width: 10px; height: 10px; border-radius: 2px; background: var(--brand-dark); }
.crop-align button:nth-child(3n+1) i { left: 5px; } .crop-align button:nth-child(3n+2) i { left: 11px; } .crop-align button:nth-child(3n) i { right: 5px; }
.crop-align button:nth-child(-n+3) i { top: 5px; } .crop-align button:nth-child(n+4):nth-child(-n+6) i { top: 11px; } .crop-align button:nth-child(n+7) i { bottom: 5px; }
.crop-info { font-size: 13px; margin: 4px 0 0; color: var(--muted); }
.crop-info.bad { color: var(--bad); }

@media (max-width: 800px) {
  .grid2, .row, .row3, .slotbody { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 20px 16px 48px; }
  .top { padding: 12px 16px; gap: 12px; }
  .brand-logo { height: 28px; }
  .nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -4px; }   /* one scrollable row under the logo */
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .nav-groups { overflow: visible; margin: 0 -8px; }   /* the four menus fit; their menus open below */
  .navgroup > summary { padding: 6px 8px; }
  .who { margin-left: auto; }
  .card { padding: 18px 16px; }
  .submitbox { max-width: none; width: 100%; }
}

/* Analytics */
.rangebar { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
/* Phones: From – To on one row, Apply full width under them (no dash left at a line end). */
@media (max-width: 640px) {
  .rangebar .rangeform { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; width: 100%; margin-top: 0; }
  .rangebar .rangeform input[type=date] { width: 100%; min-width: 0; }
  .rangebar .rangeform button { grid-column: 1 / -1; }
  .rangebar .seg { display: flex; width: 100%; }
  .rangebar .seg a { flex: 1 1 0; text-align: center; white-space: nowrap; padding: 8px 6px; font-size: 13px; }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 22px; background: #fff; overflow: hidden; }
.seg a { text-decoration: none; color: var(--muted); padding: 8px 14px; font-size: 14px; font-weight: 500; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a[aria-current] { background: var(--ink); color: #fff; }
.rangeform { margin: 0; flex-wrap: nowrap; }
.rangeform input[type=date] { flex: 0 1 auto; width: 160px; min-width: 0; }
.kpis + .tablewrap td:first-child { min-width: 180px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 16px 0 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi p { margin: 0; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-num { font-size: 28px; font-weight: 700; line-height: 1.25; }
.kpi-sub { font-size: 13px; }
.delta { font-weight: 600; color: var(--muted); }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.chart { margin: 8px 0 18px; }
.chart figcaption { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.chart-plot { position: relative; padding-left: 34px; }
.chart svg { display: block; width: 100%; height: 150px; }
.chart .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-y, .chart-x { font-size: 12px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-y { position: absolute; left: 0; width: 30px; text-align: right; }
.chart-y-max { top: 0; }
.chart-y-0 { bottom: 0; }
.chart-x { display: flex; justify-content: space-between; padding: 6px 0 0 34px; }
.bar-views { fill: var(--brand); }
.bar-clicks { fill: var(--brand-dark); }
.bar-leads { fill: var(--ok); }
.chart rect:hover { opacity: .75; }
th.num, td.num { text-align: right; white-space: nowrap; }
.notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.notes li + li { margin-top: 4px; }
@media (max-width: 800px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-num { font-size: 22px; }
  .rangeform { flex-wrap: wrap; }
}

/* FAQs: an FAQ that repeats one elsewhere on the site */
fieldset.faq-dup { border-color: #f4c3be; background: var(--bad-bg); }

/* Projects tab (pages/projects.php) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); color: inherit; text-decoration: none; }
.pcard:hover { border-color: var(--brand); }
.pcard img, .pcard .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pcard .ph, .pphoto-img .ph { display: flex; align-items: center; justify-content: center; background: #eef1f3; color: var(--muted); }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.pcard-body .badge { align-self: flex-start; }
.pphotos { display: grid; gap: 16px; }
.pphoto { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.pphoto.is-untagged { border-color: #e9c46a; background: #fffcf3; }
.pphoto-img { position: relative; }
.pphoto-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.pphoto-img .pill { position: absolute; left: 8px; top: 8px; background: #fff; color: var(--ink); letter-spacing: 0; border-radius: 12px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.pphoto-img .pill-warn { left: auto; right: 8px; background: var(--warn-bg); color: var(--warn); }
.pphoto-fields .field { margin-bottom: 10px; }
.pphoto-fields details { margin: 4px 0 10px; }
.pphoto-fields summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); }
.pphoto-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pphoto-actions .btn-ghost { padding: 4px 12px; }
.check.danger { color: var(--bad); }
.uplist { margin: 12px 0 0; padding-left: 20px; font-size: 14px; }
.uplist li { margin: 3px 0; }
.uplist li.ok { color: var(--ok); }
.uplist li.bad { color: var(--bad); }
.sitephotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sitephoto { display: flex; flex-direction: column; gap: 4px; font-size: 13px; cursor: pointer; }
.sitephoto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.sitephoto span:first-of-type { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.sitephoto input { width: auto; margin: 0; }
.sitephoto.is-hidden img { opacity: .35; filter: grayscale(1); }
.rvstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.rvstrip figure { margin: 0; font-size: 12px; }
.rvstrip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
@media (max-width: 700px) { .pphoto { grid-template-columns: 1fr; } }

/* Sponsor leads (pages/sponsor_leads.php) */
/* Action counts: Apple-style badges (iOS red, white figures centered in the circle; client, Oct 27 2026) */
.navcount { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0; vertical-align: middle; }
.navgroup[open] > summary .navcount-sum { display: none; }   /* open: the count shows on the item that needs action */
.slead .slothead h2 { margin: 0 0 4px; }
.slead-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 16px; font-size: 14px; }
.slead-dl dt { color: var(--muted); font-weight: 600; }
.slead-dl dd { margin: 0; overflow-wrap: anywhere; }
.slead-form { flex-wrap: wrap; gap: 8px; }
.slead-form input[type="text"] { flex: 1 1 260px; }
@media (max-width: 640px) {
  .slead-dl { grid-template-columns: 1fr; gap: 2px; }
  .slead-dl dd { margin-bottom: 8px; }
}
.slead-form select { width: auto; flex: 0 0 auto; }
.pagehead .btn-ghost[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Photo upload link (upload.php) and Photo review (pages/photos.php), client Oct 20 2026 */
.card.narrow.upl { max-width: 760px; }
.uphead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.codein { font-size: 22px; letter-spacing: 6px; max-width: 220px; font-variant-numeric: tabular-nums; }
.pickwrap { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.pickwrap legend { font-weight: 600; margin-bottom: 6px; }
.pickproj { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.pickproj:has(input:checked) { border-color: var(--brand-dark); box-shadow: 0 0 0 1px var(--brand-dark); }
.pickproj input { margin-top: 4px; }
.newproj[hidden] { display: none; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 20px 28px; border: 2px dashed #b9c8ce; border-radius: 14px; background: #f7fafb; color: var(--brand-dark); text-align: center; transition: background .15s, border-color .15s; }
.dropzone.is-over { border-color: var(--brand-dark); background: #e9f2f5; }
.dropzone p { margin: 0; }
.dz-t { font-size: 18px; color: var(--ink); }
.dz-h { font-size: 13px; margin-top: 8px !important; }
.dz-pick { position: relative; overflow: hidden; margin: 6px 0 2px; }
.dz-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.dz-pick:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.up-sum { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--info-bg); color: var(--info); font-weight: 600; }
.up-sum.is-ok { background: var(--ok-bg); color: var(--ok); }
.up-sum.is-bad { background: var(--bad-bg); color: var(--bad); }
.upsubmit { display: flex; justify-content: center; margin: 32px 0 0; padding: 28px 0 4px; border-top: 1px solid var(--line); }   /* room after the photo grid (client, Oct 27 2026) */
.upsubmit[hidden], .updone[hidden], .dropzone[hidden], .upgrid[hidden], .up-sum[hidden] { display: none; }
.upsubmit .btn { min-width: 260px; padding: 14px 32px; font-size: 15px; }
.upl [data-upload-note] { margin: 18px 0 4px; text-align: center; font-size: 13px; }
.upsubmit .btn:disabled { opacity: .55; }
.updone { text-align: center; padding: 28px 16px 8px; color: var(--ink); outline: none; }
.updone svg { color: var(--ok); }
.updone h2 { margin: 10px 0 6px; font-size: 22px; }
.updone p { margin: 0 auto 16px; max-width: 460px; color: var(--muted); }
.updone .actions { justify-content: center; }
.upgrid { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.up-item { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.up-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #eef1f3; }
.up-item.is-busy img { opacity: .6; }
.up-item.is-ok .up-st { color: var(--ok); }
.up-item.is-bad .up-st { color: var(--bad); }
.up-st { line-height: 1.35; }
.linkcode { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.linkcode .copy { flex: 1; min-width: 220px; }
.linkcode .code { font-size: 22px; font-weight: 700; letter-spacing: 4px; font-variant-numeric: tabular-nums; padding: 4px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.rvacct { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rvproj { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rvproj-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rvproj-head h3 { margin: 0; }
.rvgrid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rvph { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.rvph.is-untagged { border-color: #e9c46a; }
.rvph-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef1f3; }
.rvph-body { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.rvph-by { grid-column: 1 / -1; font-size: 12px; margin: 0; }
.tagf { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.tagf.wide { grid-column: 1 / -1; }
.tagf input, .tagf select { font: inherit; font-size: 13px; color: var(--ink); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.tagf select { padding-right: 28px; background-position: right 9px center; }
.rvph-acts { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 640px) { .rvph-body { grid-template-columns: 1fr; } .uphead { flex-direction: column; } }

/* Payment for a new sponsorship (lib/payments.php) */
.pay { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 6px 0 0; background: #fbfcfc; }
.pay legend { font-weight: 700; padding: 0 6px; }
.paym { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 10px; }
.paycard[hidden] { display: none; }
.paycard-l { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.paycard-el { padding: 12px; border: 1px solid #cfd6da; border-radius: 8px; background: #fff; min-height: 44px; }
.paycard-el.StripeElement--focus { border-color: var(--brand-dark); box-shadow: 0 0 0 1px var(--brand-dark); }
.paycard-el.StripeElement--invalid { border-color: var(--bad); }

/* Advertiser Login (my.php; client, Oct 27 2026) */
.advl .btn-primary { width: 100%; justify-content: center; }
.pickacct { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.pickacct:hover { border-color: var(--ink); }
.advtop .eyebrow form.inline .linkbtn { font-size: inherit; letter-spacing: inherit; text-transform: inherit; }
.advproj h2 { margin: 0 0 4px; font-size: 18px; }
.advhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.advhead .muted { margin: 0; }
.advgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.advph { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.advph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #eef1f3; }
.advst { font-weight: 600; color: var(--ok); }
.advph.is-wait .advst { color: var(--warn); }
.advph form { margin: 0; }
@media (max-width: 640px) { .advhead { flex-direction: column; } .advgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
