/* 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 .sm { font-size: 14px; } .app .xs { font-size: 13px; }
.app .wrap { max-width: 1152px; margin: 0 auto; padding: 0 var(--gutter); }
.app .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
.app .top { background: #fff; border-bottom: 1px solid var(--line); }
.app .top-in { height: 64px; display: flex; align-items: center; gap: 28px; }
.app .top-logo { display: flex; align-items: center; }
.app .nav { display: flex; gap: 4px; margin-right: auto; }
.app .nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--slate); text-decoration: none; }
.app .nav a[aria-current] { background: var(--teal-50); color: var(--teal-800); font-weight: 700; }
.app .left { font-size: 14px; color: var(--slate); white-space: nowrap; }
.app .left strong { color: var(--ink); }
.app .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal-800); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }

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

/* 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: 17px; line-height: 1.6; color: var(--slate); }
.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: 0; 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: 1px solid 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: var(--ctl-sm); padding: 0 12px; font-size: 14px; }
.app .btn-t.btn-sm { padding: 0; }
.app .btn-block { width: 100%; }
.app .tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--r-tag); font-size: 13px; font-weight: 700; white-space: nowrap; }
.app .t-done { background: var(--teal-50); color: var(--teal-800); }
.app .t-run { background: var(--chip); color: var(--slate); }
.app .t-draft { background: #fff; color: var(--slate); border: 1px solid var(--border); }
.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-end; gap: 24px; margin-bottom: var(--title-gap); }
.app .page-head .lead { margin-top: 6px; }

/* 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; }

/* mini dots */
.app .mdots { display: inline-flex; gap: 2px; vertical-align: middle; }
.app .md { width: 7px; height: 7px; border-radius: 50%; }
.app .md.on { background: var(--teal); } .app .md.off { border: 1.5px solid var(--border); }

@media (max-width: 760px) {
  .app .wrap { padding: 0 var(--gutter-sm); }
  .app .nav,.app .left,.app .avatar { display: none; }
  .app .top-in { gap: 10px; }
  .app .top-logo { margin-right: auto; }

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

.app .t-wait { background: #fff; color: var(--slate); border: 1px solid var(--line); }
.app .lnk { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.app .lnk:hover { color: var(--teal-800); }
.app .phone-only { display: none; }
@media (max-width: 760px) { .app .phone-only { display: inline; } }


.app .tbl-card { overflow: hidden; }
.app .tbl { width: 100%; border-collapse: collapse; }
.app .tbl th,.app .tbl td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.app .tbl thead th { background: #fff; font-size: 13px; font-weight: 700; color: var(--slate); padding-top: 12px; padding-bottom: 12px; }
.app .tbl tbody tr:last-child th,.app .tbl tbody tr:last-child td { border-bottom: 0; }
.app .tbl tbody th { font-weight: 400; }
.app .biz { display: block; font-weight: 800; text-decoration: none; font-size: 15px; }
.app .res { display: inline-flex; flex-direction: column; gap: 4px; }
.app .res strong { font-size: 15px; }
.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; gap: 16px; white-space: nowrap; }
.app .act > * { flex: none; }
.app .opened-wrap { display: inline-flex; flex-direction: column; gap: 2px; }
.app .mlist { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) {
  .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-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 6px; }
  .app .mrow-act { display: flex; gap: 16px; margin-top: 8px; align-items: center; }
  .app .mrow-act .btn { flex: none; }
  .app .page-head .btn { width: 100%; }
}


.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; font-size: 14px; font-weight: 700; color: var(--teal); text-decoration: none; margin-bottom: 16px; }
.app .narrow > .lead { margin-top: 6px; }
.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; }
.app .form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 760px) {
  .app .form { padding: var(--card-pad-sm); }
  .app .row3 { grid-template-columns: 1fr; }
}


.app .nw { white-space: nowrap; }
.app .sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 4px; 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; height: 28px; border-radius: 50%; background: var(--teal-50); color: var(--teal-800); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.app .sw { width: 44px; height: 26px; border-radius: 13px; background: var(--teal); position: relative; }
.app .sw span { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.app .sw-l { font-size: 13px; font-weight: 700; color: var(--slate); }
.app .swl input:checked ~ .sw-l .sw-skip,.app .swl input:not(:checked) ~ .sw-l .sw-ask { display: none; }
@media (max-width: 760px) {
  .app .qrow { grid-template-columns: 1fr 44px 36px; }
  .app .qn { display: none; }
  .app .qtext { font-size: 15px; }
  .app .sum { flex-direction: column; gap: 2px; }
  .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 .form-foot.action-first .btn-p { order: 0; } /* New audit: the action above its note, as on the canvas */
}


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


.app .set-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.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: sticky; top: 24px; display: flex; flex-direction: column; gap: 8px; }
.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: 14px; }
.app .pv-head { display: flex; align-items: center; gap: 10px; font-size: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.app .pv-logo { width: 30px; height: 30px; border-radius: 8px; background: var(--ag); color: #fff; 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-dots { display: flex; gap: 3px; } .app .pv-dots span { width: 11px; height: 11px; border-radius: 50%; } .app .pv-dots .on { background: var(--ag); } .app .pv-dots .off { border: 2px solid var(--border); background: linear-gradient(var(--border), var(--border)) center / 40% 2px no-repeat; }
.app .pv-btn { background: var(--ag); color: #fff; font-weight: 700; font-size: 14px; border-radius: 10px; min-height: 42px; display: flex; align-items: center; justify-content: center; }
.app .acct { margin-top: 24px; max-width: calc(100% - 364px); }
.app .pv-inline-wrap { display: none; }
.app .acct-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
@media (max-width: 760px) {
  .app .set-grid { grid-template-columns: 1fr; }
  .app .preview { display: none; }
  .app .pv-inline-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
  .app .pv-inline { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); }
  .app .pv-row { display: flex; align-items: center; gap: 10px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .app .pv-inline .pv-h { font-size: 17px; }
  .app .pv-inline .pv-dots span { width: 9px; height: 9px; }
  .app .acct-row { flex-direction: column; align-items: stretch; }
  .app .acct { max-width: none; }
}


.app .now { gap: 20px; }
.app .now-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.app .pl { font-size: 22px; font-weight: 800; margin: 2px 0; }
.app .meter-l { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.app .bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.app .bar span { display: block; height: 100%; background: var(--teal); }
.app .sp { margin: 40px 0 16px; }
.app .plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.app .plans + p { margin-top: 16px; }
.app .plan { padding: var(--card-pad); display: flex; flex-direction: column; gap: 16px; }
.app .plan.cur { border-color: var(--teal); }
.app .h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.app .plan-top { display: flex; justify-content: space-between; align-items: baseline; }
.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: center; font-size: 15px; } .app .plan li .icon { color: var(--teal); }
.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 li.plus { font-size: 14px; font-weight: 700; color: var(--slate); }
.app .billing > .lead { margin-top: 6px; }
@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 .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,.app input[type=checkbox]:focus-visible + .sw { 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(--line); border-left: 4px 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 edge and icon (teal on white 5.19:1, red 6.5:1, edge vs page 4.8:1). */
.app .flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px 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 main .wrap:has(> .narrow:not(.page)) > .flash { max-width: 720px; margin-inline: auto; } /* line up with the centred column */
.app .flash:has(.flash-x) { padding-right: 8px; }
.app .flash > .icon { flex: none; margin-top: 1px; color: var(--teal); }
.app .flash-alert { border-left-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); }
.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; }
.app .avatar { text-decoration: none; }

/* phone menu */
.app .menu { position: relative; display: none; }
.app .menu summary { list-style: none; cursor: pointer; }
.app .menu summary::-webkit-details-marker { display: none; }
.app .menu-panel { position: absolute; right: 0; top: 48px; width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.app .menu-panel a,.app .menu-panel button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; font: 600 15px/1 var(--font); color: var(--ink); text-decoration: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.app .menu-panel a[aria-current] { background: var(--teal-50); color: var(--teal-800); }
.app .menu-panel .menu-left { font-size: 14px; color: var(--slate); padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* question switches: real checkbox,static "Ask" label (round 5) */
.app .qrow input[type=checkbox] { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.app .swl { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.app .swl .sw { display: inline-block; flex: none; }
.app .qrow input[type=checkbox]:checked + .sw { background: var(--teal); border: 0; }
.app .qrow input[type=checkbox]:checked + .sw span { top: 3px; right: 3px; left: auto; width: 20px; height: 20px; background: #fff; }
.app .qrow input[type=checkbox]:not(:checked) + .sw { background: #fff; border: 2px solid var(--border); }
.app .qrow input[type=checkbox]:not(:checked) + .sw span { top: 2px; left: 2px; right: auto; width: 18px; height: 18px; background: var(--muted); }
.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 { background: var(--chip); color: var(--slate); }
.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 */

/* result dots: a little more air,grouped by AI (round 5) */
.app .mdots { gap: 3px; }
.app .md:nth-child(6n):not(:last-child) { margin-right: 4px; }

/* progress (also used by the free check on the landing layout) */
.pg { display: flex; flex-direction: column; gap: 18px; }
.pg .big { font-size: 22px; margin: 0; }
.pg .bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.pg .bar span { display: block; height: 100%; background: var(--teal); transition: width .4s; }
.pg .ailist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pg .ailist li { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pg .ailist li:last-child { border-bottom: 0; padding-bottom: 0; }
.pg .pai { font-weight: 700; }
.pg .tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--r-tag); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pg .t-done { background: var(--teal-50); color: var(--teal-800); } .pg .t-run { background: var(--chip); color: var(--slate); } .pg .t-wait { background: #fff; color: var(--slate); border: 1px solid var(--line); }
.pg .pg-note { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
/* free check running card (canvas CheckBRunning): tighter, no dividers, larger note */
.lp .pg { gap: 16px; }
.lp .pg .ailist li { padding-bottom: 0; border-bottom: 0; }
.lp .pg .pg-note { font-size: 15px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { .pg .bar span { transition: none; } }

/* admin (internal) */
.app .facts { display: grid; grid-template-columns: repeat(4, 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; }

@media (max-width: 760px) {
  .app .menu { display: block; }
  .app .qrow { grid-template-columns: minmax(0, 1fr) auto; }
  .app .facts { grid-template-columns: 1fr 1fr; }
  .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 { padding: 6px 14px 6px 6px; font-size: 15px; }
.app .input.file::file-selector-button { min-height: var(--ctl-sm); margin-right: 12px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: 700 14px/1 var(--font); cursor: pointer; }
.app .input.file::file-selector-button:hover { background: var(--surface); }
.app .logo-now { display: flex; align-items: center; gap: 16px; }
.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: 8px; min-height: 44px; font-size: 15px; }
.app .check-line input { width: 20px; height: 20px; accent-color: var(--teal); }
.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): smaller logo, and the header's New audit button shows only its icon */
@media (max-width: 370px) {
  .app .top-logo img { width: 120px; height: auto; }
  .app .top-new { padding: 0 10px; }
  .app .top-new-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* "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; }
