/* easel.d-t-it.com. Built from the approved design (docs/design/screens/site-*.html): direction A "Three answers", with the app
   switch of direction B in section 3.
   Type: 13 (mono labels), 14 (captions, UI), 16 (body), 20 (lead), 20 (h3), 44 (h2), 56 (h1). Nothing under 13.
   Colour: Easel's own tokens (app/src/style.css, the light theme and the dark one), following the system setting.
   One element per screen carries --accent: the demo command's Copy on the first screen. */

:root {
  color-scheme: light dark;
  --bg: #ebeae6; --panel: #ffffff; --panel-2: #f6f5f2; --hover: #efeee9; --pressed: #e4e3dd;
  --line: #dddcd6; --line-strong: #8a8982; --text: #111111; --muted: #5c5c58;
  --accent: #b84608; --accent-text: #ffffff; --select: #1f5fd6; --select-weak: #dfe8fb;
  --cmd-bg: #111111; --cmd-text: #ffffff; --cmd-dim: #8a8982; --cmd-btn: rgba(255, 255, 255, 0.14);
  --r-sm: 4px; --r: 8px; --r-lg: 12px;
  --float: 0 0 0 1px rgba(17, 17, 17, 0.06), 0 2px 4px rgba(17, 17, 17, 0.04), 0 12px 32px -12px rgba(17, 17, 17, 0.2);
  --frame-rest: 0 0 0 1px rgba(17, 17, 17, 0.05), 0 8px 24px -12px rgba(17, 17, 17, 0.16);
  --shadow-1: 0 0 0 1px rgba(17, 17, 17, 0.05), 0 1px 2px rgba(17, 17, 17, 0.06);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", Pretendard, sans-serif;
  --wrap: min(1200px, 100% - 80px);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615; --panel: #232322; --panel-2: #2c2c2a; --hover: #323230; --pressed: #3b3b39;
    --line: #383835; --line-strong: #7a7a73; --text: #f3f3f0; --muted: #a9a9a3;
    --accent: #f07a3a; --accent-text: #111111; --select: #6f9df5; --select-weak: #213258;
    --cmd-bg: #0c0c0b; --cmd-text: #f3f3f0; --cmd-dim: #7a7a73; --cmd-btn: rgba(255, 255, 255, 0.12);
    --float: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 2px 4px rgba(0, 0, 0, 0.32), 0 16px 40px -12px rgba(0, 0, 0, 0.72);
    --frame-rest: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 8px 24px -12px rgba(0, 0, 0, 0.64);
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
p, h1, h2, h3, ol, ul, figure, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
code, .mono, pre { font-family: var(--mono); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; border-radius: var(--r-sm); }
.skip { position: absolute; left: 16px; top: 12px; transform: translateY(-200%); z-index: 10; padding: 10px 14px; border-radius: var(--r); background: var(--panel); box-shadow: var(--float); font-size: 14px; }
.skip:focus { transform: none; }

/* ---------- Frame ---------- */
.wrap { width: var(--wrap); margin-inline: auto; }
.nav { display: flex; align-items: center; gap: 12px; height: 72px; }
.mark { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.ver { font: 13px/16px var(--mono); color: var(--muted); }
.links { margin-left: auto; display: flex; gap: 4px; margin-right: -12px; }
.navlink { display: inline-flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--r); font-size: 14px; text-decoration: none; }
.navlink:hover { background: var(--hover); }
.sec { padding: 112px 0; }
.sec.panel { background: var(--panel); }
.sec:not(.panel) + .sec:not(.panel) { border-top: 1px solid var(--line); }
.sec.panel + .sec.panel { border-top: 1px solid var(--line); }

/* ---------- Type ---------- */
.h1 { font-size: 56px; line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.h2 { font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: 20px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.body { font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.label, .kicker { font: 13px/18px var(--mono); color: var(--muted); }
.kicker { margin-bottom: 16px; }
.head { max-width: 760px; margin-bottom: 48px; }
.head .lead { margin-top: 16px; }
.row-head { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ulink { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.ulink:hover { text-decoration-color: currentColor; }
.ulink.strong { color: var(--text); }
.inl { font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }

/* ---------- Command block: dark, wraps instead of cutting ---------- */
.cmd { display: flex; align-items: flex-start; gap: 12px; padding: 8px 8px 8px 20px; min-height: 60px; border-radius: var(--r-lg); background: var(--cmd-bg); color: var(--cmd-text); font: 15px/22px var(--mono); box-shadow: 0 0 0 1px var(--line); }
.cmd .p { color: var(--cmd-dim); padding-top: 11px; user-select: none; }
.cmd code { flex: 1; min-width: 0; padding: 11px 0; white-space: pre-wrap; overflow-wrap: break-word; }
.copy { display: none; flex: none; align-items: center; justify-content: center; height: 44px; min-width: 84px; padding: 0 16px; border: 0; border-radius: var(--r); background: var(--cmd-btn); color: var(--cmd-text); font: 600 14px/1 var(--sans); cursor: pointer; }
.js .copy { display: inline-flex; }
.copy:hover { filter: brightness(1.15); }
.copy[data-accent] { background: var(--accent); color: var(--accent-text); }
.copy[data-done] { min-width: 84px; }
.cmd.light { background: var(--panel); color: var(--text); }
.cmd.light .p { color: var(--muted); }
.cmd.light .copy { background: var(--hover); color: var(--text); }
.cmdnote { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- 1 · The three answers ---------- */
.hero { --pw: clamp(168px, calc((100svh - 412px) * 0.462), 216px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 440px) auto; justify-content: space-between; gap: 40px; padding: 28px 0 64px; min-height: min(calc(100svh - 72px), 908px); align-items: center; }
.hero-text { padding-bottom: 40px; }
.hero-lead { margin-top: 24px; }
.hero-cmd { margin-top: 32px; }
.prompt { display: flex; gap: 14px; align-items: baseline; padding: 16px 20px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--float); }
.prompt .label { flex: none; }
.prompt q { font-size: 15px; line-height: 1.45; quotes: "\201C" "\201D"; }
.hero-run { width: calc(var(--pw) * 3 + 72px); }
.answers { display: grid; grid-template-columns: repeat(3, var(--pw)); gap: 36px; margin-top: 28px; }
.ans { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ans .who { display: flex; align-items: baseline; gap: 8px; height: 24px; white-space: nowrap; }
.ans .who b { font-size: 16px; font-weight: 600; }
.ans .who .t { font: 15px/1 var(--mono); }
.ans .who .f { margin-left: auto; font: 13px/1 var(--mono); color: var(--muted); }
.phone { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: calc(var(--pw) * 0.1); overflow: hidden; background: #0b0b0b; box-shadow: var(--frame-rest); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity 240ms var(--ease); }
.phone iframe.ready { opacity: 1; }
/* Easel's own "Use this one", drawn at the app's size: it shows what you press in Easel, not a button on this page */
.use { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; white-space: nowrap; }
.use svg { width: 14px; height: 14px; }
.run-note { margin-top: 18px; }
.dots { display: none; }

/* ---------- 2 · How it happened ---------- */
.run-prompt, .tl-phone { display: none; }
.tl { --name: 160px; }
.tl-axis { margin-left: var(--name); height: 28px; border-bottom: 1px solid var(--line); }
.tl-ticks, .tl-track { position: relative; margin-right: 72px; height: 100%; }
.tl-ticks span { position: absolute; bottom: 6px; transform: translateX(-50%); font: 13px/1 var(--mono); color: var(--muted); }
.tl-ticks span:first-child { transform: none; }
.tl-lane { display: flex; align-items: center; height: 76px; border-bottom: 1px solid var(--line); }
.tl-name { width: var(--name); flex: none; }
.tl-name b { display: block; font-size: 16px; font-weight: 600; }
.tl-name span { font: 13px/18px var(--mono); color: var(--muted); }
.tl-track { flex: 1; }
.bar { position: absolute; left: 0; top: 34px; height: 8px; border-radius: 4px; background: var(--pressed); }
.ev { position: absolute; top: 30px; width: 2px; height: 16px; margin-left: -1px; background: var(--text); }
.ev.w { width: 10px; margin-left: -5px; border-radius: 3px; }
.ev.placed { opacity: 0.4; }
.tag { position: absolute; top: 8px; font: 13px/16px var(--mono); white-space: nowrap; }
.tag.below { top: 52px; color: var(--muted); }
.tag.flip { transform: translateX(-100%); }
.end { position: absolute; top: 26px; padding-left: 12px; font: 600 15px/24px var(--mono); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.lg { display: inline-block; width: 2px; height: 14px; background: var(--text); vertical-align: -2px; margin-right: 8px; }
.lg.w { width: 10px; border-radius: 3px; }
.lg.placed { opacity: 0.4; }
.comments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.said { margin-top: 6px; font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.run-foot { margin-top: 32px; }

/* ---------- 3 · Where it opens ---------- */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--pressed); margin-bottom: 32px; }
.seg-btn { display: none; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.js .seg-btn { display: inline-flex; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-selected="true"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04); }
html:not(.js) .seg { display: none; }
.apps { display: grid; gap: 64px; }
.app { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px 48px; align-items: start; }
.app-cmds { grid-column: 1 / -1; display: grid; gap: 12px; }
.js .app[hidden] { display: none; }
.win { min-width: 0; }
.shot { border-radius: var(--r); overflow: hidden; box-shadow: var(--frame-rest); background: var(--panel); }
.shot img { width: 100%; height: auto; }
.r1610 { aspect-ratio: 16 / 10; }
.r1610 img { height: 100%; object-fit: cover; }
.cap { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cap b { color: var(--text); font-weight: 600; }
.app-text { display: grid; gap: 16px; }
.app-text .h3 { font-size: 24px; }
.steps { counter-reset: s; display: grid; gap: 10px; }
.steps li { position: relative; padding-left: 32px; font-size: 16px; line-height: 1.45; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); font: 600 13px/20px var(--sans); text-align: center; }
.steps code, .app-text .body code { font-size: 14px; padding: 1px 5px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); }
.ev-note { padding: 14px 16px; border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow-1); font-size: 14px; line-height: 1.5; color: var(--muted); }
.ev-note pre { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }

/* ---------- 4 · Install ---------- */
.install { display: grid; gap: 20px; }
.irow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.iname { padding-top: 10px; }
.iname b { font-size: 18px; font-weight: 600; }
.iname .small { margin-top: 4px; }
.iname code { font-size: 13px; }
.more { margin-top: 28px; }

/* ---------- 5 · On the canvas ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.sec.panel .shot { background: var(--bg); }

/* ---------- 6 · Share and embed ---------- */
.share { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 64px; align-items: start; }
.share .lead { margin-top: 16px; }
.code { margin: 28px 0 14px; padding: 16px 20px; border-radius: var(--r); background: var(--panel); box-shadow: 0 0 0 1px var(--line); font: 14px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.code .c { color: var(--muted); }
.embed { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; box-shadow: var(--frame-rest); background: var(--panel); }
.embed img { width: 100%; height: 100%; object-fit: cover; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 240ms var(--ease); }
.embed iframe.ready { opacity: 1; }

/* ---------- 7 · Open source ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: var(--r); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn.ink { background: var(--text); color: var(--panel); }
.btn.ink:hover { opacity: 0.88; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.fact b { display: block; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.fact span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.fact b span { display: inline; margin: 0; font-size: inherit; color: inherit; }

.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.foot-mark { color: var(--text); font-size: 16px; }
.foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { text-underline-offset: 3px; }
.tm { margin-top: 12px; font-size: 13px; }

/* ---------- Narrower desktops and tablets ---------- */
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); justify-content: stretch; min-height: 0; max-height: none; gap: 40px; padding-top: 24px; }
  .hero-text { max-width: 640px; padding-bottom: 0; }
  .hero { --pw: calc((min(100vw - 80px, 760px) - 72px) / 3); }
  .app { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .app-text { max-width: 640px; }
  .share { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .share > div:first-child { max-width: 640px; }
}
@media (max-width: 900px) {
  .tl { --name: 120px; }
  .comments { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .grid3 { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 560px; }
  .irow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .h1 { font-size: 48px; }
  .h2 { font-size: 36px; }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  :root { --wrap: calc(100% - 32px); }
  .nav { height: 56px; }
  .links .navlink:not(.gh) { display: none; }
  .h1 { font-size: 32px; line-height: 1.08; letter-spacing: -0.025em; }
  .h2 { font-size: 28px; line-height: 1.12; }
  .lead { font-size: 16px; }
  .sec { padding: 64px 0; }
  .head { margin-bottom: 32px; }
  /* First screen: the headline, then the three answers to swipe, then the command */
  .hero { --pw: 190px; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 48px; }
  .hero-text, .hero-run { display: contents; }
  .hero-text .h1 { order: 1; }
  .answers { order: 2; margin: 20px -16px 0; padding: 0 16px; grid-template-columns: repeat(3, 190px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .answers::-webkit-scrollbar { display: none; }
  .ans { scroll-snap-align: start; }
  .use { display: none; }
  .dots { order: 3; display: flex; align-items: center; justify-content: center; gap: 8px; height: 28px; margin-top: 8px; }
  .dots span:not(.label) { width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong); transition: width 160ms var(--ease); }
  .dots span.on { width: 20px; background: var(--text); }
  .dots .label { margin-left: 8px; }
  .hero-cmd { order: 4; margin-top: 16px; }
  .hero-prompt { display: none; }
  .run-note { order: 5; margin-top: 24px; }
  .hero-lead { order: 6; margin-top: 16px; }
  .cmd { padding: 6px 6px 6px 14px; font-size: 13px; line-height: 20px; gap: 8px; }
  .cmd .p { padding-top: 12px; }
  .cmd code { padding: 12px 0; }
  .copy { min-width: 72px; padding: 0 12px; }
  /* How it happened: one block per agent */
  .tl-wide { display: none; }
  .run-prompt { display: block; margin-bottom: 24px; padding: 14px 16px; }
  .run-prompt .label { display: block; margin-bottom: 4px; }
  .run-prompt q { font-size: 14px; }
  .tl-phone { display: grid; gap: 22px; }
  .pr-head { display: flex; align-items: baseline; gap: 8px; }
  .pr-head .mono { font-size: 15px; }
  .pr-head .label { margin-left: auto; }
  .mini { position: relative; height: 18px; margin-top: 8px; }
  .mini .bar { top: 5px; }
  .mini .ev { top: 1px; }
  .mini .ev.w { width: 8px; margin-left: -4px; border-radius: 2px; }
  .pr .said { font-size: 14px; color: var(--muted); }
  .seg { display: flex; width: 100%; }
  .seg-btn { flex: 1; padding: 6px 8px; font-size: 14px; line-height: 1.25; text-align: center; }
  .app-text .h3 { font-size: 20px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .foot-links { margin-left: 0; }
  .row-head { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
