/* Alumni Network MVP demo — original presentation. Tenant colours are applied via CSS variables. */
:root {
  --primary: #1b365d;
  --accent: #c4a35a;
  --surface: #f6f3ec;
  --ink: #17202a;
  --paper: #fffdf8;
  --muted: #5c6570;
  --line: rgba(23, 32, 42, 0.12);
  --danger: #8b2e2e;
  --ok: #1f6a4d;
  --pending: #8a5a12;
  --shadow: 0 10px 30px rgba(23, 32, 42, 0.08);
  --radius: 16px;
  --demo-bar-h: 52px;
  --header-h: 64px;
  --bottom-nav-h: 0px;
  --font-serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1120px;
}

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100%;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
a:hover { color: var(--accent); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}
.skip-link:focus { top: 8px; }

/* Demo control bar — always visible, not part of the product chrome */
.demo-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--demo-bar-h);
  background: #241c15;
  color: #f4ede2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
}
.demo-bar strong { font-weight: 650; letter-spacing: 0.02em; }
.demo-bar select {
  background: #3a2f26;
  border: 1px solid rgba(244, 237, 226, 0.25);
  color: #f4ede2;
  border-radius: 8px;
  padding: 6px 8px;
  max-width: min(100%, 420px);
  min-height: 36px;
}
.demo-bar .demo-note { color: #d9c9a8; flex: 1 1 200px; }
.demo-bar button.linkish {
  background: none;
  border: 0;
  color: #e8c98a;
  cursor: pointer;
  text-decoration: underline;
  min-height: 36px;
  padding: 0 4px;
}

.app-header {
  background: var(--primary);
  color: #f8f4ea;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}
.app-header .mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
}
.app-header .titles { flex: 1; min-width: 0; }
.app-header h1 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 650;
  margin: 0;
  line-height: 1.2;
}
.app-header .sub {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.86;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tenant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.role-pills { display: flex; flex-wrap: wrap; gap: 6px; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px calc(28px + var(--bottom-nav-h));
}

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: #fff6df;
  border: 1px solid #e4c98a;
  color: #3d2e10;
}
.notice.ok { background: #e8f6ef; border-color: #9dcfb6; color: #143d2c; }
.notice.danger { background: #fbeaea; border-color: #e2b3b3; color: #5a1f1f; }
.notice .placeholder-flag {
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  pointer-events: none;
}
.hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 650;
  line-height: 1.15;
  margin: 0 0 12px;
  max-width: 16ch;
}
.lede { font-size: 1.05rem; color: var(--muted); max-width: 44ch; }

.kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
button.btn:hover, a.btn:hover { filter: brightness(1.08); }
button.btn.secondary, a.btn.secondary {
  background: transparent;
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, white);
}
button.btn.ghost, a.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
button.btn.danger { background: var(--danger); }
button.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.card, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(23,32,42,0.04);
}
.card-list, .grid {
  display: grid;
  gap: 12px;
}
.grid.stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.stat .num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 650;
  line-height: 1.1;
}
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, white);
  white-space: nowrap;
}
.pill.student { background: #e6f3f1; color: #0f5c5c; border-color: #b7d9d4; }
.pill.alumni { background: #e9eef6; color: #1b365d; border-color: #c3d0e4; }
.pill.life { background: #f7efd8; color: #6a4f12; border-color: #e2d3a4; }
.pill.due { background: #fbeaea; color: var(--danger); border-color: #e2b3b3; }
.pill.ok { background: #e8f6ef; color: var(--ok); border-color: #9dcfb6; }
.pill.pending { background: #fff1d6; color: var(--pending); border-color: #e4c98a; }
.pill.deceased { background: #eee; color: #555; border-color: #ddd; }

.member-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.member-card h3, .card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.member-card .meta, .muted, .hint { color: var(--muted); font-size: 0.92rem; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 650;
  flex: 0 0 48px;
}
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.filters label, .form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.filters select, .filters input,
.form-grid input, .form-grid select, .form-grid textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}
.form-grid textarea { min-height: 88px; resize: vertical; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.find-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.find-chips button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  cursor: pointer;
}
.find-chips button[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nav-tabs, .admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.nav-tabs a, .admin-nav a, .page-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-tabs a[aria-current="page"],
.admin-nav a[aria-current="page"],
.page-nav a[aria-current="page"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-nav {
  display: none;
  gap: 8px;
  margin: 0 0 16px;
}

dl.fields {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 6px 16px;
  margin: 0;
}
dl.fields dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
dl.fields dd { margin: 0; }

.bar-row { display: grid; grid-template-columns: 140px 1fr 48px; gap: 8px; align-items: center; margin: 6px 0; font-size: 14px; }
.bar-track { background: color-mix(in srgb, var(--primary) 10%, white); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 999px; }

.receipt {
  background: #fff;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  font-family: var(--font-sans);
}
.receipt .stamp {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 2px solid var(--danger);
  color: var(--danger);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0.85;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.split div {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }

.bottom-nav { display: none; }

.denied {
  max-width: 36rem;
  margin: 24px auto;
  text-align: center;
}
.denied h2 { font-family: var(--font-serif); }

.landing-foot {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

.session-card {
  display: flex;
  gap: 12px;
  align-items: center;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.stack { display: flex; flex-direction: column; gap: 12px; }

@media (min-width: 800px) {
  .page-nav { display: flex; flex-wrap: wrap; }
  main { padding-top: 24px; }
}

@media (max-width: 799px) {
  :root { --bottom-nav-h: 64px; }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    z-index: 30;
    height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    gap: 2px;
    min-height: 44px;
  }
  .bottom-nav a[aria-current="page"] { color: var(--primary); }
  .bottom-nav .ico { font-size: 16px; line-height: 1; }
  dl.fields { grid-template-columns: 1fr; gap: 2px 0; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row span:first-child { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .member-card { grid-template-columns: 44px 1fr; }
  .member-card .end { grid-column: 2; }
}

/* Usable at ~375px */
@media (max-width: 400px) {
  html, body { font-size: 16px; }
  .hero { padding: 24px 16px; }
  .hero h2 { font-size: 1.7rem; }
  .demo-bar { font-size: 12px; padding: 8px 10px; }
  main { padding-left: 12px; padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
