/* Plain CSS: no framework, and no inline styles, which the page's content security policy
   would refuse. Manrope is self-hosted from /fonts/ for the same reason. The "A · Meet" brand
   values are tokens, so dark mode is one block. Brand colour is kept for the mark, the current
   nav item, primary buttons and focus rings; data, tables and forms stay neutral. */
@font-face {
  font-family: "Manrope";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/manrope-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/manrope-latin-800-normal.woff2") format("woff2");
}

:root {
  --navy: #1e1c5b;
  --wordmark: #213b81;
  --indigo: #302e96;
  --pink: #e75ab0;
  --violet: #7f62e8;
  --teal: #4aa2a3;
  --blue: #408ede;

  --bg: #ffffff;
  --surface: #f7f6fc;
  --text: var(--navy);
  --muted: #55537f;
  --line: #dcdbe8;
  --accent: var(--indigo);
  --accent-hover: #24227a;
  --accent-text: #ffffff;
  --hover: #f1f0fa;
  --ok: #176b3a;
  --warn: #7a4e00;
  --error: #a3262a;
  --warn-bg: #fff3d1;
  --error-bg: #fdeaea;
  --info-bg: #ebeaf8;
  --wordmark-text: var(--wordmark);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--navy);
    --surface: #27257a;
    --text: #f7f6fc;
    --muted: #c9c7e6;
    --line: #3f3d92;
    --accent: #cfcdfb;
    --accent-hover: #ffffff;
    --accent-text: #1e1c5b;
    --hover: #2c2a82;
    --ok: #7ee0a8;
    --warn: #f5c76b;
    --error: #ff9da0;
    --warn-bg: #4a3a14;
    --error-bg: #4d1f3a;
    --info-bg: #34328f;
    --wordmark-text: #f7f6fc;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    500 1rem/1.5 "Manrope",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
h2 {
  font-size: 1.125rem;
  margin: 1.75rem 0 0.5rem;
}
h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem;
}

a {
  color: var(--accent);
}
code {
  font:
    0.85em ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}
.pad,
.landing,
.narrow {
  padding: 2rem 16px;
}
.landing,
.narrow {
  max-width: 40rem;
  margin: 0 auto;
}
.lead {
  font-size: 1.125rem;
}
.points {
  padding-left: 1.2rem;
}
/* The store links wrap rather than shrink, because a phone is the narrowest viewer. */
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* The lockup: the mark, then "RSVP" (800), a gradient dot, "work" (500). */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand picture,
.brand img {
  display: block;
}
.wordmark {
  color: var(--wordmark-text);
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.035em;
}
.rsvp {
  font-weight: 800;
}
.work {
  font-weight: 500;
}
.dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-inline: 0.05em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}
.landing h1 {
  margin-bottom: 1.25rem;
}
.landing h1 img {
  width: 44px;
  height: 44px;
}
.landing h1 .wordmark {
  font-size: 2rem;
}

.shell {
  display: grid;
  grid-template-columns: 14rem 1fr;
  min-height: 100vh;
}
.shell nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.shell nav a {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9375rem;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.shell nav a:hover {
  background: var(--hover);
}
.shell nav a[aria-current="page"] {
  background: var(--info-bg);
  color: var(--accent);
  font-weight: 800;
}
.shell nav .brand {
  padding: 0.4rem 0.6rem 1rem;
}
.shell main {
  padding: 1.5rem 16px 3rem;
  min-width: 0;
}

@media (max-width: 720px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .shell nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .shell nav .brand {
    padding-bottom: 0.4rem;
  }
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.tile-label {
  color: var(--muted);
  font-size: 0.8125rem;
}
.tile-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.tile-hint {
  color: var(--muted);
  font-size: 0.8125rem;
}
.spark {
  width: 100%;
  height: 3rem;
  margin-top: 0.4rem;
}
.spark-axis {
  stroke: var(--line);
}
.spark-line {
  stroke: var(--accent);
  stroke-width: 1.5;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
th,
td {
  text-align: left;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--surface);
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 800;
}
tbody tr {
  transition: background-color 0.15s;
}
tbody tr:hover {
  background: var(--hover);
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 0.5rem 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--info-bg);
}
.notice-warn {
  background: var(--warn-bg);
  border-color: var(--warn);
  color: var(--warn);
}
.notice-error {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}
.attention {
  list-style: none;
  margin: 0;
  padding: 0;
}

.badge {
  display: inline-block;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8125rem;
}
.badge-success,
.badge-sent,
.badge-resolved {
  color: var(--ok);
}
.badge-failed,
.badge-denied {
  color: var(--error);
}
.badge-claimed,
.badge-attempted,
.badge-sending {
  color: var(--warn);
}

.level-hypothesis {
  border-style: dashed;
  color: var(--muted, inherit);
}
.level-observed {
  color: var(--warn);
}
.level-validated {
  color: var(--ok);
  font-weight: 800;
}
.weights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}
.matrix-scroll {
  overflow-x: auto;
}
.matrix {
  table-layout: fixed;
  min-width: max-content;
}
.matrix th[scope="col"],
.matrix td {
  min-width: 11rem;
}
.matrix td {
  vertical-align: top;
}
.matrix ul {
  margin: 0 0 0.25rem;
  padding-left: 1rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 36rem;
}
.form label,
label.inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 800;
}
label.inline {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
input,
select,
textarea {
  font: inherit;
  font-weight: 500;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  transition: border-color 0.15s;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent);
}
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.button:active {
  transform: translateY(1px);
}
.button.secondary {
  background: transparent;
  color: var(--accent);
}
.button.secondary:hover {
  background: var(--info-bg);
  border-color: var(--accent);
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.link {
  font: inherit;
  background: none;
  border: 0;
  color: var(--accent);
  text-align: left;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  text-decoration: underline;
}
.link:hover {
  color: var(--accent-hover);
}

.filters,
.actions,
.inline-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.secret {
  display: block;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  letter-spacing: 0.08em;
}
.history {
  padding-left: 1.2rem;
}
blockquote {
  margin: 0.2rem 0 0.6rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--line);
  white-space: pre-wrap;
}
.detail {
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  .button:active {
    transform: none;
  }
}
