/* Reaction Test theme – front end + editor styles */
:root { --rt-accent:#668EFF; --rt-bg:#05060A; --rt-card:#0A0C11; --rt-border:#1E2128; --rt-text:#C2C8D1; --rt-head:#F1F3F7; --rt-muted:#8A919C; }
body { margin:0; background:var(--rt-bg); color:var(--rt-text); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
html[lang="ar"] body, html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .wp-block-heading { font-family:var(--wp--preset--font-family--arabic); letter-spacing:0; }
strong, b { color:var(--rt-head); font-weight:600; }
a { text-underline-offset:3px; }
::selection { background:#2B3550; color:#fff; }
@keyframes rtPop { from { opacity:0; transform:translateY(10px) scale(.97); } to { opacity:1; transform:none; } }
.grad { background:linear-gradient(120deg,#F1F3F7 0%,#8FA8FF 55%,#6EE7A8 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.rt-card:focus-visible { outline:3px solid #fff; outline-offset:4px; }
summary { cursor:pointer; }
summary::-webkit-details-marker { display:none; }

/* ---------- header ---------- */
.rt-header { position:relative; z-index:20; border-bottom:1px solid #12141A; background:rgba(5,6,10,.92); }
.rt-header-inner { padding-top:14px; padding-bottom:14px; gap:16px; align-items:center; }
.rt-brand { display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:var(--rt-head) !important; font-family:var(--wp--preset--font-family--heading); font-weight:700; font-size:19px; letter-spacing:-0.01em; }
.rt-nav { gap:26px; font-size:15px; font-weight:500; }
.rt-nav a { color:#C9CED6; text-decoration:none; }
.rt-nav a:hover { color:#fff; }
.rt-nav .wp-block-navigation__responsive-container.is-menu-open { background:#05060A; color:#fff; padding:24px; }
.rt-header-actions { gap:10px; align-items:center; }
.rt-header-cta .wp-block-button__link { padding:10px 18px; font-size:14px; }
.rt-lang { position:relative; }
.rt-lang summary { list-style:none; display:flex; align-items:center; gap:8px; min-height:42px; padding:0 14px; border:1px solid #2A2E37; border-radius:999px; background:#0D0F14; color:#E9EBEF; font-size:14px; font-weight:600; user-select:none; }
.rt-lang summary:hover, .rt-lang[open] summary { border-color:#4A5568; }
.rt-lang-chev { transition:transform .2s; }
.rt-lang[open] .rt-lang-chev { transform:rotate(180deg); }
.rt-lang-menu { position:absolute; top:calc(100% + 10px); inset-inline-end:0; z-index:60; min-width:230px; padding:6px; background:#0D0F14; border:1px solid #262A33; border-radius:16px; box-shadow:0 24px 60px rgba(0,0,0,.55); display:flex; flex-direction:column; gap:2px; }
.rt-lang-label { padding:8px 12px 6px; font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:#6B7280; }
.rt-lang-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:10px; text-decoration:none; color:#C9CED6 !important; font-size:14px; }
.rt-lang-item:hover { background:#161922; }
.rt-lang-item.is-current { background:#161B2A; color:#F1F3F7 !important; font-weight:600; }
.rt-lang-code { width:34px; height:24px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; letter-spacing:.04em; background:#1A1D25; color:#9CA3AE; }
.rt-lang-item.is-current .rt-lang-code { background:var(--rt-accent); color:#05060A; }
.rt-lang-name { flex:1; }

/* ---------- layout ---------- */
.rt-main { padding-bottom:64px; background-image:radial-gradient(900px 480px at 50% -120px, rgba(102,142,255,.14), transparent 70%); background-repeat:no-repeat; }
.rt-main > .wp-block-post-content > * , .rt-main > * { margin-block-start:0; }
.rt-hero { padding-top:64px; padding-bottom:16px; }
.rt-hero h1 strong, .rt-hero h1 b { background:linear-gradient(120deg,#F1F3F7 0%,#8FA8FF 55%,#6EE7A8 100%); -webkit-background-clip:text; background-clip:text; color:transparent; font-weight:inherit; }
.rt-section { padding-top:56px; }
.rt-section > * + *, .rt-hero > * + * { margin-block-start:14px; }
.rt-center { text-align:center; }
.rt-center > .wp-block-buttons, .rt-center .rt-pills { justify-content:center; }
.rt-head { max-width:720px; margin-inline:auto !important; margin-bottom:28px !important; }
.rt-eyebrow { font-size:13px !important; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--rt-accent); margin-bottom:-4px !important; }
.rt-lead { font-size:20px; color:#A3AAB5; }
.rt-note { font-size:14px; color:var(--rt-muted); }
.rt-big { font-size:22px; font-family:var(--wp--preset--font-family--heading); }
.rt-table-title { font-size:13px; font-weight:600; color:#C9CED6; text-transform:uppercase; letter-spacing:.06em; }
p, li { text-wrap:pretty; }
.wp-block-post-content p, .wp-block-post-content li { color:var(--rt-text); }
.wp-block-list li + li { margin-top:8px; }
h2.wp-block-heading { margin-top:28px; }
.rt-section > .wp-block-heading:first-child, .rt-head .wp-block-heading, .rt-eyebrow + .wp-block-heading { margin-top:0; }

/* pills / chips */
.rt-pills { list-style:none; padding:0 !important; display:flex; flex-wrap:wrap; gap:8px; }
.rt-pills li { margin:0 !important; padding:6px 14px; border:1px solid #23262E; border-radius:999px; background:#0D0F14; font-size:14px; color:#C9CED6; }
.rt-chips { gap:10px; }
.rt-chips .wp-block-button__link { padding:9px 16px; font-size:14px; }
.wp-block-button.is-style-outline .wp-block-button__link { background:transparent; color:#E9EBEF; border:1px solid #2A2E37; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color:#4A5568; color:#fff; }

/* cards & grids */
.rt-grid { gap:20px; }
.rt-card { background:var(--rt-card); border:1px solid var(--rt-border); border-radius:24px; padding:24px; box-shadow:inset 0 1px 0 rgba(255,255,255,.05); }
.rt-card > * + * { margin-block-start:10px; }
.rt-card h3, .rt-card .wp-block-heading { margin-top:4px; font-size:19px; }
.rt-card p { font-size:16px; line-height:1.65; }
.rt-num { width:40px; height:40px; border-radius:999px; background:var(--rt-accent); color:#05060A !important; display:flex; align-items:center; justify-content:center; font-family:var(--wp--preset--font-family--heading); font-weight:700; font-size:16px !important; }
.rt-link-card { position:relative; transition:border-color .2s, transform .2s; }
.rt-link-card:hover { border-color:#343946; transform:translateY(-2px); }
.rt-link-card .rt-card-title a { color:var(--rt-head); text-decoration:none; }
.rt-link-card .rt-card-title a::after { content:""; position:absolute; inset:0; border-radius:inherit; }
.rt-card-more { color:var(--rt-accent) !important; font-weight:600; font-size:15px !important; }
.rt-card .wp-block-buttons { margin-top:auto; }
.rt-callout { background:#0D1220; border:1px solid #263150; border-radius:20px; padding:20px 24px; }
.rt-cta { border:1px solid #23262E; border-radius:28px; padding:40px 24px; text-align:center; background:linear-gradient(180deg,#0B0E16,#07080C); }
.rt-cta .wp-block-buttons { justify-content:center; }
.rt-toc { background:var(--rt-card); border:1px solid var(--rt-border); border-radius:20px; padding:20px 24px; }
.rt-toc ol, .rt-toc ul { margin:10px 0 0; padding-inline-start:22px; font-size:16px; }
.rt-toc a { color:#C9CED6; }
.wp-block-columns { gap:32px; }

/* tables */
.wp-block-table { margin:0; overflow-x:auto; background:var(--rt-card); border:1px solid var(--rt-border); border-radius:20px; }
.wp-block-table table { width:100%; border-collapse:collapse; font-size:16px; }
.wp-block-table th, .wp-block-table td { border:0; border-bottom:1px solid #1A1D24; padding:13px 20px; text-align:start; }
.wp-block-table thead th { background:#11141A; color:#C9CED6; font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
.wp-block-table tbody tr:last-child td { border-bottom:0; }
.wp-block-table td:first-child { color:#E9EBEF; }
.wp-block-table figcaption { margin:0; padding:12px 20px; border-top:1px solid #1A1D24; font-size:13px; color:var(--rt-muted); text-align:start; }

/* FAQ */
.wp-block-details { background:var(--rt-card); border:1px solid var(--rt-border); border-radius:16px; padding:0 22px; }
.wp-block-details + .wp-block-details { margin-top:10px !important; }
.wp-block-details summary { list-style:none; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 0; font-size:17px; font-weight:600; color:var(--rt-head); }
.wp-block-details summary::after { content:"+"; font-size:22px; font-weight:400; color:var(--rt-accent); transition:transform .2s; }
.wp-block-details[open] summary::after { transform:rotate(45deg); }
.wp-block-details > p { margin:0 0 18px; font-size:16px; line-height:1.7; }

/* games */
.rt-game { margin-block-start:8px; }
.rt-game > section { padding-left:0 !important; padding-right:0 !important; }
.rt-game button { font-family:inherit; }
.rt-game-placeholder { display:flex; flex-direction:column; gap:6px; padding:28px; border:2px dashed #2B3550; border-radius:20px; background:#0A0C11; color:#C2C8D1; font-size:15px; }

/* guides list, breadcrumbs, article */
.rt-guides-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:20px; }
.rt-article { padding-top:40px; }
.rt-article > * + * { margin-block-start:16px; }
.rt-post-title { margin-top:12px !important; font-size:clamp(34px,5vw,54px) !important; }
.rt-breadcrumbs { display:flex; flex-wrap:wrap; gap:8px; font-size:14px; color:var(--rt-muted); }
.rt-breadcrumbs a { color:var(--rt-muted); }
.rt-breadcrumbs [aria-current] { color:var(--rt-text); }
.rt-archive-title { margin-top:48px; }

/* footer */
.rt-footer { border-top:1px solid #12141A; margin-top:24px; }
.rt-footer-inner { padding-top:56px; padding-bottom:28px; }
.rt-footer-cols { gap:40px; }
.rt-footer-cols > .wp-block-column:first-child { flex-basis:34%; }
.rt-footer-desc { font-size:14px; line-height:1.65; color:#9CA3AE; max-width:380px; }
.rt-footer-title { font-size:15px; font-weight:600; color:var(--rt-head); margin-bottom:4px; }
.rt-footer-links { list-style:none; padding:0 !important; margin:0; font-size:14px; }
.rt-footer-links li + li { margin-top:8px; }
.rt-footer-links a, .rt-footer-legal a { color:#9CA3AE; text-decoration:none; }
.rt-footer-links a:hover, .rt-footer-legal a:hover { color:#fff; }
.rt-footer-bottom { margin-top:40px !important; padding-top:20px; border-top:1px solid #12141A; align-items:center; gap:16px; }
.rt-copyright { margin:0; font-size:14px; color:var(--rt-muted); }
.rt-footer-legal { list-style:none; padding:0 !important; margin:0; display:flex; flex-wrap:wrap; gap:8px 22px; font-size:14px; }
.rt-footer-legal li { margin:0 !important; }

@media (max-width: 781px) {
	.rt-hero { padding-top:40px; }
	.rt-section { padding-top:44px; }
	.rt-nav { order:3; }
	.rt-header-cta { display:none; }
	.rt-footer-cols > .wp-block-column:first-child { flex-basis:100%; }
}
.rt-header-inner, .rt-footer-inner { box-sizing:border-box; width:100%; max-width:1228px; margin-inline:auto !important; padding-inline:24px; }
.wp-block-table thead { border-bottom:1px solid #1A1D24; }
.wp-block-table tfoot { border-top:0; }
.alignwide.rt-section > p:not(.rt-eyebrow):not(.rt-note), .alignwide.rt-section > .wp-block-heading { max-width:820px; }
.alignwide.rt-section.rt-center > *, .alignwide.rt-section > .rt-head { margin-inline:auto; }
.rt-cta > * { margin-inline:auto; }
.rt-cta .rt-big, .rt-cta .wp-block-heading { font-size:clamp(24px,3vw,32px); }
/* footer: keep every link on one line */
.rt-footer-cols { justify-content:space-between; flex-wrap:nowrap; }
.rt-footer-cols > .wp-block-column { flex-grow:0 !important; flex-basis:auto !important; }
.rt-footer-cols > .wp-block-column:first-child { flex:0 1 340px !important; }
.rt-footer-links a, .rt-footer-legal a, .rt-footer-title { white-space:nowrap; }
@media (max-width: 1100px) { .rt-footer-cols { flex-wrap:wrap !important; } .rt-footer-cols > .wp-block-column:first-child { flex-basis:100% !important; } }
@media (max-width: 781px) { .rt-footer-links a { white-space:normal; } }
/* wide sections: always centered with side space, grids fill the row evenly */
.rt-main .wp-block-post-content > .alignwide { box-sizing:border-box; width:100%; max-width:min(var(--wp--style--global--wide-size, 1180px), 100%) !important; margin-left:auto !important; margin-right:auto !important; }
.rt-main .wp-block-post-content > :not(.alignwide):not(.alignfull) { box-sizing:border-box; max-width:min(var(--wp--style--global--content-size, 820px), 100%); }
.rt-grid.is-layout-grid { grid-template-columns:repeat(auto-fit, minmax(min(16rem, 100%), 1fr)) !important; }
.rt-grid .rt-card { height:100%; box-sizing:border-box; }
.rt-num { margin-inline:0; }
.rt-center .rt-num { margin-inline:auto; }
/* make sure the small styled paragraphs keep their own colours */
.wp-block-post-content p.rt-eyebrow, .rt-eyebrow { color:var(--rt-accent) !important; }
.wp-block-post-content p.rt-lead { color:#A3AAB5; }
.wp-block-post-content p.rt-note { color:var(--rt-muted); }
.wp-block-post-content p.rt-table-title { color:#C9CED6; }
.wp-block-post-content p.rt-big, .wp-block-post-content p.rt-big strong { color:var(--rt-head); }
.wp-block-post-content p.rt-num { color:#05060A !important; }
.wp-block-post-content .rt-card-title a, .wp-block-post-content .rt-card h3 { color:var(--rt-head); }
.rt-center .rt-num { margin-inline:0; }
.rt-center > .rt-num, .rt-head > .rt-num { margin-inline:auto; }
/* ---- design details from the original preview ---- */
.rt-pills li { display:inline-flex; align-items:center; gap:8px; padding:8px 14px 8px 10px; background:#0B0D12; }
.rt-pills li::before { content:""; width:20px; height:20px; border-radius:999px; flex:none;
  background:rgba(34,197,94,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ADE80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.wp-block-post-content p.rt-mark { width:42px; height:42px; border-radius:12px; background:#141A2B; border:1px solid #263150; display:flex; align-items:center; justify-content:center; color:var(--rt-accent); font-family:var(--wp--preset--font-family--heading); font-weight:700; font-size:15px; margin:0; }
.rt-card { position:relative; }
.wp-block-post-content p.rt-new { position:absolute; top:16px; right:16px; margin:0; font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px; background:rgba(34,197,94,.14); color:#6EE7A8; border:1px solid rgba(34,197,94,.35); }
html[dir="rtl"] .wp-block-post-content p.rt-new { right:auto; left:16px; }
.wp-block-post-content p.rt-index { font-family:var(--wp--preset--font-family--heading); font-size:15px; font-weight:700; color:var(--rt-accent); margin:0; }
.rt-meta { align-items:center; gap:10px; }
.rt-meta > p { margin:0 !important; }
.wp-block-post-content p.rt-level { font-size:12px; font-weight:600; padding:3px 10px; border-radius:999px; }
.wp-block-post-content p.rt-level-easy { background:rgba(34,197,94,.12); color:#6EE7A8; border:1px solid rgba(34,197,94,.35); }
.wp-block-post-content p.rt-level-medium { background:rgba(234,179,8,.12); color:#FCD34D; border:1px solid rgba(234,179,8,.35); }
.wp-block-post-content p.rt-level-hard { background:rgba(239,68,68,.12); color:#FCA5A5; border:1px solid rgba(239,68,68,.35); }
.rt-meta > p:last-child { font-size:13px; color:#C2C8D1; }
.rt-btn-full { width:100%; }
.rt-btn-full .wp-block-button { width:100%; }
.rt-btn-full .wp-block-button__link { width:100%; display:flex; justify-content:center; padding:12px 18px; font-size:15px; box-sizing:border-box; }
.rt-btn-full .wp-block-button__link::after { content:"→"; margin-inline-start:8px; }
html[dir="rtl"] .rt-btn-full .wp-block-button__link::after { content:"←"; }
.rt-card { display:flex; flex-direction:column; }
.rt-card > .rt-btn-full { margin-top:auto !important; }
.rt-card h3.wp-block-heading { font-size:18px; font-weight:700; letter-spacing:-0.01em; }
mark.has-inline-color { background:transparent; font-weight:600; }
/* "Try another challenge" cards: 3 per row like the design */
.rt-tests.is-layout-grid { grid-template-columns:repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 960px) { .rt-tests.is-layout-grid { grid-template-columns:repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .rt-tests.is-layout-grid { grid-template-columns:1fr !important; } }
/* cards are always left-aligned like the design, even inside centred sections */
.rt-center .rt-card, .rt-card { text-align:start; }
.rt-card > * { max-width:none !important; margin-inline:0 !important; }
.rt-card .rt-num, .rt-card .rt-mark { margin-inline:0 !important; }
.rt-meta { width:100%; justify-content:space-between !important; }
.rt-cta { text-align:center; }
.rt-cta > * { margin-inline:auto !important; }
.rt-cols-3.is-layout-grid { grid-template-columns:repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 960px) { .rt-cols-3.is-layout-grid { grid-template-columns:repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .rt-cols-3.is-layout-grid { grid-template-columns:1fr !important; } }
.rt-brand-img { height:34px; width:auto; max-width:220px; object-fit:contain; display:block; }
.rt-footer .rt-brand-img { height:30px; }
/* header sits on the same background as the page (like the design) */
body { background:#05060A radial-gradient(1100px 560px at 50% -140px, rgba(102,142,255,.16), transparent 70%) no-repeat !important; }
.wp-site-blocks { background:transparent; }
.rt-header { background:transparent !important; border-bottom:1px solid rgba(255,255,255,.05); }
.rt-main { background-image:none !important; }
.rt-brand { gap:11px !important; font-size:20px !important; letter-spacing:-0.02em; }
.rt-brand svg { width:32px; height:32px; flex:none; }
.rt-brand-name em { font-style:normal; color:#8FA8FF; }
/* test cards: pill row + button always pinned to the bottom with equal spacing */
.rt-tests .rt-card { display:flex; flex-direction:column; height:100%; }
.rt-tests .rt-card > * { margin-block:0 !important; }
.rt-tests .rt-card > .rt-mark { margin-bottom:12px !important; }
.rt-tests .rt-card > .wp-block-heading { margin-bottom:6px !important; }
.rt-tests .rt-card > p:not(.rt-mark):not(.rt-new) { text-wrap:wrap; }
.rt-tests .rt-card > .rt-meta { margin-top:auto !important; padding-top:16px; }
.rt-tests .rt-card > .rt-btn-full { margin-top:16px !important; }
/* guides list: 3 per row, "Read guide" pinned to the bottom */
.rt-guides-list { grid-template-columns:repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 960px) { .rt-guides-list { grid-template-columns:repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .rt-guides-list { grid-template-columns:1fr !important; } }
.rt-guides-list .rt-card { display:flex; flex-direction:column; height:100%; box-sizing:border-box; }
.rt-guides-list .rt-card > * { margin:0 !important; }
.rt-guides-list .rt-card > .rt-card-title { margin:6px 0 10px !important; font-size:19px; line-height:1.3; }
.rt-guides-list .rt-card > .rt-card-more { margin-top:auto !important; padding-top:16px; }
/* guide pages: "Keep reading" lines up with the article column */
.rt-article .rt-section .rt-cols-3 .rt-card { padding:20px; }
.rt-article .rt-section .rt-card-title { font-size:17px !important; line-height:1.3; }
.rt-link-card:hover { transform:none; }
.rt-query .wp-block-post-template { list-style:none; padding:0; margin:0; }
.rt-query .wp-block-post-template > li { margin:0; }
.rt-query .wp-block-post-excerpt__excerpt { font-size:16px; margin:0; }
.rt-query .wp-block-post-terms a { color:var(--rt-accent); text-decoration:none; }
/* a little breathing room between the blue label and the heading */
.wp-block-post-content p.rt-eyebrow { margin-bottom:0 !important; }
.rt-eyebrow + .wp-block-heading, .rt-eyebrow + h1, .rt-eyebrow + h2 { margin-top:10px !important; }
