/* zyepro.com: one stylesheet for every page. No web fonts, no scripts, no cookies.
   Light and dark follow the visitor's system setting (prefers-color-scheme). */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2420;
  --muted: #59645e;
  --border: #e2ded5;
  --accent: #0f766e;
  --accent-text: #ffffff;
  --link: #0b6a61;
  --mark-bg: #fff0a8;
  --mark-text: #3d3100;
  --draft-bg: #fff7e0;
  --draft-border: #d9a520;
  --shadow: 0 1px 2px rgba(20, 30, 25, 0.06), 0 4px 16px rgba(20, 30, 25, 0.05);
  --radius: 14px;
  --wide: 64rem;
  --narrow: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201d;
    --text: #e7e4dd;
    --muted: #a3ada7;
    --border: #2d3531;
    --accent: #5ec9b8;
    --accent-text: #0b1513;
    --link: #82d9cb;
    --mark-bg: #5c4b0e;
    --mark-text: #fff3c4;
    --draft-bg: #2a2410;
    --draft-border: #a5821f;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
p, ul, ol, table { margin: 0 0 1rem; }
li { margin: 0.3rem 0; }
code { font-size: 0.92em; overflow-wrap: anywhere; }

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

/* Layout */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: var(--narrow); }
main { display: block; padding: 2rem 0 4rem; overflow-wrap: break-word; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; }
.brand img { width: 30px; height: 30px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 1.5rem; padding-bottom: 2rem; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }

/* Home */
.hero { padding: 2rem 0 1rem; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 1rem; padding: 0; margin: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .links { margin-top: auto; padding-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-weight: 500; }
.card-head { display: flex; align-items: center; gap: 0.75rem; }
.app-icon { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.app-icon.text { display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 1.5rem; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); width: fit-content; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.panel > :last-child { margin-bottom: 0; }

/* Buttons */
.button { display: inline-block; background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; padding: 0.6rem 1.1rem; border-radius: 10px; }
.button:hover { filter: brightness(1.06); text-decoration: none; }

/* App pages */
.app-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-bottom: 1.5rem; }
.app-hero .app-icon { width: 88px; height: 88px; border-radius: 20px; }
.app-hero h1 { margin: 0; }
.app-hero p { margin: 0.25rem 0 0; color: var(--muted); }
.checks { list-style: none; padding: 0; }
.checks li::before { content: "\2714\FE0E"; color: var(--accent); margin-right: 0.5rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; padding: 0; margin: 0 0 1.5rem; list-style: none; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery figcaption { padding: 0.5rem 0.75rem; font-size: 0.95rem; color: var(--muted); }

/* Long text pages (privacy, terms, app policies) */
.doc h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.doc .meta { color: var(--muted); font-size: 0.95rem; }
.table-scroll { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }

/* Draft marking (remove these blocks before publishing) */
.draft-box { background: var(--draft-bg); border: 2px solid var(--draft-border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 0 0 2rem; }
.draft-box h2 { margin-top: 0; border: 0; }
.draft-box > :last-child { margin-bottom: 0; }
mark.confirm { background: var(--mark-bg); color: var(--mark-text); padding: 0 0.2em; border-radius: 3px; }

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-header, .site-footer, .skip { display: none; }
  body { background: #fff; color: #000; }
}
