/* Apple-inspired typography and product-led layout. No Apple web design system is implied. */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Ground. Warm limestone rather than paper white: it sits under screenshots
     of macOS windows without making them look grey. */
  --ground: #f5f5f7;
  --surface: #fdfdfd;
  --surface-sunk: #eeeef0;
  --ink: #1d1d1f;
  --ink-muted: #616167;
  --rule: #dedee3;
  --rule-strong: #c7c7cc;

  /* Roman red. The house colour, and the site's default accent.
     Red rather than imperial purple because Denarius already owns the purple,
     and a house colour that collides with one of its own products is not a
     house colour. Measured at 7.1:1 on the stone ground, so it carries body
     copy, not just decoration. */
  --roman: #9b2226;

  --accent: var(--roman);
  --accent-ink: #ffffff;
  --accent-wash: #f5eceb;

  /* Journal syntax. These carry the hue identity of the Denarius editor's
     Apple system colours, darkened for a web page: the app draws on a text
     background at 13pt with the OS tuning contrast, whereas this is body copy
     on stone, and the raw system values fail WCAG AA badly here (systemGreen
     is about 1.9:1 on white). Hue kept, luminance fixed. */
  --hl-gray: #6e6e76;
  --hl-teal: #0f6e80;
  --hl-green: #1d7a3e;
  --hl-red: #b3261e;
  --hl-blue: #14589e;
  --hl-orange: #8f5600;
  --hl-purple: #6b3fa0;
  --hl-indigo: #4340b0;
  --hl-brown: #7a5a3a;

  --radius-panel: 16px;
  --radius-control: 10px;
  --radius-code: 4px;

  --measure: 65ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --column: 1240px;

  --step: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light dark;
}

/* The dark palette, held but not applied. Declaring the values once here means
   the two selectors that switch into dark mode only have to remap names, so a
   colour can never drift between the automatic and the manual path. */
:root {
  --d-ground: #141416;
  --d-surface: #1c1c1f;
  --d-surface-sunk: #101012;
  --d-ink: #edecea;
  --d-ink-muted: #a3a0a8;
  --d-rule: #2c2c31;
  --d-rule-strong: #3c3c43;
  /* Roman red has to lift in dark mode to stay legible. 5.1:1 on the dark
     ground, same hue family, less saturation than the light value needs. */
  --d-roman: #dc5f54;
  --d-accent-ink: #0d0d0f;
  --d-accent-wash: #2a1c1b;

  --d-hl-gray: #9b9ba3;
  --d-hl-teal: #4fc5dc;
  --d-hl-green: #4cd07d;
  --d-hl-red: #ff6b60;
  --d-hl-blue: #5aa9ff;
  --d-hl-orange: #ffa83a;
  --d-hl-purple: #c08bff;
  --d-hl-indigo: #8785ff;
  --d-hl-brown: #c09a72;
}

/* Two ways into dark: the system asks for it and the reader has not chosen
   light, or the reader chose dark outright. Same remap either way. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: var(--d-ground);
    --surface: var(--d-surface);
    --surface-sunk: var(--d-surface-sunk);
    --ink: var(--d-ink);
    --ink-muted: var(--d-ink-muted);
    --rule: var(--d-rule);
    --rule-strong: var(--d-rule-strong);
    --roman: var(--d-roman);
    --accent-ink: var(--d-accent-ink);
    --accent-wash: var(--d-accent-wash);
    --hl-gray: var(--d-hl-gray);
    --hl-teal: var(--d-hl-teal);
    --hl-green: var(--d-hl-green);
    --hl-red: var(--d-hl-red);
    --hl-blue: var(--d-hl-blue);
    --hl-orange: var(--d-hl-orange);
    --hl-purple: var(--d-hl-purple);
    --hl-indigo: var(--d-hl-indigo);
    --hl-brown: var(--d-hl-brown);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: var(--d-ground);
  --surface: var(--d-surface);
  --surface-sunk: var(--d-surface-sunk);
  --ink: var(--d-ink);
  --ink-muted: var(--d-ink-muted);
  --rule: var(--d-rule);
  --rule-strong: var(--d-rule-strong);
  --roman: var(--d-roman);
  --accent-ink: var(--d-accent-ink);
  --accent-wash: var(--d-accent-wash);
  --hl-gray: var(--d-hl-gray);
  --hl-teal: var(--d-hl-teal);
  --hl-green: var(--d-hl-green);
  --hl-red: var(--d-hl-red);
  --hl-blue: var(--d-hl-blue);
  --hl-orange: var(--d-hl-orange);
  --hl-purple: var(--d-hl-purple);
  --hl-indigo: var(--d-hl-indigo);
  --hl-brown: var(--d-hl-brown);
}

:root[data-theme="light"] {
  color-scheme: light;
}

/* Per-page accent lock. Each product owns one colour and uses it everywhere on
   its own page. The home page, support, changelog and the privacy pages carry
   none at all: links are ink with a rule under them. */
.accent-pharos {
  /* The icon's own Display P3 navy, with the sRGB reduction as fallback. */
  --accent: #1f3a87;
  --accent: color(display-p3 0.14118 0.23137 0.50196);
  --accent-ink: #ffffff;
  --accent-wash: #eceef6;
}

.accent-denarius {
  /* Tyrian purple. The coin's legend is imperial titulature, and Tyrian was
     the emperor's colour: a dark murex red-purple, not lavender. */
  --accent: #5a1e3c;
  --accent-ink: #ffffff;
  --accent-wash: #f4ecf0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .accent-pharos {
    --accent: #7d9be0;
    --accent: color(display-p3 0.50196 0.60784 0.87843);
    --accent-ink: #0d0d0f;
    --accent-wash: #1a1d29;
  }
  :root:not([data-theme="light"]) .accent-denarius {
    --accent: #d494b4;
    --accent-ink: #0d0d0f;
    --accent-wash: #241a20;
  }
}

:root[data-theme="dark"] .accent-pharos {
  --accent: #7d9be0;
  --accent: color(display-p3 0.50196 0.60784 0.87843);
  --accent-ink: #0d0d0f;
  --accent-wash: #1a1d29;
}

:root[data-theme="dark"] .accent-denarius {
  --accent: #d494b4;
  --accent-ink: #0d0d0f;
  --accent-wash: #241a20;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system,BlinkMacSystemFont,"Geist","Segoe UI",sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
video,
picture,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3 {
  margin: 0 0 .5em;
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 {
  font-size: clamp(38px,5.2vw,68px);
}
h2 {
  font-size: clamp(30px,3.5vw,46px);
}
h3 {
  font-size: clamp(21px,2.2vw,28px);
  letter-spacing: -.025em;
}
p {
  margin: 0 0 1.1em;
  max-width: 65ch;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}
main :is(p,li,td) a {
  color: var(--accent);
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
strong {
  font-weight: 650;
}
code {
  font-family: ui-monospace,"SF Mono",Menlo,monospace;
  font-size: .85em;
}
:not(pre) > code {
  padding: .12em .35em;
  border-radius: 4px;
  background: var(--surface-sunk);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: 8px;
  left: -9999px;
  z-index: 20;
  padding: 12px;
  background: var(--surface);
}
.skip:focus {
  left: 8px;
}
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb,var(--ground) 92%,transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rule);
}
.masthead nav {
  max-width: var(--column);
  margin: auto;
  padding-inline: var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.masthead__mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.mark {
  width: 33px;
  height: 28px;
  color: var(--ink);
}
.wordmark {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .16em;
}
.masthead__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.masthead__links a {
  text-decoration: none;
  color: var(--ink-muted);
  padding-block: 12px;
}
.masthead__links a:hover,
.masthead__links a[aria-current] {
  color: var(--ink);
}
.theme {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-sunk);
}
.theme button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.theme button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(0 0 0/.08);
}
.theme svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.no-js .theme {
  display: none;
}
main > section,
main > .note {
  max-width: var(--column);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
main > section + section,
main > .note + section {
  margin-top: clamp(72px,9vw,128px);
}
main > .note {
  margin-top: 72px;
  max-width: 850px;
}
.hero {
  padding-top: clamp(44px,6vw,76px);
  text-align: center;
}
.hero .prose {
  max-width: 790px;
  margin: auto;
}
.hero h1 {
  max-width: 760px;
  margin-inline: auto;
}
.hero .prose > p {
  margin-inline: auto;
  font-size: clamp(18px,2vw,22px);
  max-width: 43ch;
  color: var(--ink-muted);
  line-height: 1.45;
}
.hero .prose > p:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 26px;
  font-size: 17px;
}
.hero figure {
  margin: 48px 0 0;
}
.hero--home {
  padding-block: 68px 0;
}
.hero--home h1 {
  max-width: 660px;
}
.hero--home + .feature {
  margin-top: 64px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 550;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink) !important;
  white-space: nowrap;
  min-height: 44px;
}
.button:hover {
  text-decoration: none;
  filter: brightness(1.12);
}
.button:active {
  transform: translateY(1px);
}
.availability {
  color: var(--ink-muted);
  font-size: 15px;
}
.feature {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
  gap: clamp(32px,5vw,72px);
}
.feature .prose {
  max-width: 460px;
}
.feature p {
  color: var(--ink-muted);
}
.feature figure {
  margin: 0;
  min-width: 0;
}
.feature--showcase {
  padding-block: 48px;
  border-radius: 24px;
  background: var(--surface);
}
.feature--showcase h2 {
  font-size: 22px;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.feature--showcase h3 {
  font-size: clamp(32px,3.5vw,46px);
}
.feature--panorama {
  display: block;
  text-align: center;
}
.feature--panorama .prose {
  max-width: 730px;
  margin: 0 auto 40px;
}
.feature--panorama p {
  margin-inline: auto;
}
.feature--compact figure {
  max-width: 440px;
  margin: auto;
}
.feature--compact.media,
.media--compact {
  max-width: 480px;
}
.features h2 {
  max-width: 760px;
  margin-bottom: 36px;
}
.features > ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 32px 64px;
  padding: 0;
  margin: 0;
}
.features li {
  margin: 0;
  color: var(--ink-muted);
  max-width: 48ch;
}
.features li > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -.02em;
}
.features--summary {
  padding-block: 36px;
}
.features--summary h2 {
  text-align: center;
  margin-inline: auto;
}
.plinth {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 24px;
}
.plinth > h2 {
  grid-column: 1/-1;
  max-width: 780px;
  margin-bottom: 16px;
}
.cell {
  grid-column: span 3;
  min-width: 0;
  padding: 36px;
  background: var(--surface);
  border-radius: 24px;
}
.cell--wide {
  grid-column: span 4;
}
.cell--narrow {
  grid-column: span 2;
}
.cell p {
  color: var(--ink-muted);
  font-size: 16px;
}
.cell h3:not(:first-child) {
  margin-top: 32px;
}
.cell--wash {
  background: var(--surface-sunk);
}
.cell figure {
  margin: 26px -16px -16px;
}
.specimen {
  max-width: 960px;
}
.specimen > p {
  color: var(--ink-muted);
}
pre {
  overflow: auto;
}
pre.journal {
  background: var(--surface);
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.8;
  margin: 32px 0;
}
pre.journal code {
  font-size: inherit;
}
.compare {
  max-width: 1000px;
}
.compare > p {
  color: var(--ink-muted);
}
.compare table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
}
.compare th,
.compare td {
  padding: 15px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.compare th {
  font-weight: 600;
}
.compare td:not(:first-child),
.compare th:not(:first-child) {
  text-align: center;
}
.compare td:first-child {
  width: 50%;
}
.note {
  color: var(--ink-muted);
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  font-size: 16px;
}
.note p:last-child {
  margin-bottom: 0;
}
.cta {
  text-align: center;
  padding-block: 56px;
}
.cta p {
  margin-inline: auto;
  color: var(--ink-muted);
  max-width: 62ch;
}
.cta p:has(.button),
.cta p:has(>a) {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  max-width: none;
}
figure.media {
  margin: 32px 0;
}
figure.media img,
figure.media video {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--rule);
  box-shadow: 0 4px 12px rgb(0 0 0/.04),0 24px 64px rgb(0 0 0/.1);
}
figure.media .screenshot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 14px;
  color: inherit;
}
figure.media .shot--dark {
  display: none;
}
@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) .shot--light {
    display: none;
  }
  :root:not([data-theme="light"]) .shot--dark {
    display: block;
  }
}
:root[data-theme="dark"] .shot--light {
  display: none;
}
:root[data-theme="dark"] .shot--dark {
  display: block;
}
.lightbox {
  border: 0;
  padding: 24px;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgb(12 12 16/.9);
}
.lightbox img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: min(94vw,1900px);
  max-height: 90dvh;
  width: auto;
  height: auto;
  border-radius: 14px;
}
.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid #74747c;
  border-radius: 999px;
  background: #28282c;
  color: #f5f5f7;
  font-size: 26px;
  cursor: pointer;
}
.colophon {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
}
.colophon__inner {
  max-width: var(--column);
  margin: auto;
  padding: 40px var(--gutter);
  font-size: 13px;
  color: var(--ink-muted);
}
.colophon__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.colophon__links a {
  text-decoration: none;
}
.colophon__fine {
  font-size: 12px;
  margin: 0;
}
.release {
  max-width: var(--column);
  margin: auto;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--rule);
}
.release__date {
  color: var(--ink-muted);
}
.email {
  white-space: nowrap;
}
@media (min-width:900px) {
  .feature--reversed > .prose {
    order: 2;
  }
}
@media (max-width:767px) {
  :root {
    --gutter: 24px;
  }
  .masthead nav {
    gap: 14px;
    height: 60px;
  }
  .masthead__links {
    gap: 18px;
    font-size: 12px;
  }
  .wordmark {
    display: none;
  }
  .theme button {
    width: 28px;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature .prose {
    max-width: none;
  }
  .feature--showcase {
    margin-inline: 16px;
    padding-inline: 24px;
  }
  .hero figure {
    margin-top: 32px;
  }
  .features > ul {
    gap: 28px;
  }
  .features li > strong {
    font-size: 20px;
  }
  .plinth {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cell,
  .cell--wide,
  .cell--narrow {
    grid-column: 1;
    padding: 28px;
  }
  .compare th,
  .compare td {
    padding: 12px 5px;
    font-size: 13px;
  }
  .compare td:first-child {
    width: 45%;
  }
  pre.journal {
    font-size: 12px;
    padding: 20px;
  }
}
@media (max-width:420px) {
  .features > ul {
    grid-template-columns: 1fr;
  }
  .masthead__links {
    gap: 14px;
  }
  :root {
    --gutter: 20px;
  }
}
@media (prefers-reduced-motion:no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease,transform .5s ease;
  }
  [data-reveal][data-shown] {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-transparency:reduce) {
  .masthead {
    background: var(--ground);
    backdrop-filter: none;
  }
}
@media print {
  .masthead,
  .theme,
  .colophon,
  .skip {
    display: none;
  }
  figure.media img {
    box-shadow: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
.hl-comment {
  color: var(--hl-gray);
}
.hl-code {
  color: var(--hl-gray);
}
.hl-date {
  color: var(--hl-teal);
}
.hl-status {
  color: var(--hl-green);
  font-weight: 600;
}
.hl-description {
  color: var(--ink);
}
.hl-amount {
  color: var(--ink);
}
.hl-commodity-word {
  color: var(--hl-indigo);
}
.hl-commodity-symbol {
  color: var(--ink);
}
.hl-directive-keyword {
  color: var(--hl-purple);
}
.hl-directive-argument {
  color: var(--ink);
}
.hl-tag-key {
  color: var(--hl-brown);
}
.hl-tag-value {
  color: var(--ink-muted);
}
.hl-assertion {
  color: var(--hl-orange);
}
.hl-cost {
  color: var(--hl-orange);
}
.hl-text {
  color: var(--ink);
}

/* Accounts colour by top-level category, which is the single most distinctive
   thing about reading a ledger in Denarius. */
.hl-account {
  color: var(--ink);
}
.hl-account-income {
  color: var(--hl-green);
}
.hl-account-expense {
  color: var(--hl-red);
}
.hl-account-asset {
  color: var(--hl-blue);
}
.hl-account-liability {
  color: var(--hl-orange);
}
.hl-account-equity {
  color: var(--hl-purple);
}

/* A menu-bar app has a different silhouette from a document app. */
.hero--compact {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  gap: 64px;
  align-items: center;
  text-align: left;
}
.hero--compact .prose > p {
  margin-inline: 0;
}
.hero--compact .prose > p:last-child {
  justify-content: flex-start;
}
.hero--compact figure {
  max-width: 300px;
  margin: 0 auto;
  width: 100%;
}
.hero--compact h1 {
  font-size: clamp(38px,4.5vw,60px);
}
.feature:not(:has(>figure)) {
  display: block;
  max-width: 960px;
}
.feature:not(:has(>figure)) .prose {
  max-width: 730px;
}
@media (max-width:767px) {
  .hero--compact {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .hero--compact .prose > p {
    margin-inline: auto;
  }
  .hero--compact .prose > p:last-child {
    justify-content: center;
  }
  .hero--compact figure {
    max-width: 250px;
  }
}
