/*
Theme Name: Istorijai.lt
Theme URI: https://istorijai.lt
Author: Istorijai.lt
Description: Lengva, greita ir saugi istorijai.lt tema. Be priklausomybių nuo WPLMS ar jQuery. Sukurta pagal 2026 m. patvirtintą maketą.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: istorijai
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root{
  --paper:#F2F7FB; --surface:#FFFFFF; --surface-2:#E8F1F8;
  --ink:#0E2637; --ink-soft:#4A6A83; --ink-faint:#4E687E;
  --azure:#0090E0; --azure-deep:#00699F; --azure-wash:#E3F2FC;
  --rule:#D2E1EC; --rule-soft:#E4EDF4;
  --ok:#0E7C5A; --ok-wash:#E4F5EE; --warn:#9A5B00; --bad:#B3261E; --bad-wash:#FBE9E7;
  --btn-fg:#FFFFFF; --tip-bg:#0E2637; --tip-fg:#F2F7FB; --tip-rule:#0E2637;
  --shadow:0 1px 2px rgba(14,38,55,.06), 0 8px 24px -16px rgba(14,38,55,.28);
  --display:"Cinzel","Times New Roman",serif;
  --body:"Open Sans",-apple-system,"Segoe UI",Roboto,sans-serif;
  --measure:76ch;
  --t-2xs:.8125rem; --t-xs:.875rem; --t-sm:.9375rem; --t-base:1rem;
  --t-md:1.0625rem; --t-lg:1.1875rem; --t-xl:1.375rem; --t-2xl:1.75rem;
  --t-h1:clamp(1.65rem,3.2vw,2.25rem); --t-h1-lg:clamp(1.8rem,4vw,2.5rem);
}
/* Light is the default. Dark is opt-in via the header toggle and remembered per browser. */
:root[data-theme="dark"]{
  --paper:#14222E; --surface:#1C303F; --surface-2:#25404F;
  --ink:#E8F1F7; --ink-soft:#AAC2D3; --ink-faint:#8099AC;
  --azure:#4FB8F2; --azure-deep:#93D6FB; --azure-wash:#22404F;
  --rule:#2E4B5E; --rule-soft:#25404F;
  --ok:#57C9A0; --ok-wash:#1E3D38; --warn:#E0AC5C; --bad:#F28B82; --bad-wash:#3E2A2C;
  --btn-fg:#0B1D27; --tip-bg:#25404F; --tip-fg:#E8F1F7; --tip-rule:#3D6076;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px -16px rgba(0,0,0,.8);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{font-size:106.25%;-webkit-text-size-adjust:100%;scroll-behavior:smooth;color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);
     line-height:1.65;-webkit-font-smoothing:antialiased;overflow-wrap:break-word}
a{color:var(--azure-deep);text-decoration:none}
a:hover{color:var(--azure)}
:focus-visible{outline:2px solid var(--azure);outline-offset:2px;border-radius:2px}
[hidden]{display:none!important}
img,video{max-width:100%;height:auto}
iframe{max-width:100%}
h1,h2,h3,h4{text-wrap:balance;margin:0;line-height:1.25}
table{border-collapse:collapse;width:100%}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link{position:absolute;left:-999px;top:0;z-index:100;background:var(--azure-deep);color:#fff;padding:.6rem 1rem}
.skip-link:focus{left:1rem;top:1rem;color:#fff}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.site{max-width:1180px;margin:0 auto;padding:0 1.25rem}
.tnum{font-variant-numeric:tabular-nums}
.eyebrow{font-family:var(--display);font-size:var(--t-2xs);font-weight:600;
  letter-spacing:.22em;text-transform:uppercase;color:var(--ink-faint);margin:0 0 .6rem}
.era-chip{display:inline-flex;align-items:center;gap:.4rem;font-size:var(--t-2xs);font-weight:600;
  letter-spacing:.08em;text-transform:uppercase;color:var(--azure-deep);
  background:var(--azure-wash);border-radius:3px;padding:.22rem .5rem}
.btn{display:inline-block;background:var(--azure-deep);color:var(--btn-fg);font-weight:600;
  font-size:var(--t-sm);padding:.5rem .9rem;border-radius:5px;border:0;cursor:pointer;font-family:inherit}
.btn:hover{background:var(--ink);color:var(--paper)}
.btn.ghost{background:transparent;color:var(--azure-deep);border:1px solid var(--rule)}
.btn.ghost:hover{border-color:var(--azure);background:var(--azure-wash);color:var(--azure-deep)}

/* ==========================================================================
   3. Header + navigation
   ========================================================================== */
.top{background:var(--surface);border-bottom:1px solid var(--rule);position:relative;z-index:40}
.top-in{max-width:1180px;margin:0 auto;padding:.9rem 1.25rem;display:flex;align-items:center;gap:1rem}
.brand{display:flex;align-items:center;flex:0 0 auto}
.brand img{height:58px;width:auto;display:block}
.brand .logo-dark,[data-theme="dark"] .brand .logo-light{display:none}
[data-theme="dark"] .brand .logo-dark{display:block}
.brand .brand-text{font-family:var(--display);font-weight:600;letter-spacing:.12em;color:var(--azure-deep);font-size:var(--t-lg)}

.nav-toggle{display:none;margin-left:auto;background:transparent;border:1px solid var(--rule);
  border-radius:5px;padding:.45rem .6rem;cursor:pointer;color:var(--ink)}
.nav-toggle svg{display:block}

nav.main{margin-left:auto}
nav.main ul{list-style:none;margin:0;padding:0}
nav.main > ul{display:flex;gap:.1rem;flex-wrap:wrap;justify-content:flex-end}
nav.main li{position:relative}
nav.main a{display:block;padding:.4rem .55rem;border-radius:4px;font-size:var(--t-xs);font-weight:600;
  color:var(--ink-soft);white-space:nowrap}
nav.main a:hover,nav.main li:focus-within > a{background:var(--azure-wash);color:var(--azure-deep)}
/* Only the exact current item, and only at top level: pages like Šapoka are linked from
   every era dropdown, so ancestor highlighting would light up all three. */
nav.main > ul > li.current-menu-item > a{color:var(--azure-deep);background:var(--azure-wash)}
nav.main .sub-menu .current-menu-item > a{color:var(--azure-deep);font-weight:600}
nav.main .menu-item-has-children > a::after{content:"";display:inline-block;width:.45em;height:.45em;
  margin-left:.4em;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:translateY(-.15em) rotate(45deg);opacity:.7}
/* dropdowns */
nav.main .sub-menu{position:absolute;top:100%;left:0;min-width:15rem;background:var(--surface);
  border:1px solid var(--rule);border-radius:6px;box-shadow:var(--shadow);padding:.4rem;
  opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .12s,transform .12s;z-index:50}
nav.main .sub-menu .sub-menu{top:-.4rem;left:100%;margin-left:.25rem}
/* invisible bridge over the gap, so the pointer can cross from the item to its flyout without closing it */
nav.main .sub-menu .sub-menu::before{content:"";position:absolute;top:0;bottom:0;left:-.6rem;width:.6rem}
nav.main .sub-menu .menu-item-has-children{position:relative}
nav.main li:hover > .sub-menu,nav.main li:focus-within > .sub-menu,nav.main li.open > .sub-menu{
  opacity:1;visibility:visible;transform:none}
nav.main .sub-menu a{font-weight:500;white-space:normal;padding:.45rem .6rem}
nav.main .sub-menu .menu-item-has-children > a::after{transform:translateY(-.1em) rotate(-45deg)}

.site-search{display:flex;align-items:center;gap:.5rem;background:var(--paper);
  border:1px solid var(--rule);border-radius:5px;padding:.4rem .65rem;flex:0 1 200px;min-width:130px}
.site-search input{border:0;background:transparent;color:var(--ink);font:inherit;font-size:var(--t-sm);width:100%;outline:none;min-width:0}
.site-search svg{flex:0 0 auto;color:var(--ink-faint)}
.site-search button{display:none}
.theme-toggle{flex:0 0 auto;background:transparent;border:1px solid var(--rule);border-radius:5px;
  width:2.2rem;height:2.2rem;display:grid;place-items:center;color:var(--ink-soft);cursor:pointer}
.theme-toggle:hover{color:var(--azure-deep);border-color:var(--azure)}
.theme-toggle .moon,[data-theme="dark"] .theme-toggle .sun{display:none}
[data-theme="dark"] .theme-toggle .moon{display:block}

@media (max-width:1100px){
  nav.main > ul{justify-content:flex-start}
}
@media (max-width:820px){
  .top-in{flex-wrap:wrap;gap:.75rem}
  .nav-toggle{display:inline-flex}
  .site-search{order:5;flex:1 1 100%}
  nav.main{order:6;flex:1 1 100%;margin:0;display:none}
  nav.main.open{display:block}
  nav.main > ul{flex-direction:column;gap:0}
  nav.main a{white-space:normal;padding:.6rem .5rem;border-bottom:1px solid var(--rule-soft);border-radius:0}
  nav.main .sub-menu,nav.main .sub-menu .sub-menu{position:static;opacity:1;visibility:visible;transform:none;
    border:0;box-shadow:none;padding:0 0 0 1rem;margin:0;min-width:0;background:transparent;display:none}
  nav.main li.open > .sub-menu{display:block}
  nav.main .menu-item-has-children > a::after{float:right;margin-top:.5em}
}

/* ==========================================================================
   4. Breadcrumbs, bylines
   ========================================================================== */
.crumbs,.rank-math-breadcrumb{font-size:var(--t-xs);color:var(--ink-faint);padding:1.1rem 0 .2rem}
.crumbs{display:flex;gap:.45rem;flex-wrap:wrap;align-items:center}
.crumbs a,.rank-math-breadcrumb a{color:var(--ink-soft)}
.crumbs [aria-current],.rank-math-breadcrumb .last{color:var(--ink)}
.crumbs .sep,.rank-math-breadcrumb .separator{color:var(--rule);margin:0 .35rem}
.byline{font-size:var(--t-xs);color:var(--ink-faint);display:flex;gap:.9rem;flex-wrap:wrap;
  padding-bottom:1.1rem;border-bottom:1px solid var(--rule-soft);margin-bottom:1.4rem;font-variant-numeric:tabular-nums}

/* ==========================================================================
   5. Home
   ========================================================================== */
.hero{padding:2.6rem 0 .5rem;max-width:var(--measure)}
.hero h1{font-size:var(--t-h1);font-weight:300;letter-spacing:-.01em}
.hero h1 strong{font-weight:700;color:var(--azure-deep)}
.hero p{color:var(--ink-soft);margin:.9rem 0 0;font-size:var(--t-md);line-height:1.65}
.hero-home{max-width:none;display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:3rem 4rem;align-items:center}
.hero-home > div{max-width:var(--measure)}
.figs{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem 2rem;margin:0;padding:1.4rem 1.6rem;list-style:none;
  background:var(--surface);border:1px solid var(--rule);border-radius:6px;box-shadow:var(--shadow)}
.figs li{font-size:var(--t-sm);color:var(--ink-soft)}
.figs b{display:block;font-size:var(--t-2xl);font-weight:700;color:var(--ink);line-height:1.1;margin-bottom:.15rem}
@media (max-width:900px){.hero-home{grid-template-columns:1fr;gap:1.6rem}.figs{margin-top:.4rem}}
@media (max-width:420px){.figs{grid-template-columns:1fr;gap:1rem}}

.spine{margin:2.4rem 0 3rem}
.eras{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;list-style:none;padding:0;margin:0}
.era{background:var(--surface);border:1px solid var(--rule);border-radius:6px;
  padding:1.1rem 1rem 1.15rem;display:flex;flex-direction:column;gap:.55rem;
  box-shadow:var(--shadow);transition:border-color .15s,transform .15s}
.era:hover{border-color:var(--azure);transform:translateY(-2px)}
.era img{width:60px;height:60px;align-self:flex-start}
.era h2{font-family:var(--display);font-size:var(--t-base);font-weight:600;letter-spacing:.05em}
.era h2 a{color:var(--ink)}
.era .span{font-size:var(--t-2xs);color:var(--ink-faint);letter-spacing:.04em;font-variant-numeric:tabular-nums}
.era p{margin:0;font-size:var(--t-sm);color:var(--ink-soft);line-height:1.6}
.era .go{margin-top:auto;padding-top:.6rem;font-size:var(--t-xs);font-weight:600;color:var(--azure-deep)}

.deck{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin:0 0 3rem}
.card{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:1.25rem 1.3rem 1rem;display:flex;flex-direction:column;gap:.7rem;box-shadow:var(--shadow)}
.card .era-chip{align-self:flex-start}
.card h3{font-size:var(--t-lg);font-weight:700;line-height:1.3}
.card h3 a{color:var(--ink)}
.card h3 a:hover{color:var(--azure-deep)}
.card p{margin:0;font-size:var(--t-base);line-height:1.6;color:var(--ink-soft);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card-foot{margin-top:auto;padding-top:.8rem;border-top:1px solid var(--rule-soft);display:flex;justify-content:space-between;align-items:baseline;gap:1rem;
  font-size:var(--t-xs);color:var(--ink-faint);font-variant-numeric:tabular-nums}
.card-foot a{font-weight:600;color:var(--azure-deep)}
.anchor-alias{display:block;height:0}

.home-tabs{margin:0 0 3rem}
.home-tabs .entry-content{font-size:var(--t-base)}
.home-intro{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:3.5rem;align-items:start;
  margin:0 0 3rem;padding:2.2rem 0 0;border-top:1px solid var(--rule)}
.home-intro h2{font-size:var(--t-xl);font-weight:600;margin-bottom:.8rem}
.home-intro .lede{font-size:var(--t-lg);line-height:1.6;color:var(--ink-soft);margin:0 0 1.6rem}
.home-intro .intro-body{font-size:var(--t-md)}
.home-intro .intro-body p{line-height:1.8}
.home-intro .intro-body p:last-child{margin-bottom:0}
.sponsor{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin:0;font-size:var(--t-xs);color:var(--ink-faint)}
@media (max-width:820px){.home-intro{grid-template-columns:1fr;gap:1.2rem}}
.sponsor img{height:40px;width:auto;opacity:.85}
.sponsor a:hover img{opacity:1}

@media (max-width:900px){.eras{grid-template-columns:repeat(2,1fr)}.deck{grid-template-columns:1fr}}
@media (max-width:640px){
  .eras{grid-template-columns:1fr}
  .era{flex-direction:row;align-items:flex-start;gap:1rem;flex-wrap:wrap}
  .era img{width:48px;height:48px}
  .era .txt{flex:1 1 12rem}
}

/* ==========================================================================
   6. Article (konspektas, page)
   ========================================================================== */
.layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:3.5rem;align-items:start;padding-bottom:3rem}
.layout.wide{grid-template-columns:minmax(0,1fr);max-width:none}
article.entry{max-width:var(--measure);font-size:var(--t-md)}
.layout.wide article.entry{max-width:none}
.entry h1.entry-title{font-size:var(--t-h1);font-weight:300;margin:.15rem 0 1.1rem;letter-spacing:-.01em}
.entry-content h2{font-size:var(--t-xl);font-weight:600;margin:2.1rem 0 .7rem;scroll-margin-top:1rem}
.entry-content h3{font-size:var(--t-lg);font-weight:600;margin:1.7rem 0 .55rem;scroll-margin-top:1rem}
.entry-content h4{font-size:var(--t-base);font-weight:700;margin:1.4rem 0 .5rem}
.entry-content p{margin:0 0 1.15rem;line-height:1.8}
.entry-content ul,.entry-content ol{padding-left:1.4rem;margin:0 0 1.15rem}
.entry-content li{margin:.25rem 0}
.entry-content img{border-radius:4px}
/* the round site icon is used as a bullet before main konspektai on index pages */
.entry-content li > img[src*="favicona"]{width:1.15em;height:1.15em;border-radius:50%;vertical-align:-.2em;margin-right:.35em;
  display:inline-block;border:1px solid var(--rule)}
.entry-content li > img[src*="favicona"] + a{font-weight:600}
.entry-content figure{margin:1.4rem 0}
.entry-content figcaption,.entry-content .wp-caption-text{font-size:var(--t-xs);color:var(--ink-faint);margin-top:.4rem}
.entry-content .wp-caption{max-width:100%}
.entry-content .alignright{float:right;margin:.3rem 0 1rem 1.4rem;max-width:45%}
.entry-content .alignleft{float:left;margin:.3rem 1.4rem 1rem 0;max-width:45%}
.entry-content .aligncenter{display:block;margin:1rem auto}
.entry-content .table-wrap{overflow-x:auto;margin:0 0 1.4rem;-webkit-overflow-scrolling:touch}
.entry-content table{font-size:var(--t-sm);margin:0;width:100%}
.entry-content .table-wrap > table{margin:0}
.entry-content th,.entry-content td{padding:.5rem .7rem;border:1px solid var(--rule);vertical-align:top;text-align:left}
.entry-content th{background:var(--surface-2);font-weight:600}
.entry-content blockquote{margin:1.6rem 0;padding:.2rem 0 .2rem 1.15rem;border-left:2px solid var(--azure);color:var(--ink-soft);font-style:italic}
.entry-content blockquote cite{display:block;font-style:normal;font-size:var(--t-xs);color:var(--ink-faint);margin-top:.5rem}
.entry-content hr{border:0;border-top:1px solid var(--rule);margin:1.8rem 0}
.entry-content iframe{display:block;max-width:100%}
/* embedded documents (Google viewer via [su_document]) get a real reading height */
.entry-content iframe.su-document,.entry-content .su-document iframe,.entry-content iframe[src*="docs.google.com/viewer"]{width:100%;height:80vh;min-height:640px;border:1px solid var(--rule);border-radius:6px}
.entry-content .lede{font-size:var(--t-lg);line-height:1.72;color:var(--ink-soft)}
@media (max-width:640px){.entry-content .alignright,.entry-content .alignleft{float:none;margin:1rem auto;max-width:100%;display:block}}

/* Text Hover glossary terms: functional marker, kept */
abbr.c2c-text-hover,abbr[title]{text-decoration:none;border-bottom:1px dotted var(--azure);cursor:help}
abbr.c2c-text-hover:hover{background:var(--azure-wash);color:var(--azure-deep)}

/* [avatar:url]...[/avatar] portrait chip */
.avatarpop{position:relative;display:inline;border-bottom:1px solid var(--rule);color:var(--ink);font-weight:600;cursor:pointer}
.avatarpop:hover,.avatarpop:focus-within,.avatarpop.open{border-bottom-color:var(--azure);color:var(--azure-deep)}
.avatarpop img{position:absolute;left:0;top:calc(100% + 6px);width:auto;max-width:180px;max-height:220px;
  border:1px solid var(--rule);border-radius:6px;background:var(--surface);box-shadow:var(--shadow);
  z-index:30;display:none;pointer-events:none}
.avatarpop:hover img,.avatarpop:focus-within img,.avatarpop.open img{display:block}
.avatarpop a{color:inherit}

/* 56 textbook plates were hot-linked from kk.convdocs.org, which is gone. Until they are replaced
   from Wikimedia, show the caption as a quiet placeholder rather than a broken-image icon. */
.entry-content img[src*="kk.convdocs.org"]{display:none}
.entry-content .wp-caption:has(img[src*="kk.convdocs.org"]){background:var(--surface-2);border:1px dashed var(--rule);
  border-radius:6px;padding:.7rem .9rem;max-width:18rem}
.entry-content .wp-caption:has(img[src*="kk.convdocs.org"]) .wp-caption-text::before{content:"Iliustracija: ";color:var(--ink-faint)}
/* Sources block */
.source{margin:2.6rem 0 0;padding:1.1rem 1.2rem;background:var(--surface);border:1px solid var(--rule);
  border-radius:6px;font-size:var(--t-xs);color:var(--ink-soft)}
.source h2{font-family:var(--display);font-size:var(--t-2xs);letter-spacing:.2em;text-transform:uppercase;
  color:var(--ink-faint);font-weight:600;margin:0 0 .6rem}
.source p{margin:0}
.source cite{font-style:normal;font-weight:600;color:var(--ink);font-size:var(--t-sm)}
.source dl{display:grid;grid-template-columns:auto 1fr;gap:.25rem .9rem;margin:.7rem 0 0}
.source dt{color:var(--ink-faint)}
.source dd{margin:0;font-variant-numeric:tabular-nums}

/* Sidebar / rail */
aside.rail{position:sticky;top:1rem;font-size:var(--t-sm)}
.rail .toc ol{list-style:none;margin:.5rem 0 0;padding:0;border-left:1px solid var(--rule)}
.rail .toc ol ol{border:0;padding-left:.8rem}
.rail .toc a{display:block;padding:.32rem 0 .32rem .85rem;color:var(--ink-soft);margin-left:-1px;border-left:1px solid transparent}
.rail .toc a:hover{color:var(--azure-deep);border-left-color:var(--azure)}
.rail .toc a.active{color:var(--azure-deep);font-weight:600;border-left-color:var(--azure)}
.rail .widget{margin-top:1.8rem}
.rail .widget_title{font-family:var(--display);font-size:var(--t-2xs);letter-spacing:.2em;text-transform:uppercase;
  color:var(--ink-faint);font-weight:600;margin:0 0 .7rem}
.rail .widget ul{list-style:none;margin:0;padding:0}
.rail .widget li{padding:.3rem 0;border-bottom:1px solid var(--rule-soft)}
.rail .widget img{border-radius:6px;border:1px solid var(--rule);display:block}
.rail .widget .su-frame{display:block;margin:0 0 .9rem}
.rail .widget .su-frame-inner{padding:0;border:0;background:transparent}
.social-card{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:1rem 1.1rem}
.social-page{display:flex;align-items:center;gap:.8rem;color:var(--ink);margin-bottom:.9rem}
.social-page img{border-radius:50%;border:1px solid var(--rule);flex:0 0 auto}
.social-page b{display:block;font-size:var(--t-base)}
.social-page small{display:block;font-size:var(--t-xs);color:var(--ink-soft);line-height:1.4}
.social-links{display:flex;flex-direction:column;gap:.45rem}
.social-links .btn{text-align:center;font-size:var(--t-xs)}
/* if a Facebook iframe widget is kept anyway, at least stop it overflowing the rail */
.rail .widget iframe{max-width:100%}
@media (max-width:900px){
  .layout{grid-template-columns:1fr;gap:2rem}
  aside.rail{position:static;border-top:1px solid var(--rule);padding-top:1.4rem}
}

.hero-center{max-width:var(--measure);margin:0 auto;text-align:center}
.books{list-style:none;margin:0 auto 4rem;padding:0;max-width:960px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.4rem}
.book{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:1.4rem;display:flex;gap:1.4rem;align-items:flex-start;box-shadow:var(--shadow);transition:border-color .15s,transform .15s}
.book:hover{border-color:var(--azure);transform:translateY(-2px)}
.book > a{flex:0 0 120px;width:120px}
.book img{display:block;width:100%;height:170px;object-fit:cover;object-position:top;border-radius:3px;border:1px solid var(--rule)}
.book > div{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;min-height:170px}
.book h2{font-size:var(--t-lg);font-weight:700;line-height:1.3;margin-bottom:.4rem}
.book h2 a{color:var(--ink)}
.book h2 a:hover{color:var(--azure-deep)}
.book p{margin:0;font-size:var(--t-sm);color:var(--ink-soft);line-height:1.55}
.book .n{margin-top:auto;padding-top:.8rem;font-size:var(--t-sm);font-weight:600;color:var(--azure-deep)}
@media (max-width:640px){.books{grid-template-columns:1fr}.book{padding:1.1rem;gap:1rem}.book > a{flex-basis:96px;width:96px}.book img{height:136px}.book > div{min-height:0}}

/* ==========================================================================
   7. Sąvoka + glossary
   ========================================================================== */
.def{max-width:var(--measure);padding-bottom:1rem}
.def h1{font-family:var(--display);font-size:var(--t-h1-lg);font-weight:600;letter-spacing:.02em;margin:.4rem 0 .1rem}
.def .pron{font-size:var(--t-xs);color:var(--ink-faint);margin-bottom:1.1rem}
.def .body{font-size:var(--t-lg);line-height:1.72;padding:1.1rem 0 1.3rem;border-top:2px solid var(--azure);border-bottom:1px solid var(--rule)}
.def .body p:last-child{margin-bottom:0}
.rel{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:1.6rem;padding:1.5rem 0 2.5rem;max-width:var(--measure)}
.rel h2{font-size:var(--t-xs);letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint);font-weight:700;margin-bottom:.6rem}
.rel ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem;font-size:var(--t-sm)}
.rel .tags{display:flex;flex-wrap:wrap;gap:.4rem}

.jump{display:flex;flex-wrap:wrap;gap:.15rem;padding:1rem 0 1.4rem;border-bottom:1px solid var(--rule);margin-bottom:1.6rem}
.jump a{font-size:var(--t-xs);font-weight:600;padding:.28rem .5rem;border-radius:4px;color:var(--ink-soft);min-width:1.9rem;text-align:center}
.jump a:hover{background:var(--azure-wash);color:var(--azure-deep)}
.jump a.off{color:var(--ink-faint);opacity:.55;pointer-events:none}
.gloss{columns:2;column-gap:3rem;padding-bottom:3rem}
.gloss dl{margin:0;break-inside:avoid}
.gloss .letter{font-family:var(--display);font-size:var(--t-lg);font-weight:600;color:var(--azure-deep);letter-spacing:.1em;
  padding:.3rem 0;border-bottom:1px solid var(--rule);margin:1.4rem 0 .8rem;break-after:avoid;scroll-margin-top:1rem}
.gloss dt{font-weight:600;font-size:var(--t-base);margin-top:.85rem}
.gloss dd{margin:.15rem 0 0;font-size:var(--t-sm);color:var(--ink-soft);line-height:1.6}
@media (max-width:900px){.gloss{columns:1}}

/* ==========================================================================
   8. Archive / search lists, 404
   ========================================================================== */
.list{list-style:none;margin:0;padding:0 0 2rem}
.list li{padding:1.2rem 0;border-bottom:1px solid var(--rule-soft);display:flex;gap:1.2rem;align-items:flex-start}
.list li > div{min-width:0;flex:1 1 auto}
.list .thumb-link{order:2;flex:0 0 132px;width:132px;height:92px;overflow:hidden;border-radius:5px;border:1px solid var(--rule);margin-top:.2rem;background:var(--surface-2)}
.list .thumb{width:100%;height:100%;object-fit:cover;display:block;border-radius:0}
@media (max-width:480px){.list .thumb-link{flex-basis:72px;width:72px;height:54px}}
.list h2{font-size:var(--t-lg);font-weight:600;margin-top:.15rem}
.list h2 a{color:var(--ink)}
.list p{margin:.4rem 0 0;color:var(--ink-soft);font-size:var(--t-base);line-height:1.6}
.pagination{display:flex;gap:.3rem;flex-wrap:wrap;padding:1rem 0 3rem}
.pagination .page-numbers{padding:.4rem .7rem;border:1px solid var(--rule);border-radius:4px;font-size:var(--t-sm);color:var(--ink-soft)}
.pagination .current{background:var(--azure-deep);color:var(--btn-fg);border-color:var(--azure-deep)}
.notice{max-width:var(--measure);background:var(--surface);border:1px solid var(--rule);border-left:3px solid var(--warn);
  border-radius:5px;padding:1rem 1.1rem;margin:0 0 2rem;font-size:var(--t-base);line-height:1.65;color:var(--ink-soft)}
.notice b{color:var(--ink);display:block;margin-bottom:.3rem;font-size:var(--t-base)}

/* ==========================================================================
   9. Footer
   ========================================================================== */
footer.site-foot{border-top:1px solid var(--rule);background:var(--surface);margin-top:2rem}
.foot-in{max-width:1180px;margin:0 auto;padding:2.6rem 1.25rem 1.4rem;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem}
.foot-col h2{font-family:var(--display);font-size:var(--t-2xs);font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:.85rem}
.foot-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}
.foot-col a{font-size:var(--t-sm);color:var(--ink-soft)}
.foot-col a:hover{color:var(--azure-deep)}
.foot-bar{max-width:1180px;margin:0 auto;padding:1.2rem 1.25rem 2.2rem;border-top:1px solid var(--rule-soft);display:flex;gap:1.5rem;flex-wrap:wrap;align-items:baseline;font-size:var(--t-xs);color:var(--ink-faint)}
.foot-bar .c{font-variant-numeric:tabular-nums}
.foot-bar nav{display:flex;gap:1.4rem;flex-wrap:wrap;margin-left:auto}
.foot-bar nav ul{list-style:none;margin:0;padding:0;display:flex;gap:1.4rem;flex-wrap:wrap}
.foot-bar nav a{color:var(--ink-soft)}
.foot-bar nav a:hover{color:var(--azure-deep)}
@media (max-width:820px){.foot-in{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.8rem}}
@media (max-width:520px){.foot-in{grid-template-columns:1fr}}

/* ==========================================================================
   10. Re-implemented shortcodes
   ========================================================================== */
details.sc-expand{border:1px solid var(--rule);border-radius:6px;background:var(--surface);margin:0 0 1rem;padding:0}
details.sc-expand > summary{cursor:pointer;padding:.7rem 1rem;font-weight:600;color:var(--azure-deep);list-style:none;display:flex;align-items:center;gap:.6rem}
details.sc-expand > summary::-webkit-details-marker{display:none}
details.sc-expand > summary::before{content:"";width:.5em;height:.5em;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s;flex:0 0 auto}
details.sc-expand[open] > summary::before{transform:rotate(45deg)}
details.sc-expand > .sc-expand-body{padding:.2rem 1rem 1rem}
.sc-agroup{margin:0 0 1rem}
.sc-divider{clear:both;height:0;margin:1.2rem 0;border-top:1px solid var(--rule-soft)}
.sc-divider--clear{border:0;margin:.6rem 0}
.sc-heading{font-size:var(--t-xl);font-weight:600;margin:2rem 0 .7rem}
.sc-divider-text{display:flex;align-items:center;gap:.8rem;font-size:var(--t-sm);font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-faint);margin:1.8rem 0 .8rem}
.sc-divider-text::after{content:"";flex:1;border-top:1px solid var(--rule)}
.sc-divider-text--center::before{content:"";flex:1;border-top:1px solid var(--rule)}
.sc-alert{padding:.9rem 1.1rem;border-radius:6px;margin:0 0 1.2rem;border:1px solid var(--rule);background:var(--surface-2);line-height:1.65}
.sc-alert p:last-child{margin-bottom:0}
.sc-alert--info{border-left:3px solid var(--azure)}
.sc-alert--success{border-left:3px solid var(--ok)}
.sc-alert--warning{border-left:3px solid var(--warn)}
.sc-alert--danger{border-left:3px solid #B3261E}
.sc-sep{border:0;border-top:1px solid var(--rule-soft);margin:1rem 0}
.sc-dbox{padding:1rem 1.2rem;border:1px solid var(--rule);border-radius:6px;background:var(--surface);box-shadow:var(--shadow);margin:0 0 1.2rem}
.sc-docs{list-style:none;margin:0 0 1.2rem;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.6rem}
.sc-docs li a{display:flex;align-items:center;gap:.6rem;padding:.6rem .8rem;border:1px solid var(--rule);border-radius:6px;background:var(--surface);color:var(--ink);font-size:var(--t-sm)}
.sc-docs li a:hover{border-color:var(--azure);color:var(--azure-deep)}
.sc-docs .ext{font-size:var(--t-2xs);font-weight:700;letter-spacing:.06em;color:var(--ink-faint);text-transform:uppercase;flex:0 0 auto}

/* ==========================================================================
   11. Compatibility: Shortcodes Ultimate, Watu, misc plugins
   ========================================================================== */
.entry-content .su-tabs{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:0}
.entry-content .su-tabs-nav{background:var(--surface-2);border-bottom:1px solid var(--rule);padding:.4rem .4rem 0}
.entry-content .su-tabs-nav span{background:transparent;color:var(--ink-soft);border-radius:4px 4px 0 0;font-weight:600}
.entry-content .su-tabs-nav span.su-tabs-current{background:var(--surface);color:var(--azure-deep)}
.entry-content .su-tabs-panes{padding:1rem 1.1rem}
/* SU leaves inactive panes display:block at a fixed height and sizes the container to the first
   pane only, so the rest spill over what follows. Tie visibility to SU's own state class. */
.entry-content .su-tabs{height:auto!important;display:flex;flex-direction:column}
.entry-content .su-tabs-pane{display:none!important}
.entry-content .su-tabs-pane.su-tabs-pane-open{display:block!important;height:auto!important;overflow:visible!important}
/* content marks these vertical="yes"; a tab strip across the top reads better than an empty side column */
.entry-content .su-tabs-nav,.entry-content .su-tabs-vertical .su-tabs-nav{width:auto!important;float:none!important;
  display:flex;flex-wrap:wrap;gap:.25rem;padding:.5rem .5rem 0;border-right:0;border-bottom:1px solid var(--rule)}
.entry-content .su-tabs-nav span{display:block;float:none;margin:0;padding:.55rem .9rem;border-radius:5px 5px 0 0;
  font-size:var(--t-sm);font-weight:600;color:var(--ink-soft);background:transparent;border:1px solid transparent;border-bottom:0;cursor:pointer}
.entry-content .su-tabs-nav span:hover{color:var(--azure-deep)}
.entry-content .su-tabs-nav span.su-tabs-current{background:var(--surface);color:var(--azure-deep);border-color:var(--rule);margin-bottom:-1px}
.entry-content .su-tabs-panes,.entry-content .su-tabs-vertical .su-tabs-panes{width:100%!important;float:none!important;min-width:0}
.entry-content .su-tabs-collapsed .su-tabs-panes{display:none}
.entry-content .su-tabs-nav > span[hidden]{display:none!important}
/* SU paints panels white and boxes with inline colours; bring all of it onto the palette so dark mode works */
.entry-content .su-tabs,.entry-content .su-tabs-panes,.entry-content .su-tabs-pane{background:var(--surface)!important;color:var(--ink)}
.entry-content .su-note-inner,.entry-content .su-box-content{background:var(--surface-2)!important;color:var(--ink)!important;border-color:var(--rule)!important}
.entry-content .su-box-title{background:var(--azure-wash)!important;color:var(--ink)!important}
.entry-content .su-service-title{color:var(--ink)}
.entry-content .su-service-title i,.entry-content .su-service-title .sui{color:var(--ink-soft)!important}
.entry-content .su-service-content{color:var(--ink)}
.entry-content .su-spoiler{background:var(--surface-2)}
.entry-content .su-spoiler-title,.entry-content .su-spoiler-content{color:var(--ink)}
.entry-content .su-spoiler-icon{color:var(--azure-deep)}

/* SU spoilers styled like the theme's own <details>: one frame, a chevron, no folder icon */
.entry-content .su-spoiler{border:1px solid var(--rule);border-radius:6px;margin:0 0 .8rem;background:var(--surface)}
.entry-content .su-note .su-spoiler,.entry-content .su-box .su-spoiler,.entry-content .sc-expand-body .su-spoiler{border:0;border-radius:0;background:transparent;margin:0}
.entry-content .su-spoiler-title{position:relative;padding:.45rem 0 .45rem 1.4rem!important;font-weight:600;color:var(--azure-deep);line-height:1.4;cursor:pointer}
.entry-content .su-spoiler-title:hover{color:var(--azure)}
/* SU's "fancy" and "simple" styles paint fixed light greys; use the theme surfaces so dark mode holds */
.entry-content .su-spoiler-style-fancy,.entry-content .su-spoiler-style-simple{border:1px solid var(--rule);border-radius:6px;background:var(--surface);color:inherit}
.entry-content .su-spoiler-style-fancy > .su-spoiler-title,.entry-content .su-spoiler-style-simple > .su-spoiler-title{background:transparent;color:var(--azure-deep);border-radius:0;border-bottom:1px solid var(--rule);font-size:inherit}
.entry-content .su-spoiler-closed > .su-spoiler-title{border-bottom:0}
.entry-content .su-spoiler-style-fancy > .su-spoiler-content,.entry-content .su-spoiler-style-simple > .su-spoiler-content{background:transparent;color:inherit;border-radius:0}
.entry-content .su-spoiler-icon{display:none!important}
.entry-content .su-spoiler-title::before{content:"";position:absolute;left:.15rem;top:1.05rem;width:.45em;height:.45em;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.entry-content .su-spoiler:not(.su-spoiler-closed) > .su-spoiler-title::before{transform:rotate(45deg);top:.9rem}
.entry-content .su-spoiler-content{padding:.2rem 0 .8rem 1.4rem!important;border:0;background:transparent}
.entry-content .su-spoiler-content ol,.entry-content .su-spoiler-content ul{margin-bottom:0}
.entry-content .su-note,.entry-content .su-box{border-radius:6px;overflow:hidden}
.entry-content .su-note-inner{border-radius:6px}
/* Frames wrap their image exactly. An image floated inside a floated frame escapes it, so floats are
   removed from the image and kept on the frame. Only centred frames in columns (the VBE cards) fill. */
.entry-content .su-frame{display:inline-block;max-width:100%;margin:0 0 1rem;vertical-align:top}
.entry-content .su-frame-align-left{float:left;margin:.3rem 1.4rem 1rem 0;max-width:45%}
.entry-content .su-frame-align-right{float:right;margin:.3rem 0 1rem 1.4rem;max-width:45%}
.entry-content .su-frame-align-center{display:block;margin-left:auto;margin-right:auto;width:fit-content}
.entry-content .su-column .su-frame-align-center{width:auto}
.entry-content .su-frame-inner{border:1px solid var(--rule);background:var(--surface);border-radius:6px;padding:4px;display:block}
.entry-content .su-frame-inner img{display:block;float:none!important;margin:0!important;width:auto;max-width:100%;height:auto;border-radius:4px}
.entry-content .su-column .su-frame-inner img{width:100%}
@media (max-width:640px){.entry-content .su-frame-align-left,.entry-content .su-frame-align-right{float:none;max-width:100%;margin:0 0 1rem}}
.entry-content .su-row{margin-bottom:1rem}
.entry-content .su-button{border-radius:5px!important;text-decoration:none!important}
/* Watu quiz */
.watu-question,.watu-quiz{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:1.1rem 1.2rem;margin:0 0 1.2rem}
.watu-question .question-title,.watu-question h3{font-weight:600;margin-bottom:.6rem}
.watu-question label{display:block;padding:.35rem 0}
.watu-question input[type=radio],.watu-question input[type=checkbox]{accent-color:var(--azure-deep);margin-right:.5rem}
input[type=submit].watu-submit,.watu-quiz input[type=submit],#watu-submit,input.watu-submit{background:var(--azure-deep);color:var(--btn-fg);border:0;border-radius:5px;padding:.6rem 1.2rem;font-weight:600;font-family:inherit;font-size:var(--t-sm);cursor:pointer}
.watu-result,.watu-results{background:var(--azure-wash);border-radius:6px;padding:1rem 1.2rem}
/* Exam pages: ported from the per-page Scripts n Styles CSS (6 exam pages + VBE index) */
#egzaminas{display:block;max-width:26rem;margin:0 auto 1rem;padding:.7rem 1rem;text-align:center;font-size:var(--t-lg);
  border:2px solid var(--rule);border-radius:6px;background:var(--surface)}
#countdown{font-variant:small-caps;font-variant-numeric:tabular-nums;letter-spacing:.04em}
#istorijos{font-size:var(--t-xs);letter-spacing:.2em;text-transform:uppercase;color:var(--ink-faint)}
.entry-content textarea{display:block;width:100%;min-height:6rem;margin:.5rem 0;padding:.7rem;font:inherit;font-size:var(--t-sm);
  color:var(--ink);background:var(--surface);border:1px solid var(--rule);border-radius:6px;resize:vertical}
.entry-content textarea:focus{border-color:var(--azure);outline:0;box-shadow:0 0 0 3px var(--azure-wash)}
.entry-content input[type=submit],.entry-content input[type=button],.entry-content button:not(.su-button,.chip,.tq-flag){
  background:var(--azure-deep);color:var(--btn-fg);border:0;border-radius:5px;padding:.55rem 1.1rem;font:inherit;
  font-size:var(--t-sm);font-weight:600;cursor:pointer}
.entry-content input[type=submit]:hover,.entry-content input[type=button]:hover{background:var(--ink);color:var(--paper)}
.entry-content input[type=text],.entry-content input[type=search],.entry-content input[type=email]{
  font:inherit;font-size:var(--t-sm);padding:.5rem .7rem;border:1px solid var(--rule);border-radius:5px;background:var(--surface);color:var(--ink)}
#klausimai p{margin:1.4rem 0}
.entry-content label{display:inline}
/* Google custom search (WP Google Search) */
.wgs_wrapper{margin:1rem 0 2rem}
/* /konspektai/ link lists: items pointing at partner sites carry data-type and show that site's favicon
   (was in the old per-page custom CSS); own items carry an inline emblem image */
.entry-content li[data-type]{list-style:none;padding-left:1.5rem;background-repeat:no-repeat;background-position:0 .35em;background-size:16px 16px}
.entry-content li[data-type="protaspypt"]{background-image:url(https://istorijai.lt/wp-content/uploads/2015/06/protaspypt.png)}
.entry-content li[data-type="istorikas"]{background-image:url(https://istorijai.lt/wp-content/uploads/2015/06/istorikas.png)}
.entry-content li[data-type="istorijatau"]{background-image:url(https://istorijai.lt/wp-content/uploads/2015/06/Istorijatau.png)}
.entry-content li > img[alt*="favicona"]{width:16px;height:16px;vertical-align:-.15em;margin-right:.25rem}
/* Rank Math ToC block */
.entry-content .wp-block-rank-math-toc-block{background:var(--surface);border:1px solid var(--rule);border-radius:6px;padding:1rem 1.2rem;font-size:var(--t-sm)}

/* ==========================================================================
   11b. Exam session list (inc/exams.php)
   ========================================================================== */
.exams{margin:1.2rem 0 1.6rem}
.entry-content .exams .table-wrap{overflow:visible;margin:0}
.exams-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.6rem 1rem;margin:0 0 .8rem}
.exams-sum{margin:0;font-size:var(--t-sm);color:var(--ink-soft)}
.exams-sum b{color:var(--ink)}
.chips{display:flex;flex-wrap:wrap;gap:.4rem}
.chip{font:inherit;font-size:var(--t-xs);font-weight:600;color:var(--ink-soft);background:var(--surface);
  border:1px solid var(--rule);border-radius:999px;padding:.32rem .8rem;cursor:pointer}
.chip .tnum{font-weight:400;color:var(--ink-faint);margin-left:.2rem}
.chip:hover{border-color:var(--azure);color:var(--azure-deep)}
.chip.is-on{background:var(--azure-deep);border-color:var(--azure-deep);color:var(--btn-fg)}
.chip.is-on .tnum{color:inherit;opacity:.8}
.chip:focus-visible{outline:2px solid var(--azure);outline-offset:2px}

.entry-content .exams-table{border-collapse:separate;border-spacing:0;font-size:var(--t-sm)}
.entry-content .exams-table th,.entry-content .exams-table td{border:0;border-bottom:1px solid var(--rule);padding:.55rem .8rem;vertical-align:middle}
.entry-content .exams-table thead th{position:sticky;top:0;z-index:2;background:var(--surface-2);font-size:var(--t-2xs);
  font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);border-bottom:1px solid var(--rule)}
.entry-content .exams-table tbody th{font-weight:600;font-size:var(--t-md);color:var(--ink);background:transparent;white-space:nowrap}
.entry-content .exams-table tr.is-cont th{color:var(--ink-faint);font-weight:400}
.exams-table tbody tr:hover td,.exams-table tbody tr:hover th{background:var(--azure-wash)}
.exams-table .tag{font-size:var(--t-2xs);color:var(--ink-soft);white-space:nowrap}
.exams-table .tag-retake::before,.exams-table .tag-mock::before{content:"";display:inline-block;width:.5em;height:.5em;border-radius:50%;
  background:var(--azure);margin-right:.4em;vertical-align:.05em}
.exams-table .tag-mock::before,.exams-table .tag-interim::before,.exams-table .tag-sample::before{content:"";display:inline-block;width:.5em;height:.5em;border-radius:50%;margin-right:.4em;vertical-align:.05em;background:var(--ink-faint)}
.exams-table .none{color:var(--ink-faint);font-size:var(--t-xs)}
.exams-table .btn-sm{padding:.3rem .7rem;font-size:var(--t-xs);white-space:nowrap}
.exams-table .doc{display:inline-flex;align-items:center;gap:.35rem;font-weight:600;white-space:nowrap}
.exams-table .doc + .doc{margin-left:.7rem}
.exams-table .doc::before{content:"";width:.85em;height:1.05em;border:1.5px solid currentColor;border-radius:2px;
  background:linear-gradient(currentColor,currentColor) 50% 45%/50% 1.5px no-repeat,linear-gradient(currentColor,currentColor) 50% 70%/50% 1.5px no-repeat;opacity:.75}
.exams-table tr[hidden]{display:none}

@media (max-width:640px){
  .exams-bar{flex-direction:column;align-items:flex-start}
  .entry-content .exams-table,.entry-content .exams-table tbody{display:block}
  .entry-content .exams-table thead{display:none}
  .entry-content .exams-table tr{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .7rem;padding:.7rem 0;border-bottom:1px solid var(--rule)}
  .entry-content .exams-table tr.is-cont{padding-top:.5rem}
  .entry-content .exams-table th,.entry-content .exams-table td{display:block;border:0;padding:0}
  .entry-content .exams-table tbody th{font-size:var(--t-md)}
  .entry-content .exams-table td.session{flex:1 0 50%}  /* claims the rest of the first line, so the actions wrap below */
  .entry-content .exams-table td.is-empty{display:none}
  .entry-content .exams-table td:not(.session){flex:0 0 auto}
  .entry-content .exams-table td:nth-child(3):not(.is-empty){flex-basis:100%}
  .exams-table tbody tr:hover td,.exams-table tbody tr:hover th{background:transparent}
  .entry-content .exams-table td[data-label]{flex:0 1 auto}
  .exams-table td[data-label]::before{content:attr(data-label) ": ";color:var(--ink-soft)}
  .exams-table .doc{white-space:normal}
  .exams-table .doc + .doc{margin-left:.5rem}
}
@media print{.exams-bar{display:none}.entry-content .exams-table thead th{position:static}}

/* ==========================================================================
   11c. Interactive tests (inc/testai.php)
   ========================================================================== */
.testas{margin:1rem 0 2rem;max-width:var(--measure)}
.testas-head{margin:0 0 1.4rem}
.testas-facts{display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;margin:0 0 .5rem;font-size:var(--t-sm);color:var(--ink-soft)}
.testas-facts b{color:var(--ink)}
.testas-note{margin:0 0 .4rem;font-size:var(--t-sm);color:var(--ink-soft)}
.testas-docs{margin:0 0 .8rem;font-size:var(--t-sm)}
.testas-progress{display:flex;align-items:center;gap:.8rem;font-size:var(--t-xs);color:var(--ink-faint)}
.testas-progress .bar{flex:1 1 auto;height:6px;border-radius:3px;background:var(--surface-2);overflow:hidden}
.testas-progress .bar > span{display:block;height:100%;width:0;background:var(--azure);transition:width .2s}
.testas-progress .txt{white-space:nowrap}

.entry-content .testas-list{list-style:none;margin:0;padding:0}
.tq{margin:0 0 1rem;border:1px solid var(--rule);border-radius:8px;background:var(--surface);padding:1rem 1.1rem 1.1rem}
.tq fieldset{border:0;margin:0;padding:0;min-width:0}
.tq legend{padding:0;margin:0 0 .7rem;font-weight:600;line-height:1.45;color:var(--ink)}
.tq-n{display:inline-block;min-width:2em;color:var(--azure-deep)}
.tq-pts{font-weight:400;color:var(--ink-faint);font-size:var(--t-xs)}
.entry-content .tq-src{margin:.2rem 0 .9rem;padding:.2rem 0 .2rem 1rem;border-left:2px solid var(--azure);font-style:italic;font-size:var(--t-sm);color:var(--ink-soft)}
.entry-content .tq-img{margin:.2rem 0 .9rem}
.tq-img img{max-width:100%;height:auto;max-height:420px;width:auto;border:1px solid var(--rule);background:#fff}
.entry-content .tq-opts{list-style:none;margin:0;padding:0;display:grid;gap:.4rem}
.entry-content .tq-opts li{margin:0;position:relative}
.tq-opts input{position:absolute;opacity:0;width:1px;height:1px}
.tq-opts label{display:flex;gap:.7rem;align-items:flex-start;padding:.55rem .75rem;border:1px solid var(--rule);border-radius:6px;cursor:pointer;line-height:1.45;background:var(--paper)}
.tq-opts label:hover{border-color:var(--azure)}
.tq-opts input:focus-visible + label{outline:2px solid var(--azure);outline-offset:2px}
.tq-opts input:checked + label{border-color:var(--azure-deep);background:var(--azure-wash)}
.tq-opts input:checked + label .tq-key{background:var(--azure-deep);color:var(--btn-fg);border-color:var(--azure-deep)}
.tq-key{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.7em;height:1.7em;border:1px solid var(--rule);border-radius:50%;
  font-size:var(--t-xs);font-weight:600;color:var(--ink-soft);background:var(--surface)}
.tq-opts.has-img{grid-template-columns:repeat(2,minmax(0,1fr))}
.tq-opts.has-img label{flex-direction:column;align-items:flex-start}
.tq-opts.has-img img{max-width:100%;height:auto;border:1px solid var(--rule);background:#fff}
.tq-short input{width:100%;max-width:22rem;font:inherit;padding:.5rem .7rem;border:1px solid var(--rule);border-radius:6px;background:var(--paper);color:var(--ink)}
.tq-short input:focus{outline:2px solid var(--azure);outline-offset:1px}
.tq-opts input:disabled + label{cursor:default}
.tq-opts input:disabled + label:hover{border-color:var(--rule)}
.tq-opts li.opt-correct label{border-color:var(--ok);background:var(--ok-wash)}
.tq-opts li.opt-correct label .tq-key{background:var(--ok);border-color:var(--ok);color:#fff}
.tq-opts li.opt-wrong label{border-color:var(--bad);background:var(--bad-wash)}
.tq-opts li.opt-wrong label .tq-key{background:var(--bad);border-color:var(--bad);color:#fff}
.tq-fb{margin:.7rem 0 0;font-size:var(--t-sm);font-weight:600}
.tq.is-right{border-color:var(--ok)}
.tq.is-right .tq-fb{color:var(--ok)}
.tq.is-wrong{border-color:var(--bad)}
.tq.is-wrong .tq-fb{color:var(--bad)}
.tq.is-blank{border-color:var(--rule)}
.tq.is-blank .tq-fb{color:var(--ink-soft)}
.tq-fb{display:flex;align-items:center;gap:.5rem}
.tq-fb-text{flex:1 1 auto}
/* the only way in to the report box: a small flag that stays quiet until hovered */
.tq-flag{flex:0 0 auto;display:inline-grid;place-items:center;width:1.7rem;height:1.7rem;border:0;border-radius:50%;background:transparent;color:var(--ink-faint);opacity:.55;cursor:pointer;padding:0}
.tq-flag:hover,.tq-flag[aria-expanded="true"]{opacity:1;color:var(--azure-deep);background:var(--azure-wash)}
.tq-flag:focus-visible{opacity:1;outline:2px solid var(--azure);outline-offset:1px}
.tq-explain{margin:.5rem 0 0;padding:.6rem .8rem;border-radius:6px;background:var(--surface-2);font-size:var(--t-sm);color:var(--ink-soft)}
.tq-explain p{margin:0}
.tq-explain-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .7rem;margin:0 0 .3rem}
.tq-explain-head span{font-size:var(--t-2xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}
.tq-explain-head small{font-size:var(--t-2xs);color:var(--ink-faint)}
.tq-report{margin:.6rem 0 0;padding:.7rem .8rem;border:1px solid var(--rule);border-radius:6px;background:var(--surface);font-size:var(--t-sm)}
.tq-report-what{display:flex;flex-wrap:wrap;gap:.3rem 1rem;margin:0 0 .5rem}
.tq-report-what label{display:inline-flex;align-items:center;gap:.3rem;cursor:pointer}
.tq-report textarea,.tq-report input[type=email]{display:block;width:100%;font:inherit;font-size:var(--t-sm);padding:.45rem .6rem;border:1px solid var(--rule);border-radius:5px;background:var(--paper);color:var(--ink);margin:0 0 .45rem}
.tq-report textarea:focus,.tq-report input[type=email]:focus{outline:2px solid var(--azure);outline-offset:1px}
.tq-hp{position:absolute;left:-9999px;width:1px;height:1px}
.tq-report-actions{display:flex;align-items:center;gap:.5rem;margin:0}
.tq-report-msg{font-size:var(--t-xs);color:var(--ink-soft)}
.tq-report > .tq-report-msg{margin:0;color:var(--ok);font-weight:600}

/* a source block shared by the questions that follow it */
.entry-content .tq-section{margin:1.6rem 0 1rem;padding:1rem 1.1rem;border:1px solid var(--rule);border-left:3px solid var(--azure);border-radius:8px;background:var(--surface-2);font-size:var(--t-sm)}
.entry-content .tq-section h3{font-size:var(--t-md);margin:0 0 .5rem}
.entry-content .tq-section p{margin:0 0 .5rem}
.entry-content .tq-section .tq-img{margin:.3rem 0 .8rem}
.tq-section img{max-height:360px;width:auto}
/* dropdown-based types: gap in text, ordering, matching */
.tq select{font:inherit;font-size:var(--t-sm);padding:.3rem 1.6rem .3rem .55rem;border:1px solid var(--rule);border-radius:5px;background:var(--paper);color:var(--ink);max-width:100%}
.tq select:focus{outline:2px solid var(--azure);outline-offset:1px}
.tq select.opt-correct{border-color:var(--ok);background:var(--ok-wash)}
.tq select.opt-wrong{border-color:var(--bad);background:var(--bad-wash)}
select.tq-gap{display:inline-block;margin:0 .15em;vertical-align:baseline;font-weight:400}
.entry-content .tq-order{list-style:none;margin:0;padding:0;display:grid;gap:.4rem}
.entry-content .tq-order li{display:flex;gap:.7rem;align-items:flex-start;margin:0;padding:.45rem .6rem;border:1px solid var(--rule);border-radius:6px;background:var(--paper);line-height:1.45}
.tq-order select{flex:0 0 auto;width:4.2rem}
.entry-content .tq-match{margin:0;display:grid;gap:.45rem}
.entry-content .tq-match > div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.6rem;align-items:center;padding:.45rem .6rem;border:1px solid var(--rule);border-radius:6px;background:var(--paper)}
.entry-content .tq-match dt{font-weight:500;margin:0}
.entry-content .tq-match dd{margin:0}
.tq-match select{width:100%}
/* hotspots: numbered discs on the image, one input per spot */
.tq-hot{position:relative;display:inline-block;max-width:100%;margin:.2rem 0 .3rem}
.tq-hot img{display:block;max-width:100%;height:auto;border:1px solid var(--rule);background:#fff}
.tq-hot input{position:absolute;opacity:0;width:1px;height:1px}
.tq-spot{position:absolute;transform:translate(-50%,-50%);cursor:pointer;display:block}
.tq-spot .tq-key{width:1.9em;height:1.9em;font-size:var(--t-sm);background:var(--surface);color:var(--ink);border:2px solid var(--azure-deep);box-shadow:0 1px 4px rgba(0,0,0,.35)}
.tq-hot input:checked + .tq-spot .tq-key{background:var(--azure-deep);color:var(--btn-fg)}
.tq-hot input:focus-visible + .tq-spot .tq-key{outline:2px solid var(--azure);outline-offset:2px}
.tq-hot .tq-spot.opt-correct .tq-key,.tq-hot input:checked + .tq-spot.opt-correct .tq-key{background:var(--ok);border-color:var(--ok);color:#fff}
.tq-hot .tq-spot.opt-wrong .tq-key,.tq-hot input:checked + .tq-spot.opt-wrong .tq-key{background:var(--bad);border-color:var(--bad);color:#fff}
@media (max-width:640px){.entry-content .tq-match > div{grid-template-columns:1fr}}
.testas-foot{margin:1.2rem 0 0}
.testas-result{margin:0 0 1rem;padding:.9rem 1.1rem;border-radius:8px;border:1px solid var(--rule);background:var(--surface);font-size:var(--t-lg);line-height:1.4}
.testas-result .pct{display:inline-block;margin-left:.6rem;padding:.1rem .55rem;border-radius:999px;font-size:var(--t-sm);font-weight:600;background:var(--surface-2)}
.testas-result.is-good{border-color:var(--ok)}
.testas-result.is-good .pct{background:var(--ok);color:#fff}
.testas-result.is-mid .pct{background:var(--azure-deep);color:var(--btn-fg)}
.testas-result.is-low{border-color:var(--bad)}
.testas-result.is-low .pct{background:var(--bad);color:#fff}
.testas-result small{font-size:var(--t-sm);color:var(--ink-soft)}
.testas-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin:0}
.testas-missing{color:var(--bad);font-weight:600}
@media (max-width:640px){.tq{padding:.85rem .85rem 1rem;border-radius:6px}.tq-opts.has-img{grid-template-columns:1fr 1fr}}
@media print{.testas-progress,.testas-actions{display:none}.tq{break-inside:avoid}.tq-opts input:checked + label .tq-key{outline:2px solid #000}}

/* ==========================================================================
   12. Print
   ========================================================================== */
@media print{
  .top,.site-foot,aside.rail,.site-search,.theme-toggle,.nav-toggle,.crumbs,.rank-math-breadcrumb,.byline,.skip-link{display:none!important}
  html{font-size:100%}
  body{background:#fff;color:#000;font-size:11pt}
  .site{max-width:none;padding:0}
  .layout{display:block;max-width:none}
  article.entry{max-width:none;font-size:11pt}
  abbr.c2c-text-hover{border-bottom:0}
  abbr.c2c-text-hover::after{content:" (" attr(title) ")";font-size:.9em;color:#444}
  .avatarpop img{display:none!important}
  a{color:#000}
  details.sc-expand{border:0}
  details.sc-expand > summary::before{display:none}
  details.sc-expand:not([open]) > .sc-expand-body{display:block}
}

/* ==========================================================================
   13. Sticky header (desktop). Last so its offsets win over the base rules.
   ========================================================================== */
/* sticky header on desktop; the contents rail and anchor targets make room for it */
@media (min-width:901px){
  .top{position:sticky;top:0;box-shadow:0 1px 0 var(--rule),0 6px 20px -16px rgba(14,38,55,.35)}
  body.admin-bar .top{top:32px}
  aside.rail{top:6.2rem}
  body.admin-bar aside.rail{top:8.2rem}
  .entry-content h2,.entry-content h3,.gloss .letter,.anchor-alias{scroll-margin-top:6.2rem}
  body.admin-bar .entry-content h2,body.admin-bar .entry-content h3,body.admin-bar .anchor-alias{scroll-margin-top:8.2rem}
  .entry-content .exams-table thead th{top:6.2rem}
  body.admin-bar .entry-content .exams-table thead th{top:8.2rem}
}
