/* Between Lines pages on apps.nkreative.com. Colours follow the app's design
   tokens (client/src/index.css); headings use Georgia, the serif the app shows,
   and body text the system font. No web fonts, cookies, scripts or
   third-party requests. Retrograde's pages use /assets/site.css instead. */

:root {
  --bg: #f3efe8;                      /* the app's cream background */
  --surface: #fbf9f4;                 /* card / paper surface */
  --line: #e3ddd0;                    /* borders */
  --ink: #25221d;                     /* text (the symbol's ink line) */
  --muted: hsl(33 8% 38%);            /* secondary text */
  --primary: hsl(244 28% 43%);        /* indigo: links, buttons, accents */
  --primary-strong: hsl(244 30% 33%); /* hover */
  --lavender: #7672ac;                /* the symbol's second line */
  --tint: #ecebf4;                    /* soft lavender panel */
  --tint-line: #d9d6ea;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-strong); }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; z-index: 2; }

.wrap { max-width: 700px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 22px; height: 28px; flex: none; }
.brand .name { font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; letter-spacing: 0.005em; }

nav.site ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
nav.site a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
nav.site a:hover { background: var(--tint); }
nav.site a[aria-current="page"] { border-color: var(--tint-line); background: var(--tint); color: var(--primary-strong); }

/* Content */
main { padding: 40px 0 56px; }

.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--ink); }
h1 { font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.005em; }
h1 em { color: var(--primary); }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 44px 0 10px; scroll-margin-top: 16px; }
h3 { font-size: 1.12rem; line-height: 1.35; margin: 26px 0 6px; }

.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 18px; }
.updated { font-size: 0.875rem; color: var(--muted); margin: 0 0 8px; }
.muted { color: var(--muted); }

ul, ol { padding-left: 1.3rem; }
li { margin: 6px 0; }
strong { font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 20px 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.summary { background: var(--tint); border-color: var(--tint-line); }

.toc { font-size: 0.95rem; }
.toc ol { margin: 6px 0 0; columns: 2; column-gap: 28px; }
.toc li { margin: 4px 0; break-inside: avoid; }

table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; }
summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; padding: 11px 18px; min-height: 44px; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; flex: none; width: 1ch; color: var(--primary); font-weight: 600; }
details[open] > summary::before { content: "\2212"; }
summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 10px; }
details > :not(summary) { margin-left: 18px; margin-right: 18px; }
details > :last-child { margin-bottom: 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  border-radius: 999px; background: var(--primary); color: #fff; font-weight: 600; text-decoration: none;
}
.button:hover { background: var(--primary-strong); color: #fff; }
.button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.links { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; list-style: none; margin: 18px 0 0; }
.links a { display: inline-flex; align-items: center; min-height: 44px; }

.hero { padding: 16px 0 8px; }
.hero .mark-large { width: 34px; height: 44px; margin-bottom: 18px; }

footer.site { border-top: 1px solid var(--line); padding: 22px 0 40px; font-size: 0.9rem; color: var(--muted); }
footer.site p { margin: 6px 0; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--ink); }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  main { padding: 28px 0 44px; }
  h2 { margin-top: 36px; }
  .toc ol { columns: 1; }
  header.site .wrap { gap: 6px 12px; }
  .brand .name { font-size: 1.2rem; }
  nav.site ul { gap: 2px; }
  nav.site a { padding: 0 11px; }
  .card { padding: 16px; }
  th, td { padding: 9px 6px; }
}
