/* The posts' interactives read these colour names, set here to the site's palette. */
:root {
  --n1: #FFFFFF;
  --n2: #F4F4F0;
  --n3: #E3E3E0;
  --n4: #C9C9C4;
  --n5: #6B6B6B;
  --n7: #161616;
  --p1: #E4EFE9;
  --sd1: #161616;
  --on-sd1: #FDFDFC;
  --sd1-hover: color-mix(in srgb, var(--sd1) 85%, transparent);
  --hover: #EEF4F0;
  --selected: #E3E3E0;
  --success: #1A7F37;
  --error: #CF222E;
  --series-1: #1F7A57;
  --cat-1: #2A78D6;
  --cat-2: #EB6834;
  --cat-3: #1BAF7A;
  --cat-4: #EDA100;
  --radius-btn: 4px;
  --radius-card: 8px;
  --shadow: none;
}

/* The Slack thread mock */
.slack { overflow: hidden; font-size: 15px; line-height: 1.5; }
.slack-head { padding: 14px 20px; border-bottom: 1px solid var(--n3); font-weight: 700; display: flex; gap: 6px; align-items: baseline; }
.slack-head .muted { font-weight: 400; color: var(--n5); font-size: 14px; }
.msg { display: flex; gap: 12px; padding: 14px 20px; }
.msg + .msg { padding-top: 4px; }
.av { width: 36px; height: 36px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.av-user { background: var(--n3); color: var(--n7); }
.av-bot { overflow: hidden; box-shadow: 0 0 0 1px var(--n3); }
.av-bot svg { display: block; }
.body { min-width: 0; flex: 1; }
.who { display: flex; gap: 8px; align-items: baseline; }
.who time { font-size: 12px; color: var(--n5); }
.app { font-size: 10px; font-weight: 700; color: var(--n5); background: var(--n2); border-radius: 3px; padding: 0 4px; }
.slack p { margin: 2px 0 8px; }
.mention { color: var(--sd1); background: color-mix(in srgb, var(--sd1) 12%, transparent); border-radius: 3px; padding: 0 2px; }
.settings { font-size: 12px; color: var(--n5); margin: 2px 0 8px; }
.activity, .ask, .pr { border: 1px solid var(--n3); border-radius: 8px; padding: 10px 14px; margin: 4px 0 8px; background: var(--n1); }
.activity-head { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.activity-sub { color: var(--n5); font-size: 14px; margin: 2px 0 8px; }
.calls { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.calls li { margin: 0; padding: 4px 0; border-top: 1px solid var(--n3); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.calls b { min-width: 40px; font-weight: 700; }
.calls code, .ask pre, .diff { font-size: 12.5px; }
.calls code { border: 0; background: none; padding: 0; }
.res { margin-left: auto; color: var(--n5); font-size: 12px; }
.res.bad { color: var(--error); }
.add { color: var(--success); }
.del { color: var(--error); }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--n3); border-top-color: var(--series-1); animation: spin 1s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; }
}
.ask-title { font-weight: 700; font-size: 14px; }
.ask pre, .diff { background: var(--n2); border-radius: 4px; padding: 8px 10px; margin: 6px 0; white-space: pre-wrap; word-break: break-word; }
.ask-why { font-size: 14px; color: var(--n5); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: var(--radius-btn); border: 1px solid var(--n3);
  background: var(--n1); color: var(--n7); font-size: 13px; font-weight: 700;
}
.btn.primary { background: var(--sd1); border-color: var(--sd1); color: var(--on-sd1); }
.decided { font-size: 13px; color: var(--success); margin-top: 6px; }
.pr-title { font-weight: 700; font-size: 14px; }
.done { font-size: 12px; color: var(--n5); }
.done a { color: var(--sd1); }
/* Thread states */
.states { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.states li { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; background: var(--n1); border: 1px solid var(--n3); border-radius: 99px; padding: 4px 12px; }
/* Architecture */
.arch svg { width: 100%; height: auto; display: block; }
.arch { padding: 6px; }
.arch > :not(.arch-scroll) { margin-left: 14px; margin-right: 14px; }
.arch .t { font-size: 16.5px; }
.arch .ts, .arch .tm { font-size: 15.5px; }
.arch .tc, .arch .badge-t { font-size: 15px; }
.box { fill: var(--n1); stroke: var(--n3); stroke-width: 1; }
.box-soft { fill: var(--n2); stroke: var(--n3); stroke-width: 1; }
.box-key { fill: var(--p1); stroke: var(--n3); stroke-width: 1; }
.t { fill: var(--n7); font: 700 15px var(--font); }
.ts { fill: var(--n5); font: 400 13px var(--font); }
.tm { fill: var(--n5); font: 400 12px var(--font); }
.chip { fill: var(--n2); stroke: var(--n3); }
.tc { fill: var(--n7); font: 400 12px var(--font-mono); }
.edge { stroke: var(--n5); stroke-width: 1.5; fill: none; }
.head { fill: var(--n5); }
.server-t { fill: var(--n7); }
/* Phone */
.pocket { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: center; }
.phone { background: #141416; border-radius: 36px; padding: 56px 14px 28px; box-shadow: var(--shadow); }
.lock { color: #EFE8DC; text-align: center; font-size: 44px; font-weight: 300; line-height: 1; margin-bottom: 4px; }
.lock-day { color: #C6C6C6; text-align: center; font-size: 13px; margin-bottom: 28px; }
.notif { background: #FBF8F2; color: #141416; border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.notif-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: #655D52; letter-spacing: .04em; }
.notif-head span:last-child { margin-left: auto; font-weight: 400; letter-spacing: 0; }
.appicon { width: 20px; height: 20px; border-radius: 5px; overflow: hidden; display: inline-block; }
.appicon svg { display: block; }
.notif-title { font-weight: 700; margin-top: 6px; }
.notif-actions { margin-top: 8px; display: grid; gap: 6px; }
/* Numbers */
.tiles-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.stat { padding: 16px 18px; }
.stat-label { font-size: 13px; color: var(--n5); }
.stat-value { font-size: 32px; font-weight: 700; line-height: 1.2; }
.stat-note { font-size: 13px; color: var(--n5); }
.chart { padding: 20px 20px 12px; position: relative; margin: 16px 0; }
.chart h3 { margin: 0; font-size: 16px; }
.chart .sub { font-size: 13px; color: var(--n5); margin: 0 0 8px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.grid { stroke: var(--n3); stroke-width: 1; shape-rendering: crispEdges; }
.axis { fill: var(--n5); font: 400 12px var(--font); font-variant-numeric: tabular-nums; }
.lbl { fill: var(--n7); font: 400 13px var(--font); }
.val { fill: var(--n7); font: 700 13px var(--font); }
.line { stroke: var(--series-1); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.area { fill: var(--series-1); opacity: .1; }
.bar { fill: var(--series-1); }
.dot { fill: var(--series-1); stroke: var(--n1); stroke-width: 2; }
.cross { stroke: var(--n4); stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; display: none;
  background: var(--n1); border: 1px solid var(--n3); border-radius: 8px; box-shadow: var(--shadow);
  padding: 6px 10px; font-size: 13px; line-height: 1.4; white-space: nowrap;
}
.tip b { display: block; }
details { margin-top: 8px; font-size: 13px; }
summary { cursor: pointer; color: var(--sd1); }
table { border-collapse: collapse; margin: 8px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 3px 16px 3px 0; border-bottom: 1px solid var(--n3); }
th { color: var(--n5); font-weight: 500; }
.tables { display: flex; flex-wrap: wrap; gap: 0 24px; }
/* Replay */
.reacts { margin-top: 2px; min-height: 26px; }
.react { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--n2); border: 1px solid var(--n3); font-size: 12px; color: var(--n5); }
.react:empty { display: none; }
.react .em { font-size: 14px; }
button.btn { font-family: var(--font); cursor: pointer; }
button.btn:hover { background: var(--hover); }
button.btn.primary:hover { background: var(--sd1-hover); }
button.btn:disabled { cursor: default; opacity: .4; }
button.btn.chosen:disabled { opacity: 1; box-shadow: 0 0 0 2px var(--n1), 0 0 0 4px var(--sd1); }
.nudge { font-size: 13px; font-weight: 700; margin-top: 4px; animation: pulse 1.6s ease-in-out infinite; }
.decided.no { color: var(--error); }
.res.run { font-style: italic; }
.res.ok { color: var(--success); }
.spin.paused { animation-play-state: paused; border-top-color: var(--n5); }
.spin.ok { border: 0; animation: none; width: auto; height: auto; color: var(--success); font-weight: 700; }
.lnk { color: var(--sd1); text-decoration: underline; text-decoration-color: var(--n4); }
.replay-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; border-top: 1px solid var(--n3); font-size: 13px; color: var(--n5); }
.replay-btns { display: flex; gap: 8px; }
.r-hide { display: none !important; }
.r-in { animation: rise .3s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .4; } }
/* Architecture stepper */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--n3); margin: -6px 0 16px; }
.tab { background: none; border: 0; border-bottom: 4px solid transparent; margin-bottom: -1px; padding: 12px 0; font: 500 15px var(--font); color: var(--n5); cursor: pointer; }
.tab.on { color: var(--n7); border-bottom-color: var(--n7); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--n3); margin-top: 12px; padding-top: 14px; }
.step-text { flex: 1; min-width: 240px; min-height: 46px; font-size: 15px; line-height: 1.5; }
.step-text b { color: var(--n5); margin-right: 6px; }
.step-ctl { display: flex; gap: 8px; }
.arch .lit { stroke: var(--sd1); stroke-width: 2; }
#g-A { transition: opacity .3s; }
#g-A.asleep { opacity: .35; }
.pkt { fill: var(--series-1); stroke: var(--n1); stroke-width: 2; }
.badge-r { fill: var(--sd1); }
.badge-t { fill: var(--on-sd1); font: 700 12px var(--font); }
/* Command buttons */
.cmd { border: 1px solid var(--n3); background: var(--n2); color: var(--n7); border-radius: 6px; padding: 6px 10px; font: 12.5px var(--font-mono); cursor: pointer; text-align: left; }
.cmd:hover { background: var(--hover); }
.cmd.on { background: var(--n1); border-color: var(--sd1); box-shadow: 0 0 0 1px var(--sd1); }
/* Memory layers */
.mem { padding: 18px 20px; margin: 0 0 18px; }
.mem-q { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.mem-layers { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mem-layers li { margin: 0; }
.mem-layers label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--n3); border-radius: 8px; background: var(--n1); cursor: pointer; font-size: 15px; position: relative; transition: background .15s, border-color .15s; }
.mem-layers input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 34px; height: 20px; border-radius: 99px; background: var(--n3); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--n1); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
input:checked + .sw { background: var(--sd1); }
input:checked + .sw::after { transform: translateX(14px); }
input:focus-visible + .sw { outline: 2px solid var(--sd1); outline-offset: 2px; }
.mem-who { width: 180px; flex: none; color: var(--n5); font-size: 14px; }
.mem-text { flex: 1; }
.mem-layers li.win label { background: var(--p1); border-color: var(--sd1); }
.mem-layers li.over .mem-text { text-decoration: line-through; color: var(--n5); }
.mem-layers li.off .mem-who, .mem-layers li.off .mem-text { opacity: .5; }
.mem-out { margin-top: 12px; font-size: 15px; min-height: 24px; }
/* Phone */
.notif-actions button { width: 100%; border: 0; background: #FBF8F2; border-radius: 14px; padding: 9px; font: 500 14px var(--font); color: #141416; cursor: pointer; }
.notif-actions button.deny { color: #CF222E; }
.notif-done { margin-top: 6px; font-weight: 700; color: #1A7F37; }
.notif-done.no { color: #CF222E; }
.notif { transition: transform .45s ease-out, opacity .45s ease-out; }
.js .phone:not(.in) .notif, .js .phone:not(.in) .notif-actions { opacity: 0; transform: translateY(-14px); }
.notif-actions { transition: opacity .45s ease-out .15s, transform .45s ease-out .15s; }
@media (prefers-reduced-motion: reduce) {
  .r-in, .nudge { animation: none; }
  .notif, .notif-actions, #g-A, .sw, .sw::after { transition: none; }
}
/* One long task, one day */
.day { padding: 18px 20px 20px; }
.day-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.day-title { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.day-sub { font-size: 14px; color: var(--n5); }
.day-ctl { display: flex; gap: 8px; }
.day-track { list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 14px; padding: 0; }
.day-track::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: var(--n3); }
.day-fill { position: absolute; left: 12.5%; top: 9px; height: 2px; width: 0; background: var(--n7); transition: width .5s ease; }
.day-track li { margin: 0; text-align: center; position: relative; z-index: 1; }
.day-track button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--n5); display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.day-track button::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--n1); border: 2px solid var(--n3); transition: background .3s, border-color .3s, transform .3s; }
.day-track button.past::before { background: var(--n7); border-color: var(--n7); }
.day-track button.on::before { background: var(--n7); border-color: var(--n7); transform: scale(1.3); box-shadow: 0 0 0 5px color-mix(in srgb, var(--n7) 14%, transparent); }
.day-track button.on { color: var(--n7); }
.dt { font: 600 12px var(--font-mono); }
.dp { font-weight: 700; font-size: 14px; }
.day-stage { position: relative; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--n2); }
.day-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .6s ease, transform 1.2s ease; }
.day-img.on { opacity: 1; transform: none; }
.day-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.lane { background: var(--n2); border-radius: 10px; padding: 12px 14px; }
.lane-s { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.lane .ldot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; }
.lane.bad .ldot { background: var(--error); }
.lane.bad .lane-t { color: var(--error); }
.lane.fin .ldot { background: var(--sd1); }
.lane-n { margin: 6px 0 10px; font-size: 15px; line-height: 1.5; min-height: 45px; }
.lane-bar { height: 6px; border-radius: 99px; background: var(--n3); overflow: hidden; }
.lane-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--n7); transition: width .8s ease; }
.lane.bad .lane-bar i { background: var(--n5); }
.lane-n.flash { animation: rise .35s ease-out; }
@media (max-width: 760px) {
  .day-lanes { grid-template-columns: 1fr; }
  .day .ba-tag { font-size: 11px; top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .day-img, .day-fill, .lane-bar i, .day-track button::before { transition: none; }
  .lane-n.flash { animation: none; }
}
/* The site: pages, home and post cards */
.cover { padding: 0; overflow: hidden; }
.cover-img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
/* Memory: which memories a prompt pulls in */
.ln { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 6px; background: var(--n2); color: var(--n7); font: 700 11px var(--font-mono); }
.hits { padding: 18px 20px; margin: 0 0 18px; }
.hits-q { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hits-q .cmd { font-family: var(--font); font-size: 14px; }
.hits-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.hit { display: grid; grid-template-columns: minmax(0, 1fr) 220px 40px; gap: 12px; align-items: center; font-size: 14px; }
.hit.below { opacity: .55; }
.hit-name b { font: 700 12px var(--font-mono); margin-right: 6px; }
.hit-layer { font-size: 12px; color: var(--n5); display: block; }
.hit-track { position: relative; height: 10px; border-radius: 99px; background: var(--n3); }
.hit-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--series-1); transition: width .5s ease; }
.hit.below .hit-fill { background: var(--n5); }
.hit-min { position: absolute; top: -4px; bottom: -4px; left: 30%; width: 2px; background: var(--n7); }
.hit-val { font: 700 13px var(--font-mono); text-align: right; }
.hits-none { font-size: 15px; color: var(--n5); }
.hits-foot { font-size: 13px; color: var(--n5); }
pre.code.hits-block { white-space: pre-wrap; word-break: break-word; }
/* Memory: the index budget */
.budget { padding: 18px 20px; margin: 0 0 18px; }
.bud-sliders { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.bud-sliders label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.bud-sliders input { width: 100%; accent-color: var(--n7); }
.bud-sliders output { font: 600 12px var(--font-mono); color: var(--n5); }
.bud-bar { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; background: var(--n3); margin-bottom: 12px; }
.bud-bar i { display: block; height: 100%; transition: width .4s ease; }
.bud-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; font-size: 13px; }
.bud-legend div { display: flex; flex-direction: column; gap: 2px; }
.bud-legend b { display: flex; align-items: center; gap: 6px; }
.bud-legend b i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bud-legend span { color: var(--n5); font-family: var(--font-mono); font-size: 12px; }
/* Memory: review steps and the checks */
.steps { list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0; margin: 0 0 18px; }
.steps li { counter-increment: st; margin: 0; padding: 14px; border-radius: 10px; background: var(--n1); border: 1px solid var(--n3); display: flex; flex-direction: column; gap: 4px; font-size: 14px; position: relative; }
.steps li::before { content: counter(st, decimal-leading-zero); font: 700 12px var(--font-mono); color: var(--n5); }
.steps b { font-size: 15px; }
.steps span { color: var(--n5); line-height: 1.45; }
.checks-wrap { overflow-x: auto; margin: 0 0 18px; }
.checks { width: 100%; border-collapse: collapse; font-size: 15px; }
.checks th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--n5); padding: 8px 10px; border-bottom: 2px solid var(--n7); }
.checks td { padding: 10px; border-bottom: 1px solid var(--n3); vertical-align: top; }
.checks td:first-child { font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) {
  .hit { grid-template-columns: minmax(0, 1fr) 90px 36px; }
  .bud-sliders, .bud-legend { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
}
/* Voice: the flow and the tidy demo */
.steps.flow { grid-template-columns: 1fr; margin: 0; }
.flow-fig { margin: 8px auto 28px; }
.tidy { padding: 18px 20px; margin: 0 0 18px; }
.tidy-q { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tidy-q .cmd { font-family: var(--font); font-size: 14px; }
.tidy-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tpane { background: var(--n2); border-radius: 10px; padding: 12px 14px; min-height: 150px; }
.tp-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--n5); margin-bottom: 8px; }
.tp-h span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.said { margin: 0; font-size: 16px; line-height: 1.6; }
.said .w { opacity: 0; transition: opacity .2s; }
.said .w.on { opacity: 1; }
.said .fill { color: var(--n5); text-decoration: line-through; }
.msgbox { background: var(--n1); border: 1px solid var(--n3); border-radius: 12px; padding: 12px 14px; min-height: 90px; display: flex; flex-direction: column; gap: 10px; }
.out-text { font-size: 16px; line-height: 1.55; white-space: pre-line; }
.out-text.wait { color: var(--n5); font-style: italic; }
.chip { align-self: flex-start; border: 1px solid var(--n3); background: var(--n2); color: var(--n7); border-radius: 99px; padding: 3px 10px; font: 600 12px var(--font); cursor: pointer; }
button.chip:empty { display: none; }
.chip.drop { border-color: var(--error); color: var(--error); background: transparent; }
.chip.cmd { cursor: default; }
.tidy-check { margin-top: 14px; }
.ck { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ck li { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--n2); }
.ck li code { font-size: 12.5px; }
.ck .k1 { color: var(--success); font-weight: 700; }
.ck .k2 { color: var(--error); font-weight: 700; }
.ck .k3 { color: var(--n5); font-weight: 700; }
.ck .kind { color: var(--n5); }
.ck .none { background: none; padding: 0; color: var(--n5); font-size: 14px; }
.tidy-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.tidy-auto { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; position: relative; }
.tidy-auto input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tidy-send { font-size: 14px; color: var(--n5); }
.tidy-send.sent { color: var(--success); font-weight: 700; }
.tidy-send.held { color: var(--error); font-weight: 700; }
.script { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.script li { margin: 0; padding: 10px 14px; border-left: 3px solid var(--n7); background: var(--n1); border-radius: 0 8px 8px 0; font-size: 16px; }
.script li span { display: block; font-size: 14px; color: var(--n5); margin-top: 2px; }
@media (max-width: 760px) {
  .tidy-panes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .said .w { transition: none; }
}
/* Apps: reconnect and the foldable */
.recon { padding: 18px 20px; margin: 0 0 18px; }
.recon-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.recon-l { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; flex: 1; min-width: 240px; }
.recon-l output { font: 600 13px var(--font-mono); color: var(--n5); }
.recon-l input { width: 100%; accent-color: var(--n7); }
pre.code.recon-log { min-height: 150px; margin: 0; white-space: pre-wrap; }
.recon-log .ln-in { opacity: 0; animation: rise .25s ease-out forwards; }
.fold { padding: 18px 20px; margin: 0 0 18px; }
.fold-stage { display: grid; place-items: center; padding: 10px 0 4px; }
.device { display: flex; height: 260px; width: 150px; border-radius: 18px; background: #141416; padding: 8px; gap: 0; transition: width .6s cubic-bezier(.5, 0, .2, 1); overflow: hidden; }
.device .pane { flex: 1 0 134px; background: #FBF8F2; border-radius: 11px; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #141416; }
.device .pane i { display: block; height: 22px; border-radius: 6px; background: #E4DCCF; }
.device .pane i.on { background: #DDD3C4; box-shadow: inset 3px 0 0 #2A78D6; }
.device .pane i.m { height: 30px; width: 80%; }
.device .pane i.me { align-self: flex-end; background: #DDD3C4; }
.device .pane i.btnl { height: 18px; width: 50%; background: #2A78D6; margin-top: auto; }
.device .hinge { flex: 0 0 0; width: 0; transition: flex-basis .6s; background: #2A2A2E; }
.device .p-thread { flex-basis: 0; min-width: 0; padding: 12px 0; opacity: 0; transition: opacity .3s; }
.fold.open .device { width: 300px; }
.fold.open .device .hinge { flex-basis: 4px; }
.fold.open .device .p-thread { flex-basis: 134px; padding: 12px 10px; opacity: 1; }
.fold-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.fold-note { font-size: 14px; color: var(--n5); }
@media (prefers-reduced-motion: reduce) {
  .device, .device .hinge, .device .p-thread { transition: none; }
  .recon-log .ln-in { animation: none; opacity: 1; }
}
/* The apps, one icon per platform */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 4px 0 22px; }
.app-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 12px 16px; border-radius: var(--radius-card); background: var(--n1); border: 1px solid var(--n3); }
.ai { width: 84px; height: 84px; display: grid; place-items: center; }
.ai svg { display: block; width: 100%; height: 100%; }
.ai-ios svg { border-radius: 22.4%; box-shadow: 0 0 0 1px rgba(20, 20, 22, .08); }
.ai-mac { padding: 7px; }
.ai-mac svg { border-radius: 22.4%; box-shadow: 0 6px 12px rgba(0, 0, 0, .28), 0 0 0 1px rgba(20, 20, 22, .1); }
.ai-and svg { border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
.al { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; }
.as { font-size: 13px; color: var(--n5); line-height: 1.4; }
.gl { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.gl .f, .dg .f { fill: currentColor; stroke: none; }
.dg { fill: none; stroke: var(--n5); stroke-width: 1.8; stroke-linejoin: round; color: var(--n5); }
@media (max-width: 760px) {
  .apps { grid-template-columns: 1fr; }
  .app-tile { flex-direction: row; text-align: left; }
  .ai { width: 56px; height: 56px; flex: none; }
}
/* Under the hood */
.tour { padding: 0; overflow: hidden; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.tour-tabs { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--n3); background: var(--n2); }
.tour-tab { display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; border-radius: 8px; padding: 10px 12px; font: 600 14px/1.35 var(--font); color: var(--n5); cursor: pointer; }
.tour-tab:hover { color: var(--n7); background: var(--hover); }
.tour-tab.on { color: var(--n7); background: var(--n1); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.tour-tab .tn { font: 600 11px var(--font-mono); color: var(--n5); }
.tour-panel { padding: 20px 22px; min-width: 0; }
.tp { display: none; }
.tp.on { display: block; animation: rise .3s ease-out; }
.tp h3 { margin: 0 0 6px; font-size: 19px; }
.tp-lead { font-size: 16px; margin: 0 0 14px; }
pre.code { margin: 0 0 14px; padding: 14px 16px; border-radius: 10px; background: #141416; color: #EFE8DC; font: 12.5px/1.65 var(--font-mono); overflow-x: auto; white-space: pre; }
pre.code .c { color: #8F877B; }
pre.code .k { color: #8DB8F2; }
pre.code .s { color: #E9D7B0; }
/* .pr is also the thread demo's PR card, so a prompt sign drops its box. */
pre.code .pr { color: #8F877B; user-select: none; border: 0; border-radius: 0; padding: 0; margin: 0; background: none; }
pre.code .ok { color: #3FB950; }
.tp-facts { margin: 0; padding-left: 20px; font-size: 15px; }
.tp-facts li { margin-bottom: 6px; }
p.tp-facts { padding-left: 0; line-height: 1.6; }
.tp-facts code { white-space: nowrap; }
@media (max-width: 760px) {
  .tour { grid-template-columns: 1fr; }
  .tour-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--n3); }
  .tour-tab { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tp.on { animation: none; }
}
/* Before and after */
.ba { position: relative; overflow: hidden; padding: 0; aspect-ratio: 3 / 2; user-select: none; touch-action: pan-y; }
.ba-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ba-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #FBF8F2; box-shadow: 0 0 0 1px rgba(20, 20, 22, .25); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 52px; height: 32px; border-radius: 99px; background: #141416; color: #EFE8DC; font-size: 10px; letter-spacing: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-range:focus-visible + .ba-line, .ba:has(.ba-range:focus-visible) .ba-knob { outline: 2px solid #2A78D6; outline-offset: 2px; }
.ba-tag { position: absolute; top: 16px; padding: 6px 12px; border-radius: 99px; background: rgba(20, 20, 22, .85); color: #EFE8DC; font-size: 13px; font-weight: 700; pointer-events: none; }
.ba-r { background: #FBF8F2; color: #141416; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.ba-l { left: 14px; }
.ba-r { right: 14px; }
/* The lid test */
.lidtest { padding: 18px 20px 14px; margin: 0 0 18px; }
.lid-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lid-col { position: relative; background: var(--n2); border-radius: 10px; padding: 14px 14px 10px; min-height: 300px; }
.lid-h { font-weight: 700; font-size: 15px; }
.lap { width: 100%; max-width: 210px; height: auto; display: block; margin: 4px auto 6px; overflow: visible; }
.lap-base { fill: var(--n7); }
.lap-shell { fill: var(--n5); }
.lap-screen { fill: var(--series-1); transition: opacity .4s; }
.lap-lid { transform-box: view-box; transform-origin: 40px 181px; transform: rotate(-100deg); transition: transform .8s cubic-bezier(.5, 0, .2, 1); }
.closed .lap-lid { transform: rotate(0deg); }
.closed .lap-screen { opacity: 0; }
.lap-z { fill: var(--n5); font: 700 18px var(--font); opacity: 0; }
.asleep .lap-z { animation: zz 2.4s ease-in-out infinite; }
.asleep .lap-z.z2 { animation-delay: .8s; }
@keyframes zz { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.lid-status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; min-height: 22px; }
.ldot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; }
.stopped .ldot { background: var(--error); }
.waits .ldot { background: var(--sd1); }
.stopped .lid-text { color: var(--error); }
.lid-log { list-style: none; padding: 0; margin: 8px 0 0; font: 12.5px var(--font-mono); color: var(--n5); }
.lid-log li { margin: 0; padding: 3px 0; border-top: 1px solid var(--n3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lid-log li:first-child { color: var(--n7); }
.stopped .lid-log li { color: var(--n5); opacity: .6; }
.lid-toast { position: absolute; left: 12px; right: 12px; bottom: 12px; background: #FBF8F2; color: #141416; border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 13px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.lid-toast .lt-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #655D52; letter-spacing: .04em; }
.lid-toast code { font-size: 12px; }
.lid-toast .btn { height: 30px; }
.lid-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.lid-note { font-size: 14px; color: var(--n5); flex: 1; min-width: 200px; }
.lid-bar .btn.nudge-on { animation: pulse 1.6s ease-in-out infinite; }
@media (max-width: 760px) {
  .lid-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .lap-lid, .lap-screen { transition: none; }
  .asleep .lap-z, .lid-bar .btn.nudge-on { animation: none; }
}
/* Shared hooks the styles switch on */
.num { display: none; }
/* Style: Stripes */
@keyframes drift { to { transform: translateY(50px); } }
/* Bento lists for Midnight and Stripes */
@media (max-width: 760px) {
  .pocket { grid-template-columns: 1fr; }
  .phone { max-width: 260px; margin: 0 auto; }
  .tiles-row { grid-template-columns: repeat(2, 1fr); }
  .msg { padding: 12px 14px; }
  .arch { padding: 8px 12px; }
  .arch-scroll { overflow-x: auto; }
  .arch-scroll svg { min-width: 680px; }
  .mem-layers label { flex-wrap: wrap; }
  .mem-who { width: auto; }
}

/* A: the article */
body { overflow-x: clip; }
main.post { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); font-size: 20px; line-height: 1.7; }
.wide, figure { margin: 56px 0; }
figcaption { margin-top: 12px; font-size: 15px; font-style: italic; line-height: 1.5; color: var(--muted); text-align: center; }
p { margin: 0 0 20px; }
ul, ol { margin: 0 0 20px; padding-left: 22px; }
li { margin: 0 0 10px; }
li::marker { color: var(--muted); }
strong { font-weight: 600; }
pre code { background: none; padding: 0; font: inherit; }

.hero { padding: 120px 0 0; }
.hero h1 { margin: 0; font-weight: 400; font-size: 56px; line-height: 1.08; letter-spacing: -0.018em; }
.deck { margin: 22px 0 0; font-size: 24px; line-height: 1.45; font-style: italic; color: #4A4A4A; }
.meta { margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 18px; font-size: 16px; color: var(--muted); }
.hero .lede { margin: 34px 0 0; font-size: 21px; line-height: 1.6; }
.write-me { margin: 48px 0 0; font-size: 20px; }

.col > p.aside { font-style: italic; color: var(--muted); }
.aside i { font-style: normal; }
.col > h2 { margin: 80px 0 18px; font-weight: 500; font-size: 32px; line-height: 1.2; letter-spacing: -0.01em; }
.col > h3 { margin: 44px 0 12px; font-weight: 400; font-style: italic; font-size: 24px; line-height: 1.3; }

.card { background: var(--n1); border: 1px solid var(--n3); border-radius: var(--radius-card); font: 400 17px/1.6 var(--font); }
.cover.card { border: 0; border-radius: 4px; }
.cover-img { height: auto; }
.phone, .apps, .states { font-family: var(--font); }

.tldr { margin: 56px 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--green); }
.tldr-h { margin: 0 0 6px; font-size: 17px; font-style: italic; color: var(--muted); }
.tldr ul { margin: 0; }
.tldr li { margin: 8px 0; }

.tiles-row { gap: 28px; margin: 36px 0; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tiles-row .stat.card { padding: 0; background: none; border: 0; border-radius: 0; font-family: var(--serif); }
.stat-label, .stat-note { font-size: 15px; line-height: 1.35; font-style: italic; color: var(--muted); }
.stat-value { margin: 4px 0 6px; font-weight: 300; font-size: 50px; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: lining-nums; }

.bento { list-style: none; margin: 28px 0; padding: 0; }
.bento li { margin: 0 0 18px; }

.col > .steps { display: block; margin: 28px 0; }
.col > .steps li { display: grid; grid-template-columns: 52px 1fr; margin: 0 0 16px; padding: 0; background: none; border: 0; border-radius: 0; font-size: inherit; }
.col > .steps li::before { grid-row: 1 / span 2; content: counter(st); font: italic 300 34px/1 var(--serif); color: var(--green); }
.col > .steps b { font-weight: 600; font-size: inherit; }
.col > .steps span { color: inherit; line-height: 1.6; }
.steps.flow { gap: 20px; padding-top: 18px; border-top: 1px solid var(--n7); }
.steps.flow li { display: grid; grid-template-columns: 44px 1fr; gap: 4px 8px; padding: 0; background: none; border: 0; border-radius: 0; font: 400 17px/1.5 var(--serif); }
.steps.flow li::before { grid-row: 1 / span 2; content: counter(st); font: italic 300 30px/1 var(--serif); color: var(--green); }
.steps.flow b { font-size: 18px; font-weight: 600; }

.checks { font-size: 17px; line-height: 1.45; }
.checks th { padding: 0 16px 10px 0; font: italic 500 16px var(--serif); text-transform: none; letter-spacing: 0; color: var(--muted); border-bottom: 1px solid var(--n7); }
.checks td { padding: 12px 16px 12px 0; }

pre.code { margin: 0 0 20px; padding: 18px 22px; border-radius: 6px; background: var(--code-bg); color: var(--ink); font: 400 14.5px/1.65 var(--font-mono); tab-size: 4; }
pre.code .k { color: var(--green); font-weight: 500; }
pre.code .s { color: #75507B; }
pre.code .c, pre.code .pr { color: var(--muted); }
pre.code .ok { color: var(--success); }

.end:not(:has(li)) { display: none; }
.end { margin: 96px 0 0; padding: 30px 0 34px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.end-h { margin: 0; font-size: 17px; font-style: italic; color: var(--muted); }
.more { list-style: none; margin: 14px 0 0; padding: 0; }
.more li { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
.byline { margin: 56px 0 0; font-size: 18px; color: var(--muted); }
.ai-tip { position: relative; }
.ai-label { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-decoration-color: var(--muted); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ai-label:hover, .ai-tip.open .ai-label { color: var(--ink); }
.ai-pop { display: none; position: absolute; left: 0; top: calc(100% + 10px); z-index: 30; width: 300px; max-width: calc(100vw - 40px); padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); box-shadow: 0 8px 24px rgba(22, 22, 22, .08); font-size: 15px; line-height: 1.5; font-style: normal; color: var(--ink); }
/* Bridges the gap under the label, so the pointer can move onto the note without closing it. */
.ai-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.ai-tip.open .ai-pop { display: block; }
/* With the script, .open alone shows the note, so Escape and a second click can close it. */
html:not(.js) .ai-label:focus-visible + .ai-pop { display: block; }
@media (hover: hover) { html:not(.js) .ai-tip:hover .ai-pop { display: block; } }
.byline a { color: var(--ink); }

.hbars { list-style: none; margin: 14px 0 4px; padding: 0; font-family: var(--font); }
.hbars li { display: grid; grid-template-columns: 19em 1fr; gap: 4px 16px; align-items: center; margin: 0; padding: 8px 0; border-top: 1px solid var(--n3); }
.hbars li:first-child { border-top: 0; }
.hb-l { font-size: 14px; line-height: 1.35; color: var(--n5); }
.hb-l b { margin-right: 4px; font-weight: 600; color: var(--n7); }
.hb-t { display: flex; align-items: center; gap: 8px; }
.hb-b { flex: none; width: calc((100% - 60px) * var(--f)); height: 12px; border-radius: 0 4px 4px 0; background: var(--series-1); }
.hbars li:hover .hb-b { background: var(--n7); }
.hb-v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--n7); white-space: nowrap; }
@media (max-width: 560px) { .hbars li { grid-template-columns: 1fr; } }
details.data { margin: 4px 0 32px; }
details.data .nw { white-space: nowrap; }

#toc { display: none; }
/* 1160px: the box's 760px of text, plus the 174px rail and its 22px marker on each side. */
@media (min-width: 1160px) {
  #toc { display: block; position: fixed; top: 140px; left: calc(50% - var(--page) / 2 + var(--gutter) - 26px - 148px); width: 148px; font-size: 15px; line-height: 1.45; }
}
#toc .toc-h { margin-bottom: 10px; font-weight: 500; font-style: italic; color: var(--muted); }
#toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; }
#toc a:hover { background: none; color: var(--ink); }
#toc a.on { color: var(--ink); }
#toc a.on::before { content: ""; display: inline-block; width: 14px; height: 2px; margin: -3px 8px 0 -22px; vertical-align: middle; background: var(--green); }

@media (max-width: 760px) {
  main.post { font-size: 18px; }
  .hero { padding-top: 64px; }
  .hero h1 { font-size: 38px; }
  .deck { font-size: 21px; }
  .col > h2 { margin-top: 64px; font-size: 27px; }
  .stat-value { font-size: 40px; }
}
