/* Tamakkin Sprint 22 — Production UI/UX Polish
   Scope: compact refinement only. Keeps current identity and avoids oversized cards/icons. */

/* Hero hierarchy: title is primary, tagline badge is secondary */
.hero .hero-learning-badge{
  font-size:11px!important;
  padding:4px 10px!important;
  margin-bottom:10px!important;
  opacity:.9;
}
.hero .hero-title{
  font-size:clamp(30px,4.7vw,52px)!important;
  line-height:1.08!important;
  margin:8px 0 10px!important;
  letter-spacing:-.4px!important;
}
.hero .hero-tagline{
  max-width:620px;
  line-height:1.75!important;
  margin-bottom:12px!important;
}
.hero .hero-trustline{
  gap:8px!important;
  margin:10px 0 16px!important;
}
.hero .hero-trustline .hero-benefit{
  font-size:12px!important;
  padding:7px 10px!important;
  border-radius:999px!important;
}
.hero .hero-trustline .hero-benefit::before{content:"";display:inline-block;width:5px;height:5px;margin-inline-end:6px;border-radius:50%;background:var(--green,#0F7B5F);vertical-align:middle;}

@media (max-width:760px){
  .hero{padding-top:24px!important;padding-bottom:24px!important;}
  .hero .hero-title{font-size:clamp(26px,8vw,34px)!important;line-height:1.12!important;margin:6px 0 8px!important;}
  .hero .hero-tagline{font-size:13.5px!important;line-height:1.65!important;margin-bottom:10px!important;}
  .hero .hero-trustline{display:flex!important;flex-wrap:wrap!important;gap:6px!important;justify-content:flex-start!important;margin:8px 0 12px!important;}
  .hero .hero-trustline .hero-benefit{font-size:11px!important;padding:6px 8px!important;}
  .hero .hero-stats{margin-top:12px!important;}
}

/* Types section: use the developmental card as visual reference for all difficulties */
.types-section .type-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;
  gap:10px!important;
}
.types-section .type-card{
  padding:12px!important;
  min-height:auto!important;
  border-radius:16px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  overflow:hidden!important;
}
.types-section .type-card-head{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
}
.types-section .type-icon{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:10px!important;
  font-size:16px!important;
  margin:0!important;
  line-height:1!important;
  background:rgba(15,123,95,.10)!important;
}
.types-section .t-acad .type-icon{background:rgba(26,95,165,.10)!important;}
.types-section .type-name{
  font-size:13.5px!important;
  font-weight:800!important;
  line-height:1.35!important;
}
.types-section .type-desc{
  font-size:12px!important;
  line-height:1.55!important;
  color:var(--text-muted)!important;
  margin:0!important;
}
.types-section .type-card::after{content:none!important;display:none!important;}
.types-section .type-card:hover{transform:translateY(-1px)!important;box-shadow:0 5px 16px rgba(0,0,0,.08)!important;}
@media (max-width:760px){
  .types-section .type-grid{grid-template-columns:1fr 1fr!important;gap:8px!important;}
  .types-section .type-card{padding:10px!important;border-radius:14px!important;gap:5px!important;}
  .types-section .type-icon{width:28px!important;height:28px!important;min-width:28px!important;font-size:15px!important;}
  .types-section .type-name{font-size:12.5px!important;}
  .types-section .type-desc{font-size:11.2px!important;line-height:1.48!important;}
}
@media (max-width:360px){.types-section .type-grid{grid-template-columns:1fr!important;}}

/* Knowledge Hub: align non-source tabs with compact source style */
.about-section .knowledge-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;gap:10px!important;}
.about-section .knowledge-card{padding:12px!important;border-radius:16px!important;min-height:auto!important;display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;gap:9px!important;align-items:start!important;}
.about-section .knowledge-card .info-card-icon{width:30px!important;height:30px!important;min-width:30px!important;border-radius:10px!important;font-size:15px!important;margin:0!important;}
.about-section .knowledge-card .info-card-title{font-size:13px!important;line-height:1.35!important;margin:0 0 3px!important;}
.about-section .knowledge-card .info-card-desc{font-size:12px!important;line-height:1.55!important;margin:0!important;}
.about-section .knowledge-card .info-card-action{font-size:11.5px!important;margin-top:5px!important;}
.about-section .knowledge-tab-nav{gap:8px!important;}
.about-section .knowledge-tab-nav .tab-btn{font-size:12px!important;padding:8px 12px!important;border-radius:999px!important;}
@media (max-width:760px){
  .about-section .knowledge-grid{grid-template-columns:1fr!important;gap:8px!important;}
  .about-section .knowledge-card{padding:10px!important;grid-template-columns:28px minmax(0,1fr)!important;gap:8px!important;}
  .about-section .knowledge-card .info-card-icon{width:28px!important;height:28px!important;min-width:28px!important;font-size:14px!important;}
  .about-section .knowledge-card .info-card-title{font-size:12.5px!important;}
  .about-section .knowledge-card .info-card-desc,.about-section .knowledge-card .info-card-action{font-size:11.5px!important;}
}

/* Activities typo fixed in markup; keep section visually stable */
.activities-section .section-title{line-height:1.25!important;}
.activity-card{min-height:auto!important;}

/* Ask specialist: institutional tone */
.ask-section .teacher-name{font-weight:900!important;}
.ask-section .teacher-role{font-size:12px!important;}

/* Floating AI assistant */
.tmk-ai-assistant{position:fixed;inset-inline-start:18px;bottom:18px;z-index:9999;font-family:inherit;direction:rtl;}
.tmk-ai-toggle{display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(15,123,95,.24);background:var(--green,#0F7B5F);color:#fff;border-radius:999px;padding:10px 14px;font-weight:800;font-size:13px;box-shadow:0 10px 28px rgba(15,123,95,.22);cursor:pointer;}
.tmk-ai-icon{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;border-radius:999px;background:rgba(255,255,255,.16);}
.tmk-ai-panel{position:absolute;inset-inline-start:0;bottom:52px;width:min(340px,calc(100vw - 28px));background:var(--white,#fff);color:var(--text-primary,#222);border:1px solid var(--border,#e6e3dc);border-radius:20px;box-shadow:0 18px 48px rgba(0,0,0,.18);overflow:hidden;}
.tmk-ai-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 14px 10px;border-bottom:1px solid var(--border,#e6e3dc);}
.tmk-ai-head strong{display:block;font-size:14px;}
.tmk-ai-head small{display:block;color:var(--text-muted,#777);font-size:11.5px;margin-top:3px;}
.tmk-ai-close{border:0;background:transparent;color:inherit;font-size:22px;line-height:1;cursor:pointer;opacity:.75;}
.tmk-ai-body{padding:12px 14px 14px;}
.tmk-ai-note{font-size:12px;line-height:1.65;color:var(--text-muted,#777);margin:0 0 10px;}
.tmk-ai-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.tmk-ai-suggestions button{border:1px solid rgba(15,123,95,.18);background:rgba(15,123,95,.07);color:var(--green-dark,#0c5f49);border-radius:999px;padding:6px 9px;font-size:11.5px;cursor:pointer;}
.tmk-ai-answer{min-height:42px;border-radius:14px;background:var(--gray-50,#f7f6f2);padding:10px;font-size:12px;line-height:1.65;color:var(--text-primary,#222);margin-bottom:10px;}
.tmk-ai-input-row{display:flex;gap:6px;}
.tmk-ai-input{flex:1;min-width:0;border:1px solid var(--border,#e6e3dc);border-radius:12px;padding:9px 10px;font-family:inherit;font-size:12px;background:var(--white,#fff);color:var(--text-primary,#222);}
.tmk-ai-send{border:0;background:var(--green,#0F7B5F);color:#fff;border-radius:12px;padding:8px 11px;font-weight:800;font-size:12px;cursor:pointer;}
body.dark .tmk-ai-panel{background:var(--white,#181815);border-color:rgba(255,255,255,.12);box-shadow:0 18px 48px rgba(0,0,0,.45);}
body.dark .tmk-ai-suggestions button{color:#7ee0bd;background:rgba(34,197,94,.10);border-color:rgba(34,197,94,.22);}
body.dark .tmk-ai-answer{background:rgba(255,255,255,.06);}
body.dark .tmk-ai-input{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14);color:var(--text-primary,#eee);}
@media(max-width:560px){.tmk-ai-assistant{inset-inline-start:12px;bottom:12px}.tmk-ai-toggle{padding:9px 12px;font-size:12px}.tmk-ai-panel{bottom:50px;width:calc(100vw - 24px);}}


/* iOS Safari AI Assistant Zoom Fix */
.ai-assistant input,
.ai-assistant textarea,
.ai-chat-input,
.ai-assistant-panel textarea,
.ai-widget-panel textarea {
  font-size: 16px !important;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ai-assistant-panel,
  .ai-chat-panel,
  .ai-widget-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: auto !important;
    transform: none !important;
    overflow-x: hidden !important;
  }

  .ai-assistant-panel * {
    max-width: 100%;
    box-sizing: border-box;
  }
}
