/* Shared marketing-site layout: navigation state, footer, page sections and
   the illustrative receivables control room. Values come from the Pellucid
   design system tokens; header, menu and form base styles stay in landing.css. */

/* ---------- Navigation state ---------- */
.nav-link[aria-current] { color: var(--primary); font-weight: 600; }
/* Header CTA uses the 44px button; compact screens keep it inside the header row. */
/* Animate colour only, so breakpoint changes never animate the button's size. */
.header-cta { transition-property: background-color, border-color, color, box-shadow; }
@media (max-width: 899px) {
  .header-cta.pl-btn--lg { padding: 0 14px; font-size: var(--text-sm); }
}
@media (max-width: 359px) {
  .header-cta.pl-btn--lg { padding: 0 10px; font-size: 13px; }
}

/* ---------- Section scaffolding ---------- */
:root {
  --site-max-width: 1160px;
  --site-gutter: clamp(16px, 4vw, 32px);
  --site-content-max: calc(var(--site-max-width) - 2 * var(--site-gutter));
}
.section { padding: clamp(64px, 9vw, 104px) var(--site-gutter); }
.section--surface { background: var(--card); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.section--tint { background: var(--pellucid-tint); }
.section--dark { background: var(--deep-sea); color: #fff; }
.container { max-width: var(--site-content-max); margin: 0 auto; }
.section-heading { max-width: 720px; }
.section-heading--split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; max-width: none; }
.section-heading--split > p { margin: 0; max-width: 420px; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); }
.eyebrow { margin: 0; font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--primary); }
.section--dark .eyebrow { color: var(--brand-200); }
.section-title { margin: 12px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: var(--tracking-tight); color: var(--neutral-900); text-wrap: balance; }
.section--dark .section-title { color: #fff; }
.section-lede { margin: 16px 0 0; max-width: 680px; font-size: var(--text-lg); line-height: var(--leading-normal); color: var(--neutral-700); text-wrap: pretty; }
.section--dark .section-lede { color: var(--brand-50); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.text-link svg { transition: transform var(--duration-fast) var(--ease-out); }
.text-link:hover svg { transform: translateX(2px); }
.icon-chip { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--accent); color: var(--accent-foreground); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Home hero ---------- */
.home-hero { background: var(--card); border-bottom: 1px solid var(--card-border); overflow: hidden; }
.home-hero-layout { max-width: var(--site-max-width); margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--site-gutter); display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 14fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
.display-title { margin: 16px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 3.8vw, 50px); line-height: 1.06; letter-spacing: var(--tracking-tight); color: var(--neutral-900); text-wrap: balance; }
.hero-lede { margin: 20px 0 0; font-size: var(--text-lg); line-height: var(--leading-normal); color: var(--neutral-700); text-wrap: pretty; }
.integrations { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 28px 0 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--neutral-700); }
.integrations li { padding: 4px 10px; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--neutral-50); font-weight: 600; color: var(--neutral-800); }
.integrations li:first-child { padding: 0; border: 0; background: none; font-weight: 400; color: var(--neutral-700); }
@media (max-width: 959px) {
  .home-hero-layout { grid-template-columns: minmax(0, 1fr); }
  .home-hero-copy { max-width: 720px; }
}
@media (max-width: 479px) {
  .home-hero .button-row .pl-btn { width: 100%; }
}

/* ---------- Inner page hero ---------- */
.page-hero { background: var(--card); border-bottom: 1px solid var(--card-border); }
.page-hero-inner { max-width: var(--site-max-width); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--site-gutter) clamp(40px, 6vw, 72px); }
.page-title { margin: 12px 0 0; max-width: 860px; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 4.8vw, 56px); line-height: 1.06; letter-spacing: var(--tracking-tight); color: var(--neutral-900); text-wrap: balance; }
.page-lede { margin: 20px 0 0; max-width: 720px; font-size: var(--text-lg); line-height: var(--leading-normal); color: var(--neutral-700); text-wrap: pretty; }
.page-lede + .page-lede { margin-top: 12px; font-size: var(--text-base); }

/* ---------- Workflow strip ---------- */
.flow-strip { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.flow-strip--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow-step { position: relative; padding: 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.flow-step + .flow-step { border-left: 1px solid var(--card-border); }
.flow-step-number { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; color: var(--primary); }
.flow-step h3 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--neutral-900); }
.flow-step p { margin: 0; font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--neutral-700); }
.flow-step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-more { margin-top: 24px; }
@media (max-width: 1023px) {
  .flow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step + .flow-step { border-left: 0; }
  .flow-step { border-top: 1px solid var(--card-border); }
  .flow-step:nth-child(-n + 2) { border-top: 0; }
  .flow-step:nth-child(even) { border-left: 1px solid var(--card-border); }
  .flow-step:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .flow-strip { grid-template-columns: minmax(0, 1fr); }
  .flow-step:nth-child(even) { border-left: 0; }
  .flow-step:nth-child(2) { border-top: 1px solid var(--card-border); }
}

/* ---------- Feature module: intelligent follow-ups ---------- */
.feature-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 64px); align-items: center; margin-top: 48px; padding: clamp(24px, 4vw, 40px); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); }
.feature-title { margin: 10px 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); color: var(--neutral-900); }
.feature-copy > p:not(.eyebrow) { margin: 12px 0 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); }
.check-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 10px; font-size: var(--text-base); line-height: var(--leading-snug); color: var(--neutral-800); }
.check-list svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.check-list--team svg { color: var(--brand-800); }
.activity-card { border: 1px solid var(--card-border); border-radius: var(--radius-lg); background: var(--neutral-50); overflow: hidden; }
.activity-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--card-border); background: var(--card); }
.activity-head p { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--neutral-900); }
.activity-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--card-border); }
.activity-stats div { padding: 16px 18px; }
.activity-stats div + div { border-left: 1px solid var(--card-border); }
.activity-stats dt { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--muted-foreground); }
.activity-stats dd { margin: 6px 0 0; font-family: var(--font-mono); font-weight: 600; font-size: var(--text-xl); color: var(--neutral-900); }
.activity-log { list-style: none; margin: 0; padding: 6px 18px 12px; }
.activity-log li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; font-size: var(--text-sm); color: var(--neutral-800); }
.activity-log li + li { border-top: 1px solid var(--card-border); }
.activity-log span:last-child { font-size: var(--text-xs); color: var(--muted-foreground); text-align: right; }
@media (max-width: 479px) {
  .activity-stats { grid-template-columns: minmax(0, 1fr); }
  .activity-stats div + div { border-left: 0; border-top: 1px solid var(--card-border); }
  .activity-log li { grid-template-columns: minmax(0, 1fr); }
  .activity-log span:last-child { text-align: left; }
}

/* ---------- Bordered card grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin-top: 48px; }
.card-grid--tight { margin-top: 20px; }
.card-grid--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.info-card { padding: 28px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 12px; }
.info-card h3 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); color: var(--neutral-900); }
.info-card p { margin: 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); }
.info-card--tint { background: var(--pellucid-tint); border-color: var(--brand-100); }
.info-card--tint h3 { color: var(--brand-900); }
.info-card ul { margin-top: 4px; }

/* ---------- Report promotion ---------- */
.report-promo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(32px, 5vw, 72px); align-items: center; }
.report-cover { margin: 0; }
.report-cover img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); }
.report-promo .section-lede { font-size: var(--text-base); }
.section--dark .text-link { align-self: center; color: var(--brand-200); }
.section--dark .text-link:hover { color: #fff; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--card-border); }
.faq-answer p { margin: 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); text-wrap: pretty; }
.faq-more { margin: 24px 0 0; font-size: var(--text-base); color: var(--neutral-700); }

/* ---------- Closing call to action ---------- */
.closing-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.closing-cta .section-title { margin: 0; max-width: 720px; color: var(--brand-900); font-size: clamp(26px, 3.4vw, 38px); }

/* ---------- Use cases page ---------- */
.uc-list { display: flex; flex-direction: column; gap: 20px; }
.uc-item { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px 56px; align-items: center; padding: clamp(24px, 4vw, 40px); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); scroll-margin-top: 96px; }
.uc-item h2 { margin: 14px 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); color: var(--neutral-900); }
.uc-item p { margin: 10px 0 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); }
.uc-subhead { margin: 18px 0 0 !important; font-size: var(--text-xs) !important; font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--primary) !important; }
.uc-item .check-list { margin-top: 10px; gap: 8px; }
.uc-item .check-list li { font-size: var(--text-sm); }
.uc-decides { padding: 12px 14px; border-radius: var(--radius-md); background: var(--pellucid-tint); font-size: var(--text-sm) !important; }
.uc-decides strong { color: var(--brand-900); font-weight: 600; }
.uc-item { align-items: start; }
@media (min-width: 900px) { .uc-item { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.uc-example { position: sticky; top: 96px; }
.uc-facts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.uc-item .uc-facts p { margin: 0; font-size: var(--text-sm); }
.uc-item .uc-facts p + p { margin-top: 6px; }
.uc-facts strong { color: var(--neutral-900); font-weight: 600; }
.uc-example { border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--neutral-50); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.uc-example-row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-sm); }
.uc-example-row span:first-child { font-weight: 600; color: var(--neutral-900); }
.uc-example p { margin: 0; font-size: var(--text-xs); color: var(--neutral-700); }
.uc-example .pl-badge { align-self: flex-start; }
.aging-bar { display: flex; height: 10px; gap: 2px; border-radius: var(--radius-full); overflow: hidden; }
.aging-bar span:nth-child(1) { flex: 5; background: var(--chart-1); }
.aging-bar span:nth-child(2) { flex: 3; background: var(--chart-2); }
.aging-bar span:nth-child(3) { flex: 1.5; background: var(--chart-3); }
.aging-bar span:nth-child(4) { flex: 1; background: var(--chart-4); }
.aging-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--text-xs); color: var(--neutral-700); }

/* ---------- Resources hub ---------- */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.resource-tile { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--duration-normal) var(--ease-out), border-color var(--duration-normal) var(--ease-out); }
.resource-tile:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.resource-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1500 / 1020; object-fit: cover; background: var(--deep-sea); }
.resource-tile img.resource-tile-brand { object-fit: contain; }
.resource-tile-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.resource-tile-meta { margin: 0; display: flex; gap: 12px; font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--muted-foreground); }
.resource-tile-meta span:first-child { color: var(--primary); }
.resource-tile h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); line-height: 1.3; }
.resource-tile h2 a { color: var(--neutral-900); }
.resource-tile h2 a::after { content: ""; position: absolute; inset: 0; }
.resource-tile h2 a:hover { text-decoration: none; }
.resource-tile h2 a:focus-visible { outline: none; }
.resource-tile:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.resource-tile p:not(.resource-tile-meta) { margin: 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); }
.resource-tile .text-link { margin-top: auto; padding-top: 6px; color: var(--primary); }

/* ---------- How it works page ---------- */
.step-list { list-style: none; margin: 0; padding: 0; max-width: 880px; }
.step-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--card-border); }
.step-row:first-child { padding-top: 0; }
.step-row:last-child { border-bottom: 0; }
.step-marker { width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--primary); color: var(--primary-foreground); display: flex; align-items: center; justify-content: center; }
.step-row .flow-step-number { display: block; }
.step-row h2 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); color: var(--neutral-900); }
.step-row p { margin: 8px 0 0; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--neutral-700); max-width: 680px; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; margin-top: 48px; }

/* ---------- Contact page ---------- */
.contact-grid { max-width: var(--site-content-max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(40px, 6vw, 72px); align-items: start; }
.contact-intro .page-title { color: #fff; }
.contact-intro .page-lede { color: var(--brand-50); }
.contact-points { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-points li { display: flex; gap: 12px; font-size: var(--text-base); line-height: var(--leading-snug); color: #fff; }
.contact-points svg { flex-shrink: 0; color: var(--brand-300); }
.form-card { background: var(--card); color: var(--foreground); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: clamp(24px, 4vw, 36px); }
.form-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); color: var(--neutral-900); }
.form-note { margin: 6px 0 0; font-size: var(--text-sm); color: var(--neutral-700); }
.form-success-mark { height: 36px; width: auto; display: block; color: var(--primary); }
.form-grid > *, .contact-grid > *, .home-hero-layout > * { min-width: 0; }

/* ---------- Footer ---------- */
.footer-grid { max-width: var(--site-max-width); margin: 0 auto; padding: 52px var(--site-gutter) 40px; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand .home-link { display: inline-flex; }
.footer-tagline { margin: 14px 0 0; max-width: 300px; font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--neutral-700); }
.footer-social { list-style: none; display: flex; gap: 8px; margin: 20px 0 0; padding: 0; }
.footer-social a { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--card-border); border-radius: var(--radius-full); color: var(--neutral-700); transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
.footer-social a:hover { color: var(--primary); border-color: var(--primary); }
.footer-heading { margin: 0; font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--neutral-900); }
.footer-links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: var(--text-sm); color: var(--neutral-700); }
.footer-links a, .footer-links button { color: var(--neutral-700); }
.footer-links a:hover, .footer-links button:hover { color: var(--primary-hover); }
.footer-links button { appearance: none; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.footer-bottom { max-width: var(--site-max-width); margin: 0 auto; padding: 20px var(--site-gutter) 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; border-top: 1px solid var(--card-border); }
.footer-bottom p { margin: 0; color: var(--neutral-600); font-size: 12px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.footer-legal a { color: var(--neutral-600); font-size: 12px; font-weight: 400; line-height: 1.6; }
.footer-legal a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a[aria-current] { color: var(--primary-hover); font-weight: 600; }
@media (max-width: 899px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 14px; }
}
@media (max-width: 479px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 36px; padding-bottom: 28px; }
  .footer-links { font-size: 13px; gap: 8px; }
  .footer-heading { font-size: 11px; }
  .footer-links a, .footer-links button { display: inline-flex; min-height: 32px; align-items: center; }
  .footer-legal { gap: 6px 14px; }
  .footer-legal a { display: inline-flex; align-items: center; min-height: 28px; }
}

/* ---------- Company pages ---------- */
.about-hero .page-title { max-width: 850px; }
.about-hero .page-lede { max-width: 740px; }
.about-story-section { padding-top: 64px; padding-bottom: 80px; }
.about-story { max-width: 720px; }
.about-story h2 { margin: 0 0 20px; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; line-height: 1.25; letter-spacing: var(--tracking-tight); color: var(--neutral-900); }
.about-story h2:not(:first-of-type) { margin-top: 48px; }
.about-story p:not(.eyebrow) { margin: 0 0 20px; font-size: 17px; line-height: 1.8; color: var(--neutral-700); }
.about-story .eyebrow { margin-bottom: 16px; }
.careers-section { padding-top: 56px; padding-bottom: 88px; }
.careers-card { max-width: 820px; padding: clamp(28px, 5vw, 48px); border: 1px solid var(--card-border); border-radius: var(--radius-xl); background: var(--card); }
.careers-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--brand-100); border-radius: var(--radius-full); color: var(--brand-800); background: var(--brand-50); font-size: 12px; font-weight: 600; }
.careers-status > span { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; }
.careers-card h2 { margin: 22px 0 16px; font-family: var(--font-display); font-size: clamp(24px, 3vw, 30px); letter-spacing: var(--tracking-tight); font-weight: 700; }
.careers-card p { max-width: 650px; margin: 0 0 18px; font-size: 16px; line-height: 1.8; color: var(--neutral-700); }
.careers-card p a { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.careers-card .pl-btn { margin-top: 12px; gap: 12px; }
@media (max-width: 599px) {
  .about-desktop-break { display: none; }
  .about-story-section { padding-top: 40px; }
  .about-story p:not(.eyebrow) { font-size: 16px; }
}

/* ---------- Receivables control room (illustration) ---------- */
.control-room { margin: 0; container: control-room / inline-size; }
.cr-frame { display: grid; grid-template-columns: 56px minmax(0, 1fr); background: var(--neutral-50); border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); overflow: hidden; text-align: left; color: var(--foreground); }
.cr-rail { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; background: var(--deep-sea); color: var(--brand-200); }
.cr-rail-mark { height: 18px; width: auto; color: #fff; margin-bottom: 10px; }
.cr-rail-item { width: 34px; height: 34px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.cr-rail-item--active { background: hsl(0 0% 100% / 0.12); color: #fff; }
.cr-main { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cr-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-base); color: var(--neutral-900); }
.cr-subtitle { margin: 2px 0 0; font-size: var(--text-xs); color: var(--muted-foreground); }
.cr-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; }
.cr-metric { padding: 10px 12px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); min-width: 0; }
.cr-metric dt { font-size: 10px; font-weight: 600; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-foreground); }
.cr-metric dd { margin: 4px 0 0; font-family: var(--font-mono); font-weight: 600; font-size: var(--text-sm); color: var(--neutral-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 250px); gap: 12px; align-items: start; }
.cr-panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); min-width: 0; }
.cr-tabs { display: flex; gap: 16px; padding: 0 12px; border-bottom: 1px solid var(--card-border); font-size: var(--text-xs); font-weight: 600; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; }
.cr-tab { padding: 10px 0 9px; border-bottom: 2px solid transparent; }
.cr-tab--active { color: var(--primary); border-bottom-color: var(--primary); }
.cr-count { margin-left: 4px; font-family: var(--font-mono); font-weight: 500; }
.cr-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 12px; font-size: var(--text-xs); }
.cr-row + .cr-row { border-top: 1px solid var(--card-border); }
.cr-row--selected { background: var(--pellucid-tint); box-shadow: inset 2px 0 0 var(--primary); }
.cr-dot { width: 8px; height: 8px; border-radius: 50%; }
.cr-dot--high { background: var(--error); }
.cr-dot--medium { background: var(--warning); }
.cr-dot--low { background: var(--info); }
.cr-dot--done { background: var(--success); }
.cr-client { margin: 0; font-weight: 600; font-size: var(--text-sm); color: var(--neutral-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-detail { margin: 2px 0 0; color: var(--neutral-700); }
.cr-amount { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--neutral-900); text-align: right; }
.cr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cr-confidence { color: var(--muted-foreground); white-space: nowrap; }
.cr-review { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cr-review-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; }
.cr-review-title { margin: 0; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); color: var(--neutral-900); }
.cr-email { border: 1px solid var(--card-border); border-radius: var(--radius-md); font-size: var(--text-xs); }
.cr-email-meta { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-bottom: 1px solid var(--card-border); color: var(--muted-foreground); }
.cr-email-meta span span { color: var(--neutral-900); }
.cr-email-body { margin: 0; padding: 8px 10px; line-height: 1.6; color: var(--neutral-700); }
.cr-basis { margin: 0; padding: 8px 10px; border-radius: var(--radius-md); background: var(--neutral-50); font-size: var(--text-xs); line-height: 1.5; color: var(--neutral-700); }
.cr-basis strong { color: var(--neutral-900); font-weight: 600; }
.cr-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.illustration-control { cursor: default; pointer-events: none; }
.illustration-note { margin: 12px 0 0; font-size: var(--text-xs); color: var(--muted-foreground); text-align: right; }

@container control-room (min-width: 1000px) {
  .cr-row { grid-template-columns: 8px minmax(0, 1fr) 120px 150px 130px; gap: 12px 16px; padding: 12px 16px; }
  .cr-side { display: contents; }
  .cr-side .pl-badge { justify-self: start; }
}
@container control-room (max-width: 900px) {
  .cr-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container control-room (max-width: 700px) {
  .cr-body { grid-template-columns: minmax(0, 1fr); }
  .cr-review { display: none; }
  .cr-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container control-room (max-width: 560px) {
  .cr-frame { grid-template-columns: minmax(0, 1fr); }
  .cr-rail { display: none; }
  .cr-main { padding: 12px; }
  .cr-side .pl-badge, .cr-confidence { display: none; }
  .cr-tab:nth-child(n + 4) { display: none; }
}
@container control-room (max-width: 420px) {
  .cr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Account history (Platform illustration) ---------- */
.account-history { margin: 0; container: account-history / inline-size; }
.ah-frame { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: var(--neutral-50); border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); color: var(--foreground); text-align: left; }
.ah-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ah-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--neutral-900); }
.ah-subtitle { margin: 2px 0 0; font-size: var(--text-xs); color: var(--muted-foreground); }
.ah-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ah-facts div { padding: 10px 12px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); min-width: 0; }
.ah-facts dt { font-size: 10px; font-weight: 600; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-foreground); }
.ah-facts dd { margin: 4px 0 0; font-size: var(--text-sm); font-weight: 600; color: var(--neutral-900); }
.ah-facts dd.tabular-nums { font-family: var(--font-mono); }
.ah-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ah-timeline { list-style: none; margin: 0; padding: 4px 16px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); }
.ah-timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 0; font-size: var(--text-sm); }
.ah-timeline li + li { border-top: 1px solid var(--card-border); }
.ah-timeline p { margin: 0; line-height: var(--leading-snug); color: var(--neutral-700); }
.ah-timeline strong { font-weight: 600; color: var(--neutral-900); }
.ah-timeline .tabular-nums, .ah-records li { font-family: var(--font-mono); }
.ah-date { font-size: var(--text-xs); color: var(--muted-foreground); white-space: nowrap; }
.ah-source { justify-self: start; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ah-source--erp { background: var(--info-bg); color: var(--info-foreground); }
.ah-source--bank { background: var(--success-bg); color: var(--success-foreground); }
.ah-source--inbox { background: var(--warning-bg); color: var(--warning-foreground); }
.ah-source--team { background: var(--accent); color: var(--accent-foreground); }
.ah-next { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--card); border: 1px solid var(--brand-200); border-radius: var(--radius-md); box-shadow: inset 3px 0 0 var(--primary); }
.ah-next-label { margin: 6px 0 0; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-foreground); }
.ah-next-label:first-child { margin-top: 0; color: var(--primary); }
.ah-next-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-base); color: var(--neutral-900); }
.ah-next-why { margin: 0; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--neutral-700); }
.ah-next-why strong { color: var(--neutral-900); }
.ah-records { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); color: var(--neutral-800); }
.ah-records li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: var(--neutral-50); border-radius: var(--radius-sm); }
.ah-records span { font-family: var(--font-body); color: var(--muted-foreground); }
.ah-next .cr-actions { margin-top: 6px; }
@container account-history (max-width: 760px) {
  .ah-body { grid-template-columns: minmax(0, 1fr); }
  .ah-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container account-history (max-width: 480px) {
  .ah-frame { padding: 14px; }
  .ah-timeline { padding: 0 12px; }
  .ah-timeline li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .ah-timeline li p { grid-column: 1 / -1; grid-row: 2; }
  .ah-date { grid-column: 2; grid-row: 1; justify-self: end; }
}

/* Hero variant: three tiles, three accounts and a shorter draft, so the
   illustration matches the copy's height. The Platform page shows the full room. */
.control-room--compact .cr-metric:nth-child(3), .control-room--compact .cr-metric:nth-child(n + 5) { display: none; }
.control-room--compact .cr-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.control-room--compact .cr-panel > .cr-row:nth-child(n + 5) { display: none; }
.control-room--compact .cr-confidence, .control-room--compact .cr-email-meta { display: none; }
.control-room--compact .cr-subtitle { display: none; }
@container control-room (max-width: 420px) {
  .control-room--compact .cr-metric:nth-child(4) { display: none; }
  .control-room--compact .cr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Motion ---------- */
@keyframes site-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.home-hero .control-room { animation: site-rise var(--duration-slow) var(--ease-out) 120ms both; }
@media (prefers-reduced-motion: reduce) {
  .home-hero .control-room { animation: none; }
  .resource-tile, .footer-social a { transition: none; }
  .text-link svg { transition: none; }
}
.form-honeypot { display: none; }
.uc-example .tabular-nums, .activity-log .tabular-nums { font-family: var(--font-mono); }
.uc-example .pl-badge { max-width: 100%; white-space: normal; height: auto; min-height: 22px; line-height: 1.4; padding-top: 2px; padding-bottom: 2px; }
