/* Sign in — ported against designs/Signin.dc.html (2026-08-20 handoff). */
/* Namespaced under .p-signin; uses shell tokens from marketing-shell.css
   (--green is brand orange var(--brand); --green-2 is its dark pair).

   NOTE: this sheet dresses the whole auth family. templates/marketing/
   forgot.html and reset.html also render .p-signin and reuse .si-card,
   .si-eyebrow, .si-row, .si-error, .si-submit, .si-or, .si-ghost and .si-foot.
   Their own 2026-08-20 designs (Forgot.dc.html, Reset.dc.html) carry the same
   card, the same pressed-ledge buttons and the same full-bleed strip, so the
   shared rules below are written for all three. */

.p-signin {
  /* Ink for anything sitting ON brand orange. marketing-shell.css has no
     --on-brand; the brand reference and arena/chrome.css both use #201009.
     White on orange is never allowed, and this page shipped two of them
     (the submit button and ::selection). */
  --on-brand: #201009;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 28px 84px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 84% -10%, rgba(239, 89, 32,.10), transparent 60%),
    radial-gradient(760px 520px at -6% 8%, rgba(31,138,91,.06), transparent 62%);
}

/* faint bracket-mark watermark, top-right */
.p-signin .si-watermark {
  position: absolute;
  top: -70px; right: -90px;
  width: 560px; height: 560px;
  opacity: .05;
  pointer-events: none;
}

.p-signin .si-wrap { width: 100%; max-width: 444px; position: relative; }

/* card */
.p-signin .si-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 60px -30px rgba(13,16,14,.28), 0 0 0 1px rgba(239, 89, 32,.03);
}
/* Design: brand → gold → brand, not a fade to transparent. */
.p-signin .si-card-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--green), var(--accent-2), var(--green));
}

/* eyebrow — mono, uppercase, brand-dark, blinking LED (design). It read as
   success green here, which is not a colour this page has any business in. */
.p-signin .si-eyebrow {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--green-2);
  letter-spacing: .16em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.p-signin .si-eyebrow .led {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--green);
  box-shadow: none;
  animation: si-led 2.4s infinite;
}
@keyframes si-led { 0%, 72%, 100% { opacity: 1; } 82% { opacity: .25; } }

.p-signin h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 8vw, 36px);
  letter-spacing: -.035em; line-height: 1.05;
  margin: 14px 0 0; color: var(--ink);
}
.p-signin h1 .accent { color: var(--green); }
.p-signin .si-sub { font-size: 15px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.55; }

/* form */
.p-signin .si-form { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.p-signin .si-creds { display: flex; flex-direction: column; gap: 16px; }
/* Author display rules override the UA's [hidden] — restore it, or the MFA
   step renders on page load and the field swap during 2FA never hides. */
.p-signin .si-creds[hidden],
.p-signin .si-row[hidden] { display: none; }
.p-signin .si-row { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.p-signin .si-row label {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em;
}
.p-signin .si-row input {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 13px 14px;
  color: var(--ink);
  font-family: var(--sans); font-size: 14px;
  outline: none; width: 100%; min-width: 0;
  transition: border .15s, box-shadow .15s;
}
.p-signin .si-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(239, 89, 32,.14);
}
.p-signin .si-row input::placeholder { color: var(--ink-4); }
.p-signin .si-row input.invalid {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(196,71,26,.12);
}
/* The two-factor field is mono and tracked out — it holds digits (design). */
.p-signin .si-row input.si-code {
  font-family: var(--mono); letter-spacing: .16em;
}
.p-signin .si-field-err {
  font-family: var(--mono); font-size: 11px; color: var(--green-2); display: none;
}
.p-signin .si-field-err.visible { display: block; }
.p-signin .si-hint {
  font-family: var(--mono); font-size: 11px; color: var(--ink-4); line-height: 1.45;
}
/* 44px of touch target on a link that sits between two 52px inputs. */
.p-signin .si-forgot {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--mono); font-size: 12.5px; color: var(--green-2);
  text-decoration: none; align-self: flex-start;
}
.p-signin .si-forgot:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* Message box — one element, two tones (design: noteKind ok | error). */
.p-signin .si-error {
  padding: 12px 13px; border-radius: 11px;
  background: rgba(196,71,26,.07);
  border: 1px solid rgba(196,71,26,.4);
  font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--green-2);
  display: none; align-items: flex-start; gap: 9px;
}
.p-signin .si-error.visible { display: flex; }
.p-signin .si-error svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; }
.p-signin .si-error.is-ok {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--ink-2);
}

/* submit — design: a hard 4px shadow ledge that presses in, brand-ink label. */
.p-signin .si-submit {
  width: 100%; justify-content: center;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 54px; padding: 14px; border: none; border-radius: 11px;
  font-family: var(--mono); font-size: 14.5px; font-weight: 500;
  color: var(--on-brand); background: var(--green);
  box-shadow: 0 4px 0 #a83a12;
  cursor: pointer; margin-top: 4px;
  transition: transform .08s, box-shadow .08s, opacity .15s;
}
.p-signin .si-submit:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #a83a12; }
.p-signin .si-submit:disabled { cursor: wait; opacity: .78; }
.p-signin .si-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(32,16,9,.3); border-top-color: var(--on-brand);
  border-radius: 50%; display: none;
  animation: si-spin .8s linear infinite;
}
.p-signin .si-spinner.visible { display: inline-block; }
@keyframes si-spin { to { transform: rotate(360deg); } }
.p-signin .si-cursor {
  width: 7px; height: 15px; display: inline-block;
  background: var(--on-brand); animation: si-blink 1.1s step-end infinite;
}
.p-signin .si-cursor[hidden] { display: none; }
@keyframes si-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* divider + secondary CTA */
.p-signin .si-or {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
}
.p-signin .si-or span:first-child,
.p-signin .si-or span:last-child { flex: 1; height: 1px; background: var(--line); }
.p-signin .si-or .si-or-label {
  flex: none; height: auto; background: none;
  font-family: var(--mono); font-size: 11px; color: var(--ink-4);
}
.p-signin .si-ghost {
  width: 100%; justify-content: center;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 13px; border-radius: 11px;
  font-family: var(--mono); font-size: 14px;
  color: var(--ink-2); background: var(--bg-1);
  border: 1px solid var(--line-2);
  box-shadow: 0 3px 0 var(--bg-3);
  text-decoration: none;
  transition: transform .08s, box-shadow .08s, border-color .12s, color .12s;
}
.p-signin .si-ghost:hover { border-color: var(--green); color: var(--green); }
.p-signin .si-ghost:active { transform: translateY(3px); box-shadow: 0 0 0 var(--bg-3); }

/* Full-bleed strip closing the card. Negative margins match the card's 32px
   padding so it reaches both edges without restructuring. */
.p-signin .si-foot {
  margin: 22px -32px -32px; padding: 13px 18px;
  border-top: 1px solid var(--line); border-radius: 0 0 15px 15px;
  background: var(--bg-2);
  text-align: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-4); letter-spacing: .04em;
}

/* Compact legal row + sign-off under the card (design). */
.p-signin .si-legal {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin-top: 24px; font-size: 13px;
}
.p-signin .si-legal a { color: var(--ink-3); text-decoration: none; }
.p-signin .si-legal a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.p-signin .si-copy {
  text-align: center; margin-top: 12px;
  font-size: 12.5px; color: var(--ink-4);
}

@media (max-width: 560px) {
  .p-signin { padding: 26px 18px 40px; }
  /* Design: a 260px mark tucked into the top-right corner of the phone. */
  .p-signin .si-watermark { top: 24px; right: -58px; width: 260px; height: 260px; opacity: .06; }
  .p-signin .si-card { padding: 22px 18px 20px; }
  .p-signin .si-foot { margin: 20px -18px -20px; }
}

.p-signin ::selection { background: var(--brand); color: var(--on-brand); }
