/* Agent A: floating glass nav, mobile glass sheet, hero, agent-run console window.
   Warm liquid glass (REVISION 2). Tokens only. Glass rim/specular come from base.css pseudo-elements,
   so nothing here adds ::before/::after to .glass/.glass--strong/.glass-inset/.btn elements. */

/* ============================================================ nav: floating pill ornament */
.a-nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: 14px;
  pointer-events: none;           /* the strip around the pill must not block the page */
}
.a-nav__bar {
  pointer-events: auto;
  height: 60px; display: flex; align-items: center; gap: 20px;
  padding-inline: 10px 18px;     /* start (right) holds the brand, end (left) the CTA pill */
  border-radius: var(--radius-pill);
  transition: box-shadow .4s var(--ease), transform .5s var(--spring);
}
.a-nav.is-stuck .a-nav__bar { --spec: 1; }

.a-brand {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none;
  flex-shrink: 0; padding-inline: 10px 6px; height: 44px; border-radius: var(--radius-pill);
}
.a-mark { width: 28px; height: 28px; flex-shrink: 0; }
.a-mark__sig { fill: var(--signal); }
.a-brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.a-brand__name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.a-brand__sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; color: var(--paper-3); margin-top: 3px; }

.a-nav__links { position: relative; z-index: 2; display: flex; gap: 2px; margin-inline-start: 4px; }
.a-nav__links a {
  color: var(--paper-2); text-decoration: none; font-size: 14.5px; white-space: nowrap;
  padding: 8px 14px; border-radius: var(--radius-pill);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.a-nav__links a:hover { color: var(--paper); background: var(--glass-fill-inset); }

.a-nav__end { position: relative; z-index: 2; margin-inline-start: auto; display: flex; align-items: center; gap: 14px; }
.a-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--paper-2); white-space: nowrap; }
.a-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex-shrink: 0; box-shadow: 0 0 0 3px var(--signal-dim); }
.a-nav__cta { height: 42px; padding-inline: 20px; font-size: 14px; white-space: nowrap; }

.a-nav__menu { display: none; width: 44px; height: 44px; padding: 0; }
.a-nav__bars { position: relative; z-index: 2; width: 16px; height: 8px; display: block; }
.a-nav__bars span {
  position: absolute; inset-inline: 0; height: 1.5px; border-radius: 2px; background: var(--paper);
  transition: transform .3s var(--spring), top .3s var(--ease);
}
.a-nav__bars span:first-child { top: 0; }
.a-nav__bars span:last-child { top: 6.5px; }
.a-nav__menu[aria-expanded="true"] .a-nav__bars span:first-child { top: 3.25px; transform: rotate(45deg); }
.a-nav__menu[aria-expanded="true"] .a-nav__bars span:last-child { top: 3.25px; transform: rotate(-45deg); }

/* mobile sheet: one large glass panel floating under the pill */
.a-sheet {
  pointer-events: auto;
  position: fixed; z-index: 49;
  top: 86px; inset-inline: var(--gutter); max-height: calc(100dvh - 102px);
  border-radius: var(--radius-glass);
  overflow-y: auto; overscroll-behavior: contain;
}
.a-sheet[hidden] { display: none; }
.a-sheet__in { position: relative; z-index: 2; display: flex; flex-direction: column; padding: 10px 22px 22px; }
.a-sheet__list { list-style: none; margin: 0; padding: 0; }
.a-sheet__list li + li { border-top: 1px solid var(--line); }
.a-sheet__list a {
  display: flex; align-items: baseline; gap: 16px; padding: 16px 2px;
  text-decoration: none; font-size: 24px; font-weight: 500; letter-spacing: -0.01em; color: var(--paper);
}
.a-sheet__i { font-family: var(--font-mono); font-size: 11px; color: var(--paper-3); min-width: 2ch; }
.a-sheet__foot { padding-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.a-sheet__foot .btn { width: 100%; }
html.a-locked, html.a-locked body { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .a-sheet:not([hidden]) { animation: a-pop .45s var(--spring) both; transform-origin: top center; }
  .a-sheet:not([hidden]) .a-sheet__list li { animation: a-rise .5s var(--ease) both; }
  .a-sheet__list li:nth-child(2) { animation-delay: 40ms; }
  .a-sheet__list li:nth-child(3) { animation-delay: 80ms; }
  .a-sheet__list li:nth-child(4) { animation-delay: 120ms; }
  .a-sheet__list li:nth-child(5) { animation-delay: 160ms; }
}
@keyframes a-pop { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 1199px) { .a-nav__end .a-status { display: none; } }
@media (max-width: 959px) {
  .a-nav__links { display: none; }
  .a-nav__menu { display: inline-flex; }
  .a-nav__end { gap: 8px; }
  .a-nav__bar { padding-inline: 6px 8px; }
}
@media (min-width: 960px) { .a-sheet { display: none !important; } }
@media (max-width: 559px) { .a-nav__cta { display: none; } .a-nav { padding-top: 10px; } .a-sheet { top: 80px; } }

/* ============================================================ hero: type directly over the room */
.a-nw { white-space: nowrap; }
.a-hero { position: relative; z-index: 1; padding-block: clamp(36px, 5vw, 72px) clamp(64px, 8vw, 112px); }
.a-sentinel { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 1px; pointer-events: none; }

.a-hero__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: clamp(28px, 4vw, 52px); align-items: start;
}
.a-hero__title {
  grid-column: 1 / -1; margin: 0;
  font-size: clamp(2.5rem, 0.9rem + 4.6vw, 5.25rem);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.028em;
  text-wrap: balance; max-width: 17ch; color: var(--paper);
  text-shadow: 0 1px 30px color-mix(in srgb, var(--ink-1) 60%, transparent);
}
.a-hero__title-dim { color: var(--paper-2); }
.a-mark-word {
  font-style: normal;
  text-decoration: underline; text-decoration-color: var(--signal);
  text-decoration-thickness: .06em; text-underline-offset: .16em; text-decoration-skip-ink: none;
}

.a-hero__copy { grid-column: 1 / -1; }
.a-hero__sub {
  margin: 0; font-size: var(--t-lg); line-height: 1.55; color: var(--paper); max-width: 40ch;
  text-shadow: 0 1px 20px color-mix(in srgb, var(--ink-1) 70%, transparent);
}
.a-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.a-hero__ctas .btn { white-space: nowrap; }

/* fact chips: three small glass pills */
.a-facts { margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.a-fact {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 8px 16px 8px 14px; border-radius: var(--radius-pill);
}
.a-fact dt, .a-fact dd { position: relative; z-index: 2; }
.a-fact dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--paper-3); }
.a-fact dd { margin: 0; font-size: 14px; color: var(--paper); white-space: nowrap; }

.a-console { grid-column: 1 / -1; margin: 0; min-width: 0; }

@media (min-width: 1024px) {
  .a-hero__title { grid-column: 1 / span 11; max-width: none; }
  .a-hero__copy { grid-column: 1 / span 5; padding-top: 6px; }
  .a-facts { flex-direction: column; align-items: flex-start; }
  .a-console { grid-column: 6 / span 7; }
}

/* load-in: pure CSS so it also runs without JS */
@keyframes a-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.a-rise { animation: a-rise .75s var(--ease) both; }
.a-hero__sub.a-rise { animation-delay: .1s; }
.a-hero__ctas.a-rise { animation-delay: .18s; }
.a-facts.a-rise { animation-delay: .26s; }
.a-console.a-rise { animation-delay: .22s; }

/* ============================================================ console: dark tinted glass window, --code-* palette */
.a-console__frame.glass--strong {
  /* dark tinted glass window (the shared rim + specular still apply) */
  background: var(--code-bg);
  padding: 8px;
  border-radius: var(--radius-glass);
  font-family: var(--font-mono); font-size: 12px; line-height: 19px; color: var(--code-text);
  text-align: left; font-variant-numeric: tabular-nums;
}
.a-console__frame > * { position: relative; z-index: 2; }   /* content above the glass rim/specular */
.a-console__frame [dir="rtl"] { font-family: var(--font-sans); font-size: 12.5px; color: var(--code-text); }
.a-dim { color: var(--code-dim); }

.a-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 10px;
  font-size: 11.5px; white-space: nowrap; overflow: hidden;
}
.a-bar__lights { display: inline-flex; gap: 6px; margin-inline-end: 4px; }
.a-bar__lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--code-line); box-shadow: inset 0 0 0 1px var(--code-line); }
.a-bar__lights i:first-child { background: var(--signal); opacity: .85; }
.a-bar__state { display: inline-flex; align-items: center; gap: 7px; color: var(--code-text); letter-spacing: .06em; min-width: 9ch; }
.a-console__frame { --c-ok: color-mix(in srgb, var(--ok) 62%, var(--code-text)); --c-warn: color-mix(in srgb, var(--warn) 70%, var(--code-text)); }
.a-bar__state::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--c-ok); }
.a-console[data-state="running"] .a-bar__state::before { background: var(--signal); animation: a-blink 1s steps(1) infinite; }
.a-console.is-paused .a-bar__state::before { animation: none; background: var(--code-dim); }
.a-bar__run { color: var(--code-dim); }
.a-bar__agent, .a-bar__model { color: var(--code-text); }
.a-bar__kv--time { margin-inline-start: auto; }
.a-bar__run { display: none; }
@media (max-width: 1199px) { .a-bar__kv--agent { display: none; } }
.a-bar__elapsed { color: var(--code-text); display: inline-block; min-width: 9ch; }

.a-tabsrow { display: flex; align-items: center; gap: 8px; padding: 0 4px 8px; }
.a-tabs {
  display: flex; gap: 2px; padding: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none;
  border-radius: var(--radius-pill); background: var(--code-line); box-shadow: inset 0 0 0 1px var(--code-line);
}
.a-tabs::-webkit-scrollbar { display: none; }
.a-tab {
  appearance: none; border: 0; background: transparent; border-radius: var(--radius-pill);
  padding: 6px 14px; font: inherit; font-size: 12px; color: var(--code-dim); cursor: pointer; white-space: nowrap;
  transition: color .2s var(--ease), background-color .25s var(--ease), transform .35s var(--spring);
}
.a-tab:hover { color: var(--code-text); }
.a-tab:active { transform: scale(.97); }
.a-tab[aria-selected="true"] {
  color: var(--code-text); background: color-mix(in srgb, var(--code-text) 16%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--code-text) 22%, transparent);
}
.a-tab:focus-visible, .a-ctl:focus-visible, .a-screen:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.a-ctls { display: none; margin-inline-start: auto; align-items: center; gap: 6px; }
.a-console.is-live .a-ctls { display: flex; }
.a-console.is-static .a-ctl--pause { display: none; }
.a-ctl {
  appearance: none; border: 0; border-radius: var(--radius-pill);
  height: 28px; padding-inline: 12px; font: inherit; font-size: 11px; color: var(--code-text); cursor: pointer;
  background: var(--code-line); box-shadow: inset 0 0 0 1px var(--code-line);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .35s var(--spring);
}
.a-ctl:hover { color: var(--code-text); background: color-mix(in srgb, var(--code-text) 16%, transparent); transform: translateY(-1px); }
.a-ctl:active { transform: scale(.97); }
.a-ctl[aria-pressed="true"] { color: var(--signal); background: color-mix(in srgb, var(--signal) 22%, transparent); }

/* the log pane: a darker inset tile so mono text stays crisp on the milky window.
   Styled directly (not .glass-inset) because it scrolls and the shared rim pseudo-element would scroll with it. */
.a-screen {
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  box-shadow: inset 0 0 0 1px var(--code-line), inset 0 10px 30px -18px color-mix(in srgb, var(--paper) 90%, transparent);
  height: 490px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--code-line) transparent;
}
.a-log { list-style: none; margin: 0; padding: 12px 0 6px; }
.a-ln {
  display: grid;
  grid-template-columns: 2ch 9ch 7ch minmax(0, 1fr) 6ch 4ch;
  column-gap: 1.4ch; padding: 1px 14px;
  border-left: 2px solid transparent;
}
.a-ln:hover { background: var(--code-line); }
.a-ln[data-s="warn"] { border-left-color: var(--c-warn); }
.a-ln__n { color: var(--code-dim); opacity: .6; }
.a-ln__t, .a-ln__k { color: var(--code-dim); }
.a-ln__c { color: var(--code-text); overflow-wrap: break-word; }
.a-ln__ms { color: var(--code-dim); text-align: right; }
.a-ln__s { text-align: right; }
.a-ln[data-s="ok"] .a-ln__s { color: var(--c-ok); }
.a-ln[data-s="warn"] .a-ln__s { color: var(--c-warn); }
.a-ln[data-s="run"] .a-ln__s { color: var(--signal); animation: a-blink 1s steps(1) infinite; }
.a-ln__o {
  grid-column: 4 / -1; color: var(--code-text);
  white-space: pre-wrap; overflow-wrap: anywhere; padding-bottom: 4px;
}
.a-ln__o::before { content: "\2514\2500 "; color: var(--code-dim); }
.a-ln__k[data-k="guard"], .a-ln__k[data-k="handoff"] { color: var(--code-text); }

.a-console.is-live:not(.is-static) .a-ln { animation: a-line .28s var(--ease) both; }
@keyframes a-line { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.a-tail { padding: 0 14px 14px 16px; }
.a-result {
  display: flex; flex-wrap: wrap; gap: 4px 1.4ch; align-items: baseline;
  margin-top: 6px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--code-text) 24%, transparent);
}
.a-result__k { color: var(--c-ok); letter-spacing: .06em; }
.a-result__t { color: var(--code-text); }
.a-result__m { margin-inline-start: auto; color: var(--code-dim); white-space: pre; }
.a-console.is-live:not(.is-static) .a-result { animation: a-line .35s var(--ease) both; }
.a-prompt { margin-top: 8px; color: var(--code-dim); }

.a-cur {
  display: inline-block; width: .6em; height: 1.05em; margin-left: 3px;
  vertical-align: -0.18em; background: var(--code-text);
  animation: a-blink 1.05s steps(1) infinite;
}
.a-console.is-paused .a-cur { animation: none; }
@keyframes a-blink { 50% { opacity: 0; } }

.a-console__cap {
  margin-top: 12px; padding-inline: 8px; font-size: var(--t-xs); color: var(--paper-2); line-height: 1.5;
}

@media (max-width: 639px) {
  .a-console__frame { padding: 6px; border-radius: 22px; font-size: 11.5px; line-height: 18px; }
  .a-console__frame [dir="rtl"] { font-size: 12.5px; }
  .a-bar { gap: 12px; padding-inline: 10px; }
  .a-bar__kv--agent, .a-bar__run, .a-bar .a-dim, .a-bar__lights { display: none; }
  .a-tabsrow { flex-wrap: wrap; padding-inline: 2px; }
  .a-tabs { flex: 1 0 100%; }
  .a-tab { flex: 1 0 auto; padding-inline: 10px; font-size: 11.5px; }
  .a-console.is-live .a-ctls { flex: 1 0 100%; justify-content: flex-end; }
  .a-ln { grid-template-columns: 7ch minmax(0, 1fr) 5.5ch 3.5ch; column-gap: 1ch; padding-inline: 10px 12px; }
  .a-ln__n, .a-ln__t { display: none; }
  .a-ln__o { grid-column: 1 / -1; padding-inline-start: 2ch; }
  .a-tail { padding-inline: 12px; }
  .a-screen { height: 470px; }
  .a-fact dd { white-space: normal; }
}
