/* Shared product foundation. Keep these values aligned with lib/theme.js. */
:root {
  --restore-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --restore-focus: #0f766e;
  --restore-control: #80877d;
  --restore-surface: #ffffff;
  --restore-text: #151719;
}
html, body { font-family: var(--restore-font); background: #f7f7f4; color: #151719; }
*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }
button { color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: #0f766e; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, a { touch-action: manipulation; }
button.primary-action:hover:not(:disabled) { background: #0b5f58 !important; }
:focus-visible, .app-shell :focus-visible {
  outline: 2px solid var(--restore-focus);
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select, textarea {
  border-color: var(--restore-control) !important;
  color: var(--restore-text);
  background-color: var(--restore-surface);
}
input::placeholder, textarea::placeholder { color: #505861; opacity: 1; }
/* Restaurant and provider workspaces: light content, dark sidebar. */
.app-shell {
  color-scheme: light;
  --restore-focus: #0f766e;
  --restore-control: #80877d;
  --restore-surface: #ffffff;
  --restore-text: #151719;
}
.app-shell input::placeholder, .app-shell textarea::placeholder { color: #505861; }
.admin-theme-dark {
  color-scheme: dark;
  --restore-focus: #2be6a4;
  --restore-control: #81897a;
  --restore-surface: #181a17;
  --restore-text: #f4f4f0;
}
.admin-theme-dark input::placeholder, .admin-theme-dark textarea::placeholder { color: #9da397; }
.app-sidebar-dark { --restore-focus: #2be6a4; }
.app-sidebar-dark :focus-visible { outline-color: #2be6a4; }
.app-sidebar-dark .app-nav-link:hover:not([aria-current="page"]) { background: rgba(244,244,240,0.06) !important; color: #f4f4f0 !important; }
.app-sidebar-dark .app-sidebar-footer a:hover, .app-sidebar-dark .app-sidebar-footer div[style*="cursor"]:hover { color: #f4f4f0 !important; }
.app-shell .panel-card { transition: box-shadow .2s cubic-bezier(.25,1,.5,1); }
.admin-theme-light {
  color-scheme: light;
  --restore-focus: #0f766e;
  --restore-control: #80877d;
  --restore-surface: #ffffff;
  --restore-text: #151719;
}
.admin-theme-light input::placeholder, .admin-theme-light textarea::placeholder { color: #505861; }
.app-shell .stat-card:hover { border-color: var(--restore-control); transform: none; }
.app-shell .panel-card { min-width: 0; }
.app-shell .app-sidebar { box-shadow: none !important; }
.workspace-mobile-account button, .workspace-mobile-account a {
  font: inherit; color: inherit; background: transparent; border: 0;
  text-align: left; text-decoration: none; padding: 10px 0; min-height: 44px;
  box-sizing: border-box; cursor: pointer;
}
/* Preserve the desktop agency layout without overflowing the narrower canvas
   alongside the tablet sidebar. Phones retain the existing single-column rule. */
@media (min-width: 761px) and (max-width: 1100px) {
  .app-main .agency-watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.app-shell .dashboard-head { overflow-wrap: anywhere; }
.app-shell .app-main .file-status-pill { white-space: nowrap !important; overflow-wrap: normal !important; }
.premium-hero-grid > *, .premium-console-card, .premium-command-grid > * { min-width: 0; }
.mvp-home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.mvp-home-steps h2 { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.mvp-home-steps p { margin: 0; font-size: 14px; color: #3b4248; line-height: 1.6; }
@media (max-width: 600px) {
  .mvp-home-steps { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .mvp-home-steps > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .mvp-home-steps h2 { margin-top: 2px; }
}

/* The same foundation for independently served policy, blog and guide pages. */
.restore-document {
  --ink: #151719; --muted: #505861; --accent: #0f766e; --line: #dfe2dc; --bg: #f7f7f4;
  font-family: var(--restore-font); color: var(--ink); background: var(--bg);
}
.restore-document p, .restore-document li { color: #3b4248; }
.restore-document a { color: #0f766e; text-underline-offset: 3px; }
.restore-document a:hover { text-decoration: underline; }
.restore-document h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.restore-document h2, .restore-document .logo, .restore-document .brand { color: #151719; font-weight: 700; }
.restore-document .eyebrow, .restore-document .kicker, .restore-document .card .k { color: #505861; font-weight: 600; text-transform: none !important; letter-spacing: 0 !important; }
.restore-document .card { border-radius: 12px; }
.restore-document .cta { background: #111210; border-radius: 16px; }
.restore-document .cta p { color: #b9bdb4; }
.restore-document .cta h2, .restore-document .btn { color: #f4f4f0; }
.restore-document .btn { background: #0f766e; border-radius: 8px; font-weight: 650; }
.restore-document .btn:hover { background: #0b5f58; }
/* Talk to Restore is Restore Red everywhere, matching the header button. */
.restore-document .btn[href^="/inquiry"] { background: #B4283C; }
.restore-document .btn[href^="/inquiry"]:hover { background: #962131; }
.restore-document .bar { gap: 16px; flex-wrap: wrap; }
.restore-document .nav { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.restore-document .nav a { margin-left: 0; }
.restore-document .kicker, .restore-document .card .k { font-size: 13px; }
.restore-document .cta .cta-alt { display: inline-flex; align-items: center; min-height: 44px; margin-left: 18px; color: #f4f4f0; font-size: 15px; font-weight: 600; text-underline-offset: 3px; }
/* Guides and blog share the main site's header: logo mark, plain links,
   teal Sign In and Restore Red Talk to Restore (DESIGN_SYSTEM v3). */
.restore-document .site-head { background: #fff; border-bottom: 1px solid #dfe2dc; }
.restore-document .site-head .wrap { max-width: 1120px; margin: 0 auto; }
.restore-document .site-head .bar { padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; }
.restore-document .site-head .logo { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: #151719; text-decoration: none; }
.restore-document .site-head .logo img { display: block; border-radius: 8px; }
.restore-document .site-head .nav { align-items: center; gap: 8px 22px; }
.restore-document .site-head .nav a { color: #3b4248; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 0; }
.restore-document .site-head .nav a:hover { color: #151719; text-decoration: none; }
.restore-document .site-head .nav a[aria-current="page"] { color: #151719; box-shadow: inset 0 -2px 0 #0f766e; }
.restore-document .site-head .nav .head-btn { color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 650; min-height: 40px; display: inline-flex; align-items: center; }
.restore-document .site-head .nav .sign-in { background: #fff; color: #151719; box-shadow: inset 0 0 0 1.5px #151719; margin-left: 4px; }
.restore-document .site-head .nav .sign-in:hover { background: #f0f1ec; color: #0e1112; }
.restore-document .site-head .nav .talk { background: #b4283c; }
.restore-document .site-head .nav .talk:hover { background: #962131; color: #fff; }
/* Phones: logo and Talk to Restore on one row, the four links in two columns.
   Sign In stays on the main site's menu; these pages never carried it. */
@media (max-width: 760px) {
  .restore-document .site-head .bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 18px; padding: 12px 18px 6px; }
  .restore-document .site-head .nav { display: contents; }
  .restore-document .site-head .logo { grid-row: 1; grid-column: 1; }
  .restore-document .site-head .nav .talk { grid-row: 1; grid-column: 2; min-height: 44px; padding: 10px 14px; }
  .restore-document .site-head .nav .sign-in { display: none; }
  .restore-document .site-head .nav a:not(.head-btn) { justify-self: start; padding: 11px 0; }
}

@media (max-width: 920px) {
  .marketing-header [data-desktop-only="true"] { display: none !important; }
  .marketing-header [data-mobile-only="true"] { display: inline-flex !important; }
}
@media (max-width: 760px) {
  .admin-console .app-main div[style*="grid-template-columns: 280px"],
  .admin-console .app-main div[style*="grid-template-columns:280px"],
  .admin-console .app-main button[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  .marketing-header { padding-bottom: 18px !important; }
  .premium-console-card > div { padding: 16px !important; }
  .premium-console-card > .premium-console-head { flex-wrap: wrap; }
  .premium-data-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .admin-topbar { height: auto !important; min-height: 36px; flex-wrap: wrap; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Secondary buttons: outlined, darken on hover. */
/* Keep the approved review panels; stack before the tablet sidebar squeezes
   the editor. Desktop retains its queue/editor columns. */
.review-ops-heading { flex-wrap: wrap; }
.review-ops-heading > div { min-width: 0; overflow-wrap: anywhere; }
.review-ops-fields > label { min-width: 0; }
@media (max-width: 1200px) {
  .admin-console .review-ops-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .admin-console .review-ops-fields { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; }
}

.secondary-action { transition: border-color .18s cubic-bezier(.25,1,.5,1), background-color .18s cubic-bezier(.25,1,.5,1); }
.rivi-launcher { position: fixed; right: 12px; bottom: 12px; z-index: 60; }
.teaser-record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 14px; }
.teaser-record-actions:empty { display: none; }
.teaser-pdf-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; background: var(--restore-surface); border: 1px solid var(--restore-control); color: var(--restore-text); font-size: 14px; font-weight: 700; text-decoration: none; }
@media (max-width: 767px) {
  .marketing-rivi-slot { display: flex; justify-content: flex-end; }
  .marketing-rivi-slot .rivi-launcher { position: relative; right: auto; bottom: auto; z-index: auto; margin: 8px 24px 16px; }
  .teaser-record-actions { justify-content: flex-start; }
}
.secondary-action:hover { border-color: #151719 !important; background: #ffffff !important; }
/* Dark admin: lift the surface instead of going white, or the light label disappears. */
.admin-theme-dark .secondary-action:hover { border-color: #f4f4f0 !important; background: #23261f !important; }
button.primary-action, a.primary-action { transition: background-color .18s cubic-bezier(.25,1,.5,1), box-shadow .18s cubic-bezier(.25,1,.5,1); }
.mvp-home-steps { gap: 24px; }

/* Phones: stack summary cells with horizontal rules and turn the
   Needs Attention table into readable cards instead of a squeezed grid. */
@media (max-width: 760px) {
  .summary-strip > div { flex-basis: 100% !important; border-right: none !important; border-bottom: 1px solid #e9ebe5; }
  .summary-strip > div:last-child { border-bottom: none; }
  .attention-table { min-width: 0 !important; }
  .attention-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .attention-table, .attention-table tbody, .attention-table tr, .attention-table td { display: block; width: 100%; box-sizing: border-box; }
  .attention-table tr { padding: 14px 18px; border-bottom: 1px solid #e9ebe5; }
  .attention-table td { padding: 3px 0 !important; border: none !important; text-align: left !important; overflow-wrap: normal; }
  .attention-table td button { margin-top: 8px; }
}

/* Citywide console numbers shrink with their tile so "$799.7M" never spills
   out on narrow phones; vw is the fallback where container units are missing. */
.citywide-metric-value { font-size: clamp(20px, 6.2vw, var(--metric-size, 34px)); }
@supports (font-size: 1cqi) {
  .citywide-metric-value { font-size: clamp(20px, 17cqi, var(--metric-size, 34px)); }
}

/* Quiet marketing text actions sit beside buttons; underline on hover. */
.marketing-text-link:hover { text-decoration: underline !important; text-underline-offset: 4px; }

/* Citywide card load-up: agency bars fill like gauges, one after another, and
   the critical-findings dial sweeps to its share. Skipped for reduced motion. */
.citywide-gauge-fill { stroke-dashoffset: var(--gauge-end); }
@media (prefers-reduced-motion: no-preference) {
  .citywide-dashboard:not(.citywide-revealed) .citywide-bar { clip-path: inset(0 100% 0 0 round 999px); }
  .citywide-revealed .citywide-bar { animation: citywide-fill 1s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 80ms + 150ms) both; }
  .citywide-gauge-fill:not(.is-on) { stroke-dashoffset: var(--gauge-len); }
  .citywide-gauge-fill.is-on { animation: citywide-gauge 1.2s cubic-bezier(.2, .7, .2, 1) .4s both; }
}
@keyframes citywide-fill { from { clip-path: inset(0 100% 0 0 round 999px); } to { clip-path: inset(0 0 0 0 round 999px); } }
@keyframes citywide-gauge { from { stroke-dashoffset: var(--gauge-len); } to { stroke-dashoffset: var(--gauge-end); } }

/* Compliance Reviews: six stats in one row on desktop, never a lone orphan
   card; on tablets the queue scrolls inside itself above the editor. */
@media (max-width: 1200px) {
  .admin-console .review-ops-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .admin-console .review-ops-queue { max-height: 340px; overflow-y: auto !important; }
}
@media (max-width: 560px) {
  .admin-console .review-ops-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Accounts: below laptop width each account becomes a card so the actions
   (including View as Client) are never cut off behind a sideways scroll. */
@media (max-width: 1180px) {
  .admin-accounts-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-accounts-table, .admin-accounts-table tbody, .admin-accounts-table tr, .admin-accounts-table td { display: block; width: 100%; box-sizing: border-box; }
  .admin-accounts-table tr { padding: 14px 16px; }
  .admin-accounts-table td { display: flex; align-items: center; gap: 12px; padding: 4px 0 !important; }
  .admin-accounts-table td::before { content: attr(data-label); flex: 0 0 120px; font-size: 12.5px; font-weight: 600; color: var(--restore-text); opacity: 0.72; }
  .admin-accounts-table td[data-label="Account"] { padding-bottom: 8px !important; }
  .admin-accounts-table td[data-label="Account"]::before { display: none; }
  .admin-accounts-table td[data-label="Actions"] { align-items: flex-start; padding-top: 10px !important; }
  .admin-accounts-table td[data-label="Actions"] > div { flex: 1; }
}

/* Public header links: a teal underline marks the current page; keyboard focus
   shows a soft rounded tint instead of a hard outline box. */
.marketing-nav-link { position: relative; border-radius: 8px; transition: color .15s ease; }
.marketing-nav-link:hover, .marketing-nav-link[aria-current="page"] { color: #151719 !important; }
.marketing-nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px; background: #0f766e; }
.marketing-nav-link:focus-visible { outline: none; background: rgba(15,118,110,.12); box-shadow: 0 0 0 6px rgba(15,118,110,.12); }

/* Services cards: full details on wider screens; on phones each card shows its
   title and summary, with the details one tap away. */
.services-card { padding: 28px; }
.services-card-toggle { display: none; }
@media (max-width: 640px) {
  .services-card { padding: 22px; }
  .services-card-toggle { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: #0f766e; cursor: pointer; }
  .services-card-toggle::after { content: "+"; content: "+" / ""; margin-left: 8px; font-size: 18px; line-height: 1; }
  .services-card.is-open .services-card-toggle::after { content: "–"; content: "–" / ""; }
  .services-card:not(.is-open) .services-card-details { display: none; }
  .services-card .services-card-details { margin-top: 8px !important; }
}

/* Footer links get comfortable tap targets on phones. */
@media (max-width: 820px) {
  .marketing-footer-links { gap: 0 20px !important; }
  .marketing-footer-links > a, .marketing-footer-links > button { display: inline-flex; align-items: center; min-height: 44px; }
}

/* For Restaurants page on phones: tighter spacing, the first example picture
   only, and no long blank bands. */
@media (max-width: 640px) {
  .restaurant-hero { padding: 48px 20px 40px !important; }
  .restaurant-row { padding: 56px 20px !important; }
  .restaurant-row > div { gap: 28px !important; }
  .restaurant-contact-band { padding: 0 20px 56px !important; }
  .restaurant-row-visual--optional { display: none; }
  .restaurant-steps, .restaurant-cta { padding: 64px 20px !important; }
}

/* Homepage on phones: tighter sections, the key example pictures only. */
@media (max-width: 640px) {
  .home-section { padding: 56px 20px !important; }
  .home-section--top { padding-bottom: 0 !important; }
  .home-section > div { gap: 28px !important; }
  .home-step-visual, .home-row-visual--optional { display: none !important; }
  .mvp-home-steps { margin-top: 32px !important; }
  .home-plan { padding: 22px 20px !important; gap: 12px !important; }
}

/* Admin console on phones (Carlos, Nov 8, 2026): thumb-sized account actions,
   two-across Today numbers, the same page edges on every screen, and a
   readable account section in the menu. */
@media (max-width: 760px) {
  .app-main > section { padding-left: 0 !important; padding-right: 0 !important; }
  .app-main .today-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .app-main .today-metrics > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .app-main .today-vitals { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  .app-main .today-vitals > div { padding: 10px !important; min-width: 0; }
  .app-main .today-vital-value { font-size: 13px !important; white-space: nowrap; }
  .admin-accounts-table td[data-label="Actions"] { flex-direction: column; align-items: stretch !important; gap: 8px; }
  .admin-accounts-table td[data-label="Actions"]::before { flex: none !important; }
  .admin-accounts-table td[data-label="Actions"] > div:first-child { gap: 8px !important; }
  .admin-accounts-table td[data-label="Actions"] button { min-height: 40px; padding: 8px 12px !important; font-size: 13px !important; }
  .admin-accounts-table [data-account-danger] { margin-left: auto; }
  .admin-console .admin-theme-toggle { min-height: 36px !important; }
  .app-sidebar-nav .workspace-mobile-role { display: flex !important; padding: 4px 4px 10px; }
  .workspace-mobile-role .workspace-mobile-role-switch { margin-top: 0 !important; width: 100% !important; }
  .workspace-mobile-role .workspace-mobile-role-switch button { min-height: 40px; }
  .workspace-mobile-account { font-size: 14px; font-weight: 600; }
  .workspace-mobile-account .workspace-mobile-account-delete { font-weight: 500; opacity: .72; }
}

/* Customer portal on phones (Carlos, Nov 8, 2026): full-width menu divider,
   a compact Refresh button, and contact buttons that share the row. */
@media (max-width: 760px) {
  .app-sidebar-nav .workspace-mobile-account { display: flex !important; width: 100%; box-sizing: border-box; }
  .app-main .client-refresh { width: auto !important; align-self: flex-start !important; }
  .app-main .client-support-actions { width: 100%; }
  .app-main .client-support-actions a:first-child { flex: 1 1 100%; justify-content: center; }
  .app-main .client-support-actions a:not(:first-child) { flex: 1 1 0; justify-content: center; }
}

/* Public header on phones: logo link and Menu button are full thumb size. */
@media (max-width: 760px) {
  .marketing-header > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }
  .marketing-header button[aria-label="Open menu"] { min-height: 44px !important; }
}

/* Citywide agency table on phones: top four first, the rest behind a toggle. */
.citywide-more { display: none; }
@media (max-width: 760px) {
  .citywide-agencies:not([data-all]) .citywide-extra { display: none; }
  .citywide-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0; background: none; border: 0; color: #2BE6A4; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
}
