/* The help of the app (help.html, js/help.js). Self-contained: no styles of the app; the privacy topic, read from
   privacy.html, uses the same classes as that page (.meta, .summary, section). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { color-scheme: dark; --muted: hsl(0 0% 70%); --accent: hsl(260 80% 75%); --vi: hsl(280 90% 82%);
        --line: hsl(0 0% 100% / .08); --card: hsl(0 0% 100% / .04); }
body {
  min-height: 100vh; padding: 0 16px 48px; font-family: 'Outfit', system-ui, sans-serif; color: hsl(0 0% 92%);
  line-height: 1.6; overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, hsl(260 70% 20% / .5), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, hsl(175 70% 15% / .4), transparent 60%),
    hsl(225 22% 8%);
  background-attachment: fixed;
}
main { max-width: 720px; margin: 0 auto; }
[hidden] { display: none !important; }
a { color: var(--accent); }
b { color: #fff; font-weight: 600; }

/* ── Header (back to the homepage, as on the game page) and navigation, built by js/help.js ── */
.help-top { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; max-width: 720px; margin: 0 auto; }
.icon-btn { background: hsl(0 0% 100% / .06); border: 1px solid hsl(0 0% 100% / .1); border-radius: 50%; width: 38px; height: 38px;
            display: flex; align-items: center; justify-content: center; color: hsl(0 0% 65%); text-decoration: none; flex-shrink: 0;
            transition: all .25s cubic-bezier(.4, 0, .2, 1); }
.icon-btn:hover, .icon-btn:focus-visible { background: hsl(0 0% 100% / .12); color: #fff; transform: scale(1.08); border-color: hsl(0 0% 100% / .2); outline: none; }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 20px; height: 20px; }
.help-title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 5vw, 1.8rem); line-height: 1.2;
              background: linear-gradient(135deg, #fff 15%, hsl(260 80% 75%) 85%); -webkit-background-clip: text; background-clip: text;
              -webkit-text-fill-color: transparent; }

.help-nav { position: sticky; top: 0; z-index: 2; margin: 0 -16px 22px; padding: 8px 16px;
            background: hsl(225 22% 8% / .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--line); }
/* One row; on a narrow screen it scrolls sideways (js/help.js brings the current topic into view) */
.help-nav ul { list-style: none; display: flex; gap: 6px; max-width: 720px; margin: 0 auto; padding: 0; overflow-x: auto;
               scrollbar-width: none; }
.help-nav ul::-webkit-scrollbar { display: none; }
.help-nav li { flex: none; }
.help-nav li { margin: 0; }
.help-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .92rem;
              font-weight: 600; color: hsl(0 0% 85%); text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.help-nav a:hover, .help-nav a:focus-visible { background: hsl(0 0% 100% / .07); outline: none; }
.help-nav a:focus-visible { border-color: var(--accent); }
.help-nav a[aria-current="page"] { background: hsl(260 70% 55% / .22); border-color: hsl(260 80% 70% / .45); color: #fff; }
.help-nav svg, .help-card svg { width: 16px; height: 16px; flex: none; }

/* ── Content ── */
article > header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
h1 { font-family: 'Fredoka', sans-serif; font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 700; line-height: 1.2; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
h2 { font-family: 'Fredoka', sans-serif; font-size: 1.3rem; font-weight: 600; margin: 32px 0 10px; display: flex; align-items: center; gap: 10px; }
h2 svg { width: 22px; height: 22px; flex: none; }
p, ul, ol { margin-bottom: 10px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 20px; }
.summary { font-size: 1.05rem; margin-bottom: 8px; }
.summary p:last-child { margin-bottom: 0; }

/* Tables (streaks: winning back; daily and zen: the comparison) */
.tbl { overflow-x: auto; background: hsl(260 40% 16% / .35); border: 1px solid hsl(260 80% 65% / .25); border-radius: 14px; padding: 4px 6px; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
td:first-child { font-weight: 600; color: #fff; }
.tbl.plain td:first-child { font-weight: 400; color: inherit; }  /* a table without a row heading (sync: synced / not) */
.tbl.vi { background: hsl(275 40% 16% / .35); border-color: hsl(278 80% 65% / .3); }

.example { border-left: 3px solid hsl(278 85% 68%); background: hsl(0 0% 100% / .03); border-radius: 0 14px 14px 0; padding: 12px 16px; margin: 6px 0 12px; }
.example h3 { font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--vi); }
.example ol { padding-left: 20px; margin: 0; }
.example li { margin-bottom: 3px; }
.example .d { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── The help index: a card per topic ── */
.help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 18px 0 8px; }
.help-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--card);
             border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.help-card:hover, .help-card:focus-visible { background: hsl(0 0% 100% / .07); border-color: hsl(260 80% 70% / .45); outline: none; }
.help-card svg { width: 26px; height: 26px; margin-top: 2px; }
.help-card strong { display: block; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.1rem; color: #fff; margin-bottom: 2px; }
.help-card span { color: var(--muted); font-size: .95rem; }

/* ── Previous / next at the foot of a topic ── */
.help-pager { display: flex; gap: 12px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.help-pager a { flex: 1 1 0; min-width: 0; display: block; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line);
                background: var(--card); text-decoration: none; color: #fff; font-weight: 600; }
.help-pager a:hover, .help-pager a:focus-visible { border-color: hsl(260 80% 70% / .45); outline: none; }
.help-pager small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.help-pager .next { text-align: right; margin-left: auto; }
.arr { width: 1em; height: 1em; vertical-align: -.12em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Badge colours of the streaks page, as on the homepage (home.css: .card-streak) */
.legend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; margin: 4px 0 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 13px; font-weight: 700;
        font-size: .8rem; white-space: nowrap; border: 1px solid; justify-self: start; }
.pill svg { width: 12px; height: 12px; }
.or { background: hsl(25 90% 50% / .15); color: hsl(30 95% 70%); border-color: hsl(25 90% 55% / .35); }
.gr { background: hsl(145 65% 15% / .85); color: hsl(145 65% 75%); border-color: hsl(145 65% 45% / .4); }
.bl { background: hsl(210 80% 45% / .2); color: hsl(205 95% 78%); border-color: hsl(210 85% 62% / .5); }
.vi.pill { background: hsl(275 70% 50% / .22); color: var(--vi); border: 1.5px dashed hsl(278 85% 70% / .8); }
.pips { display: inline-flex; gap: 4px; vertical-align: -1px; margin-right: 6px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; background: hsl(278 85% 68%); }
