/* Sign in, /signin (src/signin.py). The family's colours and type (the page system in site.css, the dark palette of
   Get involved and the profile), the shared bar (top-bar.css) and the shared foot. */
:root { --ground: #fff; --ink: #000; --paper: #fff; --hand: #1D3C8F; --err: #B3261E; --ease: cubic-bezier(.2,.7,.2,1); }
:root[data-theme="dark"] { --blue: #B6C5F0; --line: #4D5B7E; --rule: #28324F; --quiet: #AAB4CD; --dome: #72B3A0; --tint: #1F2949; color-scheme: dark;
  --ground: #131B33; --ink: #ECEFF6; --paper: #1A2340; --hand: #DCE4FA; --err: #FFB4AB; }
body { background: var(--ground); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
:root[data-theme="dark"] .btn { background: #2D4FAE; color: #F6F7FA; }
:root[data-theme="dark"] .btn:hover { background: #3A5DBE; }
.ps .btn.line { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.ps .btn.line:hover { background: var(--tint); }
:root[data-theme="dark"] .ps .btn.line { background: transparent; color: var(--blue); }
:root[data-theme="dark"] .ps .btn.line:hover { background: var(--tint); }
.foot { background: #1D3C8F; } :root[data-theme="dark"] .foot { background: #0E1530; }
main a:focus-visible, main button:focus-visible, main input:focus-visible, main [tabindex]:focus-visible { outline: 3px solid var(--dome); outline-offset: 2px; }
.x-lab { display: block; font: 600 13px/16px "Libre Franklin", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); text-box: trim-both cap alphabetic; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.ps-head, .si-head, .sh-head, .pv-head { margin-top: var(--ps-logo-to-rule); border-top: 2px solid var(--blue); padding-top: var(--ps-hang); align-items: start; }
.ps-where + .ps-title { margin-top: 32px; }
main.wrap { margin-bottom: var(--ps-section-gap); }
@media (max-width: 760px) {
  .foot .fnav { display: flex !important; flex-wrap: wrap; gap: 0 22px !important; }
  .x-lab { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* SIGN IN, drawn as a mailing envelope is laid out: the sender in the upper left, the postage in the upper right, the
   address below, the Intelligent Mail barcode in the barcode clear zone along the foot. A member writes their email
   where the address goes; Email me a link sends it; the stamp is cancelled when it has gone. The two ways in are two
   equal cards, side by side, "or" between. */
.si { --field: #E8ECF5; --field-edge: #6E7FAE; --card-edge: #6E7FAE; }
:root[data-theme="dark"] .si { --field: #222C4D; --field-edge: #6E7FAE; --card-edge: #6E7FAE; }
.si-main { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; }
.si-line { margin-top: var(--ps-step); max-width: 30em; }
.si-me { margin-top: 40px; }

/* the choice: two equal cards */
.si-ways { grid-column: 1 / -1; margin-top: 40px; position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--ps-gap); }
.gcard { grid-column: 1 / 7; grid-row: 1; background: var(--paper); box-shadow: 0 0 0 1px var(--card-edge); display: grid; place-items: center; padding: 32px; }
.gc-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.gc-mark svg { display: block; }
.si-g { gap: 12px; }
.si-g svg { flex: none; }
@media (min-width: 1101px) { .gcard .si-g svg { display: none; } }
.gc-err { position: absolute; left: -40px; right: -40px; top: calc(100% + 14px); text-align: center; font-size: 15px; line-height: 20px; color: var(--err); }
.si-or { grid-column: 7; grid-row: 1; align-self: center; justify-self: start; z-index: 2; width: 48px; height: 48px; margin-left: calc(var(--ps-gap) / -2 - 24px);
  display: grid; place-items: center; border-radius: 50%; background: var(--ground); box-shadow: 0 0 0 1px var(--card-edge);
  font: 600 13px/1 "Libre Franklin", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
.si-or span { margin-right: -.14em; }

/* the envelope */
.env { grid-column: 7 / 13; grid-row: 1; position: relative; background: var(--paper); box-shadow: 0 0 0 1px var(--card-edge); padding: 28px 32px 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; }
.env-from { grid-column: 1; grid-row: 1; width: 170px; height: auto; margin-left: calc(170px * -0.03227); align-self: start; }
.env-dk { display: none; }
:root[data-theme="dark"] .env-lt { display: none; } :root[data-theme="dark"] .env-dk { display: block; }
.env-stamp { grid-column: 2; grid-row: 1; position: relative; width: 76px; height: 92px; color: var(--blue); }
.stamp { display: block; width: 100%; height: 100%; fill: currentColor; }
.stamp .bite, .stamp .tree { fill: var(--paper); }
.env-cancel { position: absolute; display: none; }
.env-to { grid-column: 1 / -1; grid-row: 2; margin-top: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.env-l { font: 600 14px/16px "Libre Franklin", sans-serif; color: var(--quiet); text-box: trim-both cap alphabetic; }
.env-line { position: relative; align-self: stretch; height: 56px; margin-top: 12px; display: flex; align-items: center; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-edge); }
.env-line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); }
.env-line:focus-within { outline: 3px solid var(--dome); outline-offset: 2px; }
.env-line:focus-within::after { height: 3px; }
.env-line.bad::after { height: 3px; background: var(--err); }
.env-line.bad { box-shadow: inset 0 0 0 1px var(--err); }
.env-line input { width: 100%; height: 100%; border: 0; border-radius: 0; background: transparent; color: var(--hand); padding: 2px 14px 0; outline: none;
  font: 700 italic 26px/1 "Fraunces", Georgia, serif; font-variation-settings: "SOFT" 50; text-overflow: ellipsis; }
.env-line input:focus-visible { outline: none; }
.env-err { min-height: 20px; margin-top: 10px; font-size: 15px; line-height: 20px; color: var(--err); max-width: 34em; }
.env-err.ok { color: var(--ink); }
.env-act { margin-top: 12px; }
.env-go[aria-disabled="true"] { opacity: .8; cursor: progress; }
.ps .env-act .btn { justify-content: center; }
.env-imb { grid-column: 1 / -1; grid-row: 3; justify-self: end; margin-top: 20px; width: 194px; height: 12px; fill: var(--ink); }

/* sent: the address stands as written, the line under it says what to do, Try again stands where the button was, the stamp is cancelled */
.env.is-sent .env-line { background: transparent; box-shadow: none; }
.env.is-sent .env-line input { padding-left: 0; }
.env.is-sent .env-cancel { display: block; left: -168px; top: 14px; width: 180px; height: 66px; fill: var(--ink); opacity: .78; animation: cancel .5s var(--ease) both .15s; }
@keyframes cancel { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.si.is-member .si-ways { display: none; }

@media (max-width: 1100px) {
  .si-ways { display: flex; flex-direction: column; align-items: stretch; }
  .gcard { box-shadow: none; background: none; padding: 0; display: block; place-items: normal; }
  .gc-in { align-items: stretch; }
  .gc-mark { display: none; }
  .si-g { justify-content: center; width: 100%; }
  .gc-err { left: 0; right: 0; top: calc(100% + 6px); }
  .si-or { align-self: stretch; justify-self: stretch; width: auto; height: auto; margin: 28px 0; background: none; box-shadow: none; border-radius: 0; display: flex; align-items: center; gap: 16px; }
  .si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: var(--card-edge); }
}
@media (max-width: 760px) {
  .si-ways { margin-top: 32px; }
  .env { padding: 20px 20px 16px; }
  .env-from { width: 140px; margin-left: calc(140px * -0.03227); }
  .env-stamp { width: 60px; height: 72px; }
  .env-to { margin-top: 24px; }
  .env-line input { font-size: 22px; }
  .env-act, .ps .env-act .btn { align-self: stretch; width: 100%; }
  .env-imb { width: 162px; height: 10px; margin-top: 16px; }
  .env.is-sent .env-cancel { left: -100px; top: 8px; width: 112px; height: 41px; }
}
@media (max-width: 359px) { .env.is-sent .env-cancel { left: -64px; top: 14px; width: 76px; height: 28px; } }
/* a phone held sideways: the page's head and the envelope's top made small, so the field is on the first screen */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1100px) {
  .si-head { margin-top: 12px; padding-top: 12px; }
  .si-head .ps-where + .ps-title { margin-top: 12px; }
  .si-ways { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
  .gcard { grid-column: 1; grid-row: 1; align-self: start; }
  .si-or { grid-column: 1; grid-row: 1; align-self: start; margin: 76px 0 0; }
  .env { grid-column: 2; grid-row: 1 / span 2; padding: 14px 18px 12px; }
  .env-from { width: 110px; }
  .env-stamp { width: 46px; height: 55px; }
  .env-to { margin-top: 8px; }
  .env-line { height: 48px; margin-top: 8px; }
  .env-line input { font-size: 20px; }
  .env-err { margin-top: 6px; }
  .env-act { margin-top: 6px; }
  .env-imb { display: none; }
  .env.is-sent .env-cancel { left: -90px; top: 4px; width: 100px; height: 37px; }
}

/* the bar for a member signed in: the site's own rule (site.css, beside top-bar-me.js) */
.tb .tb-signin.mine { gap: 10px; }
.tb .tb-signin.mine .face { width: 34px; height: 34px; font-size: 12px; outline: 3px solid var(--dome, #7FC0AC); outline-offset: -3px; }
