/* ithageneia — Υπόδειγμα έκθεσης (Μέρος Γ): κείμενο που «ανοίγει» σε 5 κομμάτια με επεξηγήσεις
   + φωτισμός λέξης με τον ήχο. Namespace ithe-. HTML από ektheseis-100/ergaleia/ekthesi.py.
   Βασική κατάσταση (χωρίς JS) = όλα ανοιχτά. Το JS βάζει .ithe-js (ξεκινά κλειστό) και .is-open. */
.ithe {
  border: 1px solid #dee3e9; border-radius: 12px; padding: 1rem 1.25rem; background: #fff; margin: 0 0 1rem;
}
.ithe p { margin: 0 0 .3rem; }
.ithe ul { margin: .2rem 0 0; }
.ithe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 .9rem; }
.ithe-bar a.itha-say { margin: 0; }

/* Κουμπί «Δες πώς γράφτηκε» — ίδιο σχήμα με το pill του ήχου (a.itha-say) */
.ithe:not(.ithe-js) a.ithe-how { display: none; }
a.ithe-how {
  display: flex; width: max-content; max-width: 100%; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: 13px; line-height: 1.2;
  color: #1670CC !important; text-decoration: none !important; white-space: nowrap;
  border: 1px solid #cbdaf0; border-radius: 999px; background: #f3f7ff; cursor: pointer;
  transition: border-color .15s, background-color .25s, color .25s;
}
a.ithe-how:hover { border-color: #1670CC; }
a.ithe-how:focus { outline: none; box-shadow: none; }
a.ithe-how:focus-visible { box-shadow: 0 0 0 3px rgba(22, 112, 204, .25); }
/* κύκλος με + (κλειστό) / − (ανοιχτό) */
a.ithe-how::before {
  content: ''; width: 24px; height: 24px; border-radius: 999px; flex: none;
  background:
    linear-gradient(#fff, #fff) center / 10px 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 10px no-repeat,
    #1670CC;
  transition: background-size .25s, background-color .25s;
}
.ithe.is-open a.ithe-how { background: #1670CC; border-color: #1670CC; color: #fff !important; }
.ithe.is-open a.ithe-how::before {
  background:
    linear-gradient(#1670CC, #1670CC) center / 10px 2px no-repeat,
    linear-gradient(#1670CC, #1670CC) center / 2px 0 no-repeat,
    #fff;
}

/* Τα 5 κομμάτια */
.ithe-part {
  --c: #8595a4; --bg: #f1f4f7; --lc: #5d6c7b;
  border-left: 4px solid var(--c); background: var(--bg); border-radius: 0 8px 8px 0;
  padding: .6rem .9rem; margin: 0 0 .5rem;
}
.ithe-p-eisagogi { --c: #1670CC; --bg: #f3f7ff; --lc: #1670CC; }
.ithe-p-kyrio { --c: #31a24c; --bg: #f0f8f2; --lc: #23803a; }
.ithe-p-kleisimo { --c: #f2a918; --bg: #fef6e7; --lc: #a86c00; }
.ithe-label { font-weight: 700; font-size: .875rem; color: var(--lc); padding-bottom: .15rem; }
.ithe .ithe-text { margin: 0; font-weight: 700; color: #0a1317; }
.ithe-note { font-size: .875rem; color: #444950; padding-top: .3rem; }
.ithe .ithe-h { font-size: 1rem; font-weight: 700; margin: .9rem 0 .4rem; color: #0a1317; }
.ithe-intro .ithe-h:first-child { margin-top: 0; }
.ithe .ithe-small { font-size: .875rem; color: #444950; margin-top: .4rem; }
.ithe .ithe-count { margin: .5rem 0 0; font-size: .875rem; color: #5d6c7b; }

/* Σημάδια πάνω στο κείμενο */
.ithe-fr { text-decoration: underline solid #1670CC 2px; text-underline-offset: 4px; }
.ithe-sk { text-decoration: underline dotted #a86c00 2px; text-underline-offset: 4px; }

/* Η λέξη που ακούγεται (ίδιο κίτρινο με τα flashcards) */
.ithe-w { border-radius: 3px; transition: background-color .08s; }
.ithe-w.on { background: #ffe86b; color: #1a1a1a; box-shadow: 0 0 0 2px #ffe86b; }

/* Άνοιγμα / κλείσιμο */
.ithe-fold { display: grid; grid-template-rows: 1fr; }
.ithe-fold > * { overflow: hidden; min-height: 0; }
.ithe-js .ithe-fold {
  transition: grid-template-rows .4s ease, opacity .35s ease;
  transition-delay: calc(var(--i, 0) * 60ms);
}
.ithe-js .ithe-part {
  transition: padding .4s ease, margin .4s ease, background-color .4s ease, border-color .4s ease;
  transition-delay: calc(var(--i, 0) * 60ms);
}
.ithe-js .ithe-fr, .ithe-js .ithe-sk { transition: text-decoration-color .4s ease; }
.ithe-js:not(.is-open) .ithe-fold { grid-template-rows: 0fr; opacity: 0; }
.ithe-js:not(.is-open) .ithe-part { border-left-color: transparent; background-color: transparent; padding: 0; margin: 0 0 .6rem; }
.ithe-js:not(.is-open) .ithe-text { font-weight: 400; color: inherit; }
.ithe-js:not(.is-open) .ithe-fr, .ithe-js:not(.is-open) .ithe-sk { text-decoration-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .ithe-js .ithe-fold, .ithe-js .ithe-part, .ithe-js .ithe-fr, .ithe-js .ithe-sk, a.ithe-how, a.ithe-how::before { transition: none; }
}
