/* The header and footer every reprise.page page shares (src/site-chrome.mjs writes them into each page).
   The header: the app icon and name, then About, Press, Premium, Help, the language menu and a Download pill. The footer:
   the home page's grey band of page links and "A product of" over the Hyperbole logotype. They bring
   their own colours, so they look the same on the home page and on the Help, Terms, Privacy,
   Acknowledgements, About and Press pages. A page can place them (the home page lays the header over its
   hero). The page's Worker sends a strict CSP, so every style lives in a stylesheet. */
:root { --sh-text: #000; --sh-muted: #6c6c70; --sh-blue: #0066cc; --sh-band: #f5f5f7; --sh-menu: #fff; --sh-rule: rgba(60, 60, 67, .12); --sh-ease: cubic-bezier(.4, 0, .2, 1); }
@media (prefers-color-scheme: dark) { :root { --sh-text: #f5f5f7; --sh-muted: #a1a1a6; --sh-blue: #4da3ff; --sh-band: #111113; --sh-menu: #1c1c1e; --sh-rule: rgba(235, 235, 245, .14); } }

.site-header { position: relative; z-index: 10; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.site-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; height: 60px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.site-header a { text-decoration: none; }
.site-header a:focus-visible { outline: 3px solid var(--sh-blue); outline-offset: 3px; border-radius: 6px; }
.site-brand { display: flex; align-items: center; gap: 9px; color: var(--sh-text); font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.site-brand img { display: block; width: 28px; height: 28px; }
/* The light icon is near-white, so on a white page it gets the faint edge and lift a Home Screen wallpaper would give it. */
.site-brand img { filter: drop-shadow(0 0 .5px rgba(0, 0, 0, .22)) drop-shadow(0 1px 2px rgba(0, 0, 0, .08)); }
@media (prefers-color-scheme: dark) { .site-brand img { filter: none; } }
.site-links { display: flex; align-items: center; gap: 24px; font-size: 14px; white-space: nowrap; }
.site-links a { color: var(--sh-muted); }
.site-links a:hover, .site-links a[aria-current="page"] { color: var(--sh-text); }
/* The language menu: a globe, the page's language code and a chevron; it opens a card listing every
   language in its own words, the page's own one ticked. */
.site-lang { position: relative; }
.site-lang summary { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 4px; border-radius: 8px; color: var(--sh-muted); cursor: pointer; list-style: none; -webkit-user-select: none; user-select: none; }
.site-lang summary::-webkit-details-marker { display: none; }
.site-lang summary:hover, .site-lang[open] summary { color: var(--sh-text); }
.site-lang summary:focus-visible { outline: 3px solid var(--sh-blue); outline-offset: 2px; }
.site-lang svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.site-lang-globe { width: 15px; height: 15px; stroke-width: 1.2; }
.site-lang-chevron { width: 9px; height: 6px; stroke-width: 1.5; transition: transform .2s var(--sh-ease); }
.site-lang[open] .site-lang-chevron { transform: rotate(180deg); }
.site-lang-menu { position: absolute; right: -8px; top: calc(100% + 8px); z-index: 20; min-width: 220px; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--sh-menu); box-shadow: 0 0 0 .5px var(--sh-rule), 0 12px 32px rgba(0, 0, 0, .16); }
.site-lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px; border-radius: 8px; color: var(--sh-text); font-size: 14px; }
.site-lang-menu a:hover, .site-lang-menu a:focus-visible { background: var(--sh-band); outline: none; }
.site-lang-menu a[aria-current]::after { content: ""; width: 12px; height: 7px; margin-top: -3px; border: solid var(--sh-blue); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.site-lang-menu a[aria-current] { font-weight: 600; }

/* The blue glass of the home page's plan button, scaled to this small pill: a faint top bevel, a hairline
   ring and a small glow. Hovering it lifts it and runs the light that circles a Saved card while its link
   loads (ArticleImportRimLight) round its edge. */
.site-links .site-get { position: relative; -webkit-tap-highlight-color: transparent; display: inline-flex; align-items: center; height: 30px; padding: 0 15px; border-radius: 15px; background: linear-gradient(#0a7cf0, #0062cc); color: #fff; font-weight: 600;
  box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .4), inset 0 0 0 .5px rgba(255, 255, 255, .1), 0 0 0 .5px rgba(0, 60, 140, .3), 0 1px 4px rgba(0, 104, 214, .22);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.site-links .site-get:hover { color: #fff; background: linear-gradient(#1886f5, #0068d4); }
/* The light: nine soft round lights trailing one another round the pill's 1 px edge, fainter behind. */
.site-get .rim-light { position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .35s var(--sh-ease);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.site-get .rim-light i { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, var(--a)), rgba(255, 255, 255, 0));
  offset-path: inset(0 round 15px); offset-rotate: 0deg; offset-anchor: center;
  animation: rim-run-small 3.2s linear infinite; animation-delay: calc(var(--n) * -.06s); }
.site-get .rim-light i:nth-child(1) { --n: 8; --a: 1; }
.site-get .rim-light i:nth-child(2) { --n: 7; --a: .7; }
.site-get .rim-light i:nth-child(3) { --n: 6; --a: .5; }
.site-get .rim-light i:nth-child(4) { --n: 5; --a: .36; }
.site-get .rim-light i:nth-child(5) { --n: 4; --a: .26; }
.site-get .rim-light i:nth-child(6) { --n: 3; --a: .18; }
.site-get .rim-light i:nth-child(7) { --n: 2; --a: .12; }
.site-get .rim-light i:nth-child(8) { --n: 1; --a: .07; }
.site-get .rim-light i:nth-child(9) { --n: 0; --a: .04; }
@media (hover: hover) {
  .site-get:hover { transform: scale(1.05); }
  .site-get:hover .rim-light { opacity: 1; }
}
.site-get:focus-visible .rim-light { opacity: 1; }
.site-get:active { transform: scale(.97); transition-duration: .12s; }
/* The light's path starts where the top edge leaves the top-left curve and runs clockwise. It eases up
   to about 1.45 times its speed round each rounded end, worked out for a 97 by 30 px pill, whose ends
   are a fifth of its outline. */
@keyframes rim-run-small {
  0.00% { offset-distance: 0.00%; }
  2.50% { offset-distance: 2.53%; }
  5.00% { offset-distance: 4.88%; }
  7.50% { offset-distance: 7.12%; }
  10.00% { offset-distance: 9.30%; }
  12.50% { offset-distance: 11.45%; }
  15.00% { offset-distance: 13.63%; }
  17.50% { offset-distance: 15.78%; }
  20.00% { offset-distance: 17.93%; }
  22.50% { offset-distance: 20.10%; }
  25.00% { offset-distance: 22.27%; }
  27.50% { offset-distance: 24.52%; }
  30.00% { offset-distance: 26.88%; }
  32.50% { offset-distance: 29.43%; }
  35.00% { offset-distance: 32.15%; }
  37.50% { offset-distance: 35.08%; }
  40.00% { offset-distance: 38.15%; }
  42.50% { offset-distance: 41.27%; }
  45.00% { offset-distance: 44.35%; }
  47.50% { offset-distance: 47.27%; }
  50.00% { offset-distance: 50.00%; }
  52.50% { offset-distance: 52.52%; }
  55.00% { offset-distance: 54.87%; }
  57.50% { offset-distance: 57.12%; }
  60.00% { offset-distance: 59.30%; }
  62.50% { offset-distance: 61.45%; }
  65.00% { offset-distance: 63.62%; }
  67.50% { offset-distance: 65.77%; }
  70.00% { offset-distance: 67.92%; }
  72.50% { offset-distance: 70.10%; }
  75.00% { offset-distance: 72.28%; }
  77.50% { offset-distance: 74.52%; }
  80.00% { offset-distance: 76.88%; }
  82.50% { offset-distance: 79.42%; }
  85.00% { offset-distance: 82.15%; }
  87.50% { offset-distance: 85.08%; }
  90.00% { offset-distance: 88.15%; }
  92.50% { offset-distance: 91.27%; }
  95.00% { offset-distance: 94.35%; }
  97.50% { offset-distance: 97.28%; }
  100.00% { offset-distance: 100.00%; }
}

/* Footer: the page links, then "A product of" over the Hyperbole logotype, on a grey band. A short
   page keeps it at the bottom of the window. At phone width everything is centred, the logotype last. */
.site-footer { background: var(--sh-band); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.site-footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 32px 24px calc(40px + env(safe-area-inset-bottom)); box-sizing: border-box; font-size: 15px; color: var(--sh-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer nav a { padding: 12px 0; color: var(--sh-muted); text-decoration: none; }
.site-footer nav a:hover, .site-footer nav a[aria-current="page"] { color: var(--sh-text); }
.site-footer a:focus-visible { outline: 3px solid var(--sh-blue); outline-offset: 3px; border-radius: 4px; }
.site-maker { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--sh-muted); text-decoration: none; }
.site-maker:hover { color: var(--sh-text); }
.site-maker-label { font-size: 11px; }
.site-maker-logotype { display: block; height: 30px; width: auto; }
@media (max-width: 760px) {
  .site-footer-in { flex-direction: column; align-items: center; }
  .site-footer nav { justify-content: center; }
  .site-maker { align-items: center; }
}

/* Narrow screens: About and Press drop out first (the home, Help, Terms, Privacy, About and Press footers link them), then the language
   menu's code, then Premium, then the name beside the icon. */
@media (max-width: 600px) {
  .site-header-in { padding: 0 16px; }
  .site-footer-in { padding-left: 16px; padding-right: 16px; }
  .site-links { gap: 14px; }
  .site-link-extra { display: none; }
}
/* Phones: the language menu shrinks to its globe (its menu still names every language). */
@media (max-width: 480px) {
  .site-lang summary { justify-content: center; width: 30px; padding: 0; }
  .site-lang summary span, .site-lang-chevron { display: none; }
  .site-lang-globe { width: 18px; height: 18px; }
}
@media (max-width: 380px) {
  .site-link-premium { display: none; }
}
/* The smallest phones: the app icon alone leads home. */
@media (max-width: 360px) {
  .site-brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-get { transition: none; }
  .site-get:hover { transform: none; }
  .site-get .rim-light i { animation: none; offset-distance: calc(15% - var(--n) * 1.6%); }
}
/* Inside Reprise's Help pane the app shows its own title (in-app.js), so the header steps aside. */
.in-app .site-header { display: none; }
