/* Test Prep Center hub (dashboard/views/test-prep/index.php). Scoped to .tph; sizes follow the
   container (hub popup or full page) via container queries. */
.tph{container-type:inline-size;margin:12px 0 24px;color:#10275f;font-family:inherit;
  --tph-line:#dde7f3;--tph-muted:#5b6a85;--tph-teal:#0f7c86}
.tph *{box-sizing:border-box}
.tph [hidden]{display:none!important}
.tph h2,.tph h3,.tph p{margin:0}
.tph-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}
.tph-banner{display:block;border-radius:18px;overflow:hidden;background:#eef6ff}
.tph-banner img{display:block;width:100%;height:auto}

/* Category bar (Store-style pills) */
.tph-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 16px;padding-bottom:12px;border-bottom:1px solid var(--tph-line);scroll-margin-top:12px}
.tph-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;min-width:0}
.tph-tabs::-webkit-scrollbar{display:none}
.tph-tabs a{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;border:1px solid transparent;
  color:#3d4a63;font-size:14px;font-weight:600;text-decoration:none!important;white-space:nowrap;transition:background .15s,color .15s}
.tph-tabs a:hover{background:#f0f6fb;color:#10275f}
.tph-tabs a.is-active{background:#e6f4f5;border-color:#9fd3d7;color:var(--tph-teal)}
.tph-tabs a:focus-visible,.tph a:focus-visible{outline:3px solid #197cdf;outline-offset:2px}
.tph-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--tph-teal);color:#fff;font-size:11px}
.tph-bar-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border:1px solid #cfdbe8;border-radius:10px;background:#fff;color:#10275f!important;font-size:13px;font-weight:600;text-decoration:none!important}
.tph-bar-btn:hover{border-color:#8fb7da;background:#f6fbff}

/* Chips, links, pills */
.tph-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 20px;border-radius:999px;
  background:var(--tph-grad,#0c3a86);color:#fff!important;font-weight:750;font-size:15px;text-decoration:none!important;white-space:nowrap;box-shadow:0 4px 12px rgba(16,39,95,.18)}
.tph-cta:hover{filter:brightness(1.08)}

.tph-chip{display:inline-block;padding:3px 10px;border-radius:999px;font-size:11.5px;font-weight:700;line-height:1.5;white-space:nowrap;vertical-align:middle}
.tph-chip--available{background:#dff5e9;color:#0b6a3f}
.tph-chip--partial{background:#e4effc;color:#1a5aa6}
.tph-chip--soon{background:#fff3dc;color:#8a5a00}
.tph-link{display:inline-block;margin-top:10px;font-weight:700;font-size:14px;color:var(--tph-teal)!important}
.tph-pill{flex:0 0 auto;display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;background:var(--tph-ink,#0c3a86);color:#fff!important;font-size:13px;font-weight:700;text-decoration:none!important}
.tph-pill:hover{filter:brightness(1.12)}
.tph-pill--ghost{background:#fff;color:#10275f!important;border:1px solid #cfdbe8}
.tph-muted{color:var(--tph-muted);font-size:14px;line-height:1.5;margin-top:8px!important}
.tph-back{display:inline-flex;align-items:center;gap:8px;margin:0 0 12px;padding:8px 16px 8px 12px;border-radius:999px;background:#fff;border:1px solid #cfdbe8;
  box-shadow:0 2px 8px rgba(16,39,95,.08);font-size:14px;font-weight:700;color:#10275f!important;text-decoration:none!important;transition:background .15s,border-color .15s}
.tph-back svg{color:var(--tph-tone,#0f7c86);transition:transform .2s ease}
.tph-back:hover{background:#f3f8fe;border-color:#9fbfe0}
.tph-back:hover svg{transform:translateX(-3px)}

/* All Exams: progress strip under the tiles */
.tph-strip{display:grid;grid-template-columns:1fr;gap:14px;margin-top:16px}
@container (min-width:760px){.tph-strip{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}}
.tph-strip > *,.tph-card{background:#fff;border:1px solid var(--tph-line);border-radius:16px;padding:16px 18px}
.tph-strip-note h2{font-size:16px;font-weight:800;margin-bottom:8px}
.tph-strip-note ul{margin:0;padding-left:18px;color:#33415e;font-size:14px;line-height:1.6}

/* Progress block */
.tph-prog-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.tph-prog-head strong{font-size:24px;font-weight:900;color:#10275f}
.tph-prog-head span{color:var(--tph-muted);font-size:14px}
.tph-meter{height:8px;border-radius:99px;background:#e8eef6;overflow:hidden;margin-top:8px}
.tph-meter span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1577d5,#0fa3a8)}
.tph-next{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding:10px 14px;border-radius:12px;background:#f1f7fe;border:1px solid #d5e5f6;color:#10275f!important;font-weight:700;text-decoration:none!important}
.tph-next small{display:block;font-weight:600;color:var(--tph-muted);font-size:12px}
.tph-next:hover{background:#e7f1fd}

/* Exam area */
.tph-exam-hero{display:grid;grid-template-columns:1fr;gap:18px;padding:16px;border-radius:18px;background:var(--tph-bg);border:1px solid rgba(255,255,255,.9)}
@container (min-width:700px){.tph-exam-hero{grid-template-columns:minmax(200px,280px) 1fr;align-items:center}}
.tph-exam-art{display:block;width:100%;height:auto;max-width:340px;aspect-ratio:1;object-fit:cover;border-radius:14px;box-shadow:0 6px 18px rgba(16,39,95,.12);background:#fff}
.tph-exam-name{font-size:clamp(26px,3.4vw,36px);font-weight:900;color:var(--tph-ink,#10275f);line-height:1.1;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tph-exam-tag{font-size:16px;font-weight:700;color:#24324f;margin:4px 0 10px!important}
.tph-exam-intro > p:not(.tph-exam-tag),.tph-exam--more > p{color:#33415e;font-size:14.5px;line-height:1.6}
.tph-exam--more > p{margin-bottom:14px}
.tph-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin:14px 0 0}
.tph-facts div{background:rgba(255,255,255,.8);border-radius:12px;padding:8px 12px}
.tph-facts dt{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--tph-muted)}
.tph-facts dd{margin:2px 0 0;font-size:14px;font-weight:600;color:#10275f}
.tph-h{font-size:16px;font-weight:800;color:#10275f;margin:18px 0 10px!important}
.tph-card .tph-h{margin-top:0!important}
.tph-skills{display:grid;grid-template-columns:1fr;gap:12px}
@container (min-width:520px){.tph-skills{grid-template-columns:repeat(2,1fr)}}
@container (min-width:900px){.tph-skills{grid-template-columns:repeat(4,1fr)}}
.tph-skill{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px 16px;border-radius:16px;background:#fff;border:1px solid var(--tph-line)}
.tph-skill strong{font-size:16px}
.tph-skill p{font-size:13.5px;color:#3f4c66;line-height:1.5}
.tph-skill.is-soon{background:#fbfcfe}
.tph-skill-ic{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:#fff;background:#1577d5}
.tph-skill--listening .tph-skill-ic{background:#13a35b}
.tph-skill--speaking .tph-skill-ic{background:#f07a12}
.tph-skill--writing .tph-skill-ic{background:#e2335f}
.tph-exam--ielts .tph-skill--reading .tph-skill-ic{background:#c8102e}
.tph-exam--ielts .tph-skill--writing .tph-skill-ic{background:#7b2fd6}
.tph-skill.is-soon .tph-skill-ic{opacity:.55}
.tph-skill .tph-link{margin-top:auto}
.tph-cols{display:grid;grid-template-columns:1fr;gap:14px;margin-top:14px}
@container (min-width:900px){.tph-cols{grid-template-columns:repeat(3,minmax(0,1fr))}.tph-cols--2{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container (min-width:560px) and (max-width:899.98px){.tph-cols--2{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tph-card--wide{margin-top:14px}
.tph-rows{list-style:none;margin:0;padding:0}
.tph-rows li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid #edf2f8}
.tph-rows li:first-child{border-top:0;padding-top:0}
.tph-rows li > span:first-child{min-width:0}
.tph-rows strong{display:block;font-size:14px;color:#10275f}
.tph-rows small{display:block;font-size:12.5px;color:var(--tph-muted);line-height:1.4}
.tph-rows li.is-soon strong{color:#5b6a85}
.tph-tips{margin:0;padding-left:18px;font-size:14px;line-height:1.55;color:#33415e}
.tph-tips li+li{margin-top:6px}

/* My Progress */
.tph-exam-pick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tph-pick{padding:12px 14px;border-radius:14px;border:1px solid var(--tph-line);background:#fbfcfe}
.tph-pick strong{display:block;font-size:17px;font-weight:900}
.tph-pick span{font-size:13px;color:var(--tph-muted)}
.tph-pick.is-on{background:linear-gradient(135deg,#e2effd,#f4f9ff);border-color:#a9c9ec}
.tph-pick--toefl strong{color:#0c3a86}.tph-pick--ielts strong{color:#c8102e}.tph-pick--toeic strong{color:#0b6a4b}
.tph-scores{list-style:none;margin:0;padding:0}
.tph-scores li{position:relative;display:flex;justify-content:space-between;padding:8px 0 12px;font-size:14px}
.tph-scores i{position:absolute;left:0;bottom:4px;height:5px;border-radius:9px;background:#1577d5}
.tph-scores li::after{content:"";position:absolute;left:0;right:0;bottom:4px;height:5px;border-radius:9px;background:#e8eef6;z-index:-1}
.tph-scores li{isolation:isolate}

@media (max-width:575.98px){
  .tph{margin:8px 0 18px}
  .tph-banner{border-radius:14px}
  .tph-bar-btn{display:none}
  .tph-tile{min-height:220px;padding:16px 14px 14px}
  .tph-cta{font-size:14px;padding:10px 14px}
  .tph-exam-pick{grid-template-columns:1fr}
  .tph-exam-art{max-width:none;aspect-ratio:16/10;object-position:center 35%}
  .tph-strip > *,.tph-card{padding:14px}
}

/* Exam tiles: the dashboard main-tile look (icon square, inner focus list, gradient button), one colour per exam */
.tph-grid{display:grid;grid-template-columns:1fr;gap:14px}
@container (min-width:560px){.tph-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container (min-width:1040px){.tph-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}}
.tph-exam--toefl,.tph-tile--toefl{--tph-ink:#0b5fd6;--tph-tone:#0879ff;--tph-grad:linear-gradient(90deg,#16b5e8,#0870f0);--tph-bg:linear-gradient(135deg,#e2effd 0%,#f4f9ff 60%,#eaf4ff 100%)}
.tph-exam--ielts,.tph-tile--ielts{--tph-ink:#c8102e;--tph-tone:#e0233f;--tph-grad:linear-gradient(90deg,#f45b74,#c8102e);--tph-bg:linear-gradient(135deg,#fde4ea 0%,#fff3f5 60%,#fde9ee 100%)}
.tph-exam--toeic,.tph-tile--toeic{--tph-ink:#0b6a4b;--tph-tone:#12a170;--tph-grad:linear-gradient(90deg,#2cc68a,#0b7a55);--tph-bg:linear-gradient(135deg,#dcf5ea 0%,#f1fbf7 60%,#e2f6ee 100%)}
.tph-exam--more,.tph-tile--more{--tph-ink:#4a2a9b;--tph-tone:#6a4cf0;--tph-grad:linear-gradient(90deg,#9a7cf6,#5b3bd6);--tph-bg:linear-gradient(135deg,#ece6fb 0%,#f7f4fe 60%,#efe9fc 100%)}
.tph-tile{position:relative;display:flex;flex-direction:column;gap:12px;padding:20px 18px 18px;border-radius:20px;background:#fff;
  border:1px solid color-mix(in srgb,var(--tph-tone) 16%,#e3eaf3);box-shadow:0 6px 20px rgba(16,39,95,.08);overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
.tph-tile::before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:var(--tph-grad);transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.tph-tile:hover{transform:translateY(-3px);box-shadow:0 14px 30px color-mix(in srgb,var(--tph-tone) 18%,transparent)}
.tph-tile:hover::before{transform:scaleX(1)}
.tph-tile-head{display:flex;align-items:center;gap:12px}
.tph-tile-icon{flex:0 0 52px;width:52px;height:52px;border-radius:15px;display:inline-flex;align-items:center;justify-content:center;color:#fff;
  background:var(--tph-grad);box-shadow:0 6px 14px color-mix(in srgb,var(--tph-tone) 30%,transparent);transition:transform .2s ease}
.tph-tile:hover .tph-tile-icon{transform:rotate(-8deg) scale(1.08)}
.tph-tile-head h2{margin:0;font-size:18.5px;font-weight:850;letter-spacing:-.25px;line-height:1.25}
.tph-tile-head h2 a{color:#10275f!important;text-decoration:none!important}
.tph-stretch::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit}
.tph-tile-text{color:#5b6a85;font-size:14px;line-height:1.55;margin:0}
.tph-focus{list-style:none;margin:0;padding:6px;border-radius:14px;background:color-mix(in srgb,var(--tph-tone) 6%,#fff);border:1px solid color-mix(in srgb,var(--tph-tone) 14%,#fff)}
.tph-focus li{display:flex;align-items:center;gap:10px;padding:7px 8px;font-size:14px;font-weight:600;color:#1d2b4f;line-height:1.3}
.tph-focus svg{flex:0 0 18px;color:var(--tph-tone)}
.tph-tile .tph-chip{align-self:flex-start}
.tph-tile-cta{position:relative;z-index:2;margin-top:auto;display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 18px;border-radius:999px;
  background:var(--tph-grad);color:#fff!important;font-weight:750;font-size:15px;text-decoration:none!important;box-shadow:0 6px 14px color-mix(in srgb,var(--tph-tone) 25%,transparent);transition:filter .15s ease}
.tph-tile-cta svg{transition:transform .2s ease}
.tph-tile:hover .tph-tile-cta{filter:brightness(1.06)}
.tph-tile:hover .tph-tile-cta svg{transform:translateX(4px)}
.tph-tile-cta:focus-visible{outline:3px solid #ffcc45;outline-offset:3px}
@media (prefers-reduced-motion:reduce){.tph-tile,.tph-tile::before,.tph-tile-icon,.tph-tile-cta svg{transition:none}.tph-tile:hover{transform:none}}
