/* Leaton Accounts: sign-in shell. Two themes on <html data-theme="dark|light"> (R116, Brad #4074/#4077). No switch yet.

   DARK = the Leaton portal palette (Brad's text-colour rules, 28 Oct 2026): #151515 page · #111111 header ·
   #202020 fields · #F1DBB3 wheat reading text + actionable buttons only · #E2DACB cream side text only ·
   #D0B98F links (wheat on hover) · #6A5E48 field borders · #383630 dividers.

   LIGHT = colours read from Brad's two reference screenshots (#4048):
     page/left pane   #FFFFFF        header bar        #1F68DD (white logo and name on it)
     heading/body     #000A1E        labels/footer     #404756
     field border     #7F848E        field border soft #CCCED2 / panel tint #E9EAEC
     link/primary btn #0078C8 (white text)    secondary button border #A6A9B0
   Chosen by me, not in the screenshots: link/button hover #005FA3 and #006AB0 (a darker #0078C8),
   focus ring #0078C8, notice line #000A1E.
   The artwork and the logo are separate files (static/brand/art-<theme>.svg, logo-<theme>.svg), so they can be swapped
   without editing pages or this file. */
:root, html[data-theme="dark"] {
  --bg: #151515; --text: #F1DBB3; --label: #F1DBB3; --foot: #E2DACB;
  --header-bg: #111111; --header-border: #383630; --header-text: #F1DBB3;
  --field-bg: #202020; --field-text: #F1DBB3; --field-border: #6A5E48; --focus: #F1DBB3;
  --link: #D0B98F; --link-hover: #F1DBB3;
  --btn-bg: #F1DBB3; --btn-text: #201D17; --btn-hover-bg: #FFEAC4; --btn-hover-text: #151515;
  --btn2-text: #F1DBB3; --btn2-border: #665942; --btn2-hover-bg: #222222;
  --notice-bg: #302B22; --notice-line: #F1DBB3; --help-bg: #1B1B1B; --help-border: #383630;
  --art-bg: #111111; --art-border: #383630;
}
html[data-theme="light"] {
  --bg: #FFFFFF; --text: #000A1E; --label: #404756; --foot: #404756;
  --header-bg: #1F68DD; --header-border: #1F68DD; --header-text: #FFFFFF;
  --field-bg: #FFFFFF; --field-text: #000A1E; --field-border: #7F848E; --focus: #0078C8;
  --link: #0078C8; --link-hover: #005FA3;
  --btn-bg: #0078C8; --btn-text: #FFFFFF; --btn-hover-bg: #006AB0; --btn-hover-text: #FFFFFF;
  --btn2-text: #0078C8; --btn2-border: #A6A9B0; --btn2-hover-bg: #E9EAEC;
  --notice-bg: #E9EAEC; --notice-line: #000A1E; --help-bg: #E9EAEC; --help-border: #CCCED2;
  --art-bg: #0A206E; --art-border: #0A206E;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 Inter, "Segoe UI", Arial, sans-serif;
}
h1 { font: 700 30px/1.2 Georgia, "Times New Roman", serif; color: var(--text); margin: 0 0 20px; }
.lead { margin: -8px 0 20px; color: var(--text); }

/* header: 64px */
.topbar {
  height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: flex-start;
  padding: 0 24px; background: var(--header-bg); border-bottom: 1px solid var(--header-border);
}
.topbar > .brand { margin-right: auto; }   /* logo + word sit at the far left, never centred */
.topbar > .signout { margin-left: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--header-text); text-decoration: none; }
.logo { display: block; width: 40px; height: 43px; }
.brand-name { font: 400 18px/1.2 Georgia, "Times New Roman", serif; letter-spacing: .5px; color: var(--header-text); }

/* two panes */
.panes { flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.form-pane { display: flex; flex-direction: column; justify-content: space-between; padding: 24px; min-width: 0; }
.form-col { width: 100%; max-width: 520px; margin: auto; padding: 24px 0; }
.art-pane { background: var(--art-bg); border-left: 1px solid var(--art-border); position: relative; overflow: hidden; }
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* fields: 40px inputs, 20px between groups */
.field { margin: 0 0 20px; }
label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--label); }
input[type=text], input[type=email], input[type=password] {
  display: block; width: 100%; height: 40px; padding: 0 12px;
  background: var(--field-bg); color: var(--field-text); border: 1px solid var(--field-border); border-radius: 6px;
  font: inherit; font-size: 16px;
}
input:focus-visible, .btn:focus-visible, .link:focus-visible, .brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.brand:focus-visible { outline-color: var(--header-text); }
input[aria-invalid=true] { border-color: var(--focus); }

/* messages: no new colours, no solid wheat */
.notice { margin: 0 0 20px; padding: 10px 12px; background: var(--notice-bg); color: var(--text); border-left: 2px solid var(--notice-line); border-radius: 0 6px 6px 0; }

/* actions: link left, button right */
.actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px;
  border-radius: 6px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--btn-bg); color: var(--btn-text); }
.btn.primary:hover { background: var(--btn-hover-bg); color: var(--btn-hover-text); }
.btn.secondary { background: transparent; color: var(--btn2-text); border-color: var(--btn2-border); }
.btn.secondary:hover { background: var(--btn2-hover-bg); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.link { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--link-hover); }
.below { margin: 0 0 12px; }
.help { display: none; margin: 16px 0 0; padding: 10px 12px; background: var(--help-bg); border: 1px solid var(--help-border); border-radius: 6px; color: var(--text); font-size: 14px; }
.help:target { display: block; }
.foot { font-size: 12px; color: var(--foot); text-align: left; max-width: 520px; width: 100%; margin: 0 auto; }

/* signed-in placeholder */
.signout { display: flex; align-items: center; gap: 12px; margin: 0; }
.topbar .btn.secondary { color: var(--header-text); border-color: var(--btn2-border); }
html[data-theme="light"] .topbar .btn.secondary { border-color: #FFFFFF; }
html[data-theme="light"] .topbar .btn.secondary:hover { background: #1F65D6; }
.home-main { flex: 1 1 auto; }   /* the page after sign-in is blank for now (Brad #4109): only the top bar */

/* artwork drops out at 1024px and below */
@media (max-width: 1024px) {
  .panes { grid-template-columns: 1fr; }
  .art-pane { display: none; }
}
/* actions wrap; buttons full width at 640px and below */
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .form-pane { padding: 16px; }
  .actions { flex-direction: column-reverse; align-items: stretch; gap: 16px; }
  .actions .btn { width: 100%; }
  .actions .link { text-align: center; }
  h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .link { transition: background-color .12s, color .12s; } }
