/* Μαθαίνω! • Curriculum home & reading visual system v1
   Aligned with original Physics FE1 vector artwork. No external assets or emoji. */
#home .home-subject-intro{margin:10px 0 16px;color:#43637d;font-size:.96rem;line-height:1.55}
#subjects{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;
  margin:15px 0 17px;
  align-items:stretch;
}
#subjects>button,
html[data-theme="dark"] #subjects>button{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  padding:11px 11px 14px;
  text-align:left;
  min-width:0;
  min-height:0;
  border:2px solid #d1e1eb;
  border-radius:18px;
  background:#fbfdff;
  box-shadow:0 3px 10px #2c5b8110;
  color:#234b65;
  white-space:normal;
  font:inherit;
  transition:border-color .14s ease,background-color .14s ease,transform .14s ease;
}
#subjects>button[hidden]{display:none!important}
#subjects>button:hover{border-color:#7daecf;transform:translateY(-2px)}
#subjects>button.active{
  background:#eff8ff;
  border-color:#2f7eae;
  box-shadow:0 0 0 2px #7eaccd55;
}
#subjects>button:focus-visible{outline:3px solid #e9ad6a;outline-offset:2px}
#subjects .subject-illustration{
  display:block;
  width:100%;height:auto;
  border-radius:13px;
  overflow:hidden;
  pointer-events:none;
}
#subjects .mathaino-subject-art{
  width:100%;height:auto;
  display:block;
  max-height:174px;
  border-radius:12px;
}
#subjects .subject-title{
  display:block;
  margin:10px 3px 2px;
  color:#214c68;
  font-size:clamp(.98rem,2.6vw,1.15rem);
  font-weight:760;
  line-height:1.24;
}
#subjects .subject-desc{
  display:block;
  margin:2px 3px 0;
  color:#637b8d;
  font-size:clamp(.76rem,1.8vw,.86rem);
  line-height:1.35;
}
#subjects>button.active .subject-title::after{
  content:" · επιλεγμένο";
  color:#2b7099;font-size:.72rem;font-weight:650;
}
#home .lesson-options{
  border:1px solid #cddfee;
  border-radius:16px;
  background:#f8fbfe;
  padding:15px 17px;
  margin:6px 0 12px;
}
#home .lesson-options h3{font-size:1.08rem;margin:0 0 5px;color:#245371}
#home #selectedSubjectDescription{margin:2px 0 12px;color:#536f84;line-height:1.45}
#home .lesson-options label{display:block;margin:9px 0 4px;font-weight:680;font-size:.95rem}
#home .lesson-options select{margin:4px 0 10px;width:100%}
#home .lesson-options .topic-single{
  display:block;margin:6px 0 12px;color:#2b5b7c;font-weight:620;
}
#home .lesson-actions{margin:14px 0 0;display:flex;gap:10px;flex-wrap:wrap}
#home .lesson-actions button{flex:1;min-width:min(100%,140px);min-height:49px}
#home #topicGroup[hidden],#home #countGroup[hidden],#home #topicSingle[hidden]{display:none!important}
#home .line-icon{background:none;padding:0}
#pictureGate .picture .mathaino-word-art{
  display:block;
  width:min(80%,270px);
  height:auto;
  margin:6px auto;
  border-radius:18px;
  box-shadow:0 5px 15px #285d7f1a;
}
#pictureGate .picture{min-height:150px;margin:14px 0}
#question .mathaino-word-art{
  display:block;
  margin:4px auto 15px;
  width:min(100%,235px);
  height:auto;
  border-radius:16px;
}
.reading-card{gap:10px;flex-wrap:wrap}
.reading-card strong{min-width:155px}
.reading-card .mathaino-word-art{display:block;width:min(40vw,155px);height:auto}
.reading-card button{margin-left:auto}
.mathaino-word-art{vertical-align:middle}
html[data-theme="dark"] #subjects>button{
  border-color:#46637a;
  background:#23384e;
  color:#f0f6fc;
  box-shadow:none;
}
html[data-theme="dark"] #subjects>button:hover{border-color:#77abce}
html[data-theme="dark"] #subjects>button.active{
  background:#2d4f67;
  border-color:#8dcdf2;
  box-shadow:0 0 0 2px #7eaccd44;
}
html[data-theme="dark"] #subjects .subject-title{color:#eaf5ff}
html[data-theme="dark"] #subjects .subject-desc{color:#c0d4e4}
html[data-theme="dark"] #subjects>button.active .subject-title::after{color:#b8e4ff}
html[data-theme="dark"] #home .lesson-options{background:#22364b;border-color:#426780}
html[data-theme="dark"] #home .lesson-options h3{color:#d9efff}
html[data-theme="dark"] #home #selectedSubjectDescription,
html[data-theme="dark"] #home .lesson-options .topic-single{color:#c7ddee}
html[data-theme="dark"] #home .home-subject-intro{color:#c6d9e9}
.no-color #subjects>button.active{
  border-width:4px;
  border-color:#244d70;
  box-shadow:none;
}
html[data-theme="dark"] .no-color #subjects>button.active{border-color:#fff}
@media(max-width:410px){
  #home{padding:15px}
  #subjects{gap:9px;grid-template-columns:repeat(2,minmax(0,1fr))}
  #subjects>button{padding:8px 8px 11px;border-radius:14px}
  #subjects .subject-title{margin:8px 1px 2px;font-size:.92rem}
  #subjects .subject-desc{font-size:.72rem;margin:0 1px}
  #subjects>button.active .subject-title::after{display:block;content:"επιλεγμένο";margin-top:2px}
  #home .lesson-options{padding:13px}
  #home .lesson-actions button{min-width:125px}
}
@media(prefers-reduced-motion:reduce){
  #subjects>button{transition:none!important}
  #subjects>button:hover{transform:none}
}

/* Chapter introductions keep the same lesson-illustration language as Physics. */
.history-visual-intro{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr);
  gap:15px;align-items:center;
  padding:15px 18px;margin:14px 0 17px;
  border:1px solid #cfdfeb;
  border-radius:17px;
  background:#f3f9fc;
}
.history-visual-intro h2{margin:1px 0 8px;color:#254f69;font-size:1.32rem}
.history-visual-intro p{margin:4px 0 8px;color:#536d80;font-size:.9rem;line-height:1.45}
.history-visual-intro .mathaino-subject-art{display:block;width:100%;height:auto;border-radius:12px}
#grade5HistoryHero{grid-template-columns:1fr;max-width:400px;margin:8px 0 15px}
#grade5HistoryHero .mathaino-subject-art{max-height:174px}
#grade5HistoryHero.hidden{display:none!important}
html[data-theme="dark"] .history-visual-intro{background:#23374c;border-color:#486680}
html[data-theme="dark"] .history-visual-intro h2{color:#eaf3ff}
html[data-theme="dark"] .history-visual-intro p{color:#c1d7e8}
@media(max-width:510px){
 .history-visual-intro{grid-template-columns:1fr;gap:8px;padding:12px}
 .history-visual-intro .history-hero-illustration{max-width:360px}
 #grade5HistoryHero{max-width:300px}
}

/* Entry for early readers: one big Greek day, one button, then one drawing. */
#gate.gate-day{
  min-height:min(63dvh,490px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  padding:32px 23px;
  text-align:center;
  box-sizing:border-box;
}
#gate.gate-day.hidden{display:none!important}
#gate.gate-day #gateWord{
  font-size:clamp(3rem,11vw,5.25rem);
  font-weight:760;
  color:#244f70;
  line-height:1.12;
  letter-spacing:.005em;
  margin:35px auto 42px;
  max-width:100%;
  overflow-wrap:break-word;
}
#gate.gate-day #gateBack,
#gate.gate-day #gateAnswers,
#gate.gate-day #gateFeedback{display:none!important}
#gate.gate-day #gateNext{
  display:block!important;
  margin:0 auto;
  width:min(100%,315px)!important;
  min-height:64px;
  font-size:1.28rem;
  font-weight:720;
  border-radius:15px;
  background:#2f78a8;
  border-color:#2f78a8;
  color:#fff;
}
#gate.gate-day #gateNext:focus-visible{outline:3px solid #e4a862;outline-offset:3px}
#pictureGate{
  text-align:center;
}
#pictureGate .picture{
  margin:15px auto 15px;
}
#pictureGate .picture .mathaino-word-art{
  width:min(100%,315px);
  max-height:300px;
  border:1px solid #c8dbe9;
  box-shadow:0 6px 17px #214d7715;
}
#pictureGate h2{font-size:1.25rem;margin:12px 0 17px;color:#2b5877}
#pictureGate #pictureAnswers{
  max-width:490px;
  margin:12px auto 13px;
  gap:11px;
}
#pictureGate #pictureAnswers button{
  min-height:62px;
  padding:11px;
  font-size:clamp(1.2rem,4vw,1.5rem);
  font-weight:690;
  border-radius:12px;
  background:#f5fbff;
  border:2px solid #b7d4e9;
  color:#234d70;
}
#pictureGate #pictureAnswers button.good{
  background:#d9f3e5;
  border-color:#3d9a71;
  color:#1a5c3e;
}
#pictureGate #pictureAnswers button.bad{
  background:#fff0e9;
  border-color:#d99b78;
  color:#74442e;
}
#pictureGate #pictureDone{
  display:block;
  min-height:53px;
  min-width:175px;
  margin:15px auto 5px;
  font-size:1.03rem;
}
#pictureGate #pictureDone.hidden{display:none!important}
#pictureGate #pictureMessage{min-height:1.5em;margin:9px auto}
html[data-theme="dark"] #gate.gate-day #gateWord{color:#e9f5ff}
html[data-theme="dark"] #gate.gate-day #gateNext{background:#3c7fb5;border-color:#539bca;color:#fff}
html[data-theme="dark"] #pictureGate h2{color:#e2f1ff}
html[data-theme="dark"] #pictureGate #pictureAnswers button{background:#2a465f;border-color:#5a809e;color:#eef6ff}
html[data-theme="dark"] #pictureGate #pictureAnswers button.good{background:#22563d;border-color:#63bd8a}
html[data-theme="dark"] #pictureGate #pictureAnswers button.bad{background:#5a3c36;border-color:#dba186}
@media(max-width:390px){
 #gate.gate-day{min-height:58dvh;padding:23px 12px}
 #gate.gate-day #gateWord{font-size:clamp(2.6rem,10.5vw,4rem)}
 #pictureGate{padding:16px}
 #pictureGate #pictureAnswers{gap:9px}
 #pictureGate #pictureAnswers button{min-height:57px}
}
