/* MotionSkill: the pages beyond the home page (buy, account, sign-in, install guides, documents, admin).
   Built on the taste skill's tokens (system.css): the same type scale, spacing, radii, lines and buttons.
   Flat grounds only: no gradients, no glows, no line under a heading. */

/* ---------------------------------------------------------------- a page: the bar, then its content at its own height */
.page { padding: calc(var(--nav-h, 72px) + var(--s-8)) 0 var(--s-9); min-height: 70svh; }
.page__head { display: grid; gap: var(--s-4); margin-bottom: var(--s-8); max-width: 760px; }
.page__head > p { color: var(--muted); font-size: var(--t-lead); line-height: 1.5; }
.page__kicker { font: 500 var(--t-small)/1.4 var(--font-mono); color: var(--muted); }
.page-foot { padding: var(--s-8) 0 var(--s-7); border-top: 1px solid var(--line); }
.page-foot .closing__links { display: grid; gap: var(--s-6); }

/* ---------------------------------------------------------------- two columns: the text and a side panel */
.split2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; }
@media (max-width: 1023px) { .split2 { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); } }

/* ---------------------------------------------------------------- a box on the page (the buy summary, a sign-in form) */
.box { padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: var(--s-5); }
.box--narrow { max-width: 440px; margin-inline: auto; }
.box h2 { font-size: var(--t-h3); }
.box .form { grid-template-columns: minmax(0, 1fr); }
.box .btn { width: 100%; justify-content: center; }
.box .btn-row .btn { width: auto; }

/* the consent tick on the buy page */
.tick { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s-3); align-items: start; font-size: var(--t-small); line-height: 1.5; cursor: pointer; }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--action); }
.price-line { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.price-line__now { font-size: var(--t-h2); font-weight: 500; letter-spacing: -0.02em; }
.price-line__reg { color: var(--muted); font-size: var(--t-small); }
.pay-marks { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; color: var(--muted); font-size: var(--t-small); }
.pay-marks span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- notices: words first, a mark beside them */
.notice { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); border: 1px solid var(--line-strong); font-size: var(--t-small); line-height: 1.5; }
.notice--ok { border-color: color-mix(in oklab, #2fa36b 55%, var(--line)); }
.notice--bad { border-color: color-mix(in oklab, #d92d20 60%, var(--line)); }
.notice b { font-weight: 600; }

/* ---------------------------------------------------------------- documents (terms, privacy, guides) */
.doc { max-width: 720px; display: grid; gap: var(--s-5); }
.doc h2 { font-size: var(--t-h3); margin-top: var(--s-6); }
.doc h3 { font-size: var(--t-card, 1.125rem); margin-top: var(--s-4); }
.doc p, .doc li { line-height: 1.65; color: var(--ink); }
.doc ul, .doc ol { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.doc a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.doc a:hover { text-decoration-color: currentColor; }
.doc code, .kbd { font: 500 0.92em/1.4 var(--font-mono); padding: 1px 6px; border-radius: 6px; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.doc .muted, .muted { color: var(--muted); }
.code { position: relative; margin: 0; padding: var(--s-4) var(--s-5); padding-right: 92px; border-radius: var(--r-md); background: #050506; border: 1px solid var(--line);
  font: 400 14px/1.6 var(--font-mono); color: #e7e8ea; white-space: pre-wrap; word-break: break-word; }
.code__copy { position: absolute; top: 10px; right: 10px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font: 500 12px/1 var(--font-text); cursor: pointer; transition: background-color var(--dur, .2s) var(--ease, ease); }
.code__copy:hover { background: color-mix(in oklab, var(--ink) 10%, var(--bg)); }
.steps { counter-reset: step; display: grid; gap: var(--s-6); padding: 0; list-style: none; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-4); }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); font: 500 14px/1 var(--font-mono); }
.steps > li > div { display: grid; gap: var(--s-3); min-width: 0; }
.steps h3 { margin: 4px 0 0; font-size: var(--t-card, 1.125rem); }

/* the three tools as choices (install guides) */
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap, 16px); }
@media (max-width: 767px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { display: grid; gap: var(--s-3); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: border-color var(--dur, .2s) var(--ease, ease), transform var(--dur, .2s) var(--ease, ease); }
.choice:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.choice img { width: 32px; height: 32px; }
.choice b { font-size: var(--t-card, 1.125rem); font-weight: 500; }
.choice span { color: var(--muted); font-size: var(--t-small); line-height: 1.5; }

/* ---------------------------------------------------------------- tables (account, admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.table th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a { color: var(--ink); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font: 500 12px/1.5 var(--font-text); white-space: nowrap; }
.badge--ok { border-color: color-mix(in oklab, #2fa36b 60%, var(--line)); color: color-mix(in oklab, #2fa36b 70%, var(--ink)); }
.badge--bad { border-color: color-mix(in oklab, #d92d20 60%, var(--line)); color: color-mix(in oklab, #ff6b5e 70%, var(--ink)); }

/* ---------------------------------------------------------------- the account */
.licence { display: grid; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); }
.licence__id { font: 500 clamp(1.25rem, 2.4vw, 1.75rem)/1.2 var(--font-mono); letter-spacing: 0.02em; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dl-row:first-child { padding-top: 0; }
.dl-row__v { display: grid; gap: var(--s-1); }
.dl-row__v b { font-weight: 500; font-size: var(--t-card, 1.125rem); }
.dl-row__v span { color: var(--muted); font-size: var(--t-small); }

/* ---------------------------------------------------------------- the admin: a side list of sections and the work area */
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100svh; }
.admin__side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-5) var(--s-4); border-right: 1px solid var(--line); }
.admin__side .nav__logo { margin: 0 var(--s-2) var(--s-5); display: block; }
.admin__side .nav__logo img { height: 22px; width: auto; }
.admin__link { display: flex; align-items: center; gap: var(--s-3); height: 36px; padding: 0 var(--s-3); border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: var(--t-small); font-weight: 500;
  transition: background-color var(--dur, .2s) var(--ease, ease), color var(--dur, .2s) var(--ease, ease); }
.admin__link:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.admin__link[aria-current="page"] { color: var(--ink); background: color-mix(in oklab, var(--ink) 9%, transparent); }
.admin__link svg { width: 16px; height: 16px; flex: none; }
.admin__who { margin-top: auto; padding: var(--s-3); font-size: 12px; color: var(--muted); line-height: 1.5; word-break: break-all; }
.admin__main { padding: var(--s-7) var(--s-7) var(--s-9); display: grid; gap: var(--s-7); align-content: start; max-width: 1240px; }
.admin__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.admin__head h1 { font-size: var(--t-h2); }
.admin__head p { color: var(--muted); font-size: var(--t-small); }
@media (max-width: 899px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin__side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s-3); }
  .admin__side .nav__logo, .admin__who { display: none; }
  .admin__main { padding: var(--s-5) var(--gut) var(--s-8); }
}
.admin__main > section.panel2, .admin__main > section { height: auto; min-height: 0; padding: var(--s-6); }
.panel2 { display: grid; gap: var(--s-5); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel2 > h2 { font-size: var(--t-card, 1.125rem); font-weight: 500; }
.panel2 > p.muted { margin-top: calc(-1 * var(--s-3)); font-size: var(--t-small); line-height: 1.5; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--card-gap, 16px); }
@media (max-width: 899px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: grid; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kpi span { color: var(--muted); font-size: var(--t-small); }
.kpi b { font-size: var(--t-h3); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.admin .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin .form .field--full { grid-column: 1 / -1; }
.field small { font-weight: 400; color: var(--muted); line-height: 1.45; }
.inline-form { display: inline; }
.btn--danger { color: color-mix(in oklab, #ff6b5e 80%, var(--ink)); }
.filter { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: end; }
.filter .field { min-width: 220px; }

/* ---------------------------------------------------------------- the cookie banner: bottom left, small, two equal choices */
.consent { position: fixed; z-index: 60; left: var(--gut); bottom: var(--gut); width: min(420px, calc(100% - 2 * var(--gut))); display: grid; gap: var(--s-3);
  padding: var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  box-shadow: 0 12px 32px -12px rgb(0 0 0 / .5); }
.consent__title { font-weight: 500; }
.consent__text { font-size: var(--t-small); line-height: 1.55; color: var(--muted); }
.consent__text a { color: var(--ink); }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.footer__nav .linklike { color: inherit; font: inherit; }
.footer__nav .linklike:hover { color: var(--accent); }

/* ---------------------------------------------------------------- watch pages */
.watch video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: #000; }
.watch__more { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--card-gap, 16px); }
@media (max-width: 899px) { .watch__more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.watch__more a { display: grid; gap: var(--s-2); color: var(--ink); text-decoration: none; font-size: var(--t-small); }
.watch__more img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); transition: transform var(--dur, .2s) var(--ease, ease); }
.watch__more a:hover img { transform: scale(1.02); }

/* install guides: the step list, the rows and a command keep their own spacing and look inside a .doc */
.doc ol.steps, .doc ul.rows { padding-left: 0; }
.doc ol.steps { gap: var(--s-6); }
.doc ul.rows { gap: 0; }
.doc .code code { padding: 0; border-radius: 0; background: none; font: inherit; }

/* ---------------------------------------------------------------- admin charts (dataviz: validated on the dark surface) */
.admin { --viz-1: #ef4f22; --viz-2: #3987e5; --viz-3: #199e70; --viz-grid: color-mix(in oklab, var(--ink) 9%, transparent); }
.viz { position: relative; margin: 0; display: grid; gap: var(--s-3); min-width: 0; }
.viz svg { display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-base { stroke: color-mix(in oklab, var(--ink) 22%, transparent); stroke-width: 1; }
.viz-cross { stroke: color-mix(in oklab, var(--ink) 35%, transparent); stroke-width: 1; }
.viz-axis { fill: var(--muted); font: 400 11px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.viz-label { fill: var(--ink); font: 400 12px/1 var(--font-text); }
.viz-value { fill: var(--ink); font: 500 12px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.viz-muted { fill: var(--muted); font-weight: 400; }
.viz-s1 { fill: var(--viz-1); } .viz-s2 { fill: var(--viz-2); } .viz-s3 { fill: var(--viz-3); }
.viz-line1, .viz-line2, .viz-line3 { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line1 { stroke: var(--viz-1); } .viz-line2 { stroke: var(--viz-2); } .viz-line3 { stroke: var(--viz-3); }
.viz-wash1 { fill: color-mix(in oklab, var(--viz-1) 10%, transparent); } .viz-wash2 { fill: color-mix(in oklab, var(--viz-2) 10%, transparent); } .viz-wash3 { fill: color-mix(in oklab, var(--viz-3) 10%, transparent); }
.viz-dot1, .viz-dot2, .viz-dot3 { stroke: var(--bg); stroke-width: 2; }
.viz-dot1 { fill: var(--viz-1); } .viz-dot2 { fill: var(--viz-2); } .viz-dot3 { fill: var(--viz-3); }
.viz-hit { fill: transparent; cursor: default; }
.viz g:hover > path { opacity: .85; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-strong);
  font: 400 12px/1.45 var(--font-text); color: var(--ink); white-space: nowrap; box-shadow: 0 8px 20px -10px rgb(0 0 0 / .6); }
.viz-tip__h { color: var(--muted); }
.viz-note { font-size: 12px; color: var(--muted); }
.viz-table summary { font-size: 12px; color: var(--muted); cursor: pointer; width: max-content; }
.viz-table summary:hover { color: var(--ink); }
.viz-table .table-wrap { margin-top: var(--s-3); max-height: 320px; overflow: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap, 16px); }
@media (max-width: 1099px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.grid2 > .panel2 { min-width: 0; align-content: start; }
.admin { color-scheme: dark; }
.kpis--8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.kpi small b { font-weight: 500; color: var(--ink); font-size: 12px; }
.delta { font: 500 12px/1.4 var(--font-text); color: var(--ink); }
.delta--up::before { content: "▲ "; color: #2fa36b; font-size: 9px; vertical-align: 1px; }
.delta--down::before { content: "▼ "; color: #ff6b5e; font-size: 9px; vertical-align: 1px; }
.delta--flat { color: var(--muted); }
.panel2__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.panel2__head h2 { font-size: var(--t-card, 1.125rem); font-weight: 500; }
.panel2__head p { font-size: 12px; color: var(--muted); }
.insights { display: grid; gap: var(--s-2); padding: 0; margin: 0; list-style: none; }
.insights li { font-size: var(--t-small); line-height: 1.5; padding-left: 18px; position: relative; }
.insights li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--viz-2); }

/* ---------------------------------------------------------------- support: the pill, the panel, the thread */
.support-launch { position: fixed; z-index: 55; right: var(--gut); bottom: var(--gut); display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 16px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 14px/1 var(--font-text); cursor: pointer;
  box-shadow: 0 10px 28px -14px rgb(0 0 0 / .7); transition: transform var(--dur, .2s) var(--ease, ease), border-color var(--dur, .2s) var(--ease, ease); }
.support-launch:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--ink) 30%, transparent); }
.support-launch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.support-launch__dot, .support__away { width: 8px; height: 8px; border-radius: 50%; background: #e7a83a; flex: none; }
.support-launch.is-open { border-color: color-mix(in oklab, var(--ink) 34%, transparent); }
.support { position: fixed; z-index: 56; right: var(--gut); bottom: calc(var(--gut) + 56px); width: min(380px, calc(100vw - 2 * var(--gut))); max-height: calc(100svh - 120px); overflow: auto;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .8);
  animation: support-in 220ms var(--ease, cubic-bezier(.2,.7,.2,1)); }
@keyframes support-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .support { animation: none; } }
.support__head { display: flex; justify-content: space-between; align-items: start; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-4); border-bottom: 1px solid var(--line); }
.support__title { font: 500 16px/1.3 var(--font-text); }
.support__status { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.support__close { display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px 0 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.support__close:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); color: var(--ink); }
.support__close svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.support__form { display: grid; gap: var(--s-4); padding: var(--s-5); }
.support__form .field textarea { min-height: 120px; }
.support__form .btn { width: 100%; justify-content: center; }
.support__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.support__error { font-size: 13px; line-height: 1.45; color: color-mix(in oklab, #ff6b5e 80%, var(--ink)); }
.support__fine { font-size: 12px; line-height: 1.45; color: var(--muted); }
.support__done { display: grid; gap: var(--s-3); padding: var(--s-6) var(--s-5); font-size: 14px; line-height: 1.55; }
.support__done-title { font: 500 18px/1.3 var(--font-text); }
.support__done .btn { justify-self: start; }
/* the cookie banner sits bottom left; on a phone it rises above the pill */
@media (max-width: 639px) { .consent { bottom: calc(var(--gut) + 56px); } .support { bottom: calc(var(--gut) + 56px); } }
.thread { display: grid; gap: var(--s-4); padding: 0; margin: 0; list-style: none; }
.thread__msg { display: grid; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); }
.thread__msg--admin { background: color-mix(in oklab, var(--ink) 4%, transparent); }
.thread__meta { font-size: 12px; color: var(--muted); }
.thread__body { white-space: pre-wrap; line-height: 1.6; font-size: var(--t-small); overflow-wrap: anywhere; }
.admin__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 11px/20px var(--font-text); text-align: center; }
