/* Persistwise: same type and colours as the web app (Rails app/assets/tailwind/application.css). */
:root {
  --ink: #1a1a1a;
  --text: #374151;      /* Tailwind gray-700 */
  --muted: #4b5563;     /* gray-600 */
  --line: #e5e7eb;      /* gray-200 */
  --paper: #fbfaf8;
  --card: #ffffff;
  --button: #111827;    /* gray-900 */
  --button-text: #ffffff;
  --code: #f3f1ed;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9eef3;
    --text: #cfd6dd;
    --muted: #a3adb8;
    --line: #2b3440;
    --paper: #011321;
    --card: #0a1f30;
    --button: #e9eef3;
    --button-text: #011321;
    --code: #0f2638;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem 1rem; z-index: 1; }

.wrap { max-width: 48rem; margin: 0 auto; padding: 0 1.5rem; }
.measure { max-width: 38rem; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap {
  padding-top: 1.25rem; padding-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
header.site nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .875rem; color: var(--muted); }
header.site nav a { text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }

main { padding: 3rem 0; }
section { padding: 1.5rem 0 2rem; scroll-margin-top: 1rem; }
section + section { border-top: 1px solid var(--line); }

h1 { font-size: 2.25rem; line-height: 1.2; font-weight: 400; margin: 0 0 1.5rem; }
h2 { font-size: 1.6rem; line-height: 1.25; font-weight: 400; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; font-weight: 400; margin: 1.5rem 0 .5rem; }
p, li { color: var(--text); }
p { margin: 0 0 1rem; }
.lede { font-size: 1.125rem; }
.small { font-size: .875rem; color: var(--muted); }
ul.plain { padding-left: 1.2rem; margin: 0 0 1rem; }
ul.plain li { margin-bottom: .4rem; }
ol.steps { padding-left: 1.4rem; }
ol.steps li { margin-bottom: 1rem; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .85em;
}
code { background: var(--code); padding: .1em .3em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--code); padding: .85rem 1rem; overflow-x: auto; margin: .5rem 0 1rem; line-height: 1.45; }
pre code { background: none; padding: 0; overflow-wrap: normal; }

.downloads { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .75rem; }
.downloads li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  background: var(--card); border: 1px solid var(--line); padding: .9rem 1rem;
}
.downloads .what { flex: 1 1 16rem; }
.downloads .what strong { display: block; font-weight: 400; color: var(--ink); }
.downloads .what span { font-size: .85rem; color: var(--muted); }
.downloads .get { display: flex; align-items: center; gap: 1rem; }

.button {
  display: inline-block; padding: .5rem 1rem; background: var(--button); color: var(--button-text);
  text-decoration: none; white-space: nowrap;
}
.button:hover { color: var(--button-text); opacity: .9; }
.sha { font-size: .8rem; color: var(--muted); }

.note { border-left: 3px solid var(--line); padding: .25rem 0 .25rem 1rem; }

footer.site { border-top: 1px solid var(--line); }
footer.site .wrap { padding-top: 2rem; padding-bottom: 2rem; font-size: .875rem; color: var(--muted); }
footer.site p { color: var(--muted); margin: 0 0 .5rem; }

@media (max-width: 480px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  .wrap { padding: 0 1rem; }
  main { padding: 2rem 0; }
  .downloads .get { width: 100%; justify-content: space-between; }
}
