/* The pages of the own login (/login, /join, /invite, /members, /account, /privacy), made by worker/login-pages.js.
   Public without a login, so self-contained: the site's fonts and colours (as in style.css), and nothing that
   names a family. CSP: no inline styles; every style lives here. */

@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-Roman-latin.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/SourceSerif4-Roman-latin.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Proza Libre"; src: url("fonts/ProzaLibre-Regular-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Proza Libre"; src: url("fonts/ProzaLibre-SemiBold-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f5f0e6; --paper-2: #ece5d6; --paper-3: #e2d8c4;
  --ink: #1c1713; --ink-2: #554a40; --ink-3: #8a7d70; --rule: #d6cbb7;
  --night: #110d0a; --on-night-2: #b9ab98;
  --amber: #9b5a12; --accent: #b2451f; --ok: #3f6b3a;
  --err-bg: #f8e2d6; --err-ink: #8f3414; --ok-bg: #e3ecd8; --ok-ink: #2f5a2b;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Proza Libre", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(40, 28, 16, .06), 0 8px 30px -12px rgba(40, 28, 16, .25);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16120e; --paper-2: #1e1813; --paper-3: #2a221b;
    --ink: #ede4d4; --ink-2: #c0b3a1; --ink-3: #8e8273; --rule: #3a3028;
    --amber: #f0b860; --accent: #ef8a5d; --ok: #9cc792;
    --err-bg: #3a2017; --err-ink: #f6a47f; --ok-bg: #223020; --ok-ink: #a9d3a0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.auth { margin: 0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--serif); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }

.auth-card { width: 100%; max-width: 30rem; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); padding: 2rem 1.6rem 1.6rem; }
.auth-card.wide { max-width: 56rem; }
.auth-kicker { font: 600 .74rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .9rem; }
.auth h1 { font: 500 2rem/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 1rem; }
.auth h2 { font: 500 1.3rem/1.2 var(--display); margin: 2rem 0 .8rem; }

.auth-form { display: grid; gap: .45rem; margin: 1.2rem 0 1rem; }
.auth-form label { font: 600 .85rem/1.3 var(--sans); color: var(--ink-2); margin-top: .5rem; }
.auth-form input, .auth-form select { font: 400 1.05rem/1.3 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: .7em .8em; width: 100%; }
.auth-form input:focus, .auth-form select:focus { border-color: var(--accent); outline: none; }
.auth-form input.auth-code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

.auth-btn { display: inline-flex; justify-content: center; align-items: center; gap: .45em; margin-top: .9rem; padding: .75em 1.2em; border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: var(--paper); font: 600 .95rem/1 var(--sans); cursor: pointer; }
.auth-btn:hover { background: var(--accent); }
.auth-btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.auth-btn.ghost:hover { color: var(--accent); }
.auth-btn.small { margin: 0; padding: .6em 1em; font-size: .85rem; }
a.auth-btn { text-decoration: none; margin-top: 0; }
.auth-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.3rem 0 .4rem; }
.auth-inline { display: inline; margin: 0; }

/* What happened after a form was sent: straight under the heading, never to be missed. A filled block in its own
   colour with a round mark (an exclamation mark: not done; a tick: done), a first line in the heading's letter that
   says which, and under it what to do. The mark's shape and the words say it, not the colour alone. */
.auth-note { position: relative; overflow-wrap: anywhere; margin: 0 0 1.3rem; padding: .95rem 1rem 1rem 3.5rem; border: 2px solid; border-radius: 12px; font: 400 1rem/1.5 var(--sans); color: var(--ink); }
.auth-note p { margin: 0; }
.auth-note p + p { margin-top: .3rem; }
.auth-note .auth-note-h { font: 600 1.25rem/1.25 var(--display); }
.auth-note::before { position: absolute; left: .95rem; top: .9rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 1.2rem/1 var(--sans); color: var(--paper); }
.auth-note.err { border-color: var(--accent); background: var(--err-bg); }
.auth-note.err::before { content: "!"; background: var(--accent); }
.auth-note.ok { border-color: var(--ok); background: var(--ok-bg); }
.auth-note.ok::before { content: ""; background: var(--ok); }
.auth-note.ok::after { content: ""; position: absolute; left: 1.62rem; top: 1.28rem; width: .46rem; height: .86rem; border: solid var(--paper); border-width: 0 .18rem .18rem 0; transform: rotate(45deg); }
/* the same refusal at the field it is about */
.auth-form .auth-field-err { margin: .1rem 0 0; font: 600 .92rem/1.4 var(--sans); color: var(--err-ink); }
.auth-form input[aria-invalid="true"] { border: 2px solid var(--accent); }
.auth-form .auth-bad { border-left: 3px solid var(--accent); padding-left: .8rem; }
.auth-small { font: 400 .88rem/1.5 var(--sans); color: var(--ink-2); }
.auth-links { font: 400 .9rem/1.6 var(--sans); }

.auth-list { list-style: none; margin: 0; padding: 0; }
.auth-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .6rem 0; border-top: 1px solid var(--rule); font: 400 .92rem/1.4 var(--sans); }
/* the open invitations: the name first, the address under it; the one just sent is marked */
.auth-invs li { font-size: 1rem; padding: .7rem 0; }
.auth-invs li > div { min-width: 0; overflow-wrap: anywhere; }
.auth-invs li.fresh { background: var(--ok-bg); margin: 0 -.7rem; padding-left: .7rem; padding-right: .7rem; border-radius: 10px; border-top-color: transparent; }
.auth-invs li.fresh + li { border-top-color: transparent; }
.auth-tag { display: inline-block; margin-left: .35em; padding: .1em .65em; border: 1px solid; border-radius: 999px; font: 600 .74rem/1.5 var(--sans); color: var(--ok-ink); white-space: nowrap; }
.auth-table { overflow-x: auto; }
.auth-table table { width: 100%; border-collapse: collapse; font: 400 .9rem/1.4 var(--sans); }
.auth-table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: .5rem .6rem .5rem 0; border-bottom: 1px solid var(--rule); }
.auth-table td { padding: .55rem .6rem .55rem 0; border-bottom: 1px solid var(--rule); vertical-align: middle; overflow-wrap: break-word; }
/* the owners' page: a wider card; the e-mail address may break anywhere, words (a role, a date) never in the middle */
.auth-card.widest { max-width: 78rem; }
.auth-table.members td { white-space: nowrap; }
.auth-table.members td:first-child, .auth-table.members td.c-email { white-space: normal; }
.auth-table.members td.c-email { overflow-wrap: anywhere; min-width: 12rem; }
/* a phone: each member a small block, each value with its label (data-l) */
@media (max-width: 44rem) {
  .auth-table.members thead { display: none; }
  .auth-table.members tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
  .auth-table.members td { display: block; border: 0; padding: .12rem 0; white-space: normal; }
  .auth-table.members td[data-l]:not(:empty)::before { content: attr(data-l) ": "; color: var(--ink-3); font-size: .78rem; }
  .auth-table.members td[data-l]:not(:empty):lang(fr)::before { content: attr(data-l) "\a0: "; }
  .auth-table.members td.c-email { min-width: 0; }
}
.auth-table tr.revoked td { color: var(--ink-3); }
.auth-foot { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

.auth-langs { font: 400 .9rem/1.6 var(--sans); color: var(--ink-3); }
.auth-langs strong { color: var(--ink); font-weight: 600; }

/* removing one's access (/account) and the privacy request (/privacy) */
.auth-form textarea { font: 400 1rem/1.45 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: .7em .8em; width: 100%; resize: vertical; }
.auth-form textarea:focus { border-color: var(--accent); outline: none; }
/* a choice: the box or dot at the left, its words beside it (the rule for text fields above must not reach these) */
.auth-form .auth-check { display: flex; gap: .6em; align-items: center; font: 400 1rem/1.4 var(--sans); color: var(--ink); margin: 0; padding: .45rem .1rem; cursor: pointer; }
.auth-form .auth-check input { width: 1.15em; height: 1.15em; flex: none; margin: 0; padding: 0; border-radius: 50%; accent-color: var(--accent); }
.auth-form .auth-check input[type="checkbox"] { border-radius: 4px; }
.auth-radios { border: 0; padding: 0; margin: .9rem 0 .2rem; display: grid; gap: 0; }
/* the relation on the invitation form: one list, every answer in sight, each row large enough for a finger. Nothing
   in it shows or hides by what is chosen (no script on these pages, and an older tablet knows no :has()); the row
   that is chosen is only drawn heavier where the browser can */
.auth-choice .auth-options { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.auth-form .auth-choice .auth-check { padding: .68rem .85rem; border-top: 1px solid var(--rule); }
.auth-form .auth-choice .auth-check:first-child { border-top: 0; }
.auth-form .auth-choice .auth-check:hover { background: var(--paper-2); }
.auth-form .auth-choice .auth-check:has(input:checked) { background: var(--paper-3); font-weight: 600; }
.auth-choice.auth-bad .auth-options { border: 2px solid var(--accent); }
.auth-form .auth-choice.auth-bad { border-left: 0; padding-left: 0; }
.auth-choice > .auth-small { margin: .5rem 0 0; }
.auth-form .auth-branch { align-items: flex-start; margin-top: .6rem; }
.auth-form .auth-branch input { margin-top: .15em; }
.auth-radios legend { font: 600 .85rem/1.3 var(--sans); color: var(--ink-2); padding: 0; margin-bottom: .25rem; }
.auth-leave { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.auth-privacy { margin-top: 1.2rem; }
.auth-requests li { align-items: flex-start; }
.auth-msg { white-space: pre-wrap; color: var(--ink-2); }
