/* v26 hard-merge: site.css + quiz.css */

/* site.css = base.css + styles.css (unified site base for homepage and quiz shells) */

:root{
  --tt-navy:#102a56;
  --tt-navy-2:#17376d;
  --tt-magenta:#c2187a;
  --tt-magenta-2:#e4007c;
  --tt-bg:#f5f6fa;
  --tt-card:#ffffff;
  --tt-border:#e4e8f0;
  --tt-text:#1f2d3d;
  --tt-muted:#5f6c80;
  --tt-link:#17376d;

  --tt-wrap:1100px;
  --tt-header-gap:22px;
  --tt-header-pad-y:14px;
  --tt-header-pad-x:20px;
  --tt-brand-col-w:230px;
  --tt-brand-logo-w:200px;
  --tt-brand-caption-bottom:28px;
  --tt-brand-caption-color:#7c86a0;
  --tt-brand-caption-font:.74rem;
  --tt-brand-caption-letter:.085em;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scrollbar-gutter:stable;}

body{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--tt-bg);
  color:var(--tt-text);
  line-height:1.45;
}

.wrap{
  max-width:var(--tt-wrap);
  margin:0 auto;
  padding:0 var(--tt-header-pad-x);
}

.site-header{
  background:#fff;
  border-bottom:1px solid var(--tt-border);
  box-shadow:0 1px 0 rgba(16,42,86,.02);
}

.top-accent{
  height:6px;
  background:linear-gradient(90deg,var(--tt-magenta-2),var(--tt-magenta),#8f2f8d 65%,var(--tt-navy-2));
}

.site-header .header-inner,
.header.site-header .header-inner{
  display:flex;
  align-items:flex-start;
  gap:var(--tt-header-gap);
  padding:var(--tt-header-pad-y) var(--tt-header-pad-x);
}

.brand-logo-link{
  display:block;
  position:relative;
  text-decoration:none;
  line-height:0;
  flex:0 0 var(--tt-brand-col-w);
  width:var(--tt-brand-col-w);
  margin-top:2px;
}
.brand-logo-link:focus-visible{
  outline:2px solid var(--tt-magenta-2);
  outline-offset:4px;
  border-radius:8px;
}

.brand-logo{
  display:block;
  width:var(--tt-brand-logo-w);
  height:auto !important;
  max-width:none;
  background:transparent;
  border-radius:0;
  margin:0 auto;
  flex:0 0 auto;
}

.brand-logo-caption{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:var(--tt-brand-caption-bottom);
  margin:0;
  padding:0;
  color:var(--tt-brand-caption-color) !important;
  font-weight:600;
  font-size:var(--tt-brand-caption-font);
  letter-spacing:var(--tt-brand-caption-letter);
  text-transform:uppercase;
  line-height:1.05;
  white-space:nowrap;
  pointer-events:none;
}

.brand-text{min-width:0}
.brand-text h1{
  margin:0;
  color:var(--tt-navy);
  font-size:1.45rem;
  line-height:1.2;
  font-weight:800;
}
.brand-text p{
  margin:8px 0 0;
  color:var(--tt-muted);
  font-size:.95rem;
}

@media (max-width: 860px){
  html{scrollbar-gutter:auto;}
}

@media (max-width: 640px){
  :root{
    --tt-header-gap:14px;
    --tt-header-pad-y:12px;
    --tt-header-pad-x:16px;
    --tt-brand-col-w:160px;
    --tt-brand-logo-w:132px;
    --tt-brand-caption-bottom:18px;
    --tt-brand-caption-font:.60rem;
    --tt-brand-caption-letter:.07em;
  }
  .site-header .header-inner,
  .header.site-header .header-inner{
    align-items:flex-start;
  }
  .brand-logo-link{margin-top:1px;}
  .brand-text h1{font-size:1.15rem;}
}


/* Shared card primitive for homepage and quiz shells */
.panel-card{background:var(--tt-card);border:1px solid var(--tt-border);border-radius:12px;box-shadow:0 2px 10px rgba(16,42,86,.04);}

/* ===== Homepage layer ===== */

.site-header{margin-bottom:22px;}

.brand-text{padding-top:1px;}
.brand-kicker{
  color:var(--tt-magenta);
  font-weight:700;
  font-size:.88rem;
  letter-spacing:.02em;
  margin-bottom:4px;
}
.brand-editor{
  margin:8px 0 0;
  color:var(--tt-muted);
  font-size:.95rem;
}
.brand-editor-label{
  color:var(--tt-navy);
  font-weight:700;
}
.brand-authors{
  margin:6px 0 0;
  color:var(--tt-muted);
  font-size:.78rem;
  line-height:1.35;
  max-width:980px;
}
.brand-authors-label{
  color:var(--tt-navy);
  font-weight:600;
}

.toc-card,.requisites-card{
  background:var(--tt-card);
  border:1px solid var(--tt-border);
  border-radius:12px;
  box-shadow:0 2px 10px rgba(16,42,86,.04);
  margin-bottom:18px;
}
.requisites-card{
  background:#fbfcff;
  box-shadow:none;
}

.section-head{
  padding:14px 18px;
  border-bottom:1px solid var(--tt-border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.section-head h2{
  margin:0;
  color:var(--tt-navy);
  font-size:1.08rem;
  font-weight:700;
}
.section-head-compact{padding:8px 14px;}
.section-head-compact h2{
  margin:0;
  font-size:.90rem;
  font-weight:700;
  color:var(--tt-navy);
}

.toc-list{
  list-style:none;
  margin:0;
  padding:6px 12px 10px;
}
.toc-item{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:12px 8px;
  border-radius:10px;
}
.toc-item + .toc-item{margin-top:2px}
.toc-item:hover{background:#fafbfe}

.item-badge{
  width:34px;height:34px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background:#f3f4f9;color:var(--tt-navy);
  font-weight:700;font-size:.9rem;
  border:1px solid var(--tt-border);
}
.item-main{min-width:0}
.item-title{
  color:var(--tt-link);
  text-decoration:none;
  font-weight:700;
  line-height:1.25;
}
.item-title:hover{text-decoration:underline}
.item-title.disabled{color:#6b7280;text-decoration:none;cursor:default}
.item-meta{
  margin-top:5px;
  color:var(--tt-muted);
  font-size:.86rem;
}

.item-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.item-actions:empty{display:none}
.action-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  border:1px solid var(--tt-border);
  background:#fff;
  color:var(--tt-link);
  text-decoration:none;
  font-size:.84rem;
  font-weight:600;
  padding:6px 11px;
  white-space:nowrap;
}
.action-link:hover{background:#f8f9fd}
.action-pdf{border-color:#dbe2ef;}
.action-quiz{
  border-color:#f1d3e5;
  background:#fff7fb;
  color:#9f1766;
}
.action-quiz:hover{background:#fff0f8}
.action-link.is-muted{color:#7b8496;background:#fafbfc;}

.part-divider{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:center;
  gap:14px;
  padding:14px 8px 8px;
  margin-top:4px;
}
.part-divider .part-line{display:none}
.part-divider .part-label{
  grid-column:2;
  justify-self:start;
  font-weight:800;
  font-size:.92rem;
  letter-spacing:.01em;
  border-radius:8px;
  padding:6px 10px;
  background:#f5f0f7;
  border:1px solid #e2d6e8;
  color:#17376d;
}
.part-divider.part-i .part-label,
.part-divider.part-ii .part-label{
  background:#f5f0f7;
  border-color:#e2d6e8;
  color:#17376d;
}

.req-list{
  margin:0;
  padding:4px 14px 10px;
  font-size:.82rem;
  line-height:1.28;
}
.req-row{
  display:grid;
  grid-template-columns:245px minmax(0,1fr);
  gap:10px;
  padding:4px 0;
  border-bottom:1px solid #eef1f6;
}
.req-row:last-child{border-bottom:none}
.req-row dt{
  margin:0;
  color:var(--tt-navy);
  font-weight:600;
  font-size:.80rem;
}
.req-row dd{
  margin:0;
  color:var(--tt-text);
  font-size:.80rem;
  line-height:1.28;
}
.req-row-version dt,
.req-row-version dd{color:var(--tt-muted);}

@media (max-width: 860px){
  .toc-item{grid-template-columns:40px minmax(0,1fr);align-items:start}
  .item-actions{grid-column:2;justify-content:flex-start}
}
@media (max-width: 640px){
  .brand-authors{font-size:.74rem;line-height:1.32;}
  .req-row{grid-template-columns:1fr;gap:4px}
}


/* --- quiz.css merged below --- */

/* quiz.css = quiz-core.css + quiz-theme.css (quiz engine components + TalTech shell/theme) */

/* Shared quiz tokens and base body styling for all chapter quiz pages */
:root{
  --navy:#1A2857;
  --navy-deep:#0D1A3E;
  --teal:#00B4C8;
  --teal-light:#00D4E8;
  --magenta:#E4007C;
  --white:#FFFFFF;
  --off-white:#F4F7FC;
  --grey:#8892A4;
  --correct:#00C27A;
  --incorrect:#E4007C;
  --border:#DEE4F0;
}

body{
  font-family:"DM Sans",sans-serif;
  background:var(--off-white);
  color:var(--navy);
  min-height:100vh;
}

/* Shared quiz base components extracted from chapter quiz files.
   Chapter-specific visuals remain inline in each chapter HTML. */

.header{
    background: var(--navy-deep);
    padding: 0;
    position: relative;
    overflow: hidden;
  }.header::after{
    content: "";
    position: absolute;
    bottom: -40px; right: -40px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: var(--magenta);
    opacity: 0.15;
  }.header-inner{
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    gap: 0;
  }.header-logo-block{
    background: linear-gradient(135deg, var(--teal) 0%, #0080B8 100%);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }.header-content{
    padding: 22px 32px;
    flex: 1;
  }.chapter-tag{
    display: inline-block;
    background: rgba(0,180,200,0.2);
    border: 1px solid rgba(0,180,200,0.4);
    color: var(--teal-light);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 8px;
  }.header-title{
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    line-height: 1.2;
  }.header-subtitle{
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    margin-top: 5px;
    font-weight: 300;
  }.progress-bar-wrap{
    background: rgba(255,255,255,0.08);
    height: 3px;
    width: 100%;
  }.progress-bar-fill{
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--magenta));
    transition: width 0.5s ease;
  }.main{
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 20px 60px;
  }.question-card{
    background: var(--white);
    border-radius: 12px;
    border: 1.5px solid var(--border);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s;
  }.question-card:hover{
    box-shadow: 0 4px 24px rgba(26,40,87,0.08);
  }.question-card.answered-correct{
    border-color: var(--correct);
    box-shadow: 0 0 0 3px rgba(0,194,122,0.1);
  }.question-card.answered-wrong{
    border-color: var(--incorrect);
    box-shadow: 0 0 0 3px rgba(228,0,124,0.1);
  }.question-header{
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
  }.q-number{
    width: 32px; height: 32px;
    background: var(--navy);
    color: var(--white);
    border-radius: 8px;
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
  }.q-text{
    font-size: 0.97rem;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    color: var(--navy);
  }.q-type-badge{
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    flex-shrink: 0;
    margin-top: 3px;
  }.badge-multi{
    background: rgba(0,180,200,0.12);
    color: var(--teal);
    border: 1px solid rgba(0,180,200,0.3);
  }.badge-single{
    background: rgba(26,40,87,0.08);
    color: var(--navy);
    border: 1px solid rgba(26,40,87,0.15);
  }.options-list{
    padding: 14px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }.option-label{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--navy);
    position: relative;
    background: var(--white);
    user-select: none;
  }.option-label:hover{
    background: rgba(0,180,200,0.05);
    border-color: var(--teal);
  }.option-label.selected{
    background: rgba(0,180,200,0.08);
    border-color: var(--teal);
  }.option-label.correct-ans{
    background: rgba(0,194,122,0.1) !important;
    border-color: var(--correct) !important;
    color: #005C3A;
  }.option-label.wrong-selected{
    background: rgba(228,0,124,0.08) !important;
    border-color: var(--incorrect) !important;
    color: var(--magenta);
  }.option-label.missed-correct{
    background: rgba(0,194,122,0.07) !important;
    border-color: var(--correct) !important;
  }.option-icon{
    margin-left: auto;
    font-size: 1rem;
    flex-shrink: 0;
  }.feedback-block{
    display: none;
    margin: 0 22px 18px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
  }.feedback-block.correct{
    background: rgba(0,194,122,0.1);
    border: 1px solid rgba(0,194,122,0.3);
    color: #005C3A;
  }.feedback-block.incorrect{
    background: rgba(228,0,124,0.07);
    border: 1px solid rgba(228,0,124,0.25);
    color: #8B0050;
  }.submit-area{
    text-align: center;
    margin: 32px 0 20px;
  }.btn{
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 14px 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
  }.btn-primary{
    background: linear-gradient(135deg, var(--magenta), #B5005E);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(228,0,124,0.3);
  }.btn-primary:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(228,0,124,0.4);
  }.btn-reset{
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(26,40,87,0.2);
    margin-left: 14px;
  }.btn-reset:hover{
    background: var(--navy-deep);
    transform: translateY(-2px);
  }.results-panel{
    display: none;
    background: var(--white);
    border-radius: 14px;
    border: 1.5px solid var(--border);
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(26,40,87,0.1);
  }.results-panel.visible{ display: block; }.score-ring{
    width: 120px; height: 120px;
    margin: 0 auto 20px;
    position: relative;
  }.score-ring svg{
    width: 100%; height: 100%;
    transform: rotate(-90deg);
  }.score-ring circle{
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
  }.ring-bg{ stroke: var(--border); }.ring-fill{ stroke: var(--teal); transition: stroke-dashoffset 1s ease; }.score-text{
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
  }.score-num{
        font-weight: 800;
    font-size: 1.8rem;
    color: var(--navy);
    line-height: 1;
  }.score-den{
    font-size: 0.75rem;
    color: var(--grey);
    font-weight: 400;
  }.results-title{
        font-weight: 700;
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 6px;
  }.results-subtitle{
    color: var(--grey);
    font-size: 0.88rem;
    margin-bottom: 20px;
  }.score-bar-row{
    display: flex;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
  }.score-pill{
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
  }.pill-correct{
    background: rgba(0,194,122,0.1);
    border: 1px solid rgba(0,194,122,0.3);
    color: #005C3A;
  }.pill-wrong{
    background: rgba(228,0,124,0.07);
    border: 1px solid rgba(228,0,124,0.25);
    color: #8B0050;
  }.pill-num{
        font-weight: 800;
    font-size: 1.4rem;
    display: block;
  }.submitted .option-label{
    pointer-events: none;
  }@media (max-width: 600px) {.header-inner{ flex-direction: column; }.header-logo-block{ padding: 16px 22px; }.header-content{ padding: 16px 22px; }.question-header{ flex-wrap: wrap; gap: 10px; }}

/* ===== Quiz shell/theme layer ===== */

/* Unified quiz shell + component overrides (paired with assets/base.css) */

body.ttdh-quiz{
  background:var(--tt-bg) !important;
  color:var(--tt-text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
}

/* ===== top back bar ===== */
body.ttdh-quiz .ttdh-backbar{
  background:#ffffff;
  border-bottom:1px solid #e4e8f0;
  padding:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-size:.92rem;
}
body.ttdh-quiz .ttdh-backbar-inner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 20px;
}
body.ttdh-quiz .ttdh-backlink{
  color:#17376d;
  text-decoration:none;
  font-weight:600;
}
body.ttdh-quiz .ttdh-backlink:hover{text-decoration:underline}
body.ttdh-quiz .ttdh-backsep{color:#98a2b3}
body.ttdh-quiz .ttdh-backlabel{color:#5f6c80}

/* ===== shared header shell using same base classes as homepage ===== */
body.ttdh-quiz .header.site-header{
  margin-bottom:0;
  box-shadow:0 1px 0 rgba(16,42,86,.02);
}
body.ttdh-quiz .header.site-header::after{display:none !important}
body.ttdh-quiz .header.site-header .header-inner{
  max-width:var(--tt-wrap);
  margin:0 auto;
  padding:0; /* .wrap supplies horizontal padding; children set own paddings */
  gap:0;
  align-items:flex-start !important;
}
body.ttdh-quiz .header-logo-block{
  background:transparent !important;
  padding:14px 18px !important;
  border-right:1px solid #eef1f6;
  min-width:var(--tt-brand-col-w);
  flex:0 0 var(--tt-brand-col-w);
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
body.ttdh-quiz .ttdh-logo-link.brand-logo-link{
  width:var(--tt-brand-col-w);
  flex-basis:var(--tt-brand-col-w);
  margin-top:2px;
}
body.ttdh-quiz .ttdh-logo-image.brand-logo{
  width:var(--tt-brand-logo-w) !important;
  max-width:none !important;
  height:auto !important;
}
body.ttdh-quiz .ttdh-logo-caption.brand-logo-caption{
  bottom:28px;
}
body.ttdh-quiz .header-content{
  padding:14px 20px !important;
  flex:1 1 auto;
  min-width:0;
}
body.ttdh-quiz .chapter-tag{
  background:#fff3fa !important;
  border-color:#f2d6e8 !important;
  color:#9f1766 !important;
  letter-spacing:1.3px !important;
}
body.ttdh-quiz .header-title{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  color:#102a56 !important;
  font-size:1.35rem !important;
  font-weight:800 !important;
}
body.ttdh-quiz .header-subtitle{
  color:#5f6c80 !important;
}
body.ttdh-quiz .progress-bar-wrap{
  background:#f1f4fa !important;
}
body.ttdh-quiz .progress-bar-fill{
  background:linear-gradient(90deg,#17376d,#e4007c) !important;
}

/* ===== main content ===== */
body.ttdh-quiz .main{
  max-width:980px !important;
  padding-top:18px !important;
}
body.ttdh-quiz .results-panel,
body.ttdh-quiz .question-card,
body.ttdh-quiz .chapter-intro{
  border-color:#e4e8f0 !important;
  box-shadow:0 2px 10px rgba(16,42,86,.04) !important;
}
body.ttdh-quiz .question-card:hover{
  box-shadow:0 4px 18px rgba(16,42,86,.06) !important;
}
body.ttdh-quiz .q-number{
  background:#17376d !important;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
}
body.ttdh-quiz .q-text,
body.ttdh-quiz .results-title,
body.ttdh-quiz .score-num{
  color:#102a56 !important;
}
body.ttdh-quiz .badge-multi{
  background:#fff3fa !important;
  color:#9f1766 !important;
  border-color:#f2d6e8 !important;
}
body.ttdh-quiz .badge-single{
  background:#f4f7fd !important;
  color:#17376d !important;
  border-color:#dde6f5 !important;
}
body.ttdh-quiz .option-label:hover{
  background:#f7f9fe !important;
  border-color:#b9c8e5 !important;
}
body.ttdh-quiz .option-label.selected{
  background:#f4f7fd !important;
  border-color:#9db3df !important;
}
body.ttdh-quiz .btn{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  border-radius:999px !important;
}
body.ttdh-quiz .btn-primary{
  background:#e4007c !important;
  box-shadow:none !important;
}
body.ttdh-quiz .btn-primary:hover{
  transform:none !important;
  box-shadow:none !important;
  background:#c2187a !important;
}
body.ttdh-quiz .btn-reset{
  background:#17376d !important;
  box-shadow:none !important;
}
body.ttdh-quiz .btn-reset:hover{
  background:#102a56 !important;
  transform:none !important;
}

/* ===== footer ===== */
body.ttdh-quiz .ttdh-footer{
  margin-top:26px;
  border-top:1px solid #e4e8f0;
  background:#fff;
}
body.ttdh-quiz .ttdh-footer-inner{
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
body.ttdh-quiz .ttdh-footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
body.ttdh-quiz .ttdh-footer-logo-link.brand-logo-link{
  width:92px;
  flex:0 0 92px;
  margin-top:0;
}
body.ttdh-quiz .ttdh-footer-logo.brand-logo{
  width:78px;
}
body.ttdh-quiz .ttdh-footer-logo-caption.brand-logo-caption{
  bottom:12px;
  font-size:.56rem;
  letter-spacing:.05em;
  color:#7c86a0 !important;
}
body.ttdh-quiz .ttdh-footer-text{
  color:#5f6c80;
  font-size:.88rem;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* ===== responsive ===== */
@media (max-width: 700px){
  body.ttdh-quiz .ttdh-footer-inner{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width: 600px){
  body.ttdh-quiz .ttdh-backbar-inner{
    padding:8px 16px;
    font-size:.86rem;
    gap:8px;
    flex-wrap:wrap;
  }
  body.ttdh-quiz .header.site-header .header-inner{
    align-items:flex-start !important;
  }
  body.ttdh-quiz .header-logo-block{
    border-right:none;
    border-bottom:1px solid #eef1f6;
    min-width:170px;
    flex:0 0 170px;
    padding:12px 14px !important;
  }
  body.ttdh-quiz .ttdh-logo-link.brand-logo-link{
    width:160px;
    flex-basis:160px;
  }
  body.ttdh-quiz .ttdh-logo-image.brand-logo{
    width:132px !important;
  }
  body.ttdh-quiz .ttdh-logo-caption.brand-logo-caption{
    bottom:18px;
    font-size:.60rem;
    letter-spacing:.07em;
  }
  body.ttdh-quiz .header-content{
    padding:12px 14px !important;
  }
  body.ttdh-quiz .ttdh-footer-inner{
    padding:10px 14px;
  }
}


/* v21 structural alignment with homepage */
body.ttdh-quiz .ttdh-backbar{font-size:.88rem;}
body.ttdh-quiz .ttdh-backbar-inner{padding:7px var(--tt-header-pad-x);}
body.ttdh-quiz .header.site-header .header-inner{min-height:0;}
body.ttdh-quiz .header-content{padding-top:var(--tt-header-pad-y) !important;padding-bottom:var(--tt-header-pad-y) !important;}
body.ttdh-quiz .main.wrap{padding-left:var(--tt-header-pad-x) !important;padding-right:var(--tt-header-pad-x) !important;}
body.ttdh-quiz .results-panel, body.ttdh-quiz .question-card, body.ttdh-quiz .chapter-intro{border-radius:12px !important;}


/* ===== Unified footer component (homepage + quiz pages) ===== */
:root{
  --tt-footer-logo-w: 78px;
  --tt-footer-gap: 10px;
}

.site-footer,
body.ttdh-quiz .ttdh-footer{
  margin-top:26px;
  border-top:1px solid #e4e8f0;
  background:#fff;
}

.site-footer .site-footer-inner,
body.ttdh-quiz .ttdh-footer-inner{
  max-width:1100px;
  margin:0 auto;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.site-footer .site-footer-brand,
body.ttdh-quiz .ttdh-footer-brand{
  display:flex;
  align-items:center;
  gap:var(--tt-footer-gap);
  min-width:0;
}

.site-footer .site-footer-logo-link.brand-logo-link,
body.ttdh-quiz .ttdh-footer-logo-link.brand-logo-link{
  display:inline-block;
  width:auto !important;
  flex:0 0 auto !important;
  position:relative !important;
  line-height:0;
  margin-top:0 !important;
  text-decoration:none;
}

.site-footer .site-footer-logo.brand-logo,
body.ttdh-quiz .ttdh-footer-logo.brand-logo{
  width:var(--tt-footer-logo-w) !important;
  height:auto !important;
  max-width:none !important;
  margin:0 !important;
  display:block;
}

.site-footer .site-footer-logo-caption.brand-logo-caption,
body.ttdh-quiz .ttdh-footer-logo-caption.brand-logo-caption{
  position:absolute !important;
  left:50% !important;
  bottom:calc(var(--tt-footer-logo-w) * 0.16) !important;
  transform:translateX(-50%) !important;
  margin:0 !important;
  padding:0 !important;
  color:#7c86a0 !important;
  font-weight:600;
  font-size:calc(var(--tt-footer-logo-w) * 0.072);
  letter-spacing:.06em;
  text-transform:uppercase;
  line-height:1;
  white-space:nowrap;
  pointer-events:none;
}

.site-footer .site-footer-text,
body.ttdh-quiz .ttdh-footer-text{
  color:#5f6c80;
  font-size:.88rem;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  line-height:1.25;
}

@media (max-width: 700px){
  .site-footer .site-footer-inner,
  body.ttdh-quiz .ttdh-footer-inner{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width: 640px){
  :root{
    --tt-footer-logo-w: 66px;
    --tt-footer-gap: 8px;
  }
  .site-footer .site-footer-inner,
  body.ttdh-quiz .ttdh-footer-inner{
    padding:10px 14px;
  }
  .site-footer .site-footer-text,
  body.ttdh-quiz .ttdh-footer-text{
    font-size:.82rem;
  }
}


/* footer caption pulled into logo canvas to avoid oversized transparent logo padding */


/* ===== v26.3 fixes: force white quiz headers + remove footer logo caption text ===== */
body.ttdh-quiz .header,
body.ttdh-quiz .header.site-header,
body.ttdh-quiz .ttdh-site-header{
  background:#fff !important;
  background-image:none !important;
  border-bottom:1px solid #e4e8f0 !important;
  box-shadow:0 1px 0 rgba(16,42,86,.02) !important;
}
body.ttdh-quiz .header::before,
body.ttdh-quiz .header::after,
body.ttdh-quiz .header.site-header::before,
body.ttdh-quiz .header.site-header::after,
body.ttdh-quiz .ttdh-site-header::before,
body.ttdh-quiz .ttdh-site-header::after{
  content:none !important;
  display:none !important;
  background:none !important;
}
body.ttdh-quiz .header .header-inner,
body.ttdh-quiz .ttdh-site-header .header-inner,
body.ttdh-quiz .ttdh-site-header .ttdh-header-inner{
  background:transparent !important;
  align-items:flex-start !important;
}
body.ttdh-quiz .header-logo-block,
body.ttdh-quiz .ttdh-site-header .header-logo-block{
  background:transparent !important;
}
body.ttdh-quiz .header-content{
  background:transparent !important;
}
body.ttdh-quiz .header-title{color:#102a56 !important;}
body.ttdh-quiz .header-subtitle{color:#5f6c80 !important;}

/* Remove footer caption text under logo in all footers (homepage + quizzes) */
.site-footer .site-footer-logo-caption,
body.ttdh-quiz .ttdh-footer-logo-caption{
  display:none !important;
}


/* ===== Footer partner logos (EKI + HTM) ===== */
.footer-partners{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-left:auto;min-width:0;}
.footer-partner-logo{display:block;width:auto;max-width:100%;height:auto;object-fit:contain;}
.footer-partner-logo-htm{height:36px;}
.footer-partner-logo-eki{height:40px;}
@media (max-width: 700px){.footer-partners{width:100%;margin-left:0;justify-content:flex-end;align-self:stretch;gap:12px;}.footer-partner-logo-htm{height:30px;}.footer-partner-logo-eki{height:34px;}}
