/* =====================================================================
   SRO theme — WordPress pages (posts, categories, pages, search).
   Everything else (header, drawer, footer, buttons, cards, chips) comes from base.css,
   the same stylesheet as the PYQ platform.
   ===================================================================== */

/* Updates bar under the header: the categories job-seekers switch between. */
.upd-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.upd-bar-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.upd-bar-in::-webkit-scrollbar { display: none; }
.upd-bar a { flex: none; font-size: .84rem; font-weight: 600; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.upd-bar a:hover { border-color: var(--brand-100); color: var(--ink); }
.upd-bar a[aria-current='page'] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.upd-bar a.upd-bar-pyq { margin-left: auto; color: var(--brand-600); border-color: var(--brand-100); background: var(--brand-50); }

.wp-layout { margin-top: 14px; }
.wp-layout > * { min-width: 0; }
@media (min-width: 1051px) { .wp-aside { position: sticky; top: 84px; } }

/* ---------- Post ---------- */
.post { padding: clamp(16px, 3vw, 28px); }
.post-head { margin-bottom: 18px; }
.post-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.post-head h1 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.2; margin: 0 0 10px; }
.post-meta { margin: 0 0 14px; color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.post-thumb { margin: 0 0 18px; }
.post-thumb img { width: 100%; height: auto; border-radius: var(--r); }

.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: .84rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.share .share-wa { color: #0f7d42; border-color: color-mix(in srgb, #25d366 40%, transparent); }
.share .share-tg { color: #1a6fa3; border-color: color-mix(in srgb, #2aabee 40%, transparent); }
.share .share-copy.ok { color: var(--good); border-color: var(--good-2); }

/* Article typography: built for long reading on a phone. */
.entry { font-size: 1.02rem; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; }
.entry > * { max-width: 100%; }
.entry p { margin: 0 0 1em; }
.entry h2 { font-size: clamp(1.18rem, 1.05rem + .6vw, 1.45rem); line-height: 1.3; margin: 1.8em 0 .7em; padding-top: .9em; border-top: 1px solid var(--line); scroll-margin-top: 130px; }
.entry h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.entry h3 { font-size: 1.08rem; margin: 1.4em 0 .5em; scroll-margin-top: 130px; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1em; }
.entry li { margin: .25em 0; }
.entry li::marker { color: var(--brand-hot); }
.entry a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 0 auto; }
.entry figure { margin: 1.2em 0; }
.entry figcaption, .entry .wp-caption-text { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 6px; }
.entry blockquote { margin: 1.2em 0; padding: 12px 16px; border-left: 4px solid var(--brand-hot); background: var(--brand-50); border-radius: 0 12px 12px 0; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry iframe { max-width: 100%; border: 0; border-radius: 12px; }
.entry .alignleft { float: left; margin: 0 1em 1em 0; }
.entry .alignright { float: right; margin: 0 0 1em 1em; }
.entry .aligncenter { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .entry .alignleft, .entry .alignright { float: none; margin: 0 auto 1em; } }

/* Tables (dates, fees, vacancies, links): readable cards on phones, never wider than the screen. */
.tbl-x { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.entry table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.55; margin: 0; }
.entry table th, .entry table td { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry table tr > :last-child { border-right: 0; }
.entry table tbody tr:last-child > * { border-bottom: 0; }
.entry table th { background: var(--surface-2); font-weight: 700; font-size: .86rem; color: var(--ink); }
.entry table thead th { background: var(--brand-50); color: var(--brand-ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.entry table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.entry table ul, .entry table ol { margin: 0; padding-left: 1.1em; }
.entry table p { margin: 0 0 .4em; }
.entry table p:last-child { margin: 0; }
.entry table.is-2col td:first-child { font-weight: 600; width: 42%; }
.entry table:not(.is-2col) { min-width: 520px; }
@media (min-width: 641px) { .entry table:not(.is-2col) { min-width: 0; } }

/* "Click here / Apply online" links become clear buttons. */
/* Buttons placed inside the article keep their own colours */
.entry a.btn { text-decoration: none; }
.entry a.btn-primary, .entry a.btn-primary:hover { color: var(--on-brand); }
.entry a.btn-soft, .entry a.btn-soft:hover { color: var(--brand-ink, var(--brand-600)); }
.entry a.btn-tg, .entry a.btn-tg:hover { color: #fff; }
.entry a.cta-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 10px; background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 700; font-size: .9rem; line-height: 1.3; }
.entry a.cta-link::after { content: '→'; }
.entry a.cta-link:hover { background: var(--brand-600); color: var(--on-brand); }
.entry table.is-links td { vertical-align: middle; }

/* Contents box */
.sro-toc { margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.sro-toc summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 700; }
.sro-toc summary span { flex: 1 1 auto; }
.sro-toc summary small { margin-left: auto; }
.sro-toc summary::-webkit-details-marker { display: none; }
.sro-toc summary small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.sro-toc summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; margin-left: 4px; }
.sro-toc[open] summary::after { transform: rotate(225deg); }
.sro-toc ol { margin: 0; padding: 0 14px 12px 34px; font-size: .92rem; line-height: 1.5; }
.sro-toc li { margin: 6px 0; }
.sro-toc a { color: var(--ink-2); text-decoration: none; }
.sro-toc a:hover { color: var(--brand-600); text-decoration: underline; }

/* Practice / Telegram / rank boxes inside posts */
.sro-box { display: flex; gap: 14px; align-items: flex-start; margin: 1.6em 0; padding: 16px; border-radius: 16px; border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--brand-100), var(--line)) border-box; box-shadow: var(--shadow-sm); }
.sro-box img { flex: none; width: 48px; height: 48px; border-radius: 0; margin: 0; }
.sro-box b { display: block; font-family: var(--font-display); font-size: 1.04rem; line-height: 1.3; }
.sro-box p { margin: 4px 0 10px; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.sro-box-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.entry .sro-box a.btn { text-decoration: none; }
.sro-box-tg { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #2aabee, #1b84c9) border-box; }
.sro-box-rank { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #f5b82e, #f2662a) border-box; }
@media (max-width: 420px) { .sro-box { padding: 14px; gap: 12px; } .sro-box img { width: 40px; height: 40px; } }

.post-foot { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line-2); display: grid; gap: 12px; }
.post-note { margin: 0; font-size: .84rem; color: var(--muted); }

/* ---------- Lists (category, search, related) ---------- */
.post-rows { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.post-rows li + li { border-top: 1px solid var(--line); }
.post-rows a { display: grid; gap: 6px; padding: 14px 16px; color: var(--ink); }
.post-rows a:hover { background: var(--surface-2); }
.pr-t { font-weight: 600; font-size: .98rem; line-height: 1.4; }
.post-rows a:hover .pr-t { color: var(--brand-600); }
.pr-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); }
.pr-m .chip { font-size: .68rem; padding: 2px 8px; }
.pr-new { text-transform: uppercase; letter-spacing: .04em; }

.arch-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; padding: 18px; margin-top: 12px; background: linear-gradient(135deg, var(--surface), var(--brand-50)); }
.arch-head .eyebrow { color: var(--brand-ink); background: var(--surface); border-color: var(--brand-100); margin-bottom: 10px; }
.arch-head h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem); }
.arch-head h1 small { font-size: .55em; color: var(--muted); font-weight: 600; }
.arch-head .lead { margin: 0; max-width: 720px; font-size: .94rem; }
.arch-head .btn { flex: none; }
@media (max-width: 640px) { .arch-head { flex-direction: column; align-items: flex-start; } }

.pager, .navigation.pagination { margin: 16px 0 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nav-links .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.nav-links .page-numbers.current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.nav-links a.page-numbers:hover { border-color: var(--brand-100); color: var(--ink); }

/* ---------- Sidebar ---------- */
.side-list { padding: 14px 16px; }
.side-list h2, .side-exams h2 { font-size: 1rem; margin: 0 0 8px; }
.side-list ul { list-style: none; margin: 0; padding: 0; }
.side-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; line-height: 1.4; }
.side-list li:first-child { border-top: 0; }
.side-list li a { color: var(--ink); font-weight: 500; }
.side-list li a:hover { color: var(--brand-600); }
.side-list time { color: var(--muted); font-size: .74rem; white-space: nowrap; padding-top: 2px; }
.side-more { display: inline-block; margin-top: 6px; font-weight: 650; font-size: .86rem; }
.side-exams { padding: 14px 16px; }
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.side-chips .chip { font-size: .8rem; padding: 5px 11px; }

.related { margin-top: 28px; }

/* ---------- Pages ---------- */
.page-text { max-width: 860px; margin: 12px auto 0; }
.page-tool { margin-top: 12px; }
.page-tool .post-head h1 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); }
.wp-search { margin-top: 12px; }
.wp-search input { font-size: 1rem; }
.empty-404 { text-align: center; padding: 34px 18px; margin-top: 16px; display: grid; justify-items: center; gap: 6px; }
.empty-404 .wp-search { width: min(560px, 100%); }

/* Contact Form 7 and other plugin forms inherit the platform look. */
.entry input[type='text'], .entry input[type='email'], .entry input[type='tel'], .entry input[type='number'], .entry input[type='search'], .entry select, .entry textarea { font: inherit; font-size: .98rem; width: 100%; max-width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); }
.entry input:focus, .entry select:focus, .entry textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.entry input[type='submit'], .entry button[type='submit'] { font: inherit; font-weight: 700; height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--brand); color: var(--on-brand); cursor: pointer; }

@media (max-width: 640px) {
	.post { border-radius: 18px; padding: 16px 14px; }
	.entry { font-size: 1rem; line-height: 1.72; }
	.entry table th, .entry table td { padding: 9px 10px; font-size: .9rem; }
	.share a, .share button { height: 34px; padding: 0 10px; }
	.share .share-copy { display: none; }
	.post-foot .share .share-copy { display: inline-flex; }
}
@media print { .upd-bar, .wp-aside, .share, .sro-box, .sro-toc, .related { display: none !important; } }

/* 404 */
.empty-404 { margin: 16px auto 0; max-width: 640px; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 10px; padding: 28px 18px; }
.empty-404 > * { max-width: 100%; }
.empty-404 h1 { font-size: clamp(1.35rem, 1.1rem + 1.4vw, 1.9rem); margin: 4px 0 0; }
.empty-404 .lead { margin: 0; color: var(--muted); }
.empty-404 form { width: 100%; }
.empty-404 .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Long links and URLs in posts wrap instead of pushing the page sideways */
.entry, .entry a, .entry strong { overflow-wrap: anywhere; }
.entry table a, .entry table strong { overflow-wrap: normal; word-break: normal; }
.entry pre { white-space: pre-wrap; overflow-x: auto; max-width: 100%; }

/* Very narrow phones (320px): keep the header on one line */
@media (max-width: 359px) {
  .hdr-in { gap: 6px; }
  .logo-text b { font-size: .92rem; letter-spacing: -.01em; }
  .logo-mark svg { width: 32px; height: 32px; }
  .hdr-actions .btn { padding-inline: 10px; }
}
.tool-body { min-width: 0; }
