/* RheumX Organization Portal.
   Accessibility is treated as a requirement, not a polish pass: visible focus, a skip link, a real
   contrast ratio, and status regions that are announced. */

:root {
  color-scheme: light dark;
  --bg: #ffffff; --fg: #16191d; --muted: #55606d;
  --line: #d5dae1; --accent: #0b5cab; --error: #a1231c; --ok: #1c6b3a;
  --surface: #f6f8fa;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171a; --fg: #eef1f4; --muted: #a8b3c0; --line: #333c46;
          --accent: #7fb2ee; --error: #ff9b93; --ok: #79d3a1; --surface: #1c2126; }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: .5rem; top: .5rem; }

.bar { border-bottom: 1px solid var(--line); padding: 1.25rem; background: var(--surface); }
.bar h1 { margin: 0; font-size: 1.3rem; }
.bar .sub { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }

section { margin-top: 2rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; }

label { display: block; margin: .75rem 0 .25rem; font-weight: 600; font-size: .9rem; }
input, select {
  width: 100%; max-width: 26rem; padding: .55rem .65rem;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--fg); font: inherit;
}
button {
  margin-top: 1rem; padding: .6rem 1.1rem; border: 1px solid transparent; border-radius: 6px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
button[disabled] { opacity: .5; cursor: not-allowed; }
/* Focus must be visible for keyboard users; never remove the outline. */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.help { color: var(--muted); font-size: .875rem; margin: .4rem 0 0; max-width: 46rem; }
.status { margin: .6rem 0 0; font-size: .9rem; color: var(--muted); }
.status.error { color: var(--error); font-weight: 600; }
.status.ok { color: var(--ok); font-weight: 600; }

table { border-collapse: collapse; width: 100%; max-width: 40rem; margin-top: .5rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; color: var(--muted); }

ul { padding-left: 0; list-style: none; }
ul li {
  border: 1px solid var(--line); border-radius: 8px;
  padding: .8rem .9rem; margin-top: .6rem; background: var(--surface);
}
ul li p { margin: 0 0 .3rem; }

dl { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .35rem .9rem; margin: .5rem 0 0; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 0; }

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

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

/* ---- public landing (events.rheumx.org) ---------------------------------------------------- */

.lede { font-size: 1.05rem; max-width: 46rem; color: var(--fg); }

/* The independence disclosure. Given a border and a surface so it reads as a statement rather than
   as body copy a visitor can skim past; placed above the form in the markup for the same reason. */
.disclosure {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 8px; background: var(--surface);
  padding: .9rem 1.1rem; margin: 1.5rem 0 2rem; max-width: 46rem;
}
.disclosure h3 { margin-top: 0; }
ul.plain { padding-left: 1.1rem; list-style: disc; }
ul.plain li {
  border: 0; background: none; padding: 0; margin: .35rem 0; border-radius: 0;
}

textarea {
  width: 100%; max-width: 40rem; padding: .55rem .65rem;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--fg); font: inherit; resize: vertical;
}

.req { color: var(--error); }
.opt { font-weight: 400; color: var(--muted); }

.consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.5rem; max-width: 40rem; }
.consent input { width: auto; margin-top: .3rem; flex: 0 0 auto; }
.consent label { margin: 0; font-weight: 400; font-size: .95rem; }

/* The honeypot. Off-screen rather than display:none, because some bots skip hidden inputs; paired
   with aria-hidden and tabindex="-1" in the markup so no keyboard or screen-reader user reaches it. */
.trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

ul.errors { margin-top: .75rem; padding-left: 1.1rem; list-style: disc; max-width: 40rem; }
ul.errors li {
  border: 0; background: none; padding: 0; margin: .3rem 0; border-radius: 0;
  color: var(--error); font-size: .9rem;
}

.contact { margin-top: 2.5rem; }

.signin-link { margin-top: 2rem; }
/* A real <button>, styled as a link: it changes what is on the page rather than navigating, so it
   must not claim to be a link to assistive technology. */
button.linkish {
  background: none; border: 0; color: var(--accent); padding: 0; margin: 0;
  font: inherit; text-decoration: underline; cursor: pointer;
}

.foot {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 1.25rem; margin-top: 2rem;
}
.foot p { margin: 0 auto; max-width: 60rem; color: var(--muted); font-size: .875rem; }
