/* The Plink design scheme for the website. Flat colour, hard edges, big
   type. Values match src/design in the app. */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@900&family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #111111;
  --ground: #d9d7cf;
  --surface: #ffffff;
  --sunken: #eeede8;
  --inset: #f1f0ec;
  --hairline: #e6e4dd;
  --handle: #c9c7c0;
  --prose: #333333;
  --secondary: #444444;
  --muted: #6b6b6b;
  --signal: #ffe27a;
  --success: #0f7a3d;
  --danger: #b3261e;

  /* The site always uses Plink's own accent. */
  --accent: #4c1fd1;
  --accent-pink: #c8135c;
  --accent-cobalt: #1541c9;
  --accent-teal: #0a6b5e;

  --cat-cobalt: #1541c9;
  --cat-amber: #9a6700;
  --cat-teal: #0a6b5e;
  --cat-plum: #8a1c5c;
  --cat-brick: #b0350f;
  --cat-slate: #3d4a5c;

  --white-85: rgba(255, 255, 255, 0.85);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-55: rgba(255, 255, 255, 0.55);
  --white-45: rgba(255, 255, 255, 0.45);
  --white-35: rgba(255, 255, 255, 0.35);
  --white-18: rgba(255, 255, 255, 0.18);
  --dim: rgba(17, 17, 17, 0.55);

  --display: "Unbounded", "Archivo", ui-sans-serif, system-ui, sans-serif;
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --band: 10px;
  --band-colour: var(--ink);
  --rule: 2px;
  --content: 1200px;
  --gutter: 40px;
  --card-gap: 16px;
  --tile-gap: 10px;
  --section: 80px;
  --header: 96px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Links take the colour of their surface; a button takes its own. */
a:not(.btn) { color: var(--ink); }
a:not(.btn):hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: 2px; }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }

/* Surfaces. A section is one of three. */
.on-accent { background: var(--accent); color: var(--surface); }
.on-ground { background: var(--ground); color: var(--ink); }
.on-ink { background: var(--ink); color: var(--surface); }
.on-accent a:not(.btn), .on-ink a:not(.btn) { color: var(--surface); }
.on-accent a:not(.btn):hover { color: var(--signal); }

/* Type. Unbounded for page and section headings; Archivo for the rest. */
.display { font-family: var(--display); font-weight: 900; }
.h-hero { font-size: 84px; letter-spacing: -3.5px; line-height: 0.98; margin: 0; }
.h-page { font-size: 72px; letter-spacing: -2.8px; line-height: 1; margin: 0; }
.h-section { font-size: 48px; letter-spacing: -1.2px; line-height: 1.05; margin: 0; }
.lede { font-size: 22px; line-height: 1.45; max-width: 44ch; margin: 0; }
.on-accent .lede { color: rgba(255, 255, 255, 0.92); }
.intro { font-size: 20px; line-height: 1.5; max-width: 62ch; color: var(--prose); margin: 0; }
.on-ink .intro { color: var(--white-85); max-width: 48ch; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.small { font-size: 15px; }
.tabular { font-variant-numeric: tabular-nums; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: 0.4px; }
.header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
/* The wordmark row is the header's full height on its own, so the row keeps
   its place when the menu opens beneath it. */
.header .wordmark { height: var(--header); font-size: 28px; }

/* The wordmark is the one drawing in /wordmark.svg, sized by font-size: its
   box is 1.04em tall, the top of the signal square to the baseline, and the
   letters take the text colour. Mark up as:
   <a class="wordmark" href="/" aria-label="Plink"><svg aria-hidden="true"><use href="/wordmark.svg#mark"></use></svg></a> */
.wordmark { display: inline-flex; align-items: center; color: inherit; }
.wordmark svg { display: block; height: 1.04em; width: 3.059em; }

/* Buttons. 64px, square, no icon on the left. */
.btn {
  height: 64px; padding: 0 28px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 19px; font-weight: 800; text-decoration: none; border: 0; cursor: pointer;
  font-family: var(--sans);
}
.btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; }
.btn-accent { background: var(--accent); color: var(--surface); }
.btn-ink { background: var(--ink); color: var(--surface); }
.btn-white { background: var(--surface); color: var(--accent); }
.btn-outline { background: transparent; color: inherit; border: var(--rule) solid currentColor; }
.btn:hover { filter: brightness(0.8); }

/* Cards on the ground: white with a band along the top. */
.card { background: var(--surface); border-top: var(--band) solid var(--band-colour); padding: 22px 22px 24px; }
.card h2, .card h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.15; }
.card p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--prose); }
.card .n { font-family: var(--display); font-size: 34px; font-weight: 900; line-height: 1; margin-bottom: 14px; }
.card-cobalt { --band-colour: var(--cat-cobalt); }
.card-amber { --band-colour: var(--cat-amber); }
.card-teal { --band-colour: var(--cat-teal); }
.card-plum { --band-colour: var(--cat-plum); }
.card-brick { --band-colour: var(--cat-brick); }
.card-slate { --band-colour: var(--cat-slate); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap); }

/* Facts in an ink panel: label and value rows with hairline white rules. */
.facts .fk { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); padding: 14px 0 12px; border-top: 1px solid var(--white-35); line-height: 1.5; }
.facts .fv { font-size: 17px; font-weight: 600; color: var(--surface); padding: 12px 0; border-top: 1px solid var(--white-35); line-height: 1.5; }

/* A tab shown as lines on a white card. */
.tabline { display: flex; justify-content: space-between; align-items: center; height: 44px; border-top: 1px solid var(--hairline); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tabline-total { border-top: var(--rule) solid var(--ink); font-weight: 800; }

/* Dashboard tiles on ink. */
.tile { background: var(--surface); color: var(--ink); padding: 18px 20px; }
.tile .v { font-size: 40px; font-weight: 800; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; line-height: 1; }
.tile .l { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--secondary); margin-top: 8px; }
.tiles { display: grid; gap: var(--tile-gap); }

/* A screenshot slot. */
.shot { background: var(--ink); aspect-ratio: 9 / 19; display: flex; align-items: flex-end; padding: 16px; color: var(--white-70); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* A short uppercase label on an ink block. */
.badge { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }

/* A pull quote on ink. */
.quote { background: var(--ink); color: var(--surface); text-align: center; font-size: 28px; font-weight: 800; letter-spacing: -0.4px; padding: 28px 20px; }

/* Section spacing. */
.section { padding: var(--section) 0; }
.section-ink { padding: 48px 0 56px; }
.foot a { color: var(--surface); text-decoration: none; font-size: 15px; font-weight: 700; }
.foot .legal { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--white-18); font-size: 16px; line-height: 1.5; color: var(--white-85); }
.foot .note { font-size: 15px; color: rgba(255, 255, 255, 0.6); }

@media (max-width: 800px) {
  :root { --gutter: 20px; --section: 48px; --header: 72px; }
  .h-hero { font-size: 46px; letter-spacing: -1.6px; }
  .h-page { font-size: 40px; letter-spacing: -1.4px; }
  .h-section { font-size: 34px; letter-spacing: -0.8px; }
  .lede { font-size: 19px; }
  .intro { font-size: 18px; }
  .cards { grid-template-columns: 1fr; }
}

/* The menu button. The nav sits inline beside the wordmark on a wide screen
   and drops under it behind this button on a phone. */
.menu-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.menu-button { display: none; }
.menu-button svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; }

/* Home hero: copy on the left, a worked tab on the right. */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: start; gap: 64px; padding: 56px 0 72px; }
.hero-card { width: 420px; max-width: 100%; margin-left: auto; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 24px; margin: 40px 0 0; max-width: 560px; }
.facts dt, .facts dd { margin: 0; }

/* The worked tab in the hero. */
.tab-card { background: var(--surface); color: var(--ink); border-top: var(--band) solid var(--band-colour); padding: 20px 22px 22px; }
.tab-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; }
.tab-head .name { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.tabline .amt { font-weight: 700; }
.tab-total { display: flex; justify-content: space-between; align-items: baseline; border-top: var(--rule) solid var(--ink); padding-top: 14px; margin-top: 4px; }
.tab-total .v { font-size: 40px; font-weight: 800; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; line-height: 1; }

/* Two columns of equal weight, for the dashboard section. */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; background: var(--ground); padding: 0 8px; }
.bars i { flex: 1; display: block; background: var(--accent); }
.bars i.now { background: var(--surface); }

/* Screenshots. Three phone shots in a row, inset on a wide screen. */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shots-inset { padding: 0 120px; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; background: var(--ink); }
.shots figcaption { margin-top: 12px; color: var(--secondary); }
.on-ink .shots figcaption, .on-accent .shots figcaption { color: var(--white-70); }

/* The accent band at the top of an inner page. */
.page-head { padding: 40px 0 64px; }
.page-head .eyebrow { color: var(--white-70); }
.page-head h1 { margin: 12px 0 0; }
.page-head .lede { margin-top: 24px; max-width: 52ch; }
.updated { margin: 16px 0 0; font-size: 15px; font-weight: 600; color: var(--white-70); }

/* Running copy on a white card. */
.prose { background: var(--surface); border-top: var(--band) solid var(--band-colour); padding: 40px 40px 44px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-family: var(--sans); font-size: 30px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.15; margin: 40px 0 12px; }
.prose h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; margin: 32px 0 10px; }
.prose p, .prose li { font-size: 17px; line-height: 1.55; color: var(--prose); }
.prose p { margin: 0 0 16px; max-width: 72ch; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; max-width: 72ch; }
.prose li { margin-bottom: 8px; }
.prose a { font-weight: 700; }
.prose strong { color: var(--ink); }

/* Label and value rows inside a white card. */
.rows { margin: 0; }
.rows > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.rows dt { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--secondary); }
.rows dd { margin: 0; font-size: 17px; font-weight: 600; text-align: right; }

/* A definition block set into a form or a schedule. */
.deflist { background: var(--inset); padding: 24px 24px 6px; margin: 0 0 20px; max-width: 72ch; }
.deflist dt { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.deflist dd { margin: 6px 0 18px; font-size: 17px; line-height: 1.55; color: var(--prose); }

/* One question and its answer. */
.qa + .qa { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.qa h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -0.5px; }

/* Vertical rhythm between blocks in one section. */
.stack { margin-top: var(--section); }
.stack-card { margin-top: var(--card-gap); }
.rule-ink { border: 0; border-top: var(--rule) solid var(--ink); margin: 48px 0 32px; }

/* Footer rows. */
.foot-row { display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px 28px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 800px) {
  .menu-button { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: var(--header); margin-right: -14px; cursor: pointer; }
  .menu-toggle:focus-visible + .menu-button { outline: var(--rule) solid var(--surface); outline-offset: 2px; }
  .header .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .header .nav a { padding: 15px 0; font-size: 17px; border-top: var(--rule) solid var(--white-45); }

  .hero { grid-template-columns: 1fr; gap: 32px; padding: 28px 0 40px; }
  .hero-card { width: 100%; }
  .btn-row { margin-top: 26px; }
  .btn { width: 100%; }
  .facts { grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; margin-top: 28px; }
  .quote { font-size: 22px; padding: 22px 20px; }

  .split { grid-template-columns: 1fr; gap: 32px; }
  .shots { gap: 10px; }
  .shots-inset { padding: 0; }
  .shots figcaption { margin-top: 8px; font-size: 11px; letter-spacing: 0.8px; }

  .page-head { padding: 28px 0 40px; }
  .prose { padding: 28px 22px 30px; }
  .prose h2 { font-size: 24px; margin: 32px 0 10px; }
  .prose h3 { font-size: 20px; }
  .qa h2 { font-size: 21px; }
  .deflist { padding: 20px 20px 4px; }
}

/* Eyebrows take the secondary colour of whatever surface they sit on. */
.section .eyebrow { color: var(--secondary); }
.on-ink .eyebrow, .on-accent .eyebrow { color: var(--white-70); }

/* A step number matches its card's band. */
.card-cobalt .n { color: var(--cat-cobalt); }
.card-amber .n { color: var(--cat-amber); }
.card-teal .n { color: var(--cat-teal); }
.card-plum .n { color: var(--cat-plum); }
.card-brick .n { color: var(--cat-brick); }
.card-slate .n { color: var(--cat-slate); }

/* The worked tab is a white card, so its labels stay ink even on the accent. */
.tab-card .eyebrow { color: var(--ink); }
.tab-card .tab-head .eyebrow { color: var(--secondary); }

/* Links on a colour surface need an underline to be told from the text. */
.page-head a, .quote a, .on-ink .intro a { text-decoration: underline; text-underline-offset: 3px; }
