/* =========================================
   TestEgy - main stylesheet
   colours: green = buttons, blue = headings/accents
   ========================================= */

:root {
  --green: #2ab381;
  --green-dark: #1f9468;
  --green-light: #e7f6ef;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eef4ff;
  --text: #1d2331;
  --text-2: #3b4456;
  --grey: #697386;
  --border: #e4e7ee;
  --bg: #f6f7f9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 2px 8px rgba(17, 24, 39, .04);
  --shadow-hover: 0 8px 24px rgba(17, 24, 39, .09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--text); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small { font-size: .8em; }
:focus-visible { outline: 3px solid rgba(42, 179, 129, .45); outline-offset: 2px; border-radius: 4px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 860px; }
.text-grey { color: var(--grey); }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 8px;
  padding: 10px 18px; font-size: .95rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 7px 13px; font-size: .86rem; }
.btn-big { padding: 13px 22px; font-size: 1.02rem; }
.btn-full { width: 100%; }
.btn-white { background: #fff; color: var(--text); border-color: var(--border); }
.btn-white:hover { background: var(--bg); border-color: #cfd4de; color: var(--text); }
.btn-soft { background: #fff; color: var(--blue-dark); border-color: #fff; }
.btn-soft:hover { background: #eef4ff; border-color: #eef4ff; }
.btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-line:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand img { width: 146px; height: auto; }

.top-search { position: relative; flex: 1; max-width: 380px; }
.top-search input {
  width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 999px;
  padding: 0 44px 0 18px; font-size: .92rem; background: var(--bg); color: var(--text);
}
.top-search input:focus { background: #fff; border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(42, 179, 129, .15); }
.top-search button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--grey); cursor: pointer; display: grid; place-items: center; }

.menu { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.menu-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 10px 12px; border-radius: 8px;
  font-size: .94rem; font-weight: 500; line-height: 1; color: var(--text-2); cursor: pointer;
}
.menu-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.menu .btn { margin-left: 4px; }
.arrow-down { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }

.menu-drop { position: relative; }
.drop-box {
  display: none; position: absolute; top: calc(100% + 8px); left: -10px; min-width: 310px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 8px;
}
.menu-drop.open .drop-box, .menu-drop:focus-within .drop-box { display: block; }
.drop-box a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: .92rem; }
.drop-box a:hover { background: var(--bg); text-decoration: none; }
.drop-box a small { margin-left: auto; color: var(--grey); }
.drop-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--clr); background: #f3f4f7; background: color-mix(in srgb, var(--clr) 12%, #fff); flex: none; }
.drop-box .drop-more { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; color: var(--green-dark); font-weight: 500; }

.burger { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.mob-menu { border-top: 1px solid var(--border); padding: 12px 20px 20px; background: #fff; max-height: calc(100vh - 68px); overflow: auto; }
.mob-menu > a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text); border-bottom: 1px solid #f1f2f5; }
.mob-search { display: flex; gap: 8px; margin-bottom: 8px; }
.mob-search input { flex: 1; height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 1rem; }
.mob-title { margin: 12px 0 2px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); }
.mob-btns { display: flex; gap: 10px; margin-top: 14px; }
.mob-btns .btn { flex: 1; }

/* search suggestions */
.search-hints { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-hover); z-index: 60; overflow: hidden; text-align: left; }
.search-hints a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--text); font-size: .92rem; border-bottom: 1px solid #f2f3f6; }
.search-hints a:last-child { border-bottom: 0; }
.search-hints a:hover, .search-hints a.active { background: var(--green-light); text-decoration: none; }
.search-hints small { color: var(--grey); white-space: nowrap; }

/* ---------- home banner ---------- */
.home-banner {
  padding: 54px 0 30px;
  background:
    radial-gradient(circle at 1px 1px, rgba(37, 99, 235, .10) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--blue-light) 0%, #fff 100%);
  border-bottom: 1px solid #dfe8fb;
}
.banner-cols { display: grid; grid-template-columns: 1.25fr .85fr; gap: 48px; align-items: center; }
.kicker { display: inline-block; margin-bottom: 12px; font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--blue); }
.home-banner h1 { font-size: clamp(2rem, 4.2vw, 3.05rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .45em; }
.scribble { position: relative; white-space: nowrap; color: var(--blue); }
.scribble svg { position: absolute; left: 0; bottom: -8px; width: 100%; height: 12px; color: #93b4f8; }
.intro-text { font-size: 1.06rem; color: var(--text-2); max-width: 640px; }

.big-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 620px; margin: 22px 0 14px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.big-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(42, 179, 129, .12); }
.big-search-icon { margin-left: 10px; color: var(--grey); flex: none; }
.big-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 6px; font-size: 1rem; color: var(--text); }
.big-search input:focus { outline: none; }
.big-search.inline { margin: 18px 0 0; }

.quick-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: .86rem; }
.quick-links span { color: var(--grey); margin-right: 2px; }
.quick-links a { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; color: var(--text-2); }
.quick-links a:hover { border-color: var(--green); color: var(--green-dark); text-decoration: none; }

.score-preview { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 18px 40px rgba(37, 99, 235, .12); padding: 20px 22px; transform: rotate(1.2deg); }
.sp-top { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: .82rem; color: var(--grey); }
.sp-top b { margin-left: 8px; font-weight: 500; }
.sp-dot { width: 9px; height: 9px; border-radius: 50%; background: #c7d7fb; }
.sp-dot:nth-child(2) { background: #f6dfb4; }
.sp-dot:nth-child(3) { background: #bfe8d8; }
.sp-marks strong { font-size: 2.6rem; font-weight: 700; }
.sp-marks span { color: var(--grey); margin-left: 4px; }
.sp-sections p { display: grid; grid-template-columns: 80px 1fr 56px; align-items: center; gap: 10px; margin: 8px 0; font-size: .85rem; }
.sp-sections i { position: relative; display: block; height: 8px; border-radius: 8px; background: #eef0f4; overflow: hidden; }
.sp-sections i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--green); border-radius: 8px; }
.sp-sections b { font-weight: 500; text-align: right; color: var(--text-2); }
.sp-rank { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--border); font-size: .86rem; color: var(--grey); }
.sp-rank b { color: var(--blue); }
.sp-sticker { position: absolute; top: -14px; right: -12px; padding: 5px 12px; border-radius: 999px; background: #2ab381; color: #fff; font-size: .78rem; font-weight: 600; transform: rotate(6deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .08); }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.numbers div { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.numbers strong { display: block; font-size: 1.35rem; color: var(--blue); }
.numbers span { font-size: .86rem; color: var(--grey); }

/* ---------- page blocks ---------- */
.block { padding: 56px 0; }
.block.grey { background: var(--bg); }
.block-sm { padding: 28px 0 56px; }
.block-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.block-title h2 { margin: 0; }
.block-title p { margin: 4px 0 0; color: var(--grey); font-size: .95rem; }
.block-title h2 small { color: var(--grey); font-weight: 400; }
.block-title > a { font-size: .92rem; font-weight: 500; white-space: nowrap; }

/* category boxes */
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cat-box {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 20px 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-box:hover { transform: translateY(-2px); border-color: var(--clr); box-shadow: var(--shadow-hover); text-decoration: none; }
.cat-icon {
  display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 8px; border-radius: 16px;
  color: var(--clr); background: #f3f4f7; background: color-mix(in srgb, var(--clr) 11%, #fff);
}
.cat-icon.big { width: 64px; height: 64px; margin: 0; }
.cat-icon.small { width: 34px; height: 34px; margin: 0; border-radius: 10px; }
.cat-svg .fill { fill: currentColor; fill-opacity: .18; }
.cat-name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.cat-count { font-size: .82rem; color: var(--grey); }

/* exam boxes */
.box-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.box-list.cols-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.exam-box { display: flex; flex-direction: column; padding: 16px 16px 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
.exam-box:hover { box-shadow: var(--shadow-hover); border-color: #d5d9e2; }
.exam-tags { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; margin-bottom: 8px; }
.exam-cat {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--clr); background: #f3f4f7; background: color-mix(in srgb, var(--clr) 10%, #fff);
}
a.exam-cat:hover { text-decoration: none; filter: brightness(.95); }
.free-tag { padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 500; color: var(--green-dark); background: var(--green-light); }
.exam-name { font-size: 1.02rem; line-height: 1.35; margin: 0 0 6px; }
.exam-name a { color: var(--text); }
.exam-name a:hover { color: var(--green-dark); }
.exam-info { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; font-size: .84rem; color: var(--grey); }
.exam-info span + span::before { content: "·"; margin-right: 12px; color: #c3c8d2; }
.exam-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f1f5; }
.price { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.price small { font-size: .75rem; font-weight: 400; color: var(--grey); }
.price s { margin-left: 4px; font-size: .8rem; font-weight: 400; color: var(--grey); }
.exam-actions { display: flex; gap: 6px; }

/* home tabs (like the old site) */
.tab-btns { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.tab-btns button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  font-size: .9rem; font-weight: 500; color: var(--text-2); cursor: pointer;
}
.tab-btns button .cat-svg { color: var(--clr); }
.tab-btns button:hover { border-color: var(--clr); }
.tab-btns button[aria-selected="true"] { background: #eef4ff; background: color-mix(in srgb, var(--clr) 10%, #fff); border-color: var(--clr); color: var(--text); }
.tab-pane { padding-top: 18px; }
.exam-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; }
.exam-links li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.exam-links a { color: var(--text); font-size: .95rem; font-weight: 500; }
.exam-links a:hover { color: var(--green-dark); }
.exam-links span { font-size: .8rem; color: var(--grey); }
.see-all { display: inline-block; margin-top: 14px; font-weight: 500; }

/* how it works / why */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.how-steps li { position: relative; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); counter-increment: step; }
.how-steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 600; }
.how-steps b { display: block; margin-bottom: 4px; }
.how-steps p { margin: 0; font-size: .92rem; color: var(--text-2); }
.why-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.why-list li { padding: 12px 14px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; }
.why-list b { display: block; }
.why-list span { font-size: .9rem; color: var(--grey); }

/* text content (blog, pages, exam text) */
.content { color: var(--text-2); }
.content h2 { margin-top: 1.6em; color: var(--text); }
.content h3 { margin-top: 1.3em; color: var(--text); }
.content > :first-child { margin-top: 0; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.content li { margin: .3em 0; }
.content a { text-decoration: underline; text-decoration-color: rgba(31, 148, 104, .35); text-underline-offset: 3px; }
.content a:hover { text-decoration-color: currentColor; }
.content img { border-radius: 8px; margin: 1.2em auto; }
.content figure { margin: 1.4em 0; }
.content blockquote { margin: 1.2em 0; padding: 10px 16px; border-left: 4px solid var(--blue); background: var(--blue-light); border-radius: 0 8px 8px 0; }
.content.small { font-size: .9rem; }
.table-scroll { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--border); border-radius: 8px; }
.content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.content th, .content td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.content th { background: var(--bg); font-weight: 600; color: var(--text); }
.content tr:last-child td { border-bottom: 0; }
ul.check-list { list-style: none; padding-left: 0; }
ul.check-list li { position: relative; margin: .6em 0; padding-left: 28px; }
ul.check-list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

/* category page: tips + faq */
.tips-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; counter-reset: tip; }
.tips-grid li { position: relative; padding: 18px 18px 18px 64px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); counter-increment: tip; }
.tips-grid li::before { content: counter(tip, decimal-leading-zero); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-light); color: var(--blue); font-weight: 700; font-size: .85rem; }
.faq-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.faq-side { position: sticky; top: 90px; }
.faq-side p { color: var(--grey); }

/* faq */
.faq h2 { margin-bottom: 14px; }
.faq details { margin-bottom: 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.faq summary { position: relative; padding: 14px 44px 14px 16px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--grey); }
.faq details[open] summary::after { content: "–"; }
.faq-ans { padding: 0 16px 4px; color: var(--text-2); }

/* app strip */
.app-strip { padding: 40px 0; background: var(--blue); color: #fff; }
.app-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.app-strip h2 { color: #fff; margin-bottom: .2em; }
.app-strip p { margin: 0; opacity: .9; }
.app-strip-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* inner page header */
.page-top { padding: 22px 0 30px; background: linear-gradient(180deg, var(--blue-light), #fff); border-bottom: 1px solid #dfe8fb; }
.page-top.small { padding-bottom: 22px; }
.page-top h1 { margin: .3em 0; }
.cat-heading { display: flex; align-items: center; gap: 16px; margin: 14px 0 10px; }
.cat-heading h1 { margin: 0; }
.cat-intro { max-width: 820px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .82rem; color: var(--grey); }
.breadcrumb li + li::before { content: "/"; margin: 0 6px; color: #c3c8d2; }
.breadcrumb a { color: var(--grey); }
.breadcrumb a:hover { color: var(--green-dark); }
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill-links a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .85rem; color: var(--text-2); }
.pill-links a .cat-svg { color: var(--clr); }
.pill-links a:hover, .pill-links a[aria-current] { border-color: var(--green); color: var(--green-dark); text-decoration: none; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.list-head p { margin: 0; color: var(--grey); }
.sort-form { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.sort-form select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: .9rem; }
.cat-section { margin-bottom: 36px; }
.with-icon { display: flex; align-items: center; gap: 10px; }
.no-result { padding: 20px; background: var(--bg); border-radius: var(--radius); }

/* ---------- exam page ---------- */
.exam-top { padding: 22px 0 34px; background: linear-gradient(180deg, var(--blue-light), #fff); border-bottom: 1px solid #dfe8fb; }
.exam-top-cols { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; margin-top: 12px; }
.exam-top h1 { margin: .45em 0 .35em; }
.exam-summary { color: var(--text-2); font-size: 1.02rem; }
.feature-tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tags li { padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .84rem; color: var(--text-2); }

.buy-card { position: relative; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-hover); }
.buy-card::before { content: ""; position: absolute; top: -1px; left: 20px; right: 20px; height: 4px; border-radius: 0 0 4px 4px; background: var(--green); }
.buy-card-tag { margin: 4px 0 6px; font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--blue); }
.buy-card-title { margin: 0 0 4px; font-weight: 600; line-height: 1.35; }
.buy-card-info { margin: 0 0 10px; font-size: .88rem; color: var(--grey); }
.buy-card-price { margin: 0 0 12px; font-size: 1.8rem; font-weight: 700; }
.buy-card-price s { font-size: 1rem; font-weight: 400; color: var(--grey); }
.compare-link { display: block; margin-top: 10px; text-align: center; font-size: .9rem; font-weight: 500; }
.small-note { margin: 10px 0 0; font-size: .78rem; color: var(--grey); text-align: center; }

.exam-page { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding-top: 32px; padding-bottom: 56px; }
.exam-content > section { margin-bottom: 36px; }
.exam-intro p { font-size: 1.02rem; }

.pack-list { display: grid; gap: 12px; }
.pack {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "info price" "details details";
  gap: 6px 20px; padding: 16px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
}
.pack-best { border-color: var(--green); box-shadow: 0 0 0 3px rgba(42, 179, 129, .1); }
.pack-name { grid-area: name; }
.pack-name h3 { margin: 0; font-size: 1rem; font-weight: 500; color: var(--text-2); }
.pack-label { margin: 0 0 2px; font-weight: 600; color: var(--text); }
.pack-label span { margin-left: 6px; padding: 2px 6px; border-radius: 4px; background: var(--green); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; vertical-align: 2px; }
.pack-info { grid-area: info; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--grey); }
.pack-info b { color: var(--text); }
.pack-price { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
.pack-details { grid-area: details; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.pack-details summary { cursor: pointer; font-size: .88rem; font-weight: 500; color: var(--green-dark); }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feature-list li { padding: 14px 16px; background: var(--bg); border-radius: 8px; }
.feature-list b { display: block; margin-bottom: 2px; }
.feature-list span { font-size: .9rem; color: var(--text-2); }

.widget { position: sticky; top: 88px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.widget-title { margin: 0 0 6px; font-weight: 600; }
.widget-links { list-style: none; margin: 0; padding: 0; }
.widget-links li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid #f1f2f5; }
.widget-links a { color: var(--text); font-size: .92rem; font-weight: 500; }
.widget-links a:hover { color: var(--green-dark); }
.widget-links span { font-size: .78rem; color: var(--grey); }

.mobile-buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(17, 24, 39, .08); }
.mobile-buy-bar div { display: flex; flex-direction: column; min-width: 0; }
.mobile-buy-bar b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-buy-bar span { font-size: .82rem; color: var(--grey); }

/* ---------- courses page ---------- */
.course-list { display: grid; gap: 16px; }
.course-card { display: grid; grid-template-columns: 220px 1fr 210px; gap: 22px; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.course-card:target { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.course-thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--blue-light); display: grid; place-items: center; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb-icon { color: var(--clr); }
.course-text h2 { margin: 8px 0 6px; font-size: 1.15rem; }
.course-facts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; color: var(--grey); }
.course-facts b { color: var(--text); }
.course-buy { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding-left: 20px; border-left: 1px dashed var(--border); text-align: center; }
.course-buy .price { font-size: 1.6rem; }
.save-tag { margin: 0; color: var(--green-dark); font-size: .85rem; font-weight: 600; }
.exam-fullform { margin: -4px 0 6px; color: var(--grey); font-size: .95rem; }

/* ---------- blog ---------- */
.post-item { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.post-thumb { display: block; aspect-ratio: 1.9 / 1; overflow: hidden; background: var(--bg); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-item:hover .post-thumb img { transform: scale(1.03); }
.thumb-letter { display: grid; place-items: center; height: 100%; font-size: 2.4rem; font-weight: 700; color: var(--blue); background: var(--blue-light); }
.post-text { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.post-text h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.4; }
.post-text h3 a { color: var(--text); }
.post-text h3 a:hover { color: var(--green-dark); }
.post-text p { margin: 0 0 10px; font-size: .9rem; color: var(--text-2); }
.post-text .post-date { margin: auto 0 0; font-size: .8rem; color: var(--grey); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span { min-width: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; text-align: center; font-size: .9rem; color: var(--text-2); }
.pagination span { background: var(--text); border-color: var(--text); color: #fff; }
.pagination a:hover { border-color: var(--green); text-decoration: none; }

/* blog list: latest post on top */
.post-featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; margin-bottom: 28px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.post-featured-img { display: block; aspect-ratio: 1.9 / 1; overflow: hidden; border-radius: 12px; background: var(--blue-light); }
.post-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.post-featured h2 { margin: 10px 0 8px; font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.post-featured h2 a { color: var(--text); }
.post-featured p { color: var(--text-2); }
.post-featured .post-date { color: var(--grey); font-size: .85rem; }

/* single article */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-progress span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .1s linear; }
.article-hero { padding: 22px 0 30px; background: linear-gradient(180deg, var(--blue-light), #fff); border-bottom: 1px solid #dfe8fb; }
.article-hero-inner { max-width: 1100px; }
.article-hero h1 { max-width: 860px; margin: 12px 0 10px; font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.2; }
.article-lead { max-width: 760px; margin: 0 0 18px; font-size: 1.08rem; color: var(--text-2); }
.label-tag { display: inline-block; margin-top: 14px; padding: 3px 10px; border-radius: 6px; background: #fff; border: 1px solid #cfdcfb; color: var(--blue-dark); font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.label-tag:hover { text-decoration: none; border-color: var(--blue); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--grey); font-size: .9rem; line-height: 1.35; }
.article-meta a { color: var(--text); font-weight: 600; }
.author-dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; flex: none; }
.author-dot.big { width: 54px; height: 54px; font-size: 1.3rem; }
.share-row { display: flex; gap: 6px; margin-left: auto; }
.share-row a, .share-row button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--text-2); cursor: pointer; }
.share-row a:hover, .share-row button:hover { border-color: var(--blue); color: var(--blue); }
.share-row button.copied { border-color: var(--green); color: var(--green-dark); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 48px; max-width: 1100px; padding-top: 30px; padding-bottom: 56px; }
.article { min-width: 0; max-width: 760px; }
.article-image { margin: 0 0 26px; }
.article-image img { width: 100%; border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, .08); }
.toc { margin-bottom: 26px; padding: 14px 18px; background: var(--bg); border-radius: var(--radius); }
.toc summary { font-weight: 600; cursor: pointer; }
.toc ol { margin: 10px 0 0; padding-left: 1.2em; font-size: .93rem; }
.toc-mobile { display: none; }
.article-body { font-size: 1.06rem; line-height: 1.8; color: #2f3747; }
.article-body h2 { position: relative; margin: 2em 0 .7em; padding-left: 14px; font-size: 1.45rem; scroll-margin-top: 90px; }
.article-body h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 4px; background: var(--blue); }
.article-body h3 { margin: 1.6em 0 .5em; font-size: 1.15rem; }
.article-body p { margin-bottom: 1.15em; }
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul li { position: relative; padding-left: 24px; }
.article-body ul li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.article-body ol { padding-left: 1.4em; }
.article-body ol li::marker { color: var(--blue); font-weight: 600; }
.article-body strong { color: var(--text); }
.article-body img { border-radius: 12px; }
.article-body blockquote { border-left-color: var(--blue); background: var(--blue-light); }
.inline-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 26px 0; padding: 16px 18px; border: 1px solid #cfdcfb; border-radius: 12px; background: var(--blue-light); }
.inline-cta div { display: flex; flex-direction: column; }
.inline-cta b { color: var(--text); }
.inline-cta span { font-size: .92rem; color: var(--text-2); }
.inline-cta .btn { text-decoration: none; }
.author-box { display: flex; gap: 16px; margin-top: 36px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.author-box p { margin: 4px 0 0; font-size: .92rem; color: var(--text-2); }
.article-tests { margin-top: 30px; padding: 22px; background: var(--green-light); border-radius: var(--radius); }
.article-tests h2 { font-size: 1.2rem; }
.article-side { position: relative; }
.side-toc, .side-cta { position: sticky; top: 90px; }
.side-toc { max-height: calc(100vh - 300px); overflow: auto; margin-bottom: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.side-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.side-toc li { counter-increment: toc; }
.side-toc a { display: block; padding: 6px 0 6px 10px; border-left: 2px solid var(--border); color: var(--text-2); font-size: .88rem; line-height: 1.4; }
.side-toc a:hover { color: var(--blue); text-decoration: none; }
.side-toc a.active { border-left-color: var(--blue); color: var(--blue); font-weight: 500; }
.side-cta { top: auto; padding: 18px; border-radius: var(--radius); background: #151a26; color: #c9cfdb; }
.side-toc + .side-cta { position: static; }
.side-cta .exam-cat { background: #fff; }
.side-cta-title { margin: 10px 0 4px; color: #fff; font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.side-cta-info { margin: 0 0 14px; font-size: .88rem; }
.more-posts { margin-top: 48px; }
.article-list { padding-left: 1.2em; }

/* ---------- footer ---------- */
.footer { padding: 48px 0 0; background: #151a26; color: #c9cfdb; font-size: .9rem; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer a { color: #e6eaf2; }
.footer a:hover { color: #fff; }
.footer-logo img { width: auto; height: 44px; padding: 6px 8px; border-radius: 8px; background: #fff; }
.footer-about p { margin: 14px 0; }
.footer-title { margin: 0 0 10px; font-weight: 600; color: #fff; }
.footer ul { list-style: none; margin: 0 0 18px; padding: 0; }
.footer li { margin: 6px 0; }
.app-btns { display: flex; flex-wrap: nowrap; gap: 8px; margin: 4px 0; }
.app-btn { display: inline-flex; flex: 0 1 auto; min-width: 0; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; white-space: nowrap; border: 1px solid #3a4252; border-radius: 10px; line-height: 1.15; }
.app-btn span { display: flex; flex-direction: column; font-weight: 600; }
.app-btn small { font-weight: 400; font-size: .7rem; opacity: .75; }
.app-btn:hover { border-color: #fff; text-decoration: none; }
.footer .social-icons { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.footer .social-icons li { margin: 0; }
.social-icons a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #3a4252; border-radius: 10px; color: #c9cfdb; transition: background .15s, color .15s, border-color .15s; }
.social-icons a:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.copyright { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 18px 20px; border-top: 1px solid #262d3b; font-size: .8rem; color: #8a93a6; }
.copyright p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .menu .menu-link { padding: 10px 8px; }
  .top-search { max-width: 260px; }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .exam-page { grid-template-columns: 1fr; }
  .widget { position: static; }
}
@media (max-width: 900px) {
  .menu, .top-search { display: none; }
  .burger { display: flex; }
  .home-banner { padding-top: 36px; }
  .banner-cols { grid-template-columns: 1fr; gap: 28px; }
  .score-preview { display: none; }
  .numbers { grid-template-columns: repeat(2, 1fr); margin-top: 28px; }
  .why-wrap { grid-template-columns: 1fr; gap: 28px; }
  .exam-top-cols { grid-template-columns: 1fr; gap: 20px; }
  .faq-wrap { grid-template-columns: 1fr; gap: 16px; }
  .faq-side { position: static; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-side { display: none; }
  .toc-mobile { display: block; }
  .post-featured { grid-template-columns: 1fr; gap: 14px; }
  .course-card { grid-template-columns: 160px 1fr; }
  .course-buy { grid-column: 1 / -1; padding: 12px 0 0; border-left: 0; border-top: 1px dashed var(--border); }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .block { padding: 40px 0; }
  .block-title { flex-direction: column; align-items: flex-start; gap: 6px; }
  .big-search { flex-wrap: wrap; padding: 8px; }
  .big-search input { height: 44px; flex: 1 1 70%; }
  .big-search .btn { width: 100%; }
  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-box { padding: 16px 10px 12px; }
  .cat-icon { width: 50px; height: 50px; }
  .how-steps, .feature-list, .tips-grid { grid-template-columns: 1fr; }
  .pack { grid-template-columns: 1fr; grid-template-areas: "name" "info" "price" "details"; }
  .course-card { grid-template-columns: 1fr; gap: 12px; }
  .course-buy { padding: 12px 0 0; border-left: 0; border-top: 1px dashed var(--border); }
  .pack-price { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 8px; }
  .footer-cols { grid-template-columns: 1fr; }
  .list-head { flex-direction: column; align-items: flex-start; }
  .exam-bottom { flex-direction: column; align-items: stretch; }
  .exam-actions { width: 100%; }
  .exam-actions .btn { flex: 1; }
  .cat-heading .cat-icon.big { width: 52px; height: 52px; }
  body.has-buy-bar { padding-bottom: 64px; }
  .share-row { margin-left: 0; width: 100%; }
  .article-body { font-size: 1.02rem; }
}
@media (min-width: 601px) { .mobile-buy-bar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* blog photo credit */
.photo-credit { margin-top: 6px; font-size: .78rem; color: var(--grey); text-align: right; }
.photo-credit a { color: inherit; text-decoration: underline; }

/* exam logos */
.exam-name.has-logo { display: flex; align-items: center; gap: 10px; }
.exam-logo { flex: none; width: 36px; height: 36px; object-fit: contain; padding: 3px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.exam-logo.big { width: 64px; height: 64px; padding: 5px; border-radius: 14px; }
h1.with-logo { display: flex; align-items: center; gap: 16px; }
@media (max-width: 600px) { .exam-logo.big { width: 48px; height: 48px; } h1.with-logo { gap: 12px; } }

/* course page */
.course-card h2 a { color: inherit; text-decoration: none; }
.course-card h2 a:hover { color: var(--blue); }
.course-blurb { margin: 0 0 6px; color: var(--text-2); font-size: .93rem; }
.more-link { font-size: .9rem; font-weight: 600; color: var(--blue); text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.course-lead { margin: 0 0 16px; font-size: 1.05rem; color: var(--text-2); max-width: 640px; }
.course-numbers { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; padding: 0; }
.course-numbers li { display: flex; flex-direction: column; min-width: 104px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.course-numbers b { font-size: 1.35rem; line-height: 1.2; color: var(--blue-dark); }
.course-numbers span { font-size: .8rem; color: var(--grey); }
.buy-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 6px 0 12px; border-radius: 10px; background: var(--bg); }
.buy-card .save-tag { margin: -6px 0 12px; }
.course-syllabus { margin: 36px 0; }
.syllabus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.syllabus-grid.single { grid-template-columns: 1fr; }
.syllabus-box { padding: 16px 18px; background: var(--bg); border-radius: 10px; }
.syllabus-box h3 { margin: 0 0 8px; font-size: 1rem; }
.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li { position: relative; margin: 0 0 7px; padding-left: 24px; }
.tick-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 11px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.tick-list.two-col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.syllabus-grid.single .tick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 20px; }
.start-steps li { margin-bottom: 8px; }
.more-tests { margin: 36px 0; }
@media (max-width: 900px) { .syllabus-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .tick-list.two-col { grid-template-columns: 1fr; } .course-numbers li { min-width: 0; flex: 1 1 40%; } }

@media print { .topbar, .footer, .mobile-buy-bar, .app-strip, .sidebar { display: none; } }
