/* MAB Student Forms. MAB brand: white page, pale blue cards, deep azure, pastel yellow, navy text. */
:root {
  --azure: #0057B8;
  --yellow: #FFEB99;
  --navy: #072C55;
  --white: #FFFFFF;
  --pale: #EAF4FF;
  --light: #D8EBFF;
  --muted: #4A6283;
  --ok: #1E7A4C;
  --ok-bg: #E3F4EA;
  --err: #B42318;
  --err-bg: #FDE8E6;
  --display: 'Anton', 'Bebas Neue', Impact, sans-serif;
  --body: 'Inter', 'Open Sans', 'Montserrat', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--white); color: var(--navy); font: 16px/1.55 var(--body); }
[hidden] { display: none !important; }
a { color: var(--azure); }
strong { font-weight: 700; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--light); }
.brand { display: inline-flex; padding: 4px 0; }
.brand img { display: block; width: 178px; height: auto; }
.all { font-weight: 600; font-size: 14px; padding: 10px 6px; white-space: nowrap; }
.wrap { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px 36px; }
.wrap.wide { max-width: 860px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 16px 24px; border-top: 1px solid var(--light); }

.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.24; color: var(--navy); font-size: 30px; margin: 12px 0 12px; overflow-wrap: break-word; }
.hl { background: var(--yellow); color: var(--navy); border-radius: 0.18em; padding: 0.02em 0.22em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.badge { display: inline-block; background: var(--white); border: 1px solid var(--light); color: var(--azure); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 5px 12px; }
.intro { margin: 0 0 18px; color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.card { background: var(--pale); border: 1px solid var(--light); border-radius: 14px; padding: 22px 18px; }
.card:focus, h1:focus, h2:focus { outline: none; }

label.fld { display: block; margin: 0 0 14px; }
label.fld > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=email], input[type=text], select, textarea { width: 100%; font: 16px/1.4 var(--body); color: var(--navy); background: var(--white); border: 1px solid #B8D4F2; border-radius: 10px; padding: 13px 14px; min-height: 50px; }
textarea { min-height: 130px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6B84A6; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, .tile:focus-visible, .linkbtn:focus-visible, input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid var(--azure); outline-offset: 2px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--azure); background: var(--azure); color: #fff; font: 600 16px var(--body); cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: #004a9e; }
.btn.alt { background: var(--white); color: var(--navy); border-color: #B8D4F2; }
.btn.alt:hover { border-color: var(--azure); background: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--azure); font: 600 15px var(--body); text-decoration: underline; cursor: pointer; padding: 12px 6px; margin-top: 6px; }
.center { text-align: center; }
.msg { min-height: 0; margin: 10px 0 0; color: var(--err); font-weight: 600; font-size: 14px; }
.msg:empty { display: none; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.secure svg { width: 15px; height: 15px; }

/* Result */
.result { text-align: left; }
.result .icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.result .icon svg { width: 28px; height: 28px; stroke-width: 2.4; }
.result.good .icon { background: var(--ok-bg); color: var(--ok); }
.result.bad .icon { background: var(--err-bg); color: var(--err); }
.result.warn .icon { background: var(--yellow); color: var(--navy); }
.result h2 { font: 700 22px/1.25 var(--body); margin: 0 0 10px; }
.result p { margin: 0 0 10px; }
.result ol, .result ul { margin: 0 0 12px; padding-left: 22px; }
.result li { margin: 0 0 8px; }
.box { background: var(--white); border: 1px solid var(--light); border-radius: 12px; padding: 14px 14px; margin: 14px 0; }
.box.warn { background: var(--yellow); border-color: #F2D873; }
.box.good { background: var(--ok-bg); border-color: #BFE3CD; }
.box .box-title { font-weight: 700; margin: 0 0 6px; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.datebox { background: var(--white); border: 1px solid var(--light); border-radius: 12px; padding: 16px; margin: 14px 0; text-align: center; }
.datebox .lab { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.datebox .val { font: 400 30px/1.2 var(--display); letter-spacing: 0.01em; margin: 6px 0 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; border-radius: 999px; padding: 4px 12px; }
.tag.good { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--err-bg); color: var(--err); }
.links { margin: 16px 0 0; }
.links .box-title { font-weight: 700; margin: 0 0 8px; }
.linkrow { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--light); border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; text-decoration: none; color: var(--navy); min-height: 56px; }
.linkrow:hover { border-color: var(--azure); }
.linkrow b { display: block; color: var(--azure); }
.linkrow span span { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.linkrow svg { margin-left: auto; color: var(--azure); }
.actions { margin-top: 18px; display: grid; gap: 10px; }

/* Hub */
.hero { margin-bottom: 8px; }
.group-title { font: 700 16px var(--body); margin: 26px 0 10px; }
.tiles { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tile { display: flex; align-items: center; gap: 12px; background: var(--pale); border: 1px solid var(--light); border-radius: 12px; padding: 14px 14px; min-height: 68px; text-decoration: none; color: var(--navy); }
.tile:hover { border-color: var(--azure); }
.tile b { display: block; font-size: 16px; }
.tile span span { display: block; font-size: 14px; color: var(--muted); }
.tile svg { margin-left: auto; color: var(--azure); }

/* Progress form */
.bar { height: 12px; background: var(--white); border: 1px solid var(--light); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--azure); border-radius: 999px; transition: width 0.25s; }
.barline { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.sec { background: var(--white); border: 1px solid var(--light); border-radius: 12px; padding: 14px 12px 6px; margin: 14px 0; }
.sec h3 { font: 700 16px/1.3 var(--body); margin: 0 0 8px; }
.chk { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; min-height: 48px; border-top: 1px solid var(--pale); cursor: pointer; }
.chk:first-of-type { border-top: 0; }
.chk input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--azure); flex: none; }
.radios { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 10px; }
.radios label { display: flex; align-items: center; gap: 8px; background: var(--pale); border: 1px solid var(--light); border-radius: 10px; padding: 10px 14px; min-height: 48px; font-weight: 600; cursor: pointer; }
.radios input { width: 20px; height: 20px; accent-color: var(--azure); }
.sticky { position: sticky; bottom: 0; background: linear-gradient(to top, var(--pale) 78%, rgba(234, 244, 255, 0)); padding: 16px 0 6px; margin-top: 8px; }
.saved { font-size: 14px; font-weight: 600; color: var(--ok); margin: 8px 0 0; text-align: center; min-height: 20px; }
.note { background: var(--yellow); border-radius: 10px; padding: 12px 14px; }

/* Terms and Conditions form */
.terms { background: var(--white); border: 1px solid var(--light); border-radius: 12px; padding: 14px; max-height: 420px; overflow-y: auto; -webkit-overflow-scrolling: touch; font-size: 14px; line-height: 1.6; margin: 0 0 6px; }
.terms h3 { font: 700 15px/1.35 var(--body); margin: 16px 0 6px; }
.terms h3:first-child { margin-top: 0; font-size: 17px; }
.terms p { margin: 0 0 10px; }
.terms ul { margin: 0 0 10px; padding-left: 20px; }
.terms li { margin: 0 0 5px; }
.terms:focus-visible, summary:focus-visible, .sig:focus-visible { outline: 3px solid var(--azure); outline-offset: 2px; }
.sec .fld:last-child { margin-bottom: 10px; }
input[readonly] { background: var(--pale); color: var(--muted); }
.ro { background: var(--pale); color: var(--muted); border: 1px solid #B8D4F2; border-radius: 10px; padding: 13px 14px; margin: 0 0 10px; overflow-wrap: anywhere; }
details.info { margin: 0 0 10px; }
details.info summary { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--azure); font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; }
details.info summary::-webkit-details-marker { display: none; }
details.info summary::before { content: ''; width: 0; height: 0; border-left: 7px solid var(--azure); border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform 0.2s; }
details.info[open] summary::before { transform: rotate(90deg); }
details.info .box { margin: 0 0 6px; background: var(--pale); font-size: 14px; }
.sig { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: var(--white); border: 2px dashed #B8D4F2; border-radius: 10px; touch-action: none; cursor: crosshair; }
.sigrow { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.sigrow .linkbtn { margin-top: 0; }

@media (min-width: 620px) {
  .top { padding: 16px 28px; }
  .brand img { width: 210px; }
  .wrap { padding: 36px 20px 48px; }
  .display { font-size: 38px; }
  .card { padding: 28px 28px; }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .bar i, details.info summary::before { transition: none; } }
