/* EPCL Transportation RFP 2026 portal. Self-hosted fonts only; no inline styles (CSP). */

@font-face {
  font-family: "Montserrat";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/montserrat-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}

:root {
  --epcl-black: #0A0806;
  --epcl-gold: #B3945C;      /* accents and text on black only - never text on white */
  --epcl-gold-deep: #7A5E2C; /* gold-toned text/links on light backgrounds */
  --epcl-graphite: #5E5A55;
  --epcl-mist: #F1F1EF;
  --epcl-steel: #D6D4D0;
  --epcl-white: #FFFFFF;
  --status-error: #A4262C;
  --status-ok: #2E6B3F;

  --font-head: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --logo-h: 60px;
  --radius: 4px;
  /* Signature motif: thin horizontal gold lines, like the logo's striped sun. */
  --stripes: repeating-linear-gradient(to bottom, var(--epcl-gold) 0 1px, transparent 1px 2px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--epcl-mist);
  color: var(--epcl-black);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.125rem; }
p { margin: 0 0 0.75rem; max-width: 75ch; }

a { color: var(--epcl-gold-deep); text-underline-offset: 2px; }
a:hover { color: var(--epcl-black); }

/* Gold ring (spec) + black inner ring: gold alone on white is 2.87:1, below the 3:1 WCAG
   1.4.11 needs for focus indicators; against black it is 6.96:1. */
:focus-visible {
  outline: 2px solid var(--epcl-gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--epcl-black);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--epcl-black); color: var(--epcl-white);
  padding: 8px 12px; z-index: 10; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- header: logo on pure white, clear space >= half the logo height ---- */
.site-header { background: var(--epcl-white); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: calc(var(--logo-h) / 2);
  padding-bottom: calc(var(--logo-h) / 2);
}
.logo {
  display: block;
  height: var(--logo-h);
  width: auto;
  margin-right: calc(var(--logo-h) / 2);
}
.who {
  display: flex; align-items: center; gap: 16px;
  color: var(--epcl-graphite); font-size: 0.9375rem;
}
.who strong { color: var(--epcl-black); }
.who form { margin: 0; }

/* Motif use 1 of 2: 6 px band between the white logo bar and the black strip. */
.gold-band { height: 6px; background: var(--epcl-black) var(--stripes); }

.title-strip { background: var(--epcl-black); color: var(--epcl-white); }
.strip-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px;
  padding-top: 12px; padding-bottom: 12px;
}
.strip-title { font-family: var(--font-head); font-weight: 600; }
.strip-deadline { color: var(--epcl-gold); }

main.wrap { padding-top: 28px; padding-bottom: 40px; }
main:focus { outline: none; box-shadow: none; }

/* ---- panels ---- */
.panel {
  background: var(--epcl-white);
  border: 1px solid var(--epcl-steel);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.lead { color: var(--epcl-graphite); }
.help { color: var(--epcl-graphite); font-size: 0.9375rem; }
.meta-line { color: var(--epcl-graphite); margin-bottom: 0.25rem; }
.intro { margin-bottom: 20px; }
.deadline { margin-top: 0.5rem; }
.countdown { color: var(--epcl-gold-deep); font-weight: 600; white-space: nowrap; }

/* Motif use 2 of 2: left edge of the login panel. */
.login-panel {
  position: relative;
  max-width: 560px;
  padding-left: 40px;
}
.login-panel::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
  background: var(--stripes);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* ---- forms ---- */
.form { margin: 20px 0; }
.field { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; max-width: 420px;
  font: inherit; color: var(--epcl-black);
  padding: 10px 12px;
  border: 1px solid var(--epcl-graphite);
  border-radius: var(--radius);
  background: var(--epcl-white);
}
input[aria-invalid="true"] { border-color: var(--status-error); }
input::placeholder { color: var(--epcl-graphite); }

.button {
  display: inline-block;
  font: 600 1rem/1.2 var(--font-body);
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--epcl-black);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 80ms ease-out;
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--epcl-black); color: var(--epcl-white); }
.button-primary:hover { background: #2A2622; color: var(--epcl-white); }
.button-secondary { background: var(--epcl-white); color: var(--epcl-black); }
.button-secondary:hover { background: var(--epcl-mist); color: var(--epcl-black); }
.button[disabled] { opacity: 0.6; cursor: progress; }

.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--epcl-gold-deep); text-decoration: underline;
  text-underline-offset: 2px;
}
.link-button:hover { color: var(--epcl-black); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 16px 0; }
.actions form { margin: 0; }

/* ---- dashboard steps ---- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px 20px;
  align-items: start;
}
.step::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--epcl-black); color: var(--epcl-gold);
  font-family: var(--font-head); font-weight: 600;
}
.step-upload { grid-template-columns: 44px 1fr; }
.step-body p:last-child { margin-bottom: 0; }

.file-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 4px; }
.file-picker input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.file-picker input[type="file"]:focus-visible + label {
  outline: 2px solid var(--epcl-gold); outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--epcl-black);
}
.file-picker label { margin: 0; font-weight: 600; }
.file-name { color: var(--epcl-graphite); word-break: break-all; }
.upload-form .button-primary { margin-top: 8px; }

.status-line { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--epcl-steel); }
.closed-line { font-weight: 600; }
.note h2 { font-size: 1rem; }

/* ---- alerts and results (colour is always paired with an icon and text) ---- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); margin: 12px 0; }
.alert p { margin: 0; }
.alert-error { border: 1px solid var(--status-error); border-left-width: 4px; color: var(--status-error); }
.alert-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--status-error); color: var(--epcl-white);
  font-weight: 600; font-size: 0.875rem;
}
.ok-mark { color: var(--status-ok); font-weight: 600; }
.notice-inline { color: var(--epcl-graphite); }

.results { animation: expand 180ms ease-out; transform-origin: top; }
.results:focus { outline: none; }
.results-error { border-left: 4px solid var(--status-error); }
.results-error h2, .results-error h1 { color: var(--status-error); display: flex; gap: 10px; align-items: center; }
.results-ok { border-left: 4px solid var(--status-ok); }
.results-ok h1 { color: var(--status-ok); }
.replace-warning { border: 1px solid var(--epcl-steel); background: var(--epcl-mist); padding: 12px 14px; border-radius: var(--radius); }
.issue-single { font-weight: 600; }

@keyframes expand {
  from { opacity: 0; transform: scaleY(0.96); }
  to { opacity: 1; transform: scaleY(1); }
}

.table-scroll { overflow-x: auto; }
.issues { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.issues th, .issues td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--epcl-steel); vertical-align: top; }
.issues th { font-weight: 600; background: var(--epcl-mist); }
.issues td:nth-child(2) { font-family: Consolas, "Courier New", monospace; white-space: nowrap; }

.receipt { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 16px 0; }
.receipt dt { font-weight: 600; }
.receipt dd { margin: 0; }
.mono-inline { font-family: Consolas, "Courier New", monospace; font-weight: 600; word-break: break-all; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 1.0625rem; letter-spacing: 0.02em; }

.notice-text { border-top: 1px solid var(--epcl-steel); border-bottom: 1px solid var(--epcl-steel); padding: 16px 0; margin: 16px 0; }
.error-code { color: var(--epcl-graphite); margin-bottom: 0.25rem; }

.site-footer { border-top: 1px solid var(--epcl-steel); background: var(--epcl-white); color: var(--epcl-graphite); font-size: 0.9375rem; }
.site-footer .wrap { padding-top: 16px; padding-bottom: 16px; }
.site-footer p { margin: 0.25rem 0; }

/* ---- small screens (down to 360 px) ---- */
@media (max-width: 640px) {
  :root { --logo-h: 40px; }
  body { font-size: 1rem; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-inner { flex-wrap: wrap; }
  .panel { padding: 18px; }
  .login-panel { padding-left: 30px; }
  .step, .step-upload { grid-template-columns: 1fr; }
  .step::before { margin-bottom: 4px; }
  .step .button { justify-self: start; }
  h1 { font-size: 1.3125rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:active { transform: none; }
}
