@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/eb-garamond-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

/* Dark is the product default. Light only via html[data-theme="light"] (sidebar toggle). */
:root {
  color-scheme: dark;
  --window: #0e0e0e;
  --page: #181818;
  --ink: #f9efe6;
  --text: #c0c0c0;
  --muted: #888888;
  --hair: #2e2e2e;
  --outline: #646464;
  --outline-w: #5f5f5f;
  --pro: #3dbf74;
  --ong: #6f8ff5;
  --reg: #7b7b7b;
  --alert: #e8735c;
  --active: rgba(255, 255, 255, 0.07);
  --tint: rgba(255, 255, 255, 0.14);
  --veil: rgba(0, 0, 0, 0.6);
  --rd: 6px;
  --display: "EB Garamond", Garamond, Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --side: 232px;
  --title-h: 46px;
  --ui-scale: 1.1;
  --m-micro: 120ms;
  --m-enter: 420ms;
  --m-shared: 560ms;
  --m-draw: 1100ms;
  --m-rise: 16px;
  --m-stagger: 70ms;
  --m-rm: 150ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-move: cubic-bezier(0.6, 0, 0.2, 1);
  --ease-float: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-draw: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-dissolve: cubic-bezier(0.4, 0, 0.6, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  --page: #f9efe6;
  --window: #f1e5d9;
  --ink: #0e0e0e;
  --text: #3f3c39;
  --muted: #847f7a;
  --hair: #e3dad0;
  --outline: #928980;
  --outline-w: #8c837b;
  --pro: #22a35a;
  --ong: #4169e1;
  --reg: #9a948d;
  --alert: #a8321f;
  --active: rgba(14, 14, 14, 0.07);
  --tint: rgba(14, 14, 14, 0.12);
  --veil: rgba(14, 14, 14, 0.42);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  zoom: var(--ui-scale);
  height: 100%;
}
html,
body {
  margin: 0;
}
body {
  /* zoom scales layout after vh is resolved; divide so the shell fits the viewport */
  height: calc(100vh / var(--ui-scale));
  height: calc(100dvh / var(--ui-scale));
  overflow: hidden;
  background: var(--window);
  color: var(--ink);
  font: 400 15.5px/1.62 var(--body);
}

.display-1 {
  font: 500 clamp(28px, 4vw, 40px) / 1.15 var(--display);
  margin: 0;
}
.display-2 {
  font: 500 clamp(19px, 3vw, 26px) / 1.28 var(--display);
  margin: 0;
}
.mono {
  font: 400 12.5px/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.body-text {
  color: var(--text);
}

/* —— Login / register (design .lgn) —— */
.lgn {
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 40px 72px;
  gap: 40px;
  background: var(--page);
  color: var(--ink);
}
.lgn .tx {
  width: 100%;
  max-width: 460px;
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}
.lgn .lg {
  display: grid;
  place-items: center;
  color: var(--ink);
}
.lgn form,
#register-view,
#done-view,
#bad-invite {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin: 0;
  min-width: 0;
}
.mark3d {
  --ms: 480px;
  width: min(var(--ms), 100%);
  aspect-ratio: 1;
  height: auto;
  display: block;
}
.mark3d-fallback {
  width: min(var(--ms, 480px), 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
}
.mark3d-fallback .mark3d-still {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}
/* Still is authored for light (dark mark). Invert on dark so rays match --ink. */
html:not([data-theme="light"]) .mark3d-fallback .mark3d-still {
  filter: invert(1);
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.fl {
  position: relative;
  display: block;
  padding-top: 18px;
}
.fl .flab {
  position: absolute;
  left: 0;
  top: 25px;
  /* Same family as the floated eyebrow (mono), only size/case change on float. */
  font: 400 22px / 1.3 var(--mono);
  color: var(--muted);
  pointer-events: none;
  transition: top 0.18s, font-size 0.18s, letter-spacing 0.18s;
}
.fl input {
  display: block;
  width: 100%;
  font: 400 22px / 1.3 var(--display);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--outline);
  border-radius: 0;
  padding: 6px 34px 8px 0;
  outline: none;
  min-height: 40px;
}
.fl.pw input {
  font: 500 16px / 1.3 var(--mono);
  letter-spacing: 0.02em;
}
.fl input:focus {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 7px;
}
.fl input:focus ~ .flab,
.fl input:not(:placeholder-shown) ~ .flab,
.fl.up .flab {
  top: 0;
  font: 400 10.5px / 1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.fl .eye {
  position: absolute;
  right: 0;
  bottom: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 4px;
}
.fl .eye:focus-visible,
.btn:focus-visible,
.cons .linkish:focus-visible,
.nav a:focus-visible,
.nav-about:focus-visible,
.row:focus-visible,
.note-back:focus-visible,
.res:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: 48px;
  padding: 0 30px;
  border: 0;
  border-radius: var(--rd);
  background: var(--ink);
  color: var(--page);
  font: 500 15px / 1 var(--body);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn:disabled,
.btn.off {
  background: var(--tint);
  color: var(--muted);
  cursor: default;
}
.btn:not(:disabled):not(.off):hover {
  background: color-mix(in srgb, var(--ink) 84%, var(--page));
}

.cons {
  font: 400 15px / 1.45 var(--display);
  color: var(--muted);
  margin: -8px 0 0;
}
.cons .linkish {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--outline);
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.err {
  margin: 0;
  min-height: 1.2em;
  color: var(--alert);
  font: 400 16px / 1.4 var(--display);
}

.tgl {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 17px / 1.4 var(--display);
  color: var(--ink);
  cursor: pointer;
  margin: 0;
  position: relative;
}
.tgl input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tgl .sw {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  border: 1px solid var(--outline);
  border-radius: 99px;
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.tgl .sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--outline);
  transition: transform 0.15s, background 0.15s;
}
.tgl input:checked + .sw {
  background: var(--ink);
  border-color: var(--ink);
}
.tgl input:checked + .sw::after {
  transform: translateX(14px);
  background: var(--page);
}
.tgl .linkish {
  color: inherit;
  text-decoration: none;
  border: 0;
  border-bottom: 1px solid var(--outline);
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.rg-h {
  font: 500 clamp(28px, 4cqi, 40px) / 1.15 var(--display);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  padding: 0;
}
.rg-lead {
  font: 400 17px / 1.5 var(--body);
  color: var(--ink);
  margin: -12px 0 0;
}
.rg-tx {
  font: 400 15.5px / 1.6 var(--body);
  color: var(--text);
  margin: -6px 0 0;
  max-width: 44ch;
}
.rg-ul {
  list-style: none;
  margin: -6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 44ch;
  font: 400 15.5px / 1.6 var(--body);
  color: var(--text);
}
.rg-ul li {
  padding-left: 1.1em;
  position: relative;
}
.rg-ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.rg-copy {
  align-self: flex-start;
  margin-top: -14px;
  font: 400 12.5px var(--mono);
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-bottom: 1px solid var(--outline);
}

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

.loading-state {
  height: 100%;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-content: center;
  justify-items: center;
  background: var(--page);
  gap: 16px;
  text-align: center;
  padding: 40px 24px;
}
.loading-state .mark3d,
.loading-state .mark3d-fallback {
  --ms: 480px;
  width: min(var(--ms), 100%);
  aspect-ratio: 1;
  height: auto;
  color: var(--ink);
}
.loading-state.fail {
  gap: 18px;
  max-width: 36rem;
  margin: 0 auto;
}

/* —— Modal —— */
.veil {
  position: fixed;
  inset: 0;
  background: var(--veil);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  width: min(560px, 100%);
  max-height: 86vh;
  background: var(--page);
  border-radius: var(--rd);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--outline-w);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
}
.modal-head h2 {
  font: 500 clamp(19px, 3vw, 26px) / 1.28 var(--display);
  margin: 0;
}
.modal-x {
  background: none;
  border: 0;
  font: 500 18px var(--body);
  color: var(--muted);
  cursor: pointer;
}
.modal-body {
  padding: 20px;
  overflow: auto;
  color: var(--text);
  font: 400 15px/1.62 var(--body);
}

/* —— App shell —— */
.shell {
  container-type: inline-size;
  container-name: shell;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--window);
}
.shell-layout {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
}
.side {
  --logo: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 12px;
  height: 100%;
  min-height: 0;
  max-width: var(--side);
  min-width: 0;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 4px 8px 8px;
  color: var(--ink);
  white-space: nowrap;
}
.brand-name {
  font: 500 18px / 1 var(--display);
  color: var(--ink);
}

/* Same CSS mark as https://inner.foundation */
.logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--logo);
  height: var(--logo);
  overflow: hidden;
  flex: none;
}
.rays-container {
  position: absolute;
  width: calc(var(--logo) * 1.5);
  height: calc(var(--logo) * 1.5);
}
.logo .line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--logo) * 0.75);
  height: calc(var(--logo) * 0.03);
  background: var(--ink);
  transform-origin: 0 50%;
}
.ring {
  position: absolute;
  z-index: 1;
  width: calc(var(--logo) * 0.85);
  height: calc(var(--logo) * 0.85);
  border: calc(var(--logo) * 0.1) solid var(--window);
  border-radius: 50%;
}
.center-circle {
  position: absolute;
  z-index: 1;
  width: calc(var(--logo) * 0.32);
  height: calc(var(--logo) * 0.32);
  background: var(--window);
  border-radius: 50%;
}
.black-circle {
  position: absolute;
  z-index: 2;
  width: calc(var(--logo) * 0.17);
  height: calc(var(--logo) * 0.17);
  background: var(--ink);
  border-radius: 50%;
}

/* —— Motion layer —— */
.m-page-veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--page);
  pointer-events: none;
  /* No radius/border — must not reinforce the panel chrome during fades. */
  border: 0;
  border-radius: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--outline-w);
  border-radius: var(--rd);
  background: transparent;
  color: var(--muted);
  font: 400 13.5px var(--body);
  margin-bottom: 2px;
  cursor: text;
  box-sizing: border-box;
}
.search .ni {
  flex: none;
  color: var(--muted);
}
.search:focus-within,
.search.focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  color: var(--ink);
}
.search.val {
  color: var(--ink);
}
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::-webkit-search-cancel-button {
  display: none;
}
.search-input::placeholder {
  color: var(--muted);
}
.search-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 16px / 1 var(--body);
  cursor: pointer;
  border-radius: 4px;
}
.search-clear:hover {
  color: var(--ink);
}
.search-kbd {
  flex: none;
  font: 400 11px / 1 var(--mono);
  color: var(--muted);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 2px 5px;
}
.search.val .search-kbd,
.search:focus-within .search-kbd {
  display: none;
}
@media (pointer: coarse) {
  .search-kbd {
    display: none;
  }
}
.search-results {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  gap: 2px;
  margin: 4px 0 0;
}
.side.searching .nav:not(.foot),
.drawer.searching .nav:not(.foot) {
  display: none;
}
.side.searching .search-results,
.drawer.searching .search-results {
  display: flex;
}
.lab.cnt {
  padding: 8px 8px 2px;
  font: 10.5px / 1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.res {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 8px;
  border-radius: var(--rd);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.res:hover,
.res.on {
  background: var(--active);
}
.res .t {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  font: 12.5px / 1.4 var(--mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.res .t .chip {
  font-size: 9.5px;
  padding: 3px 6px;
}
.res p {
  margin: 0;
  font: 400 13px / 1.45 var(--body);
  color: var(--text);
}
.res mark {
  background: var(--tint);
  color: var(--ink);
  border-radius: 2px;
  padding: 0 2px;
}
.nores {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 400 13px / 1.45 var(--body);
  color: var(--text);
}
.nores b {
  font-weight: 500;
  color: var(--ink);
}
.nores span {
  color: var(--muted);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
}
.nav.foot {
  flex: none;
  margin-top: auto;
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  font: 500 14px / 1.2 var(--body);
  border-radius: var(--rd);
  color: color-mix(in srgb, var(--ink) 78%, transparent);
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.theme-toggle:hover {
  background: var(--active);
  color: var(--ink);
}
.theme-toggle .ni {
  flex: none;
  color: inherit;
}
.nav a,
.nav-logout,
.nav-about,
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  font: 500 14px / 1.2 var(--body);
  border-radius: var(--rd);
  color: color-mix(in srgb, var(--ink) 78%, transparent);
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.nav a .ni,
.nav-logout .ni,
.nav-about .ni {
  flex: none;
  color: var(--muted);
}
.nav a:hover,
.nav-logout:hover,
.nav-about:hover {
  background: var(--active);
  color: var(--ink);
}
.nav a.on {
  background: var(--active);
  color: var(--ink);
}
.nav a.on .ni {
  color: var(--ink);
}

.panel {
  position: relative;
  background: var(--page);
  margin: 8px 8px 8px 0;
  border: 1px solid var(--outline-w);
  border-radius: var(--rd);
  display: grid;
  grid-template-rows: var(--title-h) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: calc(100% - 16px);
  overflow: hidden;
}
.nav a {
  position: relative;
  z-index: 1;
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  border-bottom: 1px solid var(--hair);
  font: 500 13.5px / 1 var(--body);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.titlebar h1 {
  font: 500 13.5px / 1 var(--body);
  margin: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
}
.titlebar h1 a {
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}
.titlebar h1 a:hover {
  color: var(--ink);
}
.titlebar h1 i {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}
.titlebar h1 span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-icon {
  display: inline-flex;
  flex: none;
  color: var(--muted);
  line-height: 0;
}
.title-icon:empty {
  display: none;
}
.title-icon .ni {
  color: var(--muted);
}
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.burger i {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--ink);
}

.page {
  position: relative;
  padding: 34px 48px 56px;
  overflow: auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.page:has(.home) {
  padding: 0;
  display: block;
}

/* —— Home (D5 / M2) —— */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  align-items: start;
  min-height: 100%;
}
.home-main {
  padding: 34px 48px 56px;
  min-width: 0;
}
.home-main > h1 {
  font: 500 clamp(28px, 3.4cqi, 40px) / 1.15 var(--display);
  margin: 0 0 30px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.home-main > .lab.sec {
  margin-top: 0;
}
.rail {
  padding: 26px 22px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  align-self: stretch;
  box-sizing: border-box;
}
.lnk {
  font: 12.5px / 1 var(--mono);
  color: var(--ink);
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.lnk span {
  display: inline-block;
}
.lnk:hover {
  color: var(--text);
}
.fr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 32px;
  padding: 20px 0 30px;
}
.fr-t {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.fr h2 {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0;
  font: 500 clamp(19px, 2.2cqi, 26px) / 1.28 var(--display);
  margin: 0;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.fdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, var(--muted));
  margin-top: 0.52em;
}
.fr p {
  margin: 0 0 0 20px;
  color: var(--text);
  font: 400 15.5px / 1.62 var(--body);
  max-width: 62ch;
}
.fr .lnk {
  margin-left: 20px;
}
.fr-r {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 10px;
}
.tv {
  font: 500 12.5px / 1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.spark {
  display: block;
  margin: 2px 0;
  overflow: visible;
  max-width: 100%;
}
.spark .zero {
  stroke: var(--outline);
  stroke-dasharray: 2 4;
  opacity: 0.6;
}
.spark .ln {
  fill: none;
  stroke: var(--c, var(--ink));
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.t-pro {
  --c: var(--pro);
}
.t-ong {
  --c: var(--ong);
}
.t-reg {
  --c: var(--reg);
}
.t-new {
  --c: var(--muted);
}
.fh {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 40px;
  align-items: start;
  margin-bottom: 34px;
}
.fh h1 {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0;
  font: 500 clamp(28px, 4cqi, 40px) / 1.15 var(--display);
  color: var(--ink);
}
.fh .fdot {
  width: 11px;
  height: 11px;
  margin-top: 0.5em;
}
.fh > .fr-t > p {
  margin: 0 0 0 20px;
  color: var(--text);
  font: 400 15.5px / 1.62 var(--body);
  max-width: 62ch;
}
.fh .fr-r {
  padding-top: 14px;
}
.th {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.th li {
  display: grid;
  grid-template-columns: 18px 104px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  align-items: baseline;
  border-top: 1px solid var(--hairline);
}
.th .mk {
  font-size: 11px;
  line-height: 1;
  text-align: center;
}
.th .mk.eq {
  font-size: 17px;
  line-height: 0.6;
  color: var(--ong);
}
.th .mk.up {
  color: var(--pro);
}
.th .mk.dn {
  color: var(--reg);
}
.th .date {
  border-bottom: 1px solid var(--outline);
  justify-self: start;
  font: 400 13px / 1.2 var(--mono);
  color: var(--ink);
  text-decoration: none;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  padding: 0;
  cursor: pointer;
}
.th .date:hover {
  color: var(--text);
}
.th .x {
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
}
.frontier-back {
  display: inline-block;
  margin-bottom: 18px;
  font: 400 14px / 1.4 var(--body);
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.frontier-back:hover {
  color: var(--text);
}
@container shell (max-width: 720px) {
  .fh {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.card {
  border: 1px solid var(--outline);
  border-radius: var(--rd);
  padding: 16px 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--page);
}
.card .lab {
  margin: 0;
}
.card .date {
  font: 12.5px / 1.4 var(--mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.card p {
  margin: 0;
  font: 400 14px / 1.5 var(--body);
  color: var(--text);
}
.card .cm {
  font-size: 14px;
  gap: 16px;
}
.card.cmc .cm {
  max-width: none;
}
.page-heading {
  font: 500 clamp(28px, 4vw, 40px) / 1.15 var(--display);
  margin: 0 0 22px;
  color: var(--ink);
}

/* —— Inner Circle member rail —— */
.notes-layout {
  display: block;
  min-width: 0;
}
.notes-layout.has-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 8px 28px;
}
.notes-main {
  min-width: 0;
}
.notes-rail {
  padding: 0 0 40px;
  position: sticky;
  top: 8px;
}
.ic-card {
  border: 1px solid var(--outline);
  border-radius: var(--rd);
  padding: 16px 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--page);
}
.ic-card .lab {
  margin: 0;
  letter-spacing: 0.04em;
}
.ic-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ic-member {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ic-name {
  font: 500 15px / 1.3 var(--body);
  color: var(--ink);
}
a.ic-name {
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.ic-name:hover {
  color: var(--ink);
}
.ic-desc {
  margin: 0;
  font: 400 13px / 1.4 var(--body);
  color: var(--text);
}
.ic-desc a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ic-desc a:hover {
  color: var(--ink);
}
.circ {
  font: 500 clamp(19px, 2.5vw, 26px) / 1.28 var(--display);
  margin: 34px 0 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink);
  letter-spacing: -0.005em;
}
.page-heading + .circ {
  margin-top: 0;
}
.chip {
  display: inline-block;
  font: 10.5px / 1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 4px 8px;
  vertical-align: middle;
}

.cm {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font: 400 15px / 1.5 var(--body);
  color: var(--text);
  max-width: none;
}
.cm li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 9px;
  align-items: start;
  border-radius: var(--rd);
  transition: background 0.4s ease;
}
.cm li.hit {
  background: var(--tint);
}
.cm li.done > span:last-child {
  color: var(--muted);
}
.cm .when {
  display: block;
  font: 11.5px / 1.4 var(--mono);
  color: var(--muted);
  margin-top: 4px;
}
.sd {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  border: 1.5px solid var(--ink);
  box-sizing: border-box;
  flex: none;
}
.sd-open {
  background: transparent;
}
.sd-prog {
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
}
.sd-done {
  background: var(--ink);
}
.undated {
  margin-bottom: 34px;
}
.undated .cm {
  margin: 0;
}
.cm-rail {
  font-size: 14px;
  gap: 14px;
  max-width: none;
}
.home-commitments {
  margin-top: 8px;
}
.empty {
  color: var(--text);
  max-width: none;
}
.empty p {
  margin: 0 0 0.75rem;
}
.empty-block {
  margin-top: 1.5rem;
}
.empty-block .display-2 {
  margin-bottom: 0.35rem;
}
.sec-label {
  margin: 0 0 0.35rem;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lab {
  font: 10.5px / 1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.lab.sec {
  display: block;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 12px;
  margin: 0 0 10px;
}
.lab.sec:not(:first-of-type) {
  margin-top: 30px;
}
.info-btn {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: -4px 0 -4px 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  vertical-align: middle;
  cursor: pointer;
  transition: color 0.15s;
}
.info-btn:hover {
  color: var(--ink);
}
.info-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.rows {
  display: flex;
  flex-direction: column;
}
.row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  align-items: baseline;
  width: 100%;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.rows.with-tags .row {
  grid-template-columns: 104px 72px minmax(0, 1fr);
}
.row:hover {
  background: var(--active);
  box-shadow: -12px 0 0 var(--active), 12px 0 0 var(--active);
}
.row .date {
  font: 12.5px / 1.4 var(--mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row .x {
  font: 400 14.5px / 1.45 var(--body);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.row .tag {
  font: 10.5px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.note-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font: 500 13.5px / 1 var(--body);
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.note-back:hover {
  color: var(--text);
}
.note-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.note-head .note-date {
  font: 500 clamp(28px, 4vw, 40px) / 1.15 var(--display);
  color: var(--ink);
  margin: 0;
}
.note-head .note-id {
  font: 10.5px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.note-copy {
  margin-left: auto;
  align-self: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--outline-w);
  border-radius: var(--rd);
  background: transparent;
  color: var(--muted);
  font: 500 12.5px / 1 var(--body);
  cursor: pointer;
}
.note-copy:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.note-copy:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.note-body {
  margin: 0;
}
.nb {
  margin: 0;
  font: 400 15.5px / 1.62 var(--body);
  color: var(--text);
}
.nb > ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.nb ul ul {
  margin: 10px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nb li {
  overflow-wrap: anywhere;
}
.nb li::marker {
  color: var(--muted);
}
.nb li.hl,
.nb-prose.hl {
  background: var(--active);
  box-shadow: -26px 0 0 var(--active), 10px 0 0 var(--active);
  border-radius: 2px;
  color: var(--ink);
}
.nb-prose {
  margin: 0 0 14px;
}
.nb-fallback {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  color: inherit;
}
.nb-h {
  font: 500 17px / 1.35 var(--display);
  color: var(--ink);
  margin: 22px 0 10px;
}
.nb-h:first-child {
  margin-top: 0;
}
.nb strong {
  font-weight: 600;
  color: var(--ink);
}
.nb em {
  font-style: italic;
}
.nb code {
  font: 0.92em / 1.4 var(--mono);
  background: var(--tint);
  border-radius: 4px;
  padding: 1px 5px;
}
.nb a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--outline);
  overflow-wrap: anywhere;
}
.nb a:hover {
  text-decoration-color: var(--ink);
}
.status-line {
  font: 400 14px / 1.45 var(--body);
  color: var(--muted);
  margin: 0 0 16px;
}

.drawer-veil {
  position: fixed;
  inset: 0;
  background: var(--veil);
  z-index: 20;
}
.drawer {
  position: fixed;
  inset: 0 20% 0 0;
  max-width: 320px;
  background: var(--window);
  z-index: 21;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@container shell (max-width: 980px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 48px 48px;
  }
  .rail .card {
    flex: 1 1 260px;
  }
  .notes-layout.has-rail {
    grid-template-columns: minmax(0, 1fr);
  }
  .notes-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 0 32px;
  }
  .notes-rail .ic-card {
    flex: 1 1 240px;
  }
}

@container shell (max-width: 720px) {
  .page:has(.home) {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 26px 16px 36px;
  }
  .home,
  .home-main,
  .rail {
    display: contents;
  }
  .home-main > h1 {
    order: 1;
    margin: 0;
  }
  .rail .card.ls {
    order: 2;
    flex: none;
  }
  .home-main > .lab.sec,
  .home-main > .fr {
    order: 3;
  }
  .home-main > .lab.sec {
    margin-bottom: 0;
  }
  .home-main > .lab.sec:not(:first-of-type) {
    margin-top: 8px;
  }
  .rail .card.cmc {
    order: 5;
    flex: none;
  }
  .fr {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 0 14px;
  }
  .fr-r {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
    padding-top: 0;
  }
  .fr .spark {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
  }
  .shell-layout {
    grid-template-columns: 1fr;
  }
  .side.desktop {
    display: none;
  }
  .panel {
    margin: 0;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }
  .burger {
    display: flex;
  }
  .page {
    padding: 24px 16px 40px;
  }
  .row {
    grid-template-columns: 96px 1fr;
    gap: 3px 10px;
    padding: 9px 0;
  }
  .rows.with-tags .row {
    grid-template-columns: 96px 64px 1fr;
  }
  .row .x {
    white-space: normal;
  }
}

/* Login / loading stay viewport-based (outside .shell). */
@media (max-width: 720px) {
  .lgn {
    grid-template-columns: 1fr;
    padding: 28px 20px 34px;
    gap: 26px;
    align-content: start;
  }
  .lgn .lg {
    order: -1;
  }
  .lgn .tx {
    justify-self: stretch;
    max-width: none;
  }
  .lgn .mark3d,
  .lgn .mark3d-fallback {
    --ms: 210px;
  }
  .loading-state .mark3d,
  .loading-state .mark3d-fallback {
    --ms: 220px;
  }
  .row2 {
    grid-template-columns: 1fr;
  }
}
