/* toefl.css — TOEFL iBT
   (tách từ index.html; thứ tự nạp các file CSS phải giữ như trong index.html) */
/* ---------- TOEFL iBT practice ---------- */
#toefl{height:100%;overflow:auto;background:var(--soft)}
.tf-home{max-width:1000px;margin:0 auto;padding:24px 16px 40px}
.tf-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.tf-hero{background:linear-gradient(135deg,#0d3b66,#145c8f);color:#fff;border-radius:14px;padding:26px 28px;margin-bottom:16px}
.tf-hero h1{margin:10px 0 8px;font-size:28px}
.tf-hero p{margin:0;color:#d7e6f5;line-height:1.55;max-width:760px}
.tf-badge{display:inline-block;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.3);border-radius:999px;padding:4px 12px;font-size:13px;font-weight:700}
.tf-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px 22px;margin-bottom:16px}
.tf-card h2{font-size:19px;margin:0 0 4px}
.tf-card.locked{opacity:.75}
.tf-cardhead{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.tf-cardhead .fine{margin:2px 0 0}
.tf-secs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.tf-secbtn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:1px solid var(--line);background:#f7f9fc;border-radius:10px;padding:12px 14px;cursor:pointer;text-align:left;font-size:15px}
.tf-secbtn:hover{border-color:#145c8f;background:#eef5fb}
.tf-secbtn small{color:var(--muted)}
.tf-secbtn.locked{cursor:not-allowed;color:var(--muted)}
.tf-guide{width:100%;border-collapse:collapse;font-size:14px;margin:8px 0}
.tf-guide th,.tf-guide td{border-bottom:1px solid #e8edf2;padding:8px 6px;text-align:left;vertical-align:top}
.tf-guide th{white-space:nowrap}

.tf-exam{min-height:100%;display:flex;flex-direction:column;background:#fff}
.tf-bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:14px;background:#0d3b66;color:#fff;padding:8px 14px;flex-wrap:wrap}
.tf-brand b{font-size:16px}.tf-brand span{opacity:.75;font-size:13px}
.tf-sec{font-size:14px;opacity:.9}
.tf-count{margin-left:auto;font-size:14px;font-weight:700}
.tf-timer{display:flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums;font-weight:700;background:rgba(255,255,255,.12);padding:4px 6px 4px 10px;border-radius:6px}
.tf-timer.low{background:#b3261e}
.tf-mini{border:1px solid rgba(255,255,255,.4);background:transparent;color:inherit;border-radius:4px;padding:2px 8px;font-size:12px;cursor:pointer}
.tf-results .tf-mini,.tf-recs .tf-mini{border-color:var(--line);color:var(--ink)}
.tf-nav{display:flex;gap:6px}
.tf-tools{display:flex;align-items:center;gap:4px}
.tf-tool{display:inline-flex;flex-direction:column;align-items:center;gap:1px;min-width:54px;border:0;background:transparent;color:#fff;font:600 11.5px Arial,sans-serif;padding:3px 8px;border-radius:4px;cursor:pointer}
.tf-tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tf-tool:hover,.tf-tool[aria-expanded="true"]{background:rgba(255,255,255,.14)}
.tf-tool:focus-visible{outline:2px solid #f2b705;outline-offset:1px}
.tf-volwrap{position:relative}
.tf-volpop{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);z-index:20;display:flex;align-items:center;gap:8px;background:#fff;color:#0d3b66;border:1px solid #cfdbe7;border-radius:6px;box-shadow:0 6px 20px rgba(0,0,0,.2);padding:10px 12px;font-weight:700}
.tf-volpop[hidden]{display:none}
.tf-volpop input{width:150px;accent-color:#0d3b66}
.tf-help h4{margin:14px 0 6px}
.tf-help ul{margin:0;padding-left:20px;line-height:1.6}
.tf-btn{border:1px solid rgba(255,255,255,.55);background:#fff;color:#0d3b66;font-weight:700;border-radius:4px;padding:7px 16px;cursor:pointer;font-size:14px}
.tf-btn.pri{background:#f2b705;border-color:#f2b705;color:#1b1f24}
.tf-btn.ghost{background:transparent;color:#fff;padding:7px 10px}
.tf-strip{background:#e6eef6;border-bottom:1px solid #cfdbe7;padding:9px 18px;font-weight:700;font-size:15px;color:#0d3b66}
.tf-main{flex:1;padding:22px 18px 40px;font-size:calc(16px * var(--examZoom, 1));line-height:1.6}
.tf-dir{max-width:760px;margin:0 auto}
.tf-dir li{margin-bottom:6px}
.tf-split{display:grid;grid-template-columns:1fr 1fr;gap:26px;max-width:1200px;margin:0 auto}
.tf-left{border-right:1px solid #e3e8ee;padding-right:26px;max-height:calc(100vh - 160px);overflow:auto}
.tf-passage h3,.tf-ctw h3{margin:0 0 10px;font-size:18px}
.tf-ctw{max-width:820px;margin:0 auto}
.tf-ctw p{line-height:2.3}
.tf-word{white-space:nowrap}
.tf-blank{font:inherit;border:0;border-bottom:2px solid #145c8f;background:#eef5fb;padding:0 3px;margin:0 1px;border-radius:3px 3px 0 0;letter-spacing:.06em}
.tf-blank:focus{outline:2px solid #7aa7ff;background:#fff}
.tf-blank::placeholder{color:#8aa3bb;letter-spacing:.12em}
.tf-q .tf-qtext{font-weight:700;margin:0 0 12px}
.tf-opts{display:grid;gap:8px}
.tf-opt{display:flex;gap:10px;align-items:flex-start;border:1px solid #d8e0e8;border-radius:6px;padding:10px 12px;cursor:pointer}
.tf-opt:hover{background:#f5f8fb}
.tf-opt input{margin-top:5px}
.tf-opt:has(input:checked){border-color:#145c8f;background:#eef5fb}
.tf-doc{border:1px solid #d8e0e8;border-radius:8px;padding:16px 18px;background:#fbfcfd}
.tf-notice h4{margin:0 0 8px;font-size:16px;letter-spacing:.02em}
.tf-mailhead{border-bottom:1px solid #d8e0e8;padding-bottom:8px;margin-bottom:10px;font-size:.95em}
.tf-chat{display:flex;flex-direction:column;gap:10px}
.tf-bubble{max-width:85%;padding:9px 13px;border-radius:14px;background:#eef2f6}
.tf-bubble small{display:block;font-size:12px;color:var(--muted);font-weight:700}
.tf-bubble.r{align-self:flex-end;background:#e3f0fb}
.tf-listen{max-width:640px;margin:10px auto;text-align:center}
.tf-ill{background:#f3f6f9;border-radius:12px;padding:18px}
.tf-ill.sm{max-width:320px;margin:0 auto 18px;padding:10px}
.tf-svg{width:100%;max-width:300px;height:auto}
.tf-illcap{font-size:13px;color:var(--muted);margin-top:4px}
.tf-listening{font-weight:700;color:#0d3b66}
.tf-prog{height:8px;background:#e3e8ee;border-radius:99px;overflow:hidden;margin:10px auto;max-width:420px}
.tf-prog i{display:block;height:100%;width:0;background:#145c8f;transition:width .25s linear}
.tf-lq{max-width:760px;margin:0 auto}
.tf-bas{max-width:760px;margin:0 auto}
.tf-tpl{line-height:2.4}
.tf-slot{display:inline-block;min-width:74px;height:32px;vertical-align:middle;border-bottom:2px solid #145c8f;margin:0 3px}
.tf-slot.on{border:1px solid #145c8f;background:#fff;border-radius:6px;padding:0 10px;cursor:pointer;font:inherit;min-width:0;height:auto}
.tf-tiles{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px;justify-content:center}
.tf-tile{border:1px solid #9fb3c8;background:#fff;border-radius:6px;padding:6px 14px;font:inherit;cursor:pointer}
.tf-tile:hover{background:#eef5fb}
.tf-tile.used{opacity:.3;cursor:default}
.tf-dirbox{background:#f5f8fb;border:1px solid #dde5ee;border-radius:8px;padding:12px 16px;margin-bottom:14px}
.tf-post{border-left:3px solid #9fb3c8;padding:6px 0 6px 12px;margin-bottom:12px}
.tf-post.prof{border-color:#0d3b66}
.tf-post p{margin:4px 0 0}
.tf-ta{width:100%;min-height:340px;font:inherit;line-height:1.55;padding:12px;border:1px solid #b9c6d3;border-radius:6px;resize:vertical}
.tf-wc{text-align:right;font-size:13px;color:var(--muted);margin-top:4px}
.tf-rec{display:inline-flex;align-items:center;gap:10px;font-size:20px;color:#b3261e;margin:24px 0 6px}
.tf-dot{width:14px;height:14px;border-radius:50%;background:#b3261e;animation:tfPulse 1s infinite}
@keyframes tfPulse{50%{opacity:.3}}
.tf-results{max-width:1000px;margin:0 auto}
.tf-overall{display:flex;justify-content:center;margin-bottom:18px}
.tf-overall>div{display:flex;flex-direction:column;align-items:center;background:#0d3b66;color:#fff;border-radius:14px;padding:16px 36px}
.tf-overall b{font-size:44px;line-height:1.1}
.tf-overall small,.tf-overall span{font-size:13px;opacity:.85}
.tf-rgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-bottom:14px}
.tf-rcard{border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.tf-rcard h3{margin:0 0 6px}
.tf-score{font-size:40px;font-weight:700;color:#0d3b66;line-height:1.1}
.tf-score small{font-size:16px;color:var(--muted);margin-left:4px}
.tf-score.pend{color:#9fb3c8}
.tf-cefr{font-weight:700;color:#145c8f;font-size:14px}
.tf-mini-t{width:100%;font-size:13px;border-collapse:collapse}
.tf-mini-t td{border-top:1px solid #eef1f4;padding:4px 0}
.tf-mini-t td:last-child{text-align:right}
.tf-recs{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
.tf-recs>div{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;border-top:1px solid #eef1f4;padding:5px 0}
.examsw{display:inline-flex;gap:4px;background:#e6ecf2;border-radius:10px;padding:4px;margin:0 0 14px}
.examsw button{border:0;background:transparent;border-radius:7px;padding:7px 14px;font-weight:700;font-size:14px;cursor:pointer;color:var(--muted)}
.examsw button[aria-pressed="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
@media (max-width:760px){
  .tf-secs{grid-template-columns:1fr 1fr}
  .tf-split{grid-template-columns:1fr}
  .tf-left{border-right:0;padding-right:0;max-height:none;border-bottom:1px solid #e3e8ee;padding-bottom:16px}
  .tf-count{margin-left:0}
  .tf-hero{padding:20px}
}
