html, body { overflow-x: hidden; }
footer { justify-content: center; align-items: center; text-align: center; }
.case-header { padding-left: max(var(--pad), 82px); }
.case-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 5%);
  font-family: Onest, "Segoe UI", sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.case-identity i { width: 7px; height: 7px; flex: 0 0 7px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent); }
.case-identity strong { font-size: 13px; font-weight: 600; }
.case-identity small { padding-left: 10px; color: var(--muted); border-left: 1px solid var(--line); font-size: 12px; font-weight: 500; }
.case-header .portfolio-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  margin-left: -14px;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s, background-color .2s, border-color .2s, transform .12s;
}
.case-header .portfolio-link:hover,
.case-header .portfolio-link:focus-visible {
  color: #111;
  background: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  outline: none;
}
.case-header .portfolio-link:active { transform: translateY(1px) scale(.98); }
.toc a {
  position: relative;
  padding: 20px 18px;
  text-align: center;
  transition: color .2s, background-color .2s, transform .12s, box-shadow .12s;
}
.toc a:hover,
.toc a:focus-visible {
  color: #05070c;
  background: rgb(255 255 255 / 34%);
  box-shadow: inset 0 -3px 0 #11182a;
  transform: translateY(-2px);
  outline: none;
}
.toc a:active {
  background: rgb(17 24 42 / 16%);
  box-shadow: inset 0 3px 0 rgb(17 24 42 / 28%);
  transform: translateY(1px);
}
.eyebrow,
.num { font-size: 14px; letter-spacing: .025em; }
.flowdesk-menu-toggle {
  position: fixed;
  top: 13px;
  left: 16px;
  z-index: 52;
  display: grid;
  align-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 7px 24px rgb(0 0 0 / 10%);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: color .2s, background-color .2s, border-color .2s, transform .2s;
}
.flowdesk-menu-toggle span { display: block; width: 100%; height: 2px; background: currentColor; }
.flowdesk-menu-toggle:hover,
.flowdesk-menu-toggle:focus-visible {
  color: #111;
  background: #fff;
  border-color: #fff;
  transform: rotate(-4deg);
  outline: none;
}
.flowdesk-menu-toggle:active { transform: scale(.94); }
.flowdesk-menu-backdrop { position: fixed; inset: 0; z-index: 49; background: rgb(8 12 24 / 48%); backdrop-filter: blur(3px); }
.flowdesk-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: min(390px, 88vw);
  padding: 30px 24px;
  color: var(--ink);
  background: var(--bg);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 60px rgb(0 0 0 / 18%);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform .28s ease, visibility .28s;
  overflow-y: auto;
}
.flowdesk-menu.open { transform: translateX(0); visibility: visible; }
.flowdesk-menu-head { display: flex; align-items: center; justify-content: space-between; margin: 48px 0 28px; font: 500 13px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }
.flowdesk-menu-close { width: 40px; height: 40px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 24px; cursor: pointer; transition: color .2s, background-color .2s, transform .12s; }
.flowdesk-menu-close:hover,
.flowdesk-menu-close:focus-visible { color: #111; background: #fff; outline: none; }
.flowdesk-menu-close:active { transform: scale(.94); }
.flowdesk-menu-list { display: grid; }
.flowdesk-menu-list a { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 17px 10px; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; transition: color .22s, background-color .22s, border-color .22s, box-shadow .22s, transform .22s; }
.flowdesk-menu-list a:last-child { border-bottom: 1px solid var(--line); }
.flowdesk-menu-list a:hover,
.flowdesk-menu-list a:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
  box-shadow: 0 14px 32px color-mix(in srgb, var(--blue) 16%, transparent);
  transform: translateY(-5px);
  outline: none;
}
.flowdesk-menu-list b { color: var(--blue); font: 500 11px "IBM Plex Mono", monospace; }
.flowdesk-menu-list strong,
.flowdesk-menu-list small { display: block; }
.flowdesk-menu-list strong { font-size: 17px; font-weight: 600; }
.flowdesk-menu-list small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.flowdesk-menu-open { overflow: hidden; }
.flowdesk-section-controls button,
.flowdesk-section-controls a {
  position: fixed;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 8px 28px rgb(0 0 0 / 12%);
  backdrop-filter: blur(12px);
  font: 24px/1 Onest, sans-serif;
  text-decoration: none;
  cursor: pointer;
  opacity: .82;
  transition: color .2s, background-color .2s, border-color .2s, transform .2s, opacity .2s;
}
.section-up { right: 18px; top: 94px; }
.section-down { right: 18px; bottom: 18px; }
.flowdesk-section-controls button:hover,
.flowdesk-section-controls button:focus-visible,
.flowdesk-section-controls a:hover,
.flowdesk-section-controls a:focus-visible {
  color: #111;
  background: #fff;
  border-color: #fff;
  opacity: 1;
  outline: none;
}
.section-up:hover,
.section-up:focus-visible { transform: translateY(-3px); }
.section-down:hover,
.section-down:focus-visible { transform: translateY(3px); }
.flowdesk-section-controls button:active,
.flowdesk-section-controls a:active { scale: .94; }
.architecture .box,
.architecture .actor,
.architecture .store {
  transition: color .22s, background-color .22s, border-color .22s, box-shadow .22s, transform .22s;
  cursor: default;
}
.architecture .box:hover,
.architecture .box:focus-visible,
.architecture .actor:hover,
.architecture .actor:focus-visible,
.architecture .store:hover,
.architecture .store:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
  border-color: var(--blue);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--blue) 16%, transparent);
  transform: translateY(-5px);
  outline: none;
}
.download-list a {
  position: relative;
  transition: color .22s, background-color .22s, border-color .22s, box-shadow .22s, transform .22s;
}
.download-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.download-list a:hover,
.download-list a:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
  box-shadow: 0 14px 32px color-mix(in srgb, var(--blue) 16%, transparent);
  transform: translateY(-5px);
}
.download-list a:hover { outline: none; }
.download-list a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent);
  outline-offset: 3px;
}
.flowdesk-theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent);
  outline-offset: 3px;
}
.flowdesk-theme-toggle .moon { display: none; }
html[data-theme="dark"] .flowdesk-theme-toggle .sun { display: none; }
html[data-theme="dark"] .flowdesk-theme-toggle .moon { display: block; }
html[data-theme="dark"] {
  --bg: #121418;
  --ink: #f1f0eb;
  --muted: #adb2bc;
  --line: #353941;
  --blue: #7fa7ff;
  --dark: #0b0f1b;
  --acid: #cfea55;
  --surface: #191c21;
}
html[data-theme="dark"] .case-header {
  box-shadow: 0 1px 0 rgb(255 255 255 / 2%), 0 12px 32px rgb(0 0 0 / 16%);
}
html[data-theme="dark"] .blue { background: #1d4fc2; }
html[data-theme="dark"] .code { background: #0d1422; }
html[data-theme="dark"] .box,
html[data-theme="dark"] .actor,
html[data-theme="dark"] .store { border-color: #46516a; }
html[data-theme="dark"] .entities span { background: rgb(255 255 255 / 2%); }
@media (max-width: 600px) {
  .case-header {
    gap: 12px;
    padding-left: 70px;
  }
  .case-header > a {
    white-space: nowrap;
  }
  .case-actions > a {
    max-width: 82px;
    line-height: 1.25;
    text-align: right;
  }
  .hero h1 { font-size: 14.5vw; }
  .hero h1 em { display: block; }
  .toc { max-width: 100vw; }
  .portfolio-link { min-height: 38px; padding: 0 9px; margin-left: -9px; font-size: 12px; }
  .flowdesk-menu-toggle { top: 13px; left: 12px; width: 42px; height: 42px; }
  .flowdesk-section-controls button,
  .flowdesk-section-controls a { width: 44px; height: 44px; font-size: 20px; }
  .section-up { right: 10px; top: 84px; }
  .section-down { right: 10px; bottom: 10px; }
  .eyebrow,
  .num { font-size: 13px; line-height: 1.45; }
}
