/* Pagegloss website · pagegloss.dev
   System fonts only; no external resources. Light is the default, dark follows the
   system unless the viewer chooses; theme.js sets data-theme on <html>. */

:root {
  --bg: #ffffff;
  --fg: #17201b;
  --muted: #5d6861;
  --line: #e5e8e3;
  --card: #f4f6f3;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --tint: #eaf2ec;
  --deep: #1d5d52;
  --deep2: #174a42;
  --ivory: #f6f1e4;
  --ivory-muted: rgba(246, 241, 228, .72);
  --amber: #f0b93b;
  --mark: #f3dd8f;
  --page: #f3f4f1;
  --shadow: 0 24px 60px rgba(23, 74, 66, .25);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121513;
    --fg: #e9ece9;
    --muted: #a3aba6;
    --line: #282d2a;
    --card: #1a1e1b;
    --accent: #7fc4a0;
    --accent-ink: #0f1a14;
    --tint: #1d2a22;
    --deep: #163f38;
    --deep2: #10302b;
    --ivory: #f1ece0;
    --ivory-muted: rgba(241, 236, 224, .7);
    --amber: #e8b43a;
    --mark: #8a7430;
    --page: #1f2320;
    --shadow: 0 24px 60px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121513;
  --fg: #e9ece9;
  --muted: #a3aba6;
  --line: #282d2a;
  --card: #1a1e1b;
  --accent: #7fc4a0;
  --accent-ink: #0f1a14;
  --tint: #1d2a22;
  --deep: #163f38;
  --deep2: #10302b;
  --ivory: #f1ece0;
  --ivory-muted: rgba(241, 236, 224, .7);
  --amber: #e8b43a;
  --mark: #8a7430;
  --page: #1f2320;
  --shadow: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, ul { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sheet :focus-visible { outline-color: var(--ivory); }

/* ---------- header ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 28px; max-width: 1120px; margin: 0 auto; position: relative;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px;
  letter-spacing: -.01em; text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a[aria-current="page"] { color: var(--accent); }
.nav nav a:hover { color: var(--fg); }

/* the Light / Dark switch; hidden until theme.js runs, so the page still works without it */
.theme { display: none; }
html.js .theme { display: inline-flex; }
.theme {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px;
}
.theme button {
  padding: 4px 11px; border-radius: 999px; font-size: 13px; color: var(--muted); line-height: 1.5;
}
.theme button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- green sheet (home hero) ---------- */
.sheet {
  background: linear-gradient(170deg, var(--deep) 0%, var(--deep2) 100%);
  color: var(--ivory); position: relative; overflow: hidden;
}
.sheet .brand { color: var(--ivory); }
.sheet .brand img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.sheet .nav nav a { color: var(--ivory-muted); }
.sheet .nav nav a:hover { color: var(--ivory); }
.sheet .theme { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.sheet .theme button { color: var(--ivory-muted); }
.sheet .theme button[aria-pressed="true"] { background: var(--ivory); color: var(--deep2); }

.hero {
  max-width: 1120px; margin: 0 auto; padding: 36px 28px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: end;
}
.hero .copy { padding-bottom: 64px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  letter-spacing: .04em; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--ivory);
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 68px); font-weight: 700; letter-spacing: -.03em; line-height: 1.0; margin-top: 22px;
}
.hero h1 span { color: var(--amber); }
.lede { font-size: 19px; line-height: 1.5; color: var(--ivory-muted); margin-top: 18px; max-width: 44ch; }
.cta { display: flex; gap: 12px; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.pill.solid { background: var(--ivory); color: var(--deep2); }
.pill.ghost { border: 1px solid rgba(255, 255, 255, .3); color: var(--ivory); }
.fine { font-size: 13.5px; color: var(--ivory-muted); margin-top: 14px; }

/* ---------- the hold-a-word demo ---------- */
.demo {
  position: relative; border-radius: 22px 22px 0 0; background: #f3f4f1; border: 1px solid #e5e8e3; border-bottom: 0;
  padding: 34px 34px 0; overflow: hidden; min-width: 0; box-shadow: 0 -10px 60px rgba(0, 0, 0, .25);
  /* the demo is a picture of the iPad's light reading surface, so its colours are fixed in both themes */
  --d-fg: #17201b; --d-muted: #5d6861; --d-line: #e5e8e3; --d-accent: #2f6b4f; --d-mark: #f3dd8f; --d-tint: #eaf2ec;
  color: var(--d-fg);
}
.demo .book { font-family: var(--serif); font-size: 17.5px; line-height: 1.6; max-width: 60ch; }
.demo .book .ch {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--d-muted);
  display: block; text-align: center; margin-bottom: 14px;
}
.demo .held { position: relative; background: var(--d-mark); border-radius: 3px; padding: 0 2px; white-space: nowrap; }
.demo .finger {
  position: absolute; left: 50%; top: 60%; width: 34px; height: 34px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 2px solid var(--d-accent); opacity: .55; pointer-events: none;
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring {
  0% { transform: translate(-50%, -50%) scale(.55); opacity: .8; }
  70% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
  100% { opacity: 0; }
}
.demo .panel {
  margin: 26px -8px 0; background: #ffffff; border: 1px solid var(--d-line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 14px 22px 22px; box-shadow: 0 -8px 40px rgba(23, 74, 66, .12);
  font-family: var(--sans);
}
.demo .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--d-line); margin: 0 auto 12px; }
.demo .ptitle { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.demo .ptitle b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.demo .ipa { font-family: var(--mono); font-size: 14px; color: var(--d-muted); }
.demo .psub { font-size: 13px; color: var(--d-muted); margin-top: 2px; }
.demo .lang {
  margin-top: 12px; display: flex; align-items: center; justify-content: space-between;
  background: var(--d-tint); color: var(--d-accent); border-radius: 12px; padding: 10px 14px; font-weight: 500; font-size: 15px;
}
.demo .ready { font-size: 12.5px; color: var(--d-muted); margin-top: 6px; }
.demo .segc { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; background: var(--d-tint); border-radius: 999px; padding: 3px; }
.demo .segc span { text-align: center; padding: 9px 0; border-radius: 999px; font-weight: 500; font-size: 15px; }
.demo .segc span.on { background: var(--d-accent); color: #ffffff; }
.demo .tr { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--d-line); }
.demo .tr small { display: block; font-size: 12.5px; color: var(--d-muted); }
.demo .tr .out { font-size: 21px; margin-top: 2px; }
.demo .acts { display: flex; gap: 18px; margin-top: 12px; font-size: 14.5px; color: var(--d-accent); font-weight: 500; flex-wrap: wrap; }

/* ---------- home sections ---------- */
.bar {
  max-width: 1120px; margin: 0 auto; padding: 26px 28px 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px;
}
.bar div { padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.bar b { display: block; font-size: 15px; font-weight: 600; }
.bar span { font-size: 14px; color: var(--muted); }

.sect { max-width: 1120px; margin: 0 auto; padding: 72px 28px 0; }
.kicker { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; max-width: 22ch; }
.sub { color: var(--muted); font-size: 17px; max-width: 58ch; margin-top: 12px; }

.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.tile {
  grid-column: span 3; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  padding: 26px 26px 0; overflow: hidden; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.tile.wide { grid-column: span 6; }
.tile.third { grid-column: span 2; }
.tile h3 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.tile p { color: var(--muted); font-size: 15.5px; max-width: 52ch; }
.tile.wide .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; align-items: end; }
.tile .pad { padding-bottom: 26px; }

.shot { border-radius: 14px 14px 0 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; background: var(--page); min-width: 0; margin-top: auto; }
.shot img { width: 100%; height: auto; }
.shot.crop { aspect-ratio: 4 / 3.3; }
.shot.crop img { height: 100%; object-fit: cover; object-position: 50% 100%; }
.shot.crop.top { aspect-ratio: 16 / 10.5; }
.shot.crop.top img { object-position: 50% 0; }

.marks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.marks span { font-size: 14px; padding: 6px 11px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.marks .hl { background: var(--mark); border-color: transparent; }
.marks .ul { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.marks .st { text-decoration: line-through; }
.marks .pen { font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; color: var(--accent); }
.svc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.svc span { font-size: 13.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); }
.svc span.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.langs { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 28px; align-items: center; }
.langs h3 { font-size: 26px; font-weight: 600; letter-spacing: -.015em; }
.langs p { color: var(--muted); margin-top: 8px; font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.chips span.more { color: var(--muted); border-style: dashed; }

.privacy { max-width: 1120px; margin: 76px auto 0; padding: 0 28px; }
.privacy-card {
  border-radius: 24px; background: var(--card); border: 1px solid var(--line); padding: 44px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center;
}
.privacy-card h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; }
.privacy-card p { color: var(--muted); margin-top: 14px; font-size: 16.5px; max-width: 44ch; }
.privacy-card a { color: var(--accent); }
.flow { display: grid; gap: 10px; padding: 0; list-style: none; }
.flow li {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 14px 16px;
  border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-size: 15px;
}
.flow .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--deep); color: var(--ivory); }
.flow .ic svg { width: 18px; height: 18px; }
.flow b { display: block; font-weight: 600; }
.flow span { color: var(--muted); font-size: 14px; }

/* ---------- footer ---------- */
.foot { background: var(--deep2); color: var(--ivory-muted); margin-top: 72px; }
.foot-in {
  max-width: 1120px; margin: 0 auto; padding: 36px 28px 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14.5px;
}
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--ivory); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .mail { font-family: var(--mono); font-size: 13.5px; color: var(--ivory); user-select: all; }

/* ---------- document pages (/support, /privacy) ---------- */
.doc-page .nav { border-bottom: 1px solid var(--line); }
.doc { max-width: 720px; margin: 0 auto; padding: 40px 28px 56px; }
.doc h1 { font-family: var(--serif); font-weight: 500; font-size: 42px; letter-spacing: -.02em; line-height: 1.1; }
.doc .lede { font-size: 17px; color: var(--muted); margin-top: 12px; }
.doc h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -.01em; margin-top: 38px; }
.doc h3 { font-size: 16.5px; font-weight: 600; margin-top: 20px; }
.doc p { color: var(--muted); margin-top: 6px; font-size: 16px; }
.doc p strong { color: var(--fg); }
.doc a { color: var(--accent); }
.doc ul { margin-top: 10px; padding-left: 1.2rem; display: grid; gap: 10px; color: var(--muted); font-size: 16px; }
.doc ul strong { color: var(--fg); }
.doc .card { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.doc .card p { color: var(--fg); }
.doc .card p + p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.doc .email { font-family: var(--mono); font-weight: 600; color: var(--accent); font-size: 15.5px; user-select: all; }
.doc .short { margin-top: 24px; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 12px 12px 0; }
.doc .short p { color: var(--fg); margin-top: 0; }
.doc .toc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.doc .toc a { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.doc .toc a:hover { color: var(--accent); }
.doc-page .foot { margin-top: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .privacy-card, .langs, .tile.wide .row { grid-template-columns: 1fr; }
  .hero .copy { padding-bottom: 8px; }
  .tile, .tile.third { grid-column: span 6; }
  .nav, .hero, .sect, .privacy, .foot-in, .doc, .bar { padding-left: 18px; padding-right: 18px; }
  .demo { padding: 24px 20px 0; }
  .privacy-card { padding: 28px 22px; }
}
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: 12px 16px; padding-top: 16px; padding-bottom: 14px; }
  .nav nav { flex-basis: 100%; justify-content: space-between; gap: 14px; font-size: 14px; }
  .nav nav .theme { margin-left: auto; }
  .nav .cta-sm { display: none; }
  .demo .ptitle b { font-size: 20px; }
  .doc h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo .finger { animation: none; opacity: .5; }
}
