/* Édito: the shell of every public page (2026-10-26 design): the header, its
   search and menu panels, the member's account menu and tabs, the newcomer's
   banner and the footer; Newsreader for titles, --spot only for "Spotted by
   Upstar". Upstar's tokens; under 1100px the sections move to the menu, under
   720px controls grow to 44px. */

.e-wrap { max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 48px); box-sizing: border-box; }
.spot-flag { color: var(--spot); flex: none; }
.f-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Titles of the other pages (about, methodology, privacy, terms, spotted early,
   archives, AI pages, notices) in Newsreader, from 18px up; their containers
   as wide as the site's. */
.page-title {
  font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.08;
  font-size: calc(clamp(30px, 4vw, 44px) * var(--display-scale)); letter-spacing: var(--display-tracking); text-wrap: balance;
}
.prose h2 {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: calc(22px * var(--display-scale-sm)); letter-spacing: var(--display-tracking-sm); border-bottom: 0;
}
.niche-page .section-title, .archive-page .section-title, .spotted-page .section-title {
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(20px * var(--display-scale-sm)); letter-spacing: var(--display-tracking-sm);
}
.doc-page.container, .trending-page.container { max-width: 1200px; padding-inline: clamp(16px, 4vw, 48px); }

/* Breadcrumb, above a page's head */
.e-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 24px; font-size: 13px; color: var(--muted); }
.e-crumbs a { padding: 4px 0; color: inherit; text-decoration: none; }
.e-crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.e-crumbs [aria-current] { color: var(--text); }
.e-crumbs__sep { flex: none; }

/* Header */
.e-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--border);
}
.e-header__in { height: 60px; display: flex; align-items: center; gap: 12px; }
.e-brand {
  display: flex; align-items: center; gap: 8px; flex: none; color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-size: calc(18px * var(--display-scale-sm)); font-weight: var(--display-weight);
  letter-spacing: var(--wm-tracking); line-height: 1;
}
.e-brand:hover { color: var(--text); }
/* The logo's arrow is Upstar's green in both themes, as on the favicon and the
   social avatar; the word keeps the text colour (owner, 2026-10-27). */
.brand-mark { color: var(--rise); }
.e-nav { display: flex; align-self: stretch; gap: 2px; margin-left: 16px; }
.e-nav__link { display: flex; align-items: center; padding: 0 10px; font-size: 14px; white-space: nowrap; color: var(--muted); text-decoration: none; }
.e-nav__link:hover { color: var(--text); }
.e-nav__link[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--rise); }
.e-spacer { flex: 1; }
.e-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0;
  color: var(--text); background: transparent; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.e-icon-btn:hover { background: var(--hover); }
.e-icon-btn--ghost { border-color: transparent; }
/* Buttons joined in a group (language, periods, filters, the digest's
   settings): each has its own border and overlaps the previous one by a pixel;
   the current one and the focused one come on top, so their whole outline
   shows and no neighbour draws over one of its sides. */
.e-seg { display: inline-flex; }
.e-seg__opt {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; margin: 0;
  font: inherit; font-size: 14px; color: var(--text); text-decoration: none; background: var(--bg);
  border: 1px solid var(--border); border-radius: 0; cursor: pointer; white-space: nowrap;
}
.e-seg__opt + .e-seg__opt { margin-left: -1px; }
.e-seg__opt:first-child { border-radius: 8px 0 0 8px; }
.e-seg__opt:last-child { border-radius: 0 8px 8px 0; }
.e-seg__opt:only-child { border-radius: 8px; }
.e-seg__opt--sm { padding: 0 10px; font-size: 12px; letter-spacing: .04em; }
.e-seg__opt:not([aria-current]):not([aria-pressed="true"]):not(:has(> input:checked)):hover { background: var(--hover); }
.e-seg__opt[aria-current], .e-seg__opt[aria-pressed="true"], .e-seg__opt:has(> input:checked) { z-index: 1; color: var(--rise-text); border-color: var(--rise); }
.e-seg__opt:focus-visible, .e-seg__opt:has(> input:focus-visible) { z-index: 2; outline: 2px solid var(--rise); outline-offset: 2px; }
.e-signin { min-height: 36px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
.e-menu-btn { display: none; }
.e-menu-btn__close { display: none; }
.e-menu-btn[aria-expanded="true"] .e-menu-btn__open { display: none; }
.e-menu-btn[aria-expanded="true"] .e-menu-btn__close { display: block; }

/* The member's account */
.e-account { position: relative; }
.e-avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--raised); box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.e-avatar:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.e-account__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 220px; display: flex; flex-direction: column; padding: 6px;
  background: var(--raised); border-radius: 8px; box-shadow: 0 0 0 1px var(--border-strong), 0 8px 24px var(--shade);
}
.e-account__menu[hidden] { display: none; }
.e-account__login { padding: 8px 10px 6px; font-size: 12px; color: var(--muted); }
.e-account__item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 38px; padding: 0 10px;
  font: inherit; font-size: 14px; color: var(--text); text-align: left; text-decoration: none; background: transparent; border: 0; border-radius: 6px; cursor: pointer;
}
.e-account__item:hover { color: var(--text); background: var(--hover); }
.e-account__out { color: var(--muted); }
.e-account__rule { height: 1px; margin: 6px 4px; background: var(--border); }
.e-count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.e-signout { margin: 0; }

/* Search and menu panels */
.e-panel { background: var(--bg); box-shadow: 0 1px 0 var(--border); }
.e-panel[hidden] { display: none; }
.e-search { position: relative; max-width: 720px; margin: 0 auto; padding: 12px clamp(16px, 4vw, 48px) 18px; box-sizing: border-box; }
.e-search__icon { position: absolute; top: 27px; left: calc(clamp(16px, 4vw, 48px) + 15px); line-height: 0; color: var(--muted); pointer-events: none; }
.e-search__input { width: 100%; min-height: 48px; padding-left: 42px; font-size: 16px; }
.e-menu { max-width: 1200px; margin: 0 auto; padding: 4px clamp(16px, 4vw, 48px) 20px; box-sizing: border-box; display: flex; flex-direction: column; }
.e-menu__link {
  display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: 17px; color: var(--muted); text-decoration: none;
  background: linear-gradient(var(--border), var(--border)) no-repeat bottom / 100% 1px;
}
.e-menu__link:hover, .e-menu__link[aria-current] { color: var(--text); }
.e-menu__link--member { min-height: 48px; font-size: 16px; color: var(--text); }
.e-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.e-menu__label { font-size: 14px; color: var(--muted); }
.e-menu__row .e-seg__opt { min-height: 44px; }
.e-menu__signin { min-height: 48px; margin-top: 8px; }
.e-menu__member { padding: 16px 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.e-menu__out { width: 100%; min-height: 48px; margin-top: 8px; color: var(--muted); }

/* Member tabs */
.e-mtabs-wrap { padding-top: 16px; }
.e-mtabs { display: flex; gap: 2px; overflow-x: auto; box-shadow: inset 0 -1px 0 var(--border); }
.e-mtabs__tab {
  flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  font-size: 14px; white-space: nowrap; color: var(--muted); text-decoration: none;
}
.e-mtabs__tab:hover { color: var(--text); }
.e-mtabs__tab[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--rise); }

/* Newcomer's banner: once closed, closed for good (theme.js adds .newcomer-closed
   before first paint); one banner at a time, the language one when it applies. */
.f-newcomer { background: var(--surface); box-shadow: inset 0 -1px 0 var(--border); }
.newcomer-closed .f-newcomer, .offer-fr .f-newcomer { display: none; }
.f-newcomer__in { display: flex; align-items: center; gap: 12px; padding-block: 8px; font-size: 13px; }
.f-newcomer__mark { flex: none; line-height: 0; color: var(--muted); }
.f-newcomer__text { flex: 1; min-width: 0; margin: 0; }
.f-newcomer__text a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* The Monday digest's signup form (pages.LandingDigestForm): the home page's
   band and /digest/sample */
.h-digest { max-width: 680px; margin-top: 24px; }
.h-digest__field { display: flex; flex-direction: column; gap: 6px; }
.h-digest__row { display: flex; flex-wrap: wrap; gap: 8px; }
.h-digest__topic { flex: 1 1 170px; width: auto; min-height: 44px; }
.h-digest__email { flex: 2 1 220px; width: auto; min-height: 44px; }
.h-digest__go { min-height: 44px; padding: 0 18px; color: var(--on-rise); background: var(--rise-fill); border-color: var(--rise-fill); }
.h-digest__go:hover { color: var(--on-rise); background: var(--rise-fill-strong); border-color: var(--rise-fill-strong); }
.h-digest .field-error:empty { display: none; }
/* The error follows the email: under the whole row on wide screens, under the field on phones. */
.h-digest__row > .field-error { flex-basis: 100%; order: 3; margin: 0; }
@media (max-width: 719.98px) { .h-digest__row > .field-error { order: 1; } .h-digest__go { order: 2; } }
.h-digest__ok { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; }
.h-digest__ok .icon { color: var(--rise); }

/* Footer */
.site-footer { box-shadow: inset 0 1px 0 var(--border); }
.e-footer { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: 40px; padding-bottom: 32px; }
.e-footer__brand { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.e-footer__logo {
  display: flex; align-items: center; gap: 8px; line-height: 1;
  font-family: var(--font-display); font-size: calc(17px * var(--display-scale-sm)); font-weight: var(--display-weight); letter-spacing: var(--wm-tracking);
}
.e-footer__tagline { font-size: 13px; color: var(--muted); }
.e-footer__col { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.e-footer__title { margin: 0; padding-bottom: 6px; font-family: var(--font-sans); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.e-footer__col a { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 14px; color: var(--text); text-decoration: none; }
.e-footer__col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.e-footer__legal { padding-bottom: 28px; font-size: 12px; color: var(--muted); }
/* From 720 px the brand stays left and the link columns end on the content's
   right edge, like the header's buttons; phones keep the stacked footer. */
@media (min-width: 720px) {
  .e-footer__brand { margin-right: auto; }
}

@media (max-width: 1099.98px) {
  .e-nav, .e-header__wide { display: none; }
  .e-menu-btn { display: inline-flex; }
}
@media (min-width: 1100px) {
  #site-menu { display: none; }
}
@media (max-width: 719.98px) {
  .e-header .e-icon-btn { width: 44px; height: 44px; }
  .e-footer__col a { padding: 10px 0; }
}

/* Dialogs and sheets (sign-in prompt, "Alert me by email"): titles in
   Newsreader, like every title from 18 px. */
.modal__title, .modal--signin .modal__title, .sheet__title {
  font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.2;
  font-size: calc(22px * var(--display-scale-sm)); letter-spacing: var(--display-tracking-sm);
}

/* One-message pages (confirmations, expired links, errors): the site's head,
   the title in Newsreader, a lead and the ways on, left-aligned like a page. */
.n-main { display: block; }
.n-main:focus { outline: none; }
.n-wrap { padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 104px); }
.n-wrap .e-crumbs { margin-bottom: 24px; }
.n-title {
  max-width: 22ch; margin: 0 0 14px; font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.08;
  font-size: calc(clamp(32px, 4.6vw, 52px) * var(--display-scale)); letter-spacing: var(--display-tracking); text-wrap: balance;
}
.n-lead { max-width: 58ch; margin: 0; font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.n-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.n-actions .btn { min-height: 44px; padding: 0 18px; }
.n-wrap .e-crumbs { padding-top: 0; margin-bottom: 24px; }
.n-prose { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; font-size: 16px; line-height: 1.6; }
.n-prose p { margin: 0; }
.n-prose a, .n-lead a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.n-form { display: flex; flex-direction: column; gap: 18px; max-width: 560px; margin-top: 28px; }
.n-form .field { display: flex; flex-direction: column; gap: 6px; }
.n-form .field-label { font-size: 14px; font-weight: 500; color: var(--text); }
.n-form .field-label .field-help { font-weight: 400; }
.n-form .field-help { margin: 0; font-size: 13px; color: var(--muted); }
.n-form .select, .n-form .input { min-height: 44px; }
.n-actions--form { margin-top: 4px; }
.n-alert { max-width: 62ch; margin: 20px 0 0; padding: 12px 14px; border-radius: 8px; font-size: 14px; color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); }
.n-form .n-alert { margin: 0; }

/* Empty and error states (components.EmptyState, ErrorState) in the Édito
   type: no icon in a circle, the title in Newsreader, left-aligned like the
   blocks around them. */
.empty-state, .error-state { align-items: flex-start; text-align: left; gap: 6px; padding: 20px 0; }
.empty-state--compact { padding: 16px 0; }
.empty-state__icon, .error-state__icon { display: none; }
.empty-state__title, .error-state__title {
  margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.2;
  font-size: calc(20px * var(--display-scale-sm)); letter-spacing: var(--display-tracking-sm);
}
.empty-state__body, .error-state__body { max-width: 60ch; margin: 0; font-size: 14px; }
.empty-state__actions, .error-state__actions { justify-content: flex-start; margin-top: 10px; }
/* A list after a paragraph keeps the paragraphs' spacing (components.css zeroes list margins). */
.doc-page .prose > * + :is(ul, ol) { margin-top: var(--sp-3); }
.empty-state--compact .empty-state__title { font-size: calc(18px * var(--display-scale-sm)); }
.signin-prompt__mark { display: none; }
.sheet__header { padding-left: var(--sp-3); }
