/* Signed-in app (layout "application",body.app). Built from the canvas "App screens" boards; tokens follow the design system. Landing (.lp) and report (.rp) have their own sheets. */
.app,.app * { box-sizing: border-box; }
html:has(body.app),body.app { margin: 0; background: var(--surface); min-height: 100%; }
.app { font-family: var(--font); color: var(--ink); background: var(--surface); min-height: 100vh; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
.app h1,.app h2,.app h3,.app p,.app dl,.app dd,.app figure { margin: 0; }
.app p,.app li,.app dd { text-wrap: pretty; }
.app a { color: inherit; }
.app .icon { flex: none; display: inline-block; vertical-align: middle; }
.app .muted { color: var(--muted); } .app .slate { color: var(--slate); } .app .sm { font-size: 14px; } .app .xs { font-size: 13px; }
.app .wrap { max-width: calc(1100px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); } /* 1100 px of content, as on the canvas */
.app .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
/* Top bar (canvas AppHeader): 44 px controls on a white bar, the current section on a teal-50 pill
   (teal-800 on teal-50 6.82:1). Phones: logo mark, New audit and the account menu, then the sections
   on a second row that scrolls sideways if it must. */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top .top-in { display: flex; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.top .top-logo { display: flex; align-items: center; min-height: 44px; border-radius: var(--r-sm); }
/* A running offer (shared/_promo_banner): one quiet line under the top bar, in the flow, never over content.
   On --teal-50: ink 16.25:1, --teal-800 link 6.82:1, --slate close icon 8.57:1, focus ring --teal 4.65:1. */
.promo { background: var(--teal-50); border-bottom: 1px solid var(--line); }
.promo .promo-in { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
.promo p { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.promo strong { font-weight: 800; }
.promo .promo-end { white-space: nowrap; } /* "until Dec 1." stays on one line on phones */
.promo .lnk { color: var(--teal-800); white-space: nowrap; }
.promo .promo-x { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--slate); cursor: pointer; }
.promo .promo-x:hover { background: var(--white); color: var(--ink); }
.top .nav { display: flex; gap: 4px; margin-right: auto; }
.top .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r); font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top .nav a[aria-current] { background: var(--teal-50); color: var(--teal-800); font-weight: 700; }
.top .nav a:hover { background: var(--surface); }
.top .nav a[aria-current]:hover { background: var(--teal-50); }
.top .left { font-size: 14px; color: var(--slate); white-space: nowrap; }
.top .left strong { color: var(--ink); }
.top .top-new { min-height: 44px; padding: 0 18px; font-size: 15px; }
.top .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; } /* white on teal 5.19:1 */

.app main { padding: 40px 0 80px; }

/* type and buttons */
.app .h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.app .h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.app .lead { font-size: 16px; line-height: 1.55; color: var(--slate); }
/* Buttons: primary teal (white 5.19:1), secondary white with a --border edge (3.84:1; the canvas's
   #c7cdd4 is 1.5:1), quiet row actions (btn-q) in ink with a fill on hover. Compact ones are 44 px. */
.app .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ctl); padding: 0 20px; border-radius: var(--r); font: 700 16px/1 var(--font); white-space: nowrap; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.app .btn-p { background: var(--teal); color: #fff; }
.app .btn-p:hover { background: var(--teal-800); }
.app .btn-s { background: #fff; color: var(--ink); border-color: var(--border); }
.app .btn-s:hover { background: var(--surface); }
/* Disabled: muted on chip (5.1:1), not faded, so the label stays readable. */
.app .btn:is(:disabled, [aria-disabled=true]),.app .btn:is(:disabled, [aria-disabled=true]):hover { background: var(--chip); color: var(--muted); border-color: var(--chip); cursor: not-allowed; }
.app .btn-t { background: transparent; color: var(--teal); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.app .btn-sm { min-height: 44px; padding: 0 12px; font-size: 14px; }
.app .btn-t.btn-sm { padding: 0; min-height: var(--ctl-sm); }
/* Quiet row actions: icon and text, a fill only on hover. */
.app .btn-q { background: transparent; color: var(--ink); border: 1px solid transparent; }
.app .btn-q:hover { background: var(--chip); }
.app .btn-icon { width: 44px; padding: 0; }
/* An icon-only copy button says "Copied" beside itself for 2 seconds (copy_controller.js). */
.app [data-controller~=copy].is-copied { position: relative; }
.app [data-controller~=copy].is-copied::after { content: "Copied"; position: absolute; bottom: calc(100% + 4px); left: 50%; translate: -50% 0; padding: 4px 8px; border-radius: var(--r-tag); background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.app button.lnk { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.app .btn-block { width: 100%; }
/* Tags: a word on a tint in a round pill (canvas), with an icon where it says a state. Ratios: slate on
   chip 8.44:1, teal-800 on teal-50 6.82:1, amber on amber-50 7.15:1, red on red-50 5.76:1. */
.app .tag { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.app .t-ready { background: var(--amber-50); color: var(--amber); } /* a draft whose questions wait for a look */
.app .t-done { background: var(--teal-50); color: var(--teal-800); }
.app .t-run { background: var(--teal-50); color: var(--teal-800); } /* working: teal, with the spinner */
.app .t-draft { background: var(--chip); color: var(--slate); } /* one chip anatomy: tint fill, icon and word, never an outline (outlines read as buttons) */
.app .t-fail { background: var(--red-50); color: var(--red); }
.app .card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); }
.app .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: var(--title-gap); }
.app .page-head .lead { margin-top: 6px; }
.app .lead .spin { margin-right: 10px; vertical-align: -1px; color: var(--teal); }
.app .scan-wait { display: flex; flex-direction: column; gap: 14px; max-width: 720px; padding: var(--card-pad-sm) var(--card-pad); margin-bottom: 24px; }

/* form */
.app .field { display: flex; flex-direction: column; gap: 6px; }
.app .label { font-size: 14px; font-weight: 700; }
.app .opt { font-weight: 500; color: var(--muted); }
.app .input { display: flex; align-items: center; min-height: var(--ctl); border: 1px solid var(--border); border-radius: var(--r); padding: 0 14px; font-size: 16px; background: #fff; color: var(--ink); gap: 8px; }
.app .help { font-size: 14px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }


/* Below 1000 px the one-row bar no longer fits: the sections move to a second row (canvas AppAuditsMobile). */
@media (max-width: 1000px) {
  .top .top-in { flex-wrap: wrap; column-gap: 12px; }
  .top .left { display: none; }
  .top .top-logo { margin-right: auto; }
  .top .nav { order: 4; flex: 1 1 100%; margin: -4px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 760px) {
  .app .wrap { padding: 0 var(--gutter-sm); }
  .top .top-logo { width: 30px; overflow: hidden; } /* the lockup's square mark only */
  .top .top-logo img { max-width: none; }
  .top .nav a { padding: 0 12px; }

  .app main { padding: 24px 0 48px; }
  .app .h1 { font-size: 26px; }
  .app .page-head { flex-direction: column; align-items: stretch; }
}

.app .t-wait { background: var(--chip); color: var(--slate); }
.app .t-due { background: var(--teal); color: #fff; } /* an email to send today: 5.2:1 */
.app .t-due .icon { color: #fff; }
.app .seq-due { margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--ink); }
.app .seq { margin-top: 2px; }
.app .seq-note { margin-top: 4px; max-width: 260px; }
.app .seq-links { display: flex; gap: 12px; }
.app button.lnk-quiet { background: none; border: 0; padding: 0; min-height: 24px; font: inherit; font-size: 13px; cursor: pointer; }
.app .seq-help { margin-top: 12px; max-width: 640px; }
.app .t-delta { background: var(--chip); color: var(--slate); margin-left: 6px; font-variant-numeric: tabular-nums; }
.app .lnk { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.app .lnk:hover { color: var(--teal-800); }
/* A reference inside a list row (a website, an email): readable but quiet, so it does not compete with the row's actions. */
.app .lnk-quiet { color: var(--slate); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; } /* an underline, not color alone, says it is a link */
.app .lnk-quiet:hover, .app .lnk-quiet:focus-visible { color: var(--teal-800); text-decoration-color: currentColor; }
.app .phone-only { display: none; }
@media (max-width: 760px) { .app .phone-only { display: inline; } }


/* Not overflow: hidden, so a row's Actions menu can open past the card's edge; the corner cells round instead. */
.app .tbl-card thead tr:first-child > :first-child { border-top-left-radius: calc(var(--r-card) - 1px); }
.app .tbl-card thead tr:first-child > :last-child { border-top-right-radius: calc(var(--r-card) - 1px); }
.app .tbl-card tbody tr:last-child > :first-child { border-bottom-left-radius: calc(var(--r-card) - 1px); }
.app .tbl-card tbody tr:last-child > :last-child { border-bottom-right-radius: calc(var(--r-card) - 1px); }
/* A row's Actions menu (prospect lists): the button, and a panel of quiet actions under it. */
.app .row-menu { position: relative; }
.app .row-menu summary { list-style: none; }
.app .row-menu summary::-webkit-details-marker { display: none; }
.app .row-menu[open] summary .icon { transform: rotate(180deg); }
.app .row-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; padding: 8px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.app .row-menu-panel .btn, .app .row-menu-panel form, .app .row-menu-panel > span { width: 100%; }
.app .row-menu-panel .btn { justify-content: flex-start; font-weight: 600; }
.app .row-menu-panel .btn.is-due { font-weight: 800; } /* the email due today leads the menu */
@media (max-width: 760px) { .app .row-menu-panel { left: 0; right: auto; } }
.app .tbl { width: 100%; border-collapse: collapse; }
/* Tables (canvas AppAudits): column labels in small caps on a grey band (muted on surface 5.51:1),
   cells in slate, the row's name in ink. */
.app .tbl th,.app .tbl td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--slate); vertical-align: middle; }
.app .tbl thead th { background: var(--surface); font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.app .tbl thead th.th-act { text-align: right; }
.app .tbl tbody tr:last-child th,.app .tbl tbody tr:last-child td { border-bottom: 0; }
.app .tbl tbody th { font-weight: 500; color: var(--ink); }
.app .biz-line { display: flex; align-items: center; gap: 8px; }
.app .biz { display: block; font-weight: 700; text-decoration: none; font-size: 15px; color: var(--ink); }
.app a.biz:hover { text-decoration: underline; text-underline-offset: 3px; }
.app .res { display: inline-flex; flex-direction: column; gap: 6px; }
.app .res-n { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.app .res strong { font-size: 15px; color: var(--ink); }
/* The share named as a bar under "N of M" (RunsHelper#run_result); decorative, the text says it. */
.app .rbar { display: block; width: 120px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.app .rbar span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.app .opened { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--teal-800); }
.app .act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.app .act > * { flex: none; }
.app .opened-wrap { display: inline-flex; flex-direction: column; gap: 2px; }
.app .opened-wrap > .xs { white-space: nowrap; } /* "Last opened about 3 hours ago" on one line */
/* "Opened N times" opens the newest reads (RunsHelper#run_opened_reads). */
.app .opened-reads summary { min-height: 24px; cursor: pointer; list-style: none; border-radius: var(--r-sm); }
.app .opened-reads summary::-webkit-details-marker { display: none; }
.app .opened-reads summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.app .opened-reads summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.app .opened-reads[open] summary .icon:last-child { transform: rotate(180deg); }
.app .tbl tr:has(.opened-reads[open]) > * { vertical-align: top; } /* the row stays readable while the reads are open */
.app .opened-panel .read-count { margin: 0 0 8px; font-size: 13px; color: var(--slate); }
.app .opened-panel { margin: 6px 0 4px; padding: 10px 12px; max-width: 17rem; border-radius: var(--r-sm); background: var(--surface); }
.app .opened-panel .reads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.app .opened-panel .reads li { display: grid; gap: 1px; font-size: 13px; line-height: 1.4; white-space: normal; }
.app .opened-panel .read-when { color: var(--slate); }
.app .opened-panel .read-what { color: var(--ink); }
.app .opened-panel .read-what strong { font-weight: 800; }
.app .opened-panel .read-credit { margin-top: 6px; font-size: 12px; }
.app .opened-panel .read-credit a { display: inline-flex; align-items: center; min-height: 24px; color: var(--slate); }
.app .opened-panel .lnk { display: inline-flex; align-items: center; min-height: 24px; margin-top: 6px; }
.app .mlist { display: none; list-style: none; margin: 0; padding: 0; }
/* Below 1100 px the wide tables no longer fit beside their actions: each becomes a list of rows. */
@media (max-width: 1100px) {
  .app .tbl-card { display: none; }
  .app .mlist { display: flex; flex-direction: column; gap: 12px; }
  .app .mrow { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--card-pad-sm); display: flex; flex-direction: column; gap: 6px; }
  .app .mrow-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .app .mrow-act { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; align-items: center; }
  .app .mrow-act .btn { flex: none; }
  /* one card with a rule between rows (Audits), rather than a card per row */
  .app .mlist-card { gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
  .app .mlist-card .mrow { border: 0; border-radius: 0; border-top: 1px solid var(--line); gap: 8px; padding: 18px 16px; }
  .app .mlist-card .mrow:first-child { border-top: 0; }
  .app .mlist-card:has(.row-menu) { overflow: visible; } /* the Actions menu of the last rows opens past the card */
  .app .mlist-card:has(.row-menu) .mrow:first-child { border-radius: var(--r-card) var(--r-card) 0 0; }
  .app .mlist-card:has(.row-menu) .mrow:last-child { border-radius: 0 0 var(--r-card) var(--r-card); }
  .app .mlist-card .mrow-top { justify-content: flex-start; }
  .app .mrow-k { display: block; margin-bottom: 2px; }
  .app .mlist-card .mrow-act { margin: 4px 0 0 -8px; gap: 0; } /* the first action's icon lines up with the text */
  .app .mlist-card .mrow-act .btn-s { margin-left: 8px; }
  .app .mlist-card .btn-q { padding: 0 8px; }
  /* In a row the Actions menu opens from the row's left edge, wherever its summary sits, so it never leaves the screen */
  .app .mrow-act { position: relative; }
  .app .mrow-act .row-menu { position: static; }
  .app .mrow-act .row-menu-panel { left: 0; right: auto; max-width: 100%; }
}
@media (max-width: 760px) {
  .app .page-head .btn { width: 100%; }
  .app .pager { flex-direction: column; align-items: flex-start; }
}


.app .empty { padding: 56px 40px; }
.app .h1-sm { font-size: 26px; }
.app .empty-in { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.app .empty-in > .icon { color: var(--teal); }
.app .esteps { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.app .esteps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.app .esteps .n { width: 28px; height: 28px; border-radius: 50%; background: var(--teal-50); color: var(--teal-800); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.app .esteps strong { font-size: 16px; }
.app .esteps p { margin-top: 2px; }
@media (max-width: 760px) { .app .empty { padding: 32px var(--card-pad-sm); } .app .empty-in .btn { width: 100%; } }


.app .narrow { max-width: 720px; margin: 0 auto; }
.app .narrow.page { max-width: none; margin: 0; }
.app .back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 700; color: var(--teal); text-decoration: none; margin: -12px 0 4px; border-radius: var(--r-sm); } /* a 44 px target; the negative margin keeps the canvas spacing */
.app .back:hover { text-decoration: underline; text-underline-offset: 3px; }
.app .narrow > .lead { margin-top: 6px; }
/* New audit (canvas AppNewAudit): the form card and "What happens next" beside it, 960 px together. */
.app .form-page { max-width: 960px; margin: 0 auto; }
.app .form-page > .lead { margin-top: 6px; }
/* The empty dashboard (dashboard/_first_audit): the New audit form on the dashboard's own left edge. */
.app .first-audit > .lead { margin-top: 6px; }
.app .form-grid { display: grid; grid-template-columns: minmax(0, 612px) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: var(--title-gap); }
.app .form-grid > .form { margin-top: 0; }
.app .kicker { font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }
.app .next-steps { padding-top: 6px; }
.app .next-steps .esteps { margin: 14px 0 0; gap: 18px; }
.app .next-steps .esteps li { align-items: start; }
.app .next-steps .esteps .n { background: var(--ink); color: #fff; font-size: 12px; } /* white on ink 18.16:1 */
.app .next-steps .esteps p { margin: 2px 0 0; font-size: 15px; line-height: 1.5; color: var(--slate); }
@media (max-width: 900px) { .app .form-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
/* Check the questions (canvas AppQuestions): the questions card, and "This audit" beside it with the count
   as the bold element and the two buttons stacked. Phones: the summary card follows the questions. */
.app .q-grid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 24px; align-items: start; margin-top: var(--title-gap); }
.app .q-grid > .form { margin-top: 0; }
.app .q-main .asks { margin: 0; border-top: 1px solid var(--line); }
.app .q-main .asks legend { float: left; width: 100%; padding-top: var(--field-gap); margin-bottom: 8px; } /* a floated legend sits under the rule, not in it */
.app .q-main .asks legend + * { clear: both; }
.app .q-side { padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.app .q-side .sum-count { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.app .q-side .sum-n { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); }
.app .q-side .sum-of { font-size: 14px; color: var(--slate); }
.app .q-side-foot { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.app .q-side-foot p { margin-bottom: 0; }
.app .q-side-foot .btn-p { order: 1; } .app .q-side-foot .btn-s { order: 2; } /* Run audit shows first; Save stays first in the form (Enter saves) */
@media (max-width: 860px) { .app .q-grid { grid-template-columns: minmax(0, 1fr); } }
.app .form { margin-top: var(--title-gap); padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--field-gap); }
.app .row3 { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 16px; align-items: start; }
.app .row3 .label { white-space: nowrap; }
/* New audit: the optional fields folded under one disclosure (B-61). */
.app .more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.app .more summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 0; cursor: pointer; list-style: none; font-size: 15px; color: var(--ink); }
.app .more summary:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.app .more summary::-webkit-details-marker { display: none; }
.app .more summary .icon { vertical-align: -3px; margin-left: 4px; color: var(--slate); transition: transform .15s; }
.app .more[open] summary .icon { transform: rotate(180deg); }
.app .more .more-what { display: block; margin-top: 2px; font-weight: 400; }
.app .more-in { display: flex; flex-direction: column; gap: var(--field-gap); padding: 8px 0 24px; }
@media (prefers-reduced-motion: reduce) { .app .more summary .icon { transition: none; } }
.app .form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding-top: 8px; }
@media (max-width: 760px) {
  .app .form { padding: var(--card-pad-sm); }
  .app .row3 { grid-template-columns: 1fr; }
}


.app .nw { white-space: nowrap; }
/* Question review: the business and its actions on one quiet line, the answer count below it. */
.app .sum { display: flex; flex-direction: column; gap: 6px; padding-bottom: 0; }
.app .sum-biz { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin: 0; }
.app .sum-act { display: flex; flex-wrap: wrap; gap: 0 16px; }
.app .sum-act .lnk { display: inline-flex; align-items: center; min-height: 24px; } /* WCAG 2.5.8: each its own target */
.app .sum-count { margin: 0; font-size: 16px; }
.app .qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.app .qrow { display: grid; grid-template-columns: 28px 1fr 44px 36px; gap: 10px; align-items: center; }
.app .qn { width: 28px; color: var(--slate); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .app .qtext { font-size: 15px; }
  .app .form-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .app .form-foot .btn-p { order: 2; } .app .form-foot .btn-s { order: 3; } .app .form-foot > span { order: 1; }
}


.app .big { font-size: 22px; }


/* Settings (canvas AppSettings): section links, the sections as cards, the preview beside them (sticky). */
.app .set-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr) 330px; gap: 24px; align-items: start; margin-top: var(--title-gap); }
.app .set-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.app .set-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r); font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
/* Hover is a grey chip so it never looks like the current section's teal-50 ground. Teal-800 on chip 6.7:1. */
.app .set-nav a:hover { background: var(--chip); color: var(--teal-800); }
/* The section in view (section_nav_controller): teal-50 ground and extra-bold ink (800 vs 600), so it is not
   shown by color alone; no bar on one side (Denis, Nov 26, 2026). Ink on teal-50 16.25:1. */
.app .set-nav a[aria-current] { background: var(--teal-50); color: var(--ink); font-weight: 800; }
@media (prefers-reduced-motion: no-preference) { html:has(.set-nav) { scroll-behavior: smooth; } }
.app .set-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.app .set-main > .card { margin-top: 0; max-width: none; scroll-margin-top: 16px; }
.app .set-h { font-size: 22px; letter-spacing: -0.02em; }
.app .set-p { font-size: 15px; line-height: 1.55; color: var(--slate); }
.app .set-off { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; }
.app .set-off .set-h { grid-column: 1 / -1; }
.app .set-off .form-foot { padding-top: 0; }
.app .invite-row { display: flex; gap: 8px; }
.app .invite-row .input { flex: 1; min-width: 0; }
.app .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 14px !important; }
.app .settings .preview { position: sticky; top: 16px; }
@media (max-width: 1100px) { .app .set-grid { grid-template-columns: minmax(0, 1fr) 300px; } .app .set-nav { display: none; } }
@media (max-width: 760px) {
  .app .set-off { grid-template-columns: minmax(0, 1fr); row-gap: 16px; } .app .invite-row { flex-direction: column; } .app .settings .preview { position: static; }
  /* one column: the preview follows the brand form it previews, before the other sections */
  .app .set-grid { display: flex; flex-direction: column; align-items: stretch; } /* stretch, or each card sizes to its widest field */
  .app .set-main { display: contents; }
  .app .set-main > #brand { order: 1; } .app .settings .preview { order: 2; } .app .set-main > :not(#brand) { order: 3; }
}
.app .colorrow { display: flex; gap: 10px; }
.app .swatch { width: var(--ctl); height: var(--ctl); border-radius: var(--r); border: 1px solid var(--border); flex: none; }
.app .colorrow .input { flex: 1; }
.app .note-w { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--slate); background: var(--chip); border-radius: 10px; padding: 10px 12px; }
.app .note-w .icon { margin-top: 2px; }
.app .preview { position: relative; display: flex; flex-direction: column; }
.app .pv { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--card-pad-sm); display: flex; flex-direction: column; gap: 20px; flex: 1; }
.app .pv > .pv-btn { margin-top: auto; }
.app .pv-over { font-size: 12px; font-weight: 700; color: var(--muted); margin: -4px 0 -8px; }
.app .pv-head .pv-name { flex: 1; min-width: 0; }
.app .pv-img { height: 30px; max-width: 96px; object-fit: contain; }
.app .pv-date { font-size: 12px; color: var(--muted); }
.app .pv-kicker { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.app .pv-deck { font-size: 14px; color: var(--slate); margin-top: 6px; }
.app .pv-st { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.app .pv-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.app .pv-board li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.app .pv-board .you { font-weight: 700; }
.app .pv-bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .pv-bar { grid-column: 1 / -1; grid-row: 2; height: 6px; border-radius: 3px; background: var(--chip); }
.app .pv-bar span { display: block; height: 100%; border-radius: 3px; background: var(--rival); } .app .pv-board .you .pv-bar span { background: var(--ag); }
.app .pv-n { grid-column: 2; grid-row: 1; font-weight: 700; }
.app .pv-head { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0 calc(-1 * var(--card-pad-sm)); padding: 12px var(--card-pad-sm); background: var(--ag); color: #fff; } /* the agency's color band, as on the canvas; white on --ag at least 4.5:1 (BrandColor) */
.app .pv-head .pv-date { color: #fff; }
.app .pv-logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--ag); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.app .pv-h { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.app .pv-btn { background: var(--ag); color: #fff; font-weight: 700; font-size: 13px; border-radius: 8px; min-height: 34px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .app .set-grid { grid-template-columns: minmax(0, 1fr); }
}


/* Billing (canvas AppBilling): the plan and its meter, three plan columns, the add-on. */
.app .now { gap: 18px; padding: 24px; }
.app .now-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.app .pl { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 2px; }
.app .meter-l { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: var(--slate); }
.app .meter-l strong { color: var(--ink); }
.app .bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.app .bar span { display: block; height: 100%; min-width: 6px; border-radius: 999px; background: var(--teal); }
.app .sp { margin: 48px 0 20px; }
.app .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.app .plans + p { margin-top: 16px; }
.app .plan { padding: var(--card-pad); display: flex; flex-direction: column; gap: 16px; }
.app .plan.cur { border: 2px solid var(--teal); padding: calc(var(--card-pad) - 1px); } /* teal on white 5.19:1, and the words "Your current plan" say it too */
.app .billing .addon { padding: var(--card-pad); gap: 16px; }
.app .billing .addon > p { max-width: 880px; font-size: 15px; line-height: 1.55; color: var(--slate); }
.app .addon-form { align-self: flex-start; }
.app .billing > .plans-note { font-size: 13px; line-height: 1.6; }
@media (max-width: 1000px) { .app .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A plan offered by email (/billing?plan=): a card like the others, framed, with the page's one primary button. */
.app .plans.offer .plan { border-color: var(--teal); }
/* "Switch to Agency 100 Monthly" wraps rather than widening the card on a 320 px screen. */
.app .plan .btn-block { white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
.app .h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.app .plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; } .app .plan-top .price { white-space: nowrap; }
.app .price { color: var(--muted); font-size: 14px; } .app .price strong { color: var(--ink); font-size: 22px; }
.app .plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.app .plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.45; } .app .plan li .icon { color: var(--teal); flex: none; margin-top: 2px; } /* the check sits on the first line of a two-line item */
.app .plan-for { font-size: 15px; line-height: 1.5; color: var(--slate); }
.app .plan-cur { display: flex; align-items: center; gap: 8px; min-height: var(--ctl); font-size: 15px; font-weight: 700; color: var(--teal-800); }
.app .plan-na { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--slate); }
.app .plan-na .icon { flex: none; margin-top: 2px; }
.app .plan li.plus { font-size: 14px; font-weight: 700; color: var(--slate); }
.app .billing > .lead { margin-top: 6px; }
.app .billing > .plans-note { margin-top: 16px; }
.app .billing > .promo-line { margin-top: 20px; font-size: 15px; line-height: 1.5; color: var(--slate); }
.app .promo-line strong { color: var(--teal-800); font-weight: 800; }
/* Upgrade moment: a free workspace with no audits left. The message and its one action, then Starter's facts. */
.app .upg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 32px; align-items: start; padding: var(--card-pad); margin-bottom: 24px; }
.app .lead + .upg, .app .h1 + .upg { margin-top: var(--title-gap); } /* under a page's title (new audit form, draft) */
.app .upg-after { margin: 24px 0 0; } /* under the only audit's row (dashboard, B-102) */
.app .upg-main { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.app .upg-plan { display: flex; flex-direction: column; gap: 14px; padding-left: 32px; border-left: 1px solid var(--line); }
.app .upg-plan .plan-top { margin: 0; }
.app .upg-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.app .upg-plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.45; } .app .upg-plan li .icon { color: var(--teal); flex: none; margin-top: 2px; }
@media (max-width: 760px) {
  .app .upg { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: var(--card-pad-sm); }
  .app .upg-plan { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .app .upg-main .btn { width: 100%; }
}
@media (max-width: 760px) { .app .plans { grid-template-columns: 1fr; } .app .plan { padding: var(--card-pad-sm); } .app .now-top { flex-direction: column; } .app .now-top .btn { width: 100%; } }


.app .auth-page { display: flex; justify-content: center; padding: 72px 16px; min-height: 100vh; }
.app .auth { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; align-items: center; }
.app .auth .form { width: 100%; margin-top: 0; }
.app .auth .h1 { font-size: 26px; }
.app .auth .lead { font-size: 15px; margin-top: -8px; }
.app .auth .lead strong { overflow-wrap: anywhere; }
/* The business typed on a landing page, kept through sign-in (ApplicationHelper#pending_audit_query). */
.app .auth-next { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 4px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--teal-50); }
.app .auth-next-k { font-size: 13px; font-weight: 700; color: var(--teal-800); }
.app .auth-next strong { font-size: 17px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.app .or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.app .or::before,.app .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.app .fine { text-align: center; } .app .fine a { color: var(--teal); }

/* ---- Rails additions (real controls,flash,errors,phone menu,admin) ---- */
.app input.input,.app select.input,.app textarea.input { width: 100%; font: 400 16px/1.3 var(--font); color: var(--ink); appearance: none; }
.app select.input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 256 256'%3E%3Cpath fill='%2312161b' d='M216.49 104.49l-80 80a12 12 0 0 1-17 0l-80-80a12 12 0 0 1 17-17L128 159l71.51-71.52a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 40px; }
.app textarea.input { padding: 12px 14px; min-height: 48px; resize: vertical; }
.app .input::placeholder { color: var(--muted); opacity: 1; }
.app :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.app .field-error .input { border: 2px solid var(--red); }
.app .err { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--red); }
.app .errsum { border: 1px solid var(--red); border-radius: var(--r); padding: 12px 16px; background: #fff; color: var(--ink); font-size: 15px; line-height: 1.45; }
.app .errsum strong { color: var(--red); }
.app .errsum ul { margin: 6px 0 0; padding-left: 18px; }
/* White card, ink text, a colored border and icon (teal on white 5.19:1, red 6.5:1; both borders over 3:1 on white and the page). */
.app .flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--teal); border-radius: var(--r); background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.45; margin-bottom: var(--title-gap); }
.app .lead + .flash { margin: var(--title-gap) 0 0; }
.app .flash:has(.flash-x) { padding-right: 8px; }
.app .flash > .icon { flex: none; margin-top: 1px; color: var(--teal); }
.app .flash-alert { border-color: var(--red); }
.app .flash-alert > .icon { color: var(--red); }
.app .flash-msg { flex: 1; margin: 0; }
.app .flash-x { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -9px 0; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
.app .flash-x:hover { background: var(--chip); color: var(--ink); }
/* Messages after an action: toasts that slide in at the top right, under the header. */
.app .toasts { position: fixed; top: 80px; right: 50px; z-index: 50; width: min(440px, calc(100vw - 100px)); display: flex; flex-direction: column; gap: 8px; }
.app .toasts .flash { margin: 0; box-shadow: var(--shadow-card); animation: toast-in .3s cubic-bezier(.2, .8, .2, 1); }
.app .toasts .flash.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { transform: translateX(calc(100% + 60px)); } }
@keyframes toast-out { to { transform: translateX(calc(100% + 60px)); opacity: 0; } }
@media (max-width: 760px) { .app .toasts { top: 128px; right: 16px; width: calc(100vw - 32px); } }
@media (prefers-reduced-motion: reduce) { .app .toasts .flash, .app .toasts .flash.leaving { animation: none; } }
.app button.btn { font-family: var(--font); }
.app .inline-form { display: inline; }
.app .skip { position: absolute; left: 16px; top: -48px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.app .skip:focus { top: 12px; }
.top .acct-menu { position: relative; flex: none; }
.top .acct-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 44px; padding: 4px 8px 4px 4px; border-radius: 22px; color: var(--ink); }
.top .acct-menu summary::-webkit-details-marker { display: none; }
.top .acct-menu summary:hover, .top .acct-menu[open] summary { background: var(--chip); }
.top .acct-menu[open] summary .icon { transform: rotate(180deg); }
.top .menu-panel { position: absolute; right: 0; top: 52px; width: 248px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 8px; display: flex; flex-direction: column; z-index: 30; }
.top .menu-panel a,.top .menu-panel button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font: 600 15px/1 var(--font); color: var(--ink); text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.top .menu-panel .icon { margin-right: 10px; color: var(--slate); }
.top .menu-panel a:hover,.top .menu-panel button:hover { background: var(--surface); }
.top .menu-panel a[aria-current] { background: var(--teal-50); color: var(--teal-800); }
.top .menu-panel .menu-out { color: var(--muted); } /* Sign out, quieter as in the design: 5.51:1 */
.top .menu-panel form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.top .menu-panel .menu-left { font-size: 13px; line-height: 1.4; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.top .menu-left strong { color: var(--ink); }
.top .menu-audits { display: none; }
@media (max-width: 1000px) { .top .menu-audits { display: inline; } .top .menu-panel { width: min(280px, calc(100vw - 40px)); } }
.top .menu-panel .menu-sec { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; display: flex; flex-direction: column; }
.top .menu-panel .menu-h { font: 700 12px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 6px; margin: 0; }

/* question switches: real checkbox,static "Ask" label (round 5) */
.app .qask { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.app .qask input { width: 22px; height: 22px; accent-color: var(--teal); margin: 0; cursor: pointer; }
.app .qrow:has(input[type=checkbox]:not(:checked)) .qtext { color: var(--slate); text-decoration: line-through; background: var(--surface); border-color: var(--border); }
.app .qrow:has(input[type=checkbox]:not(:checked)) .qn { color: var(--muted); }
.app .qrow { grid-template-columns: 28px minmax(0, 1fr) auto; }
.app .qtext { min-width: 0; width: 100%; field-sizing: content; min-height: var(--ctl); }
.app textarea.qtext { resize: none; } /* grows with its text */
/* Added questions (Agency): a remove button where the Ask switch sits, then the quiet add row. */
.app .qdel { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; }
.app .qdel:hover { background: var(--surface); }
.app .qadd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.app .qadd .btn { gap: 6px; }
.app .qadd .help { margin: 0; }
.app .qrule.is-over { color: var(--ink); font-weight: 700; } /* the audit now costs 2: say it where the questions are */
.app .qn { justify-content: flex-end; font-variant-numeric: tabular-nums; }



/* admin (internal) */
.app .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 0; }
.app .facts div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--card-pad-sm); }
.app .facts dt { font-size: 13px; color: var(--muted); } .app .facts dd { margin: 4px 0 0; font-weight: 800; font-size: 15px; }
.app .table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow-x: auto; }
.app .table { width: 100%; border-collapse: collapse; }
.app .table th,.app .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.app .table thead th { font-size: 13px; font-weight: 700; color: var(--slate); padding-top: 12px; padding-bottom: 12px; white-space: nowrap; }
.app .table tbody tr:last-child > * { border-bottom: 0; }
.app .admin h2 { margin: 40px 0 16px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
/* Admin menu: one row of tabs above every admin page; the current page underlined in teal (teal-800 on white 7.62:1, teal bar 5.19:1). */
.app .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.app .admin-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--slate); font-weight: 700; text-decoration: none; }
.app .admin-nav a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.app .admin-nav a[aria-current=page] { color: var(--teal-800); border-bottom-color: var(--teal); }
.app .admin-nav a:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; border-radius: var(--r-sm); }
/* The numbers are the bold element of an admin page; labels stay quiet. */
.app .stat-tiles div { min-width: 0; }
.app .stat-tiles dd { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 600px) { .app .stat-tiles dd { font-size: 22px; } }
.app .stat-tiles dd .sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
/* Plan: a word in a pill, paid teal (teal-800 on teal-50 6.82:1), free grey (slate on chip 8.44:1). Filter buttons: --border 3.84:1, checked white on teal 5.19:1. */
.app .plan-pill { display: inline-block; padding: 2px 8px; border-radius: var(--r-tag); font-size: 13px; font-weight: 700; vertical-align: 2px; }
.app .plan-paid { background: var(--teal-50); color: var(--teal-800); }
.app .plan-free { background: var(--chip); color: var(--slate); }
.app .acct-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 28px 0 0; }
.app .acct-q { flex: 1 1 260px; max-width: 360px; }
.app .acct-q .label { display: block; margin-bottom: 6px; }
.app .acct-plan { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; border: 0; }
.app .acct-plan legend { margin-bottom: 6px; padding: 0; }
.app .acct-plan .seg { position: relative; }
.app .acct-plan .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.app .acct-plan .seg span { display: inline-flex; align-items: center; min-height: var(--ctl); padding: 0 16px; border: 1px solid var(--border); background: #fff; font-weight: 700; color: var(--slate); }
.app .acct-plan .seg + .seg span { margin-left: -1px; }
.app .acct-plan .seg:first-of-type span { border-radius: var(--r) 0 0 var(--r); }
.app .acct-plan .seg:last-of-type span { border-radius: 0 var(--r) var(--r) 0; }
.app .acct-plan .seg input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; position: relative; }
.app .acct-plan .seg input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; position: relative; z-index: 1; }
.app .day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -8px 0 24px; }
.app .day-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.app .day-pick label { font-size: 14px; font-weight: 700; }
.app .day-pick .input { width: auto; min-height: var(--ctl-sm); }
.app .admin-runs tbody th { font-weight: 700; }
.app .cell-sub { display: block; margin-top: 2px; font-weight: 400; }
.app .admin-runs .nowrap { white-space: nowrap; }
.app .admin-runs .res-cell .tag { display: flex; width: fit-content; margin-bottom: 4px; }
/* Pagy's series nav (canvas AppAudits): 44 px page squares, the current one in ink (white on ink 18.16:1),
   "Page 1 of 7" on the left where a list has it (.pager). */
.app .series-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; }
.app .series-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: var(--r); font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.app .series-nav a[href]:hover { background: var(--chip); }
.app .series-nav a[aria-current=page] { background: var(--ink); color: #fff; }
.app .series-nav a[aria-disabled=true]:not([aria-current]) { color: var(--muted); }
.app .series-nav a[role=separator] { background: transparent; }
.app .pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.app .pager .series-nav { margin-top: 0; }
.app .pager-of { font-size: 14px; color: var(--muted); }
.app .list-note { margin-top: 24px; font-size: 13px; line-height: 1.5; color: var(--muted); } /* a fact under a list (Leads) */

@media (max-width: 760px) {
  .app .qrow { gap: 8px; }
  .app .facts { grid-template-columns: 1fr 1fr; }
  .app .day-pick { margin-left: 0; }
  .app .table th,.app .table td { padding: 10px 12px; font-size: 14px; }
}
.app .colorrow .swatch { padding: 0; cursor: pointer; background: none; }
.app .colorrow .swatch::-webkit-color-swatch-wrapper { padding: 0; }
.app .colorrow .swatch::-webkit-color-swatch { border: 0; border-radius: var(--r-sm); }
.app .note-w[hidden] { display: none; }
.app .input.file { border: 0; padding: 0; min-height: 0; background: none; font-size: 15px; color: var(--slate); }
.app .input.file::file-selector-button { min-height: 44px; margin-right: 14px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; color: var(--ink); font: 700 15px/1 var(--font); cursor: pointer; }
.app .input.file::file-selector-button:hover { background: var(--surface); }
.app .logo-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.app .logo-row .input.file { flex: 0 1 auto; width: auto; min-width: 0; }
.app .pv-name { font-size: 14px; }
.app .auth-form { display: flex; flex-direction: column; gap: var(--field-gap); }
.app:has(.auth-page) main { padding: 0; }

/* blog writing (admin): form bits and Lexxy themed to the design system */
.app .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.app .field-msg { font-size: 14px; font-weight: 600; color: var(--red); }
.app .cover-field { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.app .label-sub { font-weight: 600; }
.app .cover-field legend { padding: 0; }
.app .cover-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app .cover-now img { width: 240px; height: 135px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; }
.app .check-line { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }
.app .check-line input { width: 20px; height: 20px; accent-color: var(--teal); margin: 0; flex: none; }
.app .danger { margin-top: 24px; text-align: right; }
.app .btn-danger { color: var(--red); }
.app .posts-table th[scope="row"] { font-weight: 700; }
.app .post-form { --lexxy-color-accent-dark: var(--teal); --lexxy-color-link: var(--teal); --lexxy-color-text: var(--ink); --lexxy-color-text-subtle: var(--slate); --lexxy-font-base: var(--font); }
.app .post-form lexxy-editor { display: block; border: 1px solid var(--border); border-radius: var(--r); background: #fff; font-family: var(--font); --lexxy-editor-rows: 18lh; }
.app .post-form lexxy-editor:focus-within { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (max-width: 760px) { .app .row2 { grid-template-columns: 1fr; } }
.app .writing { gap: 6px; }
.app .writing .big { font-size: 18px; font-weight: 700; }
.app .tag-line { display: inline-flex; align-items: center; gap: 8px; }
/* very narrow phones (320px): the four sections fit on one row without scrolling */
@media (max-width: 370px) {
  .top .nav { gap: 0; }
  .top .nav a { padding: 0 8px; }
}

/* "Rivals you know" chips (canvas New audit); the box shows the focus ring for its text entry */
.app .tags { flex-wrap: wrap; gap: 8px; padding: 6px 8px; cursor: text; }
.app .tags:focus-within { border-color: var(--teal); }
.app .tags:has(.tg-entry:focus-visible) { outline: 2px solid var(--teal); outline-offset: 3px; }
.app .tags .tg-entry:focus-visible { outline: none; }
.app .tg-list { display: contents; list-style: none; }
.app .tg { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 10px; border-radius: var(--r-tag); background: var(--chip); font-size: 14px; font-weight: 600; }
.app .tg-x { width: 24px; height: 24px; border-radius: var(--r-tag); display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; background: transparent; color: var(--slate); cursor: pointer; }
.app .tg-x:hover { background: var(--line); color: var(--ink); }
.app .tg-x:focus-visible { outline-offset: 1px; }
.app .tg-entry { flex: 1 1 160px; min-width: 0; min-height: 32px; border: 0; padding: 0 6px; font: 400 16px/1.3 var(--font); color: var(--ink); background: transparent; }
.app .tg-entry::placeholder { color: var(--muted); opacity: 1; }

/* Ask once or twice (questions screen) */
.app .asks { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.app .asks legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 4px; }
.app .asks-opts { display: flex; flex-wrap: wrap; gap: 0 24px; }
.app .radio { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.app .radio input { width: 20px; height: 20px; accent-color: var(--teal); margin: 0; flex: none; }
.app .radio input:disabled + span { color: var(--muted); cursor: default; }
.app .asks .help { margin-top: 2px; }

/* Tracked (dashboard card) */
.app .tcard { margin-bottom: 24px; padding: 20px 24px; }
.app .tcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.app .tlist { list-style: none; margin: 8px 0 0; padding: 0; }
.app .tlist li { display: flex; align-items: center; gap: 16px 24px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.app .tl-main,.app .tl-res { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.app .tl-main { flex: 1 1 220px; }
.app .tlist .act { margin-left: auto; }
.app .figs { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 6px 0 4px; font-size: 13px; }
.app .figs div { display: flex; gap: 4px; }
.app .figs dt { color: var(--muted); }
.app .figs dd { margin: 0; color: var(--teal-800); font-weight: 700; font-variant-numeric: tabular-nums; } /* bold teal so the figures stand out (Denis, Nov 3); teal-800 on white 7.6:1 */
.app .tcard .tl-res { flex: 0 0 380px; } /* one column start on every row: 24 dots and the three figures fit */
/* How often it is checked: a compact segmented group like the admin plan picker (.acct-plan .seg); unpressed edge --border 3.9:1, pressed edge teal 5.4:1 */
.app .sched { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 4px; }
.app .seg-btns { display: inline-flex; }
.app .seg-btn { min-height: 32px; padding: 0 12px; border: 1px solid var(--border); background: #fff; color: var(--slate); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.app .seg-btns .inline-form + .inline-form .seg-btn { margin-left: -1px; }
.app .seg-btns .inline-form:first-child .seg-btn { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.app .seg-btns .inline-form:last-child .seg-btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.app .seg-btn:hover { background: var(--teal-50); }
.app .seg-btn[aria-pressed="true"] { background: var(--teal-50); border-color: var(--teal); color: var(--teal-800); font-weight: 700; position: relative; } /* a quiet tint so the results stay the boldest thing in the row; teal-800 on teal-50 about 6.9:1 */
.app .seg-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; position: relative; z-index: 1; }
.app .figs-note.figs-note-2 { border-top: 0; padding-top: 6px; }
.app .figs-note { margin: 0; padding-top: 12px; padding-right: max(0px, calc(100% - 720px)); border-top: 1px solid var(--line); } /* rule full width, text at a readable measure */
@media (max-width: 760px) {
  .app .tcard .tl-res { flex: none; }
  .app .tcard { padding: var(--card-pad-sm); }
  .app .tlist li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .app .tl-main { flex: none; }
  .app .tlist .act { margin-left: 0; justify-content: flex-start; }
}

/* Lead form card (settings) */
.app .lead-form, .app .results-link, .app .referral { margin-top: 24px; max-width: 720px; }
.app .referral-count { margin: 0; font-weight: 600; color: var(--ink); }
.app .snippet { height: auto; min-height: 0; padding: 12px 14px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); resize: vertical; }
.app .snippet-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* Prospect lists */
.app .page-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.app .page-head:has(.back) .page-acts { margin-top: 40px; }
@media (max-width: 760px) { .app .page-head:has(.back) .page-acts { margin-top: 0; } }
.app .upload { margin-bottom: 24px; padding: 24px; }
/* Prospects upload (canvas AppProspects): a dashed box for the file (--border 3.84:1), the columns beside it. */
.app .up-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; }
.app .up-drop { align-items: center; justify-content: center; text-align: center; padding: 28px 20px; border: 1px dashed var(--border); border-radius: var(--r); background: var(--surface); }
.app .up-drop > .icon { color: var(--slate); }
.app .up-drop .input.file { width: auto; max-width: 100%; }
.app .up-cols { display: flex; flex-direction: column; gap: 8px; }
.app .up-cols .kicker + .cols { margin-bottom: 8px; }
.app .cols { display: flex; flex-wrap: wrap; gap: 6px; }
.app .up-cols code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.app .cols code { padding: 2px 8px; border-radius: var(--r-tag); background: var(--chip); color: var(--ink); }
.app .up-foot { justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .app .up-grid { grid-template-columns: minmax(0, 1fr); } }
.app .tbl .tag + .xs { display: block; margin-top: 4px; }
@media (max-width: 760px) { .app .mrow-act .act,.app .act { flex-wrap: wrap; justify-content: flex-start; white-space: normal; row-gap: 4px; } }

/* Badge page (badges/show): the two previews side by side, stacked on phones. */
.app .badge-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 24px; }
.app .badge-on { display: flex; align-items: center; justify-content: center; padding: 32px 20px; border-radius: var(--r); }
.app .badge-on.light { background: #fff; } .app .badge-on.dark { background: #353d49; }
.app .badge-previews img { max-width: 100%; height: auto; display: block; }
.app .badge-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.app .badge-act .help { margin: 0; }

/* Market scans (market_scans/show): the bar of filters and the prospect list action above the
   table, sticky on wide screens so the "(N selected)" count stays in view while rows lower down are
   ticked; and the questions fold. */
.app .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.app .scan-bar { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 12px 0; margin-bottom: 0; }
.app .scan-acts { display: flex; align-items: center; gap: 16px; margin-left: auto; }
@media (max-width: 760px) {
  .app .scan-bar { position: static; } /* filters, note and a full-width button would cover a phone's screen */
  .app .scan-acts { flex: 1 1 100%; flex-direction: column; align-items: stretch; text-align: center; }
  .app .scan-acts .btn { white-space: normal; line-height: 1.25; padding-block: 10px; } /* "Create prospect list (0 selected)" wraps at 320 px */
}
.app .qbox { margin-top: 28px; }
.app .qbox summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--slate); min-height: 44px; list-style: none; }
.app .qbox summary::-webkit-details-marker { display: none; }
.app .qbox[open] summary .icon { transform: rotate(180deg); }
.app .qbox ol { margin: 8px 0 0; padding-left: 20px; }
.app .qbox li { padding: 4px 0; }

/* The questions screen's follow-up option: the wording behind a disclosure. */
.app .asks-more { margin-top: 2px; }
.app .asks-more summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 14px; color: var(--slate); list-style: none; }
.app .asks-more summary::-webkit-details-marker { display: none; }
.app .asks-more[open] summary .icon { transform: rotate(180deg); }
.app .asks-more ol { margin: 4px 0 0; padding-left: 20px; }

/* Markets: a one-row form, then the list; a scan's named column as a count over a bar, the AIs below. */
.app .scan-form { padding: 24px; margin-bottom: 24px; }
/* Filter chips (canvas AppMarket): outlined, the current one filled in ink (white on ink 18.16:1). */
.app .chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.app .chip:hover { background: var(--surface); }
.app .chip.tag-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
/* Audits filters and search (canvas AppAudits): the pills left, "Find a business" right; on phones a
   "Show" select over the search (AppAuditsMobile). The select is in the form on every width and hidden
   on wide screens, so a search keeps the current filter. */
.app .audit-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin: 0 0 24px; }
.app .audit-find { display: flex; flex-direction: column; gap: 12px; width: min(280px, 100%); }
.app .audit-find .label { display: block; margin-bottom: 6px; }
.app .audit-show { display: none; }
.app .input-ic { gap: 10px; padding: 0 14px; color: var(--muted); }
.app .input-ic:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.app .input-ic input { flex: 1; min-width: 0; min-height: calc(var(--ctl) - 2px); border: 0; padding: 0; background: none; font: 400 16px/1.3 var(--font); color: var(--ink); outline: none; }
.app .input-ic input::placeholder { color: var(--muted); opacity: 1; }
.app .empty-filter .empty-in { gap: 10px; }
@media (max-width: 760px) {
  .app .audit-pills { display: none; }
  .app .audit-find { width: 100%; }
  .app .audit-show { display: block; }
}
.app .named-by { display: block; margin-top: 6px; }
.app .scan-row { display: grid; grid-template-columns: 1.3fr 1.1fr 0.6fr 1fr auto; gap: 16px; align-items: end; }
.app .scan-row .field { margin: 0; }
.app .scan-row .field-act .btn { min-height: var(--ctl); }
.app .scan-form .help { margin-top: 10px; }
@media (max-width: 760px) { .app .scan-row { grid-template-columns: 1fr; } } /* one field per line, so the country name is never cut */
.app .named-cell { min-width: 220px; }
.app .rating .stars { vertical-align: -2px; margin: 0 2px; }
.app .rating-n { font-weight: 700; color: var(--ink); }
.app .tbl td.rating { white-space: nowrap; }
.app .tbl th .xs { display: block; }
.app .named-cell .xs { display: block; margin-top: 4px; white-space: nowrap; }
.app .rival-cell .xs { display: block; margin-top: 2px; }
.app .mrow-res { display: flex; flex-direction: column; gap: 2px; }
.app .quiet-acts { margin-top: 24px; }
.app .quiet-acts .btn { padding-left: 0; padding-right: 0; }
.app .quiet-acts .btn:hover { background: transparent; text-decoration: underline; }

.app .scan-row select.input { padding-right: 44px; }
.app .badge-sec { margin-top: 28px; }
