/* Branded wp-login.php. Tokens copied from shell.css (:root + home section) and wsform-skin.css
   (field border / radius / focus) so the login screen loads without the full site shell. */
body.login {
  --paper: #F7F4EC; --card: #FFFFFF; --ink: #17181A; --muted: #55595F; --line: #DCD6CA;
  --night: #111214; --night-text: #ECE9E2; --night-muted: #A9A6A0; --focus: #FFD84D;
  --sec-ink: #2F6B45; --sec-on-ink: #FFFFFF; --sec-tint: #E3EEE4; --ncd-err: #B3261E;
  --ncd-field-line: #767A80; --r-card: 4px; --r-ctl: 6px;
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--font-ui);
}
body.login * { box-sizing: border-box; }
.ncd-login-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* header + footer bands: the site's night ground and brand lockup */
.ncd-login-hdr, .ncd-login-ftr { background: var(--night); color: var(--night-text); }
.ncd-login-hdr .ncd-login-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.ncd-login-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--night-text); text-decoration: none; }
.ncd-login-mark { width: 36px; height: 36px; flex: none; }
.ncd-login-brand-text { display: flex; flex-direction: column; line-height: 1; }
.ncd-login-brand-name { font: 700 20px/1 var(--font-ui); letter-spacing: -.01em; }
.ncd-login-brand-by { font: 500 9.5px/1 var(--font-mono); letter-spacing: -.01em; word-spacing: -.3em; text-transform: uppercase; color: var(--night-muted); margin-top: 6px; white-space: nowrap; }
.ncd-login-back { color: var(--night-text); font-weight: 600; font-size: 15px; text-underline-offset: 3px; }
.ncd-login-ftr { margin-top: auto; padding: 32px 0; font-size: 14px; }
.ncd-login-ftr .ncd-login-wrap { display: grid; gap: 14px; }
.ncd-login-ftr p { margin: 0; max-width: 60ch; color: var(--night-muted); }
.ncd-login-ftr nav { display: flex; gap: 20px; }
.ncd-login-ftr nav a { color: var(--night-text); font-weight: 600; }

/* WordPress's own logo heading: kept for screen readers, the header band carries the visible brand */
.login h1 { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#login { width: 100%; max-width: 440px; margin: 0 auto; padding: clamp(32px, 7vh, 72px) 16px 48px; }
.login form {
  margin: 0; padding: 28px 28px 24px; border: 1px solid var(--line); border-top: 4px solid var(--sec-ink);
  border-radius: var(--r-card); background: var(--card); box-shadow: 0 10px 30px rgba(17,18,20,.06); overflow: visible;
}
.login form::before { content: "Account"; display: block; margin-bottom: 14px; font: 500 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.login label { font: 600 15px/1.4 var(--font-ui); color: var(--ink); margin-bottom: 6px; display: inline-block; }
.login form .input, .login input[type="text"], .login input[type="password"], .login input[type="email"] {
  width: 100%; min-height: 48px; margin: 0 0 18px; padding: 10px 12px;
  border: 1.5px solid var(--ncd-field-line); border-radius: var(--r-ctl);
  background: var(--card); color: var(--ink); font: 400 16px/1.4 var(--font-ui); box-shadow: none;
}
.login form .input:focus, .login input[type="text"]:focus, .login input[type="password"]:focus, .login input[type="email"]:focus {
  border-color: var(--ink); outline: 3px solid var(--focus); outline-offset: 1px; box-shadow: 0 0 0 5px var(--night);
}
.login .wp-pwd { position: relative; }
.login .wp-pwd .input { padding-right: 52px; }
.login .button.wp-hide-pw { top: 2px; right: 2px; width: 44px; height: 44px; min-height: 44px; color: var(--muted); background: transparent; border: 0; border-radius: var(--r-ctl); }
.login .button.wp-hide-pw .dashicons { top: .4rem; }
.login .forgetmenot { margin: 4px 0 18px; float: none; }
.login .forgetmenot label { font-weight: 400; }
.login input[type="checkbox"] { width: 20px; height: 20px; border: 1.5px solid var(--ncd-field-line); border-radius: 4px; margin: 0 8px 0 0; vertical-align: -4px; }
.login input[type="checkbox"]:checked::before { filter: brightness(0) saturate(100%); }
.login .submit { float: none; clear: both; margin: 0; padding: 0; }
.login .button-primary, .login #wp-submit {
  float: none; width: 100%; min-height: 48px; padding: 0 20px; border: 2px solid transparent; border-radius: var(--r-ctl);
  background: var(--sec-ink); color: var(--sec-on-ink); font: 700 16px/1 var(--font-ui); text-shadow: none; box-shadow: none;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.login .button-primary:hover, .login #wp-submit:hover { background: var(--sec-ink); color: var(--sec-on-ink); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.login .button:focus-visible, .login a:focus-visible, .login input[type="checkbox"]:focus-visible, .ncd-login-hdr a:focus-visible, .ncd-login-ftr a:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--night); border-radius: 4px;
}
.login .button-primary:focus, .login #wp-submit:focus { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--night); }

/* messages */
.login .message, .login .notice, .login .success, .login #login_error {
  margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--sec-ink);
  border-radius: var(--r-card); background: var(--sec-tint); color: var(--ink); box-shadow: none; font-size: 15px;
}
.login #login_error, .login .notice-error { border-left-color: var(--ncd-err); background: #FBECEA; }
.login #login_error a, .login .message a { color: var(--ink); }

/* links under the form */
.login #nav, .login #backtoblog { margin: 18px 0 0; padding: 0; font-size: 15px; text-align: center; }
.login #nav a, .login #backtoblog a, .login .privacy-policy-link { color: var(--sec-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.login #nav a:hover, .login #backtoblog a:hover { color: var(--ink); }
.login #backtoblog { display: none; } /* the header band already links back */
.login .privacy-policy-page-link { margin: 18px 0 0; text-align: center; }
.login #reg_passmail, .login .description { color: var(--muted); font-size: 14px; }
.login .language-switcher { margin-top: 18px; }
.login .language-switcher label .dashicons { color: var(--muted); }

@media (max-width: 600px) {
  .ncd-login-hdr .ncd-login-wrap { min-height: 60px; }
  .ncd-login-brand-by { display: none; }
  .ncd-login-mark { width: 30px; height: 30px; }
  .ncd-login-brand-name { font-size: 18px; }
  .ncd-login-back { font-size: 14px; }
  .login form { padding: 22px 18px 18px; }
}
@media (max-width: 380px) { .ncd-login-back { display: none; } }
@media (prefers-reduced-motion: reduce) { .login #wp-submit { transition: none; } .login #wp-submit:hover { transform: none; } }
