/* The app's Ledger tokens (lib/app/theme/tokens.dart, palettes.dart) and IBM Plex Sans. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --page: #faf8f3;
  --ink: #1b1c1a;
  --ink2: #4a4840;
  --primary: #1e5a46;
  --hair: #ddd8cb;
  --steel: #c9cecb;
  --steel-edge: #8d9390;
  --tick: #1b1c1a;
  --gutter: clamp(16px, 5vw, 64px);
  --tick-gap: 12.5%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121513;
    --ink: #e8e6e0;
    --ink2: #bfc3bc;
    --primary: #8fd4b4;
    --hair: #33382f;
    --steel: #aeb4b0;
    --steel-edge: #6f7572;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "IBM Plex Sans", system-ui, sans-serif;
}

a { color: var(--primary); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.masthead { padding: 24px var(--gutter) 0; }
.wordmark { color: inherit; font-weight: 600; font-size: 1.125rem; text-decoration: none; }

/* The hero's words. */
.hero { padding: clamp(40px, 9vw, 96px) var(--gutter) clamp(40px, 6vw, 64px); }
.hero h1 {
  margin: 0;
  max-width: 13em;
  font-size: clamp(2.5rem, 7.5vw, 5.25rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.lede { margin: 24px 0 0; max-width: 34em; font-size: 1.25rem; line-height: 1.45; color: var(--ink2); }
.status { margin: 20px 0 0; font-weight: 600; color: var(--primary); }

/* The steel rule: each step of a job is one inch on it. */
.rule {
  --edge: 56px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
  counter-reset: inch;
}
.rule::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--edge);
  background-color: var(--steel);
  border-block: 1px solid var(--steel-edge);
}
.rule li {
  position: relative;
  padding: calc(var(--edge) + 20px) 28px 0 0;
  counter-increment: inch;
}
/* An inch's eighths, longest at the inch and the half. */
.rule li::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  right: 0;
  height: calc(var(--edge) - 1px);
  background:
    linear-gradient(var(--tick), var(--tick)) 0 0 / 2px 30px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 50% 0 / 1px 20px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 25%) 0 0 / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px var(--tick-gap)) 0 0 / 100% 8px no-repeat;
}
.rule li::after {
  content: counter(inch);
  position: absolute;
  top: 26px;
  left: 8px;
  color: var(--tick);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
}
.rule h2 { margin: 0; font-size: 1.375rem; font-weight: 600; line-height: 1.2; }
.rule p { margin: 8px 0 0; color: var(--ink2); }

/* What stays true at every step. */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 34em));
  gap: 32px clamp(32px, 6vw, 96px);
  margin: 0;
  padding: clamp(64px, 9vw, 112px) var(--gutter);
}
.facts dt { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.facts dd { margin: 6px 0 0; color: var(--ink2); }

.foot { padding: 0 var(--gutter) 48px; color: var(--ink2); font-size: 1rem; }
.foot p { margin: 4px 0 0; }

/* Phone width: the rule stands up the left edge. */
@media (max-width: 760px) {
  .rule { display: block; padding: 0 var(--gutter) 0 0; }
  .rule::before {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--edge);
    height: auto;
    border-block: 0;
    border-inline-end: 1px solid var(--steel-edge);
  }
  .rule li { min-height: 10rem; padding: 0 0 36px calc(var(--edge) + 16px); }
  .rule li::before {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: calc(var(--edge) - 1px);
    height: auto;
    background:
      linear-gradient(var(--tick), var(--tick)) 0 0 / 30px 2px no-repeat,
      linear-gradient(var(--tick), var(--tick)) 0 50% / 20px 1px no-repeat,
      repeating-linear-gradient(180deg, var(--tick) 0 1px, transparent 1px 25%) 0 0 / 14px 100% no-repeat,
      repeating-linear-gradient(180deg, var(--tick) 0 1px, transparent 1px var(--tick-gap)) 0 0 / 8px 100% no-repeat;
  }
  .rule li::after { top: 8px; left: 34px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2rem, 9.6vw, 3.5rem); }
}

/* The privacy policy. */
.policy main { max-width: 44em; padding: 32px var(--gutter) 64px; }
.languages { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 1.125rem; font-weight: 600; }
.languages a { padding: 8px 0; }
.policy section { padding-top: 48px; overflow-wrap: anywhere; }
.policy h2 { margin: 0; font-size: 2rem; font-weight: 600; line-height: 1.15; }
.policy h3 { margin: 36px 0 0; font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.policy p { margin: 12px 0 0; }
.policy ul { margin: 12px 0 0; padding-inline-start: 1.25em; }
.policy li { margin-top: 10px; }

/* The backup file format page: tables and code inside the policy styles. */
.format .scroll { margin-top: 12px; overflow-x: auto; }
.format table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.format th, .format td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--hair); text-align: start; vertical-align: top; }
.format th { font-weight: 600; }
.format code { font: 0.9375rem/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.format ol { margin: 12px 0 0; padding-inline-start: 1.5em; }
.format li { margin-top: 10px; }
.format .foot { max-width: 44em; padding-top: 24px; }
