:root {
  --paper: #fbfaf6;
  --ink: #17231b;
  --muted: #697168;
  --line: #dfe2da;
  --green: #174d32;
  --soft: #f0f2eb;
  --error: #713a26;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
[hidden] { display: none !important; }

.site-header {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(22px, 4vw, 58px);
}
.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.7px;
}
.brand:hover { text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: white;
  text-decoration: none;
}
.primary:hover { background: #103923; text-decoration: none; }
.primary.compact { padding: 9px 16px; }
.primary.large { gap: 24px; padding: 14px 20px; font-weight: 700; }

main { width: 100%; flex: 1; }
.landing {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  padding: clamp(60px, 10vh, 120px) clamp(22px, 7vw, 110px);
}
.hero-copy { max-width: 760px; margin-bottom: 7vh; font-size: 24px; }
h1 {
  max-width: 720px;
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.055em;
}
h1 span {
  color: var(--green);
  font: inherit;
}
.hero-lede {
  max-width: 680px;
  margin: 40px 0 0;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.examples {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 38px; }
.hero-actions > a:not(.primary) { font-weight: 600; }

.workspace {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 70px 0 80px;
}
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 42px;
}
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 11px; letter-spacing: .14em; }
.workspace-heading h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); font-weight: 500; letter-spacing: -.045em; }
.live { display: flex; align-items: center; color: var(--muted); font-size: 12px; }
.live b { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #5e913f; }
.tabs { display: flex; gap: 30px; border-bottom: 1px solid var(--line); }
.tabs button {
  padding: 15px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
}
.tabs button[aria-selected=true] { border-color: var(--green); color: var(--ink); }
.tabs span { margin-left: 5px; color: var(--muted); font-size: 11px; }
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px 0 28px;
}
.section-top h3 { margin: 0 0 7px; font-size: 25px; font-weight: 500; letter-spacing: -.03em; }
.section-top p { margin: 0; color: var(--muted); font-size: 14px; }
input, textarea {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; min-height: 180px; }
.card { padding: 27px 0; border-top: 1px solid var(--line); }
.card .avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--green);
  font-size: 16px;
  font-weight: 700;
}
.card h3 { margin: 18px 0 7px; font-size: 18px; }
.card p { min-height: 48px; margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.card small { display: block; margin-top: 20px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.empty { grid-column: 1/-1; padding: 60px 0; border-top: 1px solid var(--line); color: var(--muted); }
.empty button { margin-top: 10px; }

.panel, .access {
  max-width: 560px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.panel label, .access label { display: block; margin-bottom: 8px; font-size: 13px; }
.panel label span { margin-left: 8px; color: var(--green); font-size: 9px; letter-spacing: .1em; }
.panel input, .panel textarea { width: 100%; margin-bottom: 21px; }
.panel textarea { resize: vertical; min-height: 82px; }
.panel .primary { width: 100%; padding: 13px; }
.panel h3 { margin-top: 0; font-size: 24px; font-weight: 500; }
.note, .access p { color: var(--muted); font-size: 12px; line-height: 1.6; }
#registration-result { margin-top: 20px; }
#copy-token, .observer-actions button, .empty button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  color: var(--ink);
}
pre { padding: 15px; overflow-wrap: anywhere; background: var(--soft); font-size: 12px; white-space: pre-wrap; }
#error { padding: 13px 15px; border-radius: 7px; background: #f7e4da; color: var(--error); }

.observer-actions { display: flex; gap: 8px; }
.access > div { display: flex; gap: 10px; margin-top: 10px; }
.access input { flex: 1; }
.access .primary { padding: 10px 18px; }
.stats { display: flex; gap: 34px; padding: 0 0 24px; }
.stats strong { font-size: 25px; font-weight: 500; }
.stats span { margin-left: 7px; color: var(--muted); font-size: 10px; }
.admin-notice { margin: 0 0 24px; padding: 13px 15px; border-radius: 7px; background: #e2ecda; color: var(--green); }
.admin-section { margin-top: 42px; }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 18px; }
.admin-section-heading h3 { margin: 0 0 5px; font-size: 23px; font-weight: 500; }
.admin-section-heading p, .admin-section-heading > span { margin: 0; color: var(--muted); font-size: 12px; }
.waitlist-list { border-top: 1px solid var(--line); }
.waitlist-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.waitlist-name { display: flex; align-items: center; gap: 9px; }
.waitlist-name span { color: var(--muted); font-size: 11px; }
.waitlist-row p { margin: 7px 0; color: var(--muted); font-size: 14px; }
.waitlist-row small { color: var(--muted); font-size: 11px; }
.waitlist-actions { display: flex; align-items: center; gap: 8px; }
.request-info-button { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); }
.request-info-button:hover:not(:disabled) { background: var(--soft); }
.request-info-button:disabled { cursor: default; color: var(--muted); }
.approve-button { padding: 9px 15px; border: 1px solid var(--green); border-radius: 999px; background: var(--green); color: white; }
.approve-button:hover { background: #103923; }
.inbox-layout { display: grid; grid-template-columns: 280px 1fr; min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
aside { max-height: 650px; overflow: auto; border-right: 1px solid var(--line); background: var(--soft); }
aside button { width: 100%; padding: 20px 17px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
aside button.selected { background: #e1e8da; }
aside button strong { display: block; }
aside button p { margin: 8px 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
aside button small { color: var(--muted); font-size: 10px; }
#thread { max-height: 650px; overflow: auto; padding: 26px; background: white; }
#thread h3 { margin-top: 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-weight: 500; }
.message { margin-bottom: 20px; }
.message div { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.message time { color: var(--muted); font-size: 10px; }
.message p { margin: 8px 0 0; padding: 14px; border-radius: 0 8px 8px; background: var(--soft); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(22px, 4vw, 58px) 30px;
  color: var(--muted);
  font-size: 12px;
}
footer nav { display: flex; gap: 24px; }

@media (max-width: 760px) {
  .site-header { min-height: 66px; }
  .top-nav { gap: 16px; }
  .top-nav .primary { display: none; }
  .landing { min-height: calc(100vh - 135px); padding-top: 50px; align-items: flex-start; }
  .hero-copy { margin: 8vh 0 0; }
  .hero-lede { margin-top: 30px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .workspace { width: min(100% - 36px, 1120px); padding-top: 45px; }
  .workspace-heading, .section-top { align-items: flex-start; flex-direction: column; }
  .section-top input { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .tabs { gap: 22px; }
  .panel, .access { padding: 22px; }
  .access > div { flex-direction: column; }
  .inbox-layout { grid-template-columns: 1fr; }
  .admin-section-heading { align-items: flex-start; flex-direction: column; }
  .waitlist-row { grid-template-columns: 1fr; }
  .waitlist-actions { justify-self: start; flex-wrap: wrap; }
  aside { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  #thread { padding: 18px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
