/* Shared site components: used by the landing page, the R2P portal and the Article so the three read as one site.
   Fonts and colours come from tokens.css / base.css (the landing page's). Loaded AFTER base.css and each page's own CSS. */

/* ---- boxed cells (the Article's grid, 1px dividers) ---- */
.cells { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.cells.c1 { grid-template-columns: 1fr; }
.cells.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cell { background: var(--surface); padding: 30px 26px; min-width: 0; }
.cell .k { display: block; font: 500 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--start-ink); }
.cell h3 { font: 600 1.3rem/1.25 var(--display); letter-spacing: -.01em; margin: 12px 0 8px; }
.cell p { color: var(--ink-2); font-size: .98rem; line-height: 1.6; margin: 0; max-width: none; }
a.cell { position: relative; display: block; padding-bottom: 62px; color: var(--ink); text-decoration: none; }
a.cell:hover { background: var(--paper-2); }
a.cell .go-a { position: absolute; right: 24px; bottom: 20px; font-size: 24px; line-height: 1; color: var(--ink); }
@media (max-width: 900px) { .cells.c3, .cells.c2 { grid-template-columns: 1fr; } .cells.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cells.c4 { grid-template-columns: 1fr; } }

/* ---- centered section heading (same on every page) ---- */
.sechead { text-align: center; margin: 0 auto clamp(24px, 3vw, 36px); }
.sechead h2 { font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.2rem); letter-spacing: -.02em; margin: 0 auto; max-width: 28ch; }

/* ---- footer (identical on every page) ---- */
.sitefoot { margin-top: clamp(56px, 8vw, 104px); border-top: 1px solid var(--rule); background: var(--paper-2); }
.sitefoot-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 30px; padding-bottom: 42px; }
.sitefoot .fb { font: 600 15px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.sitefoot p { margin: 8px 0 0; font-size: 16px; color: var(--ink-2); }
.sitefoot nav { display: flex; gap: 24px; font: 600 16px/1.3 var(--body); }
.sitefoot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.sitefoot nav a:hover { color: var(--cobalt-ink); text-decoration: underline; }

/* single-line link cell: label and title on the left, arrow on the right */
a.cell.simple { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 30px; }
a.cell.simple h3 { margin: 8px 0 0; }
a.cell.simple .go-a { position: static; flex: none; align-self: center; font-size: 26px; }

/* Footer sits at the floor of the viewport on short pages; content pushes it down on long ones. */
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .sitefoot { flex: none; }
/* Contact remains a quiet text action, shared with the header. */
.sitefoot nav a.foot-cta { min-height: 44px; padding: 8px 0; color: var(--ink-2); }
.sitefoot nav a.foot-cta:hover, .sitefoot nav a.foot-cta:focus-visible { color: var(--ink); text-decoration: underline; }

/* "Early research preview" label (R2P landing page and article). */
.preview { margin: 0 0 14px; font: 500 15px/1.4 var(--body); color: var(--ink-2); }
.preview .pill { display: inline-block; margin-right: 8px; padding: 4px 9px; border-radius: 3px; background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink-2); font: 500 14px/1.3 var(--body); }

/* Original logo artwork and proportions are unchanged. */
.sitenav .brand { padding: 4px 0; flex: none; gap: 12px; }
.sitenav .brand img.brand-wordmark { display: block; width: 108px; height: 54px; }
.sitenav .brand img.brand-icon { display: block; height: 54px; width: 54px; border-radius: 0; }
.sitefoot .fb-logo { display: block; height: 52px; width: auto; }
.sitefoot-in .fb-logo + p { margin-top: 10px; }
@media (max-width: 600px) {
  .sitenav .brand img.brand-wordmark { display: none; }
  .sitenav .brand img.brand-icon { display: block; width: 36px; height: 36px; }
  .sitenav nav { gap: 16px; }
  .sitenav nav a.nav-cta { padding-inline: 0; }
}
a.cell.simple .preview { display: block; margin: 0 0 8px; }

/* A local product navigation row, not an additional global menu. */
.r2p-subnav, .localnav { border-bottom: 1px solid var(--rule); }
.r2p-subnav .wrap, .localnav .wrap, .r2p-subnav.wrap, .localnav.wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.r2p-subnav.wrap, .localnav.wrap { width: 100%; }
.r2p-subnav a, .localnav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.r2p-subnav a[aria-current], .localnav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-ink); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.r2p-subnav a:hover, .localnav a:hover { text-decoration: underline; }
@media print { .sitenav, .r2p-subnav, .localnav, .sitefoot, .skip { display: none !important; } }
