/*
Theme Name: Updates.lk One UI
Theme URI: https://updates.lk
Author: Pravin Ravi
Author URI: https://updates.lk
Description: Fast, SEO-friendly, Samsung One UI inspired theme for Updates.lk. Midnight black, pure white and vibrant golden yellow. Built-in systems for Jobs, Past Papers, Model Papers, Contact Numbers and animated Questions & Answers flashcards.
Version: 1.4.2
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: updates-lk-oneui
Tags: dark, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog, education
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--bg: #000;
	--bg2: #0a0a0b;
	--card: #121214;
	--card2: #1b1b1e;
	--card3: #242428;
	--line: rgba(255, 255, 255, .09);
	--tx: #fff;
	--tx2: rgba(255, 255, 255, .7);
	--tx3: rgba(255, 255, 255, .46);
	--gold: #ffc400;
	--gold2: #ffd54a;
	--gold-soft: rgba(255, 196, 0, .14);
	--gold-ink: #1a1200;
	--r-xl: 32px;
	--r-lg: 26px;
	--r-md: 20px;
	--r-sm: 14px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--font: "SamsungOne", "Samsung Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--head: 64px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--gold); color: #000; }
.sr, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 999; background: var(--gold); color: #000; padding: 10px 18px; border-radius: 999px; font-weight: 700; transition: top .2s; }
.skip:focus { top: 12px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.main { min-height: 60vh; outline: 0; }
.sec { margin-top: 44px; }
.sec-below { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ==========================================================================
   3. Header, nav, search, drawer
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 60; padding: 12px 0 0; pointer-events: none; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.hdr { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 14px; height: var(--head); padding: 0 10px 0 12px; border-radius: 999px; background: var(--gold); color: #fff; box-shadow: 0 10px 30px rgba(255, 196, 0, .18), 0 6px 18px rgba(0, 0, 0, .55); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -.025em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
.logo-img { max-height: 40px; width: auto; }
.logo-svg { width: 42px; height: 42px; flex: none; transition: transform .35s var(--ease); }
.lm-bg { fill: var(--mark, #000); }
.logo:hover .logo-svg { transform: rotate(-8deg) scale(1.06); }
.logo-txt { display: inline-flex; align-items: center; gap: 3px; }
.logo-txt b { font-weight: 800; font-size: .78em; line-height: 1; padding: 5px 8px 6px; border-radius: 999px; background: var(--lk-bg, #000); color: var(--lk-tx, var(--gold)); text-shadow: none; }
.site-footer { --mark: #1b1b1e; --lk-bg: var(--gold); --lk-tx: #000; }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 2px; }
.nav-list a { display: block; padding: 9px 16px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 15px; text-shadow: 0 1px 2px rgba(0, 0, 0, .28); transition: background .2s; }
.nav-list a:hover { background: rgba(0, 0, 0, .16); }
.nav-list a[aria-current], .nav-list .current-menu-item a { background: #000; color: #fff; text-shadow: none; }
.hdr-actions { display: flex; gap: 8px; }
.ibtn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card2); color: #fff; transition: background .2s, transform .15s; }
.ibtn:hover { background: var(--card3); }
.ibtn:active { transform: scale(.92); }
.ibtn .i { width: 22px; height: 22px; }
.ibtn-menu { display: none; }
.hdr .ibtn { background: transparent; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.hdr .ibtn:hover { background: rgba(0, 0, 0, .16); }
.progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(0, 0, 0, .55); transition: width .1s linear; }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.scrim.open { opacity: 1; visibility: visible; transition: opacity .3s; }

.search-pop { position: fixed; left: 0; right: 0; top: 0; z-index: 80; padding: 18px 0 22px; background: var(--bg2); border-radius: 0 0 var(--r-xl) var(--r-xl); border-bottom: 1px solid var(--line); transform: translateY(-110%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
.search-pop.open { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.admin-bar .search-pop { top: 32px; }
.suggest { margin-top: 10px; display: grid; gap: 6px; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--card); }
.suggest a:hover { background: var(--card2); }
.suggest small { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; align-self: center; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(380px, 90vw); padding: 18px; background: var(--bg2); border-radius: var(--r-xl) 0 0 var(--r-xl); border-left: 1px solid var(--line); overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
.drawer.open { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.drawer-h { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 14px; font-size: 24px; font-weight: 800; }
.drawer-list { display: grid; gap: 6px; }
.drawer-list a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--card); font-weight: 600; }
.drawer-list a:hover { background: var(--card2); }
.drawer-list small { margin-left: auto; color: var(--tx3); }
.ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 15px; background: var(--gold-soft); color: var(--gold); }
.ico .i { width: 22px; height: 22px; }

/* ==========================================================================
   4. Buttons, chips, badges, forms
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border: 0; border-radius: 999px; background: var(--gold); color: #000; font-weight: 700; font-size: 15px; line-height: 1.2; transition: transform .18s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { background: var(--gold2); box-shadow: 0 8px 28px rgba(255, 196, 0, .28); }
.btn:active { transform: scale(.95); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-ghost { background: var(--card2); color: #fff; }
.btn-ghost:hover { background: var(--card3); box-shadow: none; }
.btn-icon { padding: 14px; width: 52px; height: 52px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--card2); border: 1px solid transparent; color: var(--tx2); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s, transform .15s; }
.chip:hover { background: var(--card3); color: #fff; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--gold); color: #000; }
.chip-sm { padding: 7px 13px; font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: var(--card2); color: var(--tx2); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.badge .i { width: 13px; height: 13px; }
.b-gold { background: var(--gold); color: #000; }
.b-live { background: rgba(255, 70, 70, .16); color: #ff7b7b; }
.b-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4646; animation: pulse 1.4s infinite; }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.mline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: var(--tx3); font-size: 13px; }
.mline span { display: inline-flex; align-items: center; gap: 5px; }
.mline .i { width: 14px; height: 14px; }

.searchbar { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s, box-shadow .2s; }
.searchbar:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.searchbar input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: transparent; outline: 0; font-size: 16px; }
.searchbar input::placeholder { color: var(--tx3); }
.searchbar > .i { color: var(--tx3); width: 22px; height: 22px; }
.searchbar-lg { padding: 8px 8px 8px 22px; max-width: 720px; margin: 26px 0 0; }
.searchbar-lg input { font-size: 17px; padding: 12px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.filters .f-q { flex: 1 1 220px; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-height: 48px; background: var(--card2); border-radius: 999px; }
.filters .f-q input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; }
.filters .f-q .i { color: var(--tx3); }
.filters .f-s { position: relative; flex: 1 1 150px; }
.filters select { width: 100%; min-height: 48px; padding: 0 40px 0 18px; border: 0; border-radius: 999px; background: var(--card2); appearance: none; -webkit-appearance: none; outline: 0; cursor: pointer; }
.filters select option { background: #1b1b1e; }
.filters .f-s .i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--tx3); }
.filters .btn { min-height: 48px; }
.filters-flat { margin-top: 18px; }
.jobsearch .filters { margin-top: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

/* ==========================================================================
   5. Hero blocks
   ========================================================================== */
.hero { position: relative; padding: 46px 0 8px; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -20% -10% auto auto; width: 760px; height: 560px; background: radial-gradient(closest-side, rgba(255, 196, 0, .22), transparent); pointer-events: none; }
.hero h1 { font-size: clamp(36px, 6.6vw, 68px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; max-width: 14em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { margin: 18px 0 0; max-width: 640px; color: var(--tx2); font-size: clamp(16px, 2vw, 19px); }
.hero-sm { padding-bottom: 0; }
.hero-sm h1 { font-size: clamp(30px, 5vw, 48px); }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 7px 16px 7px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--tx2); font-size: 13.5px; font-weight: 600; }
.kicker .i { color: var(--gold); }
.flag { display: inline-grid; place-items: center; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--gold); color: #000; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 34px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); max-width: 680px; }
.stat { padding: 18px 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(24px, 4vw, 34px); line-height: 1.1; color: var(--gold); font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--tx2); font-size: 13.5px; }
.hero-split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; align-items: center; }
.recent { margin-top: 30px; }
.recent h2 { font-size: 16px; color: var(--tx2); display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.recent-list { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.recent-list a { flex: none; max-width: 280px; padding: 12px 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-list a:hover { border-color: var(--gold); }

.crumbs { margin-bottom: 14px; font-size: 13.5px; color: var(--tx3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .5; }
.crumbs a:hover { color: var(--gold); }

/* Jobs hero: spotlight */
.hero-jobs::before { inset: -30% auto auto -10%; background: radial-gradient(closest-side, rgba(255, 196, 0, .26), transparent); }
.hero-jobs h1 { max-width: 11em; }
/* Papers hero: stacked sheets */
.stack-art { position: relative; height: 300px; }
.sheet { position: absolute; width: 210px; height: 270px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); }
.sheet.s1 { left: 10px; top: 20px; transform: rotate(-9deg); background: var(--card2); }
.sheet.s2 { left: 50px; top: 8px; transform: rotate(-3deg); }
.sheet.s3 { left: 90px; top: 0; transform: rotate(5deg); background: linear-gradient(160deg, #1d1d20, #121214); padding: 22px; display: grid; align-content: start; gap: 10px; animation: float 6s ease-in-out infinite; }
.sheet.s3 b { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--gold); color: #000; font-size: 17px; }
.sheet.s3 i { display: block; height: 10px; border-radius: 6px; background: var(--card3); }
.sheet.s3 i.short { width: 60%; }
.sheet.s3 u { display: block; margin-top: 16px; height: 40px; border-radius: 999px; background: var(--gold-soft); }
/* Model hero: segmented + grade rail */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 26px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.seg-i { padding: 10px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--tx2); font-weight: 700; font-size: 14.5px; transition: background .25s var(--ease), color .2s; }
.seg-i:hover { color: #fff; }
.seg-i.on { background: var(--gold); color: #000; }
.rail { display: flex; gap: 10px; margin-top: 18px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { display: none; }
.rail-i { flex: none; display: grid; place-items: center; align-content: center; min-width: 70px; padding: 0 12px; height: 78px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); font-size: 24px; font-weight: 800; line-height: 1; scroll-snap-align: start; transition: transform .2s var(--ease), background .2s; }
.rail-i small { margin-top: 5px; font-size: 10.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; }
.rail-i:hover { transform: translateY(-3px); border-color: var(--gold); }
.rail-i.on { background: var(--gold); color: #000; border-color: var(--gold); }
.rail-i.on small { color: rgba(0, 0, 0, .6); }
/* Contacts hero: A-Z */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.az-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--card); font-weight: 700; font-size: 14px; color: var(--tx2); transition: background .2s; }
.az-i:hover { background: var(--card3); color: #fff; }
.az-i.on { background: var(--gold); color: #000; }
/* Q&A hero: fanned cards */
.fan-art { position: relative; height: 280px; }
.fc { position: absolute; left: 50%; top: 40px; width: 180px; height: 230px; margin-left: -90px; padding: 20px; border-radius: 26px; border: 1px solid var(--line); background: var(--card); display: grid; align-content: start; gap: 10px; transform-origin: 50% 120%; }
.fc b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--gold-soft); color: var(--gold); font-size: 18px; }
.fc i { display: block; height: 9px; border-radius: 6px; background: var(--card3); }
.fc i.short { width: 55%; }
.fc.f1 { transform: rotate(-14deg) translateX(-50px); background: var(--card2); }
.fc.f2 { transform: rotate(-2deg) translateX(-6px); }
.fc.f3 { transform: rotate(11deg) translateX(46px); background: var(--gold); border-color: var(--gold); animation: float 5s ease-in-out infinite; }
.fc.f3 b { background: #000; color: var(--gold); }
.fc.f3 i { background: rgba(0, 0, 0, .22); }

/* ==========================================================================
   6. Sections, bento, mini cards
   ========================================================================== */
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.sec-h h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.sec-h h2 .i { color: var(--gold); }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.more .i { transition: transform .2s var(--ease); }
.more:hover .i { transform: translateX(4px); }
.result-line { color: var(--tx2); margin: -4px 0 16px; font-size: 14.5px; }
.result-line strong { color: #fff; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.bcard { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 220px; padding: 24px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), border-color .25s, background .25s; }
.bcard::after { content: ""; position: absolute; right: -50px; bottom: -50px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 196, 0, .12), transparent); transition: transform .5s var(--ease); }
.bcard:hover { transform: translateY(-5px); border-color: rgba(255, 196, 0, .55); background: var(--card2); }
.bcard:hover::after { transform: scale(1.4); }
.bcard:active { transform: scale(.98); }
.bcard .ico { width: 58px; height: 58px; border-radius: 20px; }
.bcard .ico .i { width: 28px; height: 28px; }
.bc-body small { display: block; color: var(--gold); font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.bc-body strong { display: block; margin-top: 4px; font-size: clamp(23px, 3vw, 30px); line-height: 1.15; letter-spacing: -.02em; }
.bc-desc { display: block; margin-top: 6px; color: var(--tx2); font-size: 14.5px; line-height: 1.5; max-width: 30em; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.count { padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 600; }
.go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #000; transition: transform .3s var(--ease); }
.bcard:hover .go { transform: translateX(4px) rotate(-45deg); }
.s3 { grid-column: span 3; }
.s2 { grid-column: span 2; }
.bcard.is-gold { background: linear-gradient(145deg, #ffcf24, #ffb300); border-color: transparent; color: #000; }
.bcard.is-gold:hover { background: linear-gradient(145deg, #ffd84d, #ffbc1a); }
.bcard.is-gold::after { background: radial-gradient(closest-side, rgba(255, 255, 255, .35), transparent); }
.bcard.is-gold .ico { background: rgba(0, 0, 0, .14); color: #000; }
.bcard.is-gold .bc-body small { color: rgba(0, 0, 0, .65); }
.bcard.is-gold .bc-desc { color: rgba(0, 0, 0, .72); }
.bcard.is-gold .count { background: rgba(0, 0, 0, .12); }
.bcard.is-gold .go { background: #000; color: var(--gold); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s; }
.mini:hover { transform: translateY(-3px); border-color: rgba(255, 196, 0, .5); }
.mini strong { display: block; font-size: 15.5px; line-height: 1.25; }
.mini small { color: var(--tx3); font-size: 12.5px; }

/* ==========================================================================
   7. Grids + cards
   ========================================================================== */
.grid { display: grid; gap: 14px; }
.grid-job { grid-template-columns: repeat(2, 1fr); }
.grid-paper { grid-template-columns: repeat(3, 1fr); }
.grid-ticket { grid-template-columns: repeat(2, 1fr); }
.grid-contact { grid-template-columns: repeat(3, 1fr); }
.grid-qa { grid-template-columns: repeat(2, 1fr); }
.grid-std { grid-template-columns: repeat(4, 1fr); }
.grid-mixed { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline-offset: -3px; }
.job, .paper, .ticket, .contact, .qtile, .card { position: relative; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .25s, background .25s; }
.job:hover, .paper:hover, .ticket:hover, .contact:hover, .qtile:hover, .card:hover { transform: translateY(-4px); border-color: rgba(255, 196, 0, .5); background: var(--card2); }
.job:active, .paper:active, .ticket:active, .contact:active, .qtile:active, .card:active { transform: scale(.985); }
h3 { font-size: 17px; font-weight: 700; line-height: 1.35; }

/* standard */
.card-std { display: flex; flex-direction: column; overflow: hidden; }
.card-std .card-ico { display: grid; place-items: center; height: 120px; background: linear-gradient(135deg, var(--card2), var(--card)); color: var(--gold); }
.card-std .card-ico .i { width: 38px; height: 38px; }
.card-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 18px 20px 20px; }
.card-body h3 { margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* jobs */
.job { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px; }
.job.is-featured { border-color: rgba(255, 196, 0, .45); background: linear-gradient(145deg, rgba(255, 196, 0, .08), var(--card)); }
.job.is-expired { opacity: .55; }
.job-av { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 20px; background: var(--gold); color: #000; font-weight: 800; font-size: 22px; flex: none; }
.job-av-lg { width: 84px; height: 84px; border-radius: 28px; font-size: 34px; }
.job-main h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-co { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--tx2); font-size: 14px; }
.job-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.closing { padding: 4px 11px; border-radius: 999px; background: var(--card3); font-size: 12px; font-weight: 700; white-space: nowrap; }
.closing.soon { background: rgba(255, 70, 70, .16); color: #ff8080; }
.job-date { color: var(--tx3); font-size: 12.5px; }
.job-go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card3); transition: background .2s, color .2s; }
.job:hover .job-go { background: var(--gold); color: #000; }
/* past papers */
.paper { display: flex; flex-direction: column; padding: 20px; }
.pp-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.pp-ico { position: relative; display: grid; place-items: center; width: 54px; height: 62px; border-radius: 16px; background: var(--card3); color: var(--gold); }
.pp-ico .i { width: 26px; height: 26px; }
.pp-ico b { position: absolute; bottom: -7px; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: #000; font-size: 10px; letter-spacing: .06em; }
.pp-year { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--gold); }
.paper h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pp-cta, .tk-cta, .qt-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; color: var(--gold); font-weight: 700; font-size: 14.5px; }
/* model papers: ticket */
.ticket { display: grid; grid-template-columns: 112px 1fr; overflow: hidden; }
.tk-left { position: relative; display: grid; place-content: center; text-align: center; gap: 4px; padding: 16px 8px; background: var(--gold); color: #000; }
.tk-left::after { content: ""; position: absolute; right: -1px; top: 10px; bottom: 10px; border-right: 3px dotted var(--bg); }
.tk-left::before, .tk-left .tk-notch { content: ""; }
.tk-big { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.tk-sm { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.25; }
.tk-main { padding: 18px 20px; display: flex; flex-direction: column; }
.tk-main h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* contacts */
.contact { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ct-top { display: flex; gap: 14px; align-items: flex-start; }
.ct-av { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 17px; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 20px; }
.contact h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-num { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--card3); }
.ct-digits { font-size: 18px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.ct-acts { display: flex; gap: 6px; position: relative; z-index: 2; }
.act { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--card); transition: transform .15s, background .2s; }
.act:hover { background: var(--card2); }
.act:active { transform: scale(.9); }
.act-call { background: var(--gold); color: #000; }
.act-call:hover { background: var(--gold2); }
.ct-more { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: 14.5px; }
/* flashcard tiles */
.qtile { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 18px; align-items: center; }
.qt-stack { position: relative; height: 150px; }
.qt-stack i { position: absolute; inset: 0; border-radius: 22px; background: var(--card3); border: 1px solid var(--line); }
.qt-stack i:nth-child(1) { transform: rotate(-9deg) translateX(-6px); background: var(--card2); }
.qt-stack i:nth-child(2) { transform: rotate(-4deg); }
.qt-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 22px; background: var(--gold); color: #000; transform: rotate(3deg); transition: transform .4s var(--ease); overflow: hidden; }
.qt-face .i { width: 24px; height: 24px; }
.qt-face p { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.qtile:hover .qt-face { transform: rotate(-2deg) scale(1.04); }
.qt-body h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; }
.qt-body .badges { margin-top: 0; }
.qt-cta { padding-top: 12px; }

/* misc blocks */
.dial { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dial-i { position: relative; display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s; }
.dial-i:hover { transform: translateY(-3px); border-color: var(--gold); }
.dial-n { font-size: 34px; font-weight: 800; color: var(--gold); letter-spacing: -.02em; line-height: 1.1; }
.dial-l { color: var(--tx2); font-size: 13.5px; }
.dial-c { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.trend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; counter-reset: t; }
.trend a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.trend a:hover { border-color: rgba(255, 196, 0, .5); background: var(--card2); }
.rank { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--gold); color: #000; font-weight: 800; }
.t-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-views { display: inline-flex; align-items: center; gap: 5px; color: var(--tx3); font-size: 12.5px; flex: none; }
.level-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lvl { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s; }
.lvl:hover { transform: translateY(-3px); border-color: var(--gold); }
.lvl-big { display: grid; place-items: center; min-width: 76px; height: 64px; padding: 0 10px; border-radius: 20px; background: var(--gold); color: #000; font-weight: 800; font-size: 22px; }
.lvl strong { display: block; line-height: 1.2; }
.lvl small { color: var(--tx3); }
.lvl > .i { margin-left: auto; color: var(--gold); }
.group-tiles { /* 4 per row on desktop */ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.gt { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); font-size: 15px; transition: transform .25s var(--ease), border-color .2s; }
.gt:hover, .gt.on { transform: translateY(-3px); border-color: var(--gold); }
.gt.on .ico { background: var(--gold); color: #000; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps li { display: grid; gap: 4px; padding: 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.steps b { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 13px; background: var(--gold); color: #000; }
.steps span { color: var(--tx2); font-size: 14.5px; }
.tip-card { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--r-xl); background: var(--card); border: 1px solid rgba(255, 196, 0, .35); }
.tip-card p { margin: 4px 0 0; color: var(--tx2); }
.tip-card a { color: var(--gold); font-weight: 700; }
.join { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin: 52px 0 36px; padding: 30px; border-radius: var(--r-xl); background: linear-gradient(135deg, #ffcf24, #ffb300); color: #000; }
.join h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; }
.join p { margin: 6px 0 0; color: rgba(0, 0, 0, .72); max-width: 32em; }
.join-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.join .btn { background: #000; color: var(--gold); }
.join .btn:hover { background: #1b1b1e; box-shadow: none; }
.join .btn-ghost { background: rgba(0, 0, 0, .14); color: #000; }
.join-sm { margin: 28px 0; padding: 22px; }
.drawer .join-sm { margin: 18px 0 0; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 54px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-xl); }
.empty-i { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--gold-soft); color: var(--gold); }
.empty-i .i { width: 30px; height: 30px; }
.empty p { color: var(--tx2); margin: 0 0 8px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 34px 0 6px; }
.pager .page-numbers { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 700; transition: background .2s; }
.pager a.page-numbers:hover { background: var(--card3); }
.pager .current { background: var(--gold); border-color: var(--gold); color: #000; }
.pager .dots { background: transparent; border: 0; }
.about { margin-top: 44px; color: var(--tx2); }

/* ==========================================================================
   8. Single posts
   ========================================================================== */
article.single { max-width: 860px; padding-top: 32px; }
.s-head { margin-bottom: 22px; }
.s-head h1 { margin-top: 12px; font-size: clamp(28px, 5vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; }
.s-img { margin: 0 0 24px; border-radius: var(--r-xl); overflow: hidden; }
.entry { font-size: 17px; line-height: 1.8; color: rgba(255, 255, 255, .9); overflow-wrap: anywhere; }
.entry > :first-child { margin-top: 0; }
.entry h2 { margin: 1.8em 0 .6em; font-size: 28px; font-weight: 800; }
.entry h3 { margin: 1.6em 0 .5em; font-size: 22px; }
.entry h4 { margin: 1.4em 0 .4em; font-size: 18px; }
/* Links inside posts render as yellow, clickable buttons */
.entry a:not(.btn):not(.chip):not(.wp-block-button__link):not(:has(img,picture,figure,svg,iframe,video,div,p,table)),
.qa-ai a { display: inline-block; max-width: 100%; margin: .2em .15em; padding: .6em 1.3em; border-radius: 999px; background: var(--gold); color: #000; font-weight: 700; font-size: .94em; line-height: 1.35; text-align: center; text-decoration: none; overflow-wrap: anywhere; transition: transform .18s var(--ease), box-shadow .2s, background .2s; }
.entry a:not(.btn):not(.chip):not(.wp-block-button__link):not(:has(img,picture,figure,svg,iframe,video,div,p,table))::after,
.qa-ai a::after { content: "\2197"; margin-left: .45em; font-weight: 800; }
.entry a:not(.btn):not(.chip):not(.wp-block-button__link):not(:has(img,picture,figure,svg,iframe,video,div,p,table)):hover,
.qa-ai a:hover { background: var(--gold2); color: #000; box-shadow: 0 8px 26px rgba(255, 196, 0, .3); transform: translateY(-2px); }
.entry a:not(.btn):not(.chip):not(.wp-block-button__link):not(:has(img,picture,figure,svg,iframe,video,div,p,table)):active,
.qa-ai a:active { transform: scale(.96); }
.entry a strong, .entry a b, .qa-ai a strong { color: inherit; }
/* image links, heading anchors and footnote links stay plain */
.entry a:has(img), .entry a:has(picture), .entry a:has(figure), .entry a:has(svg), .entry a:has(iframe), .entry a:has(video), .entry a:has(div), .entry a:has(p), .entry a:has(table), .qa-ai a:has(img), .entry h2 a, .entry h3 a, .entry h4 a, .entry sup a { display: inline; margin: 0; padding: 0; border-radius: 0; background: none; color: var(--gold); font-weight: inherit; text-decoration: underline; box-shadow: none; transform: none; }
.entry a:has(img)::after, .entry a:has(picture)::after, .entry a:has(figure)::after, .entry a:has(svg)::after, .entry a:has(iframe)::after, .entry a:has(video)::after, .entry a:has(div)::after, .entry a:has(p)::after, .entry a:has(table)::after, .qa-ai a:has(img)::after, .entry h2 a::after, .entry h3 a::after, .entry h4 a::after, .entry sup a::after { content: none; }
.entry ul, .entry ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }
.entry li { margin: .3em 0; }
.entry li::marker { color: var(--gold); }
.entry blockquote { margin: 1.4em 0; padding: 16px 22px; border-left: 4px solid var(--gold); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--card); }
.entry img { border-radius: var(--r-md); }
.entry figure { margin: 1.4em 0; }
.entry figcaption { margin-top: 8px; color: var(--tx3); font-size: 14px; text-align: center; }
.entry table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.4em 0; border-radius: var(--r-md); }
.entry th, .entry td { padding: 12px 16px; border: 1px solid var(--line); text-align: left; }
.entry th { background: var(--card2); color: var(--gold); }
.entry iframe { width: 100%; border: 0; border-radius: var(--r-md); }
.entry pre, .entry code { background: var(--card); border-radius: 10px; font-size: .92em; }
.entry pre { padding: 16px; overflow-x: auto; }
.entry code { padding: 2px 6px; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 34px 0 0; padding: 18px 0; border-top: 1px solid var(--line); }
.share-l { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; color: var(--tx2); font-weight: 600; }
.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.pn { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); transition: border-color .2s; }
.pn:hover { border-color: var(--gold); }
.pn small { display: flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 700; font-size: 12.5px; }
.pn-r { text-align: right; } .pn-r small { justify-content: flex-end; }
.pn strong { font-size: 14.5px; line-height: 1.35; }
.related { margin-top: 48px; }
.related .grid-job, .related .grid-paper, .related .grid-ticket, .related .grid-qa, .related .grid-contact, .related .grid-std { grid-template-columns: 1fr; }
.related .grid-std, .related .grid-contact { grid-template-columns: repeat(2, 1fr); }
.notice-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 28px 0; padding: 20px 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.notice-card span { flex: 1; color: var(--tx2); }

/* job */
.jhead { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.jhead h1 { font-size: clamp(24px, 4.4vw, 38px); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 30px; }
.fact { padding: 14px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.fact dt { display: flex; align-items: center; gap: 7px; color: var(--tx3); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fact dt .i { color: var(--gold); }
.fact dd { margin: 4px 0 0; font-weight: 700; font-size: 16px; }
.facts-sm { grid-template-columns: repeat(4, 1fr); }
/* paper */
.dl-card { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; padding: 26px; border-radius: var(--r-xl); background: linear-gradient(145deg, rgba(255, 196, 0, .13), var(--card) 60%); border: 1px solid rgba(255, 196, 0, .35); }
.dl-ico { position: relative; display: grid; place-items: center; flex: none; width: 76px; height: 88px; border-radius: 22px; background: var(--card3); color: var(--gold); }
.dl-ico .i { width: 36px; height: 36px; }
.dl-ico b { position: absolute; bottom: -9px; padding: 2px 12px; border-radius: 999px; background: var(--gold); color: #000; font-size: 12px; }
.dl-main h2 { font-size: 24px; font-weight: 800; }
.dl-main p { margin: 4px 0 16px; color: var(--tx2); }
.dl-btns { display: flex; flex-wrap: wrap; gap: 10px; }
/* contact */
.numlist { display: grid; gap: 10px; margin-bottom: 14px; }
.numlist li { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 22px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.nl-l { min-width: 90px; color: var(--tx3); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.nl-n { flex: 1; font-size: clamp(20px, 4vw, 28px); font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.infogrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 28px; }
.info { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); line-height: 1.4; overflow-wrap: anywhere; }
.info > .i { color: var(--gold); width: 24px; height: 24px; }
.info small { display: block; color: var(--tx3); font-size: 12px; }
a.info:hover { border-color: var(--gold); }

/* ==========================================================================
   9. Flashcards (Q&A single)
   ========================================================================== */
.qa-bar { position: sticky; top: calc(var(--head) + 24px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; padding: 10px 12px; border-radius: var(--r-lg); background: rgba(18, 18, 20, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); }
.admin-bar .qa-bar { top: calc(var(--head) + 56px); }
.qa-bar .seg { margin: 0; padding: 4px; }
.qa-bar .seg-i { padding: 8px 16px; font-size: 14px; }
.qa-tools { display: flex; gap: 8px; }
.qa-tools .chip { background: var(--card3); }
.qa-prog { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--tx2); font-size: 13.5px; font-weight: 600; }
.qa-prog span { color: var(--gold); font-weight: 800; }
.qa-prog-bar { display: block; width: 90px; height: 6px; border-radius: 6px; background: var(--card3); overflow: hidden; }
.qa-prog-bar b { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 6px; transition: width .4s var(--ease); }
.qa-list { display: grid; gap: 12px; }
.qa { border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, background .3s; }
.qa.open { border-color: rgba(255, 196, 0, .55); background: var(--card2); }
.qa-q { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 18px 20px; border: 0; background: transparent; text-align: left; font-weight: 700; font-size: 17px; line-height: 1.5; }
.qa-n { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); font-size: 14px; font-weight: 800; transition: background .3s, color .3s; }
.qa.open .qa-n { background: var(--gold); color: #000; }
.qa-t { flex: 1; padding-top: 5px; }
.qa-chev { margin-top: 5px; color: var(--tx3); transition: transform .4s var(--ease), color .2s; }
.qa.open .qa-chev { transform: rotate(180deg); color: var(--gold); }
.qa-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.qa.open .qa-a { grid-template-rows: 1fr; }
.qa-ai { min-height: 0; overflow: hidden; padding: 0 20px 0 70px; opacity: 0; transform: translateY(-8px); transition: opacity .4s .05s, transform .45s var(--ease), padding .45s var(--ease); color: rgba(255, 255, 255, .92); line-height: 1.75; }
.qa.open .qa-ai { padding-bottom: 20px; opacity: 1; transform: none; }
.qa-ai p:last-child { margin-bottom: 0; }
.qa-lbl { display: inline-block; margin-bottom: 8px; padding: 3px 12px; border-radius: 999px; background: var(--gold); color: #000; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.deck { display: grid; justify-items: center; gap: 22px; padding: 8px 0 20px; }
.deck[hidden] { display: none; }
.deck-card { width: min(560px, 100%); height: min(380px, 62vh); perspective: 1400px; cursor: pointer; outline-offset: 6px; border-radius: var(--r-xl); }
.deck-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.deck-card.flipped .deck-in { transform: rotateY(180deg); }
.deck-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 28px; border-radius: var(--r-xl); text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: auto; }
.deck-front { background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.deck-back { background: linear-gradient(145deg, #ffcf24, #ffb300); color: #000; transform: rotateY(180deg); }
.deck-face small { position: absolute; top: 20px; left: 24px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: 12px; opacity: .7; }
.deck-front small { color: var(--gold); opacity: 1; }
.deck-face > div { font-size: clamp(19px, 3.4vw, 26px); font-weight: 700; line-height: 1.45; }
.deck-back > div { font-weight: 600; }
.deck-back a { text-decoration: underline; }
.deck-face em { position: absolute; bottom: 16px; font-size: 12.5px; font-style: normal; opacity: .55; }
.deck-nav { display: flex; align-items: center; gap: 14px; }
.deck.swap-next .deck-card { animation: swapnext .45s var(--ease); }
.deck.swap-prev .deck-card { animation: swapprev .45s var(--ease); }

/* ==========================================================================
   10. Footer, bottom nav, overlays, comments
   ========================================================================== */
.site-footer { margin-top: 70px; padding: 10px 0 120px; background: var(--bg2); border-top: 1px solid var(--line); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot-about p { margin: 14px 0 0; color: var(--tx2); max-width: 26em; font-size: 14.5px; }
.foot-grid h3 { margin-bottom: 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.foot-grid li { margin: 8px 0; }
.foot-grid li a { color: var(--tx2); font-size: 15px; }
.foot-grid li a:hover { color: var(--gold); }
.foot-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--tx3); font-size: 13.5px; }
.bottom-nav { display: none; position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 55; width: min(480px, 100% - 20px); padding: 8px; transform: translateX(-50%); justify-content: space-between; border-radius: 999px; background: rgba(24, 24, 27, .9); -webkit-backdrop-filter: saturate(1.6) blur(22px); backdrop-filter: saturate(1.6) blur(22px); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
.bottom-nav a { flex: 1; display: grid; justify-items: center; gap: 1px; padding: 7px 2px; border-radius: 999px; color: var(--tx3); font-size: 11px; font-weight: 600; transition: color .2s, background .3s var(--ease); }
.bottom-nav .i { width: 22px; height: 22px; }
.bottom-nav a.on { background: var(--gold); color: #000; }
.to-top { position: fixed; right: 16px; bottom: 96px; z-index: 50; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--card2); opacity: 0; transform: translateY(14px) scale(.8); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), background .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: #000; }
.toast { position: fixed; left: 50%; bottom: 110px; z-index: 120; padding: 12px 22px; border-radius: 999px; background: var(--gold); color: #000; font-weight: 700; font-size: 14.5px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.viewer { position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; background: var(--bg); opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s; }
.viewer.open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .4s var(--ease); }
.viewer-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.viewer-bar strong { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.viewer-body { flex: 1; background: #1b1b1e; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.comments { margin-top: 48px; }
.comments h2, .comment-reply-title { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.comment-list { display: grid; gap: 12px; margin-bottom: 24px; }
.comment-body { padding: 16px 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.comment-meta { color: var(--tx3); font-size: 13px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); outline: 0; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--gold); }
.comment-form label { display: block; margin-bottom: 6px; color: var(--tx2); font-size: 14px; }
.comment-form p { margin-bottom: 14px; }

/* ==========================================================================
   11. Motion
   ========================================================================== */
html.js [data-reveal] { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .6s var(--ease), transform .7s var(--ease), border-color .25s, background .25s; }
html.js [data-reveal].in { opacity: 1; transform: none; }
.bcard[data-reveal].in:hover, .job[data-reveal].in:hover, .paper[data-reveal].in:hover, .ticket[data-reveal].in:hover, .contact[data-reveal].in:hover, .qtile[data-reveal].in:hover, .card[data-reveal].in:hover, .mini[data-reveal].in:hover { transform: translateY(-4px); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes swapnext { from { opacity: 0; transform: translateX(46px) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes swapprev { from { opacity: 0; transform: translateX(-46px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	[data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   12. Responsive
   ========================================================================== */
@media (max-width: 1080px) {
	.grid-paper, .grid-contact { grid-template-columns: repeat(2, 1fr); }
	.grid-std { grid-template-columns: repeat(2, 1fr); }
	.facts-sm { grid-template-columns: repeat(2, 1fr); }
	.foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 901px) { .group-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) {
	.nav { display: none; }
	.hdr-actions { margin-left: auto; }
	.ibtn-menu { display: grid; }
	.hero-split { grid-template-columns: 1fr; }
	.stack-art, .fan-art { display: none; }
	.grid-job, .grid-ticket, .grid-qa, .trend, .steps { grid-template-columns: 1fr; }
	.level-tiles { grid-template-columns: 1fr; }
	.bottom-nav { display: flex; }
	.to-top { bottom: 90px; }
}
@media (max-width: 720px) {
	:root { --head: 58px; }
	.site-header { padding-top: 10px; }
	.logo { font-size: 19px; }
	.logo-svg { width: 38px; height: 38px; }
	body { font-size: 15.5px; }
	.hero { padding-top: 30px; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.stats-3 { grid-template-columns: repeat(3, 1fr); }
	.stats-3 .stat { padding: 14px; }
	.bento { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.bento .s3 { grid-column: span 2; min-height: 190px; }
	.bento .s2 { grid-column: span 1; min-height: 210px; padding: 18px; }
	.bento .s2.m2 { grid-column: span 2; min-height: 180px; }
	.bento .s2 .bc-desc { display: none; }
	.bcard .ico { width: 50px; height: 50px; border-radius: 17px; }
	.grid-paper, .grid-contact, .grid-std { grid-template-columns: 1fr; }
	.related .grid-std, .related .grid-contact { grid-template-columns: 1fr; }
	.filters { padding: 8px; border-radius: 26px; }
	.filters .f-q, .filters .f-s { flex: 1 1 100%; }
	.filters .btn { flex: 1; }
	.job { grid-template-columns: auto 1fr; padding: 16px; }
	.job-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; text-align: left; padding-top: 4px; border-top: 1px solid var(--line); }
	.ticket { grid-template-columns: 92px 1fr; }
	.tk-big { font-size: 30px; }
	.qtile { grid-template-columns: 112px 1fr; gap: 14px; }
	.qt-stack { height: 124px; }
	.qt-face p { font-size: 11px; -webkit-line-clamp: 3; }
	.facts { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.fact { padding: 12px 14px; }
	.fact dd { font-size: 15px; overflow-wrap: anywhere; }
	.facts-sm { grid-template-columns: repeat(2, 1fr); }
	.infogrid { grid-template-columns: 1fr; }
	.jhead { align-items: flex-start; }
	.job-av-lg { width: 64px; height: 64px; border-radius: 22px; font-size: 26px; }
	.dl-card { flex-direction: column; align-items: flex-start; padding: 22px; }
	.numlist li { flex-wrap: wrap; border-radius: var(--r-lg); padding: 14px 14px 14px 18px; }
	.nl-l { min-width: 100%; }
	.qa-q { padding: 16px; font-size: 16px; gap: 12px; }
	.qa-ai { padding-left: 16px; padding-right: 16px; }
	.qa-bar { top: calc(var(--head) + 20px); }
	.qa-prog { margin-left: 0; width: 100%; }
	.qa-prog-bar { flex: 1; width: auto; }
	.postnav { grid-template-columns: 1fr; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
	.foot-about { grid-column: 1 / -1; }
	.join { padding: 22px; }
	.sec { margin-top: 36px; }
	.hero-ctas .btn-lg { flex: 1; padding-inline: 18px; }
}
@media (max-width: 420px) {
	.wrap { width: calc(100% - 24px); }
	.bento .s2 { min-height: 190px; }
}
@media print {
	.site-header, .bottom-nav, .to-top, .share, .related, .site-footer, .qa-bar { display: none !important; }
	body { background: #fff; color: #000; }
	.qa-a { grid-template-rows: 1fr !important; } .qa-ai { opacity: 1 !important; transform: none !important; }
}

.entry a:has(img), .entry a:has(div), .entry a:has(figure) { display: block; max-width: 100%; }
.entry a:has(img):hover, .entry a:has(div):hover, .entry a:has(figure):hover { background: none; box-shadow: none; transform: none; }
