:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --ink: #202633;
  --quiet: #555c69;
  --blue: #234ac6;
  --line: #dadbd4;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .21em; }
a:hover { color: var(--blue); }
button,input,select { font: inherit; }
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(1200px, 91%); margin-inline: auto; }
.skip { position: fixed; z-index: 8; top: 8px; left: 8px; padding: 10px 16px; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.mast { min-height: 76px; display: flex; gap: 30px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 1.29rem/1 var(--sans); letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.brand img { width: 30px; height: auto; }
.desktop-nav,.footer nav { display: flex; gap: clamp(12px,3vw,30px); flex-wrap: wrap; }
.desktop-nav a,.mast-github,.footer nav a { text-decoration: none; font-size: .91rem; font-weight: 600; }
.desktop-nav a[aria-current=page],.mobile-nav a[aria-current=page] { color: var(--blue); text-decoration: underline; }
.mast-github { border: 1px solid #bdbfc9; padding: 8px 14px; border-radius: 40px; }
.mobile-nav { display: none; }
main { min-height: 65vh; padding-bottom: clamp(45px,8vw,94px); }
.hero { display: grid; grid-template-columns: minmax(0,.93fr) minmax(0,1.07fr); align-items: center; gap: clamp(20px,4vw,64px); padding-block: clamp(35px,7vw,100px) clamp(30px,6vw,74px); }
.hero-label { margin: 0 0 12px; color: var(--blue); font-size: .84rem; font-weight: 700; }
.hero h1,.page-heading h1 { margin: 0; font: 400 clamp(3rem,6.15vw,6rem)/.96 var(--serif); letter-spacing: -.075em; }
.hero h1 em { font-weight: 400; color: var(--blue); }
.hero-copy>p:not(.hero-label) { max-width: 31ch; color: var(--quiet); font-size: clamp(1rem,1.6vw,1.21rem); margin: 20px 0 25px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.button { appearance: none; display: inline-flex; justify-content: center; align-items: center; gap: 15px; min-height: 46px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.primary { background: var(--blue); color: #fff; }
.primary:hover { background: #1b389b; color: #fff; }
.quiet { border-color: #c2c0b9; background: #fbf9f3; color: var(--ink); }
.quiet:hover { border-color: var(--blue); }
.hero-art { position: relative; min-width: 0; padding: 8px; border: 1px solid #dedbd0; background: #fcfaf4; border-radius: 18px; box-shadow: 0 18px 44px #34322916; }
.hero-viewport img { width: 100%; height: auto; aspect-ratio: 1.39; object-fit: cover; border-radius: 11px; background: #e7e7e9; }
.art-link { position: absolute; bottom: 22px; left: 22px; display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid #dcdde8; background: #fffefaf5; border-radius: 10px; box-shadow: 0 9px 24px #141f4440; text-decoration: none; }
.art-link small,.art-link strong { display: block; line-height: 1.35; }
.art-link small { color: var(--quiet); font-size: .71rem; }
.art-link strong { font-size: .91rem; }
.art-icon { display: grid; place-items: center; background: #e8edff; color: var(--blue); width: 33px; aspect-ratio: 1; border-radius: 7px; }
.tiny-arrow { color: var(--blue); font-size: .86rem; margin-left: 9px; }
.chapter { border-top: 1px solid var(--line); padding-top: clamp(25px,4.4vw,50px); margin-bottom: clamp(38px,6.5vw,70px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 9px 18px; flex-wrap: wrap; margin-bottom: 17px; }
.section-head h2,.resource-band h2 { font: 400 clamp(2rem,4.65vw,4.2rem)/1 var(--serif); letter-spacing: -.057em; margin: 0; }
.section-head>a { font-size: .9rem; font-weight: 650; color: var(--blue); }
.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.project-card { display: flex; flex-direction: column; min-width: 0; text-decoration: none; border: 1px solid #dbd8d0; border-radius: 12px; overflow: hidden; background: #fdfbf7; transition: border-color .14s, box-shadow .14s; }
.project-card:hover { border-color: #8494d4; color: var(--ink); box-shadow: 0 6px 19px #234ac619; }
.project-visual { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.85; overflow: hidden; }
.project-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-tessera { color: #203ba5; background: repeating-linear-gradient(0deg,#2841af1a 0 1px,transparent 1px 18px),repeating-linear-gradient(90deg,#2841af1a 0 1px,transparent 1px 18px),#e4e9fb; }
.pv-tessera span { font: italic 400 clamp(1.9rem,4.4vw,4.1rem)/1 var(--serif); letter-spacing: -.075em; }
.pv-wormland { background: repeating-radial-gradient(ellipse at 50% 110%,#68866155 0 1px,transparent 1px 16px),#dee8d3; color: #345037; }
.pv-wormland span { display: grid; place-items: center; width: 64px; aspect-ratio: 1; border: 1px solid #678360; border-radius: 50%; font: 400 2rem/1 var(--serif); box-shadow: 0 0 0 10px #77936d39; }
.project-info { position: relative; padding: 16px 40px 17px 15px; }
.meta { color: #46567e; font: 650 .72rem/1.4 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.meta span { margin-inline: 2px; opacity: .66; }
.project-info :is(h2,h3),.journal-row :is(h2,h3) { font: 400 clamp(1.35rem,2.3vw,2.1rem)/1 var(--serif); letter-spacing: -.045em; margin: .34em 0 .28em; overflow-wrap: anywhere; }
.project-info p,.journal-row p { color: var(--quiet); margin: 0; font-size: .86rem; }
.arrow { color: var(--blue); font-size: 1.02rem; }
.project-info .arrow { position: absolute; right: 14px; top: 15px; }
.journal-list { border-top: 1px solid var(--line); }
.journal-row { display: grid; grid-template-columns: 115px minmax(0,1fr) 24px; align-items: baseline; gap: 13px; border-bottom: 1px solid var(--line); min-width: 0; text-decoration: none; padding: 15px 4px; }
.journal-row :is(h2,h3) { margin: 0 0 5px; }
.journal-row:hover { background: #eeeee9; }
time { font: 600 .76rem/1.4 ui-monospace,monospace; color: #42527c; }
.resource-band { background: #e9edfa; border: 1px solid #cbd4ef; border-radius: 13px; padding: clamp(18px,4vw,50px); display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); align-items: center; gap: 20px; }
.resource-band h2 { font-size: clamp(2rem,4.4vw,3.55rem); }
.resource-band nav,.detail-links { display: grid; }
.resource-band nav a,.detail-links a { display: flex; justify-content: space-between; align-items: center; min-height: 43px; border-bottom: 1px solid #c8cee3; text-decoration: none; font-weight: 600; }
.resource-band nav a span,.detail-links a span { color: var(--blue); }
.footer { border-top: 1px solid var(--line); padding-block: 22px; }
.footer-links,.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; color: var(--quiet); font-size: .82rem; }
.heart { color: #a22c4e; }
.page-heading { padding: clamp(28px,6.5vw,78px) 0 20px; }
.page-heading h1 { font-size: clamp(2.6rem,6.9vw,5.8rem); overflow-wrap: anywhere; }
.page-heading p { max-width: 59ch; color: var(--quiet); font-size: clamp(.96rem,1.6vw,1.15rem); margin: 13px 0 0; }
.panel { background: #fdfbf7; border: 1px solid var(--line); border-radius: 11px; padding: clamp(13px,2.6vw,28px); min-width: 0; }
.panel h2 { font: 400 clamp(1.55rem,3vw,2.5rem)/1.05 var(--serif); margin: 0 0 12px; letter-spacing: -.04em; }
.panel p { color: var(--quiet); }
.catalog-filter { display: flex; flex-wrap: wrap; gap: 11px; align-items: end; margin-bottom: 15px; }
.catalog-filter label { display: grid; gap: 4px; flex: 1 1 160px; }
label { font-size: .9rem; font-weight: 650; }
input,select { min-width: 0; width: 100%; min-height: 46px; background: #fff; color: var(--ink); border: 1px solid #b8bbc4; border-radius: 7px; padding: 8px; }
.back-link { display: inline-block; margin-top: 20px; color: var(--blue); }
.back-link+.page-heading { padding-top: 14px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 14px; align-items: start; }
.detail-grid .project-visual { border-radius: 11px; border: 1px solid var(--line); }
.story { max-width: 840px; }
.prose h2:not(:first-child) { margin-top: 25px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 13px 0; padding: 12px; background: #eef0f8; border-radius: 7px; color: #283965; font-size: .82rem; }
@media (max-width: 760px) {
  .desktop-nav,.mast-github { display: none; }
  .mast { min-height: 63px; }
  .mobile-nav { display: block; }
  .mobile-nav summary { display: grid; align-items: center; min-height: 44px; padding: 0 10px; cursor: pointer; }
  .mobile-nav nav { position: absolute; top: calc(100% + 5px); inset-inline: 0; display: grid; padding: 5px 12px; background: #fffefa; border: 1px solid var(--line); border-radius: 7px; }
  .mobile-nav nav a { display: grid; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); text-decoration: none; }
  .mobile-nav nav a:last-child { border: 0; }
  .hero,.detail-grid,.resource-band { grid-template-columns: minmax(0,1fr); }
  .hero h1 { font-size: clamp(2.8rem,11vw,5rem); }
  .hero-viewport img { aspect-ratio: 1.55; }
  .art-link { bottom: 14px; left: 14px; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .journal-row { grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; }
  .journal-row time { grid-column: 1 / -1; }
  .footer nav { gap: 9px 14px; }
}
@media (max-width: 450px) {
  .project-grid { grid-template-columns: minmax(0,1fr); }
  .project-card:not(.card-kronos) { display: grid; grid-template-columns: 32% minmax(0,1fr); }
  .project-card:not(.card-kronos) .project-visual { height: 100%; aspect-ratio: auto; }
  .project-card .pv-tessera span { font-size: clamp(1.15rem,5.5vw,1.8rem); }
  .project-card .pv-wormland span { width: 40px; font-size: 1.35rem; }
  .project-info { padding-right: 24px; }
  .project-info .arrow { top: 11px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition: none!important; }
}

/* Interactive hero */
.hero-viewport {
  position: relative; overflow: hidden; border-radius: 11px; isolation: isolate;
}
.hero-viewport img {
  transform: translate(var(--art-x,0), var(--art-y,0)) scale(1.045);
  transition: transform 210ms ease-out;
}
.hero-reflection {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at var(--light-x,50%) var(--light-y,50%),#fffef87d,transparent 45%);
  mix-blend-mode: screen; transition: opacity 210ms ease-out;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-art:hover .hero-reflection { opacity: .64; }
  .art-link { transition: box-shadow 170ms ease-out, transform 170ms ease-out; }
  .art-link:hover { transform: translateY(-3px); box-shadow: 0 13px 29px #141f4455; }
}

/* Links into the workspace */
.workspace-nav {
  display: flex; flex-wrap: wrap; gap: 4px 21px; align-items: center;
  margin-block: 0 clamp(36px,5vw,61px); border-block: 1px solid var(--line);
}
.workspace-nav a {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
  font-size: .87rem; font-weight: 650; color: #3f4f7c;
}
.workspace-nav a:hover { text-decoration: underline; }
#workspace,#sandbox,#journal,#developer-resources { scroll-margin-top: 16px; }

.project-workbench[data-ready] {
  display: grid; grid-template-columns: minmax(178px,.29fr) minmax(0,1fr);
  gap: clamp(10px,2vw,24px); align-items: start;
}
.work-selector { display: grid; gap: 7px; }
.work-selector[hidden],.work-card[hidden] { display: none; }
.work-selector button {
  display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 9px;
  align-items: center; min-height: 63px; padding: 7px 9px;
  border: 1px solid #dedcd3; border-radius: 8px; background: #fdfbf7;
  color: var(--ink); text-align: left; cursor: pointer;
}
.work-selector button[aria-pressed="true"] { background: #eef0fc; border-color: #8695d1; box-shadow: inset 3px 0 var(--blue); }
.work-selector button:hover { border-color: #8695d1; }
.work-selector button strong,.work-selector button small { display: block; line-height: 1.2; }
.work-selector button small { font-size: .71rem; color: var(--quiet); margin-top: 5px; }
.work-option-symbol {
  width: 35px; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 7px; background: #e4e9fc; color: var(--blue); font: 400 1.2rem/1 var(--serif);
}
.work-views { display: grid; gap: 10px; min-width: 0; }
.work-card {
  display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); min-height: 255px;
  border: 1px solid #d8dcd8; border-radius: 14px; overflow: hidden; background: #fdfbf6;
}
.work-info { display: grid; align-content: center; padding: clamp(14px,2.8vw,32px); }
.work-info h3 { font: 400 clamp(1.9rem,4.1vw,3.6rem)/1 var(--serif); letter-spacing: -.06em; margin: .14em 0 .2em; }
.work-info p { color: var(--quiet); margin: 0 0 16px; font-size: .91rem; }
.work-info .actions { gap: 7px; }
.work-info .button { padding-inline: 10px; gap: 6px; font-size: .8rem; }
.work-card .project-visual { height: 100%; aspect-ratio: auto; }
.work-card .pv-kronos img { object-position: 50% center; }
.work-card .pv-wormland span { width: 76px; }

/* API playground */
.sandbox {
  display: grid; grid-template-columns: minmax(0,.62fr) minmax(0,1.38fr); gap: clamp(16px,4.1vw,45px);
  align-items: start; margin-bottom: clamp(38px,6.5vw,70px); padding: clamp(18px,3.8vw,43px);
  border: 1px solid #c7d1ee; border-radius: 14px;
  background: radial-gradient(ellipse at 13% 88%,#dce3ff,transparent 70%),#e9edfa;
}
.sandbox-intro { max-width: 29ch; }
.sandbox h2 { font: 400 clamp(2rem,4.4vw,3.9rem)/1 var(--serif); margin: 0; letter-spacing: -.055em; }
.sandbox p { color: #374467; margin: 11px 0 15px; }
.sandbox-intro a { color: var(--blue); font-size: .88rem; font-weight: 650; }
.api-console {
  display: grid; grid-template-columns: minmax(0,1fr);
  overflow: hidden; border: 1px solid #c5cde2; border-radius: 10px; background: #fdfcff; color: var(--ink);
}
.api-request { display: grid; gap: 8px; min-width: 0; padding: 12px; }
.api-request label { font-size: .79rem; }
.console-input { display: flex; align-items: stretch; overflow: hidden; border: 1px solid #acb6d3; border-radius: 6px; }
.console-input>span { display: grid; place-items: center; min-width: 47px; font: 650 .73rem ui-monospace,monospace; background: #e0e7ff; color: #253b91; }
.console-input select { border: 0; border-radius: 0; }
.console-input:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.console-input select:focus-visible { outline: none; }
.console-command { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.console-command code { font: .77rem/1.4 ui-monospace,monospace; color: #46557f; overflow-wrap: anywhere; }
.console-command .button { min-height: 44px; }
.console-command .button:disabled { opacity: .7; cursor: wait; }
.api-terminal { color: #e6eaff; background: #161d32; min-width: 0; }
.terminal-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 10px 12px; border-block: 1px solid #35405d; font: .75rem/1.3 ui-monospace,monospace; }
.terminal-top strong { margin-right: auto; }
.terminal-top output { padding: 3px 5px; border: 1px solid #586482; border-radius: 4px; }
.terminal-top output[data-result="ok"] { color: #b3e9c5; border-color: #528a6b; }
.terminal-top output[data-result="error"] { color: #fcbdbb; border-color: #a3595b; }
.api-terminal pre {
  margin: 0; padding: 13px; height: 137px; overflow: auto;
  background: none; color: #e1e6f6; font: .81rem/1.55 ui-monospace,monospace;
}
.api-terminal pre:focus-visible { outline: 2px solid #9fb5ff; outline-offset: -3px; }
.standalone-console .api-console { max-width: 910px; }
.standalone-console .api-terminal pre { height: 260px; }
.project-facts { display: grid; gap: 6px; margin: 0 0 8px; }
.project-facts>div { display: flex; justify-content: space-between; gap: 10px; }
.project-facts dt { color: var(--quiet); font-size: .86rem; }
.project-facts dd { margin: 0; font-weight: 650; }
.detail-chapter { margin-block: 25px 0; }
.feature-intro { color: var(--quiet); }
.project-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.project-features h3 { font: 400 1.45rem/1.12 var(--serif); margin: 0; }
.project-features p { margin: 8px 0 0; font-size: .88rem; }
@media (max-width: 760px) {
  .project-workbench[data-ready],.sandbox { grid-template-columns: minmax(0,1fr); }
  .work-selector { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .work-selector button { grid-template-columns: 1fr; gap: 4px; align-content: start; }
  .work-option-symbol { width: 26px; }
  .work-card { min-height: 210px; }
  .work-info p { font-size: .87rem; }
}
@media (max-width: 475px) {
  .workspace-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9px; }
  .work-card,.project-features { grid-template-columns: minmax(0,1fr); }
  .work-card .project-visual { height: 145px; grid-row: 1; }
  .work-info { padding: 14px; }
  .work-selector button { padding: 7px 5px; font-size: .8rem; }
  .work-selector button small { font-size: .64rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .arrived { animation: arrive 430ms ease-out both; }
  .work-card:not([hidden]) { animation: arrive 220ms ease-out both; }
  @keyframes arrive { from { opacity: .82; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
