/* ==========================================================================
   Tractel brand layer. Loaded after style.css.
   Source: Tractel Templates (2026-06): Figtree, navy #1f264c, cyan #009ee2,
   navy panels with an angled rounded edge, the cyan chevron, the arrow strip.
   ========================================================================== */

@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --navy: #1f264c;
  --navy-deep: #171d3b;
  --navy-2: #2a3360;
  --navy-3: #39437a;
  --cyan: #009ee2;
  --cyan-dark: #0086c2;
  --cyan-soft: #e2f3fb;
  --bg: #f1f3f6;
  --border: #e2e6ee;
  --text: #1b2140;
  --muted: #626a80;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 38, 76, 0.05), 0 6px 20px -8px rgba(31, 38, 76, 0.12);
  --shadow-lift: 0 2px 4px rgba(31, 38, 76, 0.06), 0 16px 34px -12px rgba(31, 38, 76, 0.24);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cpath fill='%23009ee2' d='M0 0h9.5L30 20 9.5 40H0l20.5-20z'/%3E%3C/svg%3E");
}

body {
  font-family: "Figtree", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #ffffff 0%, rgba(255,255,255,0) 60%), var(--bg);
  background-attachment: fixed;
  font-size: 15.5px;
}
a { color: var(--cyan-dark); }
h1 { font-weight: 800; letter-spacing: -0.015em; }
h2 { font-weight: 800; letter-spacing: -0.01em; }
h3 { font-weight: 700; }
main > h1::before, .card-title-row h1::before {
  content: ""; display: inline-block; width: 0.55em; height: 0.72em; margin-right: 0.35em;
  background: var(--chev) no-repeat center / contain; vertical-align: -0.02em;
}
.eyebrow { font-weight: 700; letter-spacing: 0.12em; color: var(--cyan); }

/* ---------- Sidebar ---------- */
.sidebar { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); width: 248px; }
.sidebar::after {
  content: ""; position: absolute; right: -30px; bottom: 70px; width: 96px; height: 300px; opacity: 0.22; pointer-events: none;
  background: url("/brand/strip.png") no-repeat center top / 100% auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
.sidebar > * { position: relative; z-index: 1; }
.brand { display: block; padding: 4px 24px 22px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 150px; height: auto; }
.brand-app { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 18px; font-weight: 800; letter-spacing: 0.01em; }
.brand-chev { width: 11px; height: 15px; background: var(--chev) no-repeat center / contain; }
.brand .sub { margin-top: 2px; color: rgba(255,255,255,0.55); font-size: 11px; letter-spacing: 0.16em; }
.sidebar nav { padding: 0 12px; gap: 2px; }
.sidebar nav a {
  border-left: 0; border-radius: 10px; padding: 9px 14px; font-weight: 500; position: relative;
  color: rgba(255,255,255,0.78); transition: background 0.15s, color 0.15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.07); }
.sidebar nav a.active { background: rgba(0,158,226,0.16); color: #fff; font-weight: 700; }
.sidebar nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cyan);
}
.nav-label { padding: 18px 14px 6px; color: rgba(255,255,255,0.4); }
.side-tag { margin: 18px 24px 14px; font-size: 12.5px; font-weight: 700; color: var(--cyan); line-height: 1.35; max-width: 150px; }
.user-box { padding: 14px 24px 0; }
.logout { border-radius: 999px; padding: 5px 14px; }

/* ---------- Hero (flyer template) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; margin: 0 0 26px; min-height: 230px;
  background: linear-gradient(135deg, #e9ecf1 0%, #f8f9fb 50%, #e4e7ed 100%);
  box-shadow: var(--shadow); isolation: isolate;
}
.hero-img { position: absolute; inset: 0 0 0 30%; background-size: cover; background-position: center; z-index: -2; }
.hero-strip {
  position: absolute; right: 26px; top: -30px; bottom: -30px; width: 74px; z-index: -1; opacity: 0.55;
  background: url("/brand/strip.png") repeat-y center top / 100% auto;
}
.hero.has-img .hero-strip { display: none; }
.hero-panel {
  position: relative; background: var(--navy); color: #fff; padding: 30px 72px 30px 34px; width: 64%; min-height: 230px;
  display: flex; flex-direction: column; justify-content: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 64px) 100%, 0 100%);
  border-bottom-right-radius: 28px;
}
.hero.no-img .hero-panel { width: 72%; }
.hero-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 220px at 0% 100%, rgba(0,158,226,0.22), transparent 70%);
}
.hero .eyebrow { color: var(--cyan); margin-bottom: 6px; }
.hero h1 { color: #fff; font-size: 38px; margin: 0; display: flex; align-items: center; gap: 14px; line-height: 1.08; }
.hero h1 .chev { width: 22px; height: 30px; flex-shrink: 0; fill: var(--cyan); }
.hero-sub { color: rgba(255,255,255,0.8); margin: 12px 0 0; max-width: 560px; font-size: 15.5px; line-height: 1.5; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; position: relative; z-index: 1; }
.btn.on-dark { background: rgba(255,255,255,0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.btn.on-dark:hover { background: rgba(255,255,255,0.18); }

/* ---------- Cards, stats, buttons ---------- */
.card, fieldset.card { border-radius: var(--radius); box-shadow: var(--shadow); border-color: rgba(226,230,238,0.9); }
.card h3 { display: flex; align-items: center; gap: 9px; }
.card > h3::before, .card-head h3::before { content: ""; width: 4px; height: 17px; border-radius: 3px; background: var(--cyan); flex-shrink: 0; }
.card.highlight {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); position: relative; overflow: hidden;
}
.card.highlight::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 180px; height: 180px; opacity: 0.18;
  background: url("/brand/arrow-big.png") no-repeat center / contain; pointer-events: none;
}
.card.highlight h3::before { background: #fff; }
.stat { border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border); }
.stat-num { font-size: 34px; }
.btn { border-radius: 999px; padding: 10px 20px; font-weight: 700; letter-spacing: 0.01em; box-shadow: 0 6px 14px -8px rgba(0,158,226,0.8); }
.btn:hover { background: var(--cyan-dark); }
.btn.ghost, .btn.danger { box-shadow: none; }
.btn.secondary { box-shadow: 0 6px 14px -8px rgba(31,38,76,0.8); }
.btn.small { padding: 6px 14px; }
.field input, .field select, .field textarea { border-radius: 10px; }
.pill, .level-badge { font-weight: 700; }
.jump a { border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); border-color: transparent; }
.jump a:hover { background: var(--navy); color: #fff; }
table.data th { font-size: 11.5px; letter-spacing: 0.08em; }

/* Seven steps: navy tiles with the Tractel arrow behind each letter */
.steps { counter-reset: s; }
.step {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 12px 14px;
  position: relative; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s;
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.step::after {
  content: ""; position: absolute; right: -14px; bottom: -16px; width: 64px; height: 64px; opacity: 0.08;
  background: url("/brand/arrow-big.png") no-repeat center / contain;
}
.letter { border-radius: 10px; background: var(--navy); }
.step:nth-child(odd) .letter { background: var(--cyan); }
.p-card { background: #fff; border: 1px solid var(--border); border-top-width: 4px; border-radius: 12px; }

/* ---------- Login ---------- */
.login-wrap { display: grid; grid-template-columns: 1.15fr 1fr; padding: 0; background: #fff; align-items: stretch; }
.login-visual { position: relative; background-size: cover; background-position: center; min-height: 100vh; }
.login-visual::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(23,29,59,0.92) 0%, rgba(31,38,76,0.72) 45%, rgba(31,38,76,0.2) 100%);
}
.login-visual-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 48px; color: #fff; }
.login-logo-dark { width: 190px; height: auto; }
.login-pitch h2 { color: #fff; font-size: 42px; line-height: 1.08; margin: 8px 0 14px; display: flex; gap: 16px; align-items: flex-start; }
.login-pitch h2 .chev { width: 26px; height: 36px; fill: var(--cyan); flex-shrink: 0; margin-top: 6px; }
.login-pitch p { color: rgba(255,255,255,0.78); font-size: 17px; max-width: 420px; margin: 0; }
.login-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.login-icons img { width: 46px; height: 46px; border-radius: 12px; background: #fff; padding: 6px; opacity: 0.94; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px 24px; background: radial-gradient(800px 500px at 50% 0%, #fff, var(--bg)); }
.login-box { box-shadow: var(--shadow-lift); border-radius: 20px; padding: 40px 36px 30px; max-width: 410px; }
.login-logo { width: 170px; height: auto; display: block; }
.login-brand { font-size: 26px; margin-top: 16px; }
.login-lead { margin: 2px 0 22px; }
.login-foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); text-align: center; letter-spacing: 0.02em; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-panel { width: 78%; }
}
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { min-height: 0; }
  .login-visual-inner { padding: 26px 22px; gap: 22px; }
  .login-pitch h2 { font-size: 28px; }
  .login-icons { display: none; }
}
@media (max-width: 760px) {
  .topbar { background: var(--navy); }
  .topbar-name { display: flex; align-items: center; gap: 10px; color: #fff; }
  .topbar-name:hover { text-decoration: none; }
  .topbar-name span { font-size: 15px; font-weight: 700; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.3); }
  .hero { border-radius: 16px; min-height: 0; }
  .hero-img { inset: 0; }
  .hero-panel { width: 100%; min-height: 0; clip-path: none; border-radius: 0; padding: 22px 20px;
    background: linear-gradient(180deg, rgba(31,38,76,0.86), rgba(31,38,76,0.97)); }
  .hero.no-img .hero-panel { width: 100%; }
  .hero h1 { font-size: 27px; }
  .hero h1 .chev { width: 16px; height: 22px; }
}
@media print {
  .hero { box-shadow: none; min-height: 0; }
  .hero-img, .hero-strip { display: none; }
  .hero-panel { width: 100%; clip-path: none; background: #fff; color: var(--navy); padding: 0 0 12px; min-height: 0; }
  .hero h1, .hero-sub { color: var(--navy); }
  .hero-actions { display: none; }
}
main { margin: 0 auto; max-width: 1240px; padding-top: 28px; }
.login-visual { background-position: 30% center; }

/* ---------- Test engine: knowledge check and recall ---------- */
.test-progress { display: flex; align-items: center; gap: 14px; margin: 10px 0 18px; }
.tp-bar { flex: 1; max-width: 420px; height: 8px; background: #dfe4ec; border-radius: 99px; overflow: hidden; }
.tp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #39b8ef); border-radius: 99px; transition: width 0.3s; }
.tp-label { font-size: 13.5px; color: var(--muted); }
.tp-label strong { color: var(--navy); }
.test-rules { padding-left: 20px; margin: 0 0 18px; }
.test-rules li { margin-bottom: 6px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row form { margin: 0; }
.q-dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.q-dot { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid #cfd6e2; background: #fff; color: var(--muted); font: 700 13px "Figtree", sans-serif; cursor: pointer; }
.q-dot.done { background: var(--cyan-soft); border-color: var(--cyan); color: var(--cyan-dark); }
.q-dot.here { background: var(--navy); border-color: var(--navy); color: #fff; }
.q-dot:hover { border-color: var(--navy); }
.quiz-q legend { font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.35; }
.quiz-q .opt { padding: 13px 14px; border-radius: 12px; align-items: center; transition: border-color 0.12s, background 0.12s; }
.quiz-q .opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-key { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #eef1f6; color: var(--navy); font-weight: 800; font-size: 13px; }
.quiz-q .opt:has(input:checked) { border-color: var(--cyan); background: var(--cyan-soft); box-shadow: 0 0 0 1px var(--cyan) inset; }
.quiz-q .opt:has(input:checked) .opt-key { background: var(--cyan); color: #fff; }
.quiz-q .opt:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.quiz-q.result .opt { cursor: default; }
.quiz-q.result .opt.correct .opt-key { background: var(--green); color: #fff; }
.quiz-q.result .opt.wrong .opt-key { background: var(--red); color: #fff; }
.legend-like { font-weight: 700; color: var(--navy); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.you { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pill.missed { background: var(--red-soft); color: var(--red); }
.test-bar { align-items: center; }
.test-bar .spacer { flex: 1; }
.test-bar form { margin: 0; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
table.review tr.unanswered td { background: #fff6f6; }
table.review tr.unanswered td:nth-child(3) { color: var(--red); font-weight: 700; }
.field.has-error input { border-color: var(--red); background: #fff8f8; }
.field-err { color: var(--red); font-size: 12.5px; margin-top: 3px; }
@media (max-width: 760px) {
  .test-bar .spacer { display: none; }
  .test-bar { justify-content: stretch; }
  .test-bar .btn { flex: 1; }
}
.resume-note { background: var(--cyan-soft); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 0 0 10px; }
a.attempt { color: inherit; } a.attempt:hover { text-decoration: none; border-color: var(--cyan); }
.req { color: var(--red); font-weight: 700; }
.fi.is-req > .field > label::after, .fi.is-req > label.check > span::after, .fi.is-req > .checklist > .checklist-label::after, .fi.is-req > .commitments > .checklist-label::after, .field.fi.is-req > label::after { content: " *"; color: var(--red); font-weight: 700; }
.fi.is-missing { border-left: 3px solid var(--red); padding-left: 12px; margin-left: -15px; background: linear-gradient(90deg, #fff5f5, transparent 60%); border-radius: 4px; }
.field.fi.is-missing { margin-left: 0; padding-left: 10px; }
.fi-msg { color: var(--red); font-size: 12.5px; font-weight: 700; padding-top: 6px; }
.req-note { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.action-bar .spacer { flex: 1; }
.field.has-error select { border-color: var(--red); background: #fff8f8; }
