/* Shared styles for every page: the join page and Find help.
   Colors follow the viewer's light or dark setting. */

  :root {
    color-scheme: light;
    --paper:   #EFF1EC;
    --card:    #FBFCFA;
    --ink:     #16201C;
    --muted:   #5F6E68;
    --line:    #D5DBD4;
    --line-2:  #E4E8E2;
    --accent:  #2E6B5E;
    --accent-ink: #FBFCFA;
    --accent-soft:#DDE8E3;
    --brass:   #96690F;
    --brass-soft:#F1E6C9;
    --shadow:  0 1px 2px rgba(22,32,28,.06), 0 8px 24px -14px rgba(22,32,28,.22);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      color-scheme: dark;
      --paper:   #111614;
      --card:    #181F1C;
      --ink:     #E4EAE5;
      --muted:   #93A29B;
      --line:    #2C3733;
      --line-2:  #232C29;
      --accent:  #61AB96;
      --accent-ink: #0E1614;
      --accent-soft:#1F322C;
      --brass:   #D8A741;
      --brass-soft:#2C2517;
      --shadow:  0 1px 2px rgba(0,0,0,.4), 0 8px 24px -14px rgba(0,0,0,.7);
    }
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  [hidden] { display: none !important; }

  .wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 18px 56px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  /* ---------- masthead ---------- */
  .mast { display: flex; flex-direction: column; gap: 6px; }
  .eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .mast h1 {
    font-family: Archivo, system-ui, sans-serif;
    font-stretch: 112%;
    font-weight: 800;
    font-size: 30px;
    line-height: 1.04;
    letter-spacing: -.015em;
    margin: 0;
    text-wrap: balance;
  }
  .mast p { margin: 2px 0 0; color: var(--muted); font-size: 14px; max-width: 42ch; }
  .mast .motto { font-style: italic; font-size: 13px; }

  /* ---------- card ---------- */
  .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: var(--shadow);
    padding: 20px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .card.recognise { border-top: 3px solid var(--brass); }
  .card.event { border-top: 3px solid var(--accent); gap: 12px; }

  .card-head { display: flex; flex-direction: column; gap: 5px; }
  .card-head h2 {
    font-family: Archivo, system-ui, sans-serif;
    font-stretch: 112%;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.15;
    margin: 0;
    text-wrap: balance;
  }
  .card-head .sub { color: var(--muted); font-size: 14px; margin: 0; }

  /* ---------- event ---------- */
  .event-meta { display: flex; flex-direction: column; gap: 3px; }
  .event-meta .when { font-weight: 600; font-size: 15px; }
  .event-meta .where, .event-meta .host { color: var(--muted); font-size: 14px; }
  .event-details { margin: 0; font-size: 14px; }

  .upcoming { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .upcoming li { border-top: 1px solid var(--line-2); }
  .upcoming li:first-child { border-top: 0; }
  .upcoming a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 0;
    color: var(--ink);
    text-decoration: none;
  }
  .upcoming li:first-child a { padding-top: 0; }
  .upcoming a:hover .up-name { text-decoration: underline; text-underline-offset: 3px; }
  .up-name { font-weight: 600; }
  .up-when { font-size: 14px; color: var(--muted); }

  /* ---------- role picker ---------- */
  .roles { display: flex; flex-direction: column; gap: 10px; }
  .role-card {
    font: inherit;
    text-align: left;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 14px 15px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    width: 100%;
  }
  .role-card:hover { border-color: var(--accent); }
  .role-card[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .role-name {
    font-family: Archivo, system-ui, sans-serif;
    font-stretch: 112%;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.2;
  }
  .role-desc { font-size: 14px; color: var(--muted); }

  .form-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .role-tag {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .linkish {
    font: inherit;
    font-size: 14px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }

  /* ---------- fields ---------- */
  .fields { display: flex; flex-direction: column; gap: 0; }
  .field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px 0;
    border-top: 1px solid var(--line-2);
  }
  .field:first-child { border-top: 0; padding-top: 0; }
  .field > label, .field > .legend, .stack > label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .stack { display: flex; flex-direction: column; gap: 7px; }
  .hint { font-size: 13px; color: var(--muted); margin: -2px 0 0; }

  input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select {
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 11px;
    width: 100%;
    appearance: none;
  }
  select {
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
  }
  input::placeholder { color: var(--muted); opacity: .75; }
  input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 400px) { .row { grid-template-columns: 1fr; } }

  /* ---------- chips ---------- */
  .chips { display: flex; flex-wrap: wrap; gap: 7px; }
  .chip {
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 13px;
    cursor: pointer;
  }
  .chip[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
  }

  /* ---------- buttons ---------- */
  .actions { display: flex; flex-direction: column; gap: 9px; }
  button.primary, button.quiet {
    font: inherit;
    font-weight: 600;
    border-radius: 4px;
    padding: 13px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    width: 100%;
  }
  button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  button.quiet { background: transparent; color: var(--muted); border-color: var(--line); }
  button:disabled { opacity: .55; cursor: progress; }

  /* ---------- profile readout ---------- */
  .who { display: flex; flex-direction: column; gap: 2px; }
  .who .name {
    font-family: Archivo, system-ui, sans-serif;
    font-stretch: 112%;
    font-weight: 800;
    font-size: 26px;
    line-height: 1.08;
    letter-spacing: -.015em;
  }
  .who .biz { font-size: 16px; font-weight: 600; }
  .who .where { font-size: 14px; color: var(--muted); }

  dl.summary { margin: 0; display: flex; flex-direction: column; gap: 0; }
  dl.summary > div {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--line-2);
    font-size: 14px;
  }
  dl.summary dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 2px;
  }
  dl.summary dd { margin: 0; overflow-wrap: anywhere; }

  /* ---------- notices ---------- */
  .notice {
    font-size: 13px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 4px;
    background: var(--brass-soft);
    color: var(--ink);
  }

  .stamp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brass);
  }
  .stamp::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
  }
  .stamp.closed { color: var(--muted); }

  /* ---------- footer ---------- */
  footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }
  footer .roster {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  footer p { margin: 0; max-width: 46ch; }

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

  /* ---------- shared links and small helpers ---------- */
  .top-link {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  a.button-link {
    display: block;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    padding: 13px 16px;
    background: var(--accent-soft);
    color: var(--ink);
    text-decoration: none;
    border: 1px solid transparent;
  }
  a.button-link:hover { border-color: var(--accent); }
  footer a { color: var(--accent); text-underline-offset: 3px; }
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* ---------- find help ---------- */
  .wrap.wide { max-width: 640px; }
  .results-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }
  .results-count {
    font-family: Archivo, system-ui, sans-serif;
    font-stretch: 112%;
    font-weight: 700;
    font-size: 18px;
  }
  .results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .result {
    padding: 16px 0;
    border-top: 1px solid var(--line-2);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .result:first-child { border-top: 0; padding-top: 0; }
  .result h3 { margin: 0; font-size: 17px; line-height: 1.25; font-weight: 700; text-wrap: balance; }
  .result h3 a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
  .result h3 a:hover { text-decoration-color: var(--accent); }
  .result .meta { font-size: 13px; color: var(--muted); }
  .result p { margin: 0; font-size: 15px; max-width: 60ch; }
  .tags { display: flex; flex-wrap: wrap; gap: 5px; }
  .tag {
    font-size: 12px;
    line-height: 1.3;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--line-2);
    color: var(--ink);
  }
  .tag.match { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
  .contact { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .contact a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
  .checked {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: .03em;
    color: var(--muted);
  }
  .checked a { color: inherit; }
  .checked.stale { color: var(--brass); }
