/* TIH Learning Hub sign-up (live /hub-application). Matches the sign-in page. */
:root { --primary: #002868; --primary-mid: #1565d8; --primary-light: #eaf4ff; --secondary: #E31E24; --text: #0B1F3A; --muted: #5b6b8c; --border: #dbe7f7; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text);
  background: radial-gradient(ellipse 70% 50% at 100% 0%, #dbe8ff 0%, transparent 60%), linear-gradient(160deg, #f7faff 0%, #eef4ff 55%, #fdf1f2 100%); }
a { color: var(--primary); }
.ra-wrap { max-width: 520px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ra-card { width: 100%; background: #fff; border-radius: 20px; border-top: 5px solid var(--secondary); padding: 2rem 1.75rem 1.75rem; box-shadow: 0 24px 64px rgba(11,31,58,.12), 0 2px 8px rgba(11,31,58,.06); }
.ra-head { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-bottom: 1.4rem; }
.ra-head img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.ra-head > span { display: flex; flex-direction: column; line-height: 1.15; }
.ra-brand { font-family: Poppins, Inter, sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--primary); letter-spacing: -.02em; }
.ra-brand span { color: var(--secondary); }
.ra-org { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* Steps */
.ra-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: 0; margin: 0 0 1.4rem; counter-reset: none; }
.ra-steps li { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: #94a3b8; text-align: center; position: relative; }
.ra-steps li::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: #e2e8f0; }
.ra-steps li:last-child::after { display: none; }
.ra-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eef2f7; color: #94a3b8; font-weight: 800; font-size: .85rem; position: relative; z-index: 1; }
body[data-step="1"] .ra-steps li[data-n="1"], body[data-step="2"] .ra-steps li[data-n="2"], body[data-step="3"] .ra-steps li[data-n="3"] { color: var(--primary); }
body[data-step="1"] .ra-steps li[data-n="1"] .ra-dot, body[data-step="2"] .ra-steps li[data-n="2"] .ra-dot, body[data-step="3"] .ra-steps li[data-n="3"] .ra-dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(0,40,104,.12); }
body[data-step="2"] .ra-steps li[data-n="1"] .ra-dot, body[data-step="3"] .ra-steps li[data-n="1"] .ra-dot, body[data-step="3"] .ra-steps li[data-n="2"] .ra-dot { background: #10b981; color: #fff; }
body[data-step="2"] .ra-steps li[data-n="1"]::after, body[data-step="3"] .ra-steps li::after { background: #10b981; }

.ra-title { font-family: Poppins, Inter, sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .35rem; color: var(--text); }
.ra-sub { color: var(--muted); font-size: .92rem; margin: 0 0 1.2rem; }
.ra-icon { font-size: 2rem; line-height: 1; margin-bottom: .6rem; }

/* Messages */
#result { padding: .8rem .95rem; border-radius: 12px; background: #f2f6fd; color: #23395f; font-size: .88rem; margin: 0 0 1.1rem; overflow-wrap: anywhere; }
#result:empty { display: none; }
#result[data-state=error] { background: #fff1f1; color: #9b2634; border: 1px solid #fbd0d4; }
#result[data-state=success] { background: #ecfdf5; color: #14532d; border: 1px solid #c6f0da; }
#tracking-result:empty { display: none; }
#tracking-result { font-size: .85rem; margin: .6rem 0 0; }
[data-state=error] { color: #9b2634; }

/* Form */
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
legend { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); margin-bottom: .6rem; padding: 0; }
.fld { margin-bottom: .95rem; }
.fld label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .3rem; }
.opt { font-weight: 500; color: var(--muted); }
.fld small { display: block; font-size: .76rem; color: var(--muted); margin-top: .3rem; }
input, select, textarea { width: 100%; min-height: 48px; padding: .72rem .9rem; border: 1.5px solid var(--border); border-radius: 10px; background: #fbfcfe; font: inherit; font-size: .95rem; color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,40,104,.12); background: #fff; }
.ra-code { font-size: 1.4rem; letter-spacing: .5em; text-align: center; font-weight: 700; }

/* Buttons */
.ra-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: .4rem; padding: .8rem 1rem; border: 0; border-radius: 12px; background: #c8102e; background: linear-gradient(135deg, #e31e24, #c8102e); color: #fff; font: 800 1rem Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; box-shadow: 0 10px 24px rgba(227,30,36,.22); }
.ra-btn:disabled { opacity: .65; cursor: wait; }
.ra-btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #72a7ff; outline-offset: 3px; }
.ra-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; margin-top: .6rem; }
.ra-link { display: block; width: 100%; margin-top: .9rem; background: none; border: 0; color: var(--primary-mid); font: 700 .88rem Inter, system-ui, sans-serif; cursor: pointer; }
.ra-legal { text-align: center; font-size: .76rem; color: var(--muted); margin: .7rem 0 0; }
.ra-divider { display: flex; align-items: center; gap: .75rem; margin: 1.4rem 0 .4rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.ra-divider::before, .ra-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
body:not([data-step="1"]) #signin-divider, body:not([data-step="1"]) #signin-link { display: none; }

.ra-track { margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.ra-track summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--muted); }
.ra-track form { margin-top: .8rem; }
.ra-help { text-align: center; font-size: .8rem; color: var(--muted); margin: 1.2rem 0 0; line-height: 1.6; }
.ra-help a { font-weight: 700; }
.ra-trust { color: var(--muted); font-size: .8rem; margin: 0; }
.ra-trust a { font-weight: 600; }
@media (max-width: 420px) { .ra-card { padding: 1.6rem 1.15rem 1.4rem; } .ra-title { font-size: 1.4rem; } .ra-steps li { font-size: .68rem; } }

/* --- Two-column layout on wide screens (2026-11) --- */
.ra-layout { width: 100%; }
.ra-aside { display: none; }
.ra-row { display: block; }
#course-hint { color: #047857; font-weight: 600; }
@media (min-width: 560px) {
  .ra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
}
@media (min-width: 980px) {
  .ra-wrap { max-width: 1120px; padding-top: 2.5rem; }
  .ra-layout { display: grid; grid-template-columns: 1fr 1.05fr; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(11,31,58,.14); background: #fff; }
  .ra-layout .ra-card { box-shadow: none; border-radius: 0; border-top: 0; padding: 2.4rem 2.6rem 2rem; }
  .ra-aside { display: block; position: relative; color: #fff; background: radial-gradient(ellipse 80% 60% at 0% 0%, #1e5e9e 0%, transparent 60%), linear-gradient(160deg, #0b2a5b 0%, #071f48 60%, #0a2f74 100%); border-top: 5px solid var(--secondary); }
  .ra-aside-inner { position: sticky; top: 0; padding: 2.6rem 2.4rem; }
  .ra-kicker { margin: 0 0 .8rem; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9cc4ff; }
  .ra-aside h2 { font-family: Poppins, Inter, sans-serif; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1.6rem; }
  .ra-benefits { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 1rem; }
  .ra-benefits li { display: flex; gap: .8rem; align-items: flex-start; }
  .ra-benefits li > span { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(16,185,129,.22); color: #6ee7b7; font-weight: 800; font-size: .85rem; }
  .ra-benefits strong { display: block; font-size: .98rem; }
  .ra-benefits small { display: block; color: #c9d6ea; font-size: .84rem; }
  .ra-fee { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1.6rem; }
  .ra-fee p { margin: 0; font-size: .88rem; color: #dbe6f6; }
  .ra-fee strong { color: #fff; }
  .ra-fee .ra-fee-title { font-weight: 800; font-size: 1rem; color: #fff; margin-bottom: .25rem; }
  .ra-how { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .55rem; }
  .ra-how li { counter-increment: s; display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: #dbe6f6; }
  .ra-how li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e31e24; color: #fff; font-weight: 800; font-size: .78rem; flex-shrink: 0; }
}
