/* === VALODU PRASMJU TESTS (diag/) — jaunais dizains ===
   Krāsas un fonts kā zrkac.lv style.css */
:root {
  --navy: #0a2155; --red: #c8102e; --blue: #1a5cb0; --light-bg: #f4f6fa;
  --border: #dde3ee; --text: #2b2f38; --muted: #6b7280; --tag: #2e7d32;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; color: var(--text); background: var(--light-bg); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* galva */
.dg-top { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.dg-top-inner { max-width: 860px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dg-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 600; font-size: 15px; }
.dg-brand:hover { text-decoration: none; }
.dg-brand img { height: 40px; }

.dg-main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 28px 20px 40px; }
.dg-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 20px 26px; }

/* kartīte */
.dg-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 30px 34px; box-shadow: 0 4px 20px rgba(10, 33, 85, .05); margin-bottom: 18px; }
.dg-kicker { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.dg-card h1 { font-size: 26px; font-weight: 600; color: #111; line-height: 1.3; margin-bottom: 14px; }
.dg-card h2 { font-size: 18px; font-weight: 600; color: #111; margin: 4px 0 8px; }
.dg-text { font-size: 15px; line-height: 1.75; }
.dg-text p { margin-bottom: 10px; }
.dg-lead { font-size: 15.5px; color: var(--muted); margin-bottom: 22px; max-width: 600px; }
.dg-muted { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.dg-muted.small { font-size: 12.5px; margin: 14px 0 0; }
.dg-back { display: inline-block; font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* pogas */
.dg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  background: var(--blue); color: #fff; border: 2px solid var(--blue);
  border-radius: 9px; padding: 12px 26px; cursor: pointer; transition: background .15s;
}
.dg-btn:hover { background: #154c94; text-decoration: none; }
.dg-btn.ghost { background: #fff; color: var(--blue); }
.dg-btn.ghost:hover { background: #eef2fa; }
.dg-intro form { margin-top: 22px; }
.dg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.dg-actions.center { justify-content: center; }

/* valodas izvēle */
.dg-langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dg-lang { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dg-lang:hover { text-decoration: none; border-color: var(--blue); box-shadow: 0 6px 18px rgba(26, 92, 176, .12); transform: translateY(-2px); }
.dg-lang-code { width: 44px; height: 32px; border: 2px solid var(--blue); border-radius: 7px; color: var(--blue); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.dg-lang-name { font-size: 18px; font-weight: 600; color: #111; }
.dg-lang-go { font-size: 13px; font-weight: 600; color: var(--blue); }

/* taimeris */
.dg-timer { display: flex; align-items: center; gap: 10px; background: #eef2fa; border-radius: 30px; padding: 6px 16px; font-size: 12.5px; color: var(--muted); }
.dg-timer strong { font-size: 17px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.dg-timer.warn { background: #fdecee; }
.dg-timer.warn strong { color: var(--red); }

/* testa galva + progress */
.dg-test-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 6px; }
.dg-test-head h1 { margin-bottom: 0; }
.dg-steps { display: flex; align-items: center; gap: 5px; }
.dg-steps span { width: 26px; height: 6px; border-radius: 4px; background: var(--border); }
.dg-steps span.done { background: var(--tag); }
.dg-steps span.now { background: var(--blue); }
.dg-steps em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }

/* jautājumi */
.dg-q { padding: 20px 0; border-bottom: 1px solid #eef0f4; }
.dg-q-instr { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.dg-q-row { display: flex; align-items: flex-start; gap: 12px; }
.dg-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: #eef2fa; color: var(--blue); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dg-sent { font-size: 15.5px; line-height: 2.1; padding-top: 0; }
.dg-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-opts.dg-indent { margin: 8px 0 0 40px; }
.dg-opt { position: relative; cursor: pointer; }
.dg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.dg-opt span { display: inline-block; font-size: 14.5px; font-weight: 500; border: 1.5px solid var(--border); border-radius: 8px; padding: 6px 16px; background: #fff; transition: all .12s; }
.dg-opt:hover span { border-color: var(--blue); color: var(--blue); }
.dg-opt input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.dg-opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.dg-gap { font-family: inherit; font-size: 15px; font-weight: 600; color: var(--blue); text-align: center; border: none; border-bottom: 2px solid var(--blue); background: #f4f7fd; border-radius: 4px 4px 0 0; padding: 1px 6px; margin: 0 6px; outline: none; min-width: 70px; }
.dg-gap[readonly] { cursor: default; }
.dg-gap-in:focus { background: #e3ecfa; }

/* rezultāts */
.dg-result { display: flex; gap: 18px; align-items: flex-start; border-left: 4px solid var(--tag); }
.dg-result-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #e8f5e9; color: var(--tag); font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dg-done { text-align: center; }
.dg-done .dg-result-icon { margin: 0 auto 14px; width: 60px; height: 60px; font-size: 28px; }

/* forma */
.dg-form textarea { width: 100%; font-family: inherit; font-size: 14.5px; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 10px 0 24px; resize: vertical; outline: none; }
.dg-form textarea:focus, .dg-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 92, 176, .12); }
.dg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.dg-field span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.dg-field em { color: var(--red); font-style: normal; }
.dg-field input { width: 100%; font-family: inherit; font-size: 14.5px; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; outline: none; }
.dg-field.is-err input { border-color: var(--red); background: #fff7f8; }
.dg-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin-bottom: 8px; cursor: pointer; }
.dg-check input { margin-top: 4px; accent-color: var(--blue); width: 16px; height: 16px; flex-shrink: 0; }

/* paziņojumi */
.dg-msg { border-radius: 10px; padding: 12px 18px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.dg-msg-err { background: #fdecee; color: var(--red); }
.dg-msg-ok { background: #e8f5e9; color: var(--tag); }
.dg-msg-info { background: #eef2fa; color: var(--navy); }

/* progresa josla (apakšā) */
body { padding-bottom: 70px; }
.dg-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  display: flex; gap: 4px; background: var(--navy); padding: 6px; border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none;
}
.dg-bar::-webkit-scrollbar { display: none; }
.dg-bar span { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .5); border-radius: 20px; padding: 7px 12px; white-space: nowrap; cursor: default; }
.dg-bar span.done { color: rgba(255, 255, 255, .85); }
.dg-bar span.on { background: #fff; color: var(--navy); }

@media (max-width: 640px) {
  .dg-bar span:not(.on) { font-size: 0; padding: 7px 5px; }
  .dg-bar span:not(.on)::before { content: ''; display: block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
  .dg-bar span.done::before { background: #6fcf97; }
  .dg-bar { align-items: center; }

  .dg-card { padding: 22px 18px; border-radius: 12px; }
  .dg-card h1 { font-size: 21px; }
  .dg-main { padding: 18px 12px 30px; }
  .dg-brand span { font-size: 13px; }
  .dg-brand img { height: 32px; }
  .dg-fields { grid-template-columns: 1fr; }
  .dg-opts.dg-indent { margin-left: 0; }
  .dg-actions .dg-btn { width: 100%; }
  .dg-timer span { display: none; }
}


/* tikai līmeņa nosaukums — trekns, sarkans */
.dg-result .dg-limenis { color: #e3171f !important; font-weight: 700; }

/* rezultāta lodziņš — tikai tik plats un augsts, cik vajag tekstam */
.dg-result { align-items: center; padding-top: 18px; padding-bottom: 18px; }
.dg-result .dg-text p { margin: 0; }
.dg-result .dg-text br:last-child { display: none; }