/* Training portal: builds on /css/styles.css (navy + gold) */
.tp-main { max-width: 980px; margin: 0 auto; padding: 2.25rem 1.25rem 4rem; min-height: 60vh; }
.tp-header .nav a.tp-active { color: var(--gold-bright); }
.tp-hidden { display: none !important; }
.tp-login { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .tp-login { grid-template-columns: 1.1fr 1fr; } }
.tp-login h1, .tp-dash h1, .tp-doc h1 { font-family: var(--font-serif); color: var(--navy); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; margin: 0.2rem 0 0.6rem; }
.tp-login .form-card input { width: 100%; }
.tp-error { background: #f8e9e9; color: var(--danger); border: 1px solid rgba(138,43,43,.25); border-radius: 10px; padding: .6rem .85rem; margin: 0 0 .9rem; font-size: .95rem; }
.tp-note { color: var(--muted); font-size: .92rem; }
.tp-welcome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.tp-welcome p { margin: 0; color: var(--ink-soft); }
.tp-course { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1.3rem 1.4rem; margin: 0 0 1.25rem; }
.tp-course h2 { font-family: var(--font-serif); color: var(--navy); margin: 0 0 .2rem; font-size: 1.7rem; }
.tp-course > p { margin: 0 0 .9rem; color: var(--ink-soft); }
.tp-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tp-items { grid-template-columns: 1fr 1fr; } }
.tp-items a { display: flex; gap: .7rem; align-items: center; text-decoration: none; color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; min-height: 48px; }
.tp-items a:hover { border-color: var(--gold); background: #fbf6ea; color: var(--navy); }
.tp-tag { flex-shrink: 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: var(--gold); border-radius: 999px; padding: .15rem .55rem; }
.tp-tag.alt { background: var(--navy); color: var(--cream); }
.tp-crumbs { font-size: .92rem; margin-bottom: .6rem; }
.tp-crumbs a { text-decoration: none; }
.tp-doc article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1.5rem 1.4rem; font-size: 1.05rem; overflow-wrap: anywhere; }
@media (min-width: 760px) { .tp-doc article { padding: 2.2rem 2.6rem; } }
.tp-doc article p { margin: 0 0 .85rem; }
.tp-doc article h1, .tp-doc article h2, .tp-doc article h3 { font-family: var(--font-serif); color: var(--navy); line-height: 1.2; }
.tp-doc article strong { color: var(--navy); }
.tp-doc article ul, .tp-doc article ol { padding-left: 1.4rem; margin: 0 0 .9rem; }
.tp-doc article li { margin: .25rem 0; }
.tp-doc article table { border-collapse: collapse; width: 100%; margin: .5rem 0 1.2rem; font-size: .95rem; display: block; overflow-x: auto; }
.tp-doc article td, .tp-doc article th { border: 1px solid var(--line); padding: .45rem .6rem; vertical-align: top; min-width: 110px; }
.tp-doc article tr:first-child td { background: var(--cream-dark); }
.tp-doc .blank { display: inline-block; min-width: 12rem; border-bottom: 1.5px solid var(--muted); height: 1.1em; vertical-align: bottom; }
.tp-doc .box { color: var(--gold-deep); font-size: 1.15em; }
.tp-pager { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.tp-foot { text-align: center; padding: 1.5rem 1rem 2rem; color: var(--muted); font-size: .85rem; }
.tp-admin table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--paper); }
.tp-admin th, .tp-admin td { border-bottom: 1px solid var(--line); padding: .5rem .45rem; text-align: left; vertical-align: top; }
.tp-admin .wrap { overflow-x: auto; }
.tp-status { font-weight: 700; font-size: .8rem; text-transform: uppercase; }
.tp-status.active { color: #2c6e3f; } .tp-status.revoked, .tp-status.expired { color: var(--danger); }
.tp-newcode { background: #eef6ef; border: 1px solid #b9d8bf; border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; }
.tp-newcode code { font-size: 1.35rem; font-weight: 700; letter-spacing: .06em; color: var(--navy); }
.tp-checks label { display: inline-flex; gap: .35rem; margin: 0 1rem .35rem 0; align-items: center; }
@media print { .site-header, .tp-pager, .tp-foot, .tp-crumbs, .tp-print { display: none !important; } .tp-doc article { box-shadow: none; border: 0; padding: 0; } }
@media (max-width: 900px) {
  .tp-header .header-inner { flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; }
  .tp-header .nav { display: flex; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; background: transparent; padding: 0; gap: .4rem 1rem; border: 0; }
  .tp-header .nav a { font-size: .88rem; }
}
.tp-admin input[type="date"] { font: inherit; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }

/* ---------- Fillable worksheets ---------- */
.fillable input.fill-text { font: inherit; font-size: 1rem; border: 0; border-bottom: 1.5px solid var(--muted); background: #fffdf6; padding: .15rem .35rem; min-width: 10rem; width: min(22rem, 100%); color: var(--navy); border-radius: 4px 4px 0 0; }
.fillable textarea.fill-line, .fillable textarea.fill-area { display: block; width: 100%; font: inherit; font-size: 1rem; line-height: 1.5; color: var(--navy); background: #fffdf6; border: 1px solid var(--line); border-bottom: 1.5px solid var(--muted); border-radius: 6px; padding: .4rem .55rem; margin: .35rem 0 .2rem; resize: vertical; overflow: hidden; min-height: 2.3rem; }
.fillable textarea.fill-area { min-height: 3.6rem; }
.fillable p.fill-p { margin: 0 0 .9rem; }
.fillable input:focus, .fillable textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; background: var(--white); }
.fillable input.fill-check, .fillable .fill-radio input { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); vertical-align: -0.15em; margin: 0 .25rem 0 .15rem; cursor: pointer; }
.fillable .fill-radio { display: inline-flex; flex-wrap: wrap; gap: .25rem .6rem; margin-left: .3rem; white-space: nowrap; }
.fillable .fill-radio label { display: inline-flex; align-items: center; gap: .15rem; font-weight: 700; color: var(--navy); background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .6rem .05rem .3rem; cursor: pointer; }
.fillable .fill-radio label:has(input:checked) { background: var(--gold); border-color: var(--gold-deep); }
.fillable .signline { display: inline-block; min-width: 12rem; border-bottom: 1.5px solid var(--muted); height: 1.1em; vertical-align: bottom; }
.fillable :disabled { opacity: 1; color: var(--navy); -webkit-text-fill-color: var(--navy); cursor: default; }
.fillable.fill-locked textarea, .fillable.fill-locked input.fill-text { background: var(--cream); }
.tp-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 0 0 1rem; }
.tp-save { font-size: .9rem; color: var(--muted); }
.tp-save.ok { color: #2c6e3f; } .tp-save.warn { color: var(--danger); font-weight: 600; } .tp-save.busy { color: var(--gold-deep); }
.tp-submitbar { margin-top: 1.25rem; background: var(--paper); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; }
.tp-submitbar p { margin: 0; }
.tp-submitted { font-weight: 700; color: #2c6e3f; }
.tp-print-name { display: none; }
.tp-prog { margin-left: auto; flex-shrink: 0; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; padding: .1rem .5rem; border: 1px solid var(--line); color: var(--gold-deep); }
.tp-prog.submitted { color: #2c6e3f; border-color: #b9d8bf; background: #eef6ef; }
.tp-tabs { display: flex; gap: .5rem; margin: 0 0 1.25rem; flex-wrap: wrap; }
.tp-tabs button[aria-selected="true"] { background: var(--navy); color: var(--cream); }
.tp-admin tr.tp-click { cursor: pointer; } .tp-admin tr.tp-click:hover td { background: #fbf6ea; }
@media print {
  .tp-toolbar, .tp-submitbar, .tp-tabs, .tp-admin-actions { display: none !important; }
  .tp-print-name { display: block; font-weight: 600; }
  .fillable input.fill-text { background: none; border: 0; border-bottom: 1px solid #000; }
  .fillable textarea.fill-line, .fillable textarea.fill-area { background: none; border: 0; border-bottom: 1px solid #000; border-radius: 0; resize: none; overflow: visible; }
  .fillable .fill-radio label { background: none !important; border: 1px solid #999; }
  .fillable .fill-radio label:has(input:checked) { border: 2px solid #000; }
}
.fillable.fill-locked input.fill-check, .fillable.fill-locked .fill-radio label { cursor: default; }
