/* invoice.rocks — public site.
 *
 * Ported from design/export/PublicFrame.dc.html and S-PUB-01…04: the design
 * exports carry their styling as inline attributes, so this file is those
 * declarations lifted out and given names. Values are unchanged.
 *
 * Every colour, type size, radius, spacing step, duration and easing is a
 * token from ds/tokens.css, which this file is loaded after. There is no
 * literal anywhere below — CLAUDE.md makes that a rule of the product, and
 * it is also what keeps the public site and the app the same brand.
 *
 * Dark mode: tokens.css defines the dark palette under [data-theme="dark"].
 * The inline script in base.html sets that attribute from the viewer's
 * stored app preference, falling back to prefers-color-scheme, before first
 * paint — the same mechanism web/index.html uses, so a visitor who has
 * chosen dark in the app does not get a light landing page.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* The feature page's chip nav jumps to anchors; without this the sticky
     header covers the heading landed on. */
  scroll-behavior: smooth;
  scroll-padding-top: var(--s8);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: var(--leading-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--fg);
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-tight);
}

/* --- Shared primitives ------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--s5);
}

.wrap--narrow {
  max-width: 1120px;
}

.wrap--reading {
  max-width: 880px;
}

.stack {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-family: var(--font-num);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  margin: 0;
}

.h-hero {
  font-size: var(--text-hero);
  line-height: 1;
  text-wrap: balance;
}

.h-section {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

.h-sub {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
}

.lead {
  margin: 0;
  font-size: var(--text-xl);
  color: var(--text-muted);
  text-wrap: pretty;
}

.body-lg {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--text-muted);
  text-wrap: pretty;
}

.fine {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.num {
  font-family: var(--font-num);
}

/* Buttons. Two sizes, matching the design: 40px in the header, 48px in the
   hero and the closing call to action. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 40px;
  padding-inline: var(--s4);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

.btn--lg {
  height: 48px;
  padding-inline: var(--s5);
  font-size: var(--text-lg);
}

.btn--primary {
  background: var(--action);
  color: var(--action-fg);
}

.btn--primary:hover {
  background: var(--action-hover);
  color: var(--action-fg);
}

.btn--secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--fg);
}

.btn--secondary:hover {
  background: var(--subtle);
  color: var(--fg);
}

.btn--quiet {
  padding-inline: var(--s3);
  background: transparent;
  color: var(--fg);
}

.btn--quiet:hover {
  background: var(--subtle);
  color: var(--fg);
}

/* The demo: the paid green with a play mark, the one green button on a page. */
.btn--demo {
  background: var(--paid);
  color: var(--action-fg);
  font-weight: 600;
}

.btn--demo:hover {
  background: var(--paid-text);
  color: var(--action-fg);
}

.btn__play {
  flex: none;
}

.btn--block {
  display: flex;
  width: 100%;
  height: 44px;
}

/* The check that prefixes every bullet in the designs. */
.tick {
  display: flex;
  flex: none;
  padding-top: 3px;
  color: var(--paid-text);
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.ticks li {
  display: flex;
  gap: var(--s2);
  text-wrap: pretty;
}

/* --- Header ------------------------------------------------------------ */

.skip {
  position: absolute;
  left: var(--s3);
  top: calc(var(--s3) * -8);
  z-index: 30;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-control);
  background: var(--action);
  color: var(--action-fg);
  text-decoration: none;
  transition: top var(--t-base) var(--ease);
}

.skip:focus {
  top: var(--s3);
  color: var(--action-fg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--page);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  height: 68px;
}

.brand {
  display: flex;
  flex: none;
}

.brand img {
  height: 24px;
  display: block;
}

/* Logos follow the page theme ([data-theme]), not the operating system. */
.logo.logo--dark {
  display: none;
}

[data-theme='dark'] .logo.logo--light {
  display: none;
}

[data-theme='dark'] .logo.logo--dark {
  display: block;
}

.site-nav {
  flex: 1;
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.site-nav a {
  display: flex;
  align-items: center;
  height: 40px;
  padding-inline: var(--s3);
  border-radius: var(--r-control);
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

.site-nav a:hover {
  background: var(--subtle);
  color: var(--fg);
}

.site-nav a[aria-current='page'] {
  color: var(--fg);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: none;
}

/* Theme toggle: the moon in light (press for dark), the sun in dark. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-control);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--subtle);
  color: var(--fg);
}

.icon-btn:focus-visible,
.lang-menu__btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.theme-toggle__sun {
  display: none;
}

[data-theme='dark'] .theme-toggle__sun {
  display: block;
}

[data-theme='dark'] .theme-toggle__moon {
  display: none;
}

/* Language menu: flag, code and chevron; the list drops below. */
.lang-menu {
  position: relative;
}

.lang-menu__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 40px;
  padding-inline: var(--s2);
  border-radius: var(--r-control);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.lang-menu__btn::-webkit-details-marker {
  display: none;
}

.lang-menu__btn:hover,
.lang-menu[open] .lang-menu__btn {
  background: var(--subtle);
  color: var(--fg);
}

.lang-menu__code {
  text-transform: uppercase;
}

.flag {
  display: block;
  width: 20px;
  height: 12px;
  flex: none;
  box-shadow: 0 0 0 1px var(--border);
}

.lang-menu__list {
  position: absolute;
  top: calc(100% + var(--s1));
  right: 0;
  z-index: 30;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  padding: var(--s1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  box-shadow: var(--lift-2);
}

.lang-menu__list a {
  display: flex;
  align-items: center;
  gap: var(--s3);
  height: 36px;
  padding-inline: var(--s3);
  border-radius: var(--r-control);
  color: var(--fg);
  text-decoration: none;
  font-size: var(--text-md);
}

.lang-menu__list a:hover {
  background: var(--subtle);
}

.lang-menu__list a[aria-current='true'] {
  font-weight: 600;
}

/* --- Burger and the full-page menu (phone and tablet) ------------------ */

/* Three bars that turn into an X in one short step; the middle one fades. */
.burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-control);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.burger:hover {
  background: var(--subtle);
}

.burger:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.burger__bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  border-radius: var(--r-pill);
  background: currentColor;
  transition: transform var(--t-base) var(--ease), top var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}

.burger__bar:nth-child(1) { top: 15px; }
.burger__bar:nth-child(2) { top: 21px; }
.burger__bar:nth-child(3) { top: 27px; }

.burger[aria-expanded='true'] .burger__bar {
  top: 21px;
}

.burger[aria-expanded='true'] .burger__bar:nth-child(1) { transform: rotate(45deg); }
.burger[aria-expanded='true'] .burger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded='true'] .burger__bar:nth-child(3) { transform: rotate(-45deg); }

/* The menu covers the page under the header (which stays on top, z-index
   20) and simply fades in. */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 19;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--page);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.menu-open .site-menu {
  opacity: 1;
}

/* Only the root: overflow on <body> as well would make <body> the scroll
   box, and the sticky header would jump to the top of the document. */
.menu-lock {
  overflow: hidden;
}

.site-menu__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  min-height: 100%;
  box-sizing: border-box;
  padding-top: calc(68px + var(--s6));
  padding-bottom: var(--s7);
}

.site-menu__nav {
  display: flex;
  flex-direction: column;
}

.site-menu__nav a {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(36px, 10vw, 64px);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-decoration: none;
}

.site-menu__nav a:hover,
.site-menu__nav a[aria-current='page'] {
  color: var(--link);
}

.site-menu__no {
  flex: none;
  min-width: 2ch;
  font-family: var(--font-num);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-muted);
}

.site-menu__nav a[aria-current='page'] .site-menu__no {
  color: var(--link);
}

.site-menu__actions {
  display: grid;
  gap: var(--s2);
}

.site-menu__langs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: auto;
}

.site-menu__langs a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 40px;
  padding-inline: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--fg);
  font-size: var(--text-sm);
  text-transform: uppercase;
  text-decoration: none;
}

.site-menu__langs a[aria-current='true'] {
  border-color: var(--border-strong);
  background: var(--subtle);
  font-weight: 600;
}

/* Phone and tablet: the header keeps the logo, the theme and the burger;
   the pages, the buttons and the languages move into the menu. */
@media (max-width: 860px) {
  .site-nav,
  .site-header__wide,
  .site-header .lang-menu {
    display: none;
  }

  .site-header__actions {
    margin-left: auto;
  }

  .burger {
    display: inline-block;
  }
}

/* The narrowest phones: the logo and four controls only just fit, so the
   header loses its gaps rather than running off the edge. */
@media (max-width: 380px) {
  .site-header__inner {
    gap: var(--s2);
  }

  .site-header__actions {
    gap: 0;
  }

  .brand img {
    height: 20px;
    width: auto;
  }
}

@media (min-width: 861px) {
  .site-menu {
    display: none;
  }
}


/* --- Footer ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Brand on the left, the two link columns on the right. Every row of the
   footer sits in the same .wrap, so its edges line up with the page above. */
.site-footer__top {
  display: grid;
  /* The brand, then one column per link list, however many there are. */
  grid-template-columns: minmax(0, 2fr);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--s6);
  padding-top: var(--s7);
  padding-bottom: var(--s6);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
}

.site-footer__brand img {
  height: 22px;
  width: auto;
}

.site-footer__brand p {
  margin: 0;
  max-width: 32ch;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s2);
  font-size: var(--text-sm);
}

.site-footer__col > span:first-child {
  margin-bottom: var(--s1);
  color: var(--fg);
  font-weight: 600;
}

.site-footer__col a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__col a:hover {
  color: var(--fg);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-top: var(--s4);
  padding-bottom: var(--s5);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* The Insert Coin mark: dimmed so it sits behind the copyright line. */
.site-footer__parent {
  display: inline-flex;
  opacity: 0.75;
  transition: opacity var(--t-base) var(--ease);
}

.site-footer__parent:hover {
  opacity: 1;
}

.site-footer__parent img {
  display: block;
  height: 20px;
  width: auto;
}

@media (max-width: 720px) {
  .site-footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-flow: row;
    gap: var(--s5);
    padding-top: var(--s6);
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* --- Legal pages ------------------------------------------------------ */

.legal {
  padding-top: var(--s7);
  padding-bottom: var(--s8);
}

.legal__meta {
  margin: var(--s2) 0 var(--s6);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.legal__body {
  color: var(--fg);
  line-height: 1.6;
}

.legal__body h2 {
  margin: var(--s6) 0 var(--s2);
  font-size: var(--text-lg);
}

.legal__body h2:first-child {
  margin-top: 0;
}

.legal__body p,
.legal__body ul {
  margin: 0 0 var(--s3);
  color: var(--text-muted);
}

.legal__body ul {
  padding-left: var(--s5);
}

.legal__body a {
  color: var(--fg);
}

/* --- Landing: hero ----------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-stone);
}

.hero__cairn {
  position: absolute;
  right: -220px;
  top: -260px;
  width: 900px;
  height: 900px;
  opacity: 0.1;
  fill: var(--ink);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  padding-block: var(--s8) 0;
}

.hero__card {
  align-self: flex-start;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s6);
  border-radius: var(--r-sheet);
  background: var(--page);
}

/* The headline's second sentence: on a line of its own, in the brand's
   stone gradient, darkened at the sand end so it reads on the cream card. */
.hero__accent {
  display: block;
  width: fit-content;
  background: linear-gradient(100deg,
    color-mix(in oklch, var(--sand) 72%, var(--ink)) 0%,
    var(--blue-grey) 55%,
    var(--slate) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* The descenders (g, p) stay inside the painted box. */
  padding-bottom: 0.08em;
}

[data-theme='dark'] .hero__accent {
  background-image: linear-gradient(100deg, var(--sand) 0%, var(--cream) 45%, var(--blue-grey) 100%);
}

@media (min-width: 861px) {
  .hero__accent {
    white-space: nowrap;
  }
}

/* Words inside a sentence: they stay in the line, and a break inside them
   carries the gradient onto the next line. */
.hero__accent--inline {
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


.hero__actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.hero__screen {
  margin-bottom: -120px;
}

.hero + .hero-spacer {
  height: 120px;
}

@media (max-width: 860px) {
  .hero__inner {
    padding-block: var(--s6) 0;
  }

  .hero__card {
    padding: var(--s5);
  }

  .hero__screen {
    margin-bottom: -56px;
  }

  .hero + .hero-spacer {
    height: 56px;
  }

  .hero__cairn {
    right: -160px;
    top: -200px;
    width: 560px;
    height: 560px;
  }
}

/* The product frame. The design drops a live app screen in here; until real
   product screenshots exist this is the frame with the brand tile in it,
   which is decoration and is marked as such in the markup. */
.screen {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--lift-2);
  overflow: hidden;
}

.screen__bar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 34px;
  padding-inline: var(--s3);
  border-bottom: 1px solid var(--border);
  background: var(--subtle);
}

.screen__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.screen__body {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--gradient-tile);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen__body svg {
  width: 36%;
  max-width: 220px;
  fill: var(--ink);
  opacity: 0.55;
}

.screen--tall .screen__body {
  aspect-ratio: 16 / 9;
}

/* A product screenshot fills the frame from its top-left corner: where the
   frame is wider than the picture (the hero's 16:9), the bottom is cut, not
   the navigation. One picture per theme; the other is not downloaded. */
.screen__shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.screen__shot--dark,
[data-theme='dark'] .screen__shot--light {
  display: none;
}

[data-theme='dark'] .screen__shot--dark {
  display: block;
}

/* --- Landing: the offer → invoice → paid flow -------------------------- */

.section {
  padding-block: var(--s7);
}

.section--ruled {
  border-top: 1px solid var(--border);
}

.section--surface {
  background: var(--surface);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: 680px;
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--s4);
  align-items: start;
  margin-top: var(--s6);
}

.flow__step {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.flow__head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.flow__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--action);
  color: var(--action-fg);
  font-family: var(--font-num);
  font-size: var(--text-sm);
  font-weight: 600;
}

.flow__label {
  font-weight: 600;
}

.flow__art {
  display: flex;
  justify-content: center;
  padding: var(--s4);
  border-radius: var(--r-card);
  background: var(--subtle);
}

/* A real document page instead of the drawn sheet: edge to edge in the card,
   cut from the top so the amount and the status stay in view. */
.flow__art--shot {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.flow__art--shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 11 / 10;
  object-fit: cover;
  object-position: top;
}

/* Status badge, the three states the flow shows. Each reads its pair of
   status tokens; the modifier only chooses which pair. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding-inline: var(--s2);
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge--accepted {
  background: var(--paid-wash);
  color: var(--paid-text);
}

.badge--sent {
  background: var(--sent-wash);
  color: var(--sent-text);
}

.badge--paid {
  background: var(--paid-wash);
  color: var(--paid-text);
}

/* A document, drawn from tokens: the paper device the design scales down
   inside the flow cards. --paper* are paper in both themes by design. */
.paper {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1.414;
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  border-radius: var(--r-tight);
  background: var(--paper);
  box-shadow: var(--lift-2);
}

.paper__rule {
  height: 6px;
  border-radius: var(--r-tight);
  background: var(--paper-line);
}

.paper__rule--title {
  height: 10px;
  width: 60%;
  background: var(--doc-accent);
}

.paper__rule--short {
  width: 40%;
}

.paper__rule--mid {
  width: 75%;
}

.paper__block {
  flex: 1;
  border-radius: var(--r-tight);
  background: var(--paper-fill);
}

/* --- Landing: alternating module sections ------------------------------ */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: var(--s6);
  align-items: center;
}

.split__copy {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-width: 0;
}

.split__art {
  min-width: 0;
}

/* Every other section puts the copy on the right, as the design does. The
   swap only applies once the two columns actually sit side by side. */
@media (min-width: 720px) {
  .split--flip .split__copy {
    order: 2;
  }
}

/* --- Landing: Swiss-made details --------------------------------------- */

/* Four details: one row on a wide screen, two by two on a tablet, one
   column on a phone — never three and a lone one. */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
  margin-top: var(--s5);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--page);
}

.card__title {
  font-weight: 600;
}

.card svg {
  color: var(--fg);
}

@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}

/* --- Landing: plan strip ----------------------------------------------- */

.plan-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}

.plan-strip__item {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}

.plan-strip__item--featured {
  border: 1.5px solid var(--action);
}

.plan-strip__name {
  font-weight: 600;
}

.plan-strip__price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
}

.section__head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s3);
  flex-wrap: wrap;
}

/* --- Landing: closing call to action ----------------------------------- */

.closer {
  position: relative;
  overflow: hidden;
  background: var(--gradient-stone);
}

.closer__inner {
  display: flex;
  padding-block: var(--s8);
}

.closer__card {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s6);
  border-radius: var(--r-sheet);
  background: var(--page);
}

@media (max-width: 860px) {
  .closer__inner {
    padding-block: var(--s6);
  }

  .closer__card {
    padding: var(--s5);
  }
}

/* --- Features (S-PUB-02) ----------------------------------------------- */

.page-head {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding-block: var(--s7) var(--s5);
}

.chips {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  padding-top: var(--s3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 40px;
  padding-inline: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t-base) var(--ease);
}

.chip:hover {
  background: var(--subtle);
  color: var(--fg);
}

.chip__pro,
.pro-tag {
  font-family: var(--font-num);
  font-size: var(--text-xs);
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-tight);
}

/* The illustrated module icons (icons.html, "feat-icon"), as v3 had them:
   big, two-tone, above the module's name. */
.feat-ic {
  display: block;
  width: 76px;
  height: 76px;
  margin-bottom: var(--s2);
}
.feat-ic .s { stroke: var(--fg); }
.feat-ic .s3 { stroke: var(--text-muted); }
.feat-ic .sa { stroke: var(--chart-2); }
.feat-ic .so { stroke: var(--action-fg); }
.feat-ic .f { fill: color-mix(in srgb, var(--highlight) 45%, transparent); }
.feat-ic .fs { fill: var(--surface); }
.feat-ic .fa { fill: var(--action); }
.feat-ic .ft { fill: var(--fg); font-family: var(--font-num); font-size: 10px; font-weight: 700; }

.module__meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --- Pricing (S-PUB-03) ------------------------------------------------ */

.pricing {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  padding-block: var(--s7);
}

.pricing__head {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  align-items: center;
  text-align: center;
}

.period {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--subtle);
  border-radius: var(--r-control);
}

.period a {
  display: flex;
  align-items: center;
  height: 36px;
  padding-inline: var(--s4);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.period a[aria-current='true'] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--lift-1);
}

.period a { gap: var(--s2); }

/* The yearly discount: the paid green, as a small pill inside the tab. */
.period__save {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--paid);
  color: var(--action-fg);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--s3);
}

.plan {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}

.plan--featured {
  border: 1.5px solid var(--action);
}

.plan__name {
  font-weight: 600;
  font-size: var(--text-lg);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: var(--s1);
}

.plan__amount {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
}

.plan__per {
  color: var(--text-muted);
}

.plan__limits {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-wrap: pretty;
}

/* The Lifetime card's "Only 17 left": the plan row's own counter. */
.plan__left {
  align-self: flex-start;
  padding: 2px var(--s2);
  border-radius: var(--r-pill);
  background: var(--due-wash);
  color: var(--due-text);
  font-size: var(--text-xs);
  font-weight: 600;
}
.plan__left--out {
  background: var(--draft-wash);
  color: var(--text-muted);
}
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.compare {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: auto;
}

.compare__table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare__table th,
.compare__table td {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.compare__table thead th {
  height: 44px;
  padding-block: 0;
  background: var(--subtle);
  font-weight: 600;
}

.compare__table th:first-child,
.compare__table td:first-child {
  width: 40%;
  padding-left: var(--s5);
  text-align: left;
  font-weight: 400;
  text-wrap: pretty;
}

.compare__table th:last-child,
.compare__table td:last-child {
  padding-right: var(--s5);
}

.compare__table tbody tr:last-child th,
.compare__table tbody tr:last-child td {
  border-bottom: 0;
}

.compare__yes {
  display: inline-flex;
  color: var(--paid-text);
}

.compare__no {
  color: var(--text-muted);
}

.compare__txt {
  font-family: var(--font-num);
  color: var(--fg);
}

/* The FAQ. <details>/<summary> rather than the prototype's JS accordion:
   the page needs no script, and the browser gives keyboard support and
   in-page find for free. */
.faq {
  display: flex;
  flex-direction: column;
}

.faq__item {
  border-top: 1px solid var(--border);
}

.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  min-height: 56px;
  font-size: var(--text-lg);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--t-base) var(--ease);
}

.faq__item[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.faq__item p {
  margin: 0 0 var(--s4);
  max-width: 760px;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* --- Changelog (S-PUB-04 / ChangelogList) ------------------------------ */

.changelog {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  padding-block: var(--s7);
}

.changelog__head {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.changelog__list {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}

.release {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: var(--s5);
}

.release__meta {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.release__version {
  font-family: var(--font-num);
  font-size: var(--text-lg);
  font-weight: 500;
}

.release__date {
  font-family: var(--font-num);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.release__body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.release__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
}

.release__group {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.release__cat {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.release__notes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.release__notes li {
  display: flex;
  gap: var(--s2);
  text-wrap: pretty;
}

.release__notes li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--highlight);
}

@media (max-width: 640px) {
  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }
}

.empty {
  padding: var(--s7) var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
}

/* --- Solution landing pages (S-PUB-LP) --------------------------------- */

.lp-eyebrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) var(--s3);
  border-radius: var(--r-pill);
  background: var(--paid-wash);
  color: var(--paid-text);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lp-title {
  font-size: clamp(var(--text-3xl), 4.4vw, calc(var(--text-3xl) * 1.45));
  line-height: 1.04;
}

.lp-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  padding-block: var(--s8) 0;
}

/* With the invoice beside it: copy left, the paper right, the paper running
   off the bottom of the hero so the payment part is what the eye lands on. */
.lp-hero__inner--paper {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--s7);
  padding-block: var(--s8);
}

.lp-hero__card {
  max-width: 1040px;
}

/* Beside the invoice the card shares the row and keeps to its column. */
.lp-hero__inner--paper .lp-hero__card {
  max-width: 640px;
}

.lp-proof {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  font-size: var(--text-sm);
  font-weight: 500;
}

.lp-proof li {
  display: flex;
  gap: var(--s1);
  align-items: flex-start;
}

.lp-paper {
  margin: 0;
  justify-self: center;
  width: min(100%, 520px);
  transform: rotate(1.5deg);
}

.lp-paper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-control);
  background: var(--paper);
  box-shadow: var(--lift-pop);
}

.lp-center {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

.lp-pains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  margin-top: var(--s6);
}

.lp-pain {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}

.lp-pain p {
  display: flex;
  gap: var(--s2);
  margin: 0;
  padding: var(--s4) var(--s5);
  text-wrap: pretty;
}

.lp-pain__before {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border-strong);
}

.lp-pain__after {
  flex: 1;
  border-top: 1px solid var(--border);
  background: var(--paid-wash);
  color: var(--fg);
  font-weight: 500;
}

.lp-pain__mark {
  flex: none;
  padding-top: 3px;
  color: var(--paid-text);
}

.lp-pain__mark--before {
  padding-top: 0;
  color: var(--text-muted);
  text-decoration: none;
}

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
}

.lp-step {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--page);
}

.lp-step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--s1);
  border-radius: var(--r-pill);
  background: var(--action);
  color: var(--action-fg);
  font-family: var(--font-num);
  font-weight: 600;
}

.lp-faq {
  display: flex;
  flex-direction: column;
  margin-top: var(--s5);
  border-top: 1px solid var(--border);
}

.lp-faq__item {
  border-bottom: 1px solid var(--border);
}

.lp-faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding-block: var(--s4);
  font-size: var(--text-lg);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.lp-faq__item summary::-webkit-details-marker {
  display: none;
}

.lp-faq__item summary svg {
  flex: none;
  color: var(--text-muted);
  transition: transform var(--t-base) var(--ease);
}

.lp-faq__item[open] summary svg {
  transform: rotate(180deg);
}

.lp-faq__item p {
  margin: 0;
  padding-bottom: var(--s4);
  color: var(--text-muted);
  text-wrap: pretty;
}

@media (max-width: 960px) {
  .lp-hero__inner--paper {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s6);
    padding-block: var(--s6);
  }

  .lp-paper {
    width: min(100%, 440px);
  }

  .lp-pains,
  .lp-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Cookie consent bar ------------------------------------------------ */

.cookie-bar {
  position: fixed;
  z-index: 60;
  right: var(--s4);
  bottom: var(--s4);
  left: var(--s4);
  max-width: 520px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--lift-pop);
}

.cookie-bar[hidden] {
  display: none;
}

.cookie-bar__text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.cookie-bar__actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}
