@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/*
  Fountain-pen ink and a yellow highlighter. Blue ink is the working colour
  (buttons, links). The highlighter only marks what is selected or current,
  the way you would mark a page.
*/
:root {
  --page: #eef1f7;
  --surface: #ffffff;
  --ink: #18213a;
  --graphite: #5a6582;
  --rule: #dce1ec;
  --rule-strong: #c3cadb;
  --accent: #2d47b8;
  --accent-strong: #213792;
  --accent-wash: #e5e9fb;
  --marker: #ffd23f;
  --marker-ink: #3b3000;
  --marker-stroke: rgb(255 210 63 / 0.6);
  --danger: #b63b2a;
  --danger-wash: #fbeae6;
  --on-accent: #ffffff;

  --side: #172142;
  --side-ink: #e7ebf7;
  --side-muted: #95a0c2;
  --side-hover: rgb(255 255 255 / 0.07);
  --side-rule: rgb(255 255 255 / 0.1);

  --shadow: 0 1rem 2.5rem rgb(23 33 66 / 0.18);
  --backdrop: rgb(16 22 44 / 0.5);

  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --radius-sm: 0.375rem;
  --radius: 0.625rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
  font-family: var(--sans);
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] {
  --page: #0e1426;
  --surface: #161e36;
  --ink: #e6eaf5;
  --graphite: #9ea8c6;
  --rule: #253052;
  --rule-strong: #34416a;
  --accent: #98acff;
  --accent-strong: #bac8ff;
  --accent-wash: #1d2850;
  --marker: #ffd23f;
  --marker-ink: #2a2200;
  --marker-stroke: rgb(255 210 63 / 0.3);
  --danger: #ff8f7d;
  --danger-wash: #3a1d1d;
  --on-accent: #0e1426;
  --side: #0a0f1e;
  --side-ink: #e6eaf5;
  --side-muted: #8c97b8;
  --side-hover: rgb(255 255 255 / 0.06);
  --side-rule: rgb(255 255 255 / 0.08);
  --shadow: 0 1rem 2.5rem rgb(0 0 0 / 0.5);
  --backdrop: rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0e1426;
    --surface: #161e36;
    --ink: #e6eaf5;
    --graphite: #9ea8c6;
    --rule: #253052;
    --rule-strong: #34416a;
    --accent: #98acff;
    --accent-strong: #bac8ff;
    --accent-wash: #1d2850;
    --marker: #ffd23f;
    --marker-ink: #2a2200;
    --marker-stroke: rgb(255 210 63 / 0.3);
    --danger: #ff8f7d;
    --danger-wash: #3a1d1d;
    --on-accent: #0e1426;
    --side: #0a0f1e;
    --side-ink: #e6eaf5;
    --side-muted: #8c97b8;
    --side-hover: rgb(255 255 255 / 0.06);
    --side-rule: rgb(255 255 255 / 0.08);
    --shadow: 0 1rem 2.5rem rgb(0 0 0 / 0.5);
    --backdrop: rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

::selection {
  background: var(--marker);
  color: var(--marker-ink);
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.625rem;
}

h2 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

.muted {
  color: var(--graphite);
  font-size: 0.875rem;
}

.hint {
  color: var(--graphite);
  font-size: 0.8125rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

/* Buttons */

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  min-height: 2.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms,
    border-color 120ms,
    transform 120ms;
}

button:hover {
  border-color: var(--graphite);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

button.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--graphite);
}

button.quiet:hover {
  background: var(--accent-wash);
  color: var(--ink);
}

button.danger {
  color: var(--danger);
}

button.danger:hover {
  border-color: var(--danger);
}

button.primary.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-accent);
}

button.small {
  min-height: 2rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8125rem;
}

button.wide {
  width: 100%;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

button.link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

/* Form fields */

.stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label,
.label,
legend {
  font-size: 0.875rem;
  font-weight: 550;
}

input,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: var(--graphite);
  opacity: 0.8;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.static {
  padding: 0.55rem 0;
  color: var(--graphite);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 36rem;
}

.inline-form + .muted,
.filter-bar + .muted {
  margin-top: 1rem;
}

.grow {
  flex: 1 1 14rem;
}

.segmented {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.segmented legend {
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
}

.segmented label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.segmented input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

/* Interest chips */

.chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.chip-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.chip-input input {
  flex: 1 1 8rem;
  border: 0;
  padding: 0.3rem 0.35rem;
  box-shadow: none;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.3rem 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 0.8125rem;
  font-weight: 550;
}

.chip {
  animation: pop-in 180ms var(--ease);
}

.tag {
  padding-right: 0.6rem;
}

.chip button {
  min-height: 0;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  line-height: 1;
}

.chip button:hover {
  background: var(--surface);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* App shell: an ink-dark rail beside the paper */

.shell {
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem 0.5rem;
  background: var(--side);
  color: var(--side-ink);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

/* A page with its corner folded down in highlighter yellow. */
.brand-mark {
  position: relative;
  flex: none;
  width: 1.15rem;
  height: 1.45rem;
  border-radius: 2px;
  background: var(--side-ink);
  clip-path: polygon(0 0, 62% 0, 100% 30%, 100% 100%, 0 100%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 30%;
  background: var(--marker);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  transform-origin: 0 100%;
}

.nav {
  order: 3;
  width: 100%;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav a {
  position: relative;
  flex: none;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--side-muted);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
}

.nav a:hover {
  color: var(--side-ink);
  background: var(--side-hover);
}

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

/* The current page gets a highlighter stroke under its name. */
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.3rem;
  height: 0.35rem;
  border-radius: 2px;
  background: var(--marker);
  opacity: 0.85;
  z-index: -1;
  transform-origin: left;
  animation: swipe 260ms var(--ease);
}

.nav a[aria-current="page"] {
  isolation: isolate;
}

.nav-group {
  display: none;
}

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-text {
  display: none;
}

.account-actions {
  display: flex;
  gap: 0.25rem;
}

.sidebar button {
  background: transparent;
  border-color: transparent;
  color: var(--side-muted);
}

.sidebar button:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-size: 0.8125rem;
  font-weight: 700;
}

.sidebar .avatar {
  background: var(--marker);
  color: var(--marker-ink);
}

.theme-toggle .label {
  display: none;
}

main {
  padding: 1.5rem 1rem 4rem;
  outline: none;
}

.view {
  max-width: 72rem;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.column {
  max-width: 42rem;
  margin: 0 auto;
}

.column.narrow {
  max-width: 34rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}

@media (min-width: 60rem) {
  .shell {
    display: grid;
    grid-template-columns: 15.5rem 1fr;
  }

  .shell.signed-out {
    display: block;
  }

  .sidebar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.75rem;
    height: 100vh;
    padding: 1.5rem 1rem;
  }

  .brand {
    padding: 0 0.6rem;
  }

  .nav {
    order: 0;
    flex-direction: column;
    overflow: visible;
  }

  .nav a[aria-current="page"]::after {
    left: 0.7rem;
    right: auto;
    width: calc(100% - 1.4rem);
    max-width: 6.5rem;
  }

  .nav-group {
    display: block;
    margin: 1.25rem 0.7rem 0.25rem;
    color: var(--side-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.8;
  }

  .account {
    margin: auto 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--side-rule);
    flex-wrap: wrap;
  }

  .account-text {
    display: grid;
    min-width: 0;
    flex: 1;
  }

  .account-name {
    font-weight: 600;
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-role {
    color: var(--side-muted);
    font-size: 0.8125rem;
  }

  .account-actions {
    width: 100%;
    flex-direction: column;
  }

  .account-actions button {
    justify-content: flex-start;
  }

  .theme-toggle .label {
    display: inline;
  }

  main {
    padding: 2.25rem 2.5rem 4rem;
  }
}

/* Sign in */

.auth {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 6rem);
}

.auth-theme {
  position: absolute;
  top: 0;
  right: 0;
}

.auth-theme .label {
  display: inline;
}

.auth-panel {
  width: min(100%, 24rem);
}

.brand-large {
  font-size: 2.5rem;
  gap: 0.8rem;
  color: var(--ink);
}

.brand-large .brand-mark {
  width: 1.75rem;
  height: 2.2rem;
  background: var(--accent);
}

/* The one page-load moment: the corner folds down when you arrive. */
.brand-large .brand-mark::after {
  animation: fold 520ms 120ms var(--ease) both;
}

.auth-lede {
  margin: 0.6rem 0 2rem;
  font-family: var(--serif);
  font-size: 1.1875rem;
  color: var(--graphite);
  text-wrap: balance;
}

.tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

.tabs button {
  min-height: 0;
  padding: 0 0 0.6rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  background: none;
  color: var(--graphite);
}

.tabs button:active {
  transform: none;
}

.tabs button:hover {
  border-color: transparent;
  color: var(--ink);
}

.tabs button[aria-selected="true"],
.tabs button[aria-selected="true"]:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

[role="tabpanel"]:not([hidden]) {
  animation: settle 220ms var(--ease);
}

/* Notes: list on the left, writing surface on the right */

.notes-layout {
  display: grid;
  gap: 1.5rem;
}

.note-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.note-item {
  display: grid;
  justify-content: stretch;
  justify-items: start;
  gap: 0.2rem;
  width: 100%;
  min-height: 0;
  padding: 0.85rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  text-align: left;
  font-weight: 400;
  white-space: normal;
}

.note-item:hover {
  background: var(--surface);
  border-color: var(--rule);
}

.note-item:active:not(:disabled) {
  transform: none;
}

.note-item[aria-current="true"] {
  background: var(--surface);
}

.note-item-title {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Selecting a note runs a highlighter across its title. */
.note-item[aria-current="true"] .note-item-title {
  background: linear-gradient(var(--marker-stroke), var(--marker-stroke))
    no-repeat 0 88% / 100% 0.55em;
  animation: highlight 380ms var(--ease);
}

.note-item-excerpt {
  color: var(--graphite);
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-item-date {
  color: var(--graphite);
  font-size: 0.8125rem;
}

.editor {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  min-height: 70vh;
}

.notes-layout.is-editing .editor {
  display: flex;
}

.notes-layout.is-editing .note-index {
  display: none;
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.spacer {
  flex: 1;
}

.saved-state {
  display: none;
  align-items: center;
  gap: 0.35rem;
  color: var(--graphite);
  font-size: 0.875rem;
}

.saved-state .icon {
  color: var(--accent);
}

/* After a save the tick is drawn in, like a quick pen stroke. */
.saved-state.just-saved .icon path {
  stroke-dasharray: 24;
  animation: draw 420ms var(--ease) both;
}

@media (min-width: 30rem) {
  .saved-state {
    display: inline-flex;
  }
}

.editor-title,
.editor-body {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--serif);
  padding-inline: clamp(1rem, 4vw, 2.75rem);
}

.editor-title:focus,
.editor-body:focus {
  box-shadow: none;
}

.editor-title {
  padding-top: 1.75rem;
  font-size: clamp(1.5rem, 1rem + 2vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.editor-body {
  flex: 1;
  min-height: 20rem;
  padding-top: 0.75rem;
  padding-bottom: 2rem;
  resize: none;
  font-size: 1.1875rem;
  line-height: 1.65;
}

/* Opening a note lays a fresh sheet down. */
.editor.sheet-in .editor-title,
.editor.sheet-in .editor-body {
  animation: settle 260ms var(--ease) both;
}

.editor.sheet-in .editor-body {
  animation-delay: 40ms;
}

@media (min-width: 60rem) {
  .notes-layout {
    grid-template-columns: minmax(17rem, 22rem) 1fr;
    align-items: start;
  }

  .notes-layout.is-editing .note-index {
    display: block;
  }

  .editor {
    display: flex;
    position: sticky;
    top: 2.25rem;
    min-height: calc(100vh - 4.5rem);
  }

  .editor .back {
    display: none;
  }

  .editor-body {
    max-width: 44rem;
  }
}

/* Posts read like a column of writing, not a grid of cards */

.composer {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.composer-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.composer textarea {
  resize: vertical;
}

.composer-bar {
  display: flex;
  justify-content: flex-end;
}

.feed {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.feed > li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.feed > li.empty {
  border: 0;
}

.feed > li.is-new {
  animation: settle 320ms var(--ease);
}

.post-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.post-body {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lookup {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.lookup summary {
  cursor: pointer;
  color: var(--graphite);
  font-size: 0.9375rem;
  font-weight: 550;
}

.lookup form {
  margin-top: 0.75rem;
}

/* Profile */

.danger-zone {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-color: var(--danger-wash);
}

.danger-zone h2 {
  font-size: 1.0625rem;
}

/* Admin tables. On small screens each row becomes a block. */

.data-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table thead {
  display: none;
}

.data-table tr {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.data-table td {
  display: block;
  overflow-wrap: anywhere;
}

.data-table td[data-label]::before {
  content: attr(data-label);
  display: block;
  color: var(--graphite);
  font-size: 0.8125rem;
}

.person {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
}

.person-text {
  display: grid;
  min-width: 0;
}

.person-name {
  font-weight: 600;
}

.person-email {
  color: var(--graphite);
  font-size: 0.875rem;
}

.role {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--graphite);
}

.role.admin {
  border-color: transparent;
  background: var(--marker);
  color: var(--marker-ink);
}

.row-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.note-cell-title {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
}

.note-cell-text {
  color: var(--graphite);
  font-size: 0.875rem;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 48rem) {
  .data-table thead {
    display: table-header-group;
  }

  .data-table tr {
    display: table-row;
  }

  .data-table th,
  .data-table td {
    display: table-cell;
    padding: 0.85rem 0.75rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--rule);
  }

  .data-table th {
    padding-top: 0;
    color: var(--graphite);
    font-size: 0.8125rem;
    font-weight: 600;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    padding-left: 0;
  }

  .data-table td[data-label]::before {
    content: none;
  }

  .person {
    display: table-cell !important;
  }

  .person > * {
    vertical-align: middle;
  }

  .person-text {
    display: inline-grid;
    margin-left: 0.75rem;
  }

  .row-actions {
    display: table-cell !important;
    text-align: right !important;
    white-space: nowrap;
  }
}

/* Admin note filter */

.filter-bar {
  margin-top: 1rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.4rem 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-weight: 550;
}

/* Interests: a bar shows how many people share each one */

#interest-filter {
  margin-top: 1rem;
}

.interest-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.interest-list > li {
  display: grid;
  gap: 0.6rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.interest-head {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) 1fr auto;
  align-items: center;
  gap: 1rem;
}

.interest-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: capitalize;
}

.interest-bar {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent-wash);
  overflow: hidden;
}

.interest-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transform-origin: left;
  animation: grow 600ms var(--ease) both;
}

.interest-count {
  color: var(--graphite);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.tags a.tag {
  text-decoration: none;
}

.tags a.tag:hover {
  background: var(--accent);
  color: var(--on-accent);
}

@media (max-width: 36rem) {
  .interest-head {
    grid-template-columns: 1fr auto;
  }

  .interest-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Pagination and empty states */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.pager:empty {
  display: none;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--graphite);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Removed items are crumpled away before the list redraws. */
.is-leaving {
  animation: crumple 240ms ease-in forwards;
  pointer-events: none;
}

/* Dialogs */

dialog {
  width: min(100% - 2rem, 30rem);
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: var(--backdrop);
}

dialog.confirm {
  width: min(100% - 2rem, 24rem);
}

dialog[open] {
  animation: rise 200ms var(--ease);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Toasts */

.toast-region {
  position: fixed;
  inset: auto auto 1.25rem 50%;
  transform: translateX(-50%);
  width: min(100% - 2rem, 28rem);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  z-index: 20;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--side);
  color: var(--side-ink);
  border-left: 4px solid var(--marker);
  box-shadow: var(--shadow);
  animation: rise 200ms var(--ease);
}

.toast.error {
  background: var(--danger-wash);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-left-width: 4px;
}

.toast-body {
  flex: 1;
  font-size: 0.9375rem;
}

.toast ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.toast button {
  min-height: 0;
  padding: 0.1rem 0.4rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
}

/* Motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}

@keyframes swipe {
  from {
    transform: scaleX(0);
  }
}

@keyframes highlight {
  from {
    background-size: 0% 0.55em;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 24;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

@keyframes fold {
  from {
    transform: scaleY(0);
  }
}

@keyframes crumple {
  to {
    opacity: 0;
    transform: translateX(-0.75rem) rotate(-1.5deg) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition: none !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
