/* getgrepp.app. Colours and shapes from the app (LiftLog/Theme.swift, Shared/Brand.swift):
   ivory by day, warm charcoal by night, one terracotta accent, green for a lift going up and
   amber for one that has stopped. Serif titles (Apple's New York where the browser has it,
   Newsreader elsewhere), a clean sans, rounded figures, and the log itself in monospace.
   Fonts self-hosted, SIL Open Font License (fonts/OFL.txt). Motion is decoration only. */

@font-face { font-family: "Newsreader"; src: url(fonts/newsreader.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-italic.woff2) format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Roboto Mono"; src: url(fonts/roboto-mono.woff2) format("woff2"); font-weight: 100 700; font-display: swap; }

:root {
  --accent: #c6613f;          /* Brand.accent */
  --accent-soft: #df7d58;     /* Theme.accentSoft */
  --on-accent: #ffffff;

  --ground: #faf9f5;          /* Theme.ground */
  --surface: #ffffff;         /* Theme.surface */
  --raised: #f0eee6;          /* Theme.raised */
  --rule: #e3e1da;            /* Theme.rule */
  --ink: #262624;
  --dim: #73726c;             /* Theme.dim */
  --progress: #29804d;        /* Theme.progressing */
  --stall: #cc8c1a;           /* Theme.stalled */
  --warning: #8f5400;         /* Theme.warning */
  --accent-ink: #a8502f;      /* terracotta deep enough for small text on ivory */
  --shadow: 0 1px 2px rgba(38, 38, 36, .05), 0 12px 32px -12px rgba(38, 38, 36, .16);
  --shadow-phone: 0 2px 6px rgba(38, 38, 36, .08), 0 40px 80px -24px rgba(38, 38, 36, .35);

  /* The dark band: the app's charcoal, the same in both themes. */
  --band: #262624;
  --band-2: #30302e;
  --band-ink: #faf9f5;
  --band-dim: #a6a39a;
  --band-rule: #444340;

  --font-serif: ui-serif, "New York", "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "DM Sans", -apple-system, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --corner: 20px;             /* Theme.corner */
  --tile: 14px;               /* Theme.tileCorner */
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #262624; --surface: #30302e; --raised: #3b3b38; --rule: #444340;
    --ink: #faf9f5; --dim: #a6a39a; --progress: #5cb87a; --warning: #f0b04a;
    --accent-ink: #e98a66;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
    --shadow-phone: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -24px rgba(0, 0, 0, .7);
    --band: #1c1c1a; --band-2: #262624;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #262624; --surface: #30302e; --raised: #3b3b38; --rule: #444340;
  --ink: #faf9f5; --dim: #a6a39a; --progress: #5cb87a; --warning: #f0b04a;
  --accent-ink: #e98a66;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
  --shadow-phone: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -24px rgba(0, 0, 0, .7);
  --band: #1c1c1a; --band-2: #262624;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h3 { font-family: var(--font-sans); font-weight: 650; font-size: 1.0625rem; letter-spacing: 0; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--raised); padding: .1em .35em; border-radius: .35em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--surface); padding: .5rem 1rem; border-radius: var(--tile); }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.num { font-family: var(--font-round); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3rem; padding: .75rem 1.375rem; border-radius: var(--tile); font: 600 1rem/1.15 var(--font-sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, border-color .2s; }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }
.btn small { display: block; font-weight: 400; font-size: .8rem; opacity: .8; }
.btn .i { width: 1.25rem; height: 1.25rem; flex: none; }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 28px -12px rgba(198, 97, 63, .8); }
.btn-accent:hover { background: #d06a47; }
.btn-raised { background: var(--raised); color: var(--ink); }
.btn-raised:hover { border-color: var(--rule); }
.btn-band { background: rgba(250, 249, 245, .08); color: var(--band-ink); border-color: var(--band-rule); }
.btn-band:hover { border-color: var(--band-dim); }
.btn-small { min-height: 2.25rem; padding: .4rem .9rem; font-size: .9375rem; }
.textlink { color: var(--accent-ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ground) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 500 1.45rem/1 var(--font-serif); letter-spacing: -.01em; }
.brand img { width: 46px; height: auto; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a:not(.btn) { text-decoration: none; padding: .5rem .7rem; border-radius: 10px; font-size: .9375rem; color: var(--dim); }
.nav a:not(.btn):hover { color: var(--ink); background: var(--raised); }
.theme-toggle { width: 2.25rem; height: 2.25rem; border-radius: 10px; border: 0; background: transparent; color: var(--dim); font-size: 1.05rem; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--raised); }
@media (max-width: 760px) { .nav .wide { display: none; } }

/* ---------- eyebrow (the app's small all-caps label) ---------- */
.eyebrow { display: inline-block; font: 650 .72rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1rem; }
.band .eyebrow { color: var(--accent-soft); }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
.hero h1 em { font-style: italic; color: var(--accent-ink); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--dim); max-width: 36rem; margin-top: 1.25rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: 1.6rem; color: var(--dim); font-size: .9rem; padding: 0; list-style: none; }
.hero-meta li::before { content: ""; display: inline-block; width: .42rem; height: .42rem; border-radius: 50%; background: var(--progress); margin-right: .5rem; vertical-align: .12em; }
.hero-art { position: relative; justify-self: center; width: min(100%, 22rem); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { margin-top: 1rem; }
}

/* ---------- phone ---------- */
.phone { position: relative; border-radius: 3rem; padding: .55rem; background: #121211; box-shadow: var(--shadow-phone); }
.phone img { border-radius: 2.5rem; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; background: var(--surface); }
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; }

/* A line of the log floating by the phone, as it lands in the file. */
.landing { position: absolute; left: -2.5rem; bottom: 18%; z-index: 2; background: var(--surface); border-radius: var(--tile); box-shadow: var(--shadow); padding: .75rem .95rem; font: 500 .8rem/1.4 var(--font-mono); white-space: nowrap; border: 1px solid var(--rule); }
.landing .file { display: block; font: 650 .64rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: .45rem; }
.landing .file::before { content: "● "; color: var(--progress); }
.landing-b { left: auto; right: -2.25rem; bottom: auto; top: 12%; }
@media (max-width: 520px) { .landing { left: -.25rem; } .landing-b { right: -.25rem; } }

/* ---------- the log's own syntax ---------- */
.d { color: var(--dim); }
.x { color: var(--ink); font-weight: 600; }
.s { color: var(--accent-ink); }

/* ---------- sections ---------- */
.section { padding: var(--section) 0; }
.section-alt { background: var(--raised); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }

/* ---------- the file ---------- */
.file-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .file-grid { grid-template-columns: 1fr; } }
.editor { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--corner); box-shadow: var(--shadow); overflow: hidden; }
.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--rule); font: 600 .8rem/1 var(--font-sans); color: var(--dim); }
.editor-bar .dots { display: flex; gap: .35rem; }
.editor-bar .dots i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--rule); }
.editor pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; font: 400 .9rem/1.75 var(--font-mono); overflow-x: auto; }
.points { display: grid; gap: 1.4rem; margin: 0; padding: 0; list-style: none; }
.points li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .9rem; }
.points p { color: var(--dim); margin-top: .2rem; font-size: .98rem; }
.badge { width: 2.25rem; height: 2.25rem; border-radius: calc(2.25rem * .28); display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.badge svg { width: 1.1rem; height: 1.1rem; }

/* ---------- try the format ---------- */
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (max-width: 860px) { .try { grid-template-columns: 1fr; } }
.try textarea { width: 100%; min-height: 17rem; resize: vertical; border: 1px solid var(--rule); border-radius: var(--corner); background: var(--surface); color: var(--ink); font: 400 .9rem/1.75 var(--font-mono); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.try-out { display: grid; gap: .75rem; align-content: start; }
.lift { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--tile); padding: .85rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center; box-shadow: var(--shadow); }
.lift .name { font-weight: 650; }
.lift .meta { color: var(--dim); font-size: .85rem; grid-column: 1; }
.lift .e1rm { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.lift .e1rm b { display: block; font: 700 1.6rem/1 var(--font-round); font-variant-numeric: tabular-nums; }
.lift .e1rm small { color: var(--dim); font-size: .72rem; }
.lift svg { grid-column: 1 / -1; width: 100%; height: 34px; margin-top: .35rem; }
.lift.up .e1rm b { color: var(--progress); }
.lift.flat .e1rm b { color: var(--stall); }
.held { border-radius: var(--tile); padding: .75rem 1rem; background: color-mix(in srgb, var(--stall) 14%, transparent); color: var(--warning); font-size: .88rem; }
.held code { background: transparent; padding: 0; }
.try-note { color: var(--dim); font-size: .85rem; }

/* ---------- band (dark, the app's charcoal) ---------- */
.band { background: var(--band); color: var(--band-ink); }
.band .lead { color: var(--band-dim); }
.band code { background: var(--band-2); color: var(--band-ink); }
.coach-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 860px) { .coach-grid { grid-template-columns: 1fr; } .coach-grid .hero-art { order: 2; } }
.models { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.models li { padding: .4rem .8rem; border-radius: 999px; background: var(--band-2); border: 1px solid var(--band-rule); font-size: .85rem; color: var(--band-dim); }
.models li b { color: var(--band-ink); font-weight: 600; }
.coach-points { display: grid; gap: 1.1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.coach-points li { padding-left: 1.4rem; position: relative; color: var(--band-dim); }
.coach-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; border-radius: 2px; background: var(--accent-soft); }
.coach-points b { color: var(--band-ink); font-weight: 600; }

/* ---------- features ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.cell { grid-column: span 2; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--corner); padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .55rem; }
.cell.wide { grid-column: span 3; }
.cell p { color: var(--dim); font-size: .97rem; }
.cell .badge { margin-bottom: .4rem; }
@media (max-width: 960px) { .cell, .cell.wide { grid-column: span 3; } }
@media (max-width: 620px) { .cell, .cell.wide { grid-column: 1 / -1; } }
.plates { display: flex; align-items: center; gap: 3px; margin-top: auto; padding-top: .8rem; }
.plates i { display: block; width: 10px; border-radius: 3px; }
.plates .bar { width: 46px; height: 6px; border-radius: 3px; background: var(--dim); opacity: .5; }
.plates span { margin-left: .6rem; font: 500 .82rem var(--font-mono); color: var(--dim); }
.rest { margin-top: auto; padding-top: .8rem; }
.rest-card { display: flex; align-items: center; gap: .9rem; background: var(--band); color: var(--band-ink); border-radius: var(--tile); padding: .8rem 1rem; }
.rest-card .clock { font: 700 1.45rem/1 var(--font-round); font-variant-numeric: tabular-nums; color: var(--progress); }
.rest-card .what { font-size: .8rem; color: var(--band-dim); line-height: 1.35; }
.rest-card .what b { color: var(--band-ink); }
.rest-card .go { margin-left: auto; background: var(--accent); color: #fff; border-radius: 10px; padding: .4rem .7rem; font: 600 .8rem var(--font-sans); white-space: nowrap; }
.verdicts { margin-top: auto; padding-top: .8rem; display: grid; gap: .4rem; font-size: .88rem; }
.verdicts div { display: flex; align-items: center; gap: .55rem; }
.verdicts i { width: .55rem; height: .55rem; border-radius: 50%; flex: none; }
.files { margin-top: auto; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.files span { font: 500 .78rem var(--font-mono); padding: .3rem .55rem; border-radius: 8px; background: var(--raised); }

/* ---------- screens ---------- */
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.75rem, 2vw, 1.5rem); }
.screens figure { margin: 0; }
.screens .phone { border-radius: 2.2rem; padding: .4rem; }
.screens .phone img { border-radius: 1.85rem; }
.screens figcaption { margin-top: .9rem; text-align: center; font-size: .9rem; color: var(--dim); }
.screens figcaption b { display: block; color: var(--ink); font-weight: 650; }
@media (max-width: 860px) {
  .screens { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .screens figure { scroll-snap-align: center; }
}

/* ---------- privacy ---------- */
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split article { padding: 1.5rem; border-radius: var(--corner); background: var(--surface); border: 1px solid var(--rule); }
.split p { color: var(--dim); margin-top: .5rem; font-size: .97rem; }

/* ---------- closing ---------- */
.closing { padding: var(--section) 0 2.5rem; }
.closing .section-head { margin-bottom: 3.5rem; }
.closing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding-top: 2.5rem; border-top: 1px solid var(--band-rule); }
.closing-grid h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--band-dim); margin-bottom: .75rem; }
.closing-grid a { display: block; text-decoration: none; padding: .2rem 0; color: var(--band-ink); }
.closing-grid a:hover { color: var(--accent-soft); }
@media (max-width: 620px) { .closing-grid { grid-template-columns: 1fr; } }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.5rem; font-size: .85rem; color: var(--band-dim); }

/* ---------- text pages (privacy, support) ---------- */
.page { padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--section); }
.prose { max-width: 42rem; }
.prose h1 { font-size: clamp(2.3rem, 5vw, 3.3rem); margin-bottom: .75rem; }
.prose h2 { font-size: 1.6rem; margin: 2.5rem 0 .75rem; }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose .updated { color: var(--dim); font-style: italic; font-family: var(--font-serif); }
.prose a { color: var(--accent-ink); }
.qa { border-top: 1px solid var(--rule); padding: 1.25rem 0; }
.qa h3 { margin-bottom: .4rem; }
.qa p { color: var(--dim); margin: 0; }
.page-foot { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; color: var(--dim); font-size: .9rem; }
.page-foot .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.page-foot a { color: inherit; }

/* ---------- reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* Grid and flex children shrink below their content (a long log line scrolls in its own box). */
.hero-grid > *, .file-grid > *, .try > *, .coach-grid > *, .bento > *, .split > *, .closing-grid > * { min-width: 0; }
@media (max-width: 520px) {
  .cta-row .btn { flex: 1 1 100%; justify-content: flex-start; }
  .landing { font-size: .72rem; }
  .site-header .btn-small { padding-inline: .7rem; }
}
