/*
 * agmux.dev landing page: the brand on top of the tasteskill kit (system.css, layout.css, motion.css).
 * The brand stays as it was: slate grounds, Archivo with condensed headlines, gold for the main action,
 * blue = working, gold = needs you, green = done (the same meaning they have in the app).
 */

:root[data-brand="agmux"] {
  --p-bg: #edf0f3;
  --p-surface: #ffffff;
  --p-ink: #171b22;
  --p-muted: #586170;
  --p-accent: #f2a516;
  --p-accent-ink: #1d1604;
  --p-action: #f2a516;
  --p-action-ink: #1d1604;
  --p-inv-bg: #171b22;
  --p-inv-surface: #1f242d;
  --p-inv-ink: #edf0f3;
  --p-inv-muted: #a3abb8;
  --p-inv-accent: #f2a516;
  --p-inv-accent-ink: #1d1604;
  --p-inv-action: #f2a516;
  --p-inv-action-ink: #1d1604;

  --display-weight: 800;
  --display-stretch: 70%;
  --display-tracking: -0.012em;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* brand names the old CSS modules (compare table, app screens) still read */
  --paper: var(--p-bg);
  --panel: var(--p-surface);
  --graphite: var(--p-muted);
  --rule: #d3d8de;
  --working: #3d6bf5;
  --waiting: #f2a516;
  --finished: #1f9d55;
}

@media (prefers-color-scheme: dark) {
  :root[data-brand="agmux"] {
    --p-bg: #14171d;
    --p-surface: #1b1f27;
    --p-ink: #e9ecf0;
    --p-muted: #9ca5b3;
    --p-inv-bg: #0d0f13;
    --p-inv-surface: #171b22;
    --p-inv-ink: #e9ecf0;
    --p-inv-muted: #9ca5b3;
    --rule: #2d333e;
    --working: #6b8ff8;
    --finished: #3ecf7e;
    color-scheme: dark;
  }
}

/* the brand's focus ring is the working blue: gold is too pale on the slate ground */
:root[data-brand="agmux"] :focus-visible { outline-color: var(--working); }

/* the dark band keeps the gold primary readable */
:root[data-brand="agmux"] .ground-inverse { --rule: #2d333e; }

/* ---- hero: the app window, cut by its frame on the right ---- */
.hero .app-frame { background: #0f1115; border: 1px solid var(--line); }
.hero .app-frame > figure { width: 100%; height: 100%; min-height: 560px; }

/* ---- agents: one row per agent, its icon beside the name ---- */
#agents .agents { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
#agents .agents caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#agents .agents :is(th, td) { padding: 8px 16px 8px 0; line-height: 24px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
#agents .agents thead th { font-size: var(--t-label); font-weight: 500; color: var(--muted); border-bottom-color: var(--line-strong); }
#agents .agents tbody th { font-weight: 500; white-space: nowrap; }
#agents .agent { display: inline-flex; align-items: center; gap: 12px; }
#agents .agent img, #agents .agent .agent__blank { width: 24px; height: 24px; flex: none; }
#agents .agents td:last-child { color: var(--muted); }
#agents .support { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
#agents .support::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); }
#agents .support[data-level="limited"]::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
#agents .support[data-level="none"] { color: var(--muted); }
#agents .support[data-level="none"]::before { height: 2px; background: var(--line-strong); }
@media (max-width: 1023px) {
  #agents .agents thead { display: none; }
  #agents .agents tr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  #agents .agents :is(th, td) { padding: 0; border: 0; }
  #agents .agents td:last-child { grid-column: 1 / -1; font-size: var(--t-small); line-height: 20px; }
  #agents .agents td[data-label]::before { content: attr(data-label) " "; color: var(--muted); }
}
@media (max-width: 639px) {
  #agents .agents td[data-label]::before { content: none; }
  #agents .support { white-space: normal; }
}

/* ---- feature rows: text left, the app screen right ---- */
.feature { align-items: start; }
.feature__shot { position: relative; overflow: clip; border-radius: var(--r-lg); background: #0f1115; height: var(--p-h, 560px); }
.feature__shot > * { height: 100%; }
.feature .points { margin: var(--s-5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.feature .points li { position: relative; }
.feature .points li::before { content: ""; position: absolute; left: -18px; top: .72em; width: 8px; height: 2px; background: var(--ink); }
#features { --p-h: min(520px, 56svh); }
@media (max-width: 1023px) { #features { --p-h: 420px; } #remote { --p-h: 600px; } }
@media (max-width: 639px) { #features { --p-h: 300px; } #remote { --p-h: 360px; } }

/* ---- the statement: what gold means ---- */
#status .mo-lt__type { font-size: clamp(56px, 12vw, 136px); line-height: .92; max-width: 12ch; }
#status .states { margin-top: var(--s-8); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); list-style: none; padding: 0; }
#status .states li { border-top: 2px solid var(--ink); padding-top: var(--s-4); }
#status .states h3 { display: flex; align-items: center; gap: 10px; }
#status .states p { margin-top: var(--s-2); }
#status .state-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
#status .state-dot[data-s="working"] { background: var(--working); }
#status .state-dot[data-s="waiting"] { background: var(--waiting); }
#status .state-dot[data-s="done"] { background: var(--finished); }
@media (max-width: 1023px) { #status .states { grid-template-columns: 1fr; margin-top: var(--s-7); } }

/* ---- the phone remote ---- */
#remote .phone-shot { display: grid; place-items: center; height: var(--p-h, 640px); border-radius: var(--r-lg); background: var(--surface); overflow: clip; }
#remote .qr { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-5); max-width: 26rem; color: var(--muted); }
#remote .qr svg { width: 96px; height: 96px; flex: none; }
#remote .qr strong { display: block; color: var(--ink); font-weight: 500; }
#remote .stores { margin-top: var(--s-5); display: grid; gap: var(--s-2); }
@media (max-width: 1023px) { #remote .qr { display: none; } }

/* ---- local models: the settings screen across the wrap ---- */
#local .local-shot { height: var(--p-h, 600px); border-radius: var(--r-lg); overflow: clip; background: #0f1115; }
#local .local-shot > * { height: 100%; }
#local { --p-h: min(620px, 68svh); }
@media (max-width: 1023px) { #local { --p-h: 560px; } }
@media (max-width: 639px) { #local { --p-h: 400px; } }

/* ---- everything else in the app ---- */
#more .also { list-style: none; padding: 0; margin: 0; }
#more .also li { border-top: 2px solid var(--ink); padding-top: var(--s-4); }
#more .also p { margin-top: var(--s-2); }
#more .details { margin: var(--s-7) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--gutter); }
#more .details div { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
#more .details dt { font-weight: 500; }
#more .details dd { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 1023px) { #more .details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { #more .details { margin-top: var(--s-7); } #more .details dd { display: none; } }

/* ---- the comparison table scrolls inside its own box ---- */
#compare .compare-scroll { overflow-x: auto; scrollbar-width: thin; }
#compare .compare-foot { margin-top: var(--s-5); color: var(--muted); display: grid; gap: var(--s-3); }

/* ---- the close ---- */
.closing .close__alt { margin-top: var(--s-4); }
#compare .compare-scroll { margin-inline: 0; padding-inline: 0; }
.hero .hero__fact { margin-top: var(--s-5); }
.nav__logo .nav__mark { width: 28px; height: 24px; flex: none; margin-right: 10px; }

/* Tailwind (globals.css) also scans these files: its start-* inset utilities must not move the kit's grid columns */
:root[data-brand="agmux"] :is(.start-5, .start-6, .start-7, .start-8) { inset-inline-start: auto; }
.head-row { margin-bottom: var(--head-gap, var(--s-7)); align-items: start; }
.head-row p { font-size: var(--t-lead); line-height: 1.5; }
.feature h3 + p { margin-top: var(--s-4); }

/* one h3 size on the page */
:root[data-brand="agmux"] main h3 { font-size: var(--t-h3); line-height: 1.15; }
#compare summary { list-style-position: inside; }
#compare .section-head { margin-bottom: var(--s-6); }
@media (max-width: 1279px) { #compare .compare-foot p { font-size: 13px; } }
#compare table :is(th, td) { padding-top: 9px; padding-bottom: 9px; }

/* the notes column starts on the page's split line (x 732 at 1440) */
#agents .agents { table-layout: fixed; }
#agents .agents__name { width: 260px; }
#agents .agents__mode { width: 196px; }
@media (max-width: 1279px) { #agents .agents__name { width: 30%; } #agents .agents__mode { width: 15%; } }
@media (max-width: 1023px) { #agents .agents, #agents .agents tbody { display: block; } #agents .agents colgroup { display: none; } }
@media (max-width: 359px) { #agents .agents tbody th { grid-column: 1 / -1; } }
#remote .qr span { color: var(--ink); }
#compare summary { display: block; cursor: pointer; }
#compare summary::-webkit-details-marker { display: none; }
.feature h2 + p { margin-top: var(--s-5); }
#compare summary { min-height: 44px; display: flex; align-items: center; }
@media (max-width: 479px) { .closing .btn--xl { white-space: normal; height: auto; min-height: 64px; padding-block: var(--s-3); font-size: 20px; text-align: center; } }

/* the app screens drawn at half the wrap: let their rows wrap instead of running past their boxes */
#local .local-shot [class*="modelMeta"] { flex-wrap: wrap; row-gap: 2px; }
/* the settings screen runs on past the frame's foot: the frame clips it, the screen itself does not */
#local .local-shot__ui, #local .local-shot__ui > * { height: auto; overflow: visible; }

/* Tailwind (globals.css, shared with the app pages) removes outlines in a few utilities: give them the ring back */
:root[data-brand="agmux"] :is(.focus\:outline-none, .focus-visible\:outline-hidden):focus-visible,
:root[data-brand="agmux"] [data-slot="navigation-menu-link"]:focus-visible { outline: 2px solid var(--working); outline-offset: 2px; }

#more .also__icons { display: flex; gap: var(--s-3); margin-bottom: var(--s-3); }
#more .also__icons img { width: 28px; height: 28px; }
/* black marks turn white on the brand's dark mode, which follows the system setting rather than .ground-inverse */
@media (prefers-color-scheme: dark) { :root[data-brand="agmux"] .ic-ink { filter: invert(1); } }
