

:root {
  /* Purplle brand */
  --violet-950: #1E0B3A;   /* night violet: hero, header */
  --violet-900: #2A0F52;
  --violet-700: #4F1590;
  --violet-600: #6A1FB8;   /* brand violet */
  --violet-500: #8A3FD6;
  --violet-400: #B07AE8;
  --pink: #E3187D;         /* Purplle pink: actions only */
  --pink-700: #B80F63;
  --gold: #E5B567;
  --grad: linear-gradient(120deg, #6A1FB8, #8A3FD6);

  /* ISO 7010 sign families: each training takes one */
  --sign-red: #E23A2E;
  --sign-blue: #1767D6;
  --sign-yellow: #FFC000;
  --sign-green: #0FA05A;

  /* Neutrals */
  --paper: #F6F3FC;
  --card: #ffffff;
  --ink: #1A1233;
  --ink-2: #625a78;
  --ink-3: #958ca8;
  --rule: #e6def2;
  --rule-soft: #f1ecf8;

  /* Text-safe status colours */
  --go: #0b8a4c;
  --go-bg: #e3f5eb;
  --wait: #a65f00;
  --wait-bg: #fff2d6;
  --stop: #c02f26;
  --stop-bg: #fde9e7;

  --shadow-sm: 0 1px 2px rgba(42, 15, 82, .06);
  --shadow-md: 0 10px 30px rgba(42, 15, 82, .12);
  --shadow-lg: 0 30px 70px rgba(10, 2, 24, .45);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', -apple-system, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Medium-compact content column — uses a landscape screen without going edge-to-edge */
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 28px 90px; }

/* ============================================================
   MASTHEAD (inside the portal)
   ============================================================ */
.masthead {
  background: var(--violet-950);
  background-image: radial-gradient(circle at 95% -40%, rgba(227, 24, 125, .45), transparent 55%),
                    radial-gradient(circle at 0% 0%, rgba(106, 31, 184, .55), transparent 60%);
  color: #fff;
  padding: 16px 0 0;
  margin-bottom: 28px;
}
.masthead .wrap { padding-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brandmark { display: flex; align-items: center; gap: 12px; }
.hexmark {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--pink); border: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.brand { font-weight: 700; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; }
.brand span { display: block; font-weight: 400; font-size: 12px; color: rgba(255,255,255,.68); letter-spacing: .01em; margin-top: 1px; }
.who { text-align: right; font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.35; }
.who b { display: block; color: #fff; font-size: 14.5px; font-weight: 600; }
.linkout { background: none; border: none; color: rgba(255,255,255,.85); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.linkout:hover { color: #fff; }
.login-card .linkout { color: var(--violet-600, #5B2A86); font-weight: 600; }
.login-card .linkout:hover { color: var(--violet-500, #8b4fc7); }

/* ============================================================
   LOGIN - night violet canvas, giant title, ISO sign band
   ============================================================ */
.signstripe {
  height: 5px;
  background: linear-gradient(90deg, var(--sign-red) 0 25%, var(--sign-blue) 25% 50%, var(--sign-yellow) 50% 75%, var(--sign-green) 75% 100%);
}
.login-canvas .signstripe { position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 6px; }

.login-canvas {
  width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  min-height: 100vh;
  background: var(--violet-950);
  background-image:
    radial-gradient(ellipse 60% 70% at 100% 100%, rgba(227, 24, 125, .38), transparent 60%),
    radial-gradient(ellipse 55% 65% at 0% 0%, rgba(106, 31, 184, .65), transparent 60%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch; justify-content: center;
  padding: 72px 0 40px;
  margin-bottom: -90px;   /* cancel the page column's bottom padding so the canvas reaches the edge */
}
.login-inner {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: center;
}
.login-brand h1 {
  color: #fff; font-size: clamp(40px, 5vw, 65px); font-weight: 800;
  line-height: 1.02; letter-spacing: -.025em; margin-bottom: 22px;
}
.login-brand .tag {
  color: rgba(255,255,255,.76); font-size: 17px; line-height: 1.6; max-width: 44ch; margin-bottom: 40px;
}

/* the memorable element: the four sign families the training is built on */
.signband { list-style: none; display: flex; gap: 26px; flex-wrap: wrap; }
.signband li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.signband svg { width: 68px; height: 68px; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.signband span { color: rgba(255,255,255,.82); font-size: 13px; font-weight: 600; }
@keyframes signpop { from { opacity: 0; transform: translateY(14px) scale(.7); } to { opacity: 1; transform: none; } }
.signband li { animation: signpop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.signband li:nth-child(2) { animation-delay: .12s; }
.signband li:nth-child(3) { animation-delay: .24s; }
.signband li:nth-child(4) { animation-delay: .36s; }

.login-card {
  background: var(--card); border-radius: 26px; padding: 40px 36px 34px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 25px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 6px; }
.login-card .sub { color: var(--ink-2); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.login-card .btn-primary { margin-top: 4px; padding: 15px 20px; font-size: 16px; }

.login-logo {
  display: inline-flex; align-items: center; background: #fff; border-radius: 16px;
  padding: 12px 18px; margin-bottom: 28px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.login-logo img { height: 64px; width: auto; display: block; }
.login-credit {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.78); font-size: 14px; max-width: 44ch;
}
.login-credit b { color: #fff; font-weight: 600; }

/* inside the portal */
.logochip {
  display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 6px 10px; flex: none;
}
.logochip img { height: 26px; width: auto; display: block; }
.sitefoot {
  text-align: center; color: var(--ink-2); font-size: 13px; padding: 26px 16px 34px;
  border-top: 1px solid var(--rule); margin-top: -50px;
}
.sitefoot b { color: var(--violet-700); font-weight: 600; }
@media (max-width: 900px) {
  .login-canvas { padding: 46px 0 30px; justify-content: flex-start; }
  .login-inner { grid-template-columns: 1fr; gap: 30px; padding: 0 18px; }
  .login-brand h1 { font-size: clamp(34px, 10vw, 46px); margin-bottom: 14px; }
  .login-brand .tag { font-size: 14.5px; margin-bottom: 24px; }
  .signband { gap: 16px; }
  .signband svg { width: 48px; height: 48px; }
  .signband span { font-size: 11.5px; }
  .login-card { padding: 28px 22px; border-radius: 22px; }
  .login-credit { margin-top: 22px; font-size: 13px; }
  .login-logo { padding: 9px 13px; margin-bottom: 20px; border-radius: 13px; }
  .login-logo img { height: 44px; }
}

/* ============================================================
   Generic cards
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card.flush { padding: 0; overflow: hidden; }

h1 { font-size: 27px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 7px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.005em; margin-bottom: 10px; }
h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.sub { color: var(--ink-2); font-size: 14.5px; margin-bottom: 18px; }

/* ============================================================
   Forms
   ============================================================ */
label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=password] {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 15px;
  border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper);
  transition: border-color .15s ease, background .15s ease;
}
input:focus { outline: none; border-color: var(--violet-600); background: #fff; box-shadow: 0 0 0 4px rgba(106, 31, 184, .14); }
select {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 15px;
  border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper);
  color: var(--ink); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236e6580' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:focus { outline: none; border-color: var(--violet-500); background-color: #fff; box-shadow: 0 0 0 4px rgba(139, 79, 199, .13); }
.field { margin-bottom: 16px; }

button {
  font: inherit; font-weight: 600; cursor: pointer; font-size: 14.5px;
  border-radius: 10px; border: 1.5px solid transparent; padding: 13px 20px;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
button:active { transform: scale(.985); }
button:focus-visible { outline: 3px solid rgba(139, 79, 199, .45); outline-offset: 2px; }

.btn-primary {
  background: var(--pink); color: #fff; width: 100%; font-size: 15.5px;
  box-shadow: 0 8px 20px rgba(227, 24, 125, .30);
}
.btn-primary:hover:not(:disabled) { background: var(--pink-700); box-shadow: 0 10px 24px rgba(227, 24, 125, .38); }
.btn-primary:disabled { background: #c9c3d4; box-shadow: none; cursor: not-allowed; }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--rule-soft); }

.btn-go { background: var(--go); color: #fff; width: 100%; font-size: 15.5px; box-shadow: 0 6px 16px rgba(14, 143, 79, .28); }
.btn-go:disabled { background: #c9c3d4; box-shadow: none; cursor: not-allowed; }

/* ============================================================
   Messages
   ============================================================ */
.msg { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 15px; border-left: 4px solid; }
.msg.err { background: var(--stop-bg); border-color: var(--stop); color: #7f1e17; }
.msg.ok { background: var(--go-bg); border-color: var(--go); color: #0a5c33; }
.msg.info { background: #f1eaf9; border-color: var(--violet-500); color: #3f1f5c; }

.idpreview { margin-top: 7px; font-size: 13px; min-height: 18px; }
.idok { color: var(--go); font-weight: 600; }
.idwarn { color: var(--ink-3); }

/* ============================================================
   KPI strip — colored top edge, medium-compact sizing
   ============================================================ */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--violet-500);
  border-radius: 14px; padding: 16px 18px;
}
.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpi.kpi-violet { border-top-color: var(--violet-600); }
.kpi.kpi-violet b { color: var(--violet-600); }
.kpi b { display: block; font-size: 29px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.kpi small { color: var(--ink-2); font-size: 12px; }
.kpi.go { border-top-color: var(--go); }
.kpi.go b { color: var(--go); }
.kpi.wait { border-top-color: var(--wait); }
.kpi.wait b { color: var(--wait); }
@media (max-width: 820px) { .kpis { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   Training list — left status bar
   ============================================================ */
.tlist { list-style: none; }
.titem {
  border-bottom: 1px solid var(--rule-soft);
  padding: 18px 22px 18px 18px;
  border-left: 5px solid var(--violet-600);
  display: flex; gap: 16px; align-items: center;
}
.titem:last-child { border-bottom: none; }
.titem .meta { flex: 1; min-width: 0; }
.titem h3 { font-size: 17px; font-weight: 700; margin-bottom: 7px; }
.titem .tnote { font-size: 13px; color: var(--ink-2); margin-top: 7px; }
.titem .tnote .due { color: var(--wait); font-weight: 600; }
.pill { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.done { background: var(--go-bg); color: var(--go); }
.pill.wait { background: var(--wait-bg); color: var(--wait); }
.pill.pend { background: var(--wait-bg); color: var(--wait); }
.pill.fail { background: var(--stop-bg); color: var(--stop); }
.titem button { padding: 10px 18px; font-size: 13.5px; white-space: nowrap; }

/* ============================================================
   Step rail
   ============================================================ */
.rail { display: flex; gap: 6px; margin-bottom: 20px; }
.rail div {
  flex: 1; text-align: center; font-size: 11.5px; font-weight: 600; padding: 11px 4px;
  color: var(--ink-3); background: var(--card); border: 1px solid var(--rule); border-radius: 9px;
}
.rail div.on { background: var(--violet-950); color: #fff; border-color: transparent; box-shadow: inset 0 -3px 0 var(--pink); }
.rail div.past { background: #f1eaf9; color: var(--violet-600); border-color: transparent; }

/* ============================================================
   Training content — course-like, elevated section cards
   ============================================================ */
.seccard {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.sechead { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.secicon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, #f1eaf9, #e5d6f5);
  display: flex; align-items: center; justify-content: center;
}
.secicon svg { width: 24px; height: 24px; stroke: var(--violet-700); }
.seccard h3 { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.005em; margin-bottom: 0; }
.seccard .secnum { font-size: 13px; color: var(--ink-2); font-weight: 500; }

.pts { list-style: none; margin-top: 4px; }
.pts li { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 13px; font-size: 16px; line-height: 1.55; }
.ptmark {
  flex-shrink: 0; margin-top: 3px; width: 19px; height: 19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff;
}
.ptmark.yes { background: var(--go); }
.ptmark.no { background: var(--stop); }
.ptmark.neutral {
  width: 9px; height: 9px; margin: 8px 5px 0 5px; border-radius: 0;
  background: var(--violet-500); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.seccard p { font-size: 16px; }
.pts li.pthead {
  display: block; margin: 20px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule-soft);
  font-size: 14px; font-weight: 700; color: var(--violet-700);
}
.pts li.pthead:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pts b.lead { font-weight: 700; color: var(--ink); }

/* Section progress dots — replaces the old always-100% decorative bar with real pagination state */
.secdots { display: flex; gap: 7px; justify-content: center; margin: 4px 0 16px; }
.secdots span { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); transition: background .2s ease, transform .2s ease; }
.secdots span.past { background: var(--go); }
.secdots span.on { background: var(--violet-500); transform: scale(1.35); }

.navrow { display: flex; gap: 10px; margin-bottom: 12px; }
.navrow .btn-ghost { flex: 0 0 auto; }
.navrow .btn-primary { flex: 1; }

.scene {
  margin: 0 0 18px; height: 128px; border-radius: 14px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(229,181,103,.28), transparent 45%),
              linear-gradient(135deg, #2a1150 0%, #5B2A86 60%, #7134a8 100%);
  display: flex; align-items: center; justify-content: center;
}
.scene::before, .scene::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); }
.scene::before { width: 150px; height: 150px; left: -40px; bottom: -70px; }
.scene::after { width: 90px; height: 90px; right: 8%; top: -40px; }
.scene svg { position: relative; height: 112px; width: auto; max-width: 92%; }
.audiobar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -4px 0 16px; padding: 9px 12px; border-radius: 12px;
  background: #f6f0fc; border: 1px solid #e6d9f4;
}
.audiobar.off { color: var(--ink-2); font-size: 13px; gap: 8px; }
.audiobar.off svg { width: 18px; height: 18px; stroke: var(--ink-3); flex-shrink: 0; }
.audbtn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer;
  background: var(--violet-600); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: background .15s ease;
}
.audbtn:hover { background: var(--violet-700); }
.audbtn svg { flex: none; width: 18px; height: 18px; stroke: #fff; }
.audiobar.playing .audbtn { background: var(--stop); }
.vbars { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.vbars i { display: block; width: 3px; height: 5px; border-radius: 3px; background: var(--violet-500); opacity: .45; }
.audiobar.playing .vbars i { opacity: 1; background: #E5B567; animation: vbar .6s ease-in-out infinite; }
.audiobar.playing .vbars i:nth-child(2) { animation-delay: .15s; }
.audiobar.playing .vbars i:nth-child(3) { animation-delay: .3s; }
.audiobar.playing .vbars i:nth-child(4) { animation-delay: .45s; }
@keyframes vbar { 0%, 100% { height: 5px; } 50% { height: 18px; } }
.audiobar { flex-direction: column; align-items: stretch; gap: 10px; }
.aud-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aud-opts { gap: 8px 18px; padding-top: 8px; border-top: 1px dashed #e0d0f2; }
.audicon {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid #e0d0f2; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.audicon svg { width: 18px; height: 18px; stroke: var(--violet-600); }
.audbtn svg path[d^="M8 5.5"] { fill: #fff; }
.spdgroup { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #e0d0f2; border-radius: 999px; padding: 3px; }
.spdlabel { font-size: 12px; color: var(--ink-2); padding: 0 6px 0 8px; }
.spd { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 5px 9px; border-radius: 999px; cursor: pointer; }
.spd.on { background: var(--violet-600); color: #fff; }
.tapnote { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.autonote { font-size: 13px; font-weight: 600; color: var(--violet-700); background: #fff; border-radius: 8px; padding: 8px 12px; border: 1px solid #e0d0f2; }
.tapline { cursor: pointer; }
.tapline:hover { background: #faf6fe; border-radius: 10px; }
.autoread { margin-left: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.autoread input { width: 16px; height: 16px; accent-color: var(--violet-600); }
.qtext { display: flex; align-items: flex-start; gap: 10px; }
.qtext .qbody { flex: 1; }
.qaud {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e6d9f4;
  background: #f6f0fc; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; min-width: 34px; box-sizing: border-box;
}
.qaud svg { flex: none; width: 17px; height: 17px; stroke: var(--violet-600); }
.qaud.playing { background: var(--stop); border-color: var(--stop); }
.qaud.playing svg { stroke: #fff; }
.spdgroup.vmode { margin-left: 0; }
@media (max-width: 560px) { .autoread { width: 100%; } .spdgroup { margin-left: 0; } .tapnote { margin-left: 0; } }
.speaking { background: #fff3d6; border-radius: 10px; box-shadow: 0 0 0 6px #fff3d6; transition: background .2s ease, box-shadow .2s ease; }
.seccard h3.speaking, .qbody.speaking { box-shadow: 0 0 0 5px #fff3d6; }
.keypt.speaking { box-shadow: 0 0 0 3px #E5B567; }
.opt.speaking { background: #fff3d6; border-color: #E5B567; }
.shot { margin: 16px 0; }
.shot img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--rule); background: var(--rule-soft); }

.videowrap {
  position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
  border-radius: 12px; overflow: hidden; background: #000;
}
.videowrap iframe, .videowrap video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.shot figcaption { font-size: 12.5px; color: var(--ink-2); margin-top: 7px; }

.keypt {
  margin-top: 16px; padding: 16px 18px; background: linear-gradient(120deg, var(--wait-bg), #fdf5e6);
  border-left: 4px solid var(--wait); border-radius: 0 12px 12px 0; font-size: 15px; font-weight: 500;
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
}
.keypt svg { flex-shrink: 0; width: 20px; height: 20px; stroke: var(--wait); margin-top: 1px; }
.keypt div b { display: block; font-size: 13px; color: var(--wait); font-weight: 700; margin-bottom: 3px; }

.keyprompt {
  margin-top: 16px; padding: 13px 16px; background: var(--paper); border: 1.5px dashed var(--rule);
  border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--wait);
  display: flex; gap: 10px; align-items: center; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.keyprompt:hover { border-color: var(--wait); background: var(--wait-bg); }
.keyprompt svg { flex-shrink: 0; width: 18px; height: 18px; stroke: var(--wait); }

/* ============================================================
   Quiz
   ============================================================ */
.q { border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; margin-bottom: 15px; background: var(--card); box-shadow: var(--shadow-sm); }
.q .qtext { font-weight: 600; margin-bottom: 15px; font-size: 16.5px; }
.q .qnum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px; background: var(--violet-600); color: #fff;
  font-size: 12px; font-weight: 700; margin-right: 9px; vertical-align: middle;
}
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1.5px solid var(--rule); border-radius: 11px; margin-bottom: 9px; cursor: pointer; background: var(--paper); transition: border-color .12s ease, background .12s ease; }
.opt:hover { border-color: var(--violet-400); }
.opt input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--violet-600); }
.opt.sel { border-color: var(--violet-500); background: #f4eefb; }
.opt .k { font-weight: 700; margin-right: 3px; color: var(--violet-700); }

/* ============================================================
   Result
   ============================================================ */
.scorebox { text-align: center; padding: 34px 20px; border-radius: 20px; margin-bottom: 18px; }
.scorebox.pass { background: var(--go-bg); border: 1px solid var(--go); }
.scorebox.fail { background: var(--stop-bg); border: 1px solid var(--stop); }
.scorebox .big { font-size: 62px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.scorebox.pass .big { color: var(--go); }
.scorebox.fail .big { color: var(--stop); }
.scorebox .verdict { font-size: 21px; font-weight: 700; letter-spacing: .03em; margin-top: 7px; }
.scorebox p { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }

.ack { display: flex; gap: 12px; align-items: flex-start; padding: 17px; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 13px; margin-bottom: 16px; cursor: pointer; }
.ack input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--go); }
.ack span { font-size: 14.5px; }

/* ============================================================
   Completion
   ============================================================ */
.done-head { text-align: center; padding: 28px 0 20px; border-bottom: 2px solid var(--go); margin-bottom: 22px; }
.done-head .tick {
  width: 60px; height: 60px; margin: 0 auto 14px; background: var(--go-bg);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--go);
}
.done-head h2 { color: var(--go); }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; font-size: 14.5px; }
.dl dt { color: var(--ink-2); }
.dl dd { font-weight: 600; word-break: break-all; }

/* ============================================================
   Admin tables
   ============================================================ */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: var(--card); border: 1px solid var(--rule); color: var(--ink-2); padding: 11px 16px; font-size: 13.5px; }
.tabs button.on { background: var(--violet-950); color: #fff; border-color: var(--violet-950); box-shadow: inset 0 -3px 0 var(--pink); }

.langtabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.langlabel { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.langtabs button { background: var(--card); border: 1px solid var(--rule); color: var(--ink-2); padding: 8px 13px; font-size: 13px; font-weight: 500; border-radius: 999px; }
.langtabs button.on { background: var(--violet-600); color: #fff; border-color: transparent; font-weight: 600; }

.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; background: var(--violet-950); color: #fff; font-weight: 600; font-size: 12px;
  padding: 13px 15px; white-space: nowrap; position: sticky; top: 0;
}
td { padding: 12px 15px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
tbody tr:hover td { background: #faf7fd; }
tr:last-child td { border-bottom: none; }

.bar { height: 7px; background: var(--rule-soft); border-radius: 4px; overflow: hidden; min-width: 74px; margin-top: 5px; }
.bar i { display: block; height: 100%; background: var(--go); border-radius: 4px; }
.bar i.low { background: var(--stop); }
.bar i.mid { background: var(--wait); }

.searchbar { width: 100%; margin-bottom: 14px; }

/* ============================================================
   Colour system components: sign badges, chips, tones
   ============================================================ */
.tbadge { flex: none; width: 44px; height: 44px; display: block; }
.tbadge svg { width: 100%; height: 100%; display: block; }
.tbadge.lg { width: 52px; height: 52px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  background: var(--rule-soft); border-radius: 999px; padding: 4px 11px; line-height: 1.4;
}
.card > .chips { margin-top: 2px; }

.thead { border-top: 5px solid var(--violet-600); }
.thead-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.thead-row h1 { margin-bottom: 0; }
.thead .chips { margin-bottom: 14px; }

/* one tone per sign family: bar, category chip, icon tile, banner */
.tone-red    { --tone: var(--sign-red);    --tone-soft: #fde8e6; --tone-ink: #a3241b; }
.tone-blue   { --tone: var(--sign-blue);   --tone-soft: #e3eefc; --tone-ink: #0f4fa8; }
.tone-yellow { --tone: var(--sign-yellow); --tone-soft: #fff4cc; --tone-ink: #7a5500; }
.tone-green  { --tone: var(--sign-green);  --tone-soft: #dff5e9; --tone-ink: #08703f; }
.tone-violet { --tone: var(--violet-600);  --tone-soft: #efe6fb; --tone-ink: #4f1590; }
.titem[class*="tone-"] { border-left-color: var(--tone); }
.thead[class*="tone-"] { border-top-color: var(--tone); }
[class*="tone-"] .chip.cat { background: var(--tone-soft); color: var(--tone-ink); font-weight: 600; }
.secicon[class*="tone-"] { background: var(--tone-soft); }
.secicon[class*="tone-"] svg { stroke: var(--tone-ink); }

.scene.tone-red    { background: radial-gradient(circle at 85% 10%, rgba(255,200,120,.35), transparent 50%), linear-gradient(135deg, #7a1410, #E23A2E); }
.scene.tone-blue   { background: radial-gradient(circle at 85% 10%, rgba(140,200,255,.35), transparent 50%), linear-gradient(135deg, #0b2f6b, #1767D6); }
.scene.tone-yellow { background: radial-gradient(circle at 85% 10%, rgba(255,240,160,.40), transparent 50%), linear-gradient(135deg, #6b4500, #d99200); }
.scene.tone-green  { background: radial-gradient(circle at 85% 10%, rgba(170,255,210,.30), transparent 50%), linear-gradient(135deg, #064a2b, #0FA05A); }
.scene.tone-violet { background: radial-gradient(circle at 85% 10%, rgba(227,24,125,.40), transparent 50%), linear-gradient(135deg, #1E0B3A, #6A1FB8); }

/* Section video clip (replaces SVG scene banner when Video_ID is set) */
.scene-video {
  position: relative; border-radius: 16px; overflow: hidden;
  margin-bottom: 14px; background: #000; line-height: 0;
}
.scene-video video, .scene-video iframe {
  width: 100%; display: block; border-radius: 12px;
  max-height: 200px; object-fit: cover; border: none;
}
.vidc {
  font-size: 12px; color: var(--ink-2); text-align: center;
  padding: 6px 12px 8px; margin: 0; line-height: 0; background: #000;
}

/* ============================================================
   Misc
   ============================================================ */
.loading { text-align: center; padding: 60px 20px; color: var(--ink-2); font-size: 14.5px; }
.spin {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 3px solid var(--rule); border-top-color: var(--pink); border-radius: 50%;
  animation: sp .8s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } .signband li { animation: none; } * { transition: none !important; } }

.hint { font-size: 12.5px; color: var(--ink-2); margin-top: 11px; }
.row-actions { display: flex; gap: 8px; margin-top: 18px; }
.row-actions button { flex: 1; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); font-size: 14px; }

@media (max-width: 520px) {
  .brand { font-size: 15px; }
  .logochip img { height: 20px; }
  .brand span { font-size: 11px; }
  .who { font-size: 12px; max-width: 52%; }
  .who b { font-size: 13.5px; }
  .titem { flex-wrap: wrap; align-items: flex-start; }
  .titem .meta { flex: 1 1 calc(100% - 60px); }
  .titem .pill { margin-left: 60px; }
  .kpis-3 { grid-template-columns: repeat(3, 1fr); }
  .thead-row h1 { font-size: 22px; }
  .titem button { width: 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  h1 { font-size: 23px; }
  .seccard { padding: 20px 18px; }
}

