/* site.css: page CSS for chainmail.sh v2. Only what sits inside a visual, the t3.codes look the kit lacks,
   and one --p-h per card group. Tokens come from the :root block in the page head. */

:root {
  --t3-elev: #0a0a0a;
  --t3-card: #0d0d0d;
  --t3-line: rgba(255, 255, 255, .08);
  --t3-line-strong: rgba(255, 255, 255, .14);
  --t3-dim: #737373;
  --t3-ok: #4ac06c;
  --t3-warn: #e8a127;
  --t3-blue: #6193ff;
}
body { background: var(--p-bg); color: var(--p-ink); -webkit-font-smoothing: antialiased; }

/* the logo: the client's mark beside the name in Geist Mono, as the project's own wordmark sets it */
.nav__logo { gap: 10px; font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 14px; display: block; flex: none; }

/* ---------------------------------------------------------------- hero: the window under the words (t3.codes) */
.hero--centred .hero__window--term {
  background: transparent; -webkit-mask-image: none; mask-image: none; overflow: visible;
  display: grid; place-items: start center; padding-top: 0;
}
.hero--centred .hero__window--term { container-type: size; }
.hero--centred .hero__window--term > .term { width: min(100%, 960px, calc(100cqh * 2.45)); }

/* ---------------------------------------------------------------- sessions: a list of takes beside one window */
.sessions__side { display: grid; align-content: start; gap: var(--s-6); }
.tabs--list { display: grid; gap: 2px; }
.tabs--list .tab {
  display: grid; gap: 2px; justify-items: start; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent;
  color: var(--p-muted); height: auto; min-height: 44px;
}
.tabs--list .tab b { font-weight: 500; color: var(--p-ink); font-size: 15px; }
.tabs--list .tab span { font-size: 14px; line-height: 1.45; color: var(--p-muted); }
.tabs--list .tab:hover { background: rgba(255, 255, 255, .03); border-color: var(--t3-line); }
.tabs--list .tab[aria-selected="true"] { background: var(--t3-card); border-color: var(--t3-line-strong); color: var(--p-ink); }
.tab__tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--t3-line-strong); font: 500 11px/18px var(--font-mono); color: var(--p-muted); vertical-align: 1px; }
.sessions__screens > [role="tabpanel"] { margin: 0; }

/* ---------------------------------------------------------------- limits: four dark cards (x.ai / t3 cards) */
.limits .card { background: var(--t3-card); border: 1px solid var(--t3-line); border-radius: var(--r-lg); }
#limits .panel { --p-h: 300px; }

/* ---------------------------------------------------------------- how: the diagram frame */
.how__diagram { min-width: 0; }

/* ---------------------------------------------------------------- install: three steps, each with its command */
.steps .card { background: var(--t3-card); border: 1px solid var(--t3-line); border-radius: var(--r-lg); }

@media (max-width: 1023px) {
  .sessions__side { gap: var(--s-5); }
  .tabs--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .tabs--list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- .snip: a few lines of real terminal output inside a card's panel */
.panel:has(> .snip) { background: #141414; border-top: 1px solid var(--t3-line); display: block; }
.snip {
  margin: 0; padding: 20px 22px; overflow: hidden; white-space: pre; text-align: left;
  font: 400 13px/1.7 ui-monospace, "SF Mono", Menlo, var(--font-mono); color: #d4d4d4;
}
.snip__p { color: var(--t3-ok); }
.snip__dim { color: var(--t3-dim); }
.snip__warn { color: var(--t3-warn); }
.snip__key { color: var(--t3-blue); }
.snip__str { color: #c3e88d; }
@media (max-width: 639px) { .snip { font-size: 12px; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; } }

/* ---------------------------------------------------------------- features hero: the shell window cut by the art frame */
.hero__art--term { background: var(--t3-elev); border: 1px solid var(--t3-line); overflow: hidden; position: relative;
  background-image: radial-gradient(70% 60% at 30% 0%, rgba(52, 107, 241, .16), transparent 70%); }
.hero__art--term > .term--cut { position: absolute; left: 56px; top: 56px; width: 980px; margin: 0; }
.hero__art--term > .note-card { position: absolute; left: 32px; bottom: 32px; width: 300px; z-index: 2; }
@media (max-width: 1023px) { .hero__art--term > .term--cut { left: 24px; top: 24px; width: 820px; } }
@media (max-width: 639px) { .hero__art--term > .term--cut { left: 16px; top: 16px; width: 640px; } .hero__art--term > .note-card { left: 16px; bottom: 16px; width: 260px; } }

/* ---------------------------------------------------------------- the tool catalogue: one window, seven areas */
.tools-win { margin-top: var(--s-7); background: var(--t3-elev); border: 1px solid var(--t3-line-strong); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.tools-win__bar { height: 36px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--t3-line);
  background: #111; font: 500 13px/1 var(--font-text); color: var(--p-muted); }
.tools-win__title { flex: 1; text-align: center; margin-right: 52px; }
.tl { display: inline-flex; gap: 8px; } .tl i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.tl i:nth-child(2) { background: #febc2e; } .tl i:nth-child(3) { background: #28c840; }
.tools-win__body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.area { padding: 20px 22px 22px; border-right: 1px solid var(--t3-line); border-bottom: 1px solid var(--t3-line); display: grid; align-content: start; gap: 10px; min-width: 0; }
.area:nth-child(4n) { border-right: 0; }
.area:nth-child(n+5) { border-bottom: 0; }
.area__head { display: flex; align-items: center; gap: 8px; }
.area__head b { font-weight: 500; font-size: 15px; color: var(--p-ink); }
.area__head .n { font: 500 12px/20px var(--font-mono); color: var(--p-muted); padding: 0 7px; border-radius: 99px; background: rgba(255, 255, 255, .06); }
.area__head .tag, .tab__tag { margin-left: auto; font: 500 11px/20px var(--font-mono); color: var(--t3-blue); padding: 0 8px; border-radius: 99px; border: 1px solid rgba(97, 147, 255, .35); }
.area p { font-size: 13px; line-height: 1.5; color: var(--p-muted); margin: 0; }
.area ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.area li { font: 400 12px/22px var(--font-mono); color: #d4d4d4; padding: 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid var(--t3-line); }
.area li.gated { color: var(--t3-warn); border-color: rgba(232, 161, 39, .35); }
.area--next li { color: #a9c1ff; }
@media (max-width: 1023px) { .tools-win__body { grid-template-columns: repeat(2, minmax(0, 1fr)); } .area { border-right: 1px solid var(--t3-line) !important; border-bottom: 1px solid var(--t3-line) !important; } }
@media (max-width: 639px) { .tools-win__body { grid-template-columns: minmax(0, 1fr); } .tools-win__title { margin-right: 0; } }

/* ---------------------------------------------------------------- the CLI: head and tabs on one row, the words, one wide window */
.cli__head { align-items: end; }
.cli__words { margin-top: var(--s-6); font: 500 14px/1 var(--font-mono); color: var(--p-muted); }
.cli__words li { padding-inline: 18px; }
.cli__screens { margin-top: var(--s-5); }
.cli__screens .term { width: min(100%, 1060px); margin-inline: auto; }
.cli__line { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- policy keys */
.keys { display: grid; gap: 0; margin: 0; }
.keys > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--t3-line); }
.keys dt { font: 500 13px/1.6 var(--font-mono); color: var(--t3-blue); }
.keys dd { margin: 0; font-size: 15px; color: var(--p-muted); }
@media (max-width: 639px) { .keys > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* a still Terminal frame (no recording): the same type size rule as the player */
.term__pre { margin: 0; white-space: pre; color: #d4d4d4; font-family: var(--term-font);
  font-size: min(calc(100cqw / (var(--cols) * 0.62)), calc(100cqh / (var(--rows) * var(--term-line))));
  line-height: var(--term-line); }
.term__cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: #d4d4d4; opacity: .8; }
#policy .term { max-width: 628px; }

/* the kit's lit ground behind panels, set to t3.codes's dark surfaces (the page is dark only) */
html:root { --ground-bg: #0a0a0a; --ground-surface: #141414; --ground-ink: #f5f5f5; --ground-muted: #a3a3a3; --ground-accent: #6193ff; }
.limits .panel, .steps .panel { background: #141414; }
/* the kit's selected tab is filled ink; in the session list it is a raised row instead */
.tabs--list .tab[aria-selected="true"], .tabs--list .tab[aria-selected="true"]:hover { background: var(--t3-card); border-color: var(--t3-line-strong); color: var(--p-ink); }
.tabs--list .tab[aria-selected="true"] span { color: var(--p-muted); }
.sessions { margin-top: var(--s-6); }
/* the FAQ: six questions on one screen */
#faq .faq > .faq__item { padding: 18px 0; }
#faq .faq__item > h3 { font-size: 18px; }
#faq .faq__item p { font-size: 15px; line-height: 1.55; }

/* features: the hero's result card, the CLI tabs in a row, the eighth catalogue cell */
.hero__art--term > .term--cut { width: 1100px; }
.note-card { background: #111; border: 1px solid var(--t3-line-strong); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6); font-size: 14px; color: var(--p-muted); }
.note-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note-card .note-card__name { margin: 0; font: 500 14px/1.3 var(--font-mono); color: var(--p-ink); }
.note-card .chip { font: 500 12px/22px var(--font-text); color: var(--t3-ok); padding: 0 10px; border-radius: 99px; background: rgba(74, 192, 108, .12); }
.note-card p { margin: 0; display: flex; gap: 8px; } .note-card p i { font-style: normal; color: var(--t3-ok); } .note-card b { color: var(--p-ink); font-weight: 500; }
.cli__head > .tabs { display: flex; flex-wrap: wrap; }
.area--you li { color: var(--p-ink); }
.cli__screens .term { width: min(100%, 1000px); }

/* heights per width (layout-v4.md section 2) */
#install .panel { --p-h: 120px; }
@media (min-width: 1024px) and (max-width: 1279px) { #limits .panel { --p-h: 240px; } }
@media (min-width: 640px) and (max-width: 1279px) { #install { --h: 2; } }
@media (max-width: 639px) {
  #limits .panel { --p-h: 150px; }
  #install .panel { --p-h: 96px; }

}
.cli__words { overflow: hidden; }
@media (min-width: 1024px) and (max-width: 1279px) { #tools { --h: 2; } }
@media (max-width: 1023px) { #policy .term { max-width: none; } }
@media (max-width: 639px) { #tools .area p { display: none; } #tools .area { padding: 14px 16px; gap: 8px; } }
@media (min-width: 640px) and (max-width: 1023px) {
  #install .panel { --p-h: 220px; }
}
@media (max-width: 639px) { #tools .area { padding: 12px 14px; } #tools .area li { font-size: 11px; line-height: 20px; padding: 0 6px; } #tools .area ul { gap: 4px; } }
@media (max-width: 639px) { #tools { --hm: 2; } }
.snip__dim { color: #8f8f8f; }
.term :focus-visible, .term .ap-wrapper:focus-visible, .term .ap-control-bar .ap-button:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; border-radius: 4px; }
#faq .faq > .faq__item { padding: 14px 0; }
/* the tab indicator (motion.js) in the session lists: a raised dark row, not an ink pill */
.tabs--list .m-tab-ind { background: var(--t3-card); box-shadow: inset 0 0 0 1px var(--t3-line-strong); border-radius: var(--r-sm); }
.term .ap-wrapper:focus-visible { outline: 2px solid var(--p-action) !important; outline-offset: 2px !important; }
@media (max-width: 359px) { .nav:not(.is-open) .nav__actions { display: none; } }
/* the session list: rows on the left line, closed by a rule; the shown one in ink */
.tabs--list { gap: 0; }
.tabs--list .m-tab-ind { display: none; }
.tabs--list .tab, .tabs--list .tab:hover, .tabs--list .tab[aria-selected="true"], .tabs--list .tab[aria-selected="true"]:hover {
  padding: 14px 0; border: 0; border-bottom: 1px solid var(--t3-line); border-radius: 0; background: transparent; }
.tabs--list .tab b { color: var(--p-muted); transition: color .18s; }
.tabs--list .tab:hover b, .tabs--list .tab[aria-selected="true"] b { color: var(--p-ink); }
.tabs--list .tab[aria-selected="true"] b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-radius: 50%; background: var(--t3-ok); vertical-align: 2px; }
@media (min-width: 1280px) { #install .panel { --p-h: 220px; } }
#faq .faq--a > .faq__item:last-child { border-bottom: 1px solid var(--line); } @media (min-width: 640px) { #faq .faq--b > .faq__item:first-child { padding-top: 14px; } }
/* the hero window runs the wrap's width; the screen keeps its cols x rows shape in the middle, as a wide Terminal window does */
.hero--centred .hero__window--term > .term--hero { width: 100%; height: 100%; display: flex; flex-direction: column; }
.term--hero .term__body { flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; }
.term--hero .term__screen { height: 100%; width: auto; max-width: 100%; }
/* features: the hero window narrower so its centred title shows; the catalogue a little tighter; the phone keeps area names */
.hero__art--term > .term--cut { width: 900px; }
.tools-win { margin-top: var(--s-5); }
.area { padding: 16px 18px 18px; gap: 8px; }
.area p { font-size: 12.5px; line-height: 1.45; }
.area ul { gap: 4px; }
.area li { font-size: 11.5px; line-height: 20px; padding: 0 7px; }
@media (max-width: 639px) { #tools .area ul, #tools .area p { display: none; } #tools { --hm: 1; } }
.tools-win { background: transparent; }
@media (max-width: 639px) { #tools .area { padding: 20px 16px; } }
#policy .term { max-width: none; }
/* the CLI window runs the wrap's width like the hero's; its 136 x 28 screen keeps its shape in the middle */
.cli__screens .term { width: 100%; }
.cli__screens .term .term__body { display: flex; justify-content: center; }
.cli__screens .term .term__screen { width: min(100%, 1060px); }
#next .mo-pc__visuals { background: transparent; border-color: transparent; box-shadow: none; }

/* ---------------------------------------------------------------- hero: the release notice as a marquee
   The notice moves slowly to the left in a loop and fades at both edges. The track holds four copies,
   two per half, so moving it by half its width loops without a jump. It stops under the pointer, while
   a control inside it has focus, and with the pause button (WCAG 2.2.2). Screen readers get the
   sentence once, from the .sr-only copy. Under reduced motion one copy stands still and wraps. */
.hero-marquee { display: flex; align-items: center; gap: var(--s-3); width: min(100%, 560px); contain: inline-size; }
.hero-marquee__viewport {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.hero-marquee__track { display: flex; width: max-content; animation: hero-marquee 36s linear infinite; }
.hero-marquee__item { white-space: nowrap; padding-inline-end: 4em; }
.hero-marquee:hover .hero-marquee__track,
.hero-marquee:focus-within .hero-marquee__track,
.hero-marquee.is-paused .hero-marquee__track { animation-play-state: paused; }
@keyframes hero-marquee { to { transform: translateX(-50%); } }
.hero-marquee__pause {
  position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px;
  margin: 0; padding: 0; border-radius: 50%; cursor: pointer; color: var(--p-muted);
  border: 1px solid var(--t3-line-strong); background: transparent;
}
.hero-marquee__pause::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.hero-marquee__pause:hover { color: var(--p-ink); }
.hero-marquee__pause svg { width: 10px; height: 10px; fill: currentColor; }
.hero-marquee__pause .i-play, .hero-marquee.is-paused .i-pause { display: none; }
.hero-marquee.is-paused .i-play { display: inline; }
@media (prefers-reduced-motion: reduce) {
  .hero-marquee__viewport { -webkit-mask-image: none; mask-image: none; }
  .hero-marquee__track { animation: none; width: auto; }
  .hero-marquee__item { white-space: normal; padding: 0; }
  .hero-marquee__item + .hero-marquee__item, .hero-marquee__pause { display: none; }
}

/* ---------------------------------------------------------------- hero: a scroll hint under the buttons
   On a wide screen the features hero fills the window, so a link under its buttons says what comes
   next and jumps to it. The arrow bobs slowly; under reduced motion it stands still. On a phone the
   cut-off window under the buttons already shows there is more, so the hint is hidden. */
.scroll-hint {
  display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-8);
  font-size: var(--t-small); font-weight: 500; color: var(--p-muted); text-decoration: none;
}
.scroll-hint:hover, .scroll-hint:focus-visible { color: var(--p-ink); }
.scroll-hint svg { width: 16px; height: 16px; animation: scroll-hint 2.4s ease-in-out infinite; }
@keyframes scroll-hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint svg { animation: none; } }
@media (max-width: 1023px) { .scroll-hint { display: none; } }
