/*
  The public pages and the login page. Same stone-and-basalt palette as the app (tokens.css);
  one memorable thing: the dark band ends in quarry benches, the stepped face of a quarry.
  Ochre is used for the one main action per screen, never for text on a light background.
*/
.sx { background: var(--q-bg); color: var(--q-ink); min-height: 100vh; }
.sx a { color: inherit; }

/* ---- Layout containers: content is centred in 1160px, bands run edge to edge ------------- */
.sx-head, .sx-hero, .sx-section, .sx-foot__inner, .sx-foot__legal { max-width: 1160px; margin-inline: auto; padding-inline: 1.5rem; }

/* ---- The dark top band, with benches along its lower edge -------------------------------- */
.sx-top {
  background: var(--q-basalt); color: #f3f6f5; padding-bottom: 6rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), 74% calc(100% - 56px), 74% calc(100% - 38px), 48% calc(100% - 38px),
                     48% calc(100% - 19px), 22% calc(100% - 19px), 22% 100%, 0 100%);
}
.sx-head { display: flex; align-items: center; gap: 2rem; height: 4.5rem; position: relative; }
.sx-brand { flex: none; }
.sx-nav { display: flex; gap: 1.6rem; }
.sx-nav--inline { flex: 1; }
.sx-nav a { color: var(--q-basalt-ink); text-decoration: none; font-size: var(--q-text-base); font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.sx-nav a:hover { color: #fff; }
.sx-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--q-accent); }
.sx-tools { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.sx-link { color: var(--q-basalt-ink); text-decoration: none; font-weight: 500; font-size: var(--q-text-base); }
.sx-link:hover { color: #fff; }
.sx-head .q-lang { background: transparent; border-color: var(--q-basalt-line); }
.sx-head .q-lang button { color: var(--q-basalt-ink); }
.sx-head .q-lang button + button { border-left-color: var(--q-basalt-line); }
.sx-head .q-lang button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sx-head .q-lang button[aria-current="true"] { background: #fff; color: var(--q-basalt); font-weight: 600; }
.sx-menu { display: none; }

/* ---- Buttons ---------------------------------------------------------------------------- */
.sx-btn { display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; padding: 0 1.1rem; border: 1px solid transparent; border-radius: var(--q-r-ctrl); font-weight: 600; font-size: var(--q-text-base); text-decoration: none; white-space: nowrap; }
.sx-btn--lg { height: 3rem; padding: 0 1.6rem; font-size: 1rem; }
.sx-btn--accent { background: var(--q-accent); color: var(--q-basalt) !important; }
.sx-btn--accent:hover { filter: brightness(1.08); }
.sx-btn--ghost { border-color: rgba(255, 255, 255, .38); color: #fff !important; }
.sx-btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.sx a:focus-visible, .sx summary:focus-visible, .sx button:focus-visible { outline: 3px solid var(--q-accent); outline-offset: 2px; }

/* ---- Hero ------------------------------------------------------------------------------- */
.sx-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3.5rem; align-items: center; padding-block: 3.25rem 1rem; }
.sx-hero--plain { grid-template-columns: minmax(0, 46rem); }
.sx-hero h1 { margin: 0 0 1.25rem; color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 650; text-wrap: balance; }
.sx-hero--page h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.sx-lead { margin: 0 0 2rem; max-width: 36rem; color: var(--q-basalt-ink); font-size: 1.2rem; line-height: 1.55; }
.sx-tag { margin: 0 0 .9rem; color: var(--q-accent); font-size: var(--q-text-base); font-weight: 600; letter-spacing: .02em; }
.sx-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.sx-hero__mail { color: var(--q-basalt-ink); font-size: var(--q-text-base); }

/* ---- Illustrations (white sheets on the dark band) ---------------------------------------- */
.sx-fig { margin: 0; padding: 1.25rem 1.4rem 1.1rem; background: var(--q-surface); color: var(--q-ink); border-radius: var(--q-r-card); box-shadow: var(--q-shadow-pop); }
.sx-fig figcaption { display: grid; gap: .15rem; margin-bottom: .6rem; }
.sx-fig figcaption b { font-size: var(--q-text-base); font-weight: 650; }
.sx-fig figcaption small { color: var(--q-ink-3); font-size: var(--q-text-sm); }
.sx-fig ol { list-style: none; margin: 0; padding: 0; }
.sx-fig li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 3.6rem; gap: .8rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--q-line); font-size: var(--q-text-sm); }
.sx-fig li b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sx-fig li.is-result { font-weight: 650; border-top-color: var(--q-line-strong); }
.sx-wf__track, .sx-pm__track { position: relative; display: block; height: .95rem; background: var(--q-surface-sunk); border-radius: 4px; }
.sx-wf__track i, .sx-pm__track i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.sx-pm__track i { left: 0; }
.is-total { background: var(--q-basalt); }
.is-cost { background: #9aa7ac; }
.is-margin, .is-pos { background: var(--q-s3); }
.is-neg { background: var(--q-s5); }
.sx-pm > p { margin: .7rem 0 0; color: var(--q-ink-2); font-size: var(--q-text-sm); }
.sx-cl svg { display: block; width: 100%; height: auto; color: var(--q-ink); }
.sx-cl__q circle { fill: #fff; stroke: currentColor; stroke-width: 1.5; }
.sx-cl__m circle { fill: var(--q-basalt); }
.sx-cl .is-on-dark { fill: #fff; }

/* ---- Sections --------------------------------------------------------------------------- */
.sx-section { padding-block: 4.25rem 1rem; }
.sx-section--tight { padding-top: 3rem; }
.sx-h2 { margin: 0 0 2rem; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.sx-prose { max-width: 40rem; margin: 0; color: var(--q-ink-2); font-size: 1.0625rem; line-height: 1.65; }
.sx-rows { border-bottom: 1px solid var(--q-line-strong); }
.sx-row { display: grid; grid-template-columns: 15rem minmax(0, 1fr) auto; gap: 2rem; align-items: baseline; padding-block: 1.9rem; border-top: 1px solid var(--q-line-strong); }
.sx-row__name b { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.sx-row__name span { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .45rem; color: var(--q-ink-2); font-weight: 500; }
.sx-row__name em { font-style: normal; font-size: var(--q-text-xs); font-weight: 600; padding: .1rem .5rem; border-radius: var(--q-r-pill); background: var(--q-warning-soft); color: var(--q-warning-ink); }
.sx-row p { margin: 0; max-width: 38rem; color: var(--q-ink-2); font-size: 1.0625rem; line-height: 1.6; }
.sx-more { font-weight: 600; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; white-space: nowrap; }
.sx-more:hover { text-decoration-thickness: 2px; }
.sx-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.sx-points > div { border-top: 2px solid var(--q-accent); padding-top: 1rem; }
.sx-points h3 { margin: 0 0 .4rem; font-size: 1.0625rem; font-weight: 650; }
.sx-points p { margin: 0; color: var(--q-ink-2); line-height: 1.6; }
.sx-list { margin: 0 0 2rem; border-bottom: 1px solid var(--q-line-strong); }
.sx-list > div { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 2rem; padding-block: 1.25rem; border-top: 1px solid var(--q-line-strong); }
.sx-list dt { font-size: 1.0625rem; font-weight: 650; }
.sx-list dd { margin: 0; max-width: 40rem; color: var(--q-ink-2); font-size: 1.0625rem; line-height: 1.6; }

/* ---- Closing call to action and footer (full-width dark bands) --------------------------- */
.sx-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; margin-top: 5rem; padding: 3.5rem max(1.5rem, calc((100% - 1160px) / 2 + 1.5rem)); background: var(--q-basalt); color: #fff; }
.sx-cta h2 { margin: 0 0 .4rem; font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 650; letter-spacing: -.02em; }
.sx-cta p { margin: 0; color: var(--q-basalt-ink); max-width: 34rem; }
.sx-foot { background: var(--q-basalt); color: var(--q-basalt-ink); border-top: 1px solid var(--q-basalt-line); }
.sx-cta + .sx-foot { margin-top: 0; }
.sx-foot__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 2.5rem 1.5rem; }
.sx-foot p { margin: .8rem 0 0; max-width: 22rem; font-size: var(--q-text-sm); }
.sx-foot nav { display: flex; flex-direction: column; gap: .5rem; font-size: var(--q-text-sm); }
.sx-foot nav a { color: var(--q-basalt-ink); text-decoration: none; }
.sx-foot nav a:hover { color: #fff; text-decoration: underline; }
.sx-foot p.sx-foot__legal { padding-block: 0 2rem; margin: 0 auto; max-width: 1160px; font-size: var(--q-text-xs); color: var(--q-basalt-muted); }

.sx-foot__lang { display: none; margin-top: .4rem; }
.sx-foot .q-lang { background: transparent; border-color: var(--q-basalt-line); }
.sx-foot .q-lang button { color: var(--q-basalt-ink); }
.sx-foot .q-lang button + button { border-left-color: var(--q-basalt-line); }
.sx-foot .q-lang button[aria-current="true"] { background: #fff; color: var(--q-basalt); font-weight: 600; }

/* ---- Phone and tablet -------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .sx-top { padding-bottom: 4.5rem; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 70% calc(100% - 40px), 70% calc(100% - 27px), 42% calc(100% - 27px),
                     42% calc(100% - 14px), 16% calc(100% - 14px), 16% 100%, 0 100%); }
  .sx-hero { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; padding-top: 2rem; }
  .sx-nav--inline { display: none; }
  .sx-menu { display: block; margin-left: auto; }
  .sx-menu summary { list-style: none; cursor: pointer; padding: .45rem .8rem; border: 1px solid var(--q-basalt-line); border-radius: var(--q-r-ctrl); color: var(--q-basalt-ink); font-weight: 500; }
  .sx-menu summary::-webkit-details-marker { display: none; }
  .sx-menu[open] .sx-nav { position: absolute; left: 1.5rem; right: 1.5rem; top: 4.25rem; z-index: 5; flex-direction: column; gap: 0; padding: .5rem 1rem; background: var(--q-basalt-raise); border: 1px solid var(--q-basalt-line); border-radius: var(--q-r-card); box-shadow: var(--q-shadow-pop); }
  .sx-menu .sx-nav a { padding: .75rem 0; border-bottom: 1px solid var(--q-basalt-line); }
  .sx-menu .sx-nav a:last-child { border-bottom: 0; }
  .sx-tools { margin-left: 0; gap: .6rem; }
  .sx-head { gap: .8rem; }
  .sx-row { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .sx-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-list > div { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .sx-foot__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sx-foot__inner > div { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .sx-tools .sx-link, .sx-tools .q-lang { display: none; }
  .sx-foot__lang { display: block; }
  .sx-head { gap: .5rem; }
  .sx-points { grid-template-columns: minmax(0, 1fr); }
  .sx-fig li { grid-template-columns: 7rem minmax(0, 1fr) 3.4rem; gap: .5rem; }
  .sx-actions .sx-btn { flex: 1 1 100%; }
  .sx-section { padding-top: 3rem; }
}
@media (prefers-reduced-motion: no-preference) { .sx-btn { transition: filter .12s, background-color .12s; } }

/* ---- Login: the brand on the left, the form on the right --------------------------------- */
.sx-auth { background: var(--q-bg); }
.sx-login { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.sx-login__side { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding: 2.25rem 3rem; background: var(--q-basalt); color: #f3f6f5; }
.sx-login__pitch h2 { margin: 0 0 1rem; max-width: 24rem; color: #fff; font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 650; text-wrap: balance; }
.sx-login__pitch p { margin: 0; max-width: 24rem; color: var(--q-basalt-ink); font-size: 1.0625rem; line-height: 1.55; }
.sx-login__back { align-self: flex-start; margin-bottom: 2rem; color: var(--q-basalt-ink); font-size: var(--q-text-base); font-weight: 500; text-underline-offset: .25em; }
.sx-login__back:hover { color: #fff; }
.sx-login__main { position: relative; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.sx-login__lang { position: absolute; top: 1.5rem; right: 1.75rem; }
.sx-login__box { width: 100%; max-width: 25rem; }
.sx-login__box h1 { margin: 0 0 .35rem; font-size: 1.9rem; font-weight: 650; letter-spacing: -.02em; }
.sx-login__box .q-muted { margin-bottom: 1.75rem; }
.sx-login__help { margin: 1.5rem 0 0; color: var(--q-ink-2); font-size: var(--q-text-sm); }
.sx-login__help a { font-weight: 600; }
@media (max-width: 991.98px) {
  .sx-login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sx-login__side { gap: 1.25rem; padding: 1.5rem 1.5rem 4.5rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 70% calc(100% - 40px), 70% calc(100% - 27px), 42% calc(100% - 27px), 42% calc(100% - 14px), 16% calc(100% - 14px), 16% 100%, 0 100%); }
  .sx-login__pitch h2 { font-size: 1.5rem; }
  .sx-login__back { display: none; }
  .sx-login__main { padding: 2rem 1.5rem 3rem; align-items: flex-start; }
  .sx-login__lang { position: static; align-self: flex-end; margin: 0 0 1rem; }
  .sx-login__main { flex-direction: column; align-items: stretch; }
  .sx-login__box { margin-inline: auto; }
}
