/* The client portal's own sign-in page (Stage 3, 1 Oct 2026; new look
   16 Oct 2026). The portal's palette and type (portal/client/client-shell.css:
   oat ground, paper card, forest band, Cormorant and Source Sans), standalone
   because the shell's stylesheet is only served to someone already signed in.
   Nothing moves except a gentle focus ring; prefers-reduced-motion has
   nothing to switch off. */
@import url("/css/fonts.css?v=20261103");

:root {
  --forest: #2E3626;
  --cocoa: #5c5146;
  --ground: #E8E0D3;
  --card: #F3EFE7;
  --field: #FBF8F3;
  --border: #d6cbbb;
  --control-line: #857060;
  --danger: #93412E;
  --danger-soft: #f3e3dc;
  --accent-soft: #DFD8C8;
  --band: #2E3626;
  --on-band: #F3EFE7;
  --on-band-muted: #cfd0c3;
  --ink: var(--forest);
  --ink-soft: var(--cocoa);
  --btn-bg: var(--forest);
  --btn-ink: #F3EFE7;
  --btn-hover: #232A1E;
  --shadow: 0 1px 2px rgba(46, 54, 38, .06), 0 12px 32px rgba(46, 54, 38, .10);
  --bg: var(--ground);
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1f1c18;
    --card: #2a2620;
    --field: #1c1915;
    --ink: #ece2d3;
    --ink-soft: #c9b9a3;
    --border: #4a4238;
    --control-line: #8f7f6c;
    --btn-bg: #d3bf98;
    --btn-ink: #1f1c18;
    --btn-hover: #e4d2ad;
    --danger: #e39a82;
    --danger-soft: #3d2a24;
    --accent-soft: #353128;
    --band: #252b1f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #1f1c18; --card: #2a2620; --field: #1c1915; --ink: #ece2d3; --ink-soft: #c9b9a3;
  --border: #4a4238; --control-line: #8f7f6c; --btn-bg: #d3bf98; --btn-ink: #1f1c18; --btn-hover: #e4d2ad;
  --danger: #e39a82; --danger-soft: #3d2a24; --accent-soft: #353128; --band: #252b1f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
}

/* The band: across the top on a phone, the left column on a wide screen. */
.layout { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.band {
  position: relative;
  overflow: hidden;
  background: var(--band);
  color: var(--on-band);
  padding: calc(2.25rem + env(safe-area-inset-top, 0px)) 16px 4.25rem;
  text-align: center;
}
.brand { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; margin: 0; }
.brand img { width: 168px; height: auto; display: block; }
/* The mark follows its background (Mady, 5 Oct 2026): her own cream badge on a
   dark ground -- the file swapped, never the green one brightened with a
   filter. The band is always dark, so it shows the cream badge in every mode. */
:root[data-theme="dark"] .brand img { content: url("/images/mark-mycelia-badge-cream.png?v=20261103"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { content: url("/images/mark-mycelia-badge-cream.png?v=20261103"); } }
.brand-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; letter-spacing: .05em; color: var(--on-band); }
/* Supplied artwork, shown whole and never stretched: a sprig at each corner of
   the band, faint, behind the words. */
.sprig { position: absolute; width: 56px; height: auto; opacity: .22; pointer-events: none; }
.band .sprig { right: 6%; bottom: -36px; transform: rotate(18deg); }

.signin {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin: -2.75rem auto 0;
  padding: 0 16px 2.5rem;
  flex: 1 0 auto;
}

.view {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.4rem 1.25rem;
  box-shadow: var(--shadow);
}
h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: .005em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
/* The heading takes focus when a view opens, so a screen reader announces it;
   it isn't a control, so no ring is drawn round it. */
h1:focus { outline: none; }
p { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin: 0 0 .35rem; }
input[type="email"], input[type="password"], input[type="text"] {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: .65rem .85rem;
  margin: 0 0 1.1rem;
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--control-line);
  border-radius: 10px;
}
/* Show / hide password (17 Oct 2026; refined the same day): a quiet eye
   icon inside the right end of the box, in the box's muted text colour, no
   box, border or underline of its own. A fixed 44px square, so nothing moves
   when it flips; the box's text stops short of it. Only the icon's opacity
   changes (120ms), and not at all with reduced motion. */
.pw-field { position: relative; margin: 0 0 1.1rem; }
.pw-field input { margin: 0; padding-right: 3.5rem; }
.pw-field input::-ms-reveal, .pw-field input::-ms-clear { display: none; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--ink); }
.pw-icon {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 120ms ease-out;
}
.pw-toggle .pw-icon-hide, .pw-toggle[aria-pressed="true"] .pw-icon-show { opacity: 0; }
.pw-toggle[aria-pressed="true"] .pw-icon-hide { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pw-icon { transition: none; } }
#code { letter-spacing: .3em; font-size: 1.3rem; text-align: center; }
#code.is-backup { letter-spacing: .12em; text-transform: uppercase; }
.check { display: flex; gap: .65rem; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: .15rem 0 0; flex: 0 0 auto; accent-color: var(--btn-bg); }
.check label { font-weight: 400; margin: 0; }
.hint { font-size: .92rem; color: var(--ink-soft); margin: .3rem 0 1.1rem 2.15rem; }
#two-step-passkey .hint { margin-left: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: .7rem 1rem;
  margin: 0 0 .75rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--btn-bg);
  cursor: pointer;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--control-line); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: .6; cursor: progress; }
.choices .btn { white-space: normal; }
.linkish {
  background: none; border: 0; padding: .4rem 0; min-height: 44px;
  font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}
.view > p:last-child, .view > form:last-child { margin-bottom: 0; }
.error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 10px;
  padding: .65rem .8rem;
}
.notice {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: .75rem .95rem;
}
/* The authenticator QR code: always dark on white with its own white quiet
   zone (inside the SVG, plus this padding), so it scans in dark mode too. */
.qr { width: min(220px, 70vw); margin: 0 auto 1rem; padding: 8px; background: #ffffff; border-radius: 8px; line-height: 0; }
.qr svg { display: block; width: 100%; height: auto; }
.key-label { font-weight: 600; margin-bottom: .2rem; }
.key { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; user-select: all; }
.codes {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .75rem;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.05rem; letter-spacing: .05em;
}
.codes li { padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; text-align: center; user-select: all; }
@media (max-width: 340px) { .codes { grid-template-columns: 1fr; } }
.turnstile { min-height: 0; margin: 0 0 .75rem; }
.footer { text-align: center; font-size: .92rem; color: var(--ink-soft); margin: 1.5rem 0 0; }
.footer a { color: inherit; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* A wider screen: the band becomes the left column, the form is centred in
   the oat ground beside it. */
@media (min-width: 860px) {
  .layout { flex-direction: row; }
  .band {
    flex: 0 0 clamp(300px, 36vw, 460px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
  }
  .brand img { width: 220px; }
  .brand-name { font-size: 2rem; }
  .sprig { width: 84px; }
  .band .sprig { right: 10%; bottom: -24px; }
  .signin {
    margin: 0 auto;
    align-self: center;
    padding: 3rem 2rem;
    max-width: 32rem;
  }
  .view { padding: 2.25rem 2rem 1.5rem; }
  h1 { font-size: 2.25rem; }
}

[hidden] { display: none !important; }

/* No blinking text cursor on words you can't type in (Mady, 21 Oct 2026:
   clicking any word showed a blinking line "as if it's about to allow me to
   [type]"). Chrome draws that cursor wherever text is clicked when caret
   browsing is on (F7), on every site. Here it is only ever drawn where you
   can actually type. The cursor's colour is inherited, so it is clear
   everywhere and back to normal in fields. Text can still be selected and
   copied, and nothing about reading or the keyboard changes. */
:root { caret-color: transparent; }
input, textarea, select, [contenteditable]:not([contenteditable="false"]) { caret-color: auto; }
