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

:root{

    --cl-fnt:#14213D;
    --cl-bg: #f9f9f9;
    --cl-org:#FCA311;
    --cl-gr:#e5e5e5;
}
    
    html, body {
      margin: 0;
      height: 100vh;
      font-family: Arial, sans-serif;
      background-color: var(--cl-bg);
      color:var(--cl-fnt);
    }

    body {
      display: flex;
      flex-direction: column;
    }

/*=GENERAL END*************************************************************************************/
/*=NAV ------------------------------------------------------------------------------------------------------*/
    nav {
     
      color: var(--cl-fnt);
      display: flex;
      justify-content: flex-end;
      padding: 1rem;
      gap: 1rem;
    }

    nav ul {
  display: flex;               /* horisontaalne paigutus */
  justify-content: flex-end;   /* viib paremasse serva */
  list-style: none;            /* eemaldab täpid */
  margin: 0;
  padding: 0;
  gap: 1rem;                   /* vahe linkide vahel (soovi korral) */
}

a{
      color: var(--cl-fnt);
      text-decoration: underline;
      text-decoration-style: dashed;
      font-weight: bold; 
      text-underline-offset: 3px;
}

a:visited{
   color: var(--cl-gr);
      text-decoration: underline;
}

nav ul li a, nav ul li a:visited {
   color: var(--cl-fnt);
      text-decoration: none;
      font-weight: bold;        /* või mõni muu värv */
}

nav a:hover, a:hover  {
      text-decoration: underline;
      text-decoration-color: var(--cl-org);
    }

nav ul li a.active {
  font-weight: bold;
  color: var(--cl-org);     /* või valitud esiletõstuvärv */
  text-decoration: underline;
}



    

/*=NAV end ------------------------------------------------------------------------------------------------------*/
 /*=HOME ------------------------------------------------------------------------------------------------------*/   
    .content, .content-pg{
      background-color: var(--cl-bg);
      color: var(--cl-fnt);
      padding: 1rem;
    }

    .content {
      padding: 5rem;
    }

    .content {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      text-align: left;
      width: 100%;
      max-width: none;
    }

    .content h1,
    .content h2,
    .content h3 {
      display: block;
      width: 100%;
      box-sizing: border-box;
      text-align: center;
    }

    /* Esilehe h2 ilma sõnastiku kollase alumise jooneta */
    .content h2.n-lne {
      border-bottom: none;
      padding-bottom: 0;
    }

    .content h3{
      margin:2rem 0;
    }

    /* Esilehe “Lugemist” sektsioon */
    .reading-section {
      width: 100%;
      margin-top: 5rem;
    }

    /* Tekst vasakule, aga joone pikkus kogu sektsiooni laiusele */
    .reading-heading {
      display: block;
      width: 100%;
      box-sizing: border-box;
      text-align: left !important; /* tühistab .content h2 text-align:center */
      border-bottom: 2px solid var(--cl-org);
      padding-bottom: 0.3rem;
      margin-bottom: 1rem;
    }

    .reading-half {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      gap: 1rem;
      width: 100%;
    }

    .reading-col {
      flex: 1;
      min-width: 0;
      margin-top:2rem
    }

    .reading-sep {
      display: none;
      width: 100%;
      margin: 1rem 0;
    }

    .reading-list {
      list-style: disc;
      padding-left: 1.5rem;
      margin: 0;
    }

    .reading-list li {
      margin: 0.35rem 0;
    }

    /* lugemist.php — veerud kategooriate kaupa; pealkiri väike kollane vasakul; A–Z + kuupäev veerus */
    .lugemist-lede {
      text-align: center;
      margin: 0.5rem 0 0;
      max-width: 36rem;
      margin-left: auto;
      margin-right: auto;
    }

    .lugemist-empty {
      text-align: center;
      margin-top: 2rem;
      color: #666;
    }

    /* !important: üldine `a`/body värv ei tohi üle kirjutada; `small { }` tuleb hiljem failis */
    .lugemist-section small.lugemist-cat-heading {
      display: block;
      text-align: left !important;
      align-self: flex-start;
      width: auto;
      max-width: 100%;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      color: var(--cl-org) !important;
      padding: 0;
      margin: 0 0 0.35rem 0;
    }

    .lugemist-col {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .lugemist-col .lugemist-cat-list {
      margin-top: 0.25rem;
      width: 100%;
      align-self: stretch;
    }

    .lugemist-cat-list .lugemist-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: baseline;
      gap: 0.35rem 1rem;
      margin: 0.4rem 0;
    }

    .lugemist-cat-list .lugemist-row a {
      flex: 1 1 10rem;
      min-width: 0;
    }

    .lugemist-date {
      font-size: 0.75rem;
      color: #777;
      font-weight: normal;
      white-space: nowrap;
    }

    /*.reading-list a {
      text-decoration: underline;
      text-decoration-style: dashed;
      text-underline-offset: 3px;
      color: var(--cl-fnt);
      font-weight: bold;
    }*/

    /* Kaks lõiku ühel real: vasak pool 50% (nagu varem), parem pool 50%; parempoolne tekst ~72% selle poole laiusest */
    .content-lede-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      column-gap: 1rem;
      row-gap: 0;
      align-items: start;
      width: 100%;
      box-sizing: border-box;
      margin-top: 0.75rem;
    }

    .content-lede-row p {
      min-width: 0;
      margin: 0;
    }

    .content-lede-row p:first-child {
      grid-column: 1;
      text-align: right;
    }

    .content-lede-row p:last-child {
      grid-column: 2;
      text-align: left;
      /* Tekstiriba laius = ~72% parempoolsest poolest (vahemik 70–75%) */
      width: 90%;
      box-sizing: border-box;
    }

    .content-lede-tail {
      display: block;
      width: 35%;
      margin-top: 0.75rem;
      margin-left: 60%;
      text-align: left;
      box-sizing: border-box;
    }

    @media (max-width: 640px) {
      .content-lede-row {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
      }

      /* Esilehe lugemise veerud mobiilis üksteise alla */
      .reading-half {
        display: block;
      }

      .reading-col {
        margin-top: 0;
        width: 100%;
        flex: 0 0 auto;
        padding: 0;
        border: none;
      }

      .reading-sep {
        display: block;
        margin: 0.9rem 0;
      }

      .content-lede-row p:first-child,
      .content-lede-row p:last-child {
        grid-column: auto;
      }
      .content-lede-row p,
      .content-lede-row p:first-child,
      .content-lede-row p:last-child,
      .content-lede-tail {
        text-align: left;
        width: 100%;
        margin-left: 0;
      }
    }

    .bld{
        font-weight:bold;
    }

    .itl{
      font-style: italic;
    
    }

    small:not(.lugemist-cat-heading):not(.lugemist-date) {
      font-size: 0.7rem;
    }

    .cntr{
      text-align: center;
    }

    hr.y-ln{
       border: 2px solid var(--cl-org);
    }

    .blg > p, .blg > ol > li{
    font-size: 1.2rem;
    line-height: 2.1rem;
    }
/*=HOME END ------------------------------------------------------------------------------------------------------*/

/*=FOOTER ------------------------------------------------------------------------------------------------------*/
    footer.site-footer {
      min-height: auto;
      padding: 1rem 1rem 1.25rem;
      text-align: center;
      line-height: 1.5;
      font-size: 0.9rem;
    }

    footer.site-footer .footer-primary {
      margin: 0 0 0.4rem;
    }

    footer.site-footer .footer-credit {
      display: block;
      font-size: 0.75rem;
      line-height: 1.45;
      max-width: 42rem;
      margin-left: auto;
      margin-right: auto;
    }

    footer a {
      color: var(--cl-fnt);
      text-decoration: none;
    }

    footer a:hover {
      text-decoration: underline;
    }
/*=FOOTER END ------------------------------------------------------------------------------------------------------*/

/*=POST VIEW ------------------------------------------------------------------------------------------------------*/
.post-view {
  flex: 1;
  display: block;
  font-family: sans-serif;
  width: min(800px, calc(100% - 2em));
  max-width: 800px;
  margin: 40px auto;
  padding: 0 1em 2rem;
  line-height: 1.6;
}

.post-view h1 {
  border-bottom: 2px solid var(--cl-org);
  padding-bottom: 0.3rem;
  display: block;
  margin-bottom:1.5rem
}

.post-view .meta {
  color: gray;
  margin-bottom: 0.625rem;
 
}

.post-view .meta small{
  margin-left: 1rem;
  color: #777;
  font-weight: normal;
  white-space: nowrap; /* "Avaldatud" peab jääma samale reale */
}

.post-view .ai-assist-note{
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}

.post-view .ai-assist-note small{
  display: block;
  margin-left: 0;
  color: #777;
  font-weight: normal;
  white-space: normal;
}



.post-view .post-content,
.post-view .post-content p,
.post-view .post-content li,
.post-view .post-content span {
  background-color: transparent !important;
}

.post-view .post-content > ul {
  /* Quill HTML + globaalne CSS reset teeb default-ul margin/padding kaduma.
     Paneme tagasi “vana” tunnetusega loogika. */
  margin: 0.9rem 0 1.5rem 0;
  padding: 0 2rem; /* ~40px-ish */
}

.post-view .post-content > ul > li {
  margin: 0;
  padding: 0;
}

.post-view .post-content {
  margin-bottom: 1.5rem;
}

.post-view .post-content p {
  margin-bottom:1.5rem;

}

.post-view .post-content img {
  max-width: 100%;
  height: auto;
}

/* Quill code block: ära tekita horisontaalset scrolli, murra pikad read */
.post-view .post-content pre.ql-syntax,
.post-view .post-content pre {
  max-width: 100%;
  white-space: pre;
  overflow-x: auto;
  overflow-y: hidden;
  background-color: #111;
  color: #fff;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
}

.post-view .post-content pre.ql-syntax br,
.post-view .post-content pre br {
  display: block;
  content: "";
}

.series-same {
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.series-same-label {
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.series-same-list {
  margin: 0;
  padding-left: 1.25rem;
}

.series-same-list li {
  margin-bottom: 0.35rem;
}

.series-draft {
  color: #666;
  font-weight: normal;
}

.tags{
  padding-bottom:4rem
}


.post-view .tag {
  display: inline-block;
  background: #eee;
  color: #333;
  padding: 4px 8px;
  margin-right: 5px;
  border-radius: 4px;
  font-size: 0.9em;
}
/*=POST VIEW END --------------------------------------------------------------------------------------------------*/

/* Admin (editor / edit_post): Tehisaru nupp pärast kasutamist — sama toon mis lehe lingid (var(--cl-fnt)) */
button#ai-assist.is-active,
button#ai-assist.is-active:disabled {
  color: var(--cl-fnt);
  border: 1px solid var(--cl-fnt);
  background-color: var(--cl-gr);
  cursor: default;
  opacity: 1;
}
button#ai-assist.is-active:hover {
  opacity: 1;
}
