/* LU9 pages on lu7.me. Local only: no fonts, scripts or images from other sites.
   Colours come from the app's Ink theme (App/Design/Theme.swift) and from lu7.me.
   Type follows the app: what the puzzle prints is serif, the interface is the system face. */

:root {
  color-scheme: light dark;

  /* Ink, light (the app's default theme) */
  --paper: #f7f5f0;
  --surface: #ffffff;
  --raised: #efece5;
  --ink: #1e1d1b;
  --ink-2: #625e57;
  --accent: #2f4bc7;
  --tint: #e3e8fb;
  --line: #d9d5cc;
  --line-strong: #2b2a28;
  --shadow: 0 28px 60px -30px rgba(30, 29, 27, 0.45), 0 2px 6px rgba(30, 29, 27, 0.06);

  /* lu7.me */
  --lu7-bg: #131311;
  --lu7-ink: #f2daa5;
  --lu7-gold: #e5cc97;
  --lu7-purple: #541c77;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;

  --gutter: 16px;
  --measure: 68ch;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Ink, dark, on lu7.me's own black */
    --paper: #131311;
    --surface: #1c1c1a;
    --raised: #292926;
    --ink: #edeae3;
    --ink-2: #a39e93;
    --accent: #9fb2ff;
    --tint: #262d50;
    --line: #34332f;
    --line-strong: #a8a49b;
    --shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.85), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--surface); color: var(--ink);
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* A faint glow at the top, as on the lu7.me home page. Dark only. */
.glow {
  position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .glow {
    background:
      radial-gradient(520px 360px at 18% 0%, rgba(122, 47, 176, 0.30), transparent 70%),
      radial-gradient(420px 300px at 88% 8%, rgba(229, 204, 151, 0.07), transparent 70%);
  }
}

/* ---------- Top bar ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 16px;
}

.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 10px;
}
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before {
  content: "/"; color: var(--ink-2); font-size: 15px;
}
.crumbs a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.crumbs a:hover { text-decoration: underline; }

/* The way back to lu7.me wears lu7.me's colours. */
.crumbs a.lu7 {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--lu7-bg); color: var(--lu7-ink);
  border: 1px solid rgba(229, 204, 151, 0.28);
  font-weight: 500;
}
.crumbs a.lu7:hover { text-decoration: none; border-color: rgba(229, 204, 151, 0.6); }
/* The icon has lu7.me's own black behind the 7, so the chip keeps that black in both schemes. */
.crumbs a.lu7 img { width: 22px; height: 22px; border-radius: 5px; }

.pages { display: flex; gap: 4px; }
.pages a {
  color: var(--ink); text-decoration: none; font-size: 15px;
  padding: 8px 10px; border-radius: 8px;
}
.pages a:hover { background: var(--raised); }
.pages a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(30px, 6vw, 44px); line-height: 1.1; }
h3 { font-size: 21px; line-height: 1.25; }
p { margin: 0; }

/* ---------- Landing: hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding-top: 28px;
  padding-bottom: 64px;
}

.app-icon {
  width: 96px; height: 96px;
  border-radius: 22.5%;
  box-shadow: 0 12px 28px -12px rgba(30, 29, 27, 0.45), 0 0 0 1px rgba(30, 29, 27, 0.08);
}
@media (prefers-color-scheme: dark) {
  .app-icon { box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08); }
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(76px, 21vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.hero .subtitle {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(23px, 5.4vw, 32px);
  line-height: 1.2;
}

.hero .lede {
  margin-top: 18px;
  max-width: 34em;
  color: var(--ink-2);
  font-size: 18px;
}

/* Not a link yet: the app is not on the App Store. */
.soon {
  margin-top: 32px;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 12px 20px 12px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  line-height: 1.25;
}
.soon svg { width: 22px; height: 34px; flex: none; color: var(--ink-2); }
.soon-text { display: block; }
.soon strong { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
.soon-device { display: block; font-size: 14px; color: var(--ink-2); }

.hero-shot { margin: 0; }
.hero-shot img {
  width: min(100%, 330px);
  margin: 0 auto;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 56px;
    padding-top: 56px;
    padding-bottom: 104px;
  }
  .app-icon { width: 112px; height: 112px; }
  .hero-shot img { width: min(100%, 360px); }
}

/* ---------- Landing: sections ---------- */

.band { padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--line); }
@media (min-width: 880px) { .band { padding-top: 96px; padding-bottom: 96px; } }

.band .intro { margin-top: 16px; max-width: 36em; color: var(--ink-2); font-size: 18px; }
p { text-wrap: pretty; }

/* No forced ads */
.never {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(21px, 4.6vw, 27px);
  line-height: 1.35;
  max-width: 30em;
}

.choices {
  margin-top: 40px;
  display: grid; gap: 16px;
}
.choice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
}
.choice p { margin-top: 10px; color: var(--ink-2); }
.choice .button-name { color: var(--ink); font-weight: 600; white-space: nowrap; }
@media (min-width: 760px) {
  .choices { grid-template-columns: 1fr 1fr; gap: 24px; }
  .choice { padding: 28px 30px 30px; }
}

/* Screenshots */
.shots {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 640px;
}

/* The ads text and the two screenshots: stacked, side by side on wide screens. */
.ads-layout { display: grid; gap: 48px; }
@media (min-width: 1000px) {
  .ads-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    gap: 72px;
    align-items: center;
  }
  .ads-layout .choices { grid-template-columns: 1fr; gap: 16px; }
}
.shots img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .shots { gap: 32px; }
  .shots img { border-radius: 26px; }
}

/* What's inside: one box of nine cells, drawn like a box on the board. */
.box {
  list-style: none;
  margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.box li { padding: 22px 22px 24px; }
.box li + li { border-top: 1px solid var(--line); }
.box p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }

@media (min-width: 760px) {
  .box { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .box li { padding: 28px 26px 30px; }
  .box li + li { border-top: 0; }
  .box li:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .box li:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); }
}

/* Privacy in brief */
.brief {
  margin: 28px 0 0; padding: 0; list-style: none;
  display: grid; gap: 12px;
  max-width: 40em;
}
.brief li { padding-left: 28px; position: relative; }
.brief li::before {
  content: ""; position: absolute; left: 4px; top: 0.55em;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent);
}
.more { margin-top: 28px; font-weight: 600; }

/* ---------- Document pages: privacy, support ---------- */

.doc { padding-top: 32px; padding-bottom: 80px; }
.doc > * { max-width: var(--measure); }
.doc h1 { font-size: clamp(38px, 9vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.doc .meta { margin-top: 12px; color: var(--ink-2); }
.doc .lead { margin-top: 20px; font-size: 19px; }
.doc h2 {
  margin-top: 56px;
  font-size: clamp(25px, 5vw, 31px);
  line-height: 1.2;
}
.doc h3 { margin-top: 32px; font-size: 20px; }
.doc p, .doc ul, .doc dl { margin-top: 14px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc strong { font-weight: 600; }

.doc dl.records { border-top: 1px solid var(--line); }
.records > div {
  display: grid; gap: 2px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.records dt { font-weight: 600; }
.records dd { margin: 0; color: var(--ink-2); }
@media (min-width: 640px) {
  .records > div { grid-template-columns: 15em minmax(0, 1fr); }
}

.path { font-weight: 600; white-space: nowrap; }

.doc h2[id] { scroll-margin-top: 24px; }

/* Privacy: "On this page", beside the text on wide screens only. */
.toc { display: none; }
@media (min-width: 1040px) {
  .doc-split {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) 230px;
    justify-content: space-between;
    gap: 64px;
  }
  .toc {
    display: block;
    position: sticky; top: 24px; align-self: start;
    margin-top: 128px;
    font-size: 15px;
  }
  .toc .toc-title { margin: 0; font-weight: 600; color: var(--ink); }
  .toc ol { list-style: none; margin: 10px 0 0; padding: 0; border-left: 1px solid var(--line); }
  .toc li + li { margin-top: 0; }
  .toc a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; }
  .toc a:hover { color: var(--accent); }
}

/* Support: the contact card */
.contact {
  margin-top: 32px;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 24px 22px 26px;
}
.contact h2 { margin-top: 0; }
.contact .mail {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 600;
  line-height: 1.2;
}
.contact ul { margin-top: 10px; }
@media (min-width: 720px) { .contact { padding: 32px 34px 34px; } }

.faq h3 { margin-top: 40px; }
.faq h3 + p { margin-top: 10px; }

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding-top: 32px; padding-bottom: 48px;
  display: grid; gap: 14px;
  color: var(--ink-2);
  font-size: 15px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 6px; }
.foot p + p { margin-top: 6px; }
.foot nav a { color: var(--ink); }
.foot .maker { color: var(--ink); }
@media (min-width: 760px) {
  .foot { grid-template-columns: 1fr auto; align-items: start; }
  .foot > div:last-child { text-align: right; }
  .foot nav { justify-content: flex-end; }
}
