:root {
  color-scheme: light dark;
  --bg: #f4f1ea;
  --paper: #fffcf7;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #d6d3cd;
  --accent: #0f3d4c;
  --accent-fill: #0f3d4c;
  --accent-fill-hover: #164f61;
  --on-accent: #fffcf7;
  --accent-2: #c45c26;
  --accent-2-ink: #a34414;
  --wash: #edf3f4;
  --wash-warm: #f6ece4;
  --wash-warm-border: #e2b9a4;
  --code-ink: #1a2e35;
  --shadow-sm: rgba(28, 25, 23, 0.06);
  --shadow-md: rgba(28, 25, 23, 0.16);
  --shadow-lg: rgba(28, 25, 23, 0.24);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1417;
  --paper: #161d22;
  --ink: #e8e4dc;
  --muted: #a3aeb5;
  --line: #2b3740;
  --accent: #6ab7c9;
  --accent-fill: #185b70;
  --accent-fill-hover: #1f7089;
  --on-accent: #fffcf7;
  --accent-2: #e07a47;
  --accent-2-ink: #eb9063;
  --wash: #18252c;
  --wash-warm: #251b17;
  --wash-warm-border: #7a4027;
  --code-ink: #dde6ea;
  --shadow-sm: rgba(0, 0, 0, 0.28);
  --shadow-md: rgba(0, 0, 0, 0.42);
  --shadow-lg: rgba(0, 0, 0, 0.58);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1417;
    --paper: #161d22;
    --ink: #e8e4dc;
    --muted: #a3aeb5;
    --line: #2b3740;
    --accent: #6ab7c9;
    --accent-fill: #185b70;
    --accent-fill-hover: #1f7089;
    --on-accent: #fffcf7;
    --accent-2: #e07a47;
    --accent-2-ink: #eb9063;
    --wash: #18252c;
    --wash-warm: #251b17;
    --wash-warm-border: #7a4027;
    --code-ink: #dde6ea;
    --shadow-sm: rgba(0, 0, 0, 0.28);
    --shadow-md: rgba(0, 0, 0, 0.42);
    --shadow-lg: rgba(0, 0, 0, 0.58);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 180ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  overflow-x: clip !important;
  transition: background-color 180ms ease, color 180ms ease;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 10px 16px;
  overflow: visible;
  clip-path: none;
  display: inline-flex;
  align-items: center;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-family: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 4px 12px var(--shadow-md);
  outline: 2px solid var(--on-accent);
  outline-offset: -4px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 170ms ease;
}
a:hover { color: var(--ink); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.identity :where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-toy-fs] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
main.toy :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

main:focus,
.main:focus {
  outline: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(180px, 200px) 1fr;
  min-height: 100vh;
}

.identity {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 48px 18px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.brand {
  width: 100%;
  text-align: center;
}

.brand .wordmark {
  display: block;
}

.wordmark {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
}

.place {
  margin: -22px 0 28px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
}

.brand .place {
  margin: 6px 0 12px;
  text-align: center;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
nav a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
nav a .nav-ico {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  display: block;
}
.nav-at { display: none; }
nav a:hover { color: var(--ink); }

/* Wordmark stays centered in the rail. Nav icons share the left edge of "mario ruiz". */
.identity > nav {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding-top: 18px;
  margin-top: 0;
  /* half of ~10ch "mario ruiz" + letter-spacing fudge */
  padding-left: calc(50% - 5ch - 0.18em);
  align-items: flex-start;
}
.identity > nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(10ch + 0.36em);
  height: 1px;
  background: var(--line);
}
.identity > nav a {
  justify-content: flex-start;
  text-align: left;
}

.mail {
  margin-top: auto;
  width: 100%;
  font-size: 15px;
  text-align: center;
}
.mail a {
  display: block;
  margin-bottom: 8px;
  overflow-wrap: break-word;
  text-align: center;
}
.looks { font-size: 13px; color: var(--muted); }

.main {
  padding: 56px 64px 88px;
  max-width: 760px;
}

/* Years in Selected work margin (home only via .work). */
.work-year {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1;
  pointer-events: none;
}

.kicker {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--muted);
}

h1 {
  font-size: clamp(24px, 2.8vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 20px;
}

.lede {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 28px;
}

.how {
  margin: 0 0 16px;
}

.lived {
  margin: 0 0 40px;
  font-size: 14px;
  color: var(--muted);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0 0 40px;
  padding: 0;
}

.pair article,
.entry .callout,
.entry .rules li {
  padding: 20px 22px 20px 20px;
  background: var(--wash);
  border-left: 3px solid var(--accent);
}

.pair h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.pair p { margin: 0; font-size: 16px; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
  margin: 0 0 8px;
  padding: 16px 22px;
  background: var(--wash);
  border-left: 3px solid var(--accent);
}

.stat b {
  font-size: 20px;
  font-weight: 600;
  margin-right: 8px;
  color: var(--accent);
}

.stat span {
  font-size: 14px;
  color: var(--muted);
}

.note {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 56px;
}

section h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}

.work article {
  padding: 0 0 28px;
}

.work h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
}

.work p, .gems p, .also p { margin: 0 0 12px; }

@media (min-width: 641px) {
  .main {
    width: 100%;
    max-width: 820px;
    margin-inline: auto;
  }

  /* Compact nav under the signature; 32px air after reykjavík. */
  .identity {
    gap: 20px;
    min-width: 0;
  }
  .brand .place {
    margin-bottom: 0;
  }
  nav {
    gap: 8px;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    font-size: 15px;
    line-height: 1.25;
  }
  nav a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    padding: 2px 0;
    text-align: left;
    line-height: 1.25;
  }
  .mail {
    margin-top: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    text-align: center;
  }
  .mail a {
    display: block;
    max-width: 100%;
    margin-inline: auto;
    margin-bottom: 0;
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.35;
    hyphens: none;
  }

  /* Shared year gutter so titles line up; wide enough for ranges like 2018–present. */
  .work article {
    display: grid;
    grid-template-columns: 9.75rem minmax(0, 1fr);
    column-gap: 1.1rem;
    align-items: start;
  }

  .work-year {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    margin-top: 0.35em;
    font-size: clamp(15px, 1.55vw, 20px);
    white-space: nowrap;
  }

  .work article > h3 {
    grid-column: 2;
    grid-row: 1;
  }

  .work article > p,
  .work article > .work-body {
    grid-column: 2;
  }
}

@media (min-width: 1025px) {
  body.home-page .main {
    max-width: 1120px;
    padding: 52px 56px 88px;
  }

  .work article {
    grid-template-columns: 10.25rem minmax(0, 1fr);
    column-gap: 1.25rem;
  }

  .work-year {
    font-size: clamp(16px, 1.3vw, 20px);
  }
}

.gems ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.gems li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  font-size: 16px;
}

.gems li span {
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
}

@media (min-width: 1025px) {
  .gems ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }

  .gems li {
    align-items: baseline;
    border-bottom: 1px solid var(--line);
    padding-top: 11px;
    padding-bottom: 10px;
  }

  .gems li span { font-variant-numeric: tabular-nums; }
}

.also { margin: 48px 0 0; }

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

footer a { margin-right: 14px; }

/* Tablets: same narrow rail as desktop; keep 44px tap targets. */
@media (min-width: 641px) and (max-width: 1024px) {
  .shell { grid-template-columns: minmax(180px, 200px) 1fr; }
  .identity { padding: 36px 16px; }
  .main { padding: 40px 28px 72px; }
  .pair { gap: 24px; }
  nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 0;
    padding: 2px 0;
  }
  /* 44px tap without stretching the list into six huge rows. */
  nav a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
  }
  .gems a,
  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .mail a {
    display: block;
    min-height: 44px;
    margin-bottom: 0;
    text-align: center;
    overflow-wrap: break-word;
  }
  .gems li { min-height: 44px; align-items: center; }
}

/* Phones only. Tablets (e.g. iPad 768) keep the ad3 split + sticky rail. */
@media (max-width: 640px) {
  /* Masthead collapse must not rewrite scrollY (that undid .is-scrolled). */
  html { overflow-anchor: none; }
  body { line-height: 1.55; }
  a:hover { color: var(--accent-2-ink); }

  .shell {
    display: block;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: auto;
  }

  .identity {
    position: sticky;
    top: 0;
    z-index: 20;
    align-self: auto;
    height: auto;
    padding: 4px 12px 4px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    gap: 0;
  }

  body:not(.game-page):not(.sim-page) .identity {
    margin: 0 -24px;
    padding: 4px 12px 4px;
  }

  body.sim-page .identity {
    margin: 0 -12px;
    padding: 4px 12px 4px;
  }

  /* Toy rails that stay 100dvh must not stick over the play area. */
  .shell.toy-shell .identity {
    position: static;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .brand .wordmark,
  .wordmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    line-height: 1.4;
    color: var(--ink);
    min-height: 44px;
    padding: 4px 8px;
  }

  .mail {
    display: none;
  }

  .brand .place {
    display: block;
    margin: 0;
    padding: 0;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    text-align: center;
    color: var(--muted);
    line-height: 1.2;
  }

  body.is-scrolled .brand .place {
    display: none;
  }

  nav a .nav-word { display: inline; }
  nav a .nav-at { display: none; }
  nav a .nav-ico { display: none; }

  /* Experiments is longer than Play: wrap cleanly while preserving 44px tap targets. */
  .identity > nav {
    padding-left: 0;
    padding-top: 4px;
    align-items: center;
  }
  .identity > nav a {
    justify-content: center;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0;
    column-gap: 10px;
    gap: 0 10px;
    width: 100%;
    max-width: 100%;
    font-size: 13.5px;
  }
  body.is-scrolled nav {
    margin-top: 0;
  }
  nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .main {
    padding: 40px 0 0;
    max-width: none;
  }

  .kicker {
    display: block;
    margin: 0 0 12px;
  }

  h1 {
    font-size: clamp(24px, 5.5vw, 32px);
    margin: 0 0 16px;
  }

  .lede { max-width: 40em; }

  .how {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 16px;
    margin: 0 0 16px;
  }

  .lived { margin: 0 0 32px; }

  .pair {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 0 48px;
    padding: 0;
    border: none;
  }
  .pair article {
    background: var(--wash);
    border: none;
    border-left: 3px solid var(--accent);
    padding: 20px 22px;
  }
  .pair h2 {
    color: var(--accent);
    margin: 0 0 8px;
  }

  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin: 0 0 16px;
    padding: 16px 18px;
    background: var(--wash);
    border-left: 3px solid var(--accent);
  }
  .stat {
    padding: 4px 0;
    border-top: none;
  }
  .stat b {
    display: block;
    font-size: 22px;
    margin-right: 0;
    letter-spacing: -0.02em;
  }
  .stat span { font-size: 13px; }

  .note { margin: 0 0 48px; }

  .work article {
    display: block;
    padding: 18px 0;
    border-top: 1px solid var(--line);
  }
  .work-year {
    display: block;
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
    width: auto;
    max-width: none;
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: visible;
  }
  .work h3 {
    font-size: 20px;
    margin: 0 0 6px;
  }

  .gems ul { margin: 0 0 16px; }
  .gems li {
    padding: 10px 0;
    border-top: 1px solid var(--line);
    min-height: 44px;
    align-items: center;
  }
  .gems a,
  .note a,
  .also a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
  }

  .also {
    margin: 48px 0;
    padding: 22px 20px;
    background: var(--paper);
    border: 1px solid var(--line);
  }
  .also h2 { margin-bottom: 10px; }

  footer {
    margin-top: 0;
    padding: 28px 0 48px;
  }
  footer p:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
  }
  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-right: 12px;
    padding: 6px 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .gems li { flex-direction: row; gap: 12px; align-items: flex-start; }
  .gem-dl { padding-top: 11px; }
}

@media (max-width: 340px) {
  .stats { grid-template-columns: 1fr; }
}

/* Keep rail chrome even when a toy page redefines :root tokens for the game. */
.identity {
  --bg: #f4f1ea;
  --ink: #1c1917;
  --muted: #57534e;
  --paper: #fffcf7;
  --line: #d6d3cd;
  --accent: #0f3d4c;
  --accent-fill: #0f3d4c;
  --accent-fill-hover: #164f61;
  --on-accent: #fffcf7;
  --wash: #edf3f4;
}

:root[data-theme="dark"] .identity {
  --bg: #0f1417;
  --ink: #e8e4dc;
  --muted: #a3aeb5;
  --paper: #161d22;
  --line: #2b3740;
  --accent: #6ab7c9;
  --accent-fill: #185b70;
  --accent-fill-hover: #1f7089;
  --on-accent: #fffcf7;
  --wash: #18252c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .identity {
    --bg: #0f1417;
    --ink: #e8e4dc;
    --muted: #a3aeb5;
    --paper: #161d22;
    --line: #2b3740;
    --accent: #6ab7c9;
    --accent-fill: #185b70;
    --accent-fill-hover: #1f7089;
    --on-accent: #fffcf7;
    --wash: #18252c;
  }
}

nav a[aria-current="page"] { color: var(--ink); }

.writing .when {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.writing article { padding-bottom: 36px; }

.writing h3 a {
  color: inherit;
  text-decoration: none;
}
.writing h3 a:hover { color: var(--accent); }

.writing article p:last-child {
  margin: 0;
  color: var(--muted);
}

.home-latest {
  margin: 36px 0 4px;
}

.home-latest .post-list {
  margin-top: 14px;
}

.home-latest__more {
  margin: 4px 0 28px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.home-latest__more a {
  text-decoration: none;
  color: var(--accent);
}
.home-latest__more a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Blog index: image left of title / date / lede. Own classes; not .toy. */
.post-list {
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.post-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.post-card__media {
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
}

.post-card__img {
  display: block;
  width: 130px;
  max-width: 130px;
  height: 150px;
  max-height: 150px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.post-card__body {
  min-width: 0;
  flex: 1 1 auto;
}

.post-card__body h3 {
  margin: 0 0 6px;
}

.post-card__body > p:last-child {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .post-card {
    gap: 12px;
  }

  .post-card__img {
    width: 96px;
    max-width: 96px;
    height: 120px;
    max-height: 120px;
  }
}

.entry h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 36px 0 14px;
}

.entry p { margin: 0 0 16px; }

.entry strong { font-weight: 600; }

.entry ul {
  margin: 0 0 16px;
  padding-left: 1.15em;
}

.entry li { margin: 0 0 8px; }
.entry li:last-child { margin-bottom: 0; }

.entry .rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
}

.entry .rules li { margin: 0; }

.post-nav {
  margin: 36px 0 0;
  font-size: 15px;
}

.share-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  vertical-align: middle;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  border-radius: 2px;
}

.share-btn:hover {
  color: var(--ink);
}

.share-btn:focus-visible {
  color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.share-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-status {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.share-status.is-visible {
  opacity: 1;
}

.writing .when .share-actions {
  margin-left: 2px;
}

/* Play index: one row of tag filters (All, Game, Simulation, and the rest). */
.play-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  max-width: 100%;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.play-filter__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 0;
  margin: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.2;
}

.play-filter__btn:hover {
  color: var(--ink);
}

.play-filter__btn[aria-pressed="true"] {
  color: var(--ink);
}

.play-filter__btn:focus-visible {
  color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.toy-list .toy.is-filtered-out {
  display: none;
}

/* Toys index: image left, title + brief line right.
   Scoped under .toy-list so game pages' <main class="toy"> are not shrink-wrapped. */
.toy-list {
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.toy-list .toy {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.toy__media {
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
}

.toy__img {
  display: block;
  width: 120px;
  max-width: 120px;
  height: 150px;
  max-height: 150px;
  object-fit: cover;
  object-position: center;
}

/* Viking II cassette is landscape: show it whole. Letterbox matches the photo border. */
.toy__media--contain {
  background: #d2c5b4;
}

.toy__img--contain {
  object-fit: contain;
  background: #d2c5b4;
}

.toy__body {
  min-width: 0;
  flex: 1 1 auto;
}

.toy__body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.toy__body h3 a {
  color: inherit;
  text-decoration: none;
}

.toy__body h3 a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toy__body p {
  margin: 0;
  color: var(--muted);
}

.toy__why {
  margin-top: 6px;
  font-size: 0.95em;
  color: var(--muted);
}

/* Tags sit beside the title. Soft wash per kind, one radius, one height. */
.toy__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  margin: 0 0 8px;
  min-width: 0;
  max-width: 100%;
}

.toy__body .toy__head h3 {
  margin: 0;
  flex: 0 0 auto;
  max-width: 100%;
  line-height: 22px;
}

.toy__body p.toy__play {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0;
  max-width: 100%;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink);
}

.toy__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1;
}

button.toy__tag {
  appearance: none;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: none;
  min-height: 0;
}

.play-filter .toy__tag {
  flex: 0 0 auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 13px;
}

.play-filter .toy__tag[aria-pressed="true"] {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
  box-shadow: none;
}

button.toy__tag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toy__tag[aria-pressed="true"] {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor;
}

.toy__tag--all {
  background: #efeae3;
  border-color: #ddd4c8;
  color: #3a342c;
}

/* Washed fills on the page ground. Not the brand teal, not the LLM card tint. */
.toy__tag--count {
  background: #ddd4c4;
  border-color: #cfc4b0;
  color: #3a342c;
}

.toy__tag--pass {
  background: #ead0b6;
  border-color: #d8b898;
  color: #5c3b24;
}

.toy__tag--online {
  background: #d0d8ea;
  border-color: #b8c4dc;
  color: #243044;
}

.toy__tag--voice {
  width: 22px;
  padding: 0;
  background: #e2d0dc;
  border-color: #d0b8c8;
  color: #4a3142;
}

.toy__tag--voice svg {
  display: block;
  width: 13px;
  height: 13px;
}

.toy__tag--sim {
  background: #d2dec4;
  border-color: #bccbb0;
  color: #323f28;
}

/* Washed pewter. Not the site teal #0f3d4c, not the sage of Simulation. */
.toy__tag--game {
  background: #d7dbe0;
  border-color: #c0c6ce;
  color: #2a3138;
}

/* Washed sea-glass. Not the brand teal, not Simulation sage, not Online blue. */
.toy__tag--lab {
  background: #d5e0e2;
  border-color: #b7c9cc;
  color: #1e3a42;
}

:root[data-theme="dark"] .toy__tag--all { background: #20282e; border-color: #34414b; color: #e0dad0; }
:root[data-theme="dark"] .toy__tag--count { background: #262420; border-color: #3d3931; color: #d8cfc2; }
:root[data-theme="dark"] .toy__tag--pass { background: #2e2119; border-color: #4e3729; color: #e8bfa0; }
:root[data-theme="dark"] .toy__tag--online { background: #1b2434; border-color: #31415c; color: #afc6ee; }
:root[data-theme="dark"] .toy__tag--voice { background: #2b1e28; border-color: #4a3345; color: #deb6d0; }
:root[data-theme="dark"] .toy__tag--sim { background: #1c291f; border-color: #314736; color: #b5d4a3; }
:root[data-theme="dark"] .toy__tag--game { background: #1e252c; border-color: #34404b; color: #cbd3dc; }
:root[data-theme="dark"] .toy__tag--lab { background: #17282e; border-color: #2b4852; color: #9fd6e2; }
:root[data-theme="dark"] .play-filter .toy__tag[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); box-shadow: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toy__tag--all { background: #20282e; border-color: #34414b; color: #e0dad0; }
  :root:not([data-theme="light"]) .toy__tag--count { background: #262420; border-color: #3d3931; color: #d8cfc2; }
  :root:not([data-theme="light"]) .toy__tag--pass { background: #2e2119; border-color: #4e3729; color: #e8bfa0; }
  :root:not([data-theme="light"]) .toy__tag--online { background: #1b2434; border-color: #31415c; color: #afc6ee; }
  :root:not([data-theme="light"]) .toy__tag--voice { background: #2b1e28; border-color: #4a3345; color: #deb6d0; }
  :root:not([data-theme="light"]) .toy__tag--sim { background: #1c291f; border-color: #314736; color: #b5d4a3; }
  :root:not([data-theme="light"]) .toy__tag--game { background: #1e252c; border-color: #34404b; color: #cbd3dc; }
  :root:not([data-theme="light"]) .toy__tag--lab { background: #17282e; border-color: #2b4852; color: #9fd6e2; }
  :root:not([data-theme="light"]) .play-filter .toy__tag[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); box-shadow: none; }
}

/* Play title row. The h1 stays "Play"; the mark sits beside it. */
.play-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}

.play-title h1 {
  margin: 0;
}

/* Not a filter: smaller than the tags, not clickable, and a washed ochre no tag uses. */
.play-title__beta {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #dfc884;
  border-radius: 5px;
  background: #f3e4b0;
  color: #4a3a10;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
}

/* Share on the Play index: the blog's bare .share-btn, so it reads as an action, not a tag. */
.play-title .share-actions {
  margin-left: 0;
}

.play-title .share-btn,
.toy-list .toy__share .share-btn {
  width: 44px;
  height: 44px;
}

/* Cards: the share floats right on the name row only, so tags that drop below keep the full width.
   It sits before the tags in the markup; a float after them would fall to the next line. */
.toy-list .toy__head {
  display: block;
  margin-bottom: 2px;
  font-size: 0;
}

.toy-list .toy__body .toy__head h3 {
  display: inline-block;
  vertical-align: top;
  margin: 0 10px 6px 0;
}

.toy-list .toy__body p.toy__play {
  display: inline-flex;
  vertical-align: top;
  margin-bottom: 6px;
}

.toy-list .toy__share {
  position: relative;
  float: right;
  margin: -11px -14px 0 4px;
}

/* Above the icon, so the tags beside it are never covered. */
.toy-list .toy__share .share-status {
  position: absolute;
  right: 6px;
  bottom: 100%;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .play-title {
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  .toy-list .toy {
    gap: 12px;
  }

  .toy__img {
    width: 96px;
    max-width: 96px;
    height: 120px;
    max-height: 120px;
  }
}

/* Play pieces: shared language + sound controls (top of game content, not the rail). */
.toy-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.4rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.lang-switch {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
  min-width: 0;
}

.lang-switch button[data-lang] {
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  cursor: pointer;
  opacity: 0.72;
}

.lang-switch button[data-lang][aria-pressed="true"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.lang-switch button[data-lang]:hover,
.lang-switch button[data-lang]:focus-visible {
  opacity: 1;
}

.sound-btn {
  margin-left: 0.2rem;
  opacity: 0.9;
  color: inherit;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  text-decoration: none;
  flex: 0 0 auto;
}

.sound-btn .mute-ico {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-btn .mute-ico[hidden] {
  display: none !important;
}

.sound-btn[aria-pressed="true"] {
  opacity: 0.62;
}

.sound-btn:hover,
.sound-btn:focus-visible {
  opacity: 1;
}

/* Same row as language and the speaker. Icon only; the name is the aria-label.
   Color follows the control row so it stays readable on paper and on a dark board. */
.toy-controls .fs-btn {
  margin-left: 0.2rem;
  opacity: 0.9;
  color: inherit;
  background: transparent;
  border: 0;
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  gap: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  text-decoration: none;
  flex: 0 0 auto;
  line-height: 1;
  border-radius: 0;
}

.toy-controls .fs-btn .fs-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toy-controls .fs-btn .fs-ico {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toy-controls .fs-btn .fs-ico[hidden] {
  display: none !important;
}

.toy-controls .fs-btn[aria-pressed="true"],
.toy-controls .fs-btn:hover,
.toy-controls .fs-btn:focus-visible {
  opacity: 1;
  color: inherit;
  background: transparent;
  text-decoration: none;
}

.toy-controls .help-btn {
  margin-left: 0.15rem;
  opacity: 0.9;
  color: inherit;
  background: transparent;
  border: 0;
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  position: relative;
  z-index: 5;
}

.toy-controls .help-btn[aria-expanded="true"],
.toy-controls .help-btn:hover,
.toy-controls .help-btn:focus-visible {
  opacity: 1;
  color: inherit;
  background: transparent;
}

[data-toy-fs] > .toy-help {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: 3.15rem;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem 2.4rem;
  background: rgba(18, 14, 11, 0.62);
  box-sizing: border-box;
}

[data-toy-fs] > .toy-help[hidden] {
  display: none !important;
}

[data-toy-fs] > .toy-help .toy-help__card {
  position: relative;
  width: min(36rem, 100%);
  max-height: 100%;
  overflow: auto;
  box-sizing: border-box;
  padding: 1.15rem 1.25rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px var(--shadow-lg);
}

[data-toy-fs] > .toy-help .toy-help__body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: pre-wrap;
}

[data-toy-fs] > .toy-help .toy-help__x {
  position: absolute;
  top: 0.25rem;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  [data-toy-fs] .top,
  [data-toy-fs] .title-row,
  [data-toy-fs] .toy-head,
  [data-toy-fs] .snake-bar,
  [data-toy-fs] .head {
    max-width: 100%;
  }
  [data-toy-fs] .toy-controls {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 0.15rem 0.28rem;
  }
  .lang-switch {
    gap: 0.28rem;
  }
  .lang-switch button[data-lang] {
    font-size: 0.65rem;
  }
  .sound-btn,
  .toy-controls .fs-btn,
  .toy-controls .help-btn {
    width: 1.9rem;
    height: 1.9rem;
    min-width: 1.9rem;
    min-height: 1.9rem;
  }
  [data-toy-fs] > .toy-help {
    top: 5.4rem;
  }
  .sound-btn .mute-ico {
    width: 1.45rem;
    height: 1.45rem;
  }
  .toy-controls .fs-btn .fs-ico {
    width: 1.2rem;
    height: 1.2rem;
  }
}

/* Desktop native fullscreen (wider than 1100px): the element itself is the
   viewport. Do not restyle `.is-fs` here — that class is the phone/tablet cover. */
[data-toy-fs]:fullscreen {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  padding: 10px 12px 12px !important;
  background-color: var(--toy-fs-bg, #fffcf7) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-toy-fs]:fullscreen > .toy-fs-fit {
  box-sizing: border-box;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

[data-toy-fs]:fullscreen .toy-fs-out {
  display: none !important;
}

@media (max-width: 1100px) {
  html.toy-fs-open,
  html.toy-fs-open body {
    overflow: hidden !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overscroll-behavior: none;
  }

  html.toy-fs-open .identity,
  html.toy-fs-open .identity nav {
    display: none !important;
  }

  [data-toy-fs]:fullscreen,
  [data-toy-fs].is-fs {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100% !important;
    height: 100dvh !important;
    height: 100svh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    z-index: 2147483000 !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)) !important;
    background-color: var(--toy-fs-bg, #fffcf7) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  [data-toy-fs]:fullscreen > .toy-fs-fit,
  [data-toy-fs].is-fs > .toy-fs-fit {
    box-sizing: border-box;
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  [data-toy-fs].is-fs.is-fs-fill > .toy-fs-fit,
  [data-toy-fs]:fullscreen.is-fs-fill > .toy-fs-fit {
    transform: none !important;
  }

  [data-toy-fs].is-fs .toy-fs-out,
  [data-toy-fs]:fullscreen .toy-fs-out {
    display: none !important;
  }

  [data-toy-fs].is-fs .play,
  [data-toy-fs].is-fs .play-row,
  [data-toy-fs].is-fs .slot,
  [data-toy-fs].is-fs .stage,
  [data-toy-fs].is-fs .playset {
    min-width: 0;
    min-height: 0;
  }

  [data-toy-fs].is-fs .play,
  [data-toy-fs].is-fs .play-row {
    flex: 1 1 auto;
  }

  [data-toy-fs].is-fs .stage,
  [data-toy-fs].is-fs .board-wrap {
    max-width: 100% !important;
  }

  [data-toy-fs].is-fs canvas#board,
  [data-toy-fs].is-fs canvas#map,
  [data-toy-fs].is-fs canvas#fieldA,
  [data-toy-fs].is-fs canvas#fieldB {
    width: 100%;
    height: 100%;
    max-width: 100%;
  }
}

/* Signature inside the play zone (bottom-left), also in full screen. */
[data-toy-fs] {
  position: relative;
  overflow-x: clip;
  max-width: 100%;
}

[data-toy-fs]:not(:fullscreen):not(.is-fs) {
  padding-bottom: 2.65rem !important;
}

[data-toy-fs] .toy-sign {
  position: absolute;
  z-index: 6;
  left: 0.55rem;
  bottom: 0.3rem;
  margin: 0;
  padding: 0;
  width: max-content;
  max-width: 8.5rem;
  pointer-events: none;
  user-select: none;
  text-align: left;
  text-indent: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 400;
  font-style: normal;
  font-variant: normal;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: lowercase;
  text-decoration: none;
  color: #1c1917;
  background: none;
  border: 0;
  box-shadow: none;
  text-shadow: none;
}

[data-toy-fs] .toy-sign__name,
[data-toy-fs] .toy-sign__place {
  display: block;
  margin: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
}

[data-toy-fs] .toy-sign__place {
  margin-top: 1px;
  font-size: 10px;
  color: #57534e;
}

[data-toy-fs] .toy-sign--on-dark {
  color: #fffcf7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

[data-toy-fs] .toy-sign--on-dark .toy-sign__place {
  color: rgba(255, 252, 247, 0.78);
}

.figure:has(> .toy-sign) {
  position: relative;
  padding-bottom: 2.6rem !important;
}

[data-toy-fs]:fullscreen > .toy-sign,
[data-toy-fs].is-fs > .toy-sign {
  position: absolute;
  bottom: 0.4rem;
  left: 0.65rem;
  top: auto;
  transform: none;
}

/* Contagion's credit sits on the bottom-left. Keep the mark just above it. */
body.sim-page [data-toy-fs] > .toy-sign {
  bottom: 7.2rem;
}

@media (max-width: 720px) {
  body.sim-page [data-toy-fs] > .toy-sign {
    bottom: 0.3rem;
  }
}

/* Versión de la web (la escribe scripts/build_version.py desde VERSION). */
.footer__version {
  margin: .75rem 0 0;
  font-size: .75rem;
  color: var(--muted);
  opacity: 1;
  letter-spacing: .02em;
}

@media print {
  html,
  body {
    transition: none !important;
  }

  .skip-link,
  .rail-tools,
  .cmdk-backdrop {
    display: none !important;
  }
}

/* Home page editorial layout (Paso 2): hero CTAs, systems showcase,
   interactive "One payload, three clients" diagram, NetApp subprojects,
   gem descriptions, and Live lab strip. */
body.home-page h1 {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.hero {
  margin: 0 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
}

.hero-availability__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.hero-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-btn--primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
}

.hero-btn--primary:hover {
  background: var(--accent-fill-hover);
  border-color: var(--accent-fill-hover);
  color: var(--on-accent);
}

.hero-main .lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  max-width: 58ch;
}

.hero-proof .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0 0 8px;
  padding: 16px 20px;
}

.hero-proof .stat b {
  display: block;
  font-size: 21px;
  line-height: 1.2;
  margin-right: 0;
}

.hero-proof .hero-note {
  margin: 0 0 16px;
  font-size: 13px;
}

.hero-proof .how {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  border-left: 3px solid var(--line);
  padding-left: 14px;
}

.hero-proof .lived {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.systems {
  margin: 0 0 48px;
}

.systems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.sys-card {
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}

.sys-card__meta {
  margin: 0 0 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.sys-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.sys-card p:last-child {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}

/* Interactive "One payload, three clients" diagram */
.payload-arch {
  margin: 0 0 52px;
}

.payload-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 16px;
}

.payload-head h2 {
  margin: 0 0 8px;
}

.payload-sub {
  margin: 0;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 64ch;
}

.payload-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payload-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.payload-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.payload-tab[aria-selected="true"] {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}

.payload-demo {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.payload-topology {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.payload-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.pt-box {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.25;
}

.pt-box--core {
  fill: var(--wash);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.pt-title {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
}

.pt-title--core {
  fill: var(--accent);
}

.pt-sub {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9.5px;
  fill: var(--muted);
}

.pt-wire {
  stroke: var(--line);
  stroke-width: 1.5;
  transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
}

.pt-wire--in {
  stroke: var(--accent);
}

.pt-dot--in {
  fill: var(--accent);
}

.pt-node {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.25;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.pt-node-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  fill: var(--muted);
  transition: fill 0.2s ease;
}

.payload-demo[data-active="slack"] .pt-wire--slack,
.payload-demo[data-active="web"] .pt-wire--web,
.payload-demo[data-active="mcp"] .pt-wire--mcp {
  stroke: var(--accent-2);
  stroke-width: 2.5;
}

.payload-demo[data-active="slack"] .pt-node--slack,
.payload-demo[data-active="web"] .pt-node--web,
.payload-demo[data-active="mcp"] .pt-node--mcp {
  fill: var(--wash);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.payload-demo[data-active="slack"] .pt-node-label--slack,
.payload-demo[data-active="web"] .pt-node-label--web,
.payload-demo[data-active="mcp"] .pt-node-label--mcp {
  fill: var(--accent);
  font-weight: 600;
}

.payload-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.payload-col-label {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.payload-json {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  overflow-x: auto;
}

.pj-line {
  display: block;
  padding: 1px 6px;
  margin: 0 -6px;
  border-left: 3px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.pj-hl-all,
.payload-demo[data-active="slack"] .pj-hl-slack,
.payload-demo[data-active="web"] .pj-hl-web,
.payload-demo[data-active="mcp"] .pj-hl-mcp {
  background: var(--wash);
  border-left-color: var(--accent-2);
}

.payload-panel[hidden] {
  display: none;
}

.client-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--muted);
}

.client-tag {
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--wash);
  color: var(--accent);
  font-weight: 600;
}

.client-card {
  padding: 14px 16px;
  background: var(--wash);
  border-left: 3px solid var(--accent);
  font-size: 14.5px;
  line-height: 1.5;
}

.client-line {
  margin: 0 0 6px;
}

.client-line:last-child {
  margin-bottom: 0;
}

.client-card code,
.client-table code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink);
}

.client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.client-table th,
.client-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.client-table th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.client-table tr:last-child td {
  border-bottom: 0;
}

.state-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
}

.state-badge--fail {
  background: var(--wash-warm);
  color: var(--accent-2-ink);
  border: 1px solid var(--wash-warm-border);
}

.client-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.payload-foot {
  margin: 12px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
}

.payload-foot a {
  text-decoration: none;
}

.payload-foot a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Selected work: parent NetApp entry with nested subprojects */
.work-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
}

.work-summary {
  margin: 0 0 16px;
}

.work-subprojects {
  list-style: none;
  margin: 16px 0 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.work-sub {
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.work-sub__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin: 0 0 6px;
}

.work-sub h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.work-sub__when {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
}

.work-sub p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Open source gem one-line descriptions */
.gem-info {
  min-width: 0;
  flex: 1 1 auto;
}

.gem-info a {
  font-weight: 500;
}

.gem-desc {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.gem-dl {
  flex: 0 0 auto;
  white-space: nowrap;
}

.gems .gem-info .gem-desc {
  margin: 2px 0 0;
}

.gems li {
  align-items: flex-start;
}

/* Live lab strip */
.live-lab {
  margin: 48px 0 0;
}

.live-lab__intro {
  margin: 0 0 18px;
  color: var(--muted);
}

.live-lab__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.lab-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.lab-card:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-2px);
}

.lab-card__preview {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  line-height: 0;
}

.lab-card__preview svg {
  display: block;
  width: 100%;
  height: auto;
}

.lab-card__preview--attn {
  background: #070b14;
  border-color: #1a2233;
}

.lab-attn-arc--dim {
  stroke: rgba(168, 152, 120, 0.35);
  stroke-width: 1.5;
}

.lab-attn-arc--main {
  stroke: #e6c86a;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-width 0.2s ease;
}

.lab-card:hover .lab-attn-arc--main {
  stroke-width: 5;
}

.lab-attn-word {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  fill: #a89878;
}

.lab-attn-word--focus,
.lab-attn-word--target {
  fill: #e8dcc0;
  font-weight: 600;
}

.lab-card__preview--meter {
  background: var(--bg);
}

.lab-meter-bar {
  transition: transform 0.2s ease;
}

.lab-meter-bar--a {
  fill: var(--accent);
}

.lab-meter-bar--b {
  fill: var(--muted);
}

.lab-meter-bar--c {
  fill: var(--accent-2);
}

.lab-meter-dot {
  fill: var(--accent-2);
}

.lab-card:hover .lab-meter-bar--c {
  transform: translateX(4px);
}

.lab-card__preview--bantumi {
  background: #1a1410;
  border-color: #3d2e22;
}

.lab-ban-board {
  fill: #2a2118;
  stroke: #5a4332;
  stroke-width: 1.5;
}

.lab-ban-store {
  fill: #1a120d;
  stroke: #5a4332;
  stroke-width: 1.2;
}

.lab-ban-store--lit {
  stroke: #d4a04a;
}

.lab-ban-pit {
  fill: #241a14;
  stroke: #5a4332;
  stroke-width: 1.2;
}

.lab-ban-pit--lit {
  fill: #3a2a1e;
  stroke: #e8b86a;
  stroke-width: 1.6;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.lab-card:hover .lab-ban-pit--lit {
  fill: #4c3726;
}

.lab-card h3 {
  margin: 0 0 6px;
  font-size: 17.5px;
  font-weight: 600;
  color: var(--accent);
}

.lab-card__skill {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}

.live-lab__more {
  margin: 14px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
}

.live-lab__more a {
  text-decoration: none;
}

.live-lab__more a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 820px) {
  .systems-grid {
    grid-template-columns: 1fr 1fr;
  }

  .payload-stage {
    grid-template-columns: 1.05fr 1fr;
    gap: 20px;
  }

  .live-lab__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.95fr);
    gap: 36px;
  }

  .payload-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .work-subprojects {
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
  }
}

@media (max-width: 640px) {
  body.home-page .main {
    padding: 24px 0 0;
  }

  body.home-page h1 {
    font-size: clamp(32px, 3.6vw, 44px);
    line-height: 1.15;
    margin: 0 0 14px;
  }

  .hero {
    margin-bottom: 36px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-main .lede {
    font-size: 17.5px;
  }

  .payload-demo {
    padding: 14px;
  }

  .payload-foot a,
  .live-lab__more a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* --- Paso 4: Rail tools (Theme toggle & Command palette), View transitions & Microanimations --- */
.sr-copy-scratch {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

.rail-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rail-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 170ms ease, background-color 170ms ease, color 170ms ease;
}

.rail-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.rail-ico {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  display: block;
}

.rail-ico--sun {
  display: none;
}

:root[data-theme="dark"] .rail-ico--moon { display: none; }
:root[data-theme="dark"] .rail-ico--sun { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rail-ico--moon { display: none; }
  :root:not([data-theme="light"]) .rail-ico--sun { display: block; }
}

.rail-btn__label {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
}

.rail-kbd {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand tools"
      "nav nav";
    align-items: center;
    gap: 0 8px;
  }

  .brand {
    grid-area: brand;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
  }

  .brand .wordmark {
    padding: 4px 4px;
  }

  .rail-tools {
    grid-area: tools;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: auto;
    padding-top: 0;
    border-top: 0;
  }

  .identity > nav {
    grid-area: nav;
  }

  .rail-btn {
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
    justify-content: center;
  }

  .rail-btn--theme {
    width: 44px;
    padding: 0;
  }

  .rail-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 359px) {
  .rail-kbd {
    display: none;
  }
}

/* Command Palette modal (Cmd/Ctrl+K, /) */
html.cmdk-open {
  overflow: hidden;
}

.cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(12vh, 88px) 16px 24px;
  background: rgba(15, 20, 23, 0.56);
  backdrop-filter: blur(2px);
}

.cmdk-backdrop[hidden] {
  display: none;
}

.cmdk-dialog {
  width: min(560px, 100%);
  max-height: min(76dvh, 540px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 20px 48px var(--shadow-lg);
  overflow: hidden;
  animation: cmdk-enter 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cmdk-enter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cmdk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--line);
}

.cmdk-title {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.cmdk-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.cmdk-close:hover {
  color: var(--ink);
  background: var(--wash);
}

.cmdk-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.cmdk-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.35;
}

.cmdk-input::placeholder {
  color: var(--muted);
}

.cmdk-list {
  flex: 1 1 auto;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
}

.cmdk-list[hidden] {
  display: none;
}

.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.cmdk-item.is-active,
.cmdk-item:hover {
  background: var(--wash);
  border-left-color: var(--accent);
}

.cmdk-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.cmdk-item.is-active .cmdk-item__title {
  color: var(--accent);
}

.cmdk-item__meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48%;
}

.cmdk-empty {
  margin: 0;
  padding: 20px 16px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.cmdk-empty[hidden] {
  display: none;
}

.cmdk-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--muted);
}

.cmdk-status {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 640px) {
  .cmdk-backdrop {
    padding: 12px 10px 20px;
  }

  .cmdk-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .cmdk-item__meta {
    max-width: 100%;
    text-align: left;
  }
}

/* Microanimations (150–220 ms) + Selected work active year row */
.post-card h3 a,
.gem-info a,
.home-latest__more a,
.live-lab__more a,
.payload-foot a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 180ms ease, background-size 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card h3 a:hover,
.post-card h3 a:focus-visible,
.gem-info a:hover,
.gem-info a:focus-visible,
.home-latest__more a:hover,
.home-latest__more a:focus-visible,
.live-lab__more a:hover,
.live-lab__more a:focus-visible,
.payload-foot a:hover,
.payload-foot a:focus-visible {
  text-decoration: none;
  background-size: 100% 1px;
}

.sys-card,
.work-sub {
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.sys-card:hover,
.work-sub:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.work-entry .work-year {
  transition: color 180ms ease, transform 180ms ease;
}

.work-entry.is-active-work .work-year,
.work-entry:hover .work-year,
.work-entry:focus-within .work-year {
  color: var(--accent);
  font-weight: 600;
}

.toy__img {
  border: 1px solid var(--line);
  border-radius: 3px;
}

@media (min-width: 641px) and (prefers-reduced-motion: no-preference) {
  .identity {
    view-transition-name: site-rail;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .lab-card:hover,
  .lab-card:hover .lab-meter-bar--c,
  .sys-card:hover,
  .work-sub:hover {
    transform: none;
  }
  .post-card h3 a,
  .gem-info a,
  .home-latest__more a,
  .live-lab__more a,
  .payload-foot a {
    transition: none;
  }
}
