/* The one stylesheet of enlyzr.info. Pages carry no styles of their own and no scripts,
   so everything a page looks like is decided here. Colours are set once as variables,
   for light and for dark; an app's page takes its accent from a class the builder adds
   (see "Per-app accents" at the end of the built file). */

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef0f7;
    --text: #151a2d;
    --muted: #55607a;
    --line: #d9deea;
    --brand: #3949ab;
    --brand-strong: #283593;
    --accent: #3949ab;
    --on-accent: #ffffff;
    --good: #1b7f4b;
    --warn: #9a5b00;
    --shadow: 0 1px 2px rgba(20, 28, 60, .06), 0 8px 24px rgba(20, 28, 60, .07);
    --radius: 16px;
    --radius-s: 10px;
    --page: 1120px;
    --prose: 46rem;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c1020;
        --surface: #151a2e;
        --surface-2: #1c2340;
        --text: #eceffa;
        --muted: #a3acc6;
        --line: #2a3254;
        --brand: #8c9eff;
        --brand-strong: #b4bfff;
        --good: #6fd39c;
        --warn: #f2b867;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--page), 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

/* ---- Header and footer --------------------------------------------------------------- */

.site-header {
    position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { margin-left: auto; display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--brand); }

.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; background: var(--surface); }
.site-footer .wrap { padding-block: 2.5rem 1.5rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .8em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-note { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* ---- Buttons, badges, icons ---------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .78rem 1.25rem; border-radius: 999px; font-weight: 600; text-decoration: none;
    border: 1.5px solid transparent; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-off { background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: default; }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge-live { color: var(--good); }
.badge-soon { color: var(--warn); }

.icon { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon .dot { fill: currentColor; stroke: none; }
.btn .icon { width: 1.15em; height: 1.15em; }

/* ---- Home ---------------------------------------------------------------------------- */

.hero {
    background:
        radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 70%),
        radial-gradient(700px 380px at 0% 0%, color-mix(in srgb, #00b3a4 16%, transparent), transparent 70%);
    border-bottom: 1px solid var(--line);
}
.hero .wrap { padding-block: clamp(3rem, 8vw, 6rem); max-width: 54rem; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: .8rem; }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { max-width: 44rem; margin-bottom: 1.8rem; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

.app-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); list-style: none; margin: 0; padding: 0; }
.app-card {
    position: relative; display: flex; flex-direction: column; gap: .6rem; height: 100%;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.2rem; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.app-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.app-card-top { display: flex; gap: .9rem; align-items: center; }
.app-card h3 { margin: 0; font-size: 1.12rem; }
.app-card h3 a { color: var(--text); text-decoration: none; }
.app-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.app-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.app-card .badge { align-self: flex-start; margin-top: auto; }

.app-icon { width: 60px; height: 60px; border-radius: 22%; flex: none; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); background: var(--surface-2); }
.app-icon-lg { width: 112px; height: 112px; }
.app-icon-none {
    display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
}
.app-icon-lg.app-icon-none { font-size: 2.4rem; }

.values { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); list-style: none; padding: 0; margin: 0; }
.values li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.values .icon { width: 2rem; height: 2rem; color: var(--brand); margin-bottom: .6rem; }
.values h3 { margin-bottom: .3em; }
.values p { margin: 0; color: var(--muted); }

/* ---- App pages ----------------------------------------------------------------------- */

.app-hero {
    background:
        radial-gradient(800px 380px at 90% -20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--bg)), var(--bg));
    border-bottom: 1px solid var(--line);
}
.app-hero .wrap { display: grid; gap: 2.5rem; align-items: center; padding-block: clamp(2rem, 6vw, 4rem); grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
.app-hero-text .app-icon { margin-bottom: 1.1rem; }
.app-hero h1 { margin-bottom: .2em; }
.app-hero .tagline { font-size: 1.3rem; font-weight: 600; color: var(--accent); margin-bottom: .8rem; }
.app-hero .lead { color: var(--muted); font-size: 1.1rem; max-width: 36rem; }
.app-hero .btn-row { margin-top: 1.4rem; }
.app-hero-shot { justify-self: center; }
.app-hero-note { margin-top: .8rem; font-size: .92rem; color: var(--muted); }

.crumbs { font-size: .92rem; color: var(--muted); padding-top: 1.2rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--muted); }

.app-tabs { border-bottom: 1px solid var(--line); background: var(--surface); }
.app-tabs .wrap { display: flex; gap: .2rem; overflow-x: auto; }
.app-tabs a { padding: .85rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.app-tabs a:hover { color: var(--text); }
.app-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.facts { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); list-style: none; margin: 0; padding: 0; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .9rem 1rem; }
.facts .value { font-size: 1.5rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.facts .label { color: var(--muted); font-size: .9rem; }

.features { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); list-style: none; margin: 0; padding: 0; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.features .icon { width: 2.2rem; height: 2.2rem; color: var(--accent); margin-bottom: .7rem; }
.features h3 { margin-bottom: .35em; }
.features p { margin: 0; color: var(--muted); }

/* Screenshots: a row that scrolls sideways, each picture in a plain phone frame */
.shots { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .4rem .2rem 1.2rem; margin: 0; list-style: none; }
.shots li { flex: none; scroll-snap-align: center; width: min(260px, 70vw); }
.shots figure { margin: 0; }
.shots figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.phone { display: block; border-radius: 28px; border: 7px solid #10131f; background: #10131f; box-shadow: var(--shadow); overflow: hidden; }
.phone img { display: block; width: 100%; }
.app-hero-shot .phone { width: min(280px, 72vw); }

.split { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .2rem 1.1rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: .8rem 0; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: .8rem; }

.cta { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); color: var(--on-accent); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); display: grid; gap: 1rem; justify-items: start; }
.cta h2, .cta p { margin: 0; }
.cta .btn-primary { background: #fff; color: #151a2d; }
.cta .btn-off { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .35); }
.cta a:not(.btn) { color: #fff; }

.draft-note { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--surface); }

/* ---- Long texts: guides and policies -------------------------------------------------- */

.doc { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); padding-block: 2.5rem; align-items: start; }
.doc-single { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: 5rem; max-height: calc(100vh - 6.5rem); overflow: auto; font-size: .95rem; border-left: 2px solid var(--line); padding-left: 1rem; }
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--accent); }

.prose { max-width: var(--prose); min-width: 0; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; padding-top: .6em; border-top: 1px solid var(--line); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; }
.prose h4 { margin-top: 1.5em; font-size: 1.05rem; color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose li > ul, .prose li > ol { margin-top: .35em; margin-bottom: 0; }
.prose code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose img { border-radius: var(--radius-s); border: 1px solid var(--line); }
.prose blockquote { margin: 0 0 1.2em; padding: .9rem 1.1rem; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: var(--radius-s); }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
.prose th, .prose td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--surface-2); font-size: .88rem; }
.prose tbody tr:last-child td { border-bottom: 0; }
.doc-meta { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }
.doc-head { padding-block: 2rem 0; }
.doc-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.doc-head p { color: var(--muted); max-width: var(--prose); }
.doc-head-photo { display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap-reverse; }
.portrait { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); border: 4px solid var(--surface); flex: none; }
.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.link-list a { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--surface); font-size: .93rem; }

.notice { text-align: center; padding-block: clamp(3rem, 12vw, 7rem); }

@media (max-width: 860px) {
    .app-hero .wrap { grid-template-columns: minmax(0, 1fr); }
    .app-hero-shot { order: 2; }
    .doc { grid-template-columns: minmax(0, 1fr); }
    .toc { position: static; max-height: none; border-left: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
}

@media print {
    .site-header, .site-footer, .app-tabs, .toc, .btn-row, .cta { display: none; }
    body { background: #fff; color: #000; }
}

/* ---- Per-app accents, written by the builder from each app.json ---- */
.app-boxed-in { --accent: #3f51b5; --on-accent: #ffffff; }
.app-dualsum-sudoku { --accent: #2980b9; --on-accent: #ffffff; }
.app-renzoku { --accent: #16a085; --on-accent: #ffffff; }
.app-equation-of-everything { --accent: #0c8a70; --on-accent: #ffffff; }
.app-my-activity-tracker { --accent: #2f7fd1; --on-accent: #ffffff; }
.app-my-coach-works { --accent: #2e7d32; --on-accent: #ffffff; }
.app-my-disweight { --accent: #3e6837; --on-accent: #ffffff; }
.app-mdreader { --accent: #2b5f8a; --on-accent: #ffffff; }
.app-my-active-task { --accent: #7f67be; --on-accent: #ffffff; }
.app-my-chrono-works { --accent: #a26b00; --on-accent: #ffffff; }
.app-my-directors-cut { --accent: #6650a4; --on-accent: #ffffff; }
.app-my-fast-note { --accent: #9a6d00; --on-accent: #ffffff; }
.app-my-measure-works { --accent: #1b6a78; --on-accent: #ffffff; }
.app-my-reframe { --accent: #2e7d32; --on-accent: #ffffff; }
.app-sound-activity { --accent: #006781; --on-accent: #ffffff; }
.app-zrak { --accent: #6200ee; --on-accent: #ffffff; }
