:root {
  --pws-navy: #1B3A5C;
  --pws-steel: #4682B4;
  --pws-red: #E1251B;
  --bg: #F5F7FA;
  --panel: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #6B7280;
  --line: #D8DEE4;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; display: flex; flex-direction: column; }

body.signin {
  background:
    linear-gradient(rgba(12, 26, 43, 0.74), rgba(12, 26, 43, 0.86)),
    
    url("/img/bg-coil-corridor-centered.jpg") center / cover no-repeat fixed,
    var(--pws-navy);
}

@media (max-width: 640px) {
  
  body.signin { background-attachment: scroll; }
}

header { background: #000; color: white; padding: 14px 28px; min-height: 168px; display: flex; align-items: center; justify-content: center; gap: 16px; position: relative; box-sizing: border-box; }
header img.cust-logo { height: 116px; max-width: 320px; object-fit: contain; position: absolute; left: 28px; top: 50%; transform: translateY(-50%); }  
header img.logo { height: 120px; position: absolute; right: 28px; top: 50%; transform: translateY(-50%); }                                            
@media (max-width: 640px) { header { min-height: 108px; } header img.logo { height: 66px; right: 14px; } header img.cust-logo { height: 64px; max-width: 130px; left: 14px; } }
header .title { line-height: 1.1; text-align: center; padding: 0 260px; }
header .title .t1 { display: block; font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif; font-size: 40px; font-weight: 700; letter-spacing: 0.03em; color: #fff; }
header .title .t2 { display: block; font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif; font-size: 18px; font-weight: 400; letter-spacing: 0.42em; text-transform: uppercase; color: #aeb8c4; margin-top: 8px; padding-left: 0.42em; }

header .title:not(:has(.t1)) { font-weight: 700; font-size: 34px; letter-spacing: 0.03em; color: #fff; }
@media (max-width: 640px) { header .title { padding: 0 90px; } header .title .t1 { font-size: 24px; } header .title .t2 { font-size: 13px; letter-spacing: 0.3em; margin-top: 4px; } }

main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }

.card { width: min(440px, 100%); background: var(--panel); padding: 28px 32px; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(27,58,92,0.08); }
.card h1 { margin: 0 0 6px; font-size: 28px; color: var(--pws-navy); }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 16px; }

.card input { width: 100%; padding: 11px 13px; font-size: 15px; border: 1px solid var(--line); border-radius: 5px; outline: none; }
.card input:focus { border-color: var(--pws-steel); }
.card button.primary { margin-top: 12px; width: 100%; padding: 11px; background: var(--pws-navy); color: white; border: 0; border-radius: 5px; font-size: 15px; font-weight: 600; cursor: pointer; }
.card button.primary:hover { background: #14304D; }
.card button.primary:disabled { background: #99A8BC; cursor: not-allowed; }

.err { margin-top: 10px; color: var(--pws-red); font-size: 13px; min-height: 18px; }
.help { margin-top: 16px; font-size: 12px; color: var(--muted); }
.help a { color: var(--pws-steel); }

#welcome-link { display: inline-block; margin-top: 14px; padding: 10px 16px; background: var(--pws-navy); color: white; border-radius: 5px; text-decoration: none; font-weight: 600; }
#welcome-link:hover { background: #14304D; }

#welcome-hubs[hidden] { display: none !important; }

#welcome-hubs:not([hidden]) ~ #welcome-link {
  background: none; color: var(--pws-steel); font-weight: 500;
  text-decoration: underline; padding: 6px 0; margin-top: 4px;
}
#welcome-hubs:not([hidden]) ~ #welcome-link:hover { background: none; color: var(--pws-navy); }

footer { padding: 18px 20px; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

button.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 6px 12px; border-radius: 4px; font: inherit; font-size: 12px; cursor: pointer; }
button.ghost:hover { border-color: var(--pws-navy); color: var(--pws-navy); }

.project-section { margin-bottom: 24px; }

main .card > .project-tiles + .project-section { margin-top: 24px; }
.section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 0 4px 8px; }
.project-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }

.tile { display: block; background: linear-gradient(135deg, #f4f9fd, #eaf2f9); border: 1px solid var(--pws-steel); border-radius: 6px; padding: 20px 24px; text-decoration: none; color: var(--ink); transition: border-color 120ms ease, transform 120ms ease; }
.tile:hover { border-color: var(--pws-navy); transform: translateY(-1px); }
.tile-name { font-weight: 600; color: var(--pws-navy); font-size: 21px; }
.tile-meta { font-size: 13.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 6px; }
.tile-desc { font-size: 14px; color: #45505e; margin-top: 8px; line-height: 1.45; }
.tile-featured { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 16px; padding: 22px 28px; background: linear-gradient(135deg, #eef4fa, #e2edf6); border: 1px solid var(--pws-steel); }
.tile-featured .tf-main { flex: 1; min-width: 0; }
.tile-featured .tile-name { font-size: 24px; }
.tile-featured .tf-label { display: inline-block; margin-left: 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--pws-steel); vertical-align: middle; }
.tile-featured .tile-desc { margin-top: 8px; max-width: 660px; font-size: 15px; color: #3f4a57; }
.tile-featured .tf-cta { flex: none; background: var(--pws-navy); color: #fff; padding: 13px 24px; border-radius: 6px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.tile-featured:hover .tf-cta { background: #14304D; }
@media (max-width: 640px) { .tile-featured { flex-direction: column; align-items: flex-start; gap: 14px; } .tile-featured .tf-label { display: block; margin: 4px 0 0; } .tile-featured .tf-cta { width: 100%; text-align: center; box-sizing: border-box; } }

.tile-accent { border-color: var(--pws-steel); box-shadow: inset 4px 0 0 var(--pws-steel); background: linear-gradient(135deg, #f4f9fd, #eaf2f9); }
.tile-accent:hover { border-color: var(--pws-navy); box-shadow: inset 4px 0 0 var(--pws-navy); }

.tile-accent .tile-meta { color: var(--pws-steel); font-weight: 700; }
.tile-accent .ta-cta { display: inline-block; margin-top: 16px; background: var(--pws-navy); color: #fff; padding: 10px 20px; border-radius: 6px; font-weight: 700; font-size: 14px; }
.tile-accent:hover .ta-cta { background: #14304D; }
.empty { color: var(--muted); padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; text-align: center; }

.topnav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; background: #14304D; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.topnav a { display: inline-block; color: #c7d3e0; text-decoration: none; font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; padding: 13px 15px; border-bottom: 3px solid transparent; transition: color 120ms ease, border-color 120ms ease; }
.topnav a:hover { color: #fff; }
.topnav a.active { color: #fff; border-bottom-color: var(--pws-steel); }
.topnav a.signout { margin-left: auto; color: #93a5b8; }
.topnav a.signout:hover { color: #fff; }
@media (max-width: 640px) { .topnav { padding: 0 8px; } .topnav a { padding: 12px 11px; font-size: 13px; } }

.card-logo[hidden] { display: none !important; }   
.card-logo {
  display: block;
  max-height: 46px;
  max-width: 74%;
  width: auto;
  margin: 2px auto 20px;
  object-fit: contain;
}

.card-cust[hidden] { display: none !important; }
.card-cust {
  margin: -28px -32px 22px;
  padding: 16px 20px;
  background: #000;
  text-align: center;
}

.card-cust img { max-height: 68px; max-width: 72%; width: auto; display: inline-block; }

.card-provider {
  margin: 24px -32px -28px;
  padding: 16px 20px;
  background: #000;
  text-align: center;
}

.card-provider img {
  height: 56px;
  width: auto;
  display: inline-block;
}
@media (max-width: 480px) {
  .card-logo { max-height: 40px; margin-bottom: 16px; }
  .card-provider { margin: 20px -20px -22px; }
  .card-cust { margin: -22px -20px 18px; }
  .card-cust img { max-height: 52px; max-width: 76%; }
  .card-provider img { height: 42px; }
}

.email-field { display: flex; align-items: stretch; }
.email-field.has-suffix {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}
.email-field.has-suffix:focus-within { border-color: var(--pws-steel); }
.email-field.has-suffix input {
  border: 0;
  border-radius: 0;
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 4px;
}
.email-field.has-suffix input:focus { border: 0; outline: none; }

.email-suffix[hidden],
.email-field:not(.has-suffix) .email-suffix { display: none !important; }
.email-suffix {
  display: flex;
  align-items: center;
  padding: 0 13px 0 2px;
  font-size: 15px;
  color: var(--muted);
  background: #fff;
  white-space: nowrap;
  user-select: none;
}
@media (max-width: 420px) {
  .email-suffix { font-size: 13px; padding: 0 9px 0 2px; }
}

body.signin > header { display: none; }
body.signin > main { min-height: 100vh; padding-top: 24px; padding-bottom: 24px; }
body.signin .card { overflow: hidden; }

body.hub-h1 main,
body.hub-h2   main { align-items: flex-start; }

body.hub-h1 .section-label,
body.hub-h2   .section-label {
  color: #445061; font-weight: 700; letter-spacing: .08em;
  margin-top: 22px; margin-bottom: 8px;
}

@media (max-width: 820px) and (pointer: coarse) {
  a.tile[href^="/play"] { display: none !important; }
}
