/* Home page. The example maps use the editor's card, arrow, comment and colour styles. */
:root{--paper:#f6f8fc;--ink:#18233b;--body:#4a566c;--muted:#75809a;--line:#dfe4ee;--blue:#1764b5;--grid:#d3dae8;--sans:'DM Sans',system-ui,sans-serif;--serif:Literata,Georgia,serif}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--body);font:400 17px/1.65 var(--sans);font-synthesis:none;-webkit-font-smoothing:antialiased}
a{color:inherit}
a:focus-visible,button:focus-visible,[tabindex]:focus-visible{outline:3px solid #9fc8ed;outline-offset:3px}
.wrap{max-width:1240px;margin:0 auto;padding-left:32px;padding-right:32px}
.card-kind{display:block;font-size:11.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:#8590a5}

.masthead{display:flex;align-items:center;justify-content:space-between;padding-top:20px;padding-bottom:20px}
.brand{display:flex;align-items:center;gap:10px;font-weight:650;font-size:16px;letter-spacing:-.01em;color:var(--ink);text-decoration:none}
.button{display:inline-block;background:var(--blue);color:#fff;font-weight:550;font-size:16px;text-decoration:none;padding:12px 22px;border-radius:10px;box-shadow:0 3px 10px #1764b52e;transition:background .16s,transform .16s}
.button:hover{background:#105397}
.button:active{transform:translateY(1px)}
.masthead .button{font-size:15px;padding:10px 18px}

main{padding-top:14px;padding-bottom:96px}
.hero-head{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:48px;align-items:end;margin-bottom:40px}
h1{margin:0;color:var(--ink);font-size:clamp(36px,4.6vw,60px);font-weight:600;line-height:1.02;letter-spacing:-.045em}
h1 em{display:block;font:italic 400 1em/1.1 var(--serif);letter-spacing:-.03em;color:var(--blue)}
.hero-lede p{margin:0;max-width:460px}

/* Scenes share one grid cell, so the stage keeps the height of the tallest; each is laid out its own way. */
html,body{overflow-x:clip}
.ticks{position:relative;z-index:3;display:flex;justify-content:flex-end;max-width:1176px;margin:0 auto -4px}
html:not(.js) .ticks{display:none}
.tick{position:relative;appearance:none;box-sizing:content-box;width:26px;height:2px;margin:0;padding:16px 4px;border:0;border-radius:3px;background:none;cursor:pointer}
.tick::before,.tick .bar{content:'';position:absolute;left:4px;top:16px;height:2px;border-radius:2px}
.tick::before{right:4px;background:#d0d8e6;transition:background .2s}
.tick:hover::before{background:#aebad0}
.tick .bar{width:0;background:var(--blue)}
.tick[aria-current="true"] .bar{width:26px}
.ticks.auto .tick[aria-current="true"] .bar{animation:fill var(--dwell,11s) linear both}
.tick:nth-child(2){--dwell:14.6s}
.ticks.auto.paused .bar{animation-play-state:paused}
@keyframes fill{from{width:0}to{width:26px}}
/* The scenes may run wider than the text column when the window allows. */
.scenes{--wide:min(1440px,100vw - 64px);margin:0 calc((100% - var(--wide))/2)}
.stage{display:grid;grid-template-columns:minmax(0,1fr);touch-action:pan-y}
.scene{margin-bottom:64px;isolation:isolate}
.scene h2{margin:0 0 6px;font-size:26px;font-weight:600;line-height:1.2;letter-spacing:-.03em;color:var(--ink)}
.blurb{margin:0;font-size:15.5px;line-height:1.55;color:var(--muted)}
.js .scene{grid-area:1/1;min-height:600px;margin:0;opacity:0;visibility:hidden;transform:translateX(80px);transition:opacity .4s ease,transform .9s cubic-bezier(.22,1,.36,1),visibility 0s .4s}
.js .scene.past{transform:translateX(-80px)}
.js .scene.active{opacity:1;visibility:visible;transform:none;transition:opacity .7s ease .12s,transform .9s cubic-bezier(.22,1,.36,1)}

/* Scene one: a piece of writing and its map, on an open canvas that fades into the page. */
.scene-map{position:relative;display:grid;grid-template-columns:minmax(0,400px) minmax(0,1fr);align-items:center;align-content:center;gap:30px 56px}
.scene-map::before{content:'';position:absolute;top:-40px;bottom:-60px;left:calc(50% - 50vw);width:100vw;z-index:-1;pointer-events:none;background:radial-gradient(#c6cfe0 .9px,transparent .9px) 0 0/22px 22px;-webkit-mask-image:radial-gradient(ellipse 40% 62% at 62% 45%,#000 35%,transparent 100%);mask-image:radial-gradient(ellipse 40% 62% at 62% 45%,#000 35%,transparent 100%)}
/* The notes sit on a sheet of paper, with the edge of a second page showing beneath it. */
.passage{position:relative;background:#fff;border:1px solid #e1e6ef;border-radius:5px;padding:34px 36px 40px;box-shadow:0 1px 2px #34435c0d,0 14px 36px #34435c17}
.passage::before{content:'';position:absolute;inset:6px -5px -6px 5px;z-index:-1;background:#fbfcfe;border:1px solid #e6eaf2;border-radius:5px}
.passage .passage-title{margin:0 0 14px;font:500 24px/1.25 var(--serif);letter-spacing:-.01em;color:var(--ink)}
.passage-label{display:block;margin-bottom:10px;font-size:11.5px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:#8590a5}
.passage p{margin:0;font:400 17.5px/1.72 var(--serif);color:#2c3850}
.passage [data-ref]{border-radius:3px;background:linear-gradient(#c9d6ea,#c9d6ea) 0 100%/100% 1px no-repeat;cursor:default;-webkit-box-decoration-break:clone;box-decoration-break:clone;transition:background-color .18s,box-shadow .18s}
.passage [data-ref].lit{background-color:#dfeaf8;box-shadow:0 0 0 3px #dfeaf8}
.card.lit{border-color:var(--blue);box-shadow:0 0 0 4px #1764b526,0 8px 24px #34435c12}

/* Scene two: a conversation, overlapping the window it is about. */
.scene-agent{display:grid;grid-template-columns:minmax(0,390px) minmax(0,1fr);align-items:center;width:100%;max-width:1280px;justify-self:center}
.agent-side{position:relative;z-index:1;margin-right:-52px}
.agent-side .blurb{max-width:320px;margin-bottom:28px}
.window{background:#fafbfe radial-gradient(var(--grid) .75px,transparent .75px) 0 0/22px 22px;border:1px solid var(--line);border-radius:22px;box-shadow:0 60px 100px -50px #1d2b4a47,0 18px 36px -24px #1d2b4a24;overflow:hidden}
.window-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;height:48px;padding:0 22px;background:#fff;border-bottom:1px solid var(--line);font-size:14px}
.window-title{font-weight:550;color:#424d61;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.saved{display:flex;align-items:center;gap:5px;font-size:12.5px;color:var(--muted)}
.saved svg{width:15px;height:15px;fill:none;stroke:#39845a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.window-body{padding:44px 32px 44px 88px}

/* Scene three: three kinds of card, set out side by side. */
.scene-kinds{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.scene-kinds .blurb{max-width:440px;margin-bottom:46px}
.specimens{display:grid;grid-template-columns:repeat(3,minmax(0,310px));gap:40px;align-items:start;text-align:left}
.specimens figure{margin:0}
.specimens figure:nth-child(2){margin-top:46px}
.specimens figure:nth-child(3){margin-top:14px}
.specimens .card{max-width:none;min-height:156px;margin:0;padding:17px 22px 24px;border-radius:14px;font-size:18.5px;box-shadow:0 34px 56px -30px #1d2b4a45,0 4px 14px #34435c0d}
.specimens .card.implicit{box-shadow:none}
.specimens .card-kind{margin-bottom:9px;font-size:12.5px}
.specimens figcaption{margin-top:18px;padding:0 4px;font-size:14.5px;line-height:1.5;color:var(--muted)}

/* A map: landing.js places the cards and draws the arrows. */
.map{position:relative}
.world{transform-origin:0 0}
.card{position:relative;margin:0 0 12px;max-width:320px;padding:11px 15px 14px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 14px #34435c0a,0 1px 2px #34435c08;font-size:15px;line-height:1.5;color:var(--ink);transition:border-color .18s,box-shadow .18s,opacity .18s}
.card p{margin:0}
.card-kind{margin-bottom:5px}
.kind-icon{width:14px;height:14px;margin-right:6px;vertical-align:-2.5px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;opacity:.75}
.card.root .card-kind{color:#2568ad}
.card.implicit{border:1.5px dashed #9eabc2;box-shadow:none}
.js .map:not(.ready){visibility:hidden}
.js .world{position:absolute;left:0;top:0}
.js .world .card{position:absolute;margin:0;max-width:none}
.edges{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.edges path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.edges .draw{stroke-linecap:butt}
.edges [data-kind]{transition:opacity .18s}
.junction circle,.junction polygon{stroke:#fff;stroke-width:3}
.junction text{fill:#fff;font:600 15px var(--sans)}
.edge-label{font:400 12px var(--sans);fill:#798399}

/* Comments, as the editor shows them: a pin on the card and the thread it opens. */
.author{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #dfe5ee}
.author-icon{display:block;width:14px;height:14px}
/* A card an agent added carries that agent's icon in its corner. */
.added-by{position:absolute;top:9px;right:10px}
.pin{position:absolute;top:-13px;right:-13px;display:inline-flex;align-items:center;gap:4px;justify-content:center;height:28px;min-width:28px;padding:0 6px;border:1px solid #b9c6d8;border-radius:14px 14px 14px 4px;background:#fff;font-size:12px;font-weight:600;color:#48536a;box-shadow:0 2px 8px #2633541f}
.tool svg{width:15px;height:15px;fill:none;stroke:#39845a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.popover{width:300px;margin-top:12px;padding:12px 16px 14px;background:#fff;border:1px solid #dfe5ee;border-radius:4px 14px 14px 14px;box-shadow:0 18px 48px #26335424,0 3px 10px #2633540f;font-size:14px;line-height:1.55;color:#253044}
.js .popover{position:absolute;left:256px;top:34px;margin:0}
.popover p{margin:0}
.comment-head{margin-bottom:10px;font-size:12px;font-weight:650;letter-spacing:.1em;text-transform:uppercase;color:#8992a3}
.comment-author{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:13px}
.comment-author strong{font-weight:600;color:#334057}
.replies{margin-top:10px;padding-left:12px;border-left:2px solid #e6e9f0;font-size:13.5px}
.replies .comment-author{margin-bottom:3px;font-size:12px}
.comment-actions{display:flex;gap:6px;margin-top:12px;font-size:13px;font-weight:500;color:#68758a}
.comment-actions span{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid transparent;border-radius:14px}
.comment-actions .resolve{border-color:#d5dde9;color:#334057}
.comment-actions .icon{width:28px;padding:0;justify-content:center}
.comment-actions svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* The agent's side of the same moment: a short exchange in its own app. */
.chat{padding:16px 20px 22px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 50px -24px #1d2b4a38;font-size:16px;line-height:1.5;color:var(--ink)}
.chat-head{display:flex;align-items:center;gap:8px;margin-bottom:16px;padding-bottom:13px;border-bottom:1px solid var(--line);font-size:14.5px;font-weight:600}
/* Two agents take turns: the second conversation arrives on top of the first, which stays as an edge behind it. */
.js .chats{display:grid}
.js .chat{grid-area:1/1}
.js .chat.second{position:relative;z-index:1}
.js .chat.first{transform-origin:50% 0;transform:translateY(-13px) scale(.94);opacity:.6}
.js .leaves{opacity:0}
.chat+.chat{margin-top:16px}
.js .chat+.chat{margin-top:0}
.say{margin:10px 0 0}
.say.me{width:fit-content;max-width:88%;margin:0 0 14px auto;padding:9px 13px;background:#edf3fb;border-radius:14px 14px 4px 14px}
.tool{display:flex;align-items:center;gap:7px;margin:0 0 6px;font-size:14px;color:var(--muted)}

/* A scene plays in each time it opens; --d is each part's start time, set on the part or its figure. */
@keyframes rise{from{opacity:0;transform:translateY(8px)}}
@keyframes fade{from{opacity:0}}
@keyframes show{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes appear{from{opacity:0}to{opacity:1}}
/* The marker is ringed while its comment is open, as in the editor. */
@keyframes open{from,to{border-color:var(--blue);box-shadow:0 0 0 3px #1764b51f,0 2px 8px #2633541f}}
@keyframes leave{from{opacity:1}to{opacity:0}}
@keyframes recede{from{transform:none;opacity:1}}
@keyframes draw{0%{stroke-dashoffset:1;opacity:0}2%{opacity:1}100%{stroke-dashoffset:0}}
.js .scene.active :is(.card,.say,.tool,.popover,figcaption){animation:rise .5s cubic-bezier(.16,1,.3,1) var(--d,0ms) backwards}
.js .scene.active :is(.junction,.edge-label,.pin){animation:fade .3s ease var(--d,0ms) backwards}
.js .scene.active .chat.second{animation:rise .6s cubic-bezier(.16,1,.3,1) var(--d,0ms) backwards}
.js .scene.active .chat.first{animation:recede .6s cubic-bezier(.22,1,.36,1) var(--out) backwards}
.js .scene.active .popover.leaves{animation:show .5s cubic-bezier(.16,1,.3,1) var(--d,0ms) both,leave .4s ease var(--out) forwards}
.js .scene.active .edge-label.leaves{animation:appear .3s ease var(--d,0ms) both,leave .4s ease var(--out) forwards}
.js .scene.active .pin{animation:fade .3s ease var(--d,0ms) backwards,open calc(var(--out) - var(--open)) step-end var(--open)}
.js .scene.active .draw{stroke-dasharray:1;animation:draw .55s ease var(--d,0ms) backwards}
.js .scene.active .head{animation:fade .2s ease calc(var(--d,0ms) + .45s) backwards}


@media(max-width:1040px){
 .scene-map{grid-template-columns:minmax(0,330px) minmax(0,1fr);column-gap:32px}
 .passage{padding:26px 26px 30px}
 .passage p{font-size:16.5px}
 .hero-head{grid-template-columns:minmax(0,1fr);gap:22px;align-items:start;margin-bottom:28px}
 .scene-agent{grid-template-columns:minmax(0,330px) minmax(0,1fr)}
 .window-body{padding:36px 24px 36px 72px}
 .specimens{gap:24px}
 .specimens .card{font-size:17px}
}
@media(max-width:900px){
 .scene-map{grid-template-columns:minmax(0,1fr)}
 .passage{max-width:560px}
 .scene-agent{grid-template-columns:minmax(0,1fr);align-content:center;gap:22px}
 .agent-side{margin-right:0}
 .chat{max-width:460px}
 .window-body{padding:30px 24px}
}
@media(max-width:700px){
 .js .scene{min-height:0}
 .specimens{grid-template-columns:minmax(0,340px);gap:24px}
 .specimens figure:nth-child(n){margin-top:0}
 .specimens .card{min-height:0}
 .scene-kinds .blurb{margin-bottom:30px}
 /* The map keeps a readable size and pans sideways, as it does in the editor. */
 .map{overflow-x:auto;overflow-y:hidden;margin-left:-14px;margin-right:-14px;scrollbar-width:none}
 .map::-webkit-scrollbar{display:none}
}
@media(max-width:600px){
 body{font-size:16px}
 .wrap{padding-left:18px;padding-right:18px}
 .scenes{--wide:100%}
 main{padding-top:12px;padding-bottom:56px}
 .scene h2{font-size:23px}
 .window-body{padding:24px 14px}
 .window-bar{padding:0 16px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
