/* Sacred, and the pieces Reports and Analytics share with it (rows, notes, the two-column page). Semantic tokens only (S-a2). */

/* ── Page: two columns from 1100 px, one column in reading order below ─────────────────────── */
.sc-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.sc-col { display: contents; }
.sc-slot { min-width: 0; }
.sc-wide { grid-column: 1 / -1; order: 0; }
.sc-wide--last { order: 99; }   /* a full-width block that closes the page, after the slots that carry the phone's reading order */
.sc-stack { display: flex; flex-direction: column; gap: var(--s-3); max-width: 64rem; }
.sc-stack > * { min-width: 0; }
.sc-why { display: flex; flex-direction: column; gap: var(--s-2); }
@media (min-width: 1100px) {
  .sc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-col { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
  .sc-slot { order: 0 !important; }   /* the inline order is the phone's reading order; two columns follow the source order */
}
.sc-status { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); font-weight: 600; }
.sc-status .i { color: var(--accent-mark); }

/* A container that does not fold (OpenCtr, StateCtr): no chevron column, so the title starts at the container's own edge */
.ctr-head.ctr-head--static { grid-template-columns: minmax(0, 1fr) var(--ctr-act-w, 0px); }
.ctr-head--static .ctr-tw { display: none; }
.ctr-head--static .ctr-line { grid-column: 1; }
.ctr-head--static .ctr-sum { grid-column: 1 / -1; }

/* ── Dense rows (shared) ───────────────────────────────────────────────────────────────── */
.sr-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "lead main meta acts"; align-items: center; column-gap: var(--s-2); min-height: 52px; padding: var(--s-1) var(--s-2) var(--s-1) var(--s-3); color: var(--text); }
.sr-row:not(:has(> .sr-lead)) { grid-template-areas: "main meta acts"; grid-template-columns: minmax(0, 1fr) auto auto; }
.sr-row > .sr-lead { grid-area: lead; }
.sr-row > .sr-main { grid-area: main; }
.sr-row > .sr-meta { grid-area: meta; }
.sr-row > .sr-acts { grid-area: acts; }
.sr-lead { position: relative; z-index: 1; width: 36px; display: grid; place-items: center; color: var(--text-2); }
.sr-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px 0; color: var(--text); text-align: left; text-decoration: none; }
a.sr-main:hover { text-decoration: none; }
.sr-row--link .sr-main::after { content: ""; position: absolute; inset: 0; }   /* the whole row is the link; the meta and actions sit above it */
.sr-row--link .sr-main:focus-visible { outline: none; }
.sr-row--link .sr-main:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-button); }
@media (hover: hover) { .sr-row--link:hover { background: var(--hover); } }
.sr-row--link:active { background: var(--hover); }
.sr-t { font-size: var(--fs-cell); font-weight: 600; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.sr-s { display: block; min-width: 0; font-size: var(--fs-caption); line-height: 1.45; letter-spacing: var(--caption-ls); color: var(--text-3); }
.sr-meta { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--s-2); justify-self: end; font-size: var(--fs-caption); font-weight: 600; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sr-meta .i { color: var(--text-3); }
.sr-acts { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--s-1); }
.sr-when { color: var(--text-3); }
.sr-sev { color: var(--text-2); text-transform: capitalize; }
.sr-row.is-late .sr-t { color: var(--text); }
.sr-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-1) var(--s-3); min-height: 48px; padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line); }
.sr-foot .caption { max-width: var(--measure); }
.sr-note { display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-button); color: var(--text-2); font-size: var(--fs-cell); }
.sr-note > .i { margin-top: 1px; color: var(--text-3); }
.sr-note b { color: var(--text); }
.ctr-in .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.ctr-in > .sc-sched + .list, .ctr-in > .sc-al-tools + .table-wrap { border-top: 1px solid var(--line); }
.ctr-in .list > .sr-row:first-child { border-top: 0; }

/* ── Posting ──────────────────────────────────────────────────────────────────────────── */
.sc-plan { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); }
.sc-legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); font-size: var(--fs-caption); color: var(--text-2); }
.sc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.sc-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--chart-2); flex: none; }
.sc-sw.focal { background: var(--chart-focal); }
.sc-sw.c2 { background: var(--chart-2); }
.sc-sw.c3 { background: var(--chart-3); }
.sc-plan-total { font-size: var(--fs-stat); font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.sc-blockers { padding: var(--s-1) 0; }
.sc-blockers li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: start; gap: var(--s-2); padding: var(--s-2) var(--s-3); }
.sc-blockers li + li { border-top: 1px solid var(--line); }
.sc-n { font-weight: 700; color: var(--text); text-align: center; }
.sc-pulse-h { font-weight: 700; color: var(--text); }
.sc-pulse ul { margin-top: var(--s-2); padding-left: var(--s-3); list-style: disc; color: var(--text-2); }
.sc-pulse li { padding: 1px 0; }
.sc-apify { font-weight: 600; }
.sc-lines .sr-row { min-height: 52px; }
.sc-amt { font-size: var(--fs-cell); color: var(--text); font-weight: 700; }
.sc-amt.is-struck { color: var(--text-3); text-decoration: line-through; }
.sc-dec { border: 1px solid var(--line-strong); }
.sc-dec[aria-pressed="true"] { background: var(--raised); border-color: var(--text-3); color: var(--text); }
.sc-caption { max-width: var(--measure); }
.sc-post { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-card); }
.sc-post-hook { font-size: var(--fs-h3); font-weight: 700; line-height: 1.28; color: var(--text); overflow-wrap: anywhere; }
.sc-post-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.sc-post-cta { font-weight: 700; color: var(--text); }
.sc-checks { display: flex; flex-direction: column; gap: var(--s-1); }
.sc-checks li { display: flex; align-items: center; gap: var(--s-2); }
.sc-checks li > .i { color: var(--text-3); }
.sc-checks .is-fail > .i { color: var(--accent-mark); }
.sc-checks b { min-width: 5.5rem; }
.sc-checks span { color: var(--text-2); }
.sc-checks .is-fail span { color: var(--text); font-weight: 700; }
.sc-fails { margin-top: var(--s-2); padding-left: var(--s-3); list-style: disc; color: var(--text-2); }
.sc-claims { padding-left: var(--s-3); list-style: disc; color: var(--text-2); }
.sc-claims li + li { margin-top: var(--s-1); }
.sc-note-text { color: var(--text-2); overflow-wrap: anywhere; }
.sc-report { display: flex; flex-direction: column; gap: var(--s-2); }
.sc-report-t { font-size: var(--fs-h3); font-weight: 700; line-height: 1.28; }
.sc-report-hl { color: var(--text-2); }
.sc-md { color: var(--text-2); overflow-wrap: anywhere; }
.sc-md h2, .sc-md h3, .sc-md h4 { margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-body); font-weight: 700; color: var(--text); }
.sc-md p { margin: var(--s-2) 0; }
.sc-md ul { padding-left: var(--s-3); list-style: disc; margin: var(--s-2) 0; }
.sc-md li { margin: 2px 0; }

/* ── Google autopost ──────────────────────────────────────────────────────────────────── */
.sc-sched { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); }
.sc-sched-days { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-2); }
.sc-sched-days b { padding: 2px var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-button); font-size: var(--fs-caption); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }

/* ── Tools ────────────────────────────────────────────────────────────────────────────── */
.sc-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); overflow: hidden; }
.sc-tool-grid > li { margin: 0 -1px -1px 0; border: 1px solid var(--line); border-left: 0; border-top: 0; }
.sc-tool { display: flex; flex-direction: column; gap: 2px; min-height: 76px; height: 100%; padding: var(--s-3); color: var(--text); text-decoration: none; }
@media (hover: hover) { .sc-tool:hover { background: var(--hover); } }
.sc-tool-t { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; }
.sc-tool-t .i { color: var(--text-3); }
.sc-tool-s { font-size: var(--fs-caption); color: var(--text-3); }

/* ── Links & logins, System alerts ────────────────────────────────────────────────────── */
.sc-links-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); }
.sc-links-top .sr-note { flex: 1 1 18rem; }
.sc-al-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); }
.sc-al-src { width: 12rem; max-width: 100%; }
.sc-al-t { color: var(--text); font-weight: 600; }
.sc-al-foot { flex-wrap: wrap; }
.td .sc-al-t { overflow: hidden; text-overflow: ellipsis; }

/* ── Front Desk Demo (a demonstration: sample data, flat, one crimson fill) ───────────── */
.fd-wrap { min-width: 0; max-width: 1180px; margin: 0 auto; padding-bottom: var(--s-5); }
.fd-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.fd-h { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.01em; }
.fd-sub { margin-top: var(--s-1); max-width: 56rem; color: var(--text-2); font-size: var(--fs-cell); }
.fd-mode { padding: 4px var(--s-2); border: 1px solid var(--gilt); border-radius: var(--r-button); color: var(--text); }
.fd-mode .i { color: var(--gilt); }
.fd-ctlbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.fd-navgrp { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-left: auto; min-width: 0; }
.fd-stepnum { min-width: 0; flex: 1 1 auto; text-align: center; font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.04em; color: var(--text-3); text-transform: uppercase; }
.fd-banner { min-height: 44px; margin-bottom: var(--s-3); padding: var(--s-2) var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); font-weight: 600; color: var(--text-2); }
.fd-banner.crimson { color: var(--text); border-color: var(--accent); }
.fd-banner.gold { color: var(--text); border-color: var(--gilt); }
.fd-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-3); align-items: start; }
.fd-rail { display: flex; flex-direction: column; gap: var(--s-2); }
.fd-rail-item { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 44px; padding: var(--s-1) var(--s-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--text-2); font-size: var(--fs-cell); font-weight: 700; text-align: left; }
@media (hover: hover) { .fd-rail-item:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text); } }
.fd-rail-item:disabled { cursor: wait; }
.fd-rail-item.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fd-rail-item.done { color: var(--text); }
.fd-rail-n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: var(--r-button); font-size: var(--fs-caption); font-weight: 700; }
.fd-rail-item.done .fd-rail-n { background: var(--gilt); border-color: var(--gilt); color: var(--on-gilt); }
.fd-rail-tx { flex: 1; line-height: 1.25; }
.fd-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.fd-phone { display: flex; flex-direction: column; min-height: 430px; }
.fd-phone-top { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.fd-bizname { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); font-weight: 800; color: var(--text); }
.fd-badge { padding: 2px var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-button); font-size: var(--fs-caption); font-weight: 700; color: var(--text-2); }
.fd-callername { margin-top: var(--s-2); font-size: var(--fs-cell); color: var(--text-2); }
.fd-phonestatus { margin-top: 2px; font-size: var(--fs-caption); font-weight: 700; color: var(--text-3); }
.fd-phonestatus.ring, .fd-phonestatus.web, .fd-phonestatus.done, .fd-phonestatus.live { color: var(--text); }
.fd-phonestatus.miss { color: var(--text); font-weight: 800; }
.fd-thread { flex: 1; display: flex; flex-direction: column; gap: var(--s-2); max-height: 360px; padding: var(--s-3); overflow-y: auto; }
.fd-msg { display: flex; flex-direction: column; max-width: 84%; }
.fd-msg.fd-biz { align-self: flex-start; align-items: flex-start; }
.fd-msg.fd-cust { align-self: flex-end; align-items: flex-end; }
.fd-bub { padding: var(--s-2) var(--s-3); border-radius: var(--r-card); font-size: var(--fs-cell); line-height: 1.45; }
.fd-biz .fd-bub { background: var(--surface-2); color: var(--text); }
.fd-cust .fd-bub { background: var(--accent); color: var(--on-accent); }
.fd-meta { margin-top: 4px; padding: 0 4px; font-size: var(--fs-caption); color: var(--text-3); }
.fd-typing { display: flex; gap: 4px; align-items: center; }
.fd-typing span { width: 6px; height: 6px; border-radius: 2px; background: var(--text-3); animation: fd-blink 1.2s infinite; }
.fd-typing span:nth-child(2) { animation-delay: 0.2s; }
.fd-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fd-blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.fd-phone-foot { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line); background: var(--surface-2); font-size: var(--fs-caption); color: var(--text-3); }
.fd-rightcol { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.fd-stepcard { padding: var(--s-3); }
.fd-steptag { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.fd-steptitle { margin-top: var(--s-1); font-size: var(--fs-h3); font-weight: 800; line-height: 1.3; color: var(--text); }
.fd-stepblurb { margin-top: var(--s-2); font-size: var(--fs-cell); color: var(--text-2); }
.fd-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.fd-kpi { padding: var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.fd-kpi-n { font-size: var(--fs-stat); font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.fd-kpi-l { margin-top: var(--s-2); font-size: var(--fs-caption); font-weight: 600; color: var(--text-3); }
.fd-card-h { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); font-weight: 700; color: var(--text); }
.fd-card-h .i { color: var(--text-3); }
.fd-alert, .fd-review { display: none; }
.fd-alert.show, .fd-review.show { display: block; border-color: var(--gilt); }
.fd-alert-body { padding: var(--s-3); font-size: var(--fs-cell); line-height: 1.5; color: var(--text); }
.fd-jobs { display: flex; flex-direction: column; gap: var(--s-2); min-height: 60px; padding: var(--s-2); }
.fd-empty { padding: var(--s-3); text-align: center; font-size: var(--fs-cell); color: var(--text-3); }
.fd-job { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--surface-2); border-radius: var(--r-button); }
.fd-job-t { font-weight: 700; color: var(--text); }
.fd-job-w { font-size: var(--fs-caption); color: var(--text-3); }
.fd-booked { margin-left: auto; padding: 2px var(--s-2); border: 1px solid var(--gilt); border-radius: var(--r-button); font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.fd-stars { padding: var(--s-2) var(--s-3) 0; font-size: var(--fs-h3); letter-spacing: 2px; color: var(--text); }
.fd-rev-body { padding: 2px var(--s-3) var(--s-3); font-size: var(--fs-cell); color: var(--text); }
.fd-cta { margin-top: var(--s-4); padding: var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); font-weight: 600; color: var(--text); }
@media (max-width: 980px) {
  .fd-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fd-rail { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .fd-rail > li { flex: 1 1 11rem; }
}
@media (max-width: 680px) {
  .fd-layout { grid-template-columns: minmax(0, 1fr); }
  .fd-navgrp { margin-left: 0; }
}
html.is-present .fd-wrap { max-width: 1280px; }

/* System alerts, Level (P6 C-13): Critical is a word in tracked caps with the crimson mark; Red and Yellow are plain words. */
.sc-lvl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-1); }
.sc-lvl--crit { gap: var(--s-1); font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.sc-lvl--crit .i { color: var(--accent-mark); flex: none; }
.sc-lvl-sub { flex-basis: 100%; font-size: var(--fs-caption); }
.sc-al-acts { display: inline-flex; flex-wrap: wrap; gap: var(--s-1); }
.sc-al-foot .link-btn { white-space: normal; text-align: left; }

/* Tools (P7 M26): the live demo lines sit between two rows of two containers; a line's sub is several short lines and its state is a word */
.sc-rows { display: flex; flex-direction: column; gap: var(--s-3); }
.sc-rows > * { min-width: 0; }
.at-line { display: block; }
.at-line + .at-line { margin-top: 2px; }
.at-line a { white-space: nowrap; }
.at-line b { color: var(--text-2); font-weight: 700; }
.at-list .sr-main { padding: 8px 0; }
.at-state { color: var(--text); font-weight: 700; }
/* On a phone the state word of a finding row sits under its text (a long word such as "Failing when last looked at" would squeeze the title to a sliver) */
@media (max-width: 599px) {
  .at-list .sr-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "lead main" "lead meta"; row-gap: 0; }
  .at-list .sr-row:not(:has(> .sr-lead)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "meta"; padding-left: var(--s-3); }
  .at-list .sr-meta { justify-self: start; white-space: normal; padding-bottom: var(--s-2); }
}
