/* =============================================================
   BBC Online Banking — Training Simulator
   Original stylesheet for a fictional training simulation.
   Plain CSS only — no frameworks, no external resources.
   ============================================================= */

:root {
  --bbc-blue: #0062CC;
  --bbc-blue-dark: #0052AD;
  --bbc-link: #1B6FC9;
  --bbc-dark: #0A2A4F;
  --bbc-gold: #FABD00;
  --banner-bg: #FFB020;
  --banner-ink: #1A1A1A;
  --error: #C4161C;
  --ink: #1A1A1A;
  --ink-soft: #333333;
  --ink-muted: #555555;
  --line: #6B6B6B;
  --line-light: #E3E3E3;
  --banner-h: 48px; /* measured and kept up to date by app.js */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
}

img { max-width: 100%; }

/* Visible focus for every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--bbc-link);
  outline-offset: 2px;
}

/* Training banner — sticky, full width, non-dismissible */
#training-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--banner-bg);
  color: var(--banner-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  padding: 12px 16px;
}

#training-banner[data-theme="info"] { background: var(--bbc-dark); color: #FFFFFF; }

/* Split layout: hero (left) + sign-in panel (right) */
.split {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--banner-h));
}

.hero {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  min-height: calc(100vh - var(--banner-h));
  background-color: var(--bbc-dark); /* solid fallback if the image is missing */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-logo { height: 72px; width: auto; }

.hero h1 {
  margin: 28px 0 10px;
  color: #FFFFFF;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.hero-product { margin: 0; color: #FFFFFF; font-size: 16px; }

.panel {
  flex: 1 1 50%;
  display: flex;
  background: #FFFFFF;
  min-height: calc(100vh - var(--banner-h));
}

.panel-inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px;
  display: flex;
  flex-direction: column;
}

/* Centers the form between the panel top and the panel footer */
#signin-form { margin: auto 0; }

/* Form fields */
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.field-label-row label { font-size: 16px; color: var(--ink-soft); }

.label-icon { color: var(--line); flex: none; }

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  height: 56px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0 14px;
}

.field input.invalid { border: 2px solid var(--error); padding: 0 13px; }

.save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 22px;
}

.save-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--bbc-blue);
}

.save-row label { font-size: 15px; color: var(--ink-soft); }

.help-icon { display: inline-flex; color: var(--line); flex: none; }

.show-toggle {
  border: 0;
  background: none;
  padding: 4px 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--bbc-link);
  cursor: pointer;
}

.show-toggle:hover { text-decoration: underline; }

#form-error { margin: 12px 0 0; color: var(--error); font-size: 14px; }

#signin-btn {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 20px;
  background: var(--bbc-blue);
  color: #FFFFFF;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

#signin-btn:hover { background: var(--bbc-blue-dark); }

#signin-btn:disabled { background: #A6B0BC; color: #F2F4F7; cursor: not-allowed; }

/* Panel links, divider, footer */
.panel-links {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.panel-links a,
.other-services,
.footer-links a {
  color: var(--bbc-link);
  text-decoration: none;
}

.panel-links a:hover,
.other-services:hover,
.footer-links a:hover {
  text-decoration: underline;
}

.panel-links a { font-size: 15px; }

.divider { border: 0; border-top: 1px solid var(--line-light); margin: 28px 0 22px; }

.other-services {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.panel-footer { margin-top: 32px; }

.panel-footer p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-links {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ext-icon { flex: none; }

/* Debrief page */
.debrief-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #F4F6F9;
}

.debrief-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  min-height: calc(100vh - var(--banner-h));
}

.debrief-card {
  width: 100%;
  max-width: 640px;
  background: #FFFFFF;
  padding: 40px 44px;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(10, 42, 79, 0.12);
}

.debrief-check { margin: 0 0 12px; font-size: 56px; line-height: 1; }

.debrief-card h1 { margin: 0 0 14px; font-size: 28px; color: var(--ink); }

.debrief-card p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

.debrief-note { font-weight: 600; }

.debrief-site { font-size: 14px; color: var(--ink-muted); }

.site-url {
  font-weight: 700;
  color: var(--bbc-dark);
  overflow-wrap: anywhere;
}

.debrief-card h2 { margin: 24px 0 10px; font-size: 17px; color: var(--ink); }

.debrief-list { margin: 0 0 26px; padding-left: 22px; }

.debrief-list li { margin-bottom: 8px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

.debrief-back {
  display: inline-block;
  background: var(--bbc-blue);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 2px;
}

.debrief-back:hover { background: var(--bbc-blue-dark); }

.debrief-back:focus-visible { outline: 3px solid var(--bbc-dark); }

/* Mobile: stack the split layout below 860px */
@media (max-width: 859px) {
  .split { flex-direction: column; }

  .hero {
    min-height: 220px;
    padding: 24px;
  }

  .hero h1 { margin: 18px 0 8px; }

  .panel { min-height: 0; }

  .panel-inner { padding: 24px; }

  .debrief-card { padding: 28px 22px; }
}
