@charset "UTF-8";
:root {
  --bg: #f9f9f9;
  --text: #111111;
  --muted: #8a8a8a;
  --line: #cfcfcf;
  --pill: #e8e8e8;
  --pill-hover: #dcdcdc;
  --photo: #e3eddd; /* Townsquare's $color-brand-pastel-green */
  --photo-line: #00a071; /* and $color-brand-green */
  --card: #fafafa;
  --tag: #f1f1f1;
  --tag-hover: #e7e7e7;
  --green: #0fa46b;
  --red: #c2362b;
  --accent: var(--green);
  --font: "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #111;
    --text: #f2f2f2;
    --muted: #8f8f8f;
    --line: #333;
    --pill: #242424;
    --pill-hover: #2e2e2e;
    --card: #1a1a1a;
    --tag: #1f1f1f;
    --tag-hover: #2a2a2a;
    --green: #3ccf93;
    --red: #ff7b6e;
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --bg: #111;
  --text: #f2f2f2;
  --muted: #8f8f8f;
  --line: #333;
  --pill: #242424;
  --pill-hover: #2e2e2e;
  --card: #1a1a1a;
  --tag: #1f1f1f;
  --tag-hover: #2a2a2a;
  --green: #3ccf93;
  --red: #ff7b6e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.57 var(--font);
  -webkit-font-smoothing: antialiased;
}

a, button {
  color: inherit;
  text-decoration: none;
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

/* Submit inputs are flat buttons too; browsers give them a bevelled border by default */
:where(input[type=submit], input[type=button]) {
  appearance: none;
  color: inherit;
  font: inherit;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, p, ul {
  margin: 0;
  font-weight: 400;
}

mark {
  background: none;
  color: var(--green);
}

.muted {
  color: var(--muted);
}

.alert {
  color: var(--green);
}

/* Sign-in pages (layouts/bare) */
.bare-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.signin-links {
  font-size: 13px;
}

.signin-links a:hover {
  color: var(--green);
}

.signin {
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.signin .logo {
  height: 19px;
  margin-bottom: 16px;
}

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

.signin .remembered {
  display: grid;
  gap: 10px;
  justify-items: center;
  width: 100%;
  padding-bottom: 8px;
}

.signin .remembered .eyebrow {
  font-size: 13px;
}

.signin .remembered .name {
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.signin .remembered .provider {
  font-size: 13px;
}

.signin .remembered .link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  transition: color 0.2s;
}

.signin .remembered .link:hover {
  color: var(--text);
}

.signin form {
  width: 100%;
}

.signin .btn.btn-wide, .btn.btn-wide {
  width: 100%;
  justify-content: center;
}

/* Header */
.header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 35px;
  margin: 16px 32px 0;
  gap: 1rem;
}

.wordmark {
  display: block;
  line-height: 0;
}

.logo {
  height: 19px;
  width: auto;
  display: block;
}

.actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.actions form, form.inline {
  margin: 0;
  display: inline;
}

/* Library / Network switch: segmented pill with a sliding highlight */
.switch {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--pill);
}

.switch a {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  line-height: 29px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.25s;
}

.switch a:hover, .switch a.active, .switch a[aria-current] {
  color: var(--text);
}

.switch .thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--w, 0);
  transform: translateX(var(--x, 0));
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}

/* Two-column layout */
.layout {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  padding: 170px 32px 120px;
}

.side-title {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.side .browse {
  display: none;
}

/* The title shares the content headline's top edge (and so its baseline); the tree sits 60px below */
.side-inner .accordion, .side-links {
  margin-top: 60px;
  width: 190px;
}

.side-inner .side-links ul {
  padding: 0;
}

/* Topic tree stays in view while the page scrolls (desktop only) */
.side-inner {
  padding-right: 24px;
  position: sticky;
  top: 40px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: none;
}

/* Footer: full-bleed rule, links on an even 88px rhythm, pinned to the bottom of short pages */
body:has(> .footer) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 32px;
}

.footer nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 88px;
}

.footer a {
  justify-self: start;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--green);
}

@media (max-width: 900px) {
  .header {
    margin: 20px 16px 0;
  }
  .footer {
    padding: 20px 16px;
  }
  .actions {
    gap: 8px;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 48px 16px 80px;
  }
  .side-title {
    font-size: 26px;
  }
  /* The title stays; "Browse … +" sits under it and opens the nav below */
  .side-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 0;
    position: static;
    max-height: none;
  }
  .side .browse {
    display: inline-block;
    order: 1;
    margin-top: 16px;
    color: var(--muted);
  }
  .side .side-inner > nav {
    order: 2;
    display: none;
    margin-top: 16px;
    width: 100%;
    max-width: 320px;
  }
  .side.open .side-inner > nav {
    display: block;
  }
  main {
    margin-top: 48px;
  }
}
@media (max-width: 720px) {
  .header {
    flex-wrap: wrap;
  }
  .switch {
    position: relative;
    left: auto;
    transform: none;
    order: 3;
    width: 100%;
  }
  .switch a {
    flex: 1;
    text-align: center;
  }
}
@media (max-width: 600px) {
  section.home {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
    gap: 20px;
  }
  .home .card {
    aspect-ratio: auto;
    min-height: 300px;
  }
  .home .illus.ladder {
    height: 120px;
  }
  .home .illus.people {
    width: 140px;
  }
}
/* Pills and buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 35px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--pill);
  transition: background 0.2s;
}

.pill:hover {
  background: var(--pill-hover);
}

.btn {
  height: 40px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  background: var(--text);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}

.btn:hover {
  opacity: 0.82;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  display: block;
}

.btn-pill {
  width: 112px;
}

.btn-round {
  width: 40px;
}

.btn-schedule {
  width: 148px;
}

/* Tags and chips */
.tag, .chip {
  font-size: 12px;
  line-height: 25px;
  padding: 0 18px;
  border-radius: 2px;
  background: var(--tag);
  transition: background 0.2s, color 0.2s;
}

.tag:hover, .chip:hover {
  background: var(--tag-hover);
}

.chip[aria-pressed=true], .tag[aria-pressed=true] {
  background: var(--text);
  color: var(--bg);
}

.badge {
  display: inline-block;
  font-size: 12px;
  line-height: 20px;
  padding: 0 8px;
  border-radius: 2px;
  background: var(--tag);
  color: var(--green);
}

/* Home cards */
section.home {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 352px));
  gap: 34px;
  justify-content: center;
  padding: 156px 32px 120px;
}

.home .card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 352/432;
  padding: 38px 24px 32px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 6px 22px rgba(0, 0, 0, 0.09);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  animation: rise 0.8s var(--ease) both;
}

.home .card + .card {
  animation-delay: 0.1s;
}

.home .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.12);
}

.home .card h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

.home .card .go {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pill);
  color: var(--muted);
  transition: background 0.3s, color 0.3s;
}

.home .card:hover .go {
  background: var(--text);
  color: var(--bg);
}

.home .card .illus {
  margin: auto 0;
}

.illus {
  display: block;
  transition: transform 0.9s var(--ease);
}

.illus.ladder {
  height: 152px;
  width: auto;
  transform-origin: 50% 100%;
}

.illus.people {
  width: 168px;
  height: auto;
  transform-origin: 50% 100%;
}

.card:hover .illus.ladder {
  transform: translateY(-6px) rotate(-3deg);
}

.card:hover .illus.people {
  transform: translateY(-5px) scale(1.03);
}

/* Illustrations are <img>, so they cannot inherit currentColor: invert in dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .illus {
    filter: invert(1);
  }
}
:root[data-theme=dark] .illus {
  filter: invert(1);
}

/* Topic accordion in the sidebar */
.acc.open > .acc-row:not(.current) {
  color: var(--text);
}

.acc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 29.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s;
}

.acc-row:hover {
  color: var(--text);
}

.acc-row.current, .acc-row[aria-current] {
  color: var(--green);
}

.acc-row .pm {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

/* +/– icon: two bars; the vertical one rotates flat when open */
.plus {
  position: relative;
  width: 8px;
  height: 8px;
  transition: width 0.35s var(--ease), transform 0.4s var(--ease);
}

.acc:not(.open) .acc-row:hover .plus {
  transform: rotate(90deg);
}

.plus::before, .plus::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}

.plus::after {
  transform: rotate(90deg);
}

.acc.open .plus {
  width: 12px;
}

.acc.open .plus::after {
  transform: rotate(0deg);
}

.side-inner ul {
  list-style: none;
  padding: 0 0 0 20px;
}

.acc-body > div {
  padding-left: 20px;
}

/* Accordion height animation via grid rows 0fr to 1fr */
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.acc.open > .acc-body {
  grid-template-rows: 1fr;
}

.acc-body > div, .acc-body ul {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s, transform 0.4s var(--ease);
}

.acc.open > .acc-body > div, .acc.open > .acc-body ul {
  opacity: 1;
  transform: none;
  transition-delay: 0.08s;
  padding-bottom: 4px;
}

.side-inner .acc-body a, .side-inner li a {
  display: block;
  line-height: 29.5px;
  transition: color 0.2s, transform 0.25s var(--ease);
}

.side-inner .acc-body a:hover, .side-inner li a:hover {
  transform: translateX(3px);
}

.side-inner .acc-body a:hover, .side-inner .acc-body a.current, .side-inner li a:hover, .side-inner li a.current, .side-inner li a[aria-current] {
  color: var(--green);
}

.current {
  color: var(--green);
}

.side-inner .count {
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

.page-title {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Filter + sort toolbar */
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: 600px;
  margin-top: 44px;
}

.toolbar.wide {
  max-width: 770px;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.toolbar.wide .filter {
  max-width: 480px;
}

.filter {
  flex: 1;
  max-width: 280px;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  outline: none;
  transition: border-color 0.2s;
}

.filter:focus {
  border-color: var(--text);
}

.sorts {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.sorts button, .sort {
  color: var(--muted);
  transition: color 0.2s;
}

.sorts button:hover, .sorts button[aria-pressed=true], .sort:hover, .sort[aria-pressed=true], .sort.current {
  color: var(--text);
}

.sorts button[aria-pressed=true], .sort[aria-pressed=true], .sort.current {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.result-count {
  margin-top: 12px;
  font-size: 13px;
}

/* Lists */
.list {
  max-width: 600px;
  margin-top: 52px;
}

.toolbar + .result-count + .list {
  margin-top: 12px;
}

.group + .group {
  margin-top: 64px;
}

.group-head, .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 20px;
}

.group-head a, .section-head a {
  transition: color 0.2s;
}

.group-head a:hover, .section-head a:hover {
  color: var(--green);
}

.group-head .muted, .section-head .muted {
  font-size: 14px;
}

.row {
  display: block;
  padding: 20px 0 46px;
  border-bottom: 1px solid var(--line);
}

.row + .row {
  padding-top: 54px;
}

.row h3 {
  font-size: 20px;
  line-height: 1.3;
  transition: color 0.2s;
}

.row p {
  margin-top: 8px;
  max-width: 485px;
}

.row .tag {
  margin-top: 10px;
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: 13px;
  line-height: inherit;
  color: var(--muted);
}

.row .tag .feat {
  color: var(--green);
}

.row:hover h3 {
  color: var(--green);
}

.next .arr, .row .arr {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.next:hover .arr, .row:hover .arr {
  transform: translateX(4px);
}

.empty {
  padding: 32px 0;
}

/* Article */
.doc-title {
  font-size: 32px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 440px;
}

.pub {
  margin-top: 30px;
  color: var(--muted);
}

.pub span {
  margin-left: 6px;
}

.body {
  margin-top: 40px;
}

.body p {
  margin-bottom: 22px;
}

.body h2 {
  font-size: 20px;
  margin: 50px 0 20px;
}

.body h3 {
  font-size: 17px;
  margin: 40px 0 16px;
}

.body h4 {
  font-size: 15px;
  margin: 32px 0 12px;
}

.body ul {
  margin: 0 0 22px;
  padding-left: 21px;
  list-style: none;
}

.body ol {
  margin: 0 0 22px;
  padding-left: 21px;
}

.body ul li {
  position: relative;
}

.body ul li::before {
  content: "•";
  position: absolute;
  left: -14px;
  font-size: 10px;
}

.body img {
  max-width: 100%;
  height: auto;
}

.body figure {
  margin: 24px 0;
}

.body figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.body blockquote {
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.body aside.callout {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--tag);
  border-radius: 8px;
}

.body pre {
  margin: 0 0 22px;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--tag);
  border-radius: 8px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.body a, .intro a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.note {
  border-left: 2px solid var(--green);
  padding-left: 14px;
  margin-bottom: 22px;
}

.doc-foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.doc-foot a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.next {
  display: block;
  font-size: 20px;
  transition: color 0.2s;
}

.next:hover {
  color: var(--green);
}

/* Network */
.intro {
  max-width: 480px;
  margin-top: 56px;
}

.intro p + p {
  margin-top: 22px;
}

/* .people:not(.illus) keeps the grid off the home-page <img class="illus people"> */
.people:not(.illus) {
  margin-top: 40px;
  display: grid;
  gap: 40px;
  max-width: 770px;
}

.sections {
  margin-top: 48px;
  max-width: 770px;
}

.team-sec + .team-sec {
  margin-top: 88px;
}

.team-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.team-head h3 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.team-head a {
  transition: color 0.2s;
}

.team-head a:hover {
  color: var(--green);
}

.team-intro {
  margin-top: 14px;
  max-width: 480px;
  color: var(--muted);
}

.team-sec .people:not(.illus) {
  margin-top: 32px;
}

.person {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px;
}

/* Off-screen cards skip layout and paint until they scroll near the viewport */
.people-page .person {
  content-visibility: auto;
  contain-intrinsic-size: auto 302px;
}

/* As in Townsquare, the missing-avatar drawing belongs to the container, not an img, and goes once the photo loads.
   It's a mask over a token colour, so the drawing and the background are both themable. */
.person .photo {
  position: relative;
  aspect-ratio: 292/302;
  border-radius: 8px;
  background: var(--photo);
  overflow: hidden;
}

.person .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-line);
  mask: url("/assets/missing-avatar-d39ca969.svg") center/45% no-repeat;
}

.person .photo.loaded::before {
  display: none;
}

.person .photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  display: block;
  transform: scale(var(--zoom, 1));
  opacity: 0;
  transition: transform 1s var(--ease), opacity 0.3s;
}

.person .photo.loaded img {
  opacity: 1;
}

.person:hover .photo img {
  transform: scale(calc(var(--zoom, 1) * 1.03));
}

.person .nm {
  font-size: 20px;
  line-height: 1.3;
  margin-top: 2px;
}

.person .role {
  margin-top: 2px;
  color: var(--muted);
}

.person .bio {
  margin-top: 14px;
  max-width: 420px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.person .btns {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

/* Network pages: markup from app/views/network */
.people-page {
  max-width: 770px;
}

.team-sec[hidden], .person[hidden], .empty[hidden] {
  display: none;
}

.person.match .nm {
  color: var(--green);
}

/* Founder directory: server-side search and sort, so sort options are radios styled like the sort buttons */
.directory .toolbar.wide {
  flex-flow: row wrap;
  align-items: flex-end;
  gap: 16px 24px;
}

.directory .toolbar.wide .filter {
  flex: 1 1 280px;
}

.directory-sector {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 18px 6px 0;
  appearance: none;
  cursor: pointer;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) no-repeat calc(100% - 7px) 55%/4px 4px, linear-gradient(135deg, var(--muted) 50%, transparent 50%) no-repeat calc(100% - 3px) 55%/4px 4px;
}

.sort-option {
  position: relative;
  cursor: pointer;
}

.sort-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sort-option span {
  color: var(--muted);
  transition: color 0.2s;
}

.sort-option:hover span, .sort-option input:checked + span {
  color: var(--text);
}

.sort-option input:checked + span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sort-option input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

#founder-results .chips a.chip {
  display: inline-block;
}

/* Search panel */
/* The drawer overlays the page from a zero-height anchor under the header, so opening it and typing
   don't reflow the content below. Slides down via grid rows 0fr to 1fr; search_controller toggles body.searching */
.search-panel {
  position: relative;
  z-index: 20;
  height: 0;
}

.search-drawer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 32px;
  background: var(--bg);
  visibility: hidden;
  opacity: 0;
  transition: grid-template-rows 0.45s var(--ease), padding 0.45s var(--ease), opacity 0.3s, visibility 0s 0.45s;
}

body.searching .search-drawer {
  grid-template-rows: 1fr;
  padding-top: 24px;
  padding-bottom: 24px;
  visibility: visible;
  opacity: 1;
  transition: grid-template-rows 0.45s var(--ease), padding 0.45s var(--ease), opacity 0.3s, visibility 0s;
}

.search-box {
  max-width: 908px;
  margin-left: auto;
  width: 100%;
  overflow: hidden;
  min-height: 0;
}

.search-box input {
  width: 100%;
  font: inherit;
  font-size: 20px;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--text);
  padding: 10px 0;
  outline: none;
}

.search-results {
  margin-top: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.search-results a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.search-results a:hover .title {
  color: var(--green);
}

.search-results a .where {
  flex: none;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.search-results > p {
  padding: 12px 0;
}

.search-results mark {
  background: none;
  color: var(--green);
}

/* Page enter, as in the design: the title rises in, then each content block follows with a short stagger.
   Turbo swaps in a fresh <main> on every visit, so the animations replay without JS. A block's step is its
   position among its siblings (--n) plus its list's position in the page (--base), capped at 12; blocks
   further down a long page share the last step. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
#app :nth-child(1) {
  --n: 0;
}

#app :nth-child(2) {
  --n: 1;
}

#app :nth-child(3) {
  --n: 2;
}

#app :nth-child(4) {
  --n: 3;
}

#app :nth-child(5) {
  --n: 4;
}

#app :nth-child(6) {
  --n: 5;
}

#app :nth-child(7) {
  --n: 6;
}

#app :nth-child(8) {
  --n: 7;
}

#app :nth-child(9) {
  --n: 8;
}

#app :nth-child(10) {
  --n: 9;
}

#app :nth-child(11) {
  --n: 10;
}

#app :nth-child(12) {
  --n: 11;
}

#app :nth-child(13) {
  --n: 12;
}

#app > .list, .people-page > .sections, .people-page > .people, .article > .body {
  --base: var(--n);
}

#app .article > .doc-foot {
  --n: 12;
}

#app :is(.page-title, .article > h1) {
  animation: rise 0.55s var(--ease) both;
}

#app > :not(.page-title, .list, .people-page, .article, .admin),
#app > .list > *,
.people-page > :not(.page-title, .sections, .people),
.people-page > :is(.sections, .people) > *,
.article > :not(h1, .body),
.article > .body > *,
.admin > :not(.page-title) {
  animation: rise 0.55s var(--ease) both;
  animation-delay: calc(80ms + min(var(--base, 0) + var(--n, 0), 12) * 45ms);
}

/* Turbo's cached preview shouldn't play it too; the real page does */
html[data-turbo-preview] #app * {
  animation: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast {
  z-index: 20;
  max-width: min(560px, 100vw - 32px);
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.toast.show {
  pointer-events: auto;
  cursor: pointer;
}

.toast-alert {
  background: var(--red);
  color: #fff;
}

@media (max-width: 900px) {
  .pill {
    padding: 0 16px;
  }
  .search-drawer {
    padding-left: 16px;
    padding-right: 16px;
  }
  section.home {
    padding: 64px 16px 80px;
  }
  .row {
    padding-bottom: 32px;
  }
  .row + .row {
    padding-top: 32px;
  }
  .list {
    margin-top: 32px;
  }
  .intro {
    margin-top: 32px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 32px;
  }
  .filter {
    max-width: none;
  }
  .person {
    grid-template-columns: 1fr;
  }
  .person .photo {
    max-width: 160px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
/* Library pages */
.eyebrow {
  font-size: 13px;
  color: var(--muted);
}

.eyebrow a:hover {
  color: var(--green);
}

.article {
  max-width: 500px;
}

.article h1 {
  font-size: 32px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 440px;
}

.article .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 30px;
  color: var(--muted);
}

.doc-foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.doc-foot p a, .doc-foot > a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.next {
  display: block;
  font-size: 20px;
  transition: color 0.2s;
}

.next:hover {
  color: var(--green);
}

.external {
  color: var(--muted);
}

/* Admin is for working through data, so it uses the full width (and no more) */
.admin {
  min-width: 0;
}

.admin .page-title {
  margin-bottom: 24px;
}

.admin .btn {
  height: 35px;
}

.admin .btn-pill {
  width: auto;
  padding: 0 24px;
  margin: 16px 0;
}

.admin .notice, .admin .alert {
  margin: 12px 0;
}

.admin .alert {
  color: var(--green);
}

.admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0 32px;
}

.admin-form input[type=email], .admin-form input[type=text] {
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  outline: none;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
}

.admin-table th, .admin-table td {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-weight: 400;
}

/* Log rows run long, so they read from the top */
.admin-log td {
  vertical-align: top;
}

.admin-table :is(th, td):is(.row-actions, .center) {
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

.admin-table td.row-actions form {
  display: inline-block;
}

/* Empty values ("never", "no name") recede */
.none {
  opacity: 0.5;
}

.flag {
  display: inline-block;
  font-size: 12px;
  line-height: 18px;
  padding: 1px 9px;
  border-radius: 999px;
}

.flag-no {
  opacity: 0.5;
}

.flag-yes {
  background: color-mix(in srgb, var(--green) 16%, transparent);
  color: color-mix(in srgb, var(--green) 65%, var(--text));
}

.admin-table tr.failed td {
  color: var(--green);
}

.admin-table tr.archived td {
  color: var(--muted);
}

.admin-table a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 24px;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}

.admin-filters input[type=search] {
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  width: min(100%, 400px);
  outline: none;
}

.admin-form input:is([type=email], [type=text]) {
  width: min(100%, 320px);
}

/* A drawn caret, so it sits clear of the rounded edge and follows the theme */
.admin-filters select, .admin-form select {
  max-width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 34px 5px 14px;
  appearance: none;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) no-repeat calc(100% - 19px) 55%/5px 5px, linear-gradient(135deg, var(--muted) 50%, transparent 50%) no-repeat calc(100% - 14px) 55%/5px 5px;
}

.admin-inline {
  margin: 8px 0 0;
}

.admin-pages {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.admin-heading {
  font-size: 18px;
  margin: 40px 0 12px;
}

.admin-details {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.admin-details dt {
  color: var(--muted);
}

.admin-details dd {
  margin: 0;
  min-height: 1em;
}

.admin-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
}

.admin-fields fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 44px;
  display: grid;
  gap: 14px;
}

.admin-fields legend {
  font-size: 18px;
  margin-bottom: 12px;
}

.admin-fields label {
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
}

.admin-fields .field {
  display: grid;
  gap: 6px;
}

.admin-fields .field-label {
  font-size: 14px;
  color: var(--muted);
}

.admin-fields label.check, .admin-fields .checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.admin-fields .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
}

.admin-fields .checks > span {
  width: 100%;
  color: var(--muted);
}

/* A labelled set of checkboxes inside a section */
.admin-fields fieldset.check-group {
  margin: 6px 0 0;
  gap: 8px;
}

.admin-fields .check-group legend {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0;
}

.admin-fields .hint {
  color: var(--muted);
  font-size: 13px;
  margin-left: 4px;
}

/* Sending is an action, not part of who the person is: set it apart */
.admin-fields .welcome {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-fields :is(input[type=email], input[type=text], input[type=url], input[type=tel], textarea) {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  outline: none;
}

.admin-fields textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.admin-stats {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 8px;
}

.admin-stats a {
  display: block;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
}

.admin-stats a:hover {
  border-color: var(--text);
}

.admin-stats strong {
  display: block;
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
}

.admin-attention {
  padding-left: 18px;
}

.admin-attention a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.icon-button:hover {
  color: var(--red);
}

.admin-chips form {
  display: flex;
}

.admin-chips .icon-button {
  width: 22px;
  height: 22px;
  margin-right: -6px;
}

.icon-trash {
  display: block;
}

.admin-chips .icon-trash {
  width: 14px;
  height: 14px;
}

/* Destructive actions: red, with the warning right above */
.danger-note {
  max-width: 62ch;
}

.danger-note strong {
  color: var(--red);
  font-weight: 500;
}

.admin form.danger-action {
  margin-top: 16px;
}

.admin form.after-table {
  margin-top: 16px;
}

.admin .admin-count {
  margin-top: 32px;
}

.admin .btn-danger {
  background: var(--red);
  color: #fff;
  margin: 0;
}

/* Numbered pages, after Townsquare's pagy nav */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
  font-size: 13px;
}

.pager ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pager :is(.pager-page, .pager-step) {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.pager a:hover {
  background: var(--pill);
}

.pager .pager-page[aria-current] {
  border-color: var(--line);
}

.pager .pager-step[aria-disabled] {
  opacity: 0.4;
}

.pager .pager-gap {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 32px;
  color: var(--muted);
}

/* Page head: the title with the page's one main action beside it */
.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.admin .admin-head .page-title {
  margin-bottom: 0;
}

.admin .admin-head .btn-pill {
  margin: 0;
}

/* What the filters found, and what you can do with it */
.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 8px;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Plain text with a caret: it orders the table, so it shouldn't look like a filter */
.sort select {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  border: 0;
  padding: 2px 18px 2px 0;
  appearance: none;
  cursor: pointer;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) no-repeat calc(100% - 7px) 55%/4px 4px, linear-gradient(135deg, var(--muted) 50%, transparent 50%) no-repeat calc(100% - 3px) 55%/4px 4px;
}

.results-bar + .admin-table {
  margin-top: 12px;
}

.admin-empty .pill {
  color: var(--text);
}

.admin-results[aria-busy] {
  opacity: 0.6;
  transition: opacity 0.2s 0.15s;
}

.admin-empty {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 12px;
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}

/* File drop target, after Townsquare's .file-drag-drop */
.dropzone {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 134px;
  padding: 16px;
  text-align: center;
  border: 1px dashed color-mix(in srgb, var(--text) 30%, transparent);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.dropzone strong {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.dropzone.over {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--card));
}

.dropzone-preview {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.dropzone-name {
  color: var(--green);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* A select and its button as one pill, like Bulma's addons */
.addon {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.addon select {
  min-width: 0;
  max-width: 360px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  border: 0;
  padding: 7px 34px 7px 16px;
  appearance: none;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) no-repeat calc(100% - 19px) 55%/5px 5px, linear-gradient(135deg, var(--muted) 50%, transparent 50%) no-repeat calc(100% - 14px) 55%/5px 5px;
}

.addon select:invalid {
  color: var(--muted);
}

.addon .addon-button {
  padding: 0 20px 0 16px;
  background: var(--pill);
  border-left: 1px solid var(--line);
  transition: background 0.2s;
}

.addon .addon-button:hover {
  background: var(--pill-hover);
}

.admin-details dd.with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.admin-details dd.with-action button.link {
  font-size: 13px;
}

/* Live status words, e.g. the welcome email while it sends */
.status {
  font-size: 13px;
  font-weight: 500;
}

.status-busy {
  color: var(--muted);
}

.status-busy::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.2s ease-in-out infinite;
  vertical-align: 1px;
}

.status-failed {
  color: var(--red);
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
/* Styled confirm for data-turbo-confirm (app/javascript/confirm.js), after Townsquare's delete dropdowns */
.confirm {
  position: fixed;
  z-index: 30;
  width: 300px;
  max-width: calc(100vw - 32px);
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.14);
  font-size: 14px;
  animation: confirm-in 0.15s var(--ease);
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.confirm .btn, .confirm .pill {
  height: 35px;
  padding: 0 18px;
  width: auto;
}

.confirm .btn-danger {
  background: var(--red);
  color: #fff;
}

@keyframes confirm-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
/* Popover form, anchored under the button that opens it */
.popover {
  width: 340px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.popover:popover-open {
  position: fixed;
  inset: auto;
  top: 120px;
  left: 16px;
}

@supports (position-area: block-end) {
  .popover:popover-open {
    top: auto;
    left: auto;
    position-area: block-end span-inline-end;
    margin-top: 6px;
    position-try-fallbacks: flip-inline;
  }
}
.popover .admin-fields fieldset, .popover .admin-fields {
  display: grid;
  gap: 14px;
}

.quick-add fieldset.checks {
  display: flex;
  margin: 0;
  gap: 8px 16px;
}

.quick-add .checks legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}

/* The welcome email is about sending, not who the person is: set it apart */
.quick-add-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.quick-add-actions .btn-pill {
  margin: 0;
}

.quick-add-actions button.link {
  font-size: 13px;
}

.popover .btn-pill {
  margin: 4px 0 0;
  justify-self: start;
}

.popover-title {
  font-size: 18px;
}

@media (max-width: 900px) {
  .admin-details {
    grid-template-columns: 1fr;
  }
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-table {
    display: block;
    overflow-x: auto;
  }
}
