/* The product's own address, the parts its page is built from (card
   our-website-tells-a-stranger-what-maestro-is-and-how-to-start). Loaded
   by welcome.html and plans.html, after app.css, whose tokens it wears: the
   pyramid's colours, the text-safe steps, the surfaces and the brand's type,
   in both themes. Nothing here names a colour of its own except the brand's
   dark ground and its ink, which stand on #0e1b26 in both themes. */

/* ── The page's ground: site-score.css sets it per theme ────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site-body { margin: 0; padding: 0; background: var(--s-page); color: var(--ink); font-family: var(--brand-font); line-height: 1.55; overflow-x: clip; -webkit-font-smoothing: antialiased; }
.site { min-width: 0; }
.site-in { max-width: 74rem; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); box-sizing: border-box; }

/* The mark for the ground the theme puts under it: the light file on a light page, the dark one on a dark page. */
.site .is-for-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site .is-for-dark { display: block; }
  :root:not([data-theme="light"]) .site .is-for-light { display: none; }
}
:root[data-theme="dark"] .site .is-for-dark { display: block; }
:root[data-theme="dark"] .site .is-for-light { display: none; }
.site-mark { display: inline-flex; flex: none; }
.site-mark-img { display: block; }

/* ── The bar ─────────────────────────────────────────────────────────────── */
.site-bar { position: sticky; top: 0; z-index: 20; background: var(--s-page); border-bottom: 1px solid var(--line); }
.site-bar-in { max-width: 74rem; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); height: 64px; display: flex; align-items: center; gap: 2rem; box-sizing: border-box; }
.site-brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; flex: none; border-radius: 6px; white-space: nowrap; }
/* The mark's file stands its four voices on a 64 square with room around them (x 5 to 59, y 8 to 58). Beside the name the box is cropped to the voices
   themselves, so the mark and MAESTRO centre on each other with no empty band above or below the mark. */
.site-brand .site-mark { --m: 22px; width: calc(var(--m) * 54 / 64); height: calc(var(--m) * 50 / 64); overflow: hidden; }
.site-brand .site-mark-img { flex: none; width: var(--m); height: var(--m); margin: calc(var(--m) * -8 / 64) 0 0 calc(var(--m) * -5 / 64); }
.site-word { font-weight: var(--brand-word-weight); letter-spacing: var(--brand-word-tracking); text-transform: var(--brand-word-transform); font-size: 0.92rem; line-height: 1; }
.site-nav { display: flex; gap: 1.6rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; font-weight: 500; transition: color 150ms ease-out; }
.site-nav a:hover { color: var(--ink); }
.site-tools { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.site-seg { display: inline-flex; padding: 2px; border-radius: 9px; border: 1px solid var(--line); }
.site-seg-btn { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; min-width: 2.4rem; min-height: 32px; padding: 0 0.5rem; border-radius: 7px; cursor: pointer; }
.site-seg-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.site-theme { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; transition: color 150ms ease-out, border-color 150ms ease-out; }
.site-theme:hover { color: var(--ink); border-color: var(--field-line); }
.site-bar-link { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.94rem; padding: 0.5rem 0.6rem; border-radius: 8px; }
.site-bar-link:hover { background: var(--surface-2); }

/* The plans page wears the same bar (card the-home-page-works-in-light-theme-in-po-9b50c9),
   on the brand's dark ground in both themes, as it stands over the home page's film. */
.plans-site-bar {
  --ink: #f3f6f9;
  --ink-soft: #c9d2da;
  --line: rgba(243, 246, 249, 0.12);
  --field-line: rgba(243, 246, 249, 0.34);
  --surface-2: rgba(243, 246, 249, 0.08);
  --accent: #42b0e4;
  --on-accent: #0e1b26;
  background: #0e1b26; color: var(--ink); border-bottom-color: transparent;
}
/* The bar runs edge to edge, as on the home page; the plans and the foot keep their own gutters. */
body.plans-body.site { padding-inline: 0; }

/* ── The two ways in ─────────────────────────────────────────────────────── */
.site-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.site-actions.is-center { justify-content: center; }
.site-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 1px solid transparent; box-sizing: border-box;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 160ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out;
}
.site-btn.is-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(14, 27, 38, 0.18); }
.site-btn.is-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(14, 27, 38, 0.45); }
.site-btn.is-quiet { color: var(--ink); border-color: var(--field-line); background: transparent; }
.site-btn.is-quiet:hover { border-color: var(--ink-soft); background: var(--surface-2); }
.site-btn.is-small { min-height: 38px; padding: 0 0.95rem; font-size: 0.92rem; }
.site-btn:active { transform: translateY(0); }
.site a:focus-visible, .site button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Shared type ─────────────────────────────────────────────────────────── */
.site-h2 { margin: 0; font-weight: 650; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.site-lead { color: var(--ink-soft); margin: 0.8rem 0 0; max-width: 44rem; }

/* ── Who: a filled voice for a person, an open ring for an agent ─────────── */
.site-who { width: var(--who, 10px); height: var(--who, 10px); border-radius: 50%; flex: none; display: inline-block; box-sizing: border-box; }
.site-who.is-person { background: var(--ink-soft); }
.site-who.is-agent { border: 2px solid var(--accent); background: transparent; }

/* ── The ledger ──────────────────────────────────────────────────────────── */
.site-ledger { list-style: none; margin: 0; padding: 0; }
.site-ledger-row { display: grid; grid-template-columns: 3.2rem minmax(0, 10rem) minmax(0, 1fr); gap: 0.25rem 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); font-size: 0.92rem; align-items: baseline; }
.site-ledger-row:last-child { border-bottom: 1px solid var(--line); }
.site-ledger-at { font-variant-numeric: tabular-nums; color: var(--muted); }
.site-ledger-who { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--ink); min-width: 0; }
.site-ledger-what { color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }

/* ── The plans, as plans-view.js draws them ──────────────────────────────── */
.site-plans { padding-block: clamp(4rem, 9vw, 7rem); }
.site-plans-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.site-plans .site-h2 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }
.site-plans .plans-segs { margin: 0; }
.site-plans-message { color: var(--ink-soft); }
.site-plans-all { margin: 1.6rem 0 0; }
.site-plans-all a { color: var(--accent); font-weight: 600; text-decoration: none; }
.site-plans-all a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── The foot ────────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; color: var(--ink-soft); font-size: 0.9rem; }
.site-foot-in { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem 2rem; flex-wrap: wrap; }
.site-foot-text { display: grid; gap: 0.25rem; text-align: right; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--ink); }
.site-foot .company-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem 1rem; }

/* ── Narrower screens ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-foot-text { text-align: left; }
}
@media (max-width: 680px) {
  .site-ledger-row { grid-template-columns: 3rem minmax(0, 1fr); }
  .site-ledger-what { grid-column: 2; }
}
@media (max-width: 560px) {
  .site-bar-link, .site-bar-start { display: none; }
  .site-bar-in { gap: 1rem; }
  .site-actions:not(.is-center) .site-btn { flex: 1 1 auto; }
  /* On the plans there is no first screen to carry Entrar: the bar keeps it. */
  .plans-site-bar .site-bar-link { display: inline-block; }
}
