/*
 * Copyright (c) 2026, Ross WD Cameron <ross@wexfordhouse.co.za>
 * Copyright (c) 2026, Wexford House <https://wexfordhouse.co.za/>
 */
/* Training-site additions. Tokens come from assets/css/style.css; no new colours. */
.ft-inline { display: inline; margin: 0; }
.ft-body { padding-block: 3rem 5rem; }
.ft-body h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.03em; line-height: 1.1; margin: 2.2em 0 .6em; }
.ft-body h2:first-child { margin-top: 0; }
.ft-body p { max-width: 68ch; }
.ft-body a { color: var(--navy); text-underline-offset: 3px; }
.ft-body a:hover { color: var(--rust); }
.ft-form { display: grid; gap: 1.1rem; max-width: 36rem; margin: 1.5rem 0; }
.ft-form label { display: block; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; font-size: .68rem; font-weight: 800; }
.ft-form input[type=text], .ft-form input[type=email], .ft-form input[type=password], .ft-form textarea { width: 100%; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 0; padding: .75rem .9rem; font-family: inherit; font-size: 1rem; }
.ft-form textarea { min-height: 7rem; }
.ft-form input:focus, .ft-form textarea:focus { border-color: var(--gold); outline: none; }
.ft-hint { color: var(--muted); font-size: .86rem; margin: .4rem 0 0; }
.ft-btn { letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--navy); cursor: pointer; border: 0; padding: .9rem 1.4rem; font-family: inherit; font-size: .74rem; font-weight: 800; text-decoration: none; display: inline-block; }
.ft-btn:hover { background: var(--navy2); color: #fff; }
.ft-btn.gold { background: var(--gold-light); color: var(--ink); }
.ft-btn.gold:hover { background: var(--gold); color: var(--ink); }
.ft-btn.rust { background: var(--rust); }
.ft-btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.ft-btn:disabled, .ft-btn[aria-disabled=true] { opacity: .55; cursor: default; }
.ft-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.25rem 0; }
.ft-ok, .ft-err { margin: 1.25rem 0; padding: .8rem 0 .8rem 1rem; border-left: 2px solid var(--gold); max-width: 68ch; }
.ft-err { border-left-color: var(--rust); color: var(--rust); }
.ft-tag { letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line); padding: .1rem .4rem; font-size: .6rem; font-weight: 800; display: inline-block; vertical-align: 1px; margin-left: .5rem; }
.ft-tag.ok { color: var(--ink); }
.ft-course { background: var(--white); border: 1px solid var(--line); padding: 1.4rem 1.5rem; margin: 1rem 0; }
.ft-course h3 { font: 1.4rem/1.2 var(--font-display); font-weight: 400; margin: 0 0 .4rem; }
.ft-bar { height: .5rem; background: var(--stone); margin: .8rem 0 .4rem; }
.ft-bar > span { display: block; height: 100%; background: var(--gold); }
.ft-q { background: var(--white); border: 1px solid var(--line); padding: 1.2rem 1.4rem; margin: 1rem 0; }
.ft-q legend { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.35; padding: 0; margin-bottom: .8rem; }
.ft-q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ft-q label { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem .2rem; cursor: pointer; }
.ft-q input[type=radio] { margin-top: .35rem; accent-color: var(--navy); }
.ft-q.right { border-left: 2px solid var(--gold); }
.ft-q.wrong { border-left: 2px solid var(--rust); }
.ft-q .explain { color: var(--muted); font-size: .92rem; margin: .6rem 0 0; }
.ft-strip { background: var(--stone); border-bottom: 1px solid var(--line); font-size: .8rem; }
.ft-strip .shell { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; padding: .55rem 0; }
.ft-strip a { color: var(--navy); }
.ft-wide { width: min(100rem, 100% - 4rem); }
.ft-body .table-wrap { margin: 1rem 0; }
@media (max-width: 850px) { .ft-wide { width: min(100% - 2.5rem, 100rem); } }
@media (max-width: 540px) { .ft-wide { width: min(100% - 1.75rem, 100rem); } .ft-course { padding: 1.1rem; } }
.ft-body a.ft-btn, .ft-body a.ft-btn:hover { color: #fff; text-decoration: none; }
.ft-body a.ft-btn.gold, .ft-body a.ft-btn.gold:hover { color: var(--ink); }
.ft-body a.ft-btn.ghost, .ft-body a.ft-btn.ghost:hover { color: var(--navy); }
.ft-body a.ft-btn.ghost:hover { border-color: var(--gold); }

/* ---- account menu (avatar button, top right) ---- */
.ft-user-wrap { margin-left: auto; }
.ft-user { position: relative; }
.ft-user > summary { list-style: none; cursor: pointer; display: block; }
.ft-user > summary::-webkit-details-marker { display: none; }
.ft-user > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ft-avatar { position: relative; display: block; width: 2.5rem; height: 2.5rem; background: var(--gold); border: 1px solid #ffffff42; overflow: hidden; }
.ft-avatar span { position: absolute; inset: 0; display: grid; place-items: center; font: 800 .8rem/1 var(--font-body); letter-spacing: .06em; color: var(--ink); }
.ft-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ft-user[open] .ft-avatar { border-color: var(--gold-light); }
.ft-menu { position: absolute; right: 0; top: calc(100% + .6rem); z-index: 30; min-width: 17rem; max-width: calc(100vw - 2rem); background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1rem 2.5rem #12203126; }
.ft-menu-who { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); display: grid; gap: .15rem; }
.ft-menu-who strong { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.ft-menu-who span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.ft-menu a, .ft-menu button { display: block; width: 100%; text-align: left; padding: .8rem 1.1rem; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; font-size: .92rem; text-decoration: none; cursor: pointer; }
.ft-menu a:hover, .ft-menu button:hover { background: var(--paper); color: var(--rust); }
.ft-menu a.ft-menu-admin { color: var(--navy); font-weight: 700; }
.ft-menu form { margin: 0; }
.ft-menu form button { border-bottom: 0; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; font-weight: 800; color: var(--rust); }

/* the house accordion styles (details/summary) must not apply to the account menu */
details.ft-user { border: 0; background: none; margin: 0; }
details.ft-user > summary { padding: 0; border: 0; background: none; font-weight: 400; position: static; }
details.ft-user > summary::after { content: none; }
details.ft-user[open] > summary { border-bottom: 0; }

/* ---- course dropdown (beside the brand; a full-width sheet on phones) ---- */
.portal-nav { position: relative; }
.portal-nav > .shell { flex-wrap: nowrap; gap: clamp(1.25rem, 3vw, 2.5rem); }
.ft-courses { position: relative; }
details.ft-courses { border: 0; background: none; margin: 0; }
details.ft-courses > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .6rem 0 .5rem; border: 0; border-bottom: 1px solid transparent; background: none; color: #ffffffd6; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; font-weight: 700; position: static; }
details.ft-courses > summary::-webkit-details-marker { display: none; }
details.ft-courses > summary::after { content: ""; position: static; transform: rotate(45deg) translateY(-2px); width: .42rem; height: .42rem; border-right: 1.5px solid var(--gold-light); border-bottom: 1.5px solid var(--gold-light); transition: transform .15s; margin-top: -.1rem; }
details.ft-courses[open] > summary::after { transform: rotate(225deg) translate(-2px, 0); }
details.ft-courses > summary:hover { color: #fff; border-bottom-color: var(--gold-light); }
details.ft-courses[open] > summary { color: #fff; border-bottom: 1px solid var(--gold-light); }
details.ft-courses > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ft-panel { position: absolute; left: 0; top: calc(100% + 1rem); z-index: 30; width: 24rem; max-width: calc(100vw - 2rem); background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1rem 2.5rem #12203126; }
.ft-panel a { display: grid; gap: .15rem; padding: .85rem 1.2rem; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; text-decoration: none; color: var(--ink); }
.ft-panel a:last-child { border-bottom: 0; }
.ft-panel a strong { font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; }
.ft-panel a span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.ft-panel a:hover { background: var(--paper); }
.ft-panel a:hover strong { color: var(--rust); }
.ft-panel a[aria-current="page"] { border-left-color: var(--gold); background: var(--paper); }
@media (max-width: 700px) {
  .ft-courses { position: static; }
  .ft-panel { left: 0; right: 0; width: auto; max-width: none; top: 100%; border-left: 0; border-right: 0; max-height: calc(100vh - 5rem); overflow-y: auto; }
  .ft-menu { max-width: calc(100vw - 1.5rem); }
}

