:root {
  color-scheme: light dark;
  --bg: #fff;
  --ink: #202124;
  --muted: #5a5f66;
  --link: #1a0dab;
  --visited: #609;
  --url: #0a6b2a;
  --line: #dfe1e5;
  --soft: #f6f8fa;
  --bar: #ebeff9;
  --bar-line: #6b90da;
  --gbar-line: #c9d7f1;
  --blue: #1a66d6;
  --red: #d93025;
  --yellow: #e8a800;
  --green: #128a3e;
  --pip-off: #dfe3ea;
  --btn-a: #fafafa;
  --btn-b: #e6e6e6;
  --btn-line: #b9b9b9;
  --btn-ink: #202124;
  --cta: #1a5fd0;
  --cta-b: #164fb0;
  --cta-ink: #fff;
  --ok: #0a6b2a;
  --shadow: 0 1px 2px rgba(20, 30, 60, .08), 0 6px 18px rgba(20, 30, 60, .07);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --serif: Cardo, "Book Antiqua", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 7.5vw, 132px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1c1f;
    --ink: #e8eaed;
    --muted: #a3a9b1;
    --link: #8ab4f8;
    --visited: #c9a3f7;
    --url: #7fcf97;
    --line: #3a3d42;
    --soft: #25272b;
    --bar: #232a3a;
    --bar-line: #5479c7;
    --gbar-line: #33405c;
    --blue: #6ea1f7;
    --red: #f2796e;
    --yellow: #f6c342;
    --green: #5fca83;
    --pip-off: #3a3e46;
    --btn-a: #3a3d43;
    --btn-b: #2e3136;
    --btn-line: #5a5e66;
    --btn-ink: #e8eaed;
    --cta: #8ab4f8;
    --cta-b: #6ea1f7;
    --cta-ink: #10203f;
    --ok: #7fcf97;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: clamp(17px, 12px + .55vw, 20px)/1.55 var(--sans);
  overflow-wrap: break-word;
}
::selection { background: #c5d8fb; color: #10203f; }
a { color: var(--link); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:visited { color: var(--visited); }
a:focus-visible, button:focus-visible, pre:focus-visible, .table-wrap:focus-visible, main:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}
main:focus { outline: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: .5em 1em; z-index: 5; }
.skip:focus { left: 8px; top: 8px; }
.l-b { color: var(--blue); } .l-r { color: var(--red); } .l-y { color: var(--yellow); } .l-g { color: var(--green); }

/* The thin bar across the top */
.gbar {
  display: flex; gap: 1.1em; align-items: center;
  padding: .45em var(--gutter);
  border-bottom: 1px solid var(--gbar-line);
  font-size: .8em; white-space: nowrap; overflow-x: auto; scrollbar-width: none;
}
.gbar::-webkit-scrollbar { display: none; }
.gbar a, .gbar a:visited { color: var(--link); }
.gbar a[aria-current] { color: var(--ink); font-weight: bold; text-decoration: none; }
.gbar-right { margin-left: auto; padding-left: 1.5em; }

/* Masthead */
.mast { padding: 1.1rem var(--gutter) 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1.25rem; }
.logo { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); text-decoration: none; margin: 0; }
a.logo, a.logo:visited { color: var(--ink); font-size: 1.6rem; }
.event { margin: 0; color: var(--muted); font-size: .85em; }
.home-mast { display: block; padding-top: clamp(1.75rem, 5vw, 3.75rem); }
.home-mast .logo { font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5.25rem); text-wrap: balance; }
.home-mast .event { margin-top: .9rem; font-size: 1em; max-width: 46ch; text-wrap: balance; }

main { padding: 0 var(--gutter); max-width: calc(1080px + 2 * var(--gutter)); }

/* Index: the lineup as results */
.stats {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1.5em;
  margin: clamp(1.5rem, 3.5vw, 2.5rem) 0 0; padding: .3em .6em;
  background: var(--bar); border-top: 1px solid var(--bar-line);
  font-size: .8em;
}
.results { list-style: none; margin: 0; padding: 0; }
.result {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 2.5rem; align-items: start;
  padding: 1.5rem 0 0;
}
.result h2 { margin: 0; font-size: 1.5em; font-weight: normal; line-height: 1.2; }
.result h2 a { text-decoration: underline; }
.url { margin: .15em 0 0; color: var(--url); font-size: .85em; }
.snippet { margin: .15em 0 0; max-width: 62ch; }
.sitelinks { margin: .3em 0 0; font-size: .85em; color: var(--muted); }
.result .meter { margin-top: .45em; }

/* The novelty meter */
.meter { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: .6em; white-space: nowrap; }
.pips { display: inline-flex; gap: 3px; }
.pip {
  display: block; width: 8px; height: 22px; border-radius: 2px; padding: 0; border: 0;
  background: var(--pip-off);
}
.pip.on { background: var(--blue); }
.score { font-size: 1.1em; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.score b { color: var(--ink); font-size: 1.3em; }
.meter-cap { grid-column: 1 / -1; font-size: .62em; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .25em; }
.meter.big .pip { width: 11px; height: 30px; border-radius: 3px; }
.meter.big .pips { gap: 4px; }
.meter.big .meter-cap { display: none; }
.meter.ask .pip { cursor: pointer; background: transparent; box-shadow: inset 0 0 0 1px var(--btn-line); position: relative; }
.meter.ask .pip::after { content: ""; position: absolute; inset: -7px -2px; }
.meter.ask .pip.on { background: var(--blue); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .meter.ask .pips:hover .pip { background: var(--blue); box-shadow: none; opacity: .45; }
  .meter.ask .pips .pip:hover ~ .pip { background: transparent; box-shadow: inset 0 0 0 1px var(--btn-line); opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .pip.on { animation: pip .5s var(--ease) backwards; animation-delay: calc(var(--i) * 45ms + 80ms); }
  @keyframes pip { from { background: var(--pip-off); transform: scaleY(.55); } }
}

/* Demo page */
.hero { padding: clamp(1.5rem, 4vw, 3rem) 0 0; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin: 0; }
.demo-n { font-size: .8em; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -.025em; line-height: 1.02;
  font-size: clamp(2.5rem, 1.3rem + 5vw, 5rem); margin: .2em 0 0; text-wrap: balance;
}
.see { font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); line-height: 1.35; max-width: 34em; margin: .9rem 0 0; text-wrap: pretty; }
.see-label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }
.cta, .cta:visited {
  display: inline-flex; align-items: center; min-height: 3.2rem; padding: .55em 1.3em;
  background: linear-gradient(var(--cta), var(--cta-b)); color: var(--cta-ink);
  border: 1px solid var(--cta-b); border-radius: 4px;
  font-weight: bold; font-size: 1.15em; text-decoration: none;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  transition: transform .14s var(--ease), filter .14s ease;
}
.cta .arr { margin-left: .45em; }
.cta.second, .cta.second:visited {
  background: linear-gradient(var(--btn-a), var(--btn-b)); color: var(--btn-ink); border-color: var(--btn-line); font-weight: normal;
}
@media (hover: hover) and (pointer: fine) { .cta:hover { filter: brightness(1.07); } .gbtn:hover { border-color: var(--muted); } }
.cta:active, .gbtn:active { transform: scale(.97); }
.block { margin-top: clamp(2.25rem, 5vw, 3.5rem); }
.block > h2, .prose h2 { font-size: 1.05em; margin: 0 0 .9rem; padding: .3em .6em; background: var(--bar); border-top: 1px solid var(--bar-line); font-weight: bold; }
.empty { margin: 2rem 0 0; padding: 1rem 1.2rem; border: 1px dashed var(--btn-line); border-radius: 6px; color: var(--muted); max-width: 40em; }

/* Prompt and code blocks */
.prompt, .code { border: 1px solid var(--line); border-radius: 8px; background: var(--soft); margin: 0 0 1.25rem; }
.prompt-bar, .code-bar {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .6rem .6rem .6rem 1rem; background: var(--soft);
  border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0;
}
.prompt-bar h3 { margin: 0; font-size: 1.1em; line-height: 1.25; }
.over { margin: 0 0 .1em; font-size: .75em; color: var(--muted); }
.code-lang { font: .75em var(--mono); color: var(--muted); }
pre {
  margin: 0; padding: 1rem; overflow: auto;
  font: .86em/1.6 var(--mono); white-space: pre-wrap; tab-size: 2;
}
.prompt.scroll pre { max-height: 24rem; }
code { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: .05em .3em; }
.gbtn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-width: 7em; min-height: 2.5rem; padding: .3em 1em;
  font: bold .9em var(--sans); color: var(--btn-ink); cursor: pointer;
  background: linear-gradient(var(--btn-a), var(--btn-b));
  border: 1px solid var(--btn-line); border-radius: 4px;
  transition: transform .14s var(--ease), border-color .15s ease, color .15s ease;
}
.gbtn[data-state="copied"] { color: var(--ok); border-color: var(--ok); }
.gbtn[data-state="copied"]::before { content: "✓"; }
.gbtn[data-state="failed"] { min-width: 0; }

/* Reference screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.shot, .shot:visited { display: block; color: var(--link); text-decoration: none; }
.shot-frame { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot-label { display: block; margin-top: .6rem; font-size: 1.15em; text-decoration: underline; }

/* File lists */
.files { list-style: none; margin: 0; padding: 0; }
.files li { padding: .3em 0; }
.files.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .25rem 2rem; }
.files a { font-size: 1.1em; }
.files .note { display: block; color: var(--muted); font-size: .85em; }
.list-title { font: bold 1.5em var(--mono); margin: .6rem 0 1rem; }
.crumbs { margin: 1.25rem 0 0; font-size: .85em; color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }

/* Rendered Markdown */
.prose { max-width: 46em; padding-top: .5rem; }
.prose h1 { font-family: var(--serif); font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.08; letter-spacing: -.02em; margin: 1rem 0 1.25rem; text-wrap: balance; }
.prose h2 { margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.15em; margin: 2rem 0 .5rem; }
.prose h4 { font-size: 1em; margin: 1.5rem 0 .4rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose li { margin: .3em 0; }
.prose li > ul, .prose li > ol { margin: .3em 0 0; }
.prose blockquote { margin: 0 0 1rem; padding: .1rem 0 .1rem 1rem; border-left: 3px solid var(--bar-line); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose img { max-width: 100%; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; font-size: .9em; font-variant-numeric: tabular-nums; }
th, td { border: 1px solid var(--line); padding: .4em .7em; text-align: left; vertical-align: top; }
th { background: var(--soft); }
.doc-meta { margin: 2rem 0 0; font-size: .85em; }

/* "Demooooos" pager and footer */
.pager { display: flex; justify-content: center; align-items: flex-start; margin: clamp(3rem, 7vw, 5rem) 0 0; padding: 0 1rem; }
.pager .o { display: block; font: 700 2.4rem/1 var(--serif); letter-spacing: -.02em; }
.pager .num { display: block; margin-top: .35rem; font-size: .9em; }
.pg, .pg-step { display: block; text-align: center; text-decoration: none; padding: .2rem .16rem; }
.pg { min-width: 2rem; }
a.pg .num, a.pg-step .num { text-decoration: underline; color: var(--link); }
.pg.cur .num { color: var(--ink); font-weight: bold; }
.pg.cur .o { color: var(--red); }
.pg-step:first-child { text-align: right; }
.pg-step:last-child { text-align: left; }
.foot { margin-top: 2.5rem; padding: 1rem var(--gutter) 2rem; border-top: 1px solid var(--line); background: var(--soft); text-align: center; font-size: .8em; color: var(--muted); }
.foot p { margin: .15em 0; }

@media (max-width: 640px) {
  .result { grid-template-columns: minmax(0, 1fr); }
  .result .meter { order: -1; margin: 0 0 .35rem; grid-template-columns: auto auto auto; justify-content: start; }
  .result .meter-cap { grid-column: auto; margin: 0; }
  .prompt-bar { align-items: flex-start; }
  pre { font-size: .8em; padding: .85rem; }
  .cta { width: 100%; justify-content: center; }
  .pager .o { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation: none !important; }
}
