/* v27.1 — Ισορροπημένη τυπογραφία + ενιαία οπτική γλώσσα
   Αναιρεί το καθολικό ελάχιστο 19px της v27.
   Τα μεγέθη των καρτών, labels, μενού και μεταδεδομένων επιστρέφουν στην αρχική τους κλίμακα.
   Μεγαλύτερο κείμενο διατηρείται μόνο στα κύρια αναγνωστικά σώματα. */

:root{
  --site-reading-font:clamp(17px,.98vw,18px);
  --site-reading-lead:clamp(19px,1.18vw,21px);
  --site-reading-line:1.67;
  --ui-icon-size:28px;
  --ui-icon-watermark:40px;
  --ui-bulb:#2f6bff;
  --ui-pin:#2e9b62;
  --ui-eye:#e67e22;
  --ui-eraser:#d94a4a;
  --ui-prism:#7a55c7;
  --ui-knight:#193a6a;
}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}

/* Μόνο το πραγματικό σώμα ανάγνωσης μεγαλώνει ελεγχόμενα. */
body main :where(
  .reading-content > p,
  .lesson-content > p,
  .article-body > p,
  .detail-section > p,
  .service-content > p,
  .source-content > p,
  .reading-content section > p,
  .lesson-content section > p,
  .article-body section > p
){
  font-size:var(--site-reading-font)!important;
  line-height:var(--site-reading-line)!important;
}

body main :where(
  .reading-intro,
  .article-intro,
  .lead,
  .detail-lead,
  .lesson-hero-copy > p,
  .service-hero p,
  .page-hero p
){
  font-size:var(--site-reading-lead)!important;
  line-height:1.62!important;
}

/* Οι επεξηγήσεις μέσα σε μεγάλα πληροφοριακά πλαίσια είναι ευανάγνωστες,
   αλλά όχι τόσο μεγάλες ώστε να διογκώνουν τις κάρτες. */
body main :where(
  .syllabus-note p,
  .mm-note p,
  .concept-box p,
  .formula-card p,
  .lesson-ending p,
  .reading-ending p
){
  font-size:clamp(16.5px,.9vw,17.5px)!important;
  line-height:1.65!important;
}

/* Καμία καθολική επέμβαση σε material cards, navigation, labels, metadata,
   buttons, footer ή μικρά badges: κρατούν την αρχική σχεδιαστική κλίμακα. */
.nav,.reading-audience,.material-tags,.tag-row,.chips,.detail-meta,.lesson-next-nav{flex-wrap:wrap!important;}
body :where(p,li,dd,dt,summary,a,strong,small,span,td,th){overflow-wrap:anywhere;}
body :where(.formula-card,.concept-box,.myth-card,.mm-note,.syllabus-note,.practice-set article,.mm-solution,.source-card){min-width:0;}

/* Τα μαθηματικά ακολουθούν το μέγεθος της κάθε ενότητας.
   Διατηρούμε μόνο προστασία από άχρηστες οριζόντιες μπάρες. */
body main :where(.collision-equation,.formula-display,.equation-display,.two-d-formulas>div){
  overflow-x:clip!important;
  scrollbar-width:none!important;
}
body main :where(.collision-equation,.formula-display,.equation-display,.two-d-formulas>div)::-webkit-scrollbar{display:none!important;}

/* Ενιαία υποδομή εικονιδίων. */
.ui-kicker,.ui-icon-label{
  display:inline-flex!important;
  align-items:center!important;
  gap:.72rem!important;
}
.ui-kicker::before,.ui-icon-label::before{
  content:"";
  width:var(--ui-icon-size)!important;
  height:var(--ui-icon-size)!important;
  flex:0 0 var(--ui-icon-size)!important;
  background-color:var(--ui-icon-color,currentColor)!important;
  -webkit-mask:var(--ui-icon) center/contain no-repeat!important;
  mask:var(--ui-icon) center/contain no-repeat!important;
}
.icon-box{position:relative!important;}
.icon-box::after{
  content:"";
  position:absolute;
  top:18px;
  right:18px;
  width:var(--ui-icon-watermark)!important;
  height:var(--ui-icon-watermark)!important;
  opacity:.11!important;
  pointer-events:none;
  background-color:var(--ui-icon-color,currentColor)!important;
  -webkit-mask:var(--ui-icon) center/contain no-repeat!important;
  mask:var(--ui-icon) center/contain no-repeat!important;
}
.icon-box:where(.formula-card,.fluid-equation,.pressure-definition,.mm-note,.concept-box,.syllabus-note,
  .myth-card,.mm-solution,.lesson-ending,.reading-ending,.safety-note){padding-right:max(64px,3.3rem)!important;}

.icon-bulb{--ui-icon-color:var(--ui-bulb);--ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a7 7 0 0 0-4.6 12.3c.8.7 1.3 1.5 1.5 2.4h6.2c.2-.9.7-1.7 1.5-2.4A7 7 0 0 0 12 2zm-3 16h6a3 3 0 0 1-2.8 2H11.8A3 3 0 0 1 9 18zm1 3h4v1h-4z'/%3E%3C/svg%3E");}
.icon-pin{--ui-icon-color:var(--ui-pin);--ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M15.7 3.6 20.4 8l-2.1 2.1-1.4-1.4-3.2 3.2v3.5l-1.8 1.8-1.7-1.7L6 20.2 4 18.2l4.7-4.1-1.7-1.7 1.8-1.8h3.5l3.2-3.2-1.4-1.4 1.6-1.6z'/%3E%3C/svg%3E");}
.icon-eye{--ui-icon-color:var(--ui-eye);--ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5C6.8 5 2.6 8.3 1 12c1.6 3.7 5.8 7 11 7s9.4-3.3 11-7c-1.6-3.7-5.8-7-11-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='%23000'/%3E%3C/svg%3E");}
.icon-eraser{--ui-icon-color:var(--ui-eraser);--ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M13.9 3.6a2 2 0 0 1 2.8 0l3.7 3.7a2 2 0 0 1 0 2.8l-6.5 6.5H8.7L3.6 11.5a2 2 0 0 1 0-2.8l5.1-5.1a2 2 0 0 1 2.8 0l2.4 2.4zM8.1 18h12v2h-14z'/%3E%3C/svg%3E");}
.icon-prism{--ui-icon-color:var(--ui-prism);--ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M8 4 3 12l5 8h8l5-8-5-8H8zm1.2 2h5.6l-3.4 5.4H5.8L9.2 6zm-3 7.4h5.2l3.2 4.6H9.2l-3-4.6zm10.7 3.6-3-4.6L17 7.6l2.6 4.4-2.7 5z'/%3E%3C/svg%3E");}
.icon-knight{--ui-icon-color:var(--ui-knight);--ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M14.8 3c.3 1.4-.3 2.7-1.7 3.8 2.6.3 4.7 2.1 5.6 4.5.5 1.2.5 2.5.2 3.7H21V18H4v-2h3.4c.2-1.7 1-3.1 2.5-4.4l2.1-1.8c.7-.6 1-1.2.8-1.9-.2-.7-.7-1.2-1.5-1.7L14.8 3zM9.7 16h7.2c.2-1.7-.1-3.1-1-4.3-1.1.8-2.5 1.3-4.2 1.3l-.2-1.6c1.7 0 3.1-.5 4.1-1.4-.9-.8-2.1-1.4-3.6-1.6-.1 1-.6 2-1.6 2.8l-2.1 1.9c-1 .9-1.5 1.8-1.8 2.9h3.2z'/%3E%3C/svg%3E");}

/* Σταθερή σημασιολογία χρωμάτων στις κάρτες λαθών/διορθώσεων. */
body .collision-misconceptions article,
body .collision-misconceptions article:nth-child(even),
body .fluid-misconceptions article,
body .pressure-misconceptions article{
  border-color:#e3e8f2!important;
  background:linear-gradient(145deg,#fff 0%,#f9fbff 100%)!important;
}
body .collision-misconceptions article::before,
body .collision-misconceptions article:nth-child(even)::before{background:var(--ui-eraser)!important;}
body .collision-misconceptions .misconception-label{color:#c04f42!important;}
body .collision-misconceptions .correction-label{color:var(--ui-bulb)!important;}

@media(max-width:900px){
  .reading-layout{grid-template-columns:1fr!important;}
  .reading-rail{position:static!important;max-height:none!important;display:flex!important;flex-wrap:wrap!important;gap:.55rem!important;}
}
@media(max-width:620px){
  :root{--site-reading-font:17px;--site-reading-lead:19px;--ui-icon-size:25px;--ui-icon-watermark:34px;}
  .icon-box:where(.formula-card,.fluid-equation,.pressure-definition,.mm-note,.concept-box,.syllabus-note,
    .myth-card,.mm-solution,.lesson-ending,.reading-ending,.safety-note){padding-right:52px!important;}
}


/* v27.2 — Συνεπής αναγνωσιμότητα μέσα σε ΟΛΕΣ τις εσωτερικές κάρτες μαθημάτων/άρθρων.
   Η v27.1 μεγάλωνε τα κύρια paragraphs, αλλά άφηνε εκτός τα nested article/details/list components.
   Οι κανόνες παραμένουν περιορισμένοι μέσα στα αναγνωστικά σώματα, ώστε να μην ξαναμεγαλώσουν
   οι κάρτες υλικού της αρχικής σελίδας. */
:root{
  --site-card-text:clamp(17.5px,1.01vw,18.5px);
  --site-card-small:clamp(16.5px,.94vw,17.5px);
}

body main :where(
  .reading-content,
  .lesson-content,
  .article-body,
  .detail-section,
  .service-content,
  .source-content
) :where(
  article > p,
  article details p,
  article blockquote,
  .concept-box p,
  .formula-card p,
  .mm-note p,
  .syllabus-note p,
  .myth-card p,
  .mm-solution p,
  .worked-examples article p,
  .practice-set article > p,
  .practice-set details p,
  .concept-check details p,
  .mm-quiz details p,
  .motion-definitions article p,
  .motion-graphs article p,
  .sign-grid article p,
  .collision-examples article p,
  .collision-type-grid article p,
  .collision-timeline article p,
  .energy-comparison article p,
  .energy-ledger article p,
  .collision-misconceptions article p,
  .fluid-grid article p,
  .fluid-apps article p,
  .fluid-comparison article p,
  .fluid-misconceptions article p,
  .pressure-two article p,
  .pressure-apps article p,
  .pressure-changes article p,
  .pressure-misconceptions article p,
  .study-checklist li > span,
  .collision-method li p
){
  font-size:var(--site-card-text)!important;
  line-height:1.68!important;
}

/* Οι μικρές βοηθητικές λεζάντες μέσα σε αναγνωστικές κάρτες μένουν λίγο μικρότερες,
   αλλά όχι σε δυσανάγνωστο μέγεθος. */
body main :where(
  .reading-content,
  .lesson-content,
  .article-body,
  .detail-section
) :where(
  article small,
  article figcaption,
  .graph-title span,
  .solution-note,
  .card-note
){
  font-size:var(--site-card-small)!important;
  line-height:1.55!important;
}

/* Ειδικά οι τρεις κάρτες Θέση / Μετατόπιση / Διάστημα. */
body main .motion-definitions article p{
  font-size:clamp(18px,1.04vw,19px)!important;
  line-height:1.7!important;
}
body main .motion-definitions article strong{
  font-size:clamp(19px,1.08vw,20px)!important;
}

/* Οι ασκήσεις και οι λυμένες απαντήσεις χρειάζονται σταθερή αναγνωσιμότητα. */
body main :where(.reading-content,.lesson-content) .practice-set article h3,
body main :where(.reading-content,.lesson-content) .worked-examples article h3{
  font-size:clamp(20px,1.22vw,23px)!important;
  line-height:1.38!important;
}
body main :where(.reading-content,.lesson-content) details summary{
  font-size:clamp(17px,.98vw,18px)!important;
  line-height:1.5!important;
}

@media(max-width:620px){
  :root{
    --site-card-text:17px;
    --site-card-small:16px;
  }
  body main .motion-definitions article p{font-size:17.5px!important;}
  body main .motion-definitions article strong{font-size:18.5px!important;}
}
/* v27.8 — Οριστική διόρθωση οριζόντιας μετατόπισης σε κινητά.
   Αιτία: το grid track 1fr κρατούσε το intrinsic minimum πλάτος των εσωτερικών στοιχείων,
   με αποτέλεσμα όλη η reading-layout να γίνεται πλατύτερη από το viewport και να κεντράρεται εκτός οθόνης. */

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .reading-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  .reading-layout > *,
  .reading-rail,
  .reading-content,
  .lesson-content {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  .reading-rail {
    box-sizing: border-box !important;
  }

  .reading-content :where(img, svg, video, canvas, iframe, table),
  .lesson-content :where(img, svg, video, canvas, iframe, table) {
    max-width: 100% !important;
  }
}

@media (max-width: 620px) {
  .reading-layout.section-pad {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .reading-rail {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  .reading-rail > span,
  .reading-rail > a {
    max-width: 100% !important;
  }
}
